query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
sequencelengths 0
30
| negative_scores
sequencelengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
/ Makes a persistent article list from an array of UIDs with their respective offsets. \param $uids \code array ( array($article_uid, $article_offset), ... ) \endcode | public function assembleFromUIDs(array $uids) {
$timer = tx_newspaper_ExecutionTimer::create();
$this->clearList();
foreach ($uids as $uid) {
self::checkArticleOffsetValidity($uid);
$offset = intval($uid[1]);
if ($offset == 0) continue;
tx_newspaper::insertRows(
self::mm_table,
array('uid_local' => intval($this->getUid()),
'uid_foreign' => $uid[0],
'offset' => $offset)
);
}
$this->callSaveHooks();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOffsets(array $uids) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n if (!$uids) return array();\n\n $results = tx_newspaper::selectRows(\n 'uid_foreign, offset',\n self::mm_table,\n 'uid_local = ' . intval($this->getUid()) .\n ' AND uid_foreign IN (' . implode(',', $uids) . ')'\n );\n\n $offsets = array();\n foreach ($uids as $uid) {\n foreach ($results as $result) {\n if (intval($result['uid_foreign']) == intval($uid)) {\n $offsets[intval($uid)] = $result['offset'];\n break;\n }\n }\n if (!isset($offsets[intval($uid)])) $offsets[intval($uid)] = 0;\n }\n\n return $offsets;\n }",
"public function findByUids($uids) {\n\t\t$query = $this->createQuery();\n\t\t\n\t\t$query->matching(\n\t\t\t$query->in('uid', $uids)\n\t\t);\n\t\t\n\t\treturn $query->execute();\n\t}",
"function getEventsByUid($uids);",
"public function findByUids($uids) {\n\n\t\t$query = $this->createQuery();\n\t\t$constraints = array();\n\t\tif (!empty($uids)) {\n\t\t\t$constraints[] = $query->in('uid', $uids);\n\t\t}\n\t\tif (!empty($constraints)) {\n\t\t\t$query->matching($query->logicalAnd($constraints));\n\t\t}\n\n\t\treturn $query->execute();\n\t}",
"public function findByUids(int $limit, string $uids)\n {\n $uids = explode(',', $uids);\n\n $query = $this->createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n\n $query->matching(\n $query->in('uid', $uids)\n );\n if ($limit) {\n $query->setLimit($limit);\n }\n\n return $this->orderByField($query->execute(), $uids);\n }",
"function findAllMatchUidWithin($uids, $expression = null)\n {\n $objIds = [];\n foreach ($uids as $id)\n $objIds[] = $this->attainNextIdentifier($id);\n\n\n // Query Condition By Expression\n\n $queryConditions = [\n '_id' => [\n '$in' => $objIds\n ]\n ];\n\n if ($expression !== null) {\n $queryConditions\n += \\Module\\MongoDriver\\buildMongoConditionFromExpression($expression);\n }\n\n $r = $this->_query()->find(\n $queryConditions,\n [\n 'sort' => [\n '_id' => -1,\n ]\n ]\n );\n\n return $r;\n }",
"public static function fetchFromIds(array $ids): array;",
"function getArticlesOfProductAsUidList($pUid, $additionalWhere = '', $orderBy = '')\t{\n\t\t$where = 'uid_product=' .$pUid;\n\n\t\t$where .= ' AND deleted=0';\n\n\t\tif ($additionalWhere != '') {\n\t\t\t$where .= ' AND ' .$additionalWhere;\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tx_commerce_articles', $where, '', $orderBy);\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)\t{\n\t\t\t$result = array();\n\t\t\twhile ($article = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$result[] = $article['uid'];\n\t\t\t}\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function getByIds(array $ids);",
"private function get_articles($id,$username)\n\t{\n\t\t \n// \t\tif(count($result) > 0)\n// \t\t\t$this->set_article_analyzed_max_id($result[0]['id'],$username);\n\t\t\n\t\t$result = $this->db->fetchAll(\"select * from article where id > ($id) order by id asc\");\n\t\t$articles = array();\n\t\t \n\t\tforeach($result as $row){\n\t\t\t$id = $row['id'];\n\t\t\t$article_tags = $this->get_article_tags($id);\n\t\t\t$articles[] = new Article($id,\n\t\t\t\t\t\t\t\t\t $row['title'],\n\t\t\t\t\t $row['description'],\n\t\t\t\t\t $row['url'],\n\t\t\t\t\t $article_tags);\n\t\t}\n\t\t\n\t\treturn $articles;\n\t}",
"abstract protected function _doFetchByIds(array $userIds);",
"function &getArticlesByUserId($userId, $journalId = null) {\n\t\t$primaryLocale = AppLocale::getPrimaryLocale();\n\t\t$locale = AppLocale::getLocale();\n\t\t$params = array(\n\t\t\t'title',\n\t\t\t$primaryLocale,\n\t\t\t'title',\n\t\t\t$locale,\n\t\t\t'abbrev',\n\t\t\t$primaryLocale,\n\t\t\t'abbrev',\n\t\t\t$locale,\n\t\t\t$userId\n\t\t);\n\t\tif ($journalId) $params[] = $journalId;\n\t\t$articles = array();\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\ta.*,\n\t\t\t\tCOALESCE(stl.setting_value, stpl.setting_value) AS section_title,\n\t\t\t\tCOALESCE(sal.setting_value, sapl.setting_value) AS section_abbrev\n\t\t\tFROM\tarticles a\n\t\t\t\tLEFT JOIN sections s ON s.section_id = a.section_id\n\t\t\t\tLEFT JOIN section_settings stpl ON (s.section_id = stpl.section_id AND stpl.setting_name = ? AND stpl.locale = ?)\n\t\t\t\tLEFT JOIN section_settings stl ON (s.section_id = stl.section_id AND stl.setting_name = ? AND stl.locale = ?)\n\t\t\t\tLEFT JOIN section_settings sapl ON (s.section_id = sapl.section_id AND sapl.setting_name = ? AND sapl.locale = ?)\n\t\t\t\tLEFT JOIN section_settings sal ON (s.section_id = sal.section_id AND sal.setting_name = ? AND sal.locale = ?)\n\t\t\tWHERE\ta.user_id = ?' .\n\t\t\t(isset($journalId)?' AND a.journal_id = ?':''),\n\t\t\t$params\n\t\t);\n\n\t\twhile (!$result->EOF) {\n\t\t\t$articles[] =& $this->_returnArticleFromRow($result->GetRowAssoc(false));\n\t\t\t$result->MoveNext();\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $articles;\n\t}",
"public static function fetchList($ids, $getKeyFn, $getListFn, $onToLocalFn = null, $expire = 0, $default = false)\n {\n if (empty($ids))\n {\n return [];\n }\n $isArray = is_array($ids);\n if (!$isArray)\n {\n $singleId = $ids;\n $ids = (array)$ids;\n }\n $ids = array_filter(array_unique($ids));\n $keys = array();\n foreach ($ids as $id)\n {\n if (is_array($id))\n {\n throw new Exception('The key of each item should not be array');\n }\n $keys[$id] = call_user_func($getKeyFn, $id);\n }\n\n $cacheList = array();\n if ($expire >= 0)\n {\n $onToLocalFnProxy = null;\n if ($onToLocalFn != null)\n {\n $keys_filp = array_flip($keys);\n $onToLocalFnProxy = function($key, $item) use ($keys_filp, $onToLocalFn) {\n $id = $keys_filp[$key];\n $item = call_user_func($onToLocalFn, $id, $item);\n return $item;\n };\n }\n $cacheList = self::getMultiObj($keys, true, $onToLocalFnProxy);\n }\n $unHitIds = array();\n $list = array();\n foreach ($keys as $id => $key)\n {\n if (!isset($cacheList[$key]) || $cacheList[$key] === false)\n {\n $unHitIds[] = $id;\n }\n else\n {\n $list[$id] = $cacheList[$key];\n }\n }\n\n if (!empty($unHitIds))\n {\n $rawList = call_user_func($getListFn, $unHitIds);\n foreach ($unHitIds as $id)\n {\n if (isset($rawList[$id]))\n {\n $item = $rawList[$id];\n $cacheKey = $keys[$id];\n if ($expire != 0)\n {\n self::setObj($cacheKey, $item, $expire);\n }\n if ($onToLocalFn)\n {\n $item = call_user_func($onToLocalFn, $id, $item);\n }\n if ($item === false)\n {\n continue;\n }\n self::$cacheList[$cacheKey] = $item;\n $list[$id] = $item;\n }\n }\n }\n\n if ($isArray)\n {\n // reset order\n $ret = array();\n foreach ($ids as $id)\n {\n if (isset($list[$id]))\n {\n $ret[$id] = $list[$id];\n }\n else if ($default !== false)\n {\n $ret[$id] = $default;\n }\n }\n return $ret;\n }\n else\n {\n return isset($list[$singleId]) ? $list[$singleId] : $default;\n }\n }",
"function loadRecordsArray(array $ids, $keysToList = false) {\n return parent::loadRecordsArray($ids, $keysToList);\n }",
"function loadRecordsArray(array $ids, $keysToList = false) {\n return parent::loadRecordsArray($ids, $keysToList);\n }",
"function store_lastarticle($id, $nb_elems){\n\t$last_articles = &get_sessparam($_SESSION['cata']['articles']['last_articles'], array() );\n\tif(in_array($id,$last_articles)){\n\t\tunset($last_articles[array_search($id, $last_articles)]);\n\t}elseif(count($last_articles) >= $nb_elems){\n\t\tarray_splice($last_articles,$nb_elems-1);\n\t}\n\tarray_unshift($last_articles,$id);\n}",
"public function getListByIds($ids);",
"public static function unique_ID_reset($data, $uids){\n\n\t\tif (! is_array($data)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($data as $section_k => $section){\n\n\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t$data[$section_k]['uid'] = end($uids);\n\n\t\t\tif(is_array($section['wraps'])){\n\t\t\t\tforeach($section['wraps'] as $wrap_k => $wrap){\n\n\t\t\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t\t\t$data[$section_k]['wraps'][$wrap_k]['uid'] = end($uids);\n\n\t\t\t\t\tif(is_array($wrap['items'])){\n\t\t\t\t\t\tforeach($wrap['items'] as $item_k => $item){\n\n\t\t\t\t\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t\t\t\t\t$data[$section_k]['wraps'][$wrap_k]['items'][$item_k]['uid'] = end($uids);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $data;\n\n\t}",
"function findByIds(array $ids);",
"public function concatenateByUids(array $uids);",
"public function lookup(array $uids): array\n {\n $provider = AwsCredentialProvider::defaultProvider();\n $credentials = $provider()->wait();\n\n // Builds an array of Requests to send\n // The key for each request is the original uid.\n $requests = array_combine(\n $uids, // Use as array key\n array_map(function ($v) use ($credentials) {\n $url = $this->apiBaseUri . sprintf(\"/v1/use-an-lpa/lpas/%s\", $v);\n\n $request = new Request('GET', $url, $this->buildHeaders());\n\n return $this->awsSignature->signRequest($request, $credentials);\n }, $uids)\n );\n\n //---\n\n // Responses from the pool\n $results = [];\n\n $pool = new Pool($this->httpClient, $requests, [\n 'concurrency' => 50,\n 'options' => [\n 'http_errors' => false,\n ],\n 'fulfilled' => function ($response, $id) use (&$results) {\n $results[$id] = $response;\n },\n 'rejected' => function ($reason, $id) {\n // Log?\n },\n ]);\n\n // Initiate transfers and create a promise\n $promise = $pool->promise();\n\n // Force the pool of requests to complete\n $promise->wait();\n\n //---\n\n // Handle all request response now\n foreach ($results as $uid => $result) {\n $statusCode = $result->getStatusCode();\n\n switch ($statusCode) {\n case 200:\n # TODO: We can some more error checking around this.\n $results[$uid] = new Response\\Lpa(\n $this->sanitiser->sanitise(json_decode((string)$result->getBody(), true)),\n new DateTime($result->getHeaderLine('Date'))\n );\n break;\n default:\n // We only care about 200s at the moment.\n unset($results[$uid]);\n }\n }\n\n return $results;\n }",
"public function loadMultiple(array $ids = []);",
"public function loadMultiple(array $ids = []);",
"public function articles_list($limit,$offset)\n {\n $this->load->library('session');\n $user_id = $this->session->userdata('user_id');\n $user_id = intval($user_id);\n // or we can pass an array of fields ['title','id']\n $query = $this->db\n ->select(['title','id','created_at'])\n ->from('articles')\n ->where('user_id',$user_id)\n ->limit($limit,$offset)\n ->get();\n\n return $query->result();\n }",
"public function getIdsAt($offset)\n {\n return $this->get(self::IDS, $offset);\n }",
"public function getIdsAt($offset)\n {\n return $this->get(self::IDS, $offset);\n }",
"private static function checkArticleOffsetValidity($article_offset) {\n if (!is_array($article_offset) || sizeof($article_offset) < 2) {\n throw new tx_newspaper_InconsistencyException(\n 'Semiautomatic article list needs UID array to have members\n of the form: array(uid, offset), but no array was given: ' .\n print_r($article_offset)\n );\n }\n }",
"public function fetchByMultipleId(array $userIdList)\n {\n $richMembers = new RichMemberCollection();\n \n foreach ($userIdList as $userId) {\n $richMember = $this->fetch($userId);\n if (null !== $richMember) {\n $richMembers->append($richMember);\n }\n }\n \n return $richMembers;\n }",
"public function getMappings($snuids);",
"public function paginate(array $uids, int $page = 1, int $per_page = 10)\n\t{\n\t\tif (count($uids) < $per_page * $page)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->get_messages(array_slice($uids, $per_page * $page - $per_page, $per_page));\n\t}"
] | [
"0.64292896",
"0.6044243",
"0.5946617",
"0.5851576",
"0.55865085",
"0.5390936",
"0.53649604",
"0.53395325",
"0.52856714",
"0.51843303",
"0.51819706",
"0.5172201",
"0.51638776",
"0.5147936",
"0.5147936",
"0.51245683",
"0.51059175",
"0.50116515",
"0.5011165",
"0.50001895",
"0.49949008",
"0.49646983",
"0.49646983",
"0.4947217",
"0.49449715",
"0.49449715",
"0.4937405",
"0.49307126",
"0.49025857",
"0.48968613"
] | 0.744149 | 0 |
/ Given a list of articles and an operation on one of those, returns a new ordered list. This function, in contrast to \c assembleFromUIDs(), does not store the article list. It is used from an AJAX conroller to resort the articles in the list in correct order. \param $old_order Previous article list. \param $operation Sorts an article up, down, to top or bottom. \return The sorted article list after \p $operation has been applied. | public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {
$timer = tx_newspaper_ExecutionTimer::create();
try {
$index = self::indexOfArticle($operation->getUid(), $old_order);
} catch (tx_newspaper_Exception $e) {
// article not in list; do nothing.
return;
}
if ($operation->shuffleValue()) {
$this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);
} else if ($operation->isToTop()) {
$this->sortArticleToTop($index, $old_order);
} else if ($operation->isToBottom()) {
$this->dropArticle($index, $old_order);
} else {
throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);
}
return $old_order;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function resortArticle($uid, $shuffle_value, array &$old_order) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n if (abs($shuffle_value) != 1) {\n throw new tx_newspaper_IllegalUsageException('Only movements of +/- 1 are supported.');\n }\n\n $articles = $this->getArticlesAndOffsets(self::num_raw_uids);\n\n foreach ($old_order as $old_article) {\n $index = self::indexOfArticle($old_article[0], $articles);\n $articles[$index]['offset'] = $old_article[1];\n }\n\n $index = self::indexOfArticle($uid, $articles);\n\n $articles[$index]['offset'] += $shuffle_value;\n\n $temp_order = $this->sortArticles($articles);\n\n $old_order = array();\n foreach ($temp_order as $temp_article_offset) {\n $old_order[] = array(\n $temp_article_offset['article']->getUid(),\n $temp_article_offset['offset']\n );\n }\n\n }",
"public function sortOrderRecursive($newOrder,$xmlNode) {\r\t\tforeach ($xmlNode as $link) {\r\t\t\tforeach ($newOrder as $key => $value)\r\t\t\t if ($link['id']==$value[0]) {\r\t\t\t\t\t$link->addChild('order',$key);\r\t\t\t\t\t$link->addChild('newParent',$value[1]);\r\t\t\t\t}\r\t\t\t$this->sortOrderRecursive($newOrder,$link);\r\t\t}\r\t}",
"public function changeOrder($newOrdering) {\n \n $newOrdering = explode(\",\", $newOrdering);\n Debugger::fireLog($newOrdering);\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n Debugger::fireLog($fotkyId);\n \n for($i=0; $i < count($newOrdering); $i++) {\n $this->db->query(\"UPDATE fotky SET razeni=? WHERE id_fotky=?\", $i, $fotkyId[(int)$newOrdering[$i]]);\n }\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n \n Debugger::fireLog($fotkyId);\n \n \n }",
"private function getChangeFieldDefinitionOrderAction(array $newFields): TypeChangeFieldDefinitionOrderAction\n {\n $fieldNames = array_map(function (array $fieldDefinition) {\n return $fieldDefinition['name'];\n }, $newFields);\n\n return (new TypeChangeFieldDefinitionOrderAction())->setFieldNames($fieldNames);\n }",
"public function reorder($newOrder)\n {\n $this->paginator->reorderItems($newOrder);\n\n return $this;\n }",
"abstract protected function _buildOrderBy( $order );",
"public function reorderInterval(Task $task, int $oldSortOrder): void\n {\n $between = [$task->sort_order, $oldSortOrder];\n asort($between);\n\n $tasks = $this->repository->makeModel()\n ->orderBy('sort_order')\n ->where('uuid', '<>', $task->uuid)\n ->whereBetween('sort_order', $between)\n ->get();\n\n $action = ($task->sort_order < $oldSortOrder) ? 'increment' : 'decrement';\n\n foreach ($tasks as $task) {\n $task->$action('sort_order');\n }\n }",
"function reorderList() {\r\n\t\t\r\n\t}",
"private function dropArticle($index, array &$old_order) {\n self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);\n //moveArticleTemporarily adds article on top but should be at the bottom\n $entry = array_shift($old_order);\n $old_order[] = $entry;\n }",
"function reorder($posted_fields)\n {\n //when the main pages list of features is no longer hardcoded.\n $db_obj = new DB();\n $query1=\"UPDATE category set order_num=\";\n $query2=\" WHERE category_id=\";\n $querykeys=array_keys($posted_fields);\n $nextkey=array_pop($querykeys);\n while (strlen($nextkey)!=0)\n {\n if (ereg(\"category_order\", $nextkey))\n {\n $query=$query1.$posted_fields[\"$nextkey\"];\n $query=$query.$query2.substr($nextkey,14,strlen($nextkey)-14);\n $db_obj->execute_statement($query);\n }\n $nextkey=array_pop($querykeys);\n }\n// added by blicero to refresh feature listing -- blicero 22 may 2003\t\t\n\t$this->cache_left_catlisting();\n $this->cache_publish_arrays();\n\n\t\n return 0;\n }",
"function reorderAlbum()\r\n {\r\n global $Itemid, $mainframe;\r\n $db =& JFactory::getDBO();\r\n $my = & JFactory::getUser();\r\n\r\n $album_id = JRequest::getInt( 'album_id', 0 );\r\n $orderdata = JRequest::getVar( 'orderdata' );\r\n $neworder = explode(\"_\", $orderdata);\r\n\r\n for ($i=0, $n=count($neworder)-1; $i < $n; $i++) {\r\n $orderslot = explode(\"--\", $neworder[$i]);\r\n $order = intval(preg_replace(\"/[^0-9]/\", \"\", $orderslot[0]));\r\n $pid = intval(preg_replace(\"/[^0-9]/\", \"\", $orderslot[1]));\r\n\r\n // update ordering\r\n $db->SetQuery(\"UPDATE #__hwdpsphotos SET ordering = $i WHERE id = $pid\");\r\n $db->Query();\r\n if ( !$db->query() ) {\r\n echo \"<script> alert('\".$db->getErrorMsg().\"'); window.history.go(-1); </script>\\n\";\r\n exit();\r\n }\r\n }\r\n\r\n // perform maintenance\r\n\trequire_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_hwdphotoshare'.DS.'libraries'.DS.'maintenance_recount.class.php');\r\n hwd_ps_tools::setAlbumModifiedDate($album_id);\r\n include_once(JPATH_SITE.DS.'components'.DS.'com_hwdphotoshare'.DS.'xml'.DS.'xmloutput.class.php');\r\n hwd_ps_xmlOutput::prepareSlideshowXML($album_id);\r\n\r\n $msg = _HWDPS_ALERT_AREORGANISED;\r\n $mainframe->enqueueMessage($msg);\r\n $mainframe->redirect( JURI::root( true ) . '/index.php?option=com_hwdphotoshare&task=editalbum&album_id='.$album_id.'&Itemid='.$Itemid );\r\n }",
"private function sortArticleToTop($index, array &$old_order) {\n $distance = $this->distance($old_order[0], $old_order[$index]);\n self::moveArticleTemporarily($index, $old_order, $distance);\n }",
"function magtest_list_updateordering(&$magtest, $id, $table) {\n global $DB;\n\n if (is_int($magtest)) {\n $magtest->id = $magtest;\n }\n\n // Getting ordering value of the current node.\n $res = $DB->get_record($table, array('id' => $id));\n if (!$res) {\n return;\n }\n\n // Getting subsequent nodes that are upper.\n $query = \"\n SELECT\n id\n FROM\n {$table}\n WHERE\n sortorder > ? AND\n magtestid = ?\n ORDER BY\n sortorder\n \";\n\n // Reordering subsequent nodes using an object.\n if ($nextsubs = $DB->get_record_sql($query, array($res->sortorder, $magtest->id))) {\n $ordering = $res->sortorder + 1;\n foreach ($nextsubs as $asub) {\n $objet->id = $asub->id;\n $objet->sortorder = $ordering;\n $DB->update_record($table, $objet);\n $ordering++;\n }\n }\n}",
"function reOrder($order) {\n\t\tforeach($order as $task_id => $sort_order) {\n\t\t\t$this->newRow($task_id);\n\t\t\t$this->where(\"user_id='$_SESSION[user]'\");\n\t\t\t$this->field['sort_order'] = $sort_order;\n\t\t\t$this->save();\n\t\t}\n\t}",
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"public function setOrderingChanges($order, $direction);",
"function reorderChildren($order);",
"function ot_reorder_categories()\n{\n $new_order = array();\n\n // loop through $_POST and for each field_X_order values, update the $curr\n while (list($key, $val) = each($_POST))\n {\n // find the field id\n preg_match(\"/^category_(\\d+)_order$/\", $key, $match);\n\n if (!empty($match[1]))\n {\n $cat_id = $match[1];\n\n // update the $account_order\n $new_order[$cat_id] = $val;\n }\n }\n asort($new_order);\n reset($_POST);\n\n // now re-sort the categories\n $i = 1;\n while (list($cat_id, $value) = each($new_order))\n {\n mysql_query(\"\n UPDATE tr_project_categories\n SET category_order = $i\n WHERE category_id = $cat_id\n\t\t\t\t\t\t \");\n $i++;\n }\n}",
"protected function changeSortingOrderAction() {\n\t\t// this will be processed in the init() method\n\t\treturn $this->doAction();\n\t}",
"function reorder($parent, $order = null, $cid = null)\n {\n if (!$parent || is_a($parent, 'PEAR_Error')) {\n // Abort immediately if the parent string is empty; we\n // cannot safely reorder all top-level elements.\n return;\n }\n\n $pquery = '';\n if (!is_array($order) && !is_null($order)) {\n /* Single update (add/del). */\n if (is_null($cid)) {\n /* No object id given so shuffle down. */\n $direction = '-';\n } else {\n /* We have an object id so shuffle up. */\n $direction = '+';\n\n /* Leaving the newly inserted object alone. */\n $pquery = sprintf(' AND datatree_id != %s', (int)$cid);\n }\n $query = sprintf('UPDATE %s SET datatree_order = datatree_order %s 1 WHERE group_uid = %s AND datatree_parents = %s AND datatree_order >= %s',\n $this->_params['table'],\n $direction,\n $this->_write_db->quote($this->_params['group']),\n $this->_write_db->quote($parent),\n is_null($order) ? 'NULL' : (int)$order) . $pquery;\n\n Horde::logMessage('SQL Query by Horde_DataTree_Sql::reorder(): ' . $query, 'DEBUG');\n $result = $this->_write_db->query($query);\n } elseif (is_array($order)) {\n /* Multi update. */\n $query = 'SELECT COUNT(datatree_id)' .\n ' FROM ' . $this->_params['table'] .\n ' WHERE group_uid = ? AND datatree_parents = ?' .\n ' GROUP BY datatree_parents';\n $values = array($this->_params['group'],\n $parent);\n\n Horde::logMessage('SQL Query by Horde_DataTree_Sql::reorder(): ' . $query . ', ' . var_export($values, true), 'DEBUG');\n\n $result = $this->_db->getOne($query, $values);\n if (is_a($result, 'PEAR_Error')) {\n return $result;\n } elseif (count($order) != $result) {\n return PEAR::raiseError('Cannot reorder, number of entries supplied for reorder does not match number stored.');\n }\n\n $o_key = 0;\n foreach ($order as $o_cid) {\n $query = 'UPDATE ' . $this->_params['table'] .\n ' SET datatree_order = ? WHERE datatree_id = ?';\n $values = array($o_key, is_null($o_cid) ? NULL : (int)$o_cid);\n\n Horde::logMessage('SQL Query by Horde_DataTree_Sql::reorder(): ' . $query . ', ' . var_export($values, true), 'DEBUG');\n $result = $this->_write_db->query($query, $values);\n if (is_a($result, 'PEAR_Error')) {\n return $result;\n }\n\n $o_key++;\n }\n\n $pid = $this->getId($parent);\n\n /* Re-order our cache. */\n return $this->_reorder($pid, $order);\n }\n }",
"private function _reorder_components ( $components, $order ) {\n $order_entries = array();\n if ( '' != $order ) {\n $order_entries = explode( ',', $order );\n }\n\n // Re-order the components according to the stored order.\n if ( 0 < count( $order_entries ) ) {\n $original_components = $components; // Make a backup before we overwrite.\n $components = array();\n foreach ( $order_entries as $k => $v ) {\n if ( $this->_is_component_disabled( $v ) ) {\n $v = str_replace( '[disabled]', '', $v );\n }\n\n // Only add to array if component still exists\n if ( isset( $original_components[ $v ] ) ) {\n $components[ $v ] = $original_components[ $v ];\n unset( $original_components[ $v ] );\n }\n }\n if ( 0 < count( $original_components ) ) {\n $components = array_merge( $components, $original_components );\n }\n }\n\n return $components;\n }",
"function getArticlesOfProductAsUidList($pUid, $additionalWhere = '', $orderBy = '')\t{\n\t\t$where = 'uid_product=' .$pUid;\n\n\t\t$where .= ' AND deleted=0';\n\n\t\tif ($additionalWhere != '') {\n\t\t\t$where .= ' AND ' .$additionalWhere;\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tx_commerce_articles', $where, '', $orderBy);\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)\t{\n\t\t\t$result = array();\n\t\t\twhile ($article = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$result[] = $article['uid'];\n\t\t\t}\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function reorder_items(array $ordering)\n {\n $items = $this->items->find_all();\n $order = array_flip($ordering);\n\n foreach ($items as $item)\n {\n if (isset($order[$item->id]))\n {\n $item->sort_id = $order[$item->id];\n $item->save();\n }\n }\n }",
"function updateOrder($action) {\n\n\t\tif(count($action) == 2) {\n\n\t\t\t$query = new Query();\n\t\t\t$navigation_id = $action[1];\n\t\t\t$structure = json_decode(prepareForHTML(getPost(\"structure\")), true);\n\n\t\t\tforeach($structure as $node) {\n\t\t\t\t\n\t\t\t\t$sql = \"UPDATE \".$this->db_nodes.\" SET relation = \".$node[\"relation\"].\", position = \".$node[\"position\"].\" WHERE id = \".$node[\"id\"];\n\t\t\t\tif(!$query->sql($sql)) {\n\t\t\t\t\tmessage()->addMessage(\"Node order update failed\", array(\"type\" => \"error\"));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// delete from cache (will be respawned on next request)\n\t\t\t$sql = \"SELECT handle FROM \".$this->db.\" WHERE id = \".$navigation_id;\n\t\t\tif($query->sql($sql)) {\n\t\t\t\t$handle = $query->result(0, \"handle\");\n\t\t\t\tcache()->reset(\"navigation-\".$handle);\n\t\t\t}\n\n\t\t\tmessage()->addMessage(\"Node order updated\");\n\t\t\treturn true;\n\t\t}\n\n\t\tmessage()->addMessage(\"Node order could not be updated\", array(\"type\" => \"error\"));\n\t\treturn false;\n\n\t}",
"public function actionAjaxOrderPages()\n {\n $ordersJson = Yii::app()->request->getParam('orders');\n $orders = json_decode($ordersJson,true);\n\n $previous = $orders['old'];\n $new = $orders['new'];\n\n Sort::ReorderItems(\"ContactsPage\",$previous,$new);\n\n echo \"OK\";\n }",
"function reorderList() \r\n {\r\n return 'reorder';\r\n }",
"function returnArraySortedByInsertion($array, $order, $key){\n // Key = if array holds arrays, which key holds the value\n self::verifyThatArrayIsUsable($array, $order, $key);\n $total = count($array);\n //print \"init ---\";\n //var_dump($array);\n //print \"<Br><Br>\";\n for($index = 0; $index < $total; $index++){\n self::moveElementBackUntillPlaceIsFound($array, $index, $order, $key); // Array is Pased by Reference\n //print \"<br>After for $index ---\";\n //var_dump($array);\n //print \"<Br><Br>\";\n }\n \n return $array;\n }",
"public function getGroupListsOrdered();",
"protected function populateState($ordering = null, $direction = null)\n {\n\n\n // Initialise variables.\n $app = JFactory::getApplication();\n\t\t$params = $app->getParams('com_einsatzkomponente');\n\t\t$page_limit = $params->get('display_home_pagination_limit','');\n\t\t$show_pagination = $params->get('display_home_pagination','1');\n\t\tif (!$page_limit) : $page_limit = $app->getCfg('list_limit'); endif;\n\t\tif (!$show_pagination) : $page_limit = ''; endif; \n // List state information\n $limit = $app->getUserStateFromRequest('list.limit', 'limit',$page_limit); \n $this->setState('list.limit', $limit);\n\n $limitstart = $app->input->getInt('limitstart', 0);\n $this->setState('list.start', $limitstart);\n if ($list = $app->getUserStateFromRequest($this->context . '.list', 'list', array(), 'array'))\n {\n foreach ($list as $name => $value)\n {\n // Extra validations\n switch ($name)\n {\n case 'fullordering':\n $orderingParts = explode(' ', $value);\n\n if (count($orderingParts) >= 2)\n {\n // Latest part will be considered the direction\n $fullDirection = end($orderingParts);\n\n if (in_array(strtoupper($fullDirection), array('ASC', 'DESC', '')))\n {\n $this->setState('list.direction', $fullDirection);\n }\n\n unset($orderingParts[count($orderingParts) - 1]);\n\n // The rest will be the ordering\n $fullOrdering = implode(' ', $orderingParts);\n\n if (in_array($fullOrdering, $this->filter_fields))\n {\n $this->setState('list.ordering', $fullOrdering);\n }\n }\n else\n {\n $this->setState('list.ordering', $ordering);\n $this->setState('list.direction', $direction);\n }\n break;\n\n case 'ordering':\n if (!in_array($value, $this->filter_fields))\n {\n $value = $ordering;\n }\n break;\n\n case 'direction':\n if (!in_array(strtoupper($value), array('ASC', 'DESC', '')))\n {\n $value = $direction;\n }\n break;\n\n case 'limit':\n $limit = $value;\n break;\n\n // Just to keep the default case\n default:\n $value = $value;\n break;\n }\n\n $this->setState('list.' . $name, $value);\n }\n }\n// Filter aus Menülink abfangen \n\nif (!$app->input->getInt('list', 0)) : // Prüfen ob zurück aus Detailansicht\n$params = $app->getParams('com_einsatzkomponente');\n\n$this->setState('filter.year', $params->get('filter_year',''));\n$app->setUserState( $this->context . '.filter.year', $params->get('filter_year','') );\n\n$this->setState('filter.auswahl_orga', $params->get('filter_auswahl_orga',''));\n$app->setUserState( $this->context . '.filter.auswahl_orga', $params->get('filter_auswahl_orga','') );\n \n$this->setState('filter.alerting', $params->get('filter_alerting',''));\n$app->setUserState( $this->context . '.filter.alerting', $params->get('filter_alerting','') );\n\n$this->setState('filter.tickerkat', $params->get('filter_tickerkat',''));\n$app->setUserState( $this->context . '.filter.tickerkat', $params->get('filter_tickerkat','') );\n\n$this->setState('filter.data1', $params->get('filter_data1',''));\n$app->setUserState( $this->context . '.filter.data1', $params->get('filter_data1','') );\n\n$this->setState('filter.vehicles', $params->get('filter_vehicles',''));\n$app->setUserState( $this->context . '.filter.vehicles', $params->get('filter_vehicles','') );\n\n$this->setState('filter.date1_from_dateformat', $params->get('filter_date1_from_dateformat',''));\n$app->setUserState( $this->context . '.filter.date1_from_dateformat', $params->get('filter_date1_from_dateformat','') );\n\n$this->setState('filter.date1_to_dateformat', $params->get('filter_date1_to_dateformat',''));\n$app->setUserState( $this->context . '.filter.date1_to_dateformat', $params->get('filter_date1_to_dateformat','') ); \n\nendif;\n\n // Receive & set filters\n if ($filters = $app->getUserStateFromRequest($this->context . '.filter', 'filter', array(), 'array'))\n {\n\t\t\n\n foreach ($filters as $name => $value)\n {\n $this->setState('filter.' . $name, $value);\n\t\t\t\t//echo 'filter.'.$name.': '.$value.'<br/>';\n\t\t\t\t\n }\n }\n $this->setState('list.ordering', $app->input->get('filter_order'));\n $this->setState('list.direction', $app->input->get('filter_order_Dir'));\n }",
"function magtest_list_up(&$magtest, $id, $table) {\n global $DB;\n\n $res = $DB->get_record($table, array('id' => $id));\n if ($res->sortorder > 1) {\n $previousorder = $res->sortorder - 1;\n $previous = $DB->get_record($table, array('magtestid' => $magtest->id, 'sortorder' => $previousorder));\n\n // Swapping.\n $res->sortorder--;\n $DB->update_record(\"$table\", $res);\n\n $previous->sortorder++;\n $DB->update_record(\"$table\", $previous);\n }\n}"
] | [
"0.51362467",
"0.497353",
"0.4929225",
"0.49203485",
"0.48899174",
"0.48571962",
"0.4794672",
"0.47341725",
"0.47295436",
"0.4672909",
"0.46469197",
"0.4646461",
"0.45717314",
"0.45621744",
"0.45586398",
"0.45553812",
"0.4533382",
"0.45320854",
"0.4509969",
"0.45071325",
"0.4505018",
"0.44676447",
"0.44500223",
"0.4424525",
"0.4404074",
"0.43990803",
"0.4381373",
"0.438003",
"0.43749315",
"0.4363167"
] | 0.80261326 | 0 |
/ Checks whether an array is a valid pair of article UID and offset. | private static function checkArticleOffsetValidity($article_offset) {
if (!is_array($article_offset) || sizeof($article_offset) < 2) {
throw new tx_newspaper_InconsistencyException(
'Semiautomatic article list needs UID array to have members
of the form: array(uid, offset), but no array was given: ' .
print_r($article_offset)
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_valid_offset( $offset ) {\n\t\treturn ! empty( get_user_by( 'ID', absint( $offset ) ) );\n\t}",
"abstract protected function offsetIsAllowed($offset);",
"function offsetExists ( $offset ) {\n return (strlen($this->data) / $this->len) - 1 >= $offset;\n }",
"function offsetExists ($offset)\n\t{\n\t\t$found = parent::offsetExists($offset);\n\t\tif (!$found && is_string($offset)) {\n\t\t\t$list = $this->namedItem($offset);\n\t\t\t$found = $list->length > 0;\n\t\t}\n\t\treturn $found;\n\t}",
"public function offsetExists($offset): bool\n {\n $this->initInternArray();\n\n return ($this->getInternArrayIsArray() && array_key_exists($offset, $this->getInternArray()));\n }",
"public function offsetExists( $offset ) {\n return is_numeric( $offset ) && $offset > -1 && $offset < $this->getSize();\n }",
"public function offsetExists(mixed $offset): bool\n {\n return array_key_exists($offset, $this->items->toArray());\n }",
"public function offsetExists($offset);",
"public function hasOffset();",
"protected function hasOffset(mixed $offset): bool\n {\n /** In MySQL offset argument must be a non-negative integer constant */\n $offset = (string) $offset;\n return ctype_digit($offset) && $offset !== '0';\n }",
"public function offsetExists($offset): bool {\n return array_key_exists($offset, $this->items);\n }",
"public function offsetExists($offset) : bool {\n\t\treturn array_key_exists($offset, $this->data);\n\t}",
"public function offsetExists(mixed $offset): bool\n {\n return array_key_exists($offset, $this->items);\n }",
"public function offsetExists($offset) {\n return isset($this->_parts[$offset]);\n }",
"public function offsetExists($offset)\n {\n return in_array($offset,$this->container,true);\n }",
"public function offsetExists(mixed $offset)\n {\n }",
"public function offsetExists($offset) {\n $offset = $offset >= 0 ? $offset : (int) abs($offset) - 1;\n\n return $this->length() > $offset;\n }",
"public function offsetExists($offset)\n\t{\n\t\treturn $offset >= 0 AND $offset < $this->count();\n\t}",
"public function offsetExists($offset) {\n\n \t$offsetExists = false;\n\n \tif (key_exists($offset, $this->_properties)) {\n\n \t\t$offsetExists = true;\n\n \t} else {\n\n\t $propertyParts = explode('_', $offset);\n\n\t $special = end($propertyParts);\n\t if (in_array($special, $this->_modifierList)) {\n\t array_pop($propertyParts);\n\t }\n\n\t $property = implode('_', $propertyParts);\n\t // TODO: call offsetExists recursively?\n\t if (key_exists($property, $this->_properties)) {\n\t \t$offsetExists = true;\n\t }\n \t}\n return $offsetExists;\n }",
"public function offsetExists($offset){\r\n\t\treturn isset($this->_elements[$offset]);\r\n\t}",
"public function offsetExists($offset)\n {\n return is_scalar($offset) && array_key_exists($offset, $this->baseConcreteData);\n }",
"public function offsetExists($offset): bool\n {\n return array_key_exists($offset, $this->_items);\n }",
"public function offsetExists($offset)\n {\n return array_key_exists($offset, $this->_attributes);\n }",
"public function offsetExists($offset)\n {\n return array_key_exists($offset, $this->items);\n }",
"public function offsetExists($offset)\n {\n return array_key_exists($offset, $this->items);\n }",
"public function offsetExists($offset)\n {\n }",
"public function offsetExists($offset)\n {\n }",
"public function offsetExists($offset)\n {\n }",
"public function offsetExists($offset) {\n return array_key_exists($offset, $this->_items);\n }",
"public function offsetExists($offset) {\n return array_key_exists($offset, $this->_items);\n }"
] | [
"0.68024147",
"0.6343162",
"0.62392396",
"0.6095874",
"0.59794277",
"0.59779197",
"0.5953322",
"0.5930083",
"0.5927912",
"0.58881533",
"0.5886614",
"0.5881894",
"0.58395463",
"0.58164674",
"0.5810269",
"0.5792684",
"0.57912487",
"0.5782895",
"0.57649374",
"0.5759439",
"0.57549983",
"0.575374",
"0.57533574",
"0.57340103",
"0.57340103",
"0.5730835",
"0.5730835",
"0.5730835",
"0.57261395",
"0.57261395"
] | 0.79032797 | 0 |
/ Finds the position of article with UID \p $uid in the array \p $old_order. | private static function indexOfArticle($uid, array $old_order) {
for ($i = 0; $i < sizeof($old_order); $i++) {
$article_offset = $old_order[$i];
self::checkArticleOffsetValidity($article_offset);
$current_uid = $article_offset[0];
if ($current_uid == $uid) return $i;
if ($article_offset['article'] instanceof tx_newspaper_Article) {
$current_uid = $article_offset['article']->getUid();
if ($current_uid == $uid) return $i;
}
}
throw new tx_newspaper_Exception('UID ' . $uid . ' not found in ' . print_r($old_order, 1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPosition(array $order): ?int\n {\n foreach ($this->variations as $variation) {\n $pos = array_search($variation->getName(), $order, true);\n if (false !== $pos) {\n return $pos;\n }\n }\n\n return null;\n }",
"private function resortArticle($uid, $shuffle_value, array &$old_order) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n if (abs($shuffle_value) != 1) {\n throw new tx_newspaper_IllegalUsageException('Only movements of +/- 1 are supported.');\n }\n\n $articles = $this->getArticlesAndOffsets(self::num_raw_uids);\n\n foreach ($old_order as $old_article) {\n $index = self::indexOfArticle($old_article[0], $articles);\n $articles[$index]['offset'] = $old_article[1];\n }\n\n $index = self::indexOfArticle($uid, $articles);\n\n $articles[$index]['offset'] += $shuffle_value;\n\n $temp_order = $this->sortArticles($articles);\n\n $old_order = array();\n foreach ($temp_order as $temp_article_offset) {\n $old_order[] = array(\n $temp_article_offset['article']->getUid(),\n $temp_article_offset['offset']\n );\n }\n\n }",
"function getPosition($uid, $kind)\n{\n\t$sql = '\n\t\tSELECT DISTINCT\n\t\t\tpos_x,\n\t\t\tpos_y\n\t\tFROM '.\\util\\mysql\\sqlval('dw_'.$kind, false).'\n\t\tWHERE uid = '.\\util\\mysql\\sqlval($uid).'\n\t';\n\n\tif ($kind == 'units')\n\t\t$sql .= ' AND NOT tid';\n\n\treturn \\util\\mysql\\query($sql, true);\n}",
"public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n try {\n $index = self::indexOfArticle($operation->getUid(), $old_order);\n } catch (tx_newspaper_Exception $e) {\n // article not in list; do nothing.\n return;\n }\n\n if ($operation->shuffleValue()) {\n $this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);\n } else if ($operation->isToTop()) {\n $this->sortArticleToTop($index, $old_order);\n } else if ($operation->isToBottom()) {\n $this->dropArticle($index, $old_order);\n } else {\n throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);\n }\n\n return $old_order;\n }",
"function snax_get_item_position( $item = null ) {\n\t$item = get_post( $item );\n\t$post_id = $item->post_parent;\n\n\t// Shouldn't happen.\n\t$position = - 1;\n\n\t$found_index = array_search( $item->ID, snax_get_items_ids( $post_id ) );\n\n\tif ( false !== $found_index ) {\n\t\t$position = $found_index + 1; // Array keys start from 0.\n\t}\n\n\treturn $position;\n}",
"function updateStackPosition($idDiag, $oldOrder, $newOrder,$db)\n {\n $req=$db->prepare('UPDATE stack SET order_stack=:NEWCOL WHERE order_stack=:OLDCOL AND diag_linked=:DIAG');\n $req->execute(array(\n 'OLDCOL' => $oldOrder,\n 'NEWCOL' => $newOrder,\n 'DIAG' => $idDiag\n ));\n }",
"function getArticlesOfProductAsUidList($pUid, $additionalWhere = '', $orderBy = '')\t{\n\t\t$where = 'uid_product=' .$pUid;\n\n\t\t$where .= ' AND deleted=0';\n\n\t\tif ($additionalWhere != '') {\n\t\t\t$where .= ' AND ' .$additionalWhere;\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tx_commerce_articles', $where, '', $orderBy);\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)\t{\n\t\t\t$result = array();\n\t\t\twhile ($article = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$result[] = $article['uid'];\n\t\t\t}\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected function _getPosition($id, $list = []) {\n\t\tif (!$list) {\n\t\t\t$list = $this->_getList();\n\t\t}\n\t\t$count = 0;\n\t\t$position = null;\n\t\tforeach ($list as $k => $v) {\n\t\t\t$count++;\n\t\t\tif ($id == $k) {\n\t\t\t\t$position = $count;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $position;\n\t}",
"public function getPreviousOrderId(){\n $db = JFactory::getDBO();\n\n $query = \"SELECT order_id FROM \" . $db->quoteName('#__jeproshop_orders') . \" WHERE order_id < \";\n $query .= (int)$this->order_id . \" ORDER BY order_id DESC\";\n\n $db->setQuery($query);\n return $db->loadObjectList();\n }",
"protected function createPosition(OrderPosition $position, $orderUid, $pid) {\n\t\t$data = array();\n\t\t$table = 'tx_t3stores_orderposition';\n\t\t$data['crdate'] = $data['tstamp'] = time();\n\t\t$data['orderuid'] = $orderUid;\n\t\t$data['pid'] = $pid;\n\n\t\t$cols = array_keys(\\tx_rnbase_util_TCA::getTcaColumns('tx_t3stores_orderposition'));\n\t\tforeach ($cols As $colName) {\n\t\t\tif($position->hasProperty($colName)) {\n\t\t\t\t$data[$colName] = $position->getProperty($colName);\n\t\t\t}\n\t\t}\n\n\t\t\\tx_rnbase::load('tx_rnbase_util_DB');\n\t\t$newUid = \\tx_rnbase_util_DB::doInsert($table,$data);\n\n\t\treturn $newUid;\n\t}",
"public function getRecord ($orderUid, $tracking='')\t{\n\t\tif (\n\t\t\tempty($tracking) &&\n\t\t\t!$orderUid\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$where = ($tracking ? 'tracking_code=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tracking, 'sys_products_orders') : 'uid=' . intval($orderUid));\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\t'sys_products_orders',\n\t\t\t$where . $this->cObj->enableFields('sys_products_orders')\n\t\t);\n\t\t$rc = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\t\treturn $rc;\n\t}",
"private function sortArticleToTop($index, array &$old_order) {\n $distance = $this->distance($old_order[0], $old_order[$index]);\n self::moveArticleTemporarily($index, $old_order, $distance);\n }",
"function cmp($a, $b) {\n if ($a['position'] == $b['position']) {\n \t return 0;\n }\n \treturn ($a['position'] < $b['position']) ? -1 : 1;\n}",
"private function dropArticle($index, array &$old_order) {\n self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);\n //moveArticleTemporarily adds article on top but should be at the bottom\n $entry = array_shift($old_order);\n $old_order[] = $entry;\n }",
"function returnArraySortedByInsertion($array, $order, $key){\n // Key = if array holds arrays, which key holds the value\n self::verifyThatArrayIsUsable($array, $order, $key);\n $total = count($array);\n //print \"init ---\";\n //var_dump($array);\n //print \"<Br><Br>\";\n for($index = 0; $index < $total; $index++){\n self::moveElementBackUntillPlaceIsFound($array, $index, $order, $key); // Array is Pased by Reference\n //print \"<br>After for $index ---\";\n //var_dump($array);\n //print \"<Br><Br>\";\n }\n \n return $array;\n }",
"public function change_position( $args ) {\n\t\t\t$this->iter++;\n\t\t\t$args['menu_position'] = $this->start_position + $this->iter;\n\t\t\treturn $args;\n\t\t}",
"public function getOffset(tx_newspaper_ArticleIface $article) {\n $offset = $this->getOffsets(array($article->getUid()));\n if (sizeof($offset) < 1) return 0;\n return intval($offset[$article->getUid()]);\n }",
"function getArticlesOfProduct($pUid, $additionalWhere = '', $orderBy = '')\t{\n\t\t$where = 'uid_product=' .intval($pUid);\n\n\t\t$where .= ' AND deleted=0';\n\n\t\tif ($additionalWhere != '') {\n\t\t\t$where .= ' AND ' .$additionalWhere;\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_commerce_articles', $where, '', $orderBy);\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)\t{\n\t\t\t$result = array();\n\t\t\twhile ($article = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$result[] = $article;\n\t\t\t}\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getPosition(){\n\t\t\tif(empty(self::$conn)){\n\t\t\t\tself::$conn=$this->connect_pdo();\n\t\t\t}\n\t\t\t$stmt=self::$conn->query('SELECT position FROM thumuc2 ORDER BY position DESC LIMIT 1');\n\t\t\t$stmt->execute();\n\t\t\t$stmt->setFetchMode(PDO::FETCH_BOTH);\n\t\t\tif(!$row=$stmt->fetch()){\n\t\t\t\t$row['position']=0;\n\t\t\t}\n\t\t\treturn $row['position'];\n\n\t\t}",
"function bbp_get_reply_position($reply_id = 0, $topic_id = 0)\n{\n}",
"public function getOldFindID() {\n return $this->_oldFindID;\n }",
"public function getItemByUid($uid) {\n\t\t\n\t\tforeach ( $this->items as $item ) {\n\t\t\tif ($uid == $item->getUid()) {\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function getByUid($uid) {\n\t\tforeach ($this->items as $item) {\n\t\t\t/* @var $item \\TYPO3\\GenericGallery\\Domain\\Model\\GalleryItem */\n\t\t\tif ((string)$uid === (string)$item->getUid()) {\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\n\t\treturn NULL;\n\t}",
"public function getNumber ($orderUid) {\n $orderNumberPrefix = substr($this->conf['orderNumberPrefix'], 0, 30);\n if (($position = strpos($orderNumberPrefix, '%')) !== false) {\n $orderDate = date(substr($orderNumberPrefix, $position + 1));\n $orderNumberPrefix = substr($orderNumberPrefix, 0, $position) . $orderDate;\n }\n\n $result = $orderNumberPrefix . $orderUid;\n return $result;\n }",
"public function findByUid($uid) {\n\t\t// @TODO implement\n\t}",
"function bbp_get_reply_position_raw($reply_id = 0, $topic_id = 0)\n{\n}",
"function findListOrder()\n\t{\n\t\t$query=\"SELECT `list_order` FROM `jos_vm_category` ORDER BY `list_order` DESC\";\n\t\t$result=mysql_query($query);\n\t\t$rowsnum=mysql_num_rows($result);\n\t\tif($rowsnum==0)\n\t\t\treturn 1;\n\t\telse\n\t\t{\n\t\t\t$row=mysql_fetch_row($result);\n\t\t\t\n\t\t\treturn $row[0]+1;\n\t\t}\n\t\t\t\n\t}",
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"function getPosition($rowId)\n\t{\n\t\tglobal $xeviousDB;\n\n\t\t$rowId = $xeviousDB->sqlInjectionFilter($rowId);\n\n\t\t$query = \"SELECT std_rank FROM classifica WHERE id_partita = '\" .$rowId. \"';\";\n\t\t$result = $xeviousDB->performQuery($query);\n\t\t$xeviousDB->closeConnection();\n\n\t\tif(!$result || $result->num_rows != 1)\n\t\t\treturn false;\n\n\t\t$result = $result->fetch_array();\n\t\t$result = $result[0];\n\t\treturn $result;\n\t}",
"function getAtPosition($uid, $posx, $posy, $kind, $getAll, $orderBy)\n{\n\tif ($kind == 'troops')\n\t{\n\t\t$sql = '\n\t\t\tSELECT\n\t\t\t\ttid,\n\t\t\t\tname,\n\t\t\t\tres,\n\t\t\t\tamount\n\t\t\tFROM dw_troops\n\t\t\tWHERE pos_x = '.\\util\\mysql\\sqlval($posx).'\n\t\t\t\tAND pos_y = '.\\util\\mysql\\sqlval($posy).'\n\t\t\t\tAND uid = '.\\util\\mysql\\sqlval($uid).'\n\t\t\tORDER BY tid\n\t\t';\n\t}\n\telseif ($kind == 'units')\n\t{\n\t\t$sql = '\n\t\t\tSELECT\n\t\t\t\tunid,\n\t\t\t\tkind,\n\t\t\t\tcount\n\t\t\tFROM dw_units\n\t\t\tWHERE pos_x = '.\\util\\mysql\\sqlval($posx).'\n\t\t\t\tAND pos_y = '.\\util\\mysql\\sqlval($posy).'\n\t\t\t\tAND uid = '.\\util\\mysql\\sqlval($uid).'\n\t\t\t\t'.(!$getAll ? 'AND NOT tid' : '').'\n\t\t\tORDER BY '.\\util\\mysql\\sqlval($orderBy, false).'\n\t\t';\n\t}\n\treturn \\util\\mysql\\query($sql, true);\n}"
] | [
"0.57080984",
"0.56456226",
"0.52036995",
"0.5085271",
"0.49938118",
"0.4899825",
"0.4892968",
"0.4860934",
"0.48581237",
"0.4840306",
"0.4817376",
"0.4804562",
"0.47874182",
"0.47833964",
"0.47500628",
"0.4745634",
"0.47078753",
"0.46844494",
"0.46742612",
"0.46433935",
"0.4641699",
"0.46046916",
"0.45965767",
"0.4594515",
"0.4582287",
"0.45712584",
"0.45578402",
"0.4520454",
"0.45168695",
"0.4509946"
] | 0.82678974 | 0 |
/ Moves article at position \p $index in array \p $old_order \p $shuffle_value positions up or down. | private function resortArticle($uid, $shuffle_value, array &$old_order) {
$timer = tx_newspaper_ExecutionTimer::create();
if (abs($shuffle_value) != 1) {
throw new tx_newspaper_IllegalUsageException('Only movements of +/- 1 are supported.');
}
$articles = $this->getArticlesAndOffsets(self::num_raw_uids);
foreach ($old_order as $old_article) {
$index = self::indexOfArticle($old_article[0], $articles);
$articles[$index]['offset'] = $old_article[1];
}
$index = self::indexOfArticle($uid, $articles);
$articles[$index]['offset'] += $shuffle_value;
$temp_order = $this->sortArticles($articles);
$old_order = array();
foreach ($temp_order as $temp_article_offset) {
$old_order[] = array(
$temp_article_offset['article']->getUid(),
$temp_article_offset['offset']
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"function moveIndexInArray($array, $index, $upOrDown)\n{\n switch ($upOrDown)\n {\n case 'up':\n $destIndex = $index - 1;\n if ($destIndex < 0 || $index >= count($array)) {throw new Exception('Index out of range.');}\n break;\n\n case 'down':\n $destIndex = $index + 1;\n if ($index < 0 || $destIndex >= count($array)) {throw new Exception('Index out of range.');}\n break;\n\n default:\n throw new Exception(\"Expected 'up' or 'down'. Received '$upOrDown'.\");\n }\n\n // Swap element at $index with element at $destIndex.\n $temp = $array[$destIndex];\n $array[$destIndex] = $array[$index ];\n $array[$index ] = $temp;\n\n // Swap element at $index with element at $destIndex.\n //$srcElem = &$array[$index ];\n //$dstElem = &$array[$destIndex];\n //$temp0 = $dstElem[0];\n //$temp1 = $dstElem[1];\n //$temp2 = $dstElem[2];\n //$dstElem[0] = $srcElem[0];\n //$dstElem[1] = $srcElem[1];\n //$dstElem[2] = $srcElem[2];\n //$srcElem[0] = $temp0;\n //$srcElem[1] = $temp1;\n //$srcElem[2] = $temp2;\n\n return $array;\n}",
"private function dropArticle($index, array &$old_order) {\n self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);\n //moveArticleTemporarily adds article on top but should be at the bottom\n $entry = array_shift($old_order);\n $old_order[] = $entry;\n }",
"private function sortArticleToTop($index, array &$old_order) {\n $distance = $this->distance($old_order[0], $old_order[$index]);\n self::moveArticleTemporarily($index, $old_order, $distance);\n }",
"public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n try {\n $index = self::indexOfArticle($operation->getUid(), $old_order);\n } catch (tx_newspaper_Exception $e) {\n // article not in list; do nothing.\n return;\n }\n\n if ($operation->shuffleValue()) {\n $this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);\n } else if ($operation->isToTop()) {\n $this->sortArticleToTop($index, $old_order);\n } else if ($operation->isToBottom()) {\n $this->dropArticle($index, $old_order);\n } else {\n throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);\n }\n\n return $old_order;\n }",
"private function shuffle() {\n $this->tiles = range(0,$this->num-1);\n shuffle($this->tiles);\n $this->pos = array_search(0,$this->tiles,true);\n\n\n }",
"public function swap(int $position, int $withTheOtherPosition);",
"public function admin_move_question() {\n $this->autoRender = false;\n if ($this->request->is('ajax')) {\n $questionId = $this->params['url']['questionId'];\n $quizId = $this->params['url']['quizId'];\n $len = $this->params['url']['newPos'];\n $position = $this->params['url']['position'];\n \n $this->Quiz->id = $quizId;\n $quiz = $this->Quiz->read(array('question_Ids', 'no_of_questions')); \n $questionIds = explode(',', $quiz['Quiz']['question_Ids']);\n\n \n if ($len < $quiz['Quiz']['no_of_questions']) {\n for ($i = 1; $i <= $len; $i++) {\n $index = array_search($questionId, $questionIds); \n if ($index !== false ) {\n switch ($position) {\n case 'Up':\n $tmp = $questionIds[$index - 1];\n $questionIds[$index - 1] = $questionIds[$index];\n $questionIds[$index] = $tmp;\n break;\n case 'Down':\n $tmp = $questionIds[$index + 1];\n $questionIds[$index + 1] = $questionIds[$index];\n $questionIds[$index] = $tmp;\n break;\n }\n }\n } \n }\n if ($this->Quiz->saveField('question_ids', implode(',', $questionIds))) {\n $this->Session->setFlash(__d('croogo', 'Question successfully moved'), 'default', array('class' => 'success'));\n } else {\n $this->Session->setFlash(__d('croogo', 'Question not moved'), 'default', array('class' => 'error'));\n } \n }\n }",
"public function resortIndex()\n {\n if (!$this->isNewRecord) {\n $this->_olds = $this->getOldAttributes();\n }\n // its a negative value, so its a last item, lets find the last index for current config\n if ($this->sort_index < 0) {\n $last = self::find()->andWhere(['nav_item_page_id' => $this->nav_item_page_id, 'placeholder_var' => $this->placeholder_var, 'prev_id' => $this->prev_id])->orderBy('sort_index DESC')->one();\n if (!$last) {\n $this->sort_index = 0;\n } else {\n $this->sort_index = $last->sort_index + 1;\n }\n } else { // its not a negative value, we have to find the positions after the current sort index and update to a higher level\n $higher = self::find()->where('sort_index >= :index', ['index' => $this->sort_index])->andWhere(['nav_item_page_id' => $this->nav_item_page_id, 'placeholder_var' => $this->placeholder_var, 'prev_id' => $this->prev_id])->all();\n\n foreach ($higher as $item) {\n $newSortIndex = $item->sort_index + 1;\n Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $newSortIndex], ['id' => $item->id])->execute();\n }\n }\n }",
"public function reorder_onMove()\n {\n $sourceNode = Menu::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Menu::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }",
"function move_down($input,$index) {\n $new_array = $input;\n\n if (count($new_array) > $index) {\n array_splice($new_array, $index + 2, 0, $input[$index]);\n array_splice($new_array, $index, 1);\n }\n\n return $new_array;\n }",
"function order_swapdown($eval_id) {\n global $DB;\n\n //Get the question that is below this one.\n $questionLater = $DB->get_record('evaluation_questions',\n array('evalid' => $eval_id, 'question_order' => $this->order + 1));\n\n //If there is none then we can't swap this one with the one below it so \n //exit.\n if ($questionLater == null)\n return;\n\n //Make this question show up one step later.\n $updated_question = new stdClass();\n $updated_question->id = $this->id;\n $updated_question->question_order = $this->order + 1;\n\n $DB->update_record('evaluation_questions', $updated_question);\n\n //Make this question show up one step earlier.\n $updated_question = new stdClass();\n $updated_question->id = $questionLater->id;\n $updated_question->question_order = $this->order;\n\n $DB->update_record('evaluation_questions', $updated_question);\n\n //update the order of this question.\n $this->order--;\n }",
"public function moveUp()\n {\n // Moves previous higher ranked item below\n $curOrder = $this->order;\n if ($curOrder == Group::getCurrentHighestOrder()) return; // This is already the highest item, so cancel\n if ($prevItem = Group::where('order', '>', $curOrder)->first())\n {\n $this->order = $prevItem->order;\n $prevItem->order = $curOrder;\n $prevItem->save();\n $this->save();\n }\n }",
"public function moveDown()\n {\n // Moves previous lower ranked item above\n $curOrder = $this->order;\n if ($curOrder == 0) return; // This is already the lowest item, so cancel\n if ($prevItem = Group::where('order', '<', $curOrder)->first())\n {\n $this->order = $prevItem->order;\n $prevItem->order = $curOrder;\n $prevItem->save();\n $this->save();\n }\n }",
"function order_swapup($eval_id) {\n global $DB;\n\n //Get the question that is above this one.\n $questionPrior = $DB->get_record('evaluation_questions',\n array('evalid' => $eval_id, 'question_order' => $this->order - 1));\n\n //If there is none then we can't swap this one with the one above it so \n //exit.\n if ($questionPrior == null) {\n return;\n }\n\n //Make this question show up one step earlier.\n $updated_question = new stdClass();\n $updated_question->id = $this->id;\n $updated_question->question_order = $this->order - 1;\n\n $DB->update_record('evaluation_questions', $updated_question);\n\n //Make the previous question show up one step later.\n $updated_question = new stdClass();\n $updated_question->id = $questionPrior->id;\n $updated_question->question_order = $this->order;\n\n $DB->update_record('evaluation_questions', $updated_question);\n\n //update the order of this question.\n $this->order--;\n }",
"function reorder($user_id = false, $key = false, $move = false)\n {\n $retval = false;\n\n if($user_id != false && $key != false && $move != false)\n {\n $user_id = $this->dbh->sql_safe($user_id);\n $key = $this->dbh->sql_safe($key);\n\n $sql = 'SELECT us_order FROM user_slideshows WHERE us_key = ' . $key . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' ';\n $slideshowData = $this->dbh->query_first($sql);\n\n switch($move)\n {\n // move up\n case 'up':\n if($slideshowData['us_order'] > 1)\n {\n // get the id of the slideshow above it\n $sql = 'SELECT us_id, us_order FROM user_slideshows WHERE us_u_id = ' . $user_id . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' AND us_order <= ' . ($slideshowData['us_order'] - 1) . ' ORDER BY us_order DESC LIMIT 1';\n $swapData = $this->dbh->query_first($sql);\n \n // get the new orders\n //$order = ($slideshowData['us_order'] - 1);\n $order = intval($swapData['us_order']);\n $swapOrder = intval($slideshowData['us_order']);\n \n // insert the new order for this slideshow\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($order) . ' WHERE us_key = ' . $key . ' ';\n $this->dbh->execute($sql);\n \n // insert the new order for the slideshow above it\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($swapOrder) . ' WHERE us_id = ' . intval($swapData['us_id']) . ' ';\n $this->dbh->execute($sql);\n }\n break;\n\n // move down\n case 'down':\n // get the id of the slideshow below it\n $sql = 'SELECT us_id, us_order FROM user_slideshows WHERE us_u_id = ' . $user_id . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' AND us_order >= ' . ($slideshowData['us_order'] + 1) . ' ORDER BY us_order ASC LIMIT 1';\n $swapData = $this->dbh->query_first($sql);\n\n if(!empty($swapData))\n {\n // get the new orders\n //$order = ($slideshowData['us_order'] + 1);\n $order = intval($swapData['us_order']);\n $swapOrder = intval($slideshowData['us_order']);\n \n // insert the new order for this slideshow\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($order) . ' WHERE us_key = ' . $key . ' ';\n $this->dbh->execute($sql);\n \n // insert the new order for the slideshow below it\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($swapOrder) . ' WHERE us_id = ' . intval($swapData['us_id']) . ' ';\n $this->dbh->execute($sql);\n }\n break;\n \n // move top\n case 'top':\n if($slideshowData['us_order'] > 1)\n {\n // for each slideshow above this one\n for($i = ($slideshowData['us_order'] - 1); $i >= 1; $i--)\n {\n // get the id of the slideshow\n $sql = 'SELECT us_id, us_order FROM user_slideshows WHERE us_u_id = ' . $user_id . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' AND us_order = ' . intval($i) . ' ';\n $swapData = $this->dbh->query_first($sql);\n \n // insert the new order for this slideshow\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($i + 1) . ' WHERE us_id = ' . intval($swapData['us_id']) . ' ';\n $this->dbh->execute($sql);\n }\n \n // put this slideshow at the top\n $sql = 'UPDATE user_slideshows SET us_order = 1 WHERE us_key = ' . $key . ' ';\n $this->dbh->execute($sql);\n }\n break;\n\n // move bottom\n case 'bottom':\n $sql = 'SELECT * FROM user_slideshows WHERE us_u_id = ' . $user_id . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' AND us_order > 0 ORDER BY us_order ASC ';\n $total = $this->dbh->query_all($sql);\n $cnt = count($total);\n \n // for each slideshow below this one\n for($i = ($slideshowData['us_order'] + 1); $i <= $cnt; $i++)\n {\n // get the id of the slideshow\n $sql = 'SELECT us_id, us_order FROM user_slideshows WHERE us_u_id = ' . $user_id . ' AND us_privacy >= ' . PERM_SLIDESHOW_PUBLIC . ' AND us_order = ' . intval($i) . ' ';\n $swapData = $this->dbh->query_first($sql);\n \n // insert the new order for this slideshow\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($i - 1) . ' WHERE us_id = ' . intval($swapData['us_id']) . ' ';\n $this->dbh->execute($sql);\n }\n \n // put this slideshow at the top\n $sql = 'UPDATE user_slideshows SET us_order = ' . intval($cnt) . ' WHERE us_key = ' . $key . ' ';\n $this->dbh->execute($sql);\n break;\n }\n }\n\n return $retval;\n }",
"abstract function setRandomlyOrdered($randomlyOrdered);",
"function ReorderSubMenuItems ($id, $order_type)\r\n{\r\n\tglobal $db;\r\n\t$query=\"SELECT position FROM menus_items WHERE `id`='\".$id.\"'\";\r\n\t$db->query($query);\r\n\t$db->next_record();\r\n\t$new_order = $db->f('position');\r\n\tif ($order_type == 'up')\r\n\t{\r\n\t\t$new_order += -15;\r\n\t}\r\n\telse \r\n\t{\r\n\t\t$new_order += +15;\r\n\t}\r\n\tUpdateSubMenuItemsOrder($id, $new_order);\r\n}",
"function ReorderMenus ($id, $order_type)\r\n{\r\n\tglobal $db;\r\n\t$query=\"SELECT position FROM menus_items WHERE `id`='\".$id.\"'\";\r\n\t$db->query($query);\r\n\t$db->next_record();\r\n\t$new_order = $db->f('position');\r\n\tif ($order_type == 'up')\r\n\t{\r\n\t\t$new_order += -15;\r\n\t}\r\n\telse \r\n\t{\r\n\t\t$new_order += +15;\r\n\t}\r\n\tUpdateMenusOrder($id, $new_order);\r\n}",
"function move_up($input, $index) {\n $new_array = $input;\n\n if ((count($new_array) > $index) && ($index > 0)) {\n array_splice($new_array, $index - 1, 0, $input[$index]);\n array_splice($new_array, $index + 1, 1);\n }\n\n return $new_array;\n }",
"private function shiftOrder($fromOrder){\r\n\t\t\r\n\t\t$where = \" slider_id=\".$this->id.\" and slide_order >= $fromOrder\";\r\n\t\t$sql = \"update \".RevSliderGlobals::$table_slides.\" set slide_order=(slide_order+1) where $where\";\r\n\t\t$this->db->runSql($sql);\r\n\t\t\r\n\t}",
"function moveToPosition($position);",
"public function postReposition($item, $cloneBefore, $cloneAfter);",
"public function shuffleDeck()\n {\n shuffle($this->_cards);\n //check for cards still in sequence and re-arrange them\n for ($i = 1; $i < count($this->_cards); $i++) {\n /** @var Card $currentCard */\n $currentCard = $this->_cards[$i];\n /** @var Card $previousCard */\n $previousCard = $this->_cards[$i - 1];\n if ($previousCard->getPerfectSequencePosition() === $currentCard->getPerfectSequencePosition() - 1) {\n /** @var Card $firstCard */\n $firstCard = $this->_cards[0];\n unset($this->_cards[$i]);\n if ($firstCard->getPerfectSequencePosition() - 1 !== $currentCard->getPerfectSequencePosition()) {\n array_unshift($this->_cards, $currentCard);\n } else {\n unset($this->_cards[0]);\n array_unshift($this->_cards, $currentCard);\n array_unshift($this->_cards, $firstCard);\n }\n }\n }\n }",
"public function shuffle();",
"function moveDisplayOrder($imdbID, $incrementation){\n\t//don't know where the bug is yet the bug is thtat somme show aren't display allthougt they shgould check statusForMe\n\t$db = loadPDO();\n\t$displayOrder = array();\n\t$i = 0;\n\t\n\t$statement = $db->prepare(\"SELECT imdbID FROM tvShow WHERE display != 0 ORDER BY display\");\n\t$statement->execute();\n\t\n\twhile($result = $statement->fetch()){\n\t\tif($imdbID == $result['imdbID']){\n\t\t\t$displayOrder[$i+$incrementation] = $result['imdbID'];\n\t\t}else{\n\t\t\t$i += 2;\n\t\t\t$displayOrder[$i] = $result['imdbID'];\n\t\t}\n\t}\n\t\n\tksort($displayOrder);\n\t\n\t\n\t//debug\n\t/*\n\tprint \"<pre>\";\n\tprint_r($displayOrder);\n\tprint \"</pre>\";\n\t*/\n\t\n\t$order = 2;\n\tforeach($displayOrder as $id){\n\t\t//echo $id.'<br>';\n\t\t$statement2 = $db->prepare(\"UPDATE tvShow SET display = :order WHERE imdbID = :imdbID\");\n\t\t$statement2->execute(array(':order' => $order, ':imdbID' => $id));\n\t\t$order++;\n\t}\n}",
"function reorderStacksFromIndex($idDiag, $idColOrder,$db)\n {\n $req=$db->prepare('UPDATE stack SET order_stack=order_stack-1 WHERE order_stack>:COL AND diag_linked=:DIAG');\n $req->execute(array(\n 'COL' => $idColOrder,\n 'DIAG' => $idDiag\n ));\n }",
"public function reorder(object $document, string $srcName, string $targetName, bool $before): void;",
"public function changeOrder($newOrdering) {\n \n $newOrdering = explode(\",\", $newOrdering);\n Debugger::fireLog($newOrdering);\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n Debugger::fireLog($fotkyId);\n \n for($i=0; $i < count($newOrdering); $i++) {\n $this->db->query(\"UPDATE fotky SET razeni=? WHERE id_fotky=?\", $i, $fotkyId[(int)$newOrdering[$i]]);\n }\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n \n Debugger::fireLog($fotkyId);\n \n \n }",
"function shuffle (array &$array) {}"
] | [
"0.65304655",
"0.5879401",
"0.5777906",
"0.54952693",
"0.5289303",
"0.5255821",
"0.5105479",
"0.5059862",
"0.50357074",
"0.50178283",
"0.5001977",
"0.4959141",
"0.4956883",
"0.494988",
"0.49286556",
"0.49265495",
"0.48990205",
"0.48809102",
"0.48594168",
"0.48391038",
"0.48298457",
"0.48137406",
"0.47478932",
"0.4745027",
"0.4732528",
"0.47089764",
"0.47025302",
"0.4699735",
"0.4676996",
"0.46384114"
] | 0.7405721 | 0 |
/ How far are article/offset combinations \p $entry1 and \p $entry2 really apart? | private function distance(array $entry1, array $entry2) {
$this->getRawUids();
$uid1 = $entry1[0]; $uid2 = $entry2[0];
$offset1 = $entry1[1]; $offset2 = $entry2[1];
$raw_index1 = array_search($uid1, $this->raw_uids);
$raw_index2 = array_search($uid2, $this->raw_uids);
$actual_index1 = $raw_index1-$offset1;
$actual_index2 = $raw_index2-$offset2;
return $actual_index2 - $actual_index1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getDistance($e1, $n1, $e2, $n2){\n \n // Pythagoras for quick'n'dirty distance \n $dist = sqrt(pow(Abs($e1 - $e2), 2) + pow(Abs($n1 - $n2), 2)) / 1000;\n return $dist;\n }",
"function dist($col1,$col2) {\n\t $delta_r = $col1[0] - $col2[0];\n\t $delta_g = $col1[1] - $col2[1];\n\t $delta_b = $col1[2] - $col2[2];\n\t return $delta_r * $delta_r + $delta_g *$delta_g + $delta_b * $delta_b;\n\t}",
"public function differenceOfEntries($entryA, $entryB) {\n $a = $entryA ? $entryA->amount : 0;\n $b = $entryB ? $entryB->amount : 0;\n\n return $a - $b;\n }",
"function getdistance(&$p0, &$p1) {\n\t//Do a sanity check, JIC.\n\tif (array_key_exists(\"x\", $p0) && array_key_exists(\"x\", $p1) && array_key_exists(\"y\", $p0) && array_key_exists(\"y\", $p1)) {\n\t\treturn (sqrt(($p0[\"x\"] - $p1[\"x\"]) ** 2 + ($p0[\"y\"] - $p1[\"y\"]) ** 2));\n\t} else {\n\t\treturn(null);\n\t}\n}",
"public function calculateXtreme($item1, $item2, $extra_options = array()){\n\t\t$max = max($item1);\n\t\t$min = min($item1);\n\t\t\n\t\tif(!empty($extra_options['offset'])){\n\t\t\t$offset = $extra_options['offset'];\n\t\t\t$max_items = $this->filter($max, $item1, -$offset);\n\t\t\t$min_items = $this->filter($min, $item1, +$offset);\n\t\t} else {\n\t\t\t$max_items = $this->filter($max, $item1);\n\t\t\t$min_items = $this->filter($min, $item1);\n\t\t}\n\t\t\n\t\t$artists_max = array_intersect(array_keys($max_items), array_keys($item2));\n\t\t$artists_min = array_intersect(array_keys($min_items), array_keys($item2));\n\t\t\n\t\t$common_artists_count = (count($artists_max) + count($artists_min));\n\t\t\n\t\tif($common_artists_count == 0) return 0;\n\t\t\n\t\t$difference = 0;\n\t\tforeach($max_items as $artist=>$rating){\n\t\t\tif(isset($item2[$artist]) && $item2[$artist] < $rating){\n\t\t\t\t$difference += $rating-$item2[$artist];\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($min_items as $artist=>$rating){\n\t\t\tif(isset($item2[$artist]) && $item2[$artist] > $rating){\n\t\t\t\t$difference += $item2[$artist]-$rating;\n\t\t\t}\n\t\t}\n\t\t//debug($difference);\n\t\treturn 1- (($difference /$common_artists_count) / 9);\n\t\t\n\t}",
"function lat_long_dist_of_two_points($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo){ \n \n}",
"function dist2($p1, $p2) {\r\n\t\t//return endPointA^2 + endPointB^2\r\n\t\treturn $this->sqr($p1->latitude - $p2->latitude) + \r\n\t\t\t$this->sqr($p1->longitude - $p2->longitude);\r\n\t}",
"function eucDistance(array $a, array $b)\n{\n return\n array_sum(\n array_map(\n function ($x, $y) {\n return abs($x - $y) ** 2;\n },\n $a,\n $b\n )\n ) ** (1 / 2);\n}",
"function computeDistance( $locality1_latitude, $locality1_longitude, $locality2_latitude, $locality2_longitude ) {\n\n $tile1 = sin( deg2rad( $locality1_latitude ) ) * sin( deg2rad( $locality2_latitude ) );\n $tile2 = cos( deg2rad( $locality1_latitude ) ) * cos( deg2rad( $locality2_latitude ) );\n $tile3 = cos( deg2rad( $locality2_longitude - $locality1_longitude ) );\n $result = $tile1 + $tile2 * $tile3;\n $result = acos( $result ) * 6371;\n return round($result, 1);\n}",
"function calculateOffsets($children, $marriages, $depths, $custom_parings = array()) {\n $layers = array();\n foreach ($depths as $person => $depth) {\n if (!isset($layers[$depth])) {\n $layers[$depth] = array();\n }\n $layers[$depth][] = $person;\n }\n\n // sort the layer based on custom parings\n foreach ($custom_parings as $left => $right) {\n foreach ($layers as $i => $layer) {\n if (in_array($left, $layer) && in_array($right, $layer)) {\n $new_layer = array();\n foreach ($layer as $p) {\n if ($p == $left) {\n $new_layer[] = $left;\n $new_layer[] = $right;\n } elseif ($p == $right) {\n continue;\n } else {\n $new_layer[] = $p;\n }\n }\n $layers[$i] = $new_layer;\n }\n }\n }\n\n // assign an offset for each node, based on the order\n // in which they appear in the list, and also without\n // any sort of alignment\n $offsets = array();\n foreach ($layers as $layer) {\n $i = 0;\n foreach ($layer as $person) {\n $offsets[$person] = ($i++) * 2;\n }\n }\n\n // TODO more optimization will happen here hopefully one day\n\n return $offsets;\n }",
"public function test_for_proper_offset() {\n\t\t$this->factory->post->create_many( 10 );\n\n\t\t$post_batch = new Posts();\n\n\t\t$post_batch->register( array(\n\t\t\t'name' => 'Hey there',\n\t\t\t'type' => 'post',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\my_post_callback_function_test',\n\t\t\t'args' => array(\n\t\t\t\t'posts_per_page' => 5,\n\t\t\t\t'post_type' => 'post',\n\t\t\t),\n\t\t) );\n\n\t\t$first_run = $post_batch->run( 1 );\n\t\t$second_run = $post_batch->run( 2 );\n\n\t\t// Results from the first and second run should NOT match.\n\t\t$this->assertNotEquals( $second_run['query_results'][0]->ID, $first_run['query_results'][0]->ID );\n\n\t}",
"function mapped_diff(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)\n\t{\n\t\tif (count($from_lines) != count($mapped_from_lines) || count($to_lines) != count($mapped_to_lines))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tparent::diff($mapped_from_lines, $mapped_to_lines);\n\n\t\t$xi = $yi = 0;\n\t\tfor ($i = 0; $i < count($this->_edits); $i++)\n\t\t{\n\t\t\t$orig = &$this->_edits[$i]->orig;\n\t\t\tif (is_array($orig))\n\t\t\t{\n\t\t\t\t$orig = array_slice($from_lines, $xi, count($orig));\n\t\t\t\t$xi += count($orig);\n\t\t\t}\n\n\t\t\t$final = &$this->_edits[$i]->final;\n\t\t\tif (is_array($final))\n\t\t\t{\n\t\t\t\t$final = array_slice($to_lines, $yi, count($final));\n\t\t\t\t$yi += count($final);\n\t\t\t}\n\t\t}\n\t}",
"public function geoDist($key, $member1, $member2, $unit = null) {}",
"private function diff() {\n // comparing the pixels.\n\n for ( $i = 0; $i =< $smallest_diagonal; $i++ ) {\n $pixel1 = $this->$img1->getImagePixelColor($x, $y);\n $pixel2 = $this->$img2->getImagePixelColor($x, $y);\n\n if ( $pixel1 != $pixel2 ) {\n // return the offset\n return $i;\n }\n }\n return FALSE;\n }",
"private function _findIntersection( $p1_start, $p1_end, $p2_start, $p2_end )\n {\n $result = null;\n\n if ( $p1_start <= $p2_start && $p1_end > $p2_start && $p1_end <= $p2_end ) {\n $result = array( 'start' => $p2_start, 'end' => $p1_end );\n } elseif ( $p1_start <= $p2_start && $p1_end >= $p2_end ) {\n $result = array( 'start' => $p2_start, 'end' => $p2_end );\n } elseif ( $p1_start >= $p2_start && $p1_start < $p2_end && $p1_end >= $p2_end ) {\n $result = array( 'start' => $p1_start, 'end' => $p2_end );\n } elseif ( $p1_start >= $p2_start && $p1_end <= $p2_end ) {\n $result = array( 'start' => $p1_start, 'end' => $p1_end );\n }\n\n return $result;\n }",
"protected function calculateDistance($str1,$str2){\n if((strlen($str1))>=(strlen($str2)))\n {\n $lengthOfLongerText = strlen($str1);\n }\n else {\n $lengthOfLongerText = strlen($str2);\n }\n //this while loop will count the number of differences between the characters\n $i = 0; $count = 0;\n while ($i<$lengthOfLongerText)\n {\n if ($str1[$i] != $str2[$i]){\n $count++;\n }\n $i++;\n }\n return $count;\n\n }",
"function locationTime($building_1, $building_2){\n\t//creates acronym out of the string\n\t$start=preg_replace(\"/[^a-zA-Z]+/\", \"\", $building_1);\n\t$end=preg_replace(\"/[^a-zA-Z]+/\", \"\", $building_2);\n\n\techo \"start: \".$start.\" end: \".$end;\n\t$humanities=array('1','SHC','URC','FWH','UUC','LUC','CSS','MUS',\n\t\t'BMH','CTV','SSS','RHM','CTC','LPB','SCA');\n\t$vkc = array('2','VKC','SOS','WPH','CAS','THH');\n\t\n\t$mhp=array('3','RRB','LIS','OCW','LHI','SHS','CEM','SCI','HAR','MHP');\n\t$parkside=array('4','SGM','GFS','HNB','KAP','MCB','CWT','CWO','HRC','DRB','OHE',\n\t\t'BHE','VHE','HED','PCE','RTH','SSC','SSL','EEB','SAL','PHE','SAL');\n\t$law=array('5','AHF','ACC','BRI','HOH','LAW','RGL','SAS','JKP');\n\n\t$map=array($humanities,$vkc,$parkside,$mhp,$law);\n\tfor($a=0;$a<sizeof($map);$a++){\n\t\tfor($b=0;$b<sizeof($map[$a]);$b++){\n\t\t\tif($map[$a][$b]==$start){\n\t\t\t\t$start=$map[$a][0];\n\t\t\t}\n\t\t\tif($map[$a][$b]==$end){\n\t\t\t\t$end=$map[$a][0];\n\t\t\t}\n\t\t}\n\t}\n\t$start=intval($start);\n\t$end=intval($end);\n\n\tif($start ==0 || $end ==0){\n\t\treturn -1;\n\t}\n\n\n\tif(($start==4 || $end == 4)&&($start == 5 || $end == 5)){\n\t\treturn 6;\n\t}\n\n\t$dif=abs($start-$end);\n\tif($dif==0){\n\t\treturn 2;\n\t}\n\tif($dif==1){\n\t\treturn 3;\n\t}\n\telse if($dif==2){\n\t\treturn 5;\n\t}\n\telse{\n\t\treturn 10;\n\t}\n\n}",
"function distance2($lat1, $lng1, $lat2, $lng2, $miles = true)\n{\n\t$pi80 = M_PI / 180;\n\t$lat1 *= $pi80;\n\t$lng1 *= $pi80;\n\t$lat2 *= $pi80;\n\t$lng2 *= $pi80;\n\n\t$r = 6372.797; // mean radius of Earth in km\n\t$dlat = $lat2 - $lat1;\n\t$dlng = $lng2 - $lng1;\n\t$s = acos(sin($lat1)*sin($lat2) + cos($lat1)*cos($lat2)*cos($lng1-$lng2));\n\t$km = $s * $c;\n\n\treturn ($miles ? ($km * 0.621371192) : $km);\n}",
"function get_sys_dist(&$sys1,&$sys2) {\n\treturn (int)round(sqrt(pow($sys1['x_loc']-$sys2['x_loc'],2) + pow($sys1['y_loc']-$sys2['y_loc'],2)));\n}",
"function distanceCalculation($point1_lat, $point1_long, $point2_lat, $point2_long, $unit = 'km', $decimals = 2) {\n\t$degrees = rad2deg(acos((sin(deg2rad($point1_lat))*sin(deg2rad($point2_lat))) + (cos(deg2rad($point1_lat))*cos(deg2rad($point2_lat))*cos(deg2rad($point1_long-$point2_long)))));\n \n\t// Convert the distance in degrees to the chosen unit (kilometres, miles or nautical miles)\n\tswitch($unit) {\n\t\tcase 'km':\n\t\t\t$distance = $degrees * 111.13384; // 1 degree = 111.13384 km, based on the average diameter of the Earth (12,735 km)\n\t\t\tbreak;\n\t\tcase 'mi':\n\t\t\t$distance = $degrees * 69.05482; // 1 degree = 69.05482 miles, based on the average diameter of the Earth (7,913.1 miles)\n\t\t\tbreak;\n\t\tcase 'nmi':\n\t\t\t$distance = $degrees * 59.97662; // 1 degree = 59.97662 nautic miles, based on the average diameter of the Earth (6,876.3 nautical miles)\n\t}\n\treturn round($distance, $decimals);\n}",
"function entry_is_oddball(SimpleXMLElement $entry)\n{\n\t$k_eles = count($entry->k_ele);\n\t$r_eles = count($entry->r_ele);\n\n\t//exception to [i]\n\tif($k_eles == 0 and $r_eles == 1)\t//ie. simply a missing kanji because the word is a katakana loanword or what-have-you\n\t{\n\t\treturn false;\n\t}\n\n\t//[i] (actual)\n\tif($k_eles != $r_eles)\n\t{\t\n\t\t//log_to_file(\"uneven element count for ent_seq {$entry->ent_seq}. Taking first elements gives: kanji:{$entry->k_ele->keb}, kana:{$entry->r_ele->reb}\");\t//43K instances [sometimes multiple r_eles and no k_eles. sometimes multiple k_eles with the same single r_ele. sometimes one k_ele with a hiragana and katakana r_ele]\n\t\treturn true;\n\t}\n\n\t//[ii]\n\t$rebs = [];\n\t$kebs = [];\n\n\tforeach($entry->k_ele as $k_ele)\n\t{\n\t\t$kebs[] = $k_ele->keb;\n\t}\n\n\tforeach($entry->r_ele as $r_ele)\n\t{\n\t\t$rebs[] = $r_ele->reb;\n\t}\n\n\t$oddball = count(array_unique($rebs)) != 1 or count(array_unique($kebs)) != 1;\n\n\tif($oddball)\n\t{\n\t\t//log_to_file(\"differing element text for ent_seq {$entry->ent_seq}\");\t//3K instances [a bit fiddlier than the above uneven thing]\n\t}\n\n\treturn $oddball;\n}",
"private function getDistance($point1_lat, $point1_long, $point2_lat, $point2_long, $unit = 'km', $decimals = 2) {\n $degrees = rad2deg(acos((sin(deg2rad($point1_lat))*sin(deg2rad($point2_lat))) + (cos(deg2rad($point1_lat))*cos(deg2rad($point2_lat))*cos(deg2rad($point1_long-$point2_long)))));\n\n // Convert the distance in degrees to the chosen unit (kilometres, miles or nautical miles)\n switch($unit) {\n case 'km':\n $distance = $degrees * 111.13384; // 1 degree = 111.13384 km, based on the average diameter of the Earth (12,735 km)\n break;\n case 'mi':\n $distance = $degrees * 69.05482; // 1 degree = 69.05482 miles, based on the average diameter of the Earth (7,913.1 miles)\n break;\n case 'nmi':\n $distance = $degrees * 59.97662; // 1 degree = 59.97662 nautic miles, based on the average diameter of the Earth (6,876.3 nautical miles)\n }\n return round($distance, $decimals);\n}",
"function calcDistance($lat1,$lng1, $lat2, $lng2)\n{\n\t$data = file_get_contents(\"https://maps.googleapis.com/maps/api/distancematrix/json?origins=$lat1,$lng1&destinations=$lat2,$lng2&mode=walking\");\n\n\t$data = json_decode($data);\n\treturn $data->rows[0]->elements[0]->distance->value;\n}",
"private static function checkArticleOffsetValidity($article_offset) {\n if (!is_array($article_offset) || sizeof($article_offset) < 2) {\n throw new tx_newspaper_InconsistencyException(\n 'Semiautomatic article list needs UID array to have members\n of the form: array(uid, offset), but no array was given: ' .\n print_r($article_offset)\n );\n }\n }",
"function intersection($posting, $start, $end) {\n\t\t\tif ($start >= $end) {\n\t\t\t\treturn $posting[$start];\n\t\t\t}\n\n\t\t\t$mid = ($end - $start)/2 + $start;\n\t\t\t$left = $this->intersection($posting, $start, $mid);\n\t\t\t$right = $this->intersection($posting, $mid+1, $end);\n\n\t\t\treturn $this->helper($left, $right);\n\t\t}",
"public static function articleDesc($a, $b) {\n\t\tif($a->getDate() == $b->getDate())\n\t\t\treturn 0;\n\t\treturn $a->getDate() < $b->getDate() ? 1 : -1;\n\t}",
"private function checkDistance($lat1, $lng1, $lat2, $lng2)\n {\n // to radians: radian = degree * π / 180\n $lat1 = deg2rad($lat1);\n $lng1 = deg2rad($lng1);\n $lat2 = deg2rad($lat2);\n $lng2 = deg2rad($lng2);\n\n // calculate great-circle distance\n $distance = acos(sin($lat1) * sin($lat2) + cos($lat1) * cos($lat2) * cos($lng1 - $lng2));\n\n // distance in human-readable format:\n // earth's radius in km = ~6371\n $erad = 6371;\n $eradHm = 63710; //use this for get value ini hekto meter\n $calc = number_format($eradHm * $distance, 0, '', '');\n return $calc;\n }",
"private function from_offset() {\n\t\t// No need to proceed if we're not in the migration page.\n\t\tif ( ! $_GET || ! isset( $_GET[ self::$slug ] ) || '1' !== $_GET[ self::$slug ] ) {\n\t\t\treturn;\n\t\t}\n\t\t// No need to proceed if we don't have a post-type defined.\n\t\tif ( ! isset( $_GET['post_type'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( $_GET['from'] ) ) {\n\t\t\t$this->from_offset = absint( $_GET['from'] );\n\t\t}\n\t\t// Get the post-count for this post-type.\n\t\t// We'll use this to add a cap.\n\t\t$post_type_count = isset( $this->total_posts_count[ $this->current_post_type ] ) ? $this->total_posts_count[ $this->current_post_type ] : 0;\n\n\t\tif ( $this->from_offset > absint( $post_type_count ) ) {\n\t\t\t$this->from_offset = absint( $post_type_count );\n\t\t}\n\t}",
"function getOffset($page){\n return $page-1>0?($page-1)*10:0;\n}",
"function euclidean_dist($x1, $x2)\r\n {\r\n $kol1 = pow(($x1['AGE'] - $x2['AGE']), 2);\r\n $kol2 = pow(($x1['BP'] - $x2['BP']), 2);\r\n $kol3 = pow(($x1['SG'] - $x2['SG']), 2);\r\n $kol4 = pow(($x1['AL'] - $x2['AL']), 2);\r\n $kol5 = pow(($x1['SU'] - $x2['SU']), 2);\r\n $kol6 = pow(($x1['RBC'] - $x2['RBC']), 2);\r\n $kol7 = pow(($x1['PC'] - $x2['PC']), 2);\r\n $kol8 = pow(($x1['PCC'] - $x2['PCC']), 2);\r\n $kol9 = pow(($x1['BA'] - $x2['BA']), 2);\r\n $kol10 = pow(($x1['BGR'] - $x2['BGR']), 2);\r\n $kol11 = pow(($x1['BU'] - $x2['BU']), 2);\r\n $kol12 = pow(($x1['SC'] - $x2['SC']), 2);\r\n $kol13 = pow(($x1['SOD'] - $x2['SOD']), 2);\r\n $kol14 = pow(($x1['POT'] - $x2['POT']), 2);\r\n $kol15 = pow(($x1['HEMO'] - $x2['HEMO']), 2);\r\n $kol16 = pow(($x1['PCV'] - $x2['PCV']), 2);\r\n $kol17 = pow(($x1['WBCC'] - $x2['WBCC']), 2);\r\n $kol18 = pow(($x1['RBCC'] - $x2['RBCC']), 2);\r\n $kol19 = pow(($x1['HTN'] - $x2['HTN']), 2);\r\n $kol20 = pow(($x1['DM'] - $x2['DM']), 2);\r\n $kol21 = pow(($x1['CAD'] - $x2['CAD']), 2);\r\n $kol22 = pow(($x1['APPET'] - $x2['APPET']), 2);\r\n $kol23 = pow(($x1['PE'] - $x2['PE']), 2);\r\n $kol24 = pow(($x1['ANE'] - $x2['ANE']), 2);\r\n //Menjumlahkan semua kolom kemudian mengakarnya\r\n $jarak = sqrt($kol1 + $kol2 + $kol3 + $kol4 + $kol5 + $kol6 + $kol7 + $kol8 + $kol9 + $kol10\r\n + $kol11 + $kol12 + $kol13 + $kol14 + $kol15 + $kol16 + $kol17 + $kol18 + $kol19 + $kol20\r\n + $kol21 + $kol22 + $kol23 + $kol24);\r\n return $jarak;\r\n }"
] | [
"0.5470471",
"0.5157685",
"0.496973",
"0.4956062",
"0.48985884",
"0.48312113",
"0.47827536",
"0.47514474",
"0.47046673",
"0.4668066",
"0.46032268",
"0.45954967",
"0.45158184",
"0.45150942",
"0.4508643",
"0.4485093",
"0.4483755",
"0.44832075",
"0.44782555",
"0.44724196",
"0.44694602",
"0.44614044",
"0.4441368",
"0.44329166",
"0.442598",
"0.44243595",
"0.44074216",
"0.44032612",
"0.43946505",
"0.4391729"
] | 0.66316557 | 0 |
/ Ensures that the list's raw UIDs are stored in \c $this>raw_uids. | private function getRawUids() {
if (!$this->raw_uids) {
$this->raw_uids = $this->getRawArticleUIDs(self::num_raw_uids, 0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getUidListFromList($list)\t{\n\t\t$result = array();\n\t\tif(is_array($list)){\n\t\t foreach ($list as $item)\t{\n\t\t\t$uid = $this->getUidFromKey($item, $keyData);\n\t\t\tif ($uid > 0) $result[] = $uid;\n\t\t }\n\t\t}\n\t\treturn $result;\n\t}",
"protected function clearList() {\n $article_uids = array();\n foreach ($this->getArticles($this->getNumArticles()) as $article) {\n $article_uids[] = $article->getUid();\n }\n if ($article_uids) {\n tx_newspaper::deleteRows(\n self::mm_table,\n $article_uids,\n 'uid_foreign', // check uid_foreign = article uid\n 'uid_local=' . $this->getUid() // process current article list only\n );\n }\n }",
"public function testListUniqueness()\n {\n $obj = new RecentlyUsedList();\n $obj->add('First');\n $obj->add('Middle');\n $obj->add('Last');\n $unique_length = $obj->length();\n $obj->add('Middle');\n $this->assertEquals($unique_length, $obj->length(), 'Error: all list items should be unique!');\n $this->assertEquals(array('Middle', 'Last', 'First'), $obj->all(), 'Error: all list items should be unique!');\n }",
"abstract public function initIdsList();",
"public function queryUidList()\n {\n $this->applyCriteria();\n $this->applyScope();\n $model = $this->model->lists('uid');\n $this->resetModel();\n\n return $this->parserResult($model);\n }",
"private function _checkList(&$list)\r\n {\r\n \tif ( !($list instanceof Warecorp_List_Item ) ) {\r\n \t\t$list = new Warecorp_List_Item($list);\r\n \t}\r\n }",
"abstract protected function _getItemsPossibleRaw();",
"private function _setADUsers($rawADUsers)\n {\n $filteredADUsers = array();\n\n foreach ($rawADUsers as $ADUser) {\n if (preg_match('/p(.*)\\d{7}/', $ADUser['samaccountname'][0])) {\n array_push($filteredADUsers, $ADUser);\n }\n }\n\n $this->_ADUsers = $filteredADUsers;\n }",
"public static function unique_ID_reset($data, $uids){\n\n\t\tif (! is_array($data)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($data as $section_k => $section){\n\n\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t$data[$section_k]['uid'] = end($uids);\n\n\t\t\tif(is_array($section['wraps'])){\n\t\t\t\tforeach($section['wraps'] as $wrap_k => $wrap){\n\n\t\t\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t\t\t$data[$section_k]['wraps'][$wrap_k]['uid'] = end($uids);\n\n\t\t\t\t\tif(is_array($wrap['items'])){\n\t\t\t\t\t\tforeach($wrap['items'] as $item_k => $item){\n\n\t\t\t\t\t\t\t$uids[] = self::unique_ID($uids);\n\t\t\t\t\t\t\t$data[$section_k]['wraps'][$wrap_k]['items'][$item_k]['uid'] = end($uids);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $data;\n\n\t}",
"private static function listLoaded()\n {\n if(empty(self::$list)) {\n self::loadList();\n }\n }",
"public function getUidList()\n {\n if ( $this->isSkippedCache() ){\n return $this->queryUidList();\n }\n\n $key = $this->getCacheKey('uidList', func_get_args());\n $minutes = $this->getCacheMinutes();\n $value = $this->getCacheRepository()->remember($key, $minutes, function() {\n return $this->queryUidList();\n });\n\n return $value;\n }",
"protected function setUnsubscribers()\r\n\t{\r\n\t\tif ( !$this->paths_exist )\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t$dont_email = [];\r\n\r\n\t\t$unsubscribers = [];\r\n\r\n\t\tforeach ( scandir( $this->data_paths['u_path'] ) as $file )\r\n\t\t{\r\n\t\t\tif( '..' == $file || '.' == $file ) continue;\r\n\r\n\t\t\t$user = $this->buildUserArray( $this->data_paths['u_path'] . \"/$file\" );\r\n\r\n\t\t\t$dont_email[] = $user['email']; // For easier array searching later\r\n\r\n\t\t\t$unsubscribers[] = $user;\r\n\t\t}\r\n\r\n\t\t$this->dont_email = $dont_email;\r\n\r\n\t\t$this->unsubscribers = $unsubscribers;\r\n\t}",
"public function valid()\n {\n if($this->needToReload()) {\n $last_id = 0;\n if(count($this->currentList) > 0) {\n $last_id = array_pop($this->currentList)->id;\n }\n\n unset($this->currentList);\n\n $params = $this->params;\n $params[\"lastId\"] = $last_id;\n\n $this->currentList = $this->currentListEndpoint->getAll($this->mode, $params);\n\n if($this->currIndex == -1) {\n $this->currIndex = 0;\n }\n }\n\n return !is_null($this->current());\n }",
"public function updateList()\r\n\t{\r\n\t\t$this->setUnsubscribers();\r\n\t\t\r\n\t\t$this->setSubscribers();\r\n\t\t\r\n\t\t$this->processUnsubscribers();\r\n\t}",
"public function getRawArticleUIDs($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n /// \\todo: Implement \\p filter_articlelist_exclude. This must be done separately from the SQL query.\n\n try {\n\n $dont_spam_devlog = new tx_newspaper_ExceptionSilencer();\n\n $results = tx_newspaper_DB::getInstance()->selectRowsDirect(\n $this->select_method_strategy->selectFields(),\n $this->selectTable(),\n $this->selectWhere(),\n '',\n $this->selectOrderBy(),\n $this->selectLimit($start, $number)\n );\n\n } catch (tx_newspaper_DBException $e) {\n // Guard against article lists using GET variables, which are not set in the BE\n if (TYPO3_MODE != 'BE') {\n tx_newspaper::devlog(\n \"tx_newspaper_ArticleList_Semiautomatic::getRawArticleUIDs($number, $start) error\",\n $e->getMessage()\n );\n }\n $results = array();\n }\n\n return $this->select_method_strategy->rawArticleUIDs($results);\n }",
"private function retrieveRealtyObjectUids() {\n\t\t$uids = tx_oelib_db::selectColumnForMultiple(\n\t\t\t'uid', REALTY_TABLE_OBJECTS,\n\t\t\t'1=1' . tx_oelib_db::enableFields('tx_realty_objects', 1) .\n\t\t\t\t$this->additionalWhereClause\n\t\t);\n\n\t\treturn implode(',', $uids);\n\t}",
"public function cleanup ( )\n {\n if ( rand ( 1, 20 ) == 10 )\n {\n $q = $this->select(\n CnCNet_Db_Table_Abstract::SELECT_WITH_FROM_PART, \n array( 'id', 'active' )\n )->where( 'active < ?', date ( 'Y-m-d H:i:s', time() - 30 ) );\n \n $uids = array ( );\n $users = $this->fetchAll( $q );\n foreach ( $users as $r )\n {\n $this->logout( $r['id'] );\n $uids[] = $r['id'];\n }\n return $uids;\n }\n \n return 1;\n }",
"public static function cleanList($list, $userData, $template = null)\n {\n global $PPHP;\n $db = $PPHP['db'];\n\n $list = array_map('strtolower', $list);\n\n $db->begin();\n\n $out = array();\n foreach ($list as $id) {\n if (is_numeric($id)) {\n $cleanId = $db->selectAtom('SELECT id FROM users WHERE id=?', array($id));\n if ($cleanId !== false) {\n $out[] = $cleanId;\n };\n } elseif (preg_match('/^[^@ ]+@[^@ .]+\\.[^@ ]+$/', $id) == 1) {\n $cleanId = $db->selectAtom('SELECT id FROM users WHERE email=?', array($id));\n if ($cleanId !== false) {\n $out[] = $cleanId;\n } else {\n if (isset($userData[$id])) {\n $cols = $userData[$id];\n } else {\n $cols = array();\n };\n $cols['email'] = $id;\n $newbie = self::create($cols);\n if ($newbie !== false) {\n $out[] = $newbie[0];\n if ($template !== null) {\n trigger('send_invite', $template, $newbie[0]);\n };\n };\n };\n };\n };\n\n $db->commit();\n\n return $out;\n }",
"public function unbindFromList($data)\n\t{\n\t\tif (!empty($data->subscriber_id) && !empty($data->list_id)) {\n\n\t\t\t// Initialise variables;\n\t\t\t$table = $this->getTable('sublist');\n\n\t\t\t// Allow an exception to be throw.\n\t\t\ttry {\n\t\t\t\t$table->reset();\n\t\t\t\t$table->set($table->getKeyName(), null);\n\n\t\t\t\t// Load the row. If it doesn't exists then nothing to do\n\t\t\t\tif (!$this->isInList($data)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\n\t\t\t\t// Bind the data.\n\t\t\t\tif (!$table->bind($data)) {\n\t\t\t\t\t$this->setError($table->getError());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Store the data.\n\t\t\t\tif (!$table->delete()) {\n\t\t\t\t\t$this->setError($table->getError());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Clean the cache.\n\t\t\t\t$cache = JFactory::getCache($this->option);\n\t\t\t\t$cache->clean();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->setError($e->getMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function v0_ul_list($list, $auto_list, $parent_upload, $undo_file, $full_xml_array, $gen_vd_id, $cc_id, $gen_pub_date, $current_time, $cc_id_load, $cb_ids, $upload_to_db, &$parents_id, &$select, &$errors, &$l_errors) {\n\t// Initialize variables\n\t$elements=$list['value'];\n\t$l_elements=count($list['value']);\n\t// 'loadData' instructions\n\t$loaddata_instructions=$auto_list['value'][1]['value'];\n\t\n\t// If no element in list\n\tif ($l_elements==0) {\n\t\treturn TRUE;\n\t}\n\t\n\t// New row in parents_id array\n\t$l_parents_id=count($parents_id);\n\t$parents_id[$l_parents_id]=NULL;\n\t\n\t// If parent was changed\n\tif (!$parent_upload) {\n\t\t// Do change instructions\n\t\tif (!v0_ul_instructions($list, $loaddata_instructions[0], $undo_file, $full_xml_array, $gen_vd_id, $cc_id, $gen_pub_date, $current_time, $cc_id_load, $cb_ids, TRUE, $upload_to_db, $select, $parents_id, $errors, $l_errors)) {\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// If only one element\n\tif ($l_elements==1) {\n\t\t// Do 'one' instruction\n\t\tif (!v0_ul_instructions($elements[0], $loaddata_instructions[1], $undo_file, $full_xml_array, $gen_vd_id, $cc_id, $gen_pub_date, $current_time, $cc_id_load, $cb_ids, TRUE, $upload_to_db, $select, $parents_id, $errors, $l_errors)) {\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse {\n\t\t// Loop on elements in the list\n\t\tfor ($i=0; $i<$l_elements; $i++) {\n\t\t\t// Do 'many' instruction\n\t\t\tif (!v0_ul_instructions($elements[$i], $loaddata_instructions[2], $undo_file, $full_xml_array, $gen_vd_id, $cc_id, $gen_pub_date, $current_time, $cc_id_load, $cb_ids, TRUE, $upload_to_db, $select, $parents_id, $errors, $l_errors)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Remove last row in parents_id array\n\tunset($parents_id[$l_parents_id]);\n\t\n\treturn TRUE;\n}",
"public function resetIDs() {\r\n\r\n\t\t$this->errorReset();\r\n\t\t$this->IDs = array();\r\n\t}",
"public function getUniqueIDs()\n {\n return $this->uniqueIDs;\n }",
"private function _parse_uids($uids, $mailbox)\n {\n if ($uids === '*' || $uids === '1:*') {\n if (empty($this->search_set)) {\n $uids = '1:*';\n $all = true;\n }\n // get UIDs from current search set\n // @TODO: skip fetchUIDs() and work with IDs instead of UIDs (?)\n else {\n if ($this->search_threads)\n $uids = $this->conn->fetchUIDs($mailbox, array_keys($this->search_set['depth']));\n else\n $uids = $this->conn->fetchUIDs($mailbox, $this->search_set);\n \n // save ID-to-UID mapping in local cache\n if (is_array($uids))\n foreach ($uids as $id => $uid)\n $this->uid_id_map[$mailbox][$uid] = $id;\n\n $uids = join(',', $uids);\n }\n }\n else {\n if (is_array($uids))\n $uids = join(',', $uids);\n\n if (preg_match('/[^0-9,]/', $uids))\n $uids = '';\n }\n\n return array($uids, (bool) $all);\n }",
"function uidl ($msgNum = \"\")\n {\n // no arguments, returns an associative array where each\n // undeleted msg num is a key, and the msg's uidl is the element\n // Array element 0 will contain the total number of msgs\n\n if(!isset($this->FP)) {\n $this->ERROR = \"POP3 uidl: \" . _(\"No connection to server\");\n return false;\n }\n\n $fp = $this->FP;\n $buffer = $this->BUFFER;\n\n if(!empty($msgNum)) {\n $cmd = \"UIDL $msgNum\";\n $reply = $this->send_cmd($cmd);\n if(!$this->is_ok($reply))\n {\n $this->ERROR = \"POP3 uidl: \" . _(\"Error \") . \"[$reply]\";\n return false;\n }\n list ($ok,$num,$myUidl) = preg_split('/\\s+/',$reply);\n return $myUidl;\n } else {\n $this->update_timer();\n\n $UIDLArray = array();\n $Total = $this->COUNT;\n $UIDLArray[0] = $Total;\n\n if ($Total < 1)\n {\n return $UIDLArray;\n }\n $cmd = \"UIDL\";\n fwrite($fp, \"UIDL\\r\\n\");\n $reply = fgets($fp, $buffer);\n $reply = $this->strip_clf($reply);\n if($this->DEBUG) { @error_log(\"POP3 SEND [$cmd] GOT [$reply]\",0); }\n if(!$this->is_ok($reply))\n {\n $this->ERROR = \"POP3 uidl: \" . _(\"Error \") . \"[$reply]\";\n return false;\n }\n\n $line = \"\";\n $count = 1;\n $line = fgets($fp,$buffer);\n while ( !preg_match('/^\\.\\r\\n/',$line)) {\n list ($msg,$msgUidl) = preg_split('/\\s+/',$line);\n $msgUidl = $this->strip_clf($msgUidl);\n if($count == $msg) {\n $UIDLArray[$msg] = $msgUidl;\n }\n else\n {\n $UIDLArray[$count] = 'deleted';\n }\n $count++;\n $line = fgets($fp,$buffer);\n }\n }\n return $UIDLArray;\n }",
"public function validateList($idList){\n\t\t$userId = $this->getUser()->getId();\n\t\t$list = CustomListsQuery::create()->findPk($idList);\n\n\t\tif(!($list instanceof CustomLists) || $list->getIdUser() != $userId){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private function prepareList()\n\t{\n\t\t# No datas\n\t\tif(!$this->ids) { return; }\n\n\t\t# Process all ID and detect bad status\n\t\tforeach ($this->ids as $id)\n\t\t{\n\t\t\t# Grep log file\n\t\t\t$cmd = 'grep -E \".+' . $this->server . '.+ ' . $id . ': .+\" ' . $this->path;\n\t\t\t$raw = shell_exec($cmd);\n\n\t\t\t# Verify if status= is present\n\t\t\tif(!strpos($raw, ' status=' . $this->status)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t# Transform shell lines to array\n\t\t\t$rows = explode(PHP_EOL, $raw);\n\n\t\t\t# Save full data and init entries\n\t\t\t$this->list[$id]['raw'] = $raw;\n\t\t\t$this->list[$id]['source'] = '';\n\t\t\t$this->list[$id]['from'] = '';\n\t\t\t$this->list[$id]['smtp'] = [];\n\t\t\t$this->list[$id]['end'] = false;\n\n\t\t\t# Delete empty lines\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t// Empty line\n\t\t\t\tif(!trim($row)) { continue; }\n\n\t\t\t\t# Detection of queue from entry\n\t\t\t\t$regexp = str_replace('@ID@', $id, $this->REGEXP_FROM);\n\t\t\t\tif(preg_match('`' . $regexp . '`', $row, $matches)) {\n\t\t\t\t\t$this->list[$id]['from'] = $matches['email'];\n\t\t\t\t}\n\n\t\t\t\t# Detection of source\n\t\t\t\t$regexp = str_replace('@ID@', $id, $this->REGEXP_SOURCE);\n\t\t\t\tif(preg_match('`' . $regexp . '`', $row, $matches)) {\n\t\t\t\t\t$this->list[$id]['source'] = $matches['source'];\n\t\t\t\t}\n\n\t\t\t\t# Detection of real send\n\t\t\t\t$regexp = str_replace('@ID@', $id, $this->REGEXP_SEND);\n\t\t\t\tif(preg_match('`' . $regexp . '`', $row, $matches)) {\n\n\t\t\t\t\t# Add to full list\n\t\t\t\t\t$this->list[$id]['smtp'][] = [\n\t\t\t\t\t\t'to' => $matches['to'],\n\t\t\t\t\t\t'orig_to' => $matches['orig_to'],\n\t\t\t\t\t\t'status' => $matches['status']\n\t\t\t\t\t];\n\n\t\t\t\t\t# Add to emails list if status match\n\t\t\t\t\tif($matches['status'] === $this->status) {\n\t\t\t\t\t\t$email = $matches['orig_to'] ?: $matches['to'];\n\t\t\t\t\t\t$this->emails[$id] = $email;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t# Detection end queue remove\n\t\t\t\t$regexp = str_replace('@ID@', $id, $this->REGEXP_END);\n\t\t\t\tif(preg_match('`' . $regexp . '`', $row)) {\n\t\t\t\t\t$this->list[$id]['end'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function ensure_unique_ids(array $line_items)\n {\n $unique_ids = array();\n foreach ($line_items as $line_item) {\n $unique_id = $line_item->getUniqueId();\n if (empty($unique_id)) {\n $unique_id = preg_replace(\"/[^a-z0-9]/\", '', strtolower($line_item->getSku()));\n }\n if (empty($unique_id)) {\n throw new Exception(\"There is an invoice item without unique id.\");\n }\n if (isset($unique_ids[$unique_id])) {\n $backup = $unique_id;\n $unique_id = $unique_id . '_' . $unique_ids[$unique_id];\n $unique_ids[$backup] ++;\n } else {\n $unique_ids[$unique_id] = 1;\n }\n \n $line_item->setUniqueId($unique_id);\n }\n \n return $line_items;\n }",
"function ldap_find_freeuid($uid_range) {\n global $ldap;\n $uid_list=array();\n\n $r=ldap_search($ldap['conn'], $ldap['mbasedn'], '(objectClass=*)', array(\"uidNumber\"));\n if(!$r)\n exit();\n\n $result=ldap_get_entries($ldap['conn'], $r);\n $uid=$uid_range[0]-1;\n foreach($result as $entry) {\n if(isset($entry['uidnumber'])) {\n $uid=$entry['uidnumber'][0];\n if(($uid>=$uid_range[0])&&($uid<=$uid_range[1]))\n\t$uid_list[]=$uid;\n }\n }\n\n for($uid=$uid_range[0]; $uid<=$uid_range[1]; $uid++) {\n if(!in_array($uid, $uid_list))\n return $uid;\n }\n\n return false;\n}",
"protected function doEnsureUnreadForParticipantsArray()\n {\n $this->unreadForParticipants = array();\n\n if ($this->isSpam) {\n return;\n }\n\n foreach ($this->metadata as $metadata) {\n if (!$metadata->getIsRead()) {\n $this->unreadForParticipants[] = $metadata->getParticipant()->getId();\n }\n }\n }",
"public function testUniq() {\n $uniqs = [];\n if (!$this->_runUniqTest) {\n $this->assertCount(0, $uniqs);\n return;\n }\n for ($i = 0; $i < $this->_countUniqModels; $i++) {\n $model = [];\n NestedModel::updateModelUnique($model);\n $uniqs[] = $model['unique_id'];\n $this->assertEquals(count($uniqs), count(array_unique($uniqs)));\n $this->assertInternalType('int', $uniqs[count($uniqs) - 1]);\n }\n }"
] | [
"0.56029236",
"0.54689336",
"0.5232383",
"0.5197032",
"0.5185406",
"0.51839006",
"0.5115501",
"0.4909535",
"0.48984903",
"0.4850197",
"0.48259845",
"0.48251927",
"0.48147926",
"0.47827443",
"0.47823784",
"0.47727066",
"0.46912006",
"0.4688127",
"0.46688035",
"0.46681872",
"0.46564117",
"0.46557763",
"0.4638842",
"0.46307424",
"0.4593861",
"0.45878288",
"0.456255",
"0.4555337",
"0.45518708",
"0.45418164"
] | 0.7120489 | 0 |
/ Moves article at position \p $index in array \p $old_order to the first position. \todo Consider sticky articles at the (former) top of the list. | private function sortArticleToTop($index, array &$old_order) {
$distance = $this->distance($old_order[0], $old_order[$index]);
self::moveArticleTemporarily($index, $old_order, $distance);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"private function dropArticle($index, array &$old_order) {\n self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);\n //moveArticleTemporarily adds article on top but should be at the bottom\n $entry = array_shift($old_order);\n $old_order[] = $entry;\n }",
"public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n try {\n $index = self::indexOfArticle($operation->getUid(), $old_order);\n } catch (tx_newspaper_Exception $e) {\n // article not in list; do nothing.\n return;\n }\n\n if ($operation->shuffleValue()) {\n $this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);\n } else if ($operation->isToTop()) {\n $this->sortArticleToTop($index, $old_order);\n } else if ($operation->isToBottom()) {\n $this->dropArticle($index, $old_order);\n } else {\n throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);\n }\n\n return $old_order;\n }",
"public function resortIndex()\n {\n if (!$this->isNewRecord) {\n $this->_olds = $this->getOldAttributes();\n }\n // its a negative value, so its a last item, lets find the last index for current config\n if ($this->sort_index < 0) {\n $last = self::find()->andWhere(['nav_item_page_id' => $this->nav_item_page_id, 'placeholder_var' => $this->placeholder_var, 'prev_id' => $this->prev_id])->orderBy('sort_index DESC')->one();\n if (!$last) {\n $this->sort_index = 0;\n } else {\n $this->sort_index = $last->sort_index + 1;\n }\n } else { // its not a negative value, we have to find the positions after the current sort index and update to a higher level\n $higher = self::find()->where('sort_index >= :index', ['index' => $this->sort_index])->andWhere(['nav_item_page_id' => $this->nav_item_page_id, 'placeholder_var' => $this->placeholder_var, 'prev_id' => $this->prev_id])->all();\n\n foreach ($higher as $item) {\n $newSortIndex = $item->sort_index + 1;\n Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $newSortIndex], ['id' => $item->id])->execute();\n }\n }\n }",
"private function resortArticle($uid, $shuffle_value, array &$old_order) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n if (abs($shuffle_value) != 1) {\n throw new tx_newspaper_IllegalUsageException('Only movements of +/- 1 are supported.');\n }\n\n $articles = $this->getArticlesAndOffsets(self::num_raw_uids);\n\n foreach ($old_order as $old_article) {\n $index = self::indexOfArticle($old_article[0], $articles);\n $articles[$index]['offset'] = $old_article[1];\n }\n\n $index = self::indexOfArticle($uid, $articles);\n\n $articles[$index]['offset'] += $shuffle_value;\n\n $temp_order = $this->sortArticles($articles);\n\n $old_order = array();\n foreach ($temp_order as $temp_article_offset) {\n $old_order[] = array(\n $temp_article_offset['article']->getUid(),\n $temp_article_offset['offset']\n );\n }\n\n }",
"private static function indexOfArticle($uid, array $old_order) {\n for ($i = 0; $i < sizeof($old_order); $i++) {\n $article_offset = $old_order[$i];\n\n self::checkArticleOffsetValidity($article_offset);\n\n $current_uid = $article_offset[0];\n if ($current_uid == $uid) return $i;\n\n if ($article_offset['article'] instanceof tx_newspaper_Article) {\n $current_uid = $article_offset['article']->getUid();\n if ($current_uid == $uid) return $i;\n }\n }\n throw new tx_newspaper_Exception('UID ' . $uid . ' not found in ' . print_r($old_order, 1));\n }",
"private function shiftOrder($fromOrder){\r\n\t\t\r\n\t\t$where = \" slider_id=\".$this->id.\" and slide_order >= $fromOrder\";\r\n\t\t$sql = \"update \".RevSliderGlobals::$table_slides.\" set slide_order=(slide_order+1) where $where\";\r\n\t\t$this->db->runSql($sql);\r\n\t\t\r\n\t}",
"function moveIndexInArray($array, $index, $upOrDown)\n{\n switch ($upOrDown)\n {\n case 'up':\n $destIndex = $index - 1;\n if ($destIndex < 0 || $index >= count($array)) {throw new Exception('Index out of range.');}\n break;\n\n case 'down':\n $destIndex = $index + 1;\n if ($index < 0 || $destIndex >= count($array)) {throw new Exception('Index out of range.');}\n break;\n\n default:\n throw new Exception(\"Expected 'up' or 'down'. Received '$upOrDown'.\");\n }\n\n // Swap element at $index with element at $destIndex.\n $temp = $array[$destIndex];\n $array[$destIndex] = $array[$index ];\n $array[$index ] = $temp;\n\n // Swap element at $index with element at $destIndex.\n //$srcElem = &$array[$index ];\n //$dstElem = &$array[$destIndex];\n //$temp0 = $dstElem[0];\n //$temp1 = $dstElem[1];\n //$temp2 = $dstElem[2];\n //$dstElem[0] = $srcElem[0];\n //$dstElem[1] = $srcElem[1];\n //$dstElem[2] = $srcElem[2];\n //$srcElem[0] = $temp0;\n //$srcElem[1] = $temp1;\n //$srcElem[2] = $temp2;\n\n return $array;\n}",
"public function cms_reorder() {\n\t\t$this->autoRender = false;\n\t\tforeach($this->request->query['sortable'] as $k=>$v) {\n\t\t\t$this->Page->id = end(explode('row_',$v));\n\t\t\t$this->Page->set('position',$k);\n\t\t\t$this->Page->save();\n\t\t}\t\t\n\t}",
"public function reorder(object $document, string $srcName, string $targetName, bool $before): void;",
"public function shift_article_ordering($id_page, $from = NULL)\n\t{\n\t\t$sql = 'UPDATE ' . $this->parent_table . ' SET ordering = ordering + 1 WHERE id_page=' .$id_page;\n\t\t\n\t\tif ( ! is_null($from))\n\t\t{\n\t\t\t$sql .= ' AND ordering >= ' . $from;\n\t\t}\n\t\t\n\t\t$this->{$this->db_group}->query($sql);\n\t}",
"public function changeOrder($newOrdering) {\n \n $newOrdering = explode(\",\", $newOrdering);\n Debugger::fireLog($newOrdering);\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n Debugger::fireLog($fotkyId);\n \n for($i=0; $i < count($newOrdering); $i++) {\n $this->db->query(\"UPDATE fotky SET razeni=? WHERE id_fotky=?\", $i, $fotkyId[(int)$newOrdering[$i]]);\n }\n \n $fotky = $this->db->query('SELECT id_fotky FROM fotky ORDER BY razeni')->fetchAll();\n \n $fotkyId = array();\n foreach($fotky as $fotka) {\n $fotkyId[] = $fotka->id_fotky; \n }\n \n Debugger::fireLog($fotkyId);\n \n \n }",
"public function change_position( $args ) {\n\t\t\t$this->iter++;\n\t\t\t$args['menu_position'] = $this->start_position + $this->iter;\n\t\t\treturn $args;\n\t\t}",
"function reorderStacksFromIndex($idDiag, $idColOrder,$db)\n {\n $req=$db->prepare('UPDATE stack SET order_stack=order_stack-1 WHERE order_stack>:COL AND diag_linked=:DIAG');\n $req->execute(array(\n 'COL' => $idColOrder,\n 'DIAG' => $idDiag\n ));\n }",
"function reorderAlbum()\r\n {\r\n global $Itemid, $mainframe;\r\n $db =& JFactory::getDBO();\r\n $my = & JFactory::getUser();\r\n\r\n $album_id = JRequest::getInt( 'album_id', 0 );\r\n $orderdata = JRequest::getVar( 'orderdata' );\r\n $neworder = explode(\"_\", $orderdata);\r\n\r\n for ($i=0, $n=count($neworder)-1; $i < $n; $i++) {\r\n $orderslot = explode(\"--\", $neworder[$i]);\r\n $order = intval(preg_replace(\"/[^0-9]/\", \"\", $orderslot[0]));\r\n $pid = intval(preg_replace(\"/[^0-9]/\", \"\", $orderslot[1]));\r\n\r\n // update ordering\r\n $db->SetQuery(\"UPDATE #__hwdpsphotos SET ordering = $i WHERE id = $pid\");\r\n $db->Query();\r\n if ( !$db->query() ) {\r\n echo \"<script> alert('\".$db->getErrorMsg().\"'); window.history.go(-1); </script>\\n\";\r\n exit();\r\n }\r\n }\r\n\r\n // perform maintenance\r\n\trequire_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_hwdphotoshare'.DS.'libraries'.DS.'maintenance_recount.class.php');\r\n hwd_ps_tools::setAlbumModifiedDate($album_id);\r\n include_once(JPATH_SITE.DS.'components'.DS.'com_hwdphotoshare'.DS.'xml'.DS.'xmloutput.class.php');\r\n hwd_ps_xmlOutput::prepareSlideshowXML($album_id);\r\n\r\n $msg = _HWDPS_ALERT_AREORGANISED;\r\n $mainframe->enqueueMessage($msg);\r\n $mainframe->redirect( JURI::root( true ) . '/index.php?option=com_hwdphotoshare&task=editalbum&album_id='.$album_id.'&Itemid='.$Itemid );\r\n }",
"function reorderChildren($order);",
"function reorderList() {\r\n\t\t\r\n\t}",
"protected function _addBefore($index, \\sli_tom\\util\\Node $element) {\n\t\tif (is_object($index)) {\n\t\t\t$index = $this->indexOf($index);\n\t\t}\n\t\tif (isset($this->_data[$index])) {\n\t\t\treturn $this->_insert($element, $index);\n\t\t}\n\t\treturn $this->addChild($element, $index);\n\t}",
"public function reorder_onMove()\n {\n $sourceNode = Menu::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Menu::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }",
"public function addItemBeforeIndex(tx_tcaobjects_object $itemObj, $index) {\r\n\t\tif (! $this->checkItemType($itemObj)) {\r\n\t\t\tthrow new tx_pttools_exceptionInternal('Item to add to collection is of wrong type');\r\n\t\t}\r\n\t\tarray_splice($this->itemsArr, $index, 0, array($itemObj));\r\n\t\t\r\n\t\t// array_splice does not preserve numeric keys in the input array \n\t\tif ($this->useUidAsCollectionId) {\r\n\t\t\t$this->writeUidsToKeys();\r\n\t\t}\r\n\t}",
"public function move($delta, $where = '')\n {\n\n // If the change is none, do nothing.\n if (empty($delta))\n {\n return true;\n }\n\n $row = null;\n $query = $this->_db->getQuery(true);\n\n // Select the primary key and ordering values from the table.\n $query->select($this->_db->qn($this->_tbl_key) . ', ordering')\n ->from($this->_db->qn($this->_tbl));\n\n // If the movement delta is negative move the row up.\n if ($delta < 0)\n {\n $query->where('ordering < ' . (int) $this->ordering)\n ->order('ordering DESC');\n }\n // If the movement delta is positive move the row down.\n elseif ($delta > 0)\n {\n $query->where('ordering > ' . (int) $this->ordering)\n ->order('ordering ASC');\n }\n\n // Add the custom WHERE clause if set.\n if ($where)\n {\n $query->where($where);\n }\n\n // Select the first row with the criteria.\n $this->_db->setQuery($query, 0, 1);\n $row = $this->_db->loadObject();\n\n // If a row is found, move the item.\n if (!empty($row))\n {\n // Update the ordering field for this instance to the row's ordering value.\n\n // is we add a file with sorting 0 to the set of sorted elements we need to\n // increase the ordernumbers in this folder\n if ($this->ordering == 0 && $delta == 1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering + 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 2;\n }\n\n // set the new position for the item\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $row->ordering);\n $this->appendPrimaryKeys($query);\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n // if we remove an item from the set of sorted items we need to increase all sorting numbers\n // else we just switch position\n if ($this->ordering == 1 && $delta == -1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering - 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 1;\n } else {\n\n // Update the ordering field for the row to this instance's ordering value.\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $this->ordering);\n $this->appendPrimaryKeys($query, $row);\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n // Update the instance value.\n $this->ordering = $row->ordering;\n }\n }\n else\n {\n // if a field switches from 0 to 1 we have to increase all other ordering numbers\n // since we allow multiple items having the number of 1\n if ($this->ordering == 0 && $delta == 1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering + 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 1;\n }\n\n // Update the ordering field for this instance.\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $this->ordering);\n $this->appendPrimaryKeys($query);\n $this->_db->setQuery($query);\n $this->_db->execute();\n }\n\n return true;\n }",
"function moveFirst()\n {\n $this->position = 0;\n }",
"public function moveBefore($model)\n {\n if ( is_numeric($model) ) {\n $model = call_user_func(\"$this->ownerClassName::findOne\", $model);\n }\n $parentId = $this->parentIdField ? $model->{$this->parentIdField} : 0;\n if ( $model->{$this->sortField} < 1 ) {\n $this->reorder($parentId);\n $model->refresh();\n }\n $prevIdx = $this->getMaxIdx($parentId, $model->{$this->sortField});\n if ( $model->{$this->sortField} - $prevIdx < 2 ) {\n $this->reorder($parentId);\n $model->refresh();\n $prevIdx = $this->getMaxIdx($parentId, $model->{$this->sortField});\n }\n $newIdx = $model->{$this->sortField} - floor(($model->{$this->sortField} - $prevIdx)/2);\n if ( $this->parentIdField ) {\n call_user_func(\"$this->ownerClassName::updateAll\", [\n $this->sortField => $newIdx,\n $this->parentIdField => $parentId,\n ], [ $this->primaryKey => $this->owner->primaryKey ]);\n } else {\n call_user_func(\"$this->ownerClassName::updateAll\",\n [ $this->sortField => $newIdx ],\n [ $this->primaryKey => $this->owner->primaryKey ]);\n }\n $this->invalidateTagDependency();\n }",
"function move_down($input,$index) {\n $new_array = $input;\n\n if (count($new_array) > $index) {\n array_splice($new_array, $index + 2, 0, $input[$index]);\n array_splice($new_array, $index, 1);\n }\n\n return $new_array;\n }",
"function reOrder($order) {\n\t\tforeach($order as $task_id => $sort_order) {\n\t\t\t$this->newRow($task_id);\n\t\t\t$this->where(\"user_id='$_SESSION[user]'\");\n\t\t\t$this->field['sort_order'] = $sort_order;\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function moveDown()\n {\n // Moves previous lower ranked item above\n $curOrder = $this->order;\n if ($curOrder == 0) return; // This is already the lowest item, so cancel\n if ($prevItem = Group::where('order', '<', $curOrder)->first())\n {\n $this->order = $prevItem->order;\n $prevItem->order = $curOrder;\n $prevItem->save();\n $this->save();\n }\n }",
"function orderChanged();",
"public function moveExerciseOrder($phaseId, $exerciseId, $initialOrder, $finalOrder){\n\t\t$exercises = $this->getExercisesByPhaseId($phaseId);\n\t\t// Determine Direction Final - Initial; Positive = Moving Forward, Negative = moving backward\n\t\t$direction = $finalOrder - $initialOrder;\n\t\t//If Forward\n\t\tif(is_numeric($direction) && $direction > 0){\n\t\t\t// Loop Order[Initial +1 ] To Order[Final]\n\t\t\tforeach ($exercises as $row) {\n\t\t\t\t// If Order is Between Initial +1 and Final Inclusive\n\t\t\t\tif($row->order_no > $initialOrder && $row->order_no < $finalOrder+1){\n\t\t\t\t\t// Current exercise Order_no -1\n\t\t\t\t\t$this->updateExercise($row->order_no-1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $row->id);\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Moved Backward.\";\n\t\t\t\t}//End If\n\t\t\t\telse{\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Not Changed.\";\n\t\t\t\t}\t\n\t\t\t}// End Loop\n\t\t}// End If\n\n\t\t//Elseif Backward\n\t\telseif (is_numeric($direction) && $direction < 0) {\n\t\t\t//Loop Order[Final] to Order [Initial-1]\n\t\t\tforeach ($exercises as $row) {\n\t\t\t\t// If Order is Between Initial -1 and Final Inclusive\n\t\t\t\tif($row->order_no < $initialOrder && $row->order_no >= $finalOrder){\n\t\t\t\t\t// Current exercise Order_no -1\n\t\t\t\t\t$this->updateExercise($row->order_no+1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $row->id);\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Moved Forward.\";\n\t\t\t\t}//End If\t\n\t\t\t\telse{\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Not Changed.\";\n\t\t\t\t}\n\t\t\t}// End Loop\n\t\t}//End Elseif\n\n\t\t//Assign exercise to be Moved Final Order_No\n\t\t$this->updateExercise($finalOrder, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $exerciseId);\n\t\treturn \"Success exercise Moved\"; \n\t }",
"public function reorder_items(array $ordering)\n {\n $items = $this->items->find_all();\n $order = array_flip($ordering);\n\n foreach ($items as $item)\n {\n if (isset($order[$item->id]))\n {\n $item->sort_id = $order[$item->id];\n $item->save();\n }\n }\n }",
"public function fixSortOrder (SortableEntityInterface $removedEntity) : void\n {\n $this->nested->fixSortOrder([$removedEntity], $this->buildWhere($removedEntity));\n }"
] | [
"0.76769066",
"0.72915435",
"0.61322016",
"0.56426084",
"0.55832464",
"0.5451644",
"0.536561",
"0.5348582",
"0.52308494",
"0.5212537",
"0.5205791",
"0.5129569",
"0.5091493",
"0.5033977",
"0.4998154",
"0.49947304",
"0.49860612",
"0.49764287",
"0.49670467",
"0.49362737",
"0.4923629",
"0.49169493",
"0.4910149",
"0.48677766",
"0.48663253",
"0.4849126",
"0.48417798",
"0.48264787",
"0.48169553",
"0.47987846"
] | 0.76714563 | 1 |
/ Removes article at position \p $index in array \p $old_order from the list. | private function dropArticle($index, array &$old_order) {
self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);
//moveArticleTemporarily adds article on top but should be at the bottom
$entry = array_shift($old_order);
$old_order[] = $entry;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"public function unsetOrderLine($index)\n {\n unset($this->orderLine[$index]);\n }",
"function remove() {\n\t\t\n\t\t$index = isset($this->passedArgs['index']) ? $this->passedArgs['index'] : -1;\n\t\t$store_number = isset($this->passedArgs['store']) ? $this->passedArgs['store'] : 1;\n\t\t\n\t\tif ($index > -1) {\n\t\t\t\n\t\t\t$store = $this->Store->findByNumber($store_number);\n\t\t\t$cart = $this->Cart->get($store);\n\t\t\t\n\t\t\tif (isset($cart['OrderDetail'][$index])) {\n\t\t\t\t\n\t\t\t\tunset($cart['OrderDetail'][$index]);\n\t\t\t\t\n\t\t\t\t$cart = $this->Cart->recalculate($cart, $store);\n\t\t\t\t\n\t\t\t\t$this->Cart->save($cart, $store_number);\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->redirect(array('plugin' => 'kaching', 'controller' => 'carts', 'action' => 'view'));\n\t}",
"public function unsetOrderDocumentReference($index)\n {\n unset($this->orderDocumentReference[$index]);\n }",
"public function unsetOrderReference($index)\n {\n unset($this->orderReference[$index]);\n }",
"abstract public function remove($index);",
"public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n try {\n $index = self::indexOfArticle($operation->getUid(), $old_order);\n } catch (tx_newspaper_Exception $e) {\n // article not in list; do nothing.\n return;\n }\n\n if ($operation->shuffleValue()) {\n $this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);\n } else if ($operation->isToTop()) {\n $this->sortArticleToTop($index, $old_order);\n } else if ($operation->isToBottom()) {\n $this->dropArticle($index, $old_order);\n } else {\n throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);\n }\n\n return $old_order;\n }",
"private function sortArticleToTop($index, array &$old_order) {\n $distance = $this->distance($old_order[0], $old_order[$index]);\n self::moveArticleTemporarily($index, $old_order, $distance);\n }",
"public function removeItemAt($index) {\r\n\t\t$items = $this->getElementsByTagName($this->itemTag);\r\n\t\t$this->removeChild($items->item($index));\r\n\t}",
"public function unsetGoodsItem($index)\n {\n unset($this->goodsItem[$index]);\n }",
"public function remove($index) {\n $e = $this->elements[$index];\n unset($this->elements[$index]);\n $this->clean();\n $this->fire(new ListDeleteEvent($e, $index));\n return $e;\n }",
"public function removeAt($index);",
"public function rm($index){\n\t\t$this->elements[$index]->domNode->parentNode->removeChild($this->elements[$index]->domNode);\n\t\tunset($this->elements[$index]);\n\t\t$this->elements = array_values($this->elements);\n\t}",
"public function unsetListingEnhancement($index)\n {\n unset($this->listingEnhancement[$index]);\n }",
"public function unsetNote($index)\n {\n unset($this->note[$index]);\n }",
"public function unsetNote($index)\n {\n unset($this->note[$index]);\n }",
"public function unsetPreSelectedParty($index)\n {\n unset($this->preSelectedParty[$index]);\n }",
"public function revert()\n {\n $this->order = $this->order == 'ASC' ? 'DESC' : 'ASC';\n\n if (empty($this->raw_data)) {\n return;\n }\n\n $data = explode(self::SEPARATOR_ELEMENT, $this->raw_data);\n $data = array_reverse($data);\n $this->raw_data = implode(self::SEPARATOR_ELEMENT, $data);\n\n $this->meta['pos'] = array();\n }",
"public function rmElement($index) {\n\t\t$this->rm($index);\n\t}",
"public function removeAt( $index=0 )\n\t{\n\t\tif ( $index < 0 ) {\n\t\t\t$size = $this->size();\n\t\t\t$index = $size + $index - 1;\n\t\t}\n\n\t\tif( isset($this->_items[$index]) ) {\n\t\t\tarray_splice($this->_items, $index, 1);\n\t\t}\n\t}",
"public function remove($index)\n {\n unset($this->payload[$index]);\n }",
"private function detach_order($order)\n {\n foreach ($order->products as $product) {\n\n $product->update([\n 'stock' => $product->stock + $product->pivot->quantity\n ]);\n\n }// end of foreach\n \n $order->delete();\n\n }",
"public function unsetPOS($index)\n {\n unset($this->pOS[$index]);\n }",
"function remover_item($indice) {\n //Recupera a lista da sessao\n $listaPedido = $this->session->userdata('pedido');\n \n //Remove o item da lista\n unset($listaPedido[$indice]);\n \n //Grava a nova lista na sessao\n $this->session->set_userdata('pedido', $listaPedido);\n mostra_mensagem(\"Item removido\", base_url('pedido/carrinho'));\n }",
"public function unsetDisputeArray($index)\n {\n unset($this->disputeArray[$index]);\n }",
"public function unsetDelivery($index)\n {\n unset($this->delivery[$index]);\n }",
"public function removeItem($pos) {\r\n unset($this->_item[$pos]);\r\n $this->_item=array_values($this->_item);\r\n }",
"public function remove($position)\n {\n unset($this->details[$position]);\n }",
"private function delete_array_element(&$array, $index) {\n // Unset element and shuffle everything down.\n if (isset($array[$index])) {\n unset($array[$index]);\n }\n if (empty($array)) {\n $array = array();\n }\n }",
"public function unsetPartyId($index)\n {\n unset($this->partyId[$index]);\n }"
] | [
"0.6173294",
"0.6144812",
"0.6092264",
"0.59786516",
"0.5969816",
"0.58093446",
"0.58032507",
"0.5731226",
"0.57302153",
"0.5709299",
"0.5628802",
"0.55958194",
"0.5561106",
"0.55418473",
"0.5518612",
"0.5518612",
"0.5469124",
"0.5437365",
"0.5436975",
"0.5431034",
"0.5367396",
"0.534988",
"0.53399456",
"0.52958226",
"0.5252822",
"0.5235779",
"0.52144796",
"0.5212589",
"0.5211571",
"0.5200218"
] | 0.8334418 | 0 |
/ Moves an article \p $offset positions away from its current position in \p $old_order. | private static function moveArticleTemporarily($index, array &$old_order, $offset) {
$entry = $old_order[$index];
$entry[1] += $offset;
unset($old_order[$index]);
array_unshift($old_order, $entry);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function dropArticle($index, array &$old_order) {\n self::moveArticleTemporarily($index, $old_order, -self::offset_deleted);\n //moveArticleTemporarily adds article on top but should be at the bottom\n $entry = array_shift($old_order);\n $old_order[] = $entry;\n }",
"public function resort(array $old_order, tx_newspaper_Articlelist_Operation $operation) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n try {\n $index = self::indexOfArticle($operation->getUid(), $old_order);\n } catch (tx_newspaper_Exception $e) {\n // article not in list; do nothing.\n return;\n }\n\n if ($operation->shuffleValue()) {\n $this->resortArticle($operation->getUid(), $operation->shuffleValue(), $old_order);\n } else if ($operation->isToTop()) {\n $this->sortArticleToTop($index, $old_order);\n } else if ($operation->isToBottom()) {\n $this->dropArticle($index, $old_order);\n } else {\n throw new tx_newspaper_IllegalUsageException('WTF is that: ' . $operation);\n }\n\n return $old_order;\n }",
"private function resortArticle($uid, $shuffle_value, array &$old_order) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n if (abs($shuffle_value) != 1) {\n throw new tx_newspaper_IllegalUsageException('Only movements of +/- 1 are supported.');\n }\n\n $articles = $this->getArticlesAndOffsets(self::num_raw_uids);\n\n foreach ($old_order as $old_article) {\n $index = self::indexOfArticle($old_article[0], $articles);\n $articles[$index]['offset'] = $old_article[1];\n }\n\n $index = self::indexOfArticle($uid, $articles);\n\n $articles[$index]['offset'] += $shuffle_value;\n\n $temp_order = $this->sortArticles($articles);\n\n $old_order = array();\n foreach ($temp_order as $temp_article_offset) {\n $old_order[] = array(\n $temp_article_offset['article']->getUid(),\n $temp_article_offset['offset']\n );\n }\n\n }",
"private function sortArticleToTop($index, array &$old_order) {\n $distance = $this->distance($old_order[0], $old_order[$index]);\n self::moveArticleTemporarily($index, $old_order, $distance);\n }",
"public function skip($offset) {\n $this->checkNotClosed();\n\n fseek($this->my_handle, $offset, SEEK_CUR);\n }",
"public function setOffset($offset)\n {\n $this->offset = $offset;\n }",
"public function offsetUnset($offset) {\n\t\t$this->isModified = TRUE;\n\t\tunset($this->storage[$offset]);\n\n\t\tif (empty($this->storage)) {\n\t\t\t$this->positionCounter = 0;\n\t\t}\n\n\t\t$this->removedObjectsPositions[$offset] = $this->addedObjectsPositions[$offset];\n\t\tunset($this->addedObjectsPositions[$offset]);\n\t}",
"public function reorder(object $document, string $srcName, string $targetName, bool $before): void;",
"private function shiftOrder($fromOrder){\r\n\t\t\r\n\t\t$where = \" slider_id=\".$this->id.\" and slide_order >= $fromOrder\";\r\n\t\t$sql = \"update \".RevSliderGlobals::$table_slides.\" set slide_order=(slide_order+1) where $where\";\r\n\t\t$this->db->runSql($sql);\r\n\t\t\r\n\t}",
"public function _setOffset($offset)\r\n {\r\n $this->offset = $offset;\r\n }",
"public function remove($offset)\n {\n $this->__unset($offset);\n }",
"public function shift_article_ordering($id_page, $from = NULL)\n\t{\n\t\t$sql = 'UPDATE ' . $this->parent_table . ' SET ordering = ordering + 1 WHERE id_page=' .$id_page;\n\t\t\n\t\tif ( ! is_null($from))\n\t\t{\n\t\t\t$sql .= ' AND ordering >= ' . $from;\n\t\t}\n\t\t\n\t\t$this->{$this->db_group}->query($sql);\n\t}",
"public function remove(int $offset): void;",
"public function move($delta, $where = '')\n {\n\n // If the change is none, do nothing.\n if (empty($delta))\n {\n return true;\n }\n\n $row = null;\n $query = $this->_db->getQuery(true);\n\n // Select the primary key and ordering values from the table.\n $query->select($this->_db->qn($this->_tbl_key) . ', ordering')\n ->from($this->_db->qn($this->_tbl));\n\n // If the movement delta is negative move the row up.\n if ($delta < 0)\n {\n $query->where('ordering < ' . (int) $this->ordering)\n ->order('ordering DESC');\n }\n // If the movement delta is positive move the row down.\n elseif ($delta > 0)\n {\n $query->where('ordering > ' . (int) $this->ordering)\n ->order('ordering ASC');\n }\n\n // Add the custom WHERE clause if set.\n if ($where)\n {\n $query->where($where);\n }\n\n // Select the first row with the criteria.\n $this->_db->setQuery($query, 0, 1);\n $row = $this->_db->loadObject();\n\n // If a row is found, move the item.\n if (!empty($row))\n {\n // Update the ordering field for this instance to the row's ordering value.\n\n // is we add a file with sorting 0 to the set of sorted elements we need to\n // increase the ordernumbers in this folder\n if ($this->ordering == 0 && $delta == 1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering + 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 2;\n }\n\n // set the new position for the item\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $row->ordering);\n $this->appendPrimaryKeys($query);\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n // if we remove an item from the set of sorted items we need to increase all sorting numbers\n // else we just switch position\n if ($this->ordering == 1 && $delta == -1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering - 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 1;\n } else {\n\n // Update the ordering field for the row to this instance's ordering value.\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $this->ordering);\n $this->appendPrimaryKeys($query, $row);\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n // Update the instance value.\n $this->ordering = $row->ordering;\n }\n }\n else\n {\n // if a field switches from 0 to 1 we have to increase all other ordering numbers\n // since we allow multiple items having the number of 1\n if ($this->ordering == 0 && $delta == 1) {\n\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ordering + 1 ')\n ->where('ordering > 0');\n $this->_db->setQuery($query);\n $this->_db->execute();\n\n $this->ordering = 1;\n }\n\n // Update the ordering field for this instance.\n $query->clear()\n ->update($this->_db->qn($this->_tbl))\n ->set('ordering = ' . (int) $this->ordering);\n $this->appendPrimaryKeys($query);\n $this->_db->setQuery($query);\n $this->_db->execute();\n }\n\n return true;\n }",
"function ReorderMenus ($id, $order_type)\r\n{\r\n\tglobal $db;\r\n\t$query=\"SELECT position FROM menus_items WHERE `id`='\".$id.\"'\";\r\n\t$db->query($query);\r\n\t$db->next_record();\r\n\t$new_order = $db->f('position');\r\n\tif ($order_type == 'up')\r\n\t{\r\n\t\t$new_order += -15;\r\n\t}\r\n\telse \r\n\t{\r\n\t\t$new_order += +15;\r\n\t}\r\n\tUpdateMenusOrder($id, $new_order);\r\n}",
"public function offsetUnset(mixed $offset): void\n {\n unset($this->items[ $offset ]);\n }",
"public function moveDown()\n {\n // Moves previous lower ranked item above\n $curOrder = $this->order;\n if ($curOrder == 0) return; // This is already the lowest item, so cancel\n if ($prevItem = Group::where('order', '<', $curOrder)->first())\n {\n $this->order = $prevItem->order;\n $prevItem->order = $curOrder;\n $prevItem->save();\n $this->save();\n }\n }",
"abstract protected function convertOffset($offset);",
"public function offsetUnset(mixed $offset): void\n {\n unset($this->items[$offset]);\n }",
"public function setOffset($offset) {\n $this->offset = $this->checkVal($offset);\n }",
"function pl_insert_into_array( $orig, $new, $offset ) {\n\n\t$newArray = array_slice($orig, 0, $offset, true) +\n\t $new +\n\t array_slice($orig, $offset, NULL, true);\n\treturn $newArray;\n}",
"public function offsetUnset($offset)\n {\n parent::offsetUnset($offset);\n $this->performHook('modified');\n }",
"public function delete($offset)\n {\n array_splice($this->container, $offset, 1);\n }",
"public function offsetUnset($offset)\n {\n unset($this->items[$offset]);\n }",
"public function offsetUnset( $offset ) {\n unset( $this->items[ $offset ] );\n }",
"public function moveExerciseOrder($phaseId, $exerciseId, $initialOrder, $finalOrder){\n\t\t$exercises = $this->getExercisesByPhaseId($phaseId);\n\t\t// Determine Direction Final - Initial; Positive = Moving Forward, Negative = moving backward\n\t\t$direction = $finalOrder - $initialOrder;\n\t\t//If Forward\n\t\tif(is_numeric($direction) && $direction > 0){\n\t\t\t// Loop Order[Initial +1 ] To Order[Final]\n\t\t\tforeach ($exercises as $row) {\n\t\t\t\t// If Order is Between Initial +1 and Final Inclusive\n\t\t\t\tif($row->order_no > $initialOrder && $row->order_no < $finalOrder+1){\n\t\t\t\t\t// Current exercise Order_no -1\n\t\t\t\t\t$this->updateExercise($row->order_no-1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $row->id);\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Moved Backward.\";\n\t\t\t\t}//End If\n\t\t\t\telse{\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Not Changed.\";\n\t\t\t\t}\t\n\t\t\t}// End Loop\n\t\t}// End If\n\n\t\t//Elseif Backward\n\t\telseif (is_numeric($direction) && $direction < 0) {\n\t\t\t//Loop Order[Final] to Order [Initial-1]\n\t\t\tforeach ($exercises as $row) {\n\t\t\t\t// If Order is Between Initial -1 and Final Inclusive\n\t\t\t\tif($row->order_no < $initialOrder && $row->order_no >= $finalOrder){\n\t\t\t\t\t// Current exercise Order_no -1\n\t\t\t\t\t$this->updateExercise($row->order_no+1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $row->id);\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Moved Forward.\";\n\t\t\t\t}//End If\t\n\t\t\t\telse{\n\t\t\t\t\t//echo \"exercise: \" . $row->name . \" Not Changed.\";\n\t\t\t\t}\n\t\t\t}// End Loop\n\t\t}//End Elseif\n\n\t\t//Assign exercise to be Moved Final Order_No\n\t\t$this->updateExercise($finalOrder, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $exerciseId);\n\t\treturn \"Success exercise Moved\"; \n\t }",
"public function setOffset(int $offset): void\n {\n $this->offset = $offset;\n }",
"public function setOffset(int $offset): void\n {\n $this->offset = $offset;\n }",
"public function revert()\n {\n $this->order = $this->order == 'ASC' ? 'DESC' : 'ASC';\n\n if (empty($this->raw_data)) {\n return;\n }\n\n $data = explode(self::SEPARATOR_ELEMENT, $this->raw_data);\n $data = array_reverse($data);\n $this->raw_data = implode(self::SEPARATOR_ELEMENT, $data);\n\n $this->meta['pos'] = array();\n }",
"final public function __unset($offset)\n {\n $this->remove($offset);\n }"
] | [
"0.61823833",
"0.6041561",
"0.5891621",
"0.5542817",
"0.5451706",
"0.54167044",
"0.538219",
"0.53210026",
"0.5309096",
"0.5272398",
"0.52651745",
"0.52161825",
"0.5200244",
"0.5180593",
"0.51791507",
"0.51655614",
"0.5153586",
"0.51391643",
"0.5108219",
"0.51052105",
"0.5097997",
"0.50890124",
"0.5069527",
"0.5069236",
"0.5043042",
"0.5031719",
"0.50281185",
"0.50281185",
"0.50227344",
"0.5001537"
] | 0.74795693 | 0 |
/ Updates or insert a record with the corresponding offset. | private function updateOffset($uid_local, $uid_foreign, $offset) {
if (tx_newspaper::updateRows(
self::mm_table,
'uid_local = ' . intval($uid_local) .
' AND uid_foreign = ' . $uid_foreign,
array('offset' => $offset)
)) {
return; // record was successfully updated
}
// no record was updated, so write a new one
tx_newspaper::insertRows(
self::mm_table,
array(
'uid_local' => intval($uid_local),
'uid_foreign' => intval($uid_foreign),
'offset' => $offset
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function insertRecord(string $path, int $position, Record $record): void;",
"public function offsetSet( $offset, $value )\n {\n parent::offsetSet( $offset, $value );\n $this->getIndex()->insert( $offset );\n }",
"public function store($offset, $value)\n {\n $this->__set($offset, $value);\n }",
"public function offsetSet($offset, $value)\n {\n if (!is_scalar($offset) && !is_null($offset)) {\n return;\n }\n\n $isNew = $this->offsetIsNew($offset);\n $oldData = $isNew ? null : $this->offsetGet($offset);\n $index = $isNew ? $this->arrayAccessMapIndex++ : array_search($offset, $this->baseArrayMap);\n $hook = $isNew ? 'insert' : 'update';\n\n if (is_null($offset)) {\n $offset = $this->arrayAccessConcreteIndex;\n }\n\n //filtering the key ($offset) based on http://www.php.net/manual/en/language.types.array.php\n $offset = is_numeric($offset) || is_bool($offset) ? intval($offset) : (string)$offset;\n\n if (!$this->internalFilterHooks($offset, $value, 'input')) {\n return;\n }\n\n if (is_numeric($offset) && $offset >= $this->arrayAccessConcreteIndex) {\n $this->arrayAccessConcreteIndex = $offset + 1;\n }\n $value = $this->internalSanitizeHooks($offset, $value, 'input');\n $this->baseConcreteData[$offset] = $value;\n $this->baseArrayMap[$index] = $offset;\n $this->internalChangingHooks($offset, $value, $oldData, $hook);\n }",
"public function testUpdateRecord()\n {\n\n $record = $this->_record();\n\n $record->setArray(array(\n 'field4' => 1,\n 'field5' => 2,\n 'field6' => 3\n ));\n\n $record->save();\n\n $this->_setPut(array(\n 'field4' => '4',\n 'field5' => '5',\n 'field6' => '6'\n ));\n\n $this->dispatch('neatline/records/'.$record->id);\n $record = $this->_reload($record);\n\n $this->assertEquals(4, $record->field4);\n $this->assertEquals(5, $record->field5);\n $this->assertEquals(6, $record->field6);\n\n }",
"public function offsetSet($offset, $value) \n { $value = $this->_ensureEntity($value);\n\n $this->_entities[$offset] = $value;\n $this->_count = count($this->_entities);\n }",
"public function updateRecord($recordId=NULL, array $recordInfo);",
"public function offsetSet($offset, $value)\n {\n $this->_rows[$offset] = $value;\n }",
"public function modifyRecord($record);",
"public function offsetSet($offset, $value)\n {\n $data = $this->all();\n $data[$offset] = $value;\n }",
"public function offsetSet($offset, $value)\n\t{\n\t\t// Not allowed for Elasticsearch responses, update the Eloquent model instead.\n\t}",
"public function offsetSet($offset, $value)\n {\n if (is_null($offset)) {\n $this->fields[] = $value;\n } else {\n $this->fields[$offset] = $value;\n }\n }",
"public function offsetSet($offset, $value)\n {\n if (is_null($offset)) {\n $this->fields[] = $value;\n } else {\n $this->fields[$offset] = $value;\n }\n }",
"public function offsetSet($offset, $value)\n {\n $this->_validateEntity($value);\n\n if (is_null($offset)) {\n $this->data[] = $value;\n } else {\n $this->data[$offset] = $value;\n }\n }",
"public function offsetSet($offset, $value)\n {\n if ($offset === null)\n $this->data[] = $value;\n else\n $this->data[$offset] = $value;\n\n $this->updateKeys();\n }",
"function insertData($offset, $arg)\r\n {\r\n return $this->raiseError('the function \"insertData\" is not support in this version');\r\n }",
"public function offsetSet($offset, $value)\n {\n $this->row[$offset] = $value;\n }",
"public function offsetSet($offset, $value)\n {\n if (!$this->readonlyDatabase) {\n static::throwReadOnlyException();\n }\n parent::offsetSet($offset, $value);\n }",
"public function offsetSet($offset, $value) {\n if (is_null($offset)) {\n $this->data[] = $value;\n } else {\n $this->data[$offset] = $value;\n }\n $this->keys = array_keys($this->data);\n }",
"public function offsetSet($offset, $value) {\n if (is_null($offset)) {\n $this->data[] = $value;\n } else {\n $this->data[$offset] = $value;\n }\n }",
"public function update( $_columns, $_filters, $_order_by, $offset );",
"function offsetSet( $offset, $value )\n {\n if ( is_null( $offset ) )\n {\n $this->_data[] = $value;\n }\n else\n {\n $this->_data[ $offset ] = $value;\n }\n }",
"private function update() {\r\n\t\t$targetname = ($this->type==\"A\" ? \"address\" : ($this->type==\"CNAME\" ? \"cname\" : \"txtdata\"));\r\n\t\t$params = array(\t\"line\"\t\t\t=> $this->line,\r\n\t\t\t\t\t\t\t\"type\"\t\t\t=> $this->type,\r\n\t\t\t\t\t\t\t$targetname\t\t=> $this->target,\r\n\t\t\t\t\t\t\t\"ttl\"\t\t\t=> $this->ttl,\r\n\t\t\t\t\t\t\t\"class\"\t\t\t=> self::$class);\r\n\t\t$result = $this->zone_records->doquery(\"edit_zone_record\", $params, array());\r\n\t\t$this->zone_records->updaterecords();\r\n\t\t//todo: return result or check status?\r\n\t}",
"public function update_record(){\n\t\t\t\n\t\t}",
"public function offsetSet($offset, $value)\n {\n $this->_entries[$offset] = $value;\n }",
"function pl_insert_into_array( $orig, $new, $offset ) {\n\n\t$newArray = array_slice($orig, 0, $offset, true) +\n\t $new +\n\t array_slice($orig, $offset, NULL, true);\n\treturn $newArray;\n}",
"public function update($record, $primaryKey) { \n\t\t\t$query = 'UPDATE ' . $this->table . ' SET ';\n\t $parameters = [];\n\t foreach ($record as $key => $value) {\n\t $parameters[] = $key . ' = :' .$key;\n\t }\n\t $query .= implode(', ', $parameters);\n\t\t\t$query .= ' WHERE ' . $primaryKey . ' = :primaryKey'; \n\t\t\t$record['primaryKey'] = $record[$primaryKey];\n\t\t\t$stmt = $this->pdo->prepare($query); \n\t\t\t$stmt->execute($record);\n\t\t}",
"public function updateRecord()\n {\n #$response = $request->execute();\n }",
"public function offsetSet($offset, $value);",
"public function offsetSet($offset, $value);"
] | [
"0.624538",
"0.59100926",
"0.58537555",
"0.5798689",
"0.5792671",
"0.5735717",
"0.5704296",
"0.56917274",
"0.5665738",
"0.564771",
"0.5638004",
"0.5630875",
"0.5630875",
"0.5586747",
"0.5580367",
"0.5570855",
"0.5561148",
"0.55608976",
"0.5550089",
"0.5545354",
"0.5488528",
"0.5474328",
"0.54627526",
"0.5456634",
"0.54415977",
"0.5427948",
"0.5427756",
"0.5418728",
"0.5399403",
"0.5399403"
] | 0.6151021 | 1 |
/ User function called from the BE to display the articles on the list. Also, to sort articles on the list up and down. This function is called by TCEForms with a defaultconstructed article list object. Therefore it must create its own article list, the UID of which it reads from \p $PA. \param $PA Array: \code array( altName => palette => extra => pal => fieldConf => array ( exclude => label => LLL:EXT:newspaper/locallang_db.xml:tx_newspaper_articlelist_semiautomatic.articles config => array( type => user internal_type => db allowed => tx_newspaper_article size => 10 minitems => 0 maxitems => 100 MM => tx_newspaper_articlelist_semiautomatic_articles_mm userFunc => tx_newspaper_articlelist_semiautomatic>displayListedArticles form_type => user ) ) fieldTSConfig => itemFormElName => itemFormElName_file => itemFormElValue => itemFormElID => onFocus => label => fieldChangeFunc => array( TBE_EDITOR_fieldChanged => alert => ) table => tx_newspaper_articlelist_semiautomatic field => articles row => array( uid => ... (other attributes of tx_newspaper_articlelist_semiautomatic) ) pObj => )\endcode \param $fobj reference to the parent object (instance of t3lib_TCEforms) \return List of articles currently on the list, with controls to rearrange the articles | public function displayListedArticles($PA, $fobj) {
if (intval($PA['row']['uid']) == 0) {
// probably a new record
return tx_newspaper::getTranslation('message_tx_newspaper_articlelist_unsaved');
}
$current_artlist = new tx_newspaper_ArticleList_Semiautomatic(intval($PA['row']['uid']));
$smarty = new tx_newspaper_Smarty();
$smarty->setTemplateSearchPath(array('typo3conf/ext/newspaper/res/be/templates'));
$smarty->assign('articles', $current_artlist->getSortedArticles($current_artlist->getNumArticles()));
$smarty->assign('message_empty', tx_newspaper::getTranslation('message_tx_newspaper_articlelist_empty'));
return $smarty->fetch('tx_newspaper_articlelist_semiautomatic.tmpl');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function display_articles(){\n \n echo \"<script type='text/javascript'>\";\n //echo \"max_page=\".$this->max_page.\";\";\n echo \"filter_manager.set_max_page($this->max_page);\";\n echo \"</script>\";\n $this->display_navigator();\n echo \"<table id='article_list_table' class='table-display' cellspacing='0' cellpadding='0'><tr>\";\n echo \"<th>ID</th>\";\n echo \"<th>Nazov</th>\";\n echo \"<th>Typ článku</th>\";\n echo \"<th>Rubrika</th>\";\n echo \"<th>Zobrazené</th>\";\n echo \"<th>Casova známka</th><th></th></tr>\";\n if(!empty($this->articles))\n foreach($this->articles as $article){\n $program_id= $this->getProgram($article['typ_id']);\n $program=\"nastavProgram({id:'\".$program_id.\"',article_id:'\".$article['id'].\"'});\";\n echo \"<tr>\";\n echo \"<td>\".$article['id'].\"</td>\";\n echo \"<td onclick=\\\"$program\\\" class='art_name'>\".$article['nazov'].\"</td>\";\n echo \"<td>\".$article['typ'].\"</td>\";\n echo \"<td>\".$article['rubrika'].\"</td>\";\n echo \"<td>\".($article['zobrazit']?\"Áno\":\"Nie\").\"</td>\";\n echo \"<td>\".date(\"d.n.Y\",$article['cas']).\"</td>\";\n echo \"<td>\";\n if($this->accessRights->approved('REMOVE'))\n echo\"<a href='' onclick=\\\"potvrdASpustiProgram(\".$this->getProgramID().\",'remove',{id:'\"\n .$article['id'].\"'},'Skutočne chcete vymazať článok. Vymažete tým aj celú rozrobenú prácu');return false;\\\">Vymaž</a>\";\n echo\"</td>\";\n echo \"</tr>\";\n }\n echo \"</table>\"; \n $this->display_navigator();\n }",
"public function getArticlesList($pageOffset, $nbArticlesPerPage, $sortingMethod='DESC'){\n\t\t$sql = '\n\t\tSELECT *\n\t\tFROM articles\n\t\tORDER BY art_inserted '.$sortingMethod.'\n\t\tLIMIT '.$pageOffset.','.$nbArticlesPerPage.'\n\n\t\t';\n\n\t\t$sth = $this->dbh->prepare($sql);\n\n\t\tif ($sth->execute() === false) {\n\t\t\tprint_r($sth->errorInfo());\n\t\t} else {\n\t\t\treturn $sth->fetchAll();\n\t\t}\n\t}",
"public function list_articles() {\n $opts = array(\n 'post_type' => $this->settings['post_type'],\n 'echo' => false,\n 'sort_column' => 'menu_order',\n 'title_li' => null\n );\n $pages = wp_list_pages( $opts );\n\n // This is awfully hackish but replace the links to stay in the admin area\n if ( preg_match_all( '/\\<li.+page-item-([0-9]+).+href=\"(.[^\"]+)\"/i', $pages, $matches ) ) {\n foreach ( $matches['2'] as $k => $v ) {\n $pages = str_replace( sprintf( '\"%s\"', $v ), $this->article_permalink( $matches['1'][$k] ), $pages );\n }\n }\n return $pages;\n }",
"public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }",
"protected function HandleArticleList()\n {\n }",
"public function getlistArticl(){\n\t\t\t$result = \"Aucune page disponible\";\t\n\t\t\t$res = \"\";\n\t\t\t$tab = $this->selectAllArticle();\n\t\t\n\t\t\tif ($tab[0] > 0){\n\t\t\t\t$res .= \"<table width='50%'>\";\n\t\t\t\tfor ($i = 1; $i <= $tab[0]; $i++) {\n\t\t\t\t\t$titrePage = $tab[$i]->getTitre();\n\t\t\t\t\t$resumePage = strip_tags($tab[$i]->getContenu());\n\t\t\t\t\t$idPage = $tab[$i]->getIdentifiant();\n\t\t\t\t\t\n\t\t\t\t\tif (strlen($resumePage) > 50){\n\t\t\t\t\t\t$resumePage = substr($resumePage,0,50) . \"...\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$res .= \"<tr><td width='5%'>\".$titrePage.\"</td>\";\n\t\t\t\t\t$res .= \"<td>\".$resumePage.\"</td>\";\n\t\t\t\t\t$res .= \"<td width='15%'><form method='post' action='?page=access&admin=updateArt&id=\".$idPage.\"'>\";;\n\t\t\t\t\t$res .= '<button onClick=\"submit()\">Modifier</button></form></td>';\n\t\t\t\t\t$res .= \"<td width='15%'><form method='post' action='?page=billet&action=deleteArt&id=\".$idPage.\"'>\";\n\t\t\t\t\t$res .= '<button onClick=\"submit()\">Supprimer</button></form></td>';\n\t\t\t\t\t$res .= \"</tr>\";\n\t\t\t\t}\n\t\t\t\t$res .= \"</table>\";\n\t\t\t\t$result = $res;\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}",
"public function listeArticles()\n {\n $this->userLists = $this->db->query(\"SELECT id, titre, DATE_FORMAT(date_creation, '%d/%m/%Y'), contenu FROM articles ORDER BY date_creation DESC \")->fetch_all();\n return $this->userLists;\n }",
"function TOPIC_list()\n{\n global $_CONF, $_TABLES, $LANG27, $LANG_ACCESS, $LANG_ADMIN, $_IMAGE_TYPE;\n\n USES_lib_admin();\n\n $retval = '';\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/topic.php',\n 'text' => $LANG_ADMIN['topic_list'],'active'=>true),\n array('url' => $_CONF['site_admin_url'] . '/topic.php?edit=x',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home'])\n );\n\n $retval .= COM_startBlock ($LANG27[8], '', COM_getBlockTemplate ('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG27[9],\n $_CONF['layout_url'] . '/images/icons/topic.' . $_IMAGE_TYPE\n );\n\n $header_arr = array(\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false, 'align' => 'center', 'width' => '35px'),\n array('text' => $LANG27[10], 'field' => 'sortnum', 'sort' => true, 'align' => 'center'),\n array('text' => $LANG27[2], 'field' => 'tid', 'sort' => true),\n array('text' => $LANG27[3], 'field' => 'topic', 'sort' => true),\n array('text' => $LANG27[38], 'field' => 'is_default', 'sort' => false, 'align' => 'center'),\n array('text' => $LANG27[39], 'field' => 'archive_flag', 'sort' => false, 'align' => 'center'),\n array('text' => $LANG27[11], 'field' => 'limitnews', 'sort' => false, 'align' => 'center'),\n array('text' => $LANG27[35], 'field' => 'sort_by', 'sort' => false, 'align' => 'center', 'nowrap' => 'true'),\n array('text' => $LANG27[37], 'field' => 'sort_dir', 'sort' => false, 'align' => 'center'),\n array('text' => $LANG_ADMIN['delete'], 'field' => 'delete', 'sort' => false, 'align' => 'center', 'width' => '35px'),\n );\n\n $defsort_arr = array('field' => 'sortnum', 'direction' => 'asc');\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/topic.php'\n );\n\n $query_arr = array(\n 'table' => 'topics',\n 'sql' => \"SELECT * FROM {$_TABLES['topics']} WHERE 1=1\",\n 'query_fields' => array('tid', 'topic'),\n 'default_filter' => COM_getPermSql ('AND')\n );\n\n //$token = SEC_createToken();\n $form_arr = array(\n 'bottom' => '<input type=\"hidden\" name=\"' . CSRF_TOKEN . '\" value=\"'. $token .'\"/>',\n );\n $extra = array(\n 'token' => SEC_createToken(),\n 'topic_count' => count(Topic::All()) * 10,\n );\n\n $retval .= ADMIN_list('topics','TOPIC_getListField',\n $header_arr,$text_arr,$query_arr,$defsort_arr,'',$extra,'', $form_arr);\n\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n return $retval;\n\n}",
"protected function PreArticleListHandling()\n {\n }",
"protected function HandleArticleList()\n {\n $oArticleList = $this->GetArticleList();\n $iCount = 0;\n if (!is_null($oArticleList)) {\n /** @var $oArticle TdbShopArticle */\n while (($oArticle = $oArticleList->Next()) && !$this->BreakUp($iCount)) {\n $oArticle = $this->PreProcessArticle($oArticle);\n $this->HandleArticle($oArticle);\n ++$iCount;\n }\n }\n\n return;\n }",
"public function faqList()\n\t{\n\t\t# module actuel\n\t\t$this->okt->page->module = 'faq';\n\t\t$this->okt->page->action = 'list_questions';\n\n\t\t# paramètres de base de selection des articles\n\t\t$aFaqParams = array(\n\t\t\t'visibility' => 1,\n\t\t\t'language' => $this->okt->user->language\n\t\t);\n\n\t\t# initialisation des filtres\n\t\t$this->okt->faq->filtersStart();\n\n\t\t# ré-initialisation filtres\n\t\tif (!empty($_GET['init_filters']))\n\t\t{\n\t\t\t$this->okt->faq->filters->initFilters();\n\t\t\thttp::redirect($this->okt->faq->config->url);\n\t\t}\n\n\t\t# initialisation des filtres\n\t\t$this->okt->faq->filters->setQuestionsParams($aFaqParams);\n\t\t$this->okt->faq->filters->getFilters();\n\n\t\t# initialisation de la pagination\n\t\t$iNumFilteredQuestions = $this->okt->faq->getQuestions($aFaqParams,true);\n\n\t\t$oFaqPager = new publicPager($this->okt->faq->filters->params->page, $iNumFilteredQuestions, $this->okt->faq->filters->params->nb_per_page);\n\n\t\t$iNumPages = $oFaqPager->getNbPages();\n\n\t\t$this->okt->faq->filters->normalizePage($iNumPages);\n\n\t\t$aFaqParams['limit'] = (($this->okt->faq->filters->params->page-1)*$this->okt->faq->filters->params->nb_per_page).','.$this->okt->faq->filters->params->nb_per_page;\n\n\t\t# récupération des questions\n\t\t$faqList = $this->okt->faq->getQuestions($aFaqParams);\n\n\t\t$count_line = 0;\n\t\twhile ($faqList->fetch())\n\t\t{\n\t\t\t$faqList->odd_even = ($count_line%2 == 0 ? 'even' : 'odd');\n\t\t\t$count_line++;\n\n\t\t\t$faqList->url = $faqList->getQuestionUrl();\n\n\t\t\tif (!$this->okt->faq->config->enable_rte) {\n\t\t\t\t$faqList->content = util::nlToP($faqList->content);\n\t\t\t}\n\n\t\t\tif ($this->okt->faq->config->public_truncat_char > 0 )\n\t\t\t{\n\t\t\t\t$faqList->content = html::clean($faqList->content);\n\t\t\t\t$faqList->content = text::cutString($faqList->content,$this->okt->faq->config->public_truncat_char);\n\t\t\t}\n\t\t}\n\t\tunset($count_line);\n\n\t\t# fil d'ariane\n\t\tif (!$this->isDefaultRoute(__CLASS__, __FUNCTION__)) {\n\t\t\t$this->okt->page->breadcrumb->add($this->okt->faq->getName(),$this->okt->faq->config->url);\n\t\t}\n\n\t\t# ajout du numéro de page au title\n\t\tif ($this->okt->faq->filters->params->page > 1) {\n\t\t\t$this->okt->page->addTitleTag(sprintf(__('c_c_Page_%s'), $this->okt->faq->filters->params->page));\n\t\t}\n\n\t\t# title tag du module\n\t\t$this->okt->page->addTitleTag($this->okt->faq->getTitle());\n\n\t\t# titre de la page\n\t\t$this->okt->page->setTitle($this->okt->faq->getName());\n\n\t\t# titre SEO de la page\n\t\t$this->okt->page->setTitleSeo($this->okt->faq->getNameSeo());\n\n\t\t# raccourcis\n\t\t$faqList->numPages = $iNumPages;\n\t\t$faqList->pager = $oFaqPager;\n\n\t\t# affichage du template\n\t\tif ($this->okt->faq->config->enable_categories) {\n\t\t\t$sTemplatename = 'faq_list_questions_with_categories_tpl';\n\t\t} else {\n\t\t\t$sTemplatename = 'faq_list_questions_tpl';\n\t\t}\n\n\t\techo $this->okt->tpl->render($sTemplatename, array(\n\t\t\t'faqList' => $faqList\n\t\t));\n\t}",
"function assignArticleList()\n {\n /* Some preparatory work will be necessary. */\n $sectionBean = new SectionBean (0, $this->_smarty, \"x\", \"x\");\n\n /* Get a hierarchical list of all sections. */\n $sectionBean->dbQuerySectionIdSetH(0, \"\", $sectionSet);\n\n $output = array();\n\n if (isset ($sectionSet))\n {\n foreach ($sectionSet as $key => $val)\n {\n $resultset = $this->dbQuery('SELECT id,title FROM article WHERE parent=' . $key . ' ORDER BY position,title');\n if (!empty ($resultset))\n {\n foreach ($resultset as $rkey => $rval)\n {\n $resultset[$rkey]['title'] = stripslashes($rval['title']);\n }\n\n $r['sid'] = $key;\n $r['sname'] = $val;\n $r['articles'] = $resultset;\n $output[] = $r;\n }\n }\n }\n\n $this->_smarty->assign('articleList', $output);\n }",
"function manage_article()\n\t{\n\t\t// Daten des Artikel rausholen\n\t\t$reporeid = $this->db->escape( $this->checked->easyid );\n\t\t$sql = sprintf( \"SELECT * FROM %s, %s WHERE reporeID='%d'\n\t\tAND reporeID=lan_repore_id\n\t\tAND lang_id='%d'\",\n\t\t\t$this->cms->tbname['papoo_repore'],\n\t\t\t$this->cms->tbname['papoo_language_article'],\n\t\t\t$reporeid,\n\t\t\t$this->cms->lang_id\n\t\t);\n\t\t$result = $this->db->get_results( $sql, ARRAY_A );\n\t\t// Inhalte mit nobr von brs befreien\n\t\tforeach( $result as $dat ) {\n\t\t\tforeach( $dat as $key => $value ) {\n\t\t\t\t$value = str_ireplace( \"\\.\\./image\", \"./image\", $value );\n\t\t\t\t$result['0'][$key] = \"nobr:\" . $value;\n\t\t\t}\n\t\t}\n\t\tif ($this->done!=\"ok\") {\n\t\t\t$this->content->template['easyc'] = $result;\n\t\t}\n\t\t// Biler liste raussuchen\n\t\t$this->get_bilder_liste();\n\t}",
"protected function actionNewsList() {\n $strReturn = \"\";\n //Load news using the correct filter\n if($this->getParam(\"filterid\") != \"\") {\n $strFilterId = $this->getParam(\"filterid\");\n }\n else {\n $strFilterId = $this->arrElementData[\"news_category\"];\n }\n\n //Load all posts\n $objArraySectionIterator = new class_array_section_iterator(class_module_news_news::getNewsCountPortal($this->arrElementData[\"news_mode\"], $strFilterId));\n $objArraySectionIterator->setIntElementsPerPage($this->arrElementData[\"news_amount\"]);\n $objArraySectionIterator->setPageNumber((int)($this->getParam(\"pv\") != \"\" ? $this->getParam(\"pv\") : 1));\n $objArraySectionIterator->setArraySection(class_module_news_news::loadListNewsPortal($this->arrElementData[\"news_mode\"], $strFilterId, $this->arrElementData[\"news_order\"], $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));\n\n $arrNews = $this->objToolkit->simplePager($objArraySectionIterator, $this->getLang(\"commons_next\"), $this->getLang(\"backward\"), \"\", $this->getPagename());\n\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_news/\" . $this->arrElementData[\"news_template\"], \"news_list\");\n $strTemplateImageID = $this->objTemplate->readTemplate(\"/module_news/\" . $this->arrElementData[\"news_template\"], \"news_list_image\");\n $strWrapperTemplateID = $this->objTemplate->readTemplate(\"/module_news/\" . $this->arrElementData[\"news_template\"], \"news_list_wrapper\");\n //Check rights\n if(count($arrNews[\"arrData\"]) > 0) {\n foreach($arrNews[\"arrData\"] as $objOneNews) {\n /** @var $objOneNews class_module_news_news */\n if($objOneNews instanceof class_module_news_news && $objOneNews->rightView()) {\n $strOneNews = \"\";\n $arrOneNews = array();\n //generate a link to the details\n $arrOneNews[\"news_more_link\"] = getLinkPortal($this->arrElementData[\"news_detailspage\"], \"\", \"\", $this->getLang(\"news_mehr\"), \"newsDetail\", \"\", $objOneNews->getSystemid(), \"\", \"\", $objOneNews->getStrTitle());\n $arrOneNews[\"news_more_link_href\"] = getLinkPortalHref($this->arrElementData[\"news_detailspage\"], \"\", \"newsDetail\", \"\", $objOneNews->getSystemid(), \"\", $objOneNews->getStrTitle());\n $arrOneNews[\"news_start_date\"] = dateToString($objOneNews->getObjStartDate(), false);\n $arrOneNews[\"news_id\"] = $objOneNews->getSystemid();\n $arrOneNews[\"news_title\"] = $objOneNews->getStrTitle();\n $arrOneNews[\"news_intro\"] = $objOneNews->getStrIntro();\n $arrOneNews[\"news_text\"] = $objOneNews->getStrText();\n\n //reset more link?\n if(uniStrlen(htmlStripTags($arrOneNews[\"news_text\"])) == 0) {\n $arrOneNews[\"news_more_link\"] = \"\";\n }\n\n\n $arrPAC = $this->loadPostacomments($objOneNews->getSystemid());\n if($arrPAC != null) {\n $arrOneNews[\"news_nrofcomments\"] = $arrPAC[\"nrOfComments\"];\n $arrOneNews[\"news_commentlist\"] = $arrPAC[\"commentList\"];\n }\n\n //load template section with or without image?\n if($objOneNews->getStrImage() != \"\") {\n $arrOneNews[\"news_image\"] = urlencode($objOneNews->getStrImage());\n $strOneNews .= $this->objTemplate->fillTemplate($arrOneNews, $strTemplateImageID);\n }\n else {\n $strOneNews .= $this->objTemplate->fillTemplate($arrOneNews, $strTemplateID);\n }\n\n //Add pe code\n $arrPeConfig = array(\n \"pe_module\" => \"news\",\n \"pe_action_edit\" => \"editNews\",\n \"pe_action_edit_params\" => \"&systemid=\" . $objOneNews->getSystemid(),\n \"pe_action_new\" => \"newNews\",\n \"pe_action_new_params\" => \"\",\n \"pe_action_delete\" => \"delete\",\n \"pe_action_delete_params\" => \"&systemid=\" . $objOneNews->getSystemid()\n );\n $strReturn .= class_element_portal::addPortalEditorCode($strOneNews, $objOneNews->getSystemid(), $arrPeConfig);\n }\n }\n $arrWrapperTemplate = array();\n $arrWrapperTemplate[\"news\"] = $strReturn;\n $arrWrapperTemplate[\"link_forward\"] = $arrNews[\"strForward\"];\n $arrWrapperTemplate[\"link_pages\"] = $arrNews[\"strPages\"];\n $arrWrapperTemplate[\"link_back\"] = $arrNews[\"strBack\"];\n $strReturn = $this->fillTemplate($arrWrapperTemplate, $strWrapperTemplateID);\n }\n else {\n $strReturn .= $this->getLang(\"news_list_empty\");\n }\n return $strReturn;\n }",
"function drawArticleList($blog);",
"function list_articles()\n{\n return list_all_data('articles');\n}",
"function sortLists($dbhost, $dbuser, $dbpass, $dbname, $dbport, $field, $sort) {\n\n // connect to the host:\n $connection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport);\n // exit the script with a useful message if there was an error:\n if (!$connection)\n {\n die(\"Connection failed: \" . $mysqli_connect_error);\n }\n\n // connect to our database:\n mysqli_select_db($connection, $dbname);\n // run query to get the contents of the LISTS table\n $query = \"SELECT id, name, username, updated FROM lists WHERE visible=true ORDER BY $field $sort\";\n // this query can return data ($result is an identifier):\n $result = mysqli_query($connection, $query);\n // how many rows came back?:\n $n = mysqli_num_rows($result);\n\n //format a table and layout\n echo \"<table>\";\n echo \"<tr><th><a href='lists.php?sortLists=name&sort={$sort}'>Name</a></th>\n <th><a href='lists.php?sortLists=username&sort={$sort}'>Owner</a></th>\n <th><a href='lists.php?sortLists=updated&sort={$sort}'>Updated</a></th></tr>\";\n\n if ($n>0) {\n\n for ($i = 0; $i < $n; $i++) {\n $row = mysqli_fetch_assoc($result);\n echo <<<_END\n <tr><td><a href=\"view_list.php?id={$row['id']}\">{$row['name']}</a></td><td>{$row['username']}</td><td>{$row['updated']}</td>\n_END;\n\n }\n // complete formatting\n echo \"</table>\";\n\n }\n\n else {\n echo \"No information found in users table\";\n }\n // we're finished with the database, close the connection:\n mysqli_close($connection);\n}",
"function show_ordner_bilder($pfad)\r\n\t{\r\n\t\t//Weiche\r\n\t\tif ($pfad == \"papoo_kategorie_bilder\") {\r\n\t\t\t$name = \"bilder_cat_name\";\r\n\t\t\t$catname = \"bilder_cat_name\";\r\n\t\t\t$catid = \"bilder_cat_id\";\r\n\t\t\t$catid_lookup = \"bilder_cat_id_id\";\r\n\t\t\t$lookup_name = \"papoo_lookup_cat_images\";\r\n\t\t\t$cattgruppe = \"gruppeid_id\";\r\n\t\t\t$level=\"image_sub_cat_level\";\r\n\t\t\t$sub_cat_von=\"image_sub_cat_von\";\r\n\t\t\t$order_by=\" ORDER BY bilder_cat_name ASC \";\r\n\t\t}\r\n\t\tif ($pfad == \"papoo_kategorie_dateien\") {\r\n\t\t\t$name = \"dateien_cat_name\";\r\n\t\t\t$catname = \"dateien_cat_name\";\r\n\t\t\t$catid = \"dateien_cat_id\";\r\n\t\t\t$catid_lookup = \"dateien_cat_id_id\";\r\n\t\t\t$lookup_name = \"papoo_lookup_cat_dateien\";\r\n\t\t\t$cattgruppe = \"gruppeid_id\";\r\n\t\t\t$level=\"dateien_sub_cat_level\";\r\n\t\t\t$sub_cat_von=\"dateien_sub_cat_von\";\r\n\t\t\t$order_by=\" ORDER BY dateien_cat_name ASC \";\r\n\t\t}\r\n\r\n\t\tif ($pfad == \"papoo_kategorie_video\") {\r\n\t\t\t$name = \"video_cat_name\";\r\n\t\t\t$catname = \"video_cat_name\";\r\n\t\t\t$catid = \"video_cat_id\";\r\n\t\t\t$catid_lookup = \"video_cat_id_id\";\r\n\t\t\t$lookup_name = \"papoo_lookup_cat_video\";\r\n\t\t\t$cattgruppe = \"gruppeid_id\";\r\n\t\t\t$level=\"video_sub_cat_level\";\r\n\t\t\t$sub_cat_von=\"video_sub_cat_von\";\r\n\t\t\t$order_by=\" ORDER BY video_cat_name ASC \";\r\n\t\t}\r\n\r\n\t\t//Wenn ändern\r\n\t\tif (!empty ($this->checked->submit)) {\r\n\r\n\t\t\tif ($this->checked->image_sub_cat_von!=$this->checked->catid) {\r\n\t\t\t\t//Level der ausgewählten KAtegorie rausholen\r\n\t\t\t\t$sql = sprintf(\"SELECT %s FROM %s WHERE %s='%s'\",\r\n\t\t\t\t\t$level,\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$catid,\r\n\t\t\t\t\t$this->db->escape($this->checked->image_sub_cat_von)\r\n\t\t\t\t);\r\n\t\t\t\t$result_level = $this->db->get_var($sql);\r\n\r\n\t\t\t\tif (!empty($result_level)) {\r\n\t\t\t\t\t$result_level=$result_level+1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (!empty($this->checked->image_sub_cat_von)) {\r\n\t\t\t\t\t\t$result_level=$result_level+1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Daten ändern\r\n\t\t\t\t$sql = sprintf(\"UPDATE %s SET \r\n\t\t\t\t\t\t\t\t\t\t%s='%s', \r\n\t\t\t\t\t\t\t\t\t\t%s='%s',\r\n\t\t\t\t\t\t\t\t\t\t%s='%s' \r\n\t\t\t\t\t\t\t\t\t\tWHERE %s='%s'\",\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$name,\r\n\t\t\t\t\t$this->db->escape($this->checked->dir),\r\n\t\t\t\t\t$sub_cat_von,\r\n\t\t\t\t\t$this->db->escape($this->checked->image_sub_cat_von),\r\n\t\t\t\t\t$level,\r\n\t\t\t\t\t$result_level,\r\n\t\t\t\t\t$catid,\r\n\t\t\t\t\t$this->db->escape($this->checked->catid)\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\t$insertid = $this->db->escape($this->checked->catid);\r\n\r\n\t\t\t\t$sql = sprintf(\"DELETE FROM %s WHERE %s='%s'\",\r\n\t\t\t\t\t$this->cms->tbname[$lookup_name],\r\n\t\t\t\t\t$catid_lookup,\r\n\t\t\t\t\t$insertid\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\tif (!empty ($this->checked->inhalt_ar)) {\r\n\t\t\t\t\tforeach ($this->checked->inhalt_ar['gruppe_write'] as $insert) {\r\n\t\t\t\t\t\t$insert=$this->db->escape($insert);\r\n\r\n\t\t\t\t\t\t$sqlin = \"INSERT INTO \" . $this->cms->tbname[$lookup_name] .\r\n\t\t\t\t\t\t\t\" SET $catid_lookup='$insertid', \r\n\t\t\t\t\t\t\t\t\tgruppeid_id='$insert' \r\n\t\t\t\t\t\t\t\t\t\";\r\n\t\t\t\t\t\t$this->db->query($sqlin);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sqlin = \"INSERT INTO \" . $this->cms->tbname[$lookup_name] .\r\n\t\t\t\t\t\" SET $catid_lookup='$insertid', gruppeid_id='1' \";\r\n\t\t\t\t$this->db->query($sqlin);\r\n\r\n\t\t\t\t//Jetzt nochmal einen Reset durchführen der Ebenen\r\n\r\n\t\t\t\t$sql = sprintf(\"\tSELECT * FROM %s ORDER BY %s,%s ASC\",\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$sub_cat_von,\r\n\t\t\t\t\t$level\r\n\t\t\t\t);\r\n\t\t\t\t$results = $this->db->get_results($sql,ARRAY_A);\r\n\t\t\t\t$max=20;\r\n\t\t\t\tif (is_array($results)) {\r\n\t\t\t\t\tfor ($i=0;$i<$max;$i++) {\r\n\t\t\t\t\t\tforeach ($results as $key=>$value) {\r\n\t\t\t\t\t\t\tforeach ($results as $key1=>$value1) {\r\n\t\t\t\t\t\t\t\tif ($value1[$sub_cat_von]==$value[$catid]) {\r\n\t\t\t\t\t\t\t\t\t$neu[$value1[$catid]]=$value1;\r\n\t\t\t\t\t\t\t\t\t$neu[$value1[$catid]][$level]=$value[$level]+1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tIfNotSetNull($neu);\r\n\t\t\t\tif (is_array($neu)) {\r\n\t\t\t\t\tforeach ($neu as $key=>$value) {\r\n\t\t\t\t\t\tif ($value[$sub_cat_von]>0 ) {\r\n\t\t\t\t\t\t\t$level_nr=$value[$level];\r\n\t\t\t\t\t\t\t$sql=sprintf(\"\tUPDATE %s SET \r\n\t\t\t\t\t\t\t\t\t\t\t%s='%s' \r\n\t\t\t\t\t\t\t\t\t\t\tWHERE %s='%s'\",\r\n\t\t\t\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t\t\t\t$level,\r\n\t\t\t\t\t\t\t\t$level_nr,\r\n\t\t\t\t\t\t\t\t$catid,\r\n\t\t\t\t\t\t\t\t$key\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$this->db->query($sql);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sql=sprintf(\"\tUPDATE %s SET \r\n\t\t\t\t\t\t\t\t\t\t\t%s='0' \r\n\t\t\t\t\t\t\t\t\t\t\tWHERE %s='0'\",\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$level,\r\n\t\t\t\t\t$sub_cat_von\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->query($sql);\r\n\t\t\t}\r\n\r\n\t\t\t// FIXME: Eigentlich nicht gesetzt, was war hier die Verwendung?\r\n\t\t\tIfNotSetNull($menuidid);\r\n\r\n\t\t\t$location_url = \"./ordner.php?menuid=\" . $this->checked->menuid . \"&messageget=\" . $menuidid;\r\n\r\n\t\t\tif ($_SESSION['debug_stopallredirect']) {\r\n\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\theader(\"Location: $location_url\");\r\n\t\t\t}\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\tif (!empty ($this->checked->dirchange)) {\r\n\t\t\t//Daten rausholen\r\n\t\t\t$sql = sprintf(\"SELECT * FROM %s WHERE %s='%s'\",\r\n\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t$catid,\r\n\t\t\t\t$this->db->escape($this->checked->dirchange)\r\n\t\t\t);\r\n\r\n\t\t\t$result = $this->db->get_results($sql, ARRAY_N);\r\n\r\n\t\t\t$this->content->template['catname'] = \"nodecode:\".$this->diverse->encode_quote($result['0']['1']);\r\n\t\t\t$this->content->template['catid'] = $result['0']['0'];\r\n\t\t\t$this->content->template['cat_sub'] = $result['0']['3'];\r\n\r\n\t\t\t//Daten aus Lookup\r\n\t\t\t$sql = sprintf(\"SELECT %s FROM %s WHERE %s='%s'\",\r\n\t\t\t\t$cattgruppe,\r\n\t\t\t\t$this->cms->tbname[$lookup_name],\r\n\t\t\t\t$catid_lookup,\r\n\t\t\t\t$this->db->escape($this->checked->dirchange)\r\n\t\t\t);\r\n\t\t\t$this->result_gr = $this->db->get_results($sql, ARRAY_N);\r\n\r\n\t\t\t//edit\r\n\t\t\t$this->content->template['edit'] = \"edit\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (!empty ($this->checked->dir)) {\r\n\t\t\t\tif (empty ($this->checked->loeschen)) {\r\n\t\t\t\t\t//Level der ausgewählten KAtegorie rausholen\r\n\t\t\t\t\t$sql = sprintf(\"SELECT %s FROM %s WHERE %s='%s'\",\r\n\t\t\t\t\t\t$level,\r\n\t\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t\t$catid,\r\n\t\t\t\t\t\t$this->db->escape($this->checked->image_sub_cat_von)\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$result_level = $this->db->get_var($sql);\r\n\r\n\t\t\t\t\tif (!empty($result_level)) {\r\n\t\t\t\t\t\t$result_level=$result_level+1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif (!empty($this->checked->image_sub_cat_von)) {\r\n\t\t\t\t\t\t\t$result_level=$result_level+1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Wenn neu anlegen, eingeben\r\n\t\t\t\t\t$sql = sprintf(\"INSERT INTO %s SET %s='%s', \r\n\t\t\t\t\t\t\t\t\t%s='%s',\r\n\t\t\t\t\t\t\t\t\t%s='%s'\",\r\n\t\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t\t$name,\r\n\t\t\t\t\t\t$this->db->escape($this->checked->dir),\r\n\t\t\t\t\t\t$sub_cat_von,\r\n\t\t\t\t\t\t$this->db->escape($this->checked->image_sub_cat_von),\r\n\t\t\t\t\t\t$level,\r\n\t\t\t\t\t\t$result_level\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\t\t$insertid = $this->db->insert_id;\r\n\r\n\t\t\t\t\tif (!empty ($this->checked->inhalt_ar)) {\r\n\t\t\t\t\t\tforeach ($this->checked->inhalt_ar['gruppe_write'] as $insert) {\r\n\t\t\t\t\t\t\t$insert=$this->db->escape($insert);\r\n\r\n\t\t\t\t\t\t\t$sqlin = \"INSERT INTO \" . $this->cms->tbname[$lookup_name] .\r\n\t\t\t\t\t\t\t\t\" SET $catid_lookup='$insertid', gruppeid_id='$insert' \";\r\n\t\t\t\t\t\t\t$this->db->query($sqlin);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sqlin = \"INSERT INTO \" . $this->cms->tbname[$lookup_name] .\r\n\t\t\t\t\t\t\" SET $catid_lookup='$insertid', gruppeid_id='1' \";\r\n\t\t\t\t\t$this->db->query($sqlin);\r\n\r\n\t\t\t\t\t// FIXME: Eigentlich nicht gesetzt, was war hier die Verwendung?\r\n\t\t\t\t\tIfNotSetNull($menuidid);\r\n\r\n\t\t\t\t\t$location_url = \"./ordner.php?menuid=\" . $this->checked->menuid . \"&messageget=\" . $menuidid;\r\n\r\n\t\t\t\t\tif ($_SESSION['debug_stopallredirect']) {\r\n\t\t\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theader(\"Location: $location_url\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Wenn geändert, eingeben\r\n\t\t}\r\n\t\t//Soll gelöscht werden\r\n\t\tif (!empty ($this->checked->submitdelecht)) {\r\n\t\t\tif ($this->checked->catid >= 1) {\r\n\t\t\t\t//Eintrag nach id löschen und neu laden\r\n\t\t\t\t$sql = sprintf(\"DELETE FROM %s WHERE %s='%s'\",\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$catid,\r\n\t\t\t\t\t$this->db->escape($this->checked->catid)\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\t$insertid = $this->db->escape($this->checked->catid);\r\n\r\n\t\t\t\t$sql = sprintf(\"UPDATE %s \r\n\t\t\t\t\t\t\t\tSET \r\n\t\t\t\t\t\t\t\t%s='0',\r\n\t\t\t\t\t\t\t\t%s='0'\r\n\t\t\t\t\t\t\t\tWHERE %s='%s'\",\r\n\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t$sub_cat_von,\r\n\t\t\t\t\t$level,\r\n\t\t\t\t\t$sub_cat_von,\r\n\t\t\t\t\t$insertid\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\t$insertid = $this->db->escape($this->checked->catid);\r\n\r\n\t\t\t\t//Alle Sprachen linkliste_descrip\r\n\t\t\t\t$sql = sprintf(\"DELETE FROM %s WHERE %s='%s'\",\r\n\t\t\t\t\t$this->cms->tbname[$lookup_name],\r\n\t\t\t\t\t$catid_lookup,\r\n\t\t\t\t\t$insertid\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t\tif ($pfad == \"papoo_kategorie_bilder\") {\r\n\t\t\t\t\t//Bei den Bildern löschen\r\n\t\t\t\t\t$sql = sprintf(\"UPDATE %s SET image_dir='0' \r\n\t\t\t\t\t\t\t\t\tWHERE image_dir='%s'\",\r\n\t\t\t\t\t\t$this->cms->tbname['papoo_images'],\r\n\t\t\t\t\t\t$insertid\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$this->db->query($sql);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($pfad == \"papoo_kategorie_dateien\") {\r\n\t\t\t\t\t//Bei den Dateien löschen\r\n\t\t\t\t\t$sql = sprintf(\"UPDATE %s SET downloadkategorie='0' \r\n\t\t\t\t\t\t\t\t\tWHERE downloadkategorie='%s'\",\r\n\t\t\t\t\t\t$this->cms->tbname['papoo_download'],\r\n\t\t\t\t\t\t$insertid\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$this->db->query($sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Jetzt nochmal einen Reset durchführen der Ebenen\r\n\t\t\t$sql = sprintf(\"\tSELECT * FROM %s ORDER BY %s,%s ASC\",\r\n\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t$sub_cat_von,\r\n\t\t\t\t$level\r\n\t\t\t);\r\n\t\t\t$results = $this->db->get_results($sql,ARRAY_A);\r\n\t\t\t$max=20;\r\n\t\t\tif (is_array($results)) {\r\n\t\t\t\tfor ($i=0;$i<$max;$i++) {\r\n\t\t\t\t\tforeach ($results as $key=>$value) {\r\n\t\t\t\t\t\tforeach ($results as $key1=>$value1) {\r\n\t\t\t\t\t\t\tif ($value1[$sub_cat_von]==$value[$catid]) {\r\n\t\t\t\t\t\t\t\t$neu[$value1[$catid]]=$value1;\r\n\t\t\t\t\t\t\t\t$neu[$value1[$catid]][$level]=$value[$level]+1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tIfNotSetNull($neu);\r\n\t\t\tif (is_array($neu)) {\r\n\t\t\t\tforeach ($neu as $key=>$value) {\r\n\t\t\t\t\tif ($value[$sub_cat_von]>0 ) {\r\n\t\t\t\t\t\t$level_nr=$value[$level];\r\n\t\t\t\t\t\t$sql=sprintf(\"\tUPDATE %s SET \r\n\t\t\t\t\t\t\t\t\t\t%s='%s' \r\n\t\t\t\t\t\t\t\t\t\tWHERE %s='%s'\",\r\n\t\t\t\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t\t\t\t$level,\r\n\t\t\t\t\t\t\t$level_nr,\r\n\t\t\t\t\t\t\t$catid,\r\n\t\t\t\t\t\t\t$key\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$this->db->query($sql);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$sql=sprintf(\"\tUPDATE %s SET \r\n\t\t\t\t\t\t\t\t\t\t%s='0' \r\n\t\t\t\t\t\t\t\t\t\tWHERE %s='0'\",\r\n\t\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t\t$level,\r\n\t\t\t\t$sub_cat_von\r\n\t\t\t);\r\n\t\t\t$this->db->query($sql);\r\n\r\n\t\t\t$location_url = $_SERVER['PHP_SELF'] . \"?menuid=\" . $this->checked->menuid . \"&template=\" . $this->checked->template . \"&fertig=del\";\r\n\t\t\tif ($_SESSION['debug_stopallredirect']) {\r\n\t\t\t\techo '<a href=\"' . $location_url . '\">Weiter</a>';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\theader(\"Location: $location_url\");\r\n\t\t\t}\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//Soll wirklich gelöscht werden?\r\n\t\tif (!empty ($this->checked->loeschen)) {\r\n\t\t\t// Wird der Name geändert und Löschen ausgeführt, erscheint der falsche Name in der Abfrage,\r\n\t\t\t// ob wirklich gelöscht werden soll. Dies täuscht das Löschen der angegebenen Kategorie vor.\r\n\t\t\t//$this->content->template['dir'] = $this->checked->dir;\r\n\t\t\tIfNotSetNull($this->checked->catname_save);\r\n\t\t\tIfNotSetNull($this->checked->catid);\r\n\t\t\t$this->content->template['dir'] = $this->checked->catname_save;\r\n\t\t\t$this->content->template['catid'] = $this->checked->catid;\r\n\t\t\t$this->content->template['fragedel'] = \"ok\";\r\n\t\t\t$this->content->template['edit'] = \"\";\r\n\t\t}\r\n\t\t//Gruppenliste\r\n\t\t$this->hol_gruppen_liste();\r\n\r\n\t\t//Liste der Kategorien rausholen und anzeigen\r\n\t\t$sql = sprintf(\"SELECT * FROM %s %s\",\r\n\t\t\t$this->cms->tbname[$pfad],\r\n\t\t\t$order_by\r\n\t\t);\r\n\t\t$result = $this->db->get_results($sql, ARRAY_A);\r\n\r\n\t\tif (is_array($result)) {\r\n\t\t\t$ik=0;\r\n\t\t\tforeach ($result as $key=>$value) {\r\n\t\t\t\t$result[$ik]['cat_id']=$value[$catid];\r\n\t\t\t\t$result[$ik]['sub_cat_von']=$value[$sub_cat_von];\r\n\t\t\t\t$result[$ik]['sub_cat_level']=$value[$level];\r\n\r\n\t\t\t\t$result[$ik]['dateien_cat_name'] = !isset($result[$ik]['dateien_cat_name']) ? \"\": $result[$ik]['dateien_cat_name'];\r\n\t\t\t\t$result[$ik]['video_cat_name'] = !isset($result[$ik]['video_cat_name']) ? \"\": $result[$ik]['video_cat_name'];\r\n\t\t\t\t$result[$ik]['bilder_cat_name'] = !isset($result[$ik]['bilder_cat_name']) ? \"\": $result[$ik]['bilder_cat_name'];\r\n\t\t\t\t$ik++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t#$this->checked->xcat_id=$this->checked->dirchange;\r\n\t\t//Nested Klasse einbinden\r\n\t\trequire_once(\"make_nested_class.php\");\r\n\t\t$nested=new make_nested();\r\n\t\t//Nested Array erzeugen\r\n\t\tIfNotSetNull($this->checked->dirchange);\r\n\t\t$result = $nested->create_nested_array($result,\"NO\",$this->checked->dirchange);\r\n\t\t$result = is_array($result) ? $result : array();\r\n\t\t//HTML Liste erzeugen\r\n\t\t$result=$nested->create_nested_list_from_array($result,\"ul\");\r\n\r\n\t\t$this->content->template['dirlist'] = $result;\r\n\r\n\t\t$this->content->template['xlink'] = \"ordner.php?menuid=\" . $this->checked->menuid;\r\n\t}",
"function ShowArticlesByPages()\n {\n $this->PageUser->h1 = $this->multi['TXT_ARTICLE_TITLE'];\n $this->PageUser->breadcrumb = '';\n\n $articles = $this->GetArticlesRows('limit');\n\n $pages = '';\n if (count($articles) > 0) {\n $n_rows = $this->GetArticlesRows('nolimit');\n $link = $this->Link($this->category, NULL);\n $pages = $this->Form->WriteLinkPagesStatic($link, $n_rows, $this->display, $this->start, $this->sort, $this->page);\n }\n\n echo View::factory('/modules/mod_article/templates/tpl_article_by_pages.php')\n ->bind('articles', $articles)\n ->bind('multi', $this->multi)\n ->bind('pages', $pages);\n }",
"public function articleListAction()\n {\n $blogRepository = $this->getDoctrine()->getRepository('BlogBundle:Blog');\n $articles = $blogRepository->findBy([], ['created_at' => 'DESC']);\n\n return $this->render('BlogBundle:Blog:articleList.html.twig', [\n 'articles' => $articles,\n ]);\n }",
"public static function getList(&$params)\n {\n // Get an instance of the generic articles model\n $articles = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));\n\n // Set application parameters in model\n $app = JFactory::getApplication();\n $contentParams = JComponentHelper::getParams('com_content');\n // Load the parameters.\n if(!$app->isAdmin()){\n $contentParams = $app->getParams();\n }\n \n $articles->setState('params', $contentParams);\n\n // Set the filters based on the module params\n $articles->setState('list.start', 0);\n $articles->setState('list.limit', (int) $params->get('count', 0));\n $articles->setState('filter.published', 1);\n $articles->setState('filter.category_id', 0);\n\n // Access filter\n $access = !$contentParams->get('show_noauth');\n $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id'));\n $articles->setState('filter.access', $access);\n\n $catids = (array) $params->get('category');\n $articles->setState('filter.category_id.include', (bool) $params->get('category_filtering_type', 1));\n\n // Category filter\n if ($catids)\n {\n if ($params->get('show_child_category_articles', 0) && (int) $params->get('category_depth', 999) > 0)\n {\n // Get an instance of the generic categories model\n $categories = JModelLegacy::getInstance('Categories', 'ContentModel', array('ignore_request' => true));\n $categories->setState('params', $contentParams);\n $levels = $params->get('category_depth', 999) ? $params->get('category_depth', 999) : 9999;\n $categories->setState('filter.get_children', $levels);\n $categories->setState('filter.published', 1);\n $categories->setState('filter.access', $access);\n $additional_catids = array();\n\n foreach ($catids as $catid)\n {\n $categories->setState('filter.parentId', $catid);\n $recursive = true;\n $items = $categories->getItems($recursive);\n\n if ($items)\n {\n foreach ($items as $category)\n {\n $condition = (($category->level - $categories->getParent()->level) <= $levels);\n\n if ($condition)\n {\n $additional_catids[] = $category->id;\n }\n }\n }\n }\n\n $catids = array_unique(array_merge($catids, $additional_catids));\n }\n\n $articles->setState('filter.category_id', $catids);\n }\n\n // Ordering\n $articles->setState('list.ordering', $params->get('article_ordering', 'a.ordering'));\n $articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC'));\n\n // New Parameters\n $articles->setState('filter.featured', $params->get('show_featured', 'show'));\n\n // Filter by language\n if(!$app->isAdmin()){\n $articles->setState('filter.language', $app->getLanguageFilter());\n }\n $items = $articles->getItems();\n\n // Display options\n $show_date = $params->get('show_date', 0);\n $show_date_field = $params->get('show_date_field', 'created');\n $show_date_format = $params->get('show_date_format', 'Y-m-d H:i:s');\n $show_category = $params->get('show_category', 0);\n $show_hits = $params->get('show_hits', 0);\n $show_author = $params->get('show_author', 0);\n $show_introtext = $params->get('show_introtext', 0);\n $introtext_limit = $params->get('introtext_limit', 100);\n\n // Find current Article ID if on an article page\n $option = $app->input->get('option');\n $view = $app->input->get('view');\n\n if ($option === 'com_content' && $view === 'article')\n {\n $active_article_id = $app->input->getInt('id');\n }\n else\n {\n $active_article_id = 0;\n }\n\n // Prepare data for display using display options\n foreach ($items as &$item)\n {\n $item->slug = $item->id . ':' . $item->alias;\n $item->catslug = $item->catid . ':' . $item->category_alias;\n\n if ($access || in_array($item->access, $authorised))\n {\n // We know that user has the privilege to view the article\n $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));\n }\n else\n {\n $app = JFactory::getApplication();\n $menu = $app->getMenu();\n $menuitems = $menu->getItems('link', 'index.php?option=com_users&view=login');\n\n if (isset($menuitems[0]))\n {\n $Itemid = $menuitems[0]->id;\n }\n elseif ($app->input->getInt('Itemid') > 0)\n {\n // Use Itemid from requesting page only if there is no existing menu\n $Itemid = $app->input->getInt('Itemid');\n }\n\n $item->link = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $Itemid);\n }\n\n // Used for styling the active article\n $item->active = $item->id == $active_article_id ? 'active' : '';\n $item->displayDate = '';\n\n if ($show_date)\n {\n $item->displayDate = JHtml::_('date', $item->$show_date_field, $show_date_format);\n }\n\n if ($item->catid)\n {\n $item->displayCategoryLink = JRoute::_(ContentHelperRoute::getCategoryRoute($item->catid));\n $item->displayCategoryTitle = $show_category ? '<a href=\"' . $item->displayCategoryLink . '\">' . $item->category_title . '</a>' : '';\n }\n else\n {\n $item->displayCategoryTitle = $show_category ? $item->category_title : '';\n }\n\n $item->displayHits = $show_hits ? $item->hits : '';\n $item->displayAuthorName = $show_author ? $item->author : '';\n\n if ($show_introtext)\n {\n $item->introtext = JHtml::_('content.prepare', $item->introtext);\n $item->introtext = self::_cleanIntrotext($item->introtext);\n }\n\n $item->displayIntrotext = $show_introtext ? self::truncate($item->introtext, $introtext_limit) : '';\n $item->displayReadmore = $item->alternative_readmore;\n }\n\n return $items;\n }",
"protected function listDefaultAction() {\n\n\t\t// hide columns from configuration\n\t\tforeach(t3lib_div::trimExplode(',', $this->getCurrentListObject()->get_hideColumns(), 1) as $columnIdentifier) {\n\t\t\t$this->getCurrentListObject()->getAllColumnDescriptions()->getItemById($columnIdentifier)->set_hidden(true);\n\t\t}\n\n\t\t// hide columns from filters\n\t\tforeach($this->getCurrentListObject()->getAllFilters() as $filter) { /* @var $filter tx_ptlist_filter */\n\t\t\tif ($filter->get_isActive()) {\n\t\t\t\tforeach(t3lib_div::trimExplode(',', $filter->get_hideColumns(), 1) as $columnIdentifier) {\n\t\t\t\t\t$this->getCurrentListObject()->getAllColumnDescriptions()->getItemById($columnIdentifier)->set_hidden(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// create view\n\t\t$view = $this->getView('list_itemList');\n\t\t$view->addItem($this->getCurrentListObject()->getListId(), 'listIdentifier');\n\t\t$view->addItem($this->getCurrentListObject()->getAllColumnDescriptions(true)->removeHiddenColumns()->getMarkerArray(), 'columns', false); // do not filter HTML here since the column headers could already contain HTML rendered by Typoscript\n\t\t$view->addItem($this->getColumnContents(), 'listItems', false); // do not filter HTML here since the column contents may already be rendered as HTML (e.g. from Typoscript wraps) and the database data is already HTML filtered (see getColumnContents())\n\n\t\t// inline filters\n\t\t$view->addItem($this->getCurrentListObject()->getAllFilters(true, 'renderInList', true)->getMarkerArray(), 'filterbox', false);\n\n\t\t// inline pager\n\t\tif ($this->conf['inlinePager']) {\n\t\t\t$view->addItem($this->doAction('pagerDefault'), 'pager', false);\n\t\t\t$view->addItem($this->pager->getMarkerArray(), 'pagerData');\n\t\t}\n\n\t\t// aggregates\n\t\t$view->addItem($this->getAggregateRows(), 'aggregateRows', false);\n\n\t\t// (added by rk 28.08.09) # TODO: Replace this by a translation mechanism\n\t\t$view->addItem($this->getCurrentListObject()->get_noElementsFoundText(), 'noElementsFoundText', false); // do not filter HTML here since the display text may already be formatted as HTML (e.g. from Typoscript configuration)\n\n\t\t$appendToSortingUrl = '';\n\t\tif ($this->conf['appendFilterValuesToUrls']) {\n\t\t\t$appendToSortingUrl = $this->getCurrentListObject()->getCompleteListStateAsUrlParameters(true);\n\t\t}\n\t\t$view->addItem($appendToSortingUrl, 'appendToSortingUrl', false);\n\n\n\t\t// render\n\t\treturn $view->render();\n\t}",
"function make_one_article_list($my_articlelist) {\n echo \"<ul>\";\n echo \"<li><a href='\" . $my_articlelist[linkTo] . \"'> <h2>$my_articlelist[title]</h2> </a></li>\";\n echo \"<li><img src='\" . $my_articlelist[img] . \"' alt='\" . $my_articlelist[title] . \" Poster'></li>\";\n echo \"<li>$my_articlelist[previewText]</li>\"; \n echo \"</ul\";\n }",
"function show_list ()\n\t{\n\t\techo \"<ol>\\n\";\n\t\tforeach ($this->items as $item)\n\t\t{\n\t\t\techo \"<li>\", $this->show_item( $item );\n\t\t}\n\t\techo \"</ol>\";\n\t}",
"function getEntryList($filter = array(), $sorting = \"Ascending\") {\n\t\t//ngay tao = new: ngay tao cach khoang vai ngay so voi ngay hien tai\n\t\t//filter array: (\"Filter\"=>\"Criteria\",\"Filter\"=>\"Criteria\")\n\t\t//For example: (\"A\"=>\"ABC\") or (\"Action\"=>\"Category\")\n\t\t//Sorting (\"Ascending\"/\"Descending\"=>\"Criteria\"), for ex: (\"Ascending\"=>\"ABC\")\n\t\t// readfile(\"././views/list_novel.php\");\n\t\t$model = new NovelModel;\n\t\t$res = $model->getEntryList($filter);\n\t\treadfile(\"././views/part1.php\");\n\t\tforeach ($res as $row) {\n\t\t\t$name = $row['ten'];\n\t\t\t$link = $this->makeLink($row['id']);\n\t\t\techo '<tr><td><a class=\"alink\" href=\"/enovel/novel/'.$link.'\">'.$name.'</a></td>';\n\t\t\techo '<td>Chapter 1</td>';\n\t\t\techo \"<td>31/12/2017</td>\";\n\t\t\t$res = $model->getViewCount($row[\"id\"]);\n\t\t\techo '<td class=\"text-center\">'.$res.'</td></tr>';\n\t\t}\n\t\treadfile(\"././views/part2.php\");\n\t\t// if($filter[\"filter\"]=\"yes\"){\n\t\t// \t//Vi filter chua lam xong nen controller tu get data.\n\t\t// }\n\t}",
"function printNestedItemsList($listtype='cats-sortablelist',$articleid='',$option='') {\n\tglobal $_zp_zenpage;\n\tswitch($listtype) {\n\t\tcase 'cats-checkboxlist':\n\t\tdefault:\n\t\t\t$ulclass = \"\";\n\t\t\tbreak;\n\t\tcase 'cats-sortablelist':\n\t\tcase 'pages-sortablelist':\n\t\t\t$ulclass = \" class=\\\"page-list\\\"\";\n\t\t\tbreak;\n\t}\n\tswitch($listtype) {\n\t\tcase 'cats-checkboxlist':\n\t\tcase 'cats-sortablelist':\n\t\t\t$items = $_zp_zenpage->getAllCategories(false);\n\t\t\tbreak;\n\t\tcase 'pages-sortablelist':\n\t\t\t$items = $_zp_zenpage->getPages(false);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$items = array();\n\t\t\tbreak;\n\t}\n\t$indent = 1;\n\t$open = array(1=>0);\n\t$rslt = false;\n\tforeach ($items as $item) {\n\t\tswitch($listtype) {\n\t\t\tcase 'cats-checkboxlist':\n\t\t\tcase 'cats-sortablelist':\n\t\t\t\t$itemobj = new ZenpageCategory($item['titlelink']);\n\t\t\t\t$ismypage = $itemobj->isMyItem(ZENPAGE_NEWS_RIGHTS);\n\t\t\t\tbreak;\n\t\t\tcase 'pages-sortablelist':\n\t\t\t\t$itemobj = new ZenpagePage($item['titlelink']);\n\t\t\t\t$ismypage = $itemobj->isMyItem(ZENPAGE_PAGES_RIGHTS);\n\t\t\t\tbreak;\n\t\t}\n\t\t$itemsortorder = $itemobj->getSortOrder();\n\t\t$itemid = $itemobj->getID();\n\t\tif($ismypage) {\n\t\t\t$order = explode('-', $itemsortorder);\n\t\t\t$level = max(1,count($order));\n\t\t\tif ($toodeep = $level>1 && $order[$level-1] === '') {\n\t\t\t\t$rslt = true;\n\t\t\t}\n\t\t\tif ($level > $indent) {\n\t\t\t\techo \"\\n\".str_pad(\"\\t\",$indent,\"\\t\").\"<ul\".$ulclass.\">\\n\";\n\t\t\t\t$indent++;\n\t\t\t\t$open[$indent] = 0;\n\t\t\t} else if ($level < $indent) {\n\t\t\t\twhile ($indent > $level) {\n\t\t\t\t\t$open[$indent]--;\n\t\t\t\t\t$indent--;\n\t\t\t\t\techo \"</li>\\n\".str_pad(\"\\t\",$indent,\"\\t\").\"</ul>\\n\";\n\t\t\t\t}\n\t\t\t} else { // indent == level\n\t\t\t\tif ($open[$indent]) {\n\t\t\t\t\techo str_pad(\"\\t\",$indent,\"\\t\").\"</li>\\n\";\n\t\t\t\t\t$open[$indent]--;\n\t\t\t\t} else {\n\t\t\t\t\techo \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($open[$indent]) {\n\t\t\t\techo str_pad(\"\\t\",$indent,\"\\t\").\"</li>\\n\";\n\t\t\t\t$open[$indent]--;\n\t\t\t}\n\t\t\tswitch($listtype) {\n\t\t\t\tcase 'cats-checkboxlist':\n\t\t\t\t\techo \"<li>\\n\";\n\t\t\t\t\tprintCategoryCheckboxListEntry($itemobj,$articleid,$option);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'cats-sortablelist':\n\t\t\t\t\techo str_pad(\"\\t\",$indent-1,\"\\t\").\"<li id=\\\"id_\".$itemid.\"\\\" class=\\\"clear-element page-item1 left\\\">\";\n\t\t\t\t\tprintCategoryListSortableTable($itemobj,$toodeep);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pages-sortablelist':\n\t\t\t\t\techo str_pad(\"\\t\",$indent-1,\"\\t\").\"<li id=\\\"id_\".$itemid.\"\\\">\";\n\t\t\t\t\tprintPagesListTable($itemobj, $toodeep);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$open[$indent]++;\n\t\t}\n\t}\n\twhile ($indent > 1) {\n\t\techo \"</li>\\n\";\n\t\t$open[$indent]--;\n\t\t$indent--;\n\t\techo str_pad(\"\\t\",$indent,\"\\t\").\"</ul>\";\n\t}\n\tif ($open[$indent]) {\n\t\techo \"</li>\\n\";\n\t} else {\n\t\techo \"\\n\";\n\t}\n\treturn $rslt;\n}",
"function get_forum_display_sort_option($selected_row=0, $action='list', $list='sort')\n{\n\tglobal $lang;\n\n\t$forum_display_sort = array(\n\t\t'lang_key'\t=> array('Last_Post', 'Sort_Topic_Title', 'Sort_Time', 'Sort_Author'),\n\t\t'fields'\t=> array('t.topic_last_post_id', 't.topic_title', 't.topic_time', 'u.username'),\n\t);\n\t$forum_display_order = array(\n\t\t'lang_key'\t=> array('Sort_Descending', 'Sort_Ascending'),\n\t\t'fields'\t=> array('DESC', 'ASC'),\n\t);\n\n\t// get the good list\n\t$list_name = 'forum_display_' . $list;\n\t$listrow = $$list_name;\n\n\t// init the result\n\t$res = '';\n\tif ( $selected_row > count($listrow['lang_key']) )\n\t{\n\t\t$selected_row = 0;\n\t}\n\n\t// build list\n\tif ($action == 'list')\n\t{\n\t\tfor ($i=0; $i < count($listrow['lang_key']); $i++)\n\t\t{\n\t\t\t$selected = ($i==$selected_row) ? ' selected=\"selected\"' : '';\n\t\t\t$l_value = (isset($lang[$listrow['lang_key'][$i]])) ? $lang[$listrow['lang_key'][$i]] : $listrow['lang_key'][$i];\n\t\t\t$res .= '<option value=\"' . $i . '\"' . $selected . '>' . $l_value . '</option>';\n\t\t}\n\t}\n\telse\n\t{\n\t\t// field\n\t\t$res = $listrow['fields'][$selected_row];\n\t}\n\treturn $res;\n}",
"protected function parseArticles(Database_Result $objArticles, $objTemplate=false)\n\t{\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tglobal $objPage;\n\t\t$this->import('String');\n\t\t$this->import('News4wardHelper');\n\n\t\t$arrArticles = array();\n\t\t$limit = $objArticles->numRows;\n\t\t$count = 0;\n\n\t\twhile ($objArticles->next())\n\t\t{\n\t\t\t// init FrontendTemplate if theres no object given\n\t\t\tif(!$objTemplate)\n\t\t\t{\n\t\t\t\t$objTemplate = new FrontendTemplate($this->news4ward_template);\n\t\t\t}\n\t\t\t$objTemplate->setData($objArticles->row());\n\n\t\t\t$objTemplate->count = ++$count;\n\t\t\t$objTemplate->class = (strlen($objArticles->cssClass) ? ' ' . $objArticles->cssClass : '') . (($count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % 2) == 0) ? ' odd' : ' even');\n\t\t\t$objTemplate->link = $this->News4wardHelper->generateUrl($objArticles);\n\t\t\t$objTemplate->archive = $objArticles->archive;\n\n\t\t\t// Clean the RTE output for the TEASER\n\t\t\tif ($objArticles->teaser != '')\n\t\t\t{\n\t\t\t\tif ($objPage->outputFormat == 'xhtml')\n\t\t\t\t{\n\t\t\t\t\t$objArticles->teaser = $this->String->toXhtml($objArticles->teaser);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objArticles->teaser = $this->String->toHtml5($objArticles->teaser);\n\t\t\t\t}\n\n\t\t\t\t$objTemplate->teaser = $this->String->encodeEmail($objArticles->teaser);\n\t\t\t}\n\n\n\t\t\t// Generate ContentElements\n\t\t\t$objContentelements = $this->Database->prepare('SELECT id FROM tl_content WHERE pid=? AND do=\"news4ward\" ' . (!BE_USER_LOGGED_IN ? \" AND invisible=''\" : \"\") . ' ORDER BY sorting ')->execute($objArticles->id);\n\t\t\t$strContent = '';\n\t\t\twhile($objContentelements->next())\n\t\t\t{\n\t\t\t\t$strContent .= $this->getContentElement($objContentelements->id);\n\t\t\t}\n\n\t\t\t// Clean the RTE output for the CONTENT\n\t\t\tif ($strContent != '')\n\t\t\t{\n\t\t\t\t// Clean the RTE output\n\t\t\t\tif ($objPage->outputFormat == 'xhtml')\n\t\t\t\t{\n\t\t\t\t\t$strContent = $this->String->toXhtml($strContent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strContent = $this->String->toHtml5($strContent);\n\t\t\t\t}\n\n\t\t\t\t$strContent = $this->String->encodeEmail($strContent);\n\t\t\t}\n\n\t\t\t$this->Template->content = $strContent;\n\n\n\t\t\t// Add meta information\n\t\t\t$arrMeta = $this->getMetaFields($objArticles);\n\t\t\t$objTemplate->date = $arrMeta['date'];\n\t\t\t$objTemplate->hasMetaFields = count($arrMeta) ? true : false;\n\t\t\t$objTemplate->timestamp = $objArticles->start;\n\t\t\t$objTemplate->author = $arrMeta['author'];\n\t\t\t$objTemplate->datetime = date('Y-m-d\\TH:i:sP', $objArticles->start);\n\n\t\t\t// Add teaser image\n\t\t\tif($objArticles->teaserImage && is_file(TL_ROOT.'/'.$objArticles->teaserImage))\n\t\t\t{\n\t\t\t\t$imgSize = deserialize($this->imgSize,true);\n\t\t\t\tif(count($imgSize)>1)\n\t\t\t\t{\n\t\t\t\t\t$objTemplate->teaserImage = $this->getImage($objArticles->teaserImage,$imgSize[0],$imgSize[1],$imgSize[2]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objTemplate->teaserImage = $objArticles->teaserImage;\n\t\t\t\t}\n\t\t\t\t$objTemplate->teaserImageRaw = $objTemplate->teaserImag;\n\t\t\t}\n\n\n\t\t\t// HOOK: add custom logic\n\t\t\tif(isset($GLOBALS['TL_HOOKS']['News4wardParseArticle']) && is_array($GLOBALS['TL_HOOKS']['News4wardParseArticle']))\n\t\t\t{\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['News4wardParseArticle'] as $callback)\n\t\t\t\t{\n\t\t\t\t\t$this->import($callback[0]);\n\t\t\t\t\t$this->$callback[0]->$callback[1]($this,$objArticles,$objTemplate);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrArticles[] = $objTemplate->parse();\n\t\t}\n\n\t\treturn $arrArticles;\n\t}",
"function printCategoryListSortableTable($cat,$flag) {\n\tglobal $_zp_zenpage;\n\tif ($flag) {\n\t\t$img = '../../images/drag_handle_flag.png';\n\t} else {\n\t\t$img = '../../images/drag_handle.png';\n\t}\n\t$count = count($cat->getArticles(0,false));\n\tif($cat->getTitle()) {\n\t\t$cattitle = $cat->getTitle();\n\t} else {\n\t\t$cattitle = \"<span style='color:red; font-weight: bold'>\".' *'.$cat->getTitlelink().\"*</span>\";\n\t}\n\t?>\n\t <div class='page-list_row'>\n\t\t<div class='page-list_title' >\n\t\t<?php echo \"<a href='admin-edit.php?category&titlelink=\".$cat->getTitlelink().\"' title='\".gettext('Edit this category').\"'>\".$cattitle.\"</a>\".checkHitcounterDisplay($cat->getHitcounter()); ?>\n\t\t</div>\n\t\t<div class=\"page-list_extra\"><?php echo $count; ?> <?php echo gettext(\"articles\"); ?>\n\t\t</div>\n\t\t<div class=\"page-list_iconwrapper\">\n\t\t\t<div class=\"page-list_icon\"><?php\n\t\t\t$password = $cat->getPassword();\n\t\t\tif (!empty($password) && (GALLERY_SECURITY != 'private')) {\n\t\t\t\techo '<img src=\"../../images/lock.png\" style=\"border: 0px;\" alt=\"'.gettext('Password protected').'\" title=\"'.gettext('Password protected').'\" />';\n\t\t\t}\n\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"page-list_icon\">\n\t\t\t<?php\n\t\t\tif ($cat->getShow()) {\n\t\t\t\t$title = gettext(\"Un-publish\");\n\t\t\t\t?>\n\t\t\t\t<a href=\"?publish=0&titlelink=<?php echo html_encode($cat->getTitlelink()); ?>&XSRFToken=<?php echo getXSRFToken('update')?>\" title=\"<?php echo $title; ?>\">\n\t\t\t\t<img src=\"../../images/pass.png\" alt=\"<?php gettext(\"Scheduled for published\"); ?>\" title=\"<?php echo $title; ?>\" /></a>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t$title = gettext(\"Publish\");\n\t\t\t\t?>\n\t\t\t\t<a href=\"?publish=1&titlelink=<?php echo html_encode($cat->getTitlelink()); ?>&XSRFToken=<?php echo getXSRFToken('update')?>\" title=\"<?php echo $title; ?>\">\n\t\t\t\t<img src=\"../../images/action.png\" alt=\"<?php echo gettext(\"Un-published\"); ?>\" title=\"<?php echo $title; ?>\" /></a>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"page-list_icon\">\n\t\t\t<?php if($count == 0) { ?>\n\t\t\t\t<img src=\"../../images/icon_inactive.png\" alt=\"<?php gettext('locked'); ?>\" />\n\t\t\t<?php\n\t\t\t} else {\n\t\t\t?>\n\t\t\t\t<a href=\"../../../index.php?p=news&category=<?php echo js_encode($cat->getTitlelink()) ;?>\" title=\"<?php echo gettext(\"View category\"); ?>\">\n\t\t\t\t<img src=\"images/view.png\" alt=\"view\" />\n\t\t\t\t</a>\n\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<div class=\"page-list_icon\"><a\n\t\t\t\t\thref=\"?hitcounter=1&id=<?php echo $cat->getID();?>&tab=categories&XSRFToken=<?php echo getXSRFToken('hitcounter')?>\"\n\t\t\t\t\ttitle=\"<?php echo gettext(\"Reset hitcounter\"); ?>\"> <img\n\t\t\t\t\tsrc=\"../../images/reset.png\"\n\t\t\t\t\talt=\"<?php echo gettext(\"Reset hitcounter\"); ?>\" /> </a>\n\t\t\t</div>\n\t\t\t<div class=\"page-list_icon\"><a\n\t\t\t\t\thref=\"javascript:confirmDelete('admin-categories.php?delete=<?php echo js_encode($cat->getTitlelink()); ?>&tab=categories&XSRFToken=<?php echo getXSRFToken('delete_category')?>',deleteCategory)\"\n\t\t\t\t\ttitle=\"<?php echo gettext(\"Delete Category\"); ?>\"><img\n\t\t\t\t\tsrc=\"../../images/fail.png\" alt=\"<?php echo gettext(\"Delete\"); ?>\"\n\t\t\t\t\ttitle=\"<?php echo gettext(\"Delete Category\"); ?>\" /></a>\n\t\t\t</div>\n\t\t\t<div class=\"page-list_icon\"><input class=\"checkbox\" type=\"checkbox\" name=\"ids[]\" value=\"<?php echo $cat->getTitlelink(); ?>\"\n\t\t\t\t\tonclick=\"triggerAllBox(this.form, 'ids[]', this.form.allbox);\" />\n\t\t\t</div>\n\t</div>\n</div>\n<?php\n}",
"public function readItemsAction() {\n\t\t$sortCol = $this->_getParam('iSortCol_0', 1);\n\t\t$sortDirection = $this->_getParam('sSortDir_0', 'asc');\n\n\t\t$filterParams['nameFilter'] = $this->_getParam('filter_name', NULL);\n\t\t$filters = $this->getFilters($filterParams);\n\n\t\t$start = $this->_getParam('iDisplayStart', 0);\n $limit = $this->_getParam('iDisplayLength', 10);\n $page = ($start + $limit) / $limit;\n\n\t\t$newsMapper = new Model_NewsMapper();\n\t\t$news = $newsMapper->findByCriteria($filters, $limit, $start, $sortCol, $sortDirection);\n\t\t$total = $newsMapper->getTotalCount($filters);\n\n\t\t$posRecord = $start+1;\n\t\t$data = array();\n\t\tforeach ($news as $information) {\n\t\t\t$created = new Zend_Date($information->getCreated());\n\t\t\t$changed = $information->getChanged();\n\t\t\tif ($changed != NULL) {\n\t\t\t\t$changed = new Zend_Date($information->getChanged());\n\t\t\t\t$changed = $changed->toString(\"dd.MM.YYYY\");\n\t\t\t}\n\n\t\t\t$row = array();\n\t\t\t$row[] = $information->getId();\n\t\t\t$row[] = $information->getTitle();\n\t\t\t$row[] = $information->getSummary();\n\t\t\t$row[] = $information->getImagename();\n\t\t\t$data[] = $row;\n\t\t\t$posRecord++;\n\t\t}\n\t\t// response\n\t\t$this->stdResponse->iTotalRecords = $total;\n\t\t$this->stdResponse->iTotalDisplayRecords = $total;\n\t\t$this->stdResponse->aaData = $data;\n\t\t$this->_helper->json($this->stdResponse);\n\t}"
] | [
"0.61515987",
"0.5855003",
"0.57594645",
"0.56911683",
"0.56796515",
"0.55842716",
"0.55158985",
"0.549911",
"0.54705304",
"0.5460559",
"0.54581076",
"0.5428841",
"0.541159",
"0.54113907",
"0.5388582",
"0.5383649",
"0.5356332",
"0.53437513",
"0.5339956",
"0.5338183",
"0.5315373",
"0.5289385",
"0.5257269",
"0.5251866",
"0.5240076",
"0.52373356",
"0.5204804",
"0.5202097",
"0.5150298",
"0.5136961"
] | 0.757315 | 0 |
/ Tells how much an Article is moved from its chronological list position. \param $article Article whose offset is required \return The offset of \p $article relative to its original position in the list. If \p $article is not in the list, returns zero. | public function getOffset(tx_newspaper_ArticleIface $article) {
$offset = $this->getOffsets(array($article->getUid()));
if (sizeof($offset) < 1) return 0;
return intval($offset[$article->getUid()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Pos() {\n\t\treturn $this->listPos($this->list, $this->current) + 1;\n\t}",
"public function calculateOffset() {\n $this->offset = ($this->currentpage - 1) * $this->limit;\n return $this->offset;\n }",
"public function getOffset()\r\n {\r\n return ($this->active_page - 1) * $this->items_per_page;\r\n }",
"public function getOffset(): int\n {\n return $this->offset;\n }",
"public function getOffset(): int {\n return $this->offset;\n }",
"public function getOffset(): int;",
"public function getPosition(): int;",
"protected function resolveOffset($offset)\n {\n if (is_int($offset)) {\n if ($offset < 0) {\n $offset = ($this->count() - abs($offset));\n }\n }\n\n return $offset;\n }",
"public function getOffset() : int;",
"public function testStartArticleMovements() {\n\t\t$service = $this->getService();\n\t\t$lang = self::$clangA;\n\n\t\t$a = 1;\n\t\t$b = $service->add(1, 'A', -1);\n\t\t$c = $service->add(1, 'B', -1);\n\n\t\t// make sure everything is fine up to here\n\t\t$this->assertPositions(array($a, $b, $c), $lang);\n\n\t\t// and now move the start article around\n\t\t$this->move($a, 1, $lang); $this->assertPositions(array($a, $b, $c), $lang);\n\t\t$this->move($a, 2, $lang); $this->assertPositions(array($b, $a, $c), $lang);\n\t\t$this->move($a, 1, $lang); $this->assertPositions(array($a, $b, $c), $lang);\n\t\t$this->move($a, 3, $lang); $this->assertPositions(array($b, $c, $a), $lang);\n\t\t$this->move($a, 2, $lang); $this->assertPositions(array($b, $a, $c), $lang);\n\t\t$this->move($a, 1, $lang); $this->assertPositions(array($a, $b, $c), $lang);\n\n\t\t// move the other articles around and see if the startarticle's pos is OK\n\t\t$this->move($b, 1, $lang); $this->assertPositions(array($b, $a, $c), $lang);\n\t\t$this->move($c, 1, $lang); $this->assertPositions(array($c, $b, $a), $lang);\n\t\t$this->move($a, 2, $lang); $this->assertPositions(array($c, $a, $b), $lang);\n\t\t$this->move($c, 2, $lang); $this->assertPositions(array($a, $c, $b), $lang);\n\n\t\t//check if revision increased 7 times\n\t\t$t = $service->findByPK($a, $lang);\n\t\t$this->assertEquals($t->getRevision(), 7);\n\t}",
"private function _get_list_position($node)\n\t{\n\t\t$position = 1;\n\n\t\t// Get all of the list nodes inside this parent\n\t\t$list_node = $this->_parser ? $node->parentNode : $node->parentNode();\n\t\t$total_nodes = $this->_parser ? $node->parentNode->childNodes->length : count($list_node->childNodes());\n\n\t\t// Loop through all li nodes and find where we are in this list\n\t\tfor ($i = 0; $i < $total_nodes; $i++)\n\t\t{\n\t\t\t$current_node = $this->_parser ? $list_node->childNodes->item($i) : $list_node->childNodes($i);\n\t\t\tif ($current_node === $node)\n\t\t\t{\n\t\t\t\t$position = $i + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn $position;\n\t}",
"public function getTransformDocumentOffset($transform) {\n $sentence = $this->getSentenceFromTransform($transform);\n return $this->getSentenceOffset($sentence) + $this->getTransformOffset($transform);\n }",
"private function calculateOffset() {\n $this->offset = ($this->currentpage - 1) * $this->limit;\n }",
"public function pageOffset(){\n\t $offset = ($this->current_page-1)*$this->per_page;\n\t return $offset;\n\t}",
"function getOffset($page){\n return $page-1>0?($page-1)*10:0;\n}",
"function update_lineno($offset)\n{\n\tglobal $lines_offset, $line;\n\n\t$left = 0;\n\t$right = $count = count($lines_offset)-1;\n\n\t// a nice binary search :)\n\tdo {\n\t\t$mid = intval(($left + $right)/2);\n\t\t$val = $lines_offset[$mid];\n\n\t\tif ($val < $offset) {\n\t\t\tif (++$mid > $count || $lines_offset[$mid] > $offset) {\n\t\t\t\t$line = $mid;\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$left = $mid;\n\t\t\t}\n\t\t} else if ($val > $offset) {\n\t\t\tif ($lines_offset[--$mid] < $offset) {\n\t\t\t\t$line = $mid+1;\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$right = $mid;\n\t\t\t}\n\t\t} else {\n\t\t\t$line = $mid+1;\n\t\t\treturn;\n\t\t}\n\t} while (true);\n}",
"public function getOffset();",
"public function getOffset();",
"public function get_initial_offset()\n\t{\n\t\treturn $this->offset;\n\t}",
"private static function moveArticleTemporarily($index, array &$old_order, $offset) {\n $entry = $old_order[$index];\n $entry[1] += $offset;\n unset($old_order[$index]);\n array_unshift($old_order, $entry);\n }",
"public function pos($element)\n {\n return ($index = $this->getIndexOf($element)) ? $index + 1 : $index;\n }",
"public function position(\\sli_tom\\util\\Node $element) {\n\t\tif ($index = $this->indexOf($element)) {\n\t\t\treturn ++$index;\n\t\t}\n\t}",
"public function calculateRealOffset($page)\n {\n if (is_null($page) || empty($page)) {\n $offset = 0;\n } else {\n $offset = ($page * $this->perPage) - $this->perPage;\n }\n\n return $offset;\n }",
"public function position(): int\n {\n return $this->position;\n }",
"public function position(): int\n {\n return $this->position;\n }",
"private function getOffset(): int\n {\n if (Request::get('offset')) {\n $offset = (int) Request::get('offset');\n\n return $offset < 0 ? 0 : $offset;\n }\n\n return 0;\n }",
"public function getDelta(): int {\n if (!is_null($referring_item = $this->_referringItem)) {\n /** @var \\Drupal\\Core\\Field\\EntityReferenceFieldItemList $referring_field */\n $referring_field = $referring_item->getParent();\n if ($referring_field) {\n $parent_entity = $referring_field->getParent();\n $parent_entity = $parent_entity->getEntity();\n if ($parent_entity->hasField('field_content_list_items')) {\n /** @var \\Drupal\\Core\\Field\\EntityReferenceFieldItemList $er_list */\n $er_list = $parent_entity->field_content_list_items;\n foreach ($er_list->referencedEntities() as $delta => $entity) {\n if ($this->id() === $entity->id()) {\n return (int) $delta;\n }\n }\n }\n }\n }\n return 0;\n }",
"public function getPosition() : int\n {\n return $this->position;\n }",
"public function getOffset()\n\t{\n\t\treturn $this->offset;\n\t}",
"public function getOffset()\n {\n return $this->offset;\n }"
] | [
"0.5556462",
"0.5458212",
"0.5272435",
"0.52123106",
"0.5131193",
"0.511588",
"0.50684226",
"0.5043883",
"0.5027016",
"0.50191706",
"0.5009901",
"0.49800998",
"0.4937977",
"0.49347085",
"0.49216497",
"0.491183",
"0.48906645",
"0.48906645",
"0.48772573",
"0.48745066",
"0.4840864",
"0.4836573",
"0.48225436",
"0.47812185",
"0.47812185",
"0.4780357",
"0.47750902",
"0.4759316",
"0.46955782",
"0.46915454"
] | 0.6843773 | 0 |
////////////////////////////////////////////////////////////////////////// / Remove all articles from the list. Deletes all articles that are presently on the list. Older articles are untouched. | protected function clearList() {
$article_uids = array();
foreach ($this->getArticles($this->getNumArticles()) as $article) {
$article_uids[] = $article->getUid();
}
if ($article_uids) {
tx_newspaper::deleteRows(
self::mm_table,
$article_uids,
'uid_foreign', // check uid_foreign = article uid
'uid_local=' . $this->getUid() // process current article list only
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeArticles(array $articleIds = array())\n {\n $this->activeCollection->removeItems($articleIds);\n $this->serialize();\n }",
"public function destroy(articles $articles)\n {\n //\n }",
"public function destroy(Articles $articles)\n {\n //\n }",
"public function destroy(Articles $articles)\n {\n //\n }",
"public function remove_all() \n {\n try {\n foreach ($this->post_ids as $post_id) {\n $this->remove($post_id);\n }\n } catch(\\Exception $e) {\n (new UMB_Logger)->report($e->getMessage());\n } // end catch\n }",
"public function deleteContents() { // Delete all children chapters of this article\n $contents = $this->getContents();\n foreach ($contents as $content) {\n $content->delete(false);\n }\n }",
"public function unpublishedArticles()\n {\n return $this->articles()->unpublished();\n }",
"public function removeAll(): void\n {\n $this->noteRepository->removeAll();\n }",
"private function cleanTrendingArticles() {\n\t\t//clean all article those are article status is 1\n\t\t$trendingArticleDAO = new TrendingArticleDAO($this->getDoctrine());\n\t\t$trendingArticleDAO->cleanTrendingArticle(array('trendingArticleStatus'=>'1'));\n\t}",
"public function clean() {\n\t\ttry {\n\t\t\t$objectAPI = $this->calendar->getBackend()->getObjectAPI($this->calendar);\n\n\t\t\t$list = $objectAPI->listAll();\n\t\t} catch(BackendUtils\\Exception $ex) {\n\t\t\treturn;\n\t\t}\n\t\t$cList = $this->cache->listAll();\n\n\t\t$deletedOnRemote = array_diff($cList, $list);\n\n\t\t$this->cache->deleteList($deletedOnRemote);\n\t}",
"public function removeAll();",
"public function removeAll();",
"public function removeAll();",
"public function delete() {\n \n // Does the Article object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Article::delete(): Attempt to delete an Article object that does not have its ID property set.\", E_USER_ERROR );\n \n\n \t\t// delete all images which are connected to the article\n\t\t$images = Image::getImagesByArticleId( $this->id );\n\n\t\tforeach ($images as $image) {\n\t\t\t$image->delete();\n\t\t}\n\n // Delete the Article\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM articles WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }",
"public abstract function removeAll();",
"public function deleteAll();",
"abstract public function removeAll();",
"public function removeAll()\n\t{\n\t\t$this->_items = array();\n\t}",
"function remove_all() \r\n\t{\r\n\t\t$this->reset();\r\n }",
"public function unsetAllItems(): void\n {\n $this->allItems = [];\n }",
"public static function deleteAllRemovedEntities()\r\n\t\t{\r\n\t\t\t$arrRemovedEntities = self::getRemovedEntities();\r\n\t\t\tforeach( $arrRemovedEntities as $strClass => $arrClassInstance )\r\n\t\t\t{\r\n\t\t\t\tforeach( $arrClassInstance as $intObjectId => $objEntity )\r\n\t\t\t\t{\r\n\t\t\t\t\t$objEntity->delete();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public function removeAll(): void;",
"public function removeAll() {\n\t\t// TODO: Implement removeAll() method.\n\t}",
"public function purge() {\r\n\r\n $this->where('created_at <', date('Y-m-d H:i:s', time() - $this->expiration_time))->delete_many_by();\r\n }",
"public function deleteAll()\n\t{}",
"private function load_articles() {\n $this->articleList = $this->clean_file_list($this->scan_articles());\n return $this->articleList;\n }",
"public function articles_delete($id = null)\n {\n $this->db->where('id', $id)->delete('mh_posts');\n $this->fb_delete($id);\n $this->page_delete($id);\n $this->twitter_delete($id);\n return true;\n }",
"public function cms_delete_all_tags()\n\t{\n\t\t$this->update_tags('');\n\t}",
"function removeAll();",
"function cleanUp() {\n\t\t$cache = $this->config['dirs']['tmp'] . '/articles';\n\t\tif (file_exists($cache)) {\n\t\t\t$outputDir = $this->config['dirs']['output'];\n\t\t\techo \"Removing old files\\n\";\n\t\t\t$old = unserialize(file_get_contents($cache));\n\t\t\tforeach($old as $file) {\n\t\t\t\t@unlink($outputDir . $file);\n\n\t\t\t\t$dir = dirname($file);\n\t\t\t\twhile ($dir != '' && is_dir($outputDir . $dir) && array_diff(scandir($outputDir . $dir), array('.','..')) == array()) {\n\n\t\t\t\t\tif (!rmdir($outputDir . $dir)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$dir = dirname($dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunlink ($cache);\n\t}"
] | [
"0.6440452",
"0.6316466",
"0.6278876",
"0.6278876",
"0.61866874",
"0.61065",
"0.6008823",
"0.5965381",
"0.59598154",
"0.5944484",
"0.5919468",
"0.5919468",
"0.5919468",
"0.5897998",
"0.5884612",
"0.5849307",
"0.5844169",
"0.583357",
"0.5809117",
"0.5807432",
"0.5801857",
"0.57720816",
"0.5731571",
"0.57236654",
"0.568252",
"0.56822824",
"0.5654595",
"0.5631545",
"0.56187296",
"0.5618294"
] | 0.77072763 | 0 |
/ Get number of articles set in this articles list \return number of articles as stored in the article list record (or a default number, if number isn't properly stored in the data base) | public function getNumArticles() {
$num_articles = intval($this->getAttribute('num_articles'));
if ($num_articles <= 0) {
// use default value if not set properly in article list record
$num_articles = self::default_num_articles;
}
return $num_articles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNumberOfArticles()\n {\n $query = \"SELECT count(id) FROM article\";\n\n $stm = $this->connection->query($query);\n\n return $stm->fetch(\\PDO::FETCH_OBJ);\n }",
"public function getNumberOfArticles();",
"public function get_articles_number(){\n\t\treturn $this->table_rows(Tables::articles());\n\t}",
"public function getNbArticles()\n\t{\n\t\t\t$nb_articles = 0;\n\t\t\tforeach ($this->articles as $article){\n\t\t\t\t$nb_articles += $article->getQuantite();\n\t\t\t}\n\t\t\treturn $nb_articles;\n\t}",
"public function getNbArticles()\n { // à compléter \n $total = 0;\n $articles = $this->getContenu();\n foreach ($articles as $article) {\n $total = $total + $article->quantite;\n }\n return $total;\n }",
"public static function getTotalArticles()\n {\n\n $db = Db::getConnection();\n\n $result = $db->query('SELECT count(id) AS count FROM dt_articles');\n $result->setFetchMode(PDO::FETCH_ASSOC);\n\n $row = $result->fetch();\n\n return $row['count'];\n\n }",
"public static function countArticles(){\n // Connection à la base de donnees\n $bdd = new DatabaseConnector('root','root.mysql.db', 'root','password');\n\n $req = $req = $bdd->getDb()->query(\"SELECT COUNT(id) FROM posts\");\n return $req->fetch();\n }",
"function getArticleCount() {\n\n $db = dbConnect();\n\n $sql = \"SELECT count(*) FROM linfo_articles\";\n\n $sm = $db->prepare($sql);\n if (!$sm->execute()) {\n echo \"something not ok <br>\";\n echo \"error-code: 4\";\n die();\n }\n\n return (int)$sm->fetch()[0];\n }",
"function getArticlesCount($db) {\n $resultSet = AbstractEntry::doQueryWithIdParameter(Journal::COUNT_ARTICLES_QUERY, $this->id, $db);\n $resultSetRow = $resultSet[0];\n return $resultSetRow[0];\n }",
"public function count_all_articles() {\n\t\t\t$query = $this->db->select(['id', 'title'])\n\t\t\t\t\t\t\t ->from('articles')\n\t\t\t\t\t\t\t ->get();\n\n\t\t\treturn $query->num_rows(); //we need to get all number of rows\n\t\t}",
"public function count() {\n\t\treturn $this->fetchItems(true, '', 0, null, true);\n\t}",
"public function getCount()\n\t{\n\t\tif (!$this->_count)\n\t\t{\n\t\t\t$this->_loadItems();\n\t\t}\n\n\t\treturn $this->_count;\n\t}",
"function countArticles() {\n if (isset($_SESSION['cart']))\n return count($_SESSION['cart']['labelProduct']);\n else\n return 0;\n }",
"public function setNumberOfArticles($number);",
"public function count() {\n return count( $this->getList() );\n }",
"public function getNumberOfEntries()\n {\n return $this->createQuery()->count();\n }",
"public function getNewsItemCount()\n\t{\n\t\treturn $this->news_item_count;\n\t}",
"function getNbResults()\n {\n return $this->collection->count();\n }",
"function count()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $ret = false;\r\n\r\n $db->query_single( $result, \"SELECT COUNT(ID) as Count\r\n FROM eZArticle_ArticleFormDict\" );\r\n $ret = $result[\"Count\"];\r\n return $ret;\r\n }",
"public function getCount() : int {\n\n\t\t\treturn $this->items->getCount();\n\t\t}",
"public function count(): int\n\t{\n\t\treturn $this->stories->count() ?? 0;\n\t}",
"public function getCount() {\n\t\tif ($this->_count === null){\n\t\t\t$result = DataBase::query(\"SELECT COUNT(item.id) AS count \" .\n\t\t\t\t$this->getQueryBase());\n\t\t\tif ($this->_count = $result->get('count'))\n\t\t\t\treturn $this->_count;\n\t\t\telse\n\t\t\t\t$this->_count = 0;\n\t\t}\n\t\treturn $this->_count;\n\t}",
"public function get_total_items(){\n $count = $this->fetch(\"SELECT id FROM posts\");\n return $count ? count($count) : 0;\n }",
"public function count(): int\n {\n return count($this->list);\n }",
"public function count() {\n return count($this->list);\n }",
"public function count(): int\n {\n if (isset($this->page)) {\n return (int)$this->page['total_items'];\n }\n\n return 0;\n }",
"public function countEntities()\n {\n $result = $this->service->call(array(\n 'method' => 'glpi.listEntities',\n 'count' => true\n ));\n\n if (isset($result['count'])) {\n return (int)$result['count'];\n }\n\n return null;\n }",
"public function articleCount()\n {\n $sql4=\"SELECT * from article\";\n $result=mysqli_query($this->db,$sql4);\n $user_data=mysqli_fetch_array($result);\n $count_row=$result->num_rows;\n echo $count_row;\n }",
"public function countlists()\n {\n $query = $this->getEntityManager()->createQuery(\"select count(e.idEvenement) from EvenementBundle:Evenement e\");\n return $query->getSingleScalarResult();\n }",
"public function get_count() {\n\t\t$all = $this->get_all();\n\n\t\treturn count( $all );\n\t}"
] | [
"0.82280713",
"0.8119339",
"0.79275155",
"0.7915187",
"0.7621674",
"0.7557267",
"0.7511904",
"0.71499026",
"0.7147297",
"0.70918626",
"0.7042265",
"0.70032716",
"0.699864",
"0.69865954",
"0.692322",
"0.68833965",
"0.6878464",
"0.6859234",
"0.6843083",
"0.6809113",
"0.6788874",
"0.67887694",
"0.6784303",
"0.6783141",
"0.67680895",
"0.676626",
"0.6753655",
"0.67477447",
"0.67473316",
"0.6731167"
] | 0.85444874 | 0 |
/ Get the articles sorted by their offsets, including offset values \param $number Number of articles to return \param $start Index of first article sought \return \code array( array( 'article' => tx_newspaper_Article object 'offset' => original offset ), ... ) \endcode | private function getSortedArticles($number, $start = 0) {
$timer = tx_newspaper_ExecutionTimer::create();
$articles = $this->getArticlesAndOffsets($number, $start);
$articles_sorted = $this->sortArticles($articles);
$articles = array();
foreach ($articles_sorted as $i => $article) {
$articles[] = array($article['article']->getUid(), $article['offset']);
}
return array_slice($articles_sorted, 0, $number);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getArticles($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create(\"Automatic ArticleList(\" . $this->getUid() . \")::getArticles($number)\");\n\n try {\n $articles_sorted = $this->getSortedArticles($number, $start);\n } catch (tx_newspaper_EmptyParametrizedArticlelistException $e) {\n return array();\n }\n\n return array_map(function($record) { return $record['article']; }, $articles_sorted);\n }",
"public function getArticlesList($pageOffset, $nbArticlesPerPage, $sortingMethod='DESC'){\n\t\t$sql = '\n\t\tSELECT *\n\t\tFROM articles\n\t\tORDER BY art_inserted '.$sortingMethod.'\n\t\tLIMIT '.$pageOffset.','.$nbArticlesPerPage.'\n\n\t\t';\n\n\t\t$sth = $this->dbh->prepare($sql);\n\n\t\tif ($sth->execute() === false) {\n\t\t\tprint_r($sth->errorInfo());\n\t\t} else {\n\t\t\treturn $sth->fetchAll();\n\t\t}\n\t}",
"private static function sortArticles(array $articles) {\n\n $temp_articles = array();\n\n foreach ($articles as $i => $article) {\n if (array_key_exists('offset', $article)) $offset_key = 'offset';\n else $offset_key = 1;\n $scaled_offset = $article[$offset_key]*(1+self::EPSILON);\n $new_index = $i-$scaled_offset;\n $temp_articles[\"$new_index\"] = $article;\n }\n\n ksort($temp_articles);\n\n $new_articles = array();\n foreach($temp_articles as $article) $new_articles[] = $article;\n\n return $new_articles;\n }",
"public function get_n_articles($N = 3, $offset = 0) {\n $arr = $this->get_n_article_files($N, $offset);\n\n //Loop through the list of recent articles.\n //append each article as an array to the array of Twig template data\n foreach($arr as $article) {\n $data = $this->parse_article($this->get_full_filename($article));\n array_push($this->articleListData,$data);\n }\n return $this->articleListData;\n }",
"public function getRawArticleUIDs($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n /// \\todo: Implement \\p filter_articlelist_exclude. This must be done separately from the SQL query.\n\n try {\n\n $dont_spam_devlog = new tx_newspaper_ExceptionSilencer();\n\n $results = tx_newspaper_DB::getInstance()->selectRowsDirect(\n $this->select_method_strategy->selectFields(),\n $this->selectTable(),\n $this->selectWhere(),\n '',\n $this->selectOrderBy(),\n $this->selectLimit($start, $number)\n );\n\n } catch (tx_newspaper_DBException $e) {\n // Guard against article lists using GET variables, which are not set in the BE\n if (TYPO3_MODE != 'BE') {\n tx_newspaper::devlog(\n \"tx_newspaper_ArticleList_Semiautomatic::getRawArticleUIDs($number, $start) error\",\n $e->getMessage()\n );\n }\n $results = array();\n }\n\n return $this->select_method_strategy->rawArticleUIDs($results);\n }",
"public function getArticlesByPage( $page = 1, $numRows=100000, $order=\"publicationDate DESC\") {\n\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n\t$sql = \"SELECT *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles WHERE pageId = :pageId ORDER BY \" . $order . \" LIMIT :numRows\";\n\t$st = $conn->prepare( $sql );\n\t$st->bindValue(\":numRows\", $numRows, PDO::PARAM_INT);\n\t$st->bindValue(\":pageId\", $page, PDO::PARAM_INT);\n\t\n\t$st->execute();\n\t$list = array();\n\n\twhile ( $row = $st->fetch() ) {\n\t\t$article = new Article( $row );\n\t\t$list[] = $article;\n\t}\n\n\t// Now get total number of articles that matched the criteria\n\t$sql = \"SELECT FOUND_ROWS() AS totalRows\";\n\t$totalRows = $conn->query( $sql )->fetch();\n\t$conn = null;\n\treturn (array( \"results\" => $list, \"totalRows\" => $totalRows[0]));\n\n}",
"public static function getArticlesList( $numRows=100000, $order=\"publicationDate DESC\" ) {\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles\n ORDER BY :order LIMIT :numRows\";\n\n $stmt = $conn->prepare( $sql );\n\t$stmt->bindValue( \":order\", $order, PDO::PARAM_STR);\n $stmt->bindValue( \":numRows\", $numRows, PDO::PARAM_INT );\n $stmt->execute();\n $list = array();\n\n while ( $row = $stmt->fetch() ) {\n $article = new Article( $row );\n $list[] = $article;\n }\n\n // Get the total number of articles that satisfied the criteria\n $sql = \"SELECT FOUND_ROWS() AS totalRows\";\n $totalRows = $conn->query( $sql )->fetch();\n $conn = null;\n return ( array ( \"results\" => $list, \"totalRows\" => $totalRows[0] ) );\n }",
"public static function getList( $start_from,$numRows, $order=\"publicationDate DESC\" ) {\n \t\n }",
"public static function getArticlesList($page = 1)\n {\n\n $page = intval($page);\n $offset = ($page - 1) * self::SHOW_BY_DEFAULT;\n\n $db = Db::getConnection();\n\n $articles = array();\n\n $result = $db->query(\"SELECT id, title, link, excerpt, created, image\"\n . \" FROM dt_articles\"\n . \" ORDER BY created DESC\"\n . \" LIMIT \" . self::SHOW_BY_DEFAULT\n . \" OFFSET \" . $offset\n );\n\n $i = 0;\n while ($row = $result->fetch()) {\n $articles[$i]['id'] = $row['id'];\n $articles[$i]['title'] = $row['title'];\n $articles[$i]['link'] = $row['link'];\n $articles[$i]['excerpt'] = $row['excerpt'];\n $articles[$i]['created'] = $row['created'];\n $articles[$i]['image'] = $row['image'];\n $i++;\n }\n\n return $articles;\n\n }",
"public function all_articles_list($limit, $offset) {\n\n\t\t\t$query = $this->db->select(['id','title','created_at'])\n\t\t\t\t\t\t\t\t->from('articles')\n\t\t\t\t\t\t\t\t->limit($limit, $offset)\n\t\t\t\t\t\t\t\t->order_by('created_at', 'DESC') \n\t\t\t\t\t\t\t\t->get();\n\n\t\t\treturn $query->result();\n\t\t}",
"public function getRelatedArticles($num = 5) {\r\n \r\n $SphinxQL = $this->getSphinx(); \r\n \r\n $title = preg_replace(\"/[^[:alnum:][:space:]]/u\", '', $this->title);\r\n $title = trim($title);\r\n $title = str_replace(\" \", \"|\", $title);\r\n \r\n $query = $SphinxQL->select(\"*\")\r\n ->from(\"idx_news_article\")\r\n ->match(array(\"story_title\", \"story_paragraphs\"), $title, true)\r\n ->where(\"story_id\", \"!=\", $this->id)\r\n ->where(\"story_time_unix\", \"BETWEEN\", array(strtotime(\"1 year ago\", time()), time()))\r\n ->limit($num)\r\n ->option(\"ranker\", \"proximity_BM25\");\r\n \r\n $matches = $query->execute(); \r\n \r\n if (count($matches)) {\r\n return $matches;\r\n }\r\n \r\n return array(); \r\n \r\n\r\n $Sphinx = AppCore::getSphinxAPI();\r\n\r\n $Sphinx->setFilter(\"topic_id\", array( $this->Topic->id ));\r\n $Sphinx->setFilter(\"story_id\", array( $this->id ), true);\r\n $Sphinx->setFilterRange(\"story_time_unix\", strtotime(\"1 year ago\"), time());\r\n $Sphinx->setLimits(0, $num);\r\n\r\n $results = $Sphinx->query($Sphinx->escapeString($this->title), \"idx_news_article\");\r\n\r\n return isset( $results['matches'] ) ? $results['matches'] : array();\r\n }",
"public function getList( $numRows=1000000, $order=\"publicationDate DESC\") {\n\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n\t$sql = \"SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles ORDER BY \" . $order . \" LIMIT :numRows\";\n\t$st = $conn->prepare( $sql );\n\t$st->bindValue(\":numRows\", $numRows, PDO::PARAM_INT);\n\t$st->execute();\n\t$list = array();\n\n\twhile ( $row = $st->fetch() ) {\n\t\t$article = new Article( $row );\n\t\t$list[] = $article;\n\t}\n\n\t// Now get total number of articles that matched the criteria\n\t$sql = \"SELECT FOUND_ROWS() AS totalRows\";\n\t$totalRows = $conn->query( $sql )->fetch();\n\t$conn = null;\n\treturn (array( \"results\" => $list, \"totalRows\" => $totalRows[0]));\n\n}",
"function get_places_paging($num,$offset)\n\t{\n\t\t//Get a number of places, offset by the provided number\t\n\t\t$query = $this->db->get('places',$num,$offset);\n\t\t\n\t\t//Return the result\t\t\n\t\treturn $query->result();\t\n\t}",
"public function all_articles_list($limit,$offset)\n {\n $this->load->library('session');\n // or we can pass an array of fields ['title','id']\n\n $query = $this->db\n ->select(['title','id','created_at'])\n ->from('articles')\n ->limit($limit,$offset)\n ->order_by('created_at','DESC')\n ->get();\n\n return $query->result();\n }",
"function getArticles($offset = 0, $limit = 6) {\n\n $db = dbConnect();\n\n $sql = \"SELECT * FROM linfo_articles ORDER BY a_datum DESC LIMIT $limit OFFSET $offset\";\n\n $sm = $db->prepare($sql);\n if (!$sm->execute()) {\n echo \"something not ok <br>\";\n echo \"error-code: 3\";\n die();\n }\n\n return $sm->fetchAll(\\PDO::FETCH_CLASS);\n }",
"function getPostArray($offset_start, $offset_end, $sort_by)\n\t{\n\t\t$postArray = array();\n\n\t\t$sqlPost = \"SELECT * FROM posts \n\t\t\t\t\tWHERE status=1 ORDER BY $sort_by \n\t\t\t\t\tDESC LIMIT $offset_start, $offset_end\";\n\n\t\t$result = $this->db->query($sqlPost);\n\t \n\t // Return if query was unsuccessful\n\t if (!$result['success'])\n\t {\n\t \techo $result['error'];\n\t \treturn;\n\t }\n\n\t // Fill array with post information\n foreach($result['rows'] as $row)\n {\n \tarray_push($postArray, $this->postAssemble($row));\n }\n\n // Return entire array of post entries\n return $postArray;\n\t}",
"function getFrom($num, $offset) {\n $q = $this->db->get($this->table, $num, $offset);\t\n if($q->num_rows()>0)\n {\n foreach ($q->result() as $row)\n {\n $data[] = $row;\n }\n return $data;\n }\n }",
"function getall($num, $offset, $view = FALSE)\n {\n $this->db->select('news.id, news.title, news.content, DATE_FORMAT(published, \\'%d-%m-%Y %H:%i\\') AS published, news.view, users.username AS author', FALSE);\n $this->db->from('news');\n $this->db->join('users', 'users.id = news.author_id');\n\n if ($view) {\n $this->db->where('news.view', '1');\n }\n\n $this->db->order_by('news.published', 'desc');\n $this->db->limit($num, $offset);\n\n $query = $this->db->get();\n\n return $query;\n }",
"public function liste_articles($numPage) {\r\n $calcul = ($numPage - 1) * NB_ELEMENT_PAGE;\r\n \r\n\t\t\t\t$liste_campagnes = $this->base_de_donnee->prepare('SELECT * FROM articles LIMIT ?, '.NB_ELEMENT_PAGE);\r\n $liste_campagnes->bindValue(1, $calcul, PDO::PARAM_INT);\r\n\t\t\t\t$liste_campagnes->execute();\r\n \r\n\t\t\t\t$retour = $liste_campagnes->fetchAll(PDO::FETCH_OBJ);\r\n\t\t\t\t$liste_campagnes->closeCursor();\r\n \r\n\t\t\t\treturn $retour;\r\n\t\t}",
"function get_objects($offset, $count, $order_property = null)\r\n {\r\n $order_property = $this->get_order_property($order_property);\r\n return $this->get_browser()->retrieve_announcement_distributions($this->get_condition(), $offset, $count, $order_property);\r\n }",
"public function paginate(int $page_number): array\n\t{\n\t\t// for case 0 and 1 we a call to ($page_number - $shift)\n\t\t// for case 2 we do two calls. One to ($page_number - $shift) and one to ($page_number - $shift - 1)\n\t\tswitch($page_number % 3){\n\t\n\t\t\tcase 0:\n\t\t\t\t$shift = $this->getShift($page_number);\n\t\t\n\t\t\t\t$result = $this->getPage($page_number - $shift);\n\n\t\t\t\t//Get last ten last results from result array\n\t\t\t\treturn array_slice($result, 5, 15);\n\t\t\tcase 1:\n\t\t\t\t$shift = $this->getShift($page_number);\n\t\t\n\t\t\t\t$result = $this->getPage($page_number - $shift);\n\n\t\t\t\t//Get first ten results from result array\n\t\t\t\treturn array_slice($result, 0, 10);\n\t\t\tcase 2:\n\t\t\t\t$shift = $this->getShift($page_number);\n\t\t\t\n\t\t\t\t//Get last five and first five results and merge them\n\t\t\t\t$first_result = $this->getPage($page_number - $shift - 1);\n\t\t\t\t$second_result = $this->getPage($page_number - $shift);\n\n\t\t\t\treturn array_merge(array_slice($first_result, 10, 15), array_slice($second_result, 0, 5));\n\t\t}\n\n\t}",
"public function getPageList($limit, $offset);",
"function get_links($num, $offset)\r\n {\t\r\n\t\t$this->db->where('link_flag !=','disabled');\t\t\r\n\t\t$this->db->order_by('link_date desc,link_votes desc'); \t\r\n $query = $this->db->get('links', $num, $offset);\r\n\t\treturn $query->result();\r\n }",
"public function getAllArticlesFirstPage()\n {\n \t$response = [];\n \t$this->listFeed = $this->getNewsFeed();\n \tif(!isset($this->listFeed['articles'])){\n \t\tabort(403, 'not found news.');\n \t}\n \t$response['articles'] = array_slice($this->listFeed['articles'], 0, 10);\n \t$response['number_of_pages'] = $this->listFeed['number_of_pages'];\n \treturn $response;\t\n }",
"public function articles_list($limit,$offset)\n {\n $this->load->library('session');\n $user_id = $this->session->userdata('user_id');\n $user_id = intval($user_id);\n // or we can pass an array of fields ['title','id']\n $query = $this->db\n ->select(['title','id','created_at'])\n ->from('articles')\n ->where('user_id',$user_id)\n ->limit($limit,$offset)\n ->get();\n\n return $query->result();\n }",
"private function get_n_article_files($N = 3, $offset = 0) {\n return array_slice($this->articleList,$offset,$N);\n }",
"public function getRange($start, $num)\n\t{\n\t\treturn $this->pdo->query(\n\t\t\tsprintf('\n\t\t\t\tSELECT *\n\t\t\t\tFROM movieinfo\n\t\t\t\tORDER BY createddate DESC %s',\n\t\t\t\t($start === false ? '' : ' LIMIT ' . $num . ' OFFSET ' . $start)\n\t\t\t)\n\t\t);\n\t}",
"public static function getAllForDateRange(int $start, int $end, int $limit = 10, int $offset = 0): array\n {\n // get the items\n $items = (array) FrontendModel::getContainer()->get('database')->getRecords(\n 'SELECT i.id, i.revision_id, i.language, i.title, i.introduction, i.text, i.num_comments AS comments_count,\n c.title AS category_title, m2.url AS category_url, i.image,\n UNIX_TIMESTAMP(i.publish_on) AS publish_on, i.user_id, i.allow_comments,\n m.url\n FROM blog_posts AS i\n INNER JOIN blog_categories AS c ON i.category_id = c.id\n INNER JOIN meta AS m ON i.meta_id = m.id\n INNER JOIN meta AS m2 ON c.meta_id = m2.id\n WHERE i.status = ? AND i.language = ? AND i.hidden = ? AND i.publish_on BETWEEN ? AND ?\n ORDER BY i.publish_on DESC\n LIMIT ?, ?',\n [\n 'active',\n LANGUAGE,\n false,\n FrontendModel::getUTCDate('Y-m-d H:i', $start),\n FrontendModel::getUTCDate('Y-m-d H:i', $end),\n $offset,\n $limit,\n ],\n 'id'\n );\n\n // no results?\n if (empty($items)) {\n return [];\n }\n\n // init var\n $link = FrontendNavigation::getUrlForBlock('Blog', 'Detail');\n $folders = FrontendModel::get(Thumbnails::class)->getFolders(FRONTEND_FILES_PATH . '/Blog/images', true);\n\n // loop\n foreach ($items as $key => $row) {\n // URLs\n $items[$key]['full_url'] = $link . '/' . $row['url'];\n\n // comments\n if ($row['comments_count'] > 0) {\n $items[$key]['comments'] = true;\n }\n if ($row['comments_count'] > 1) {\n $items[$key]['comments_multiple'] = true;\n }\n\n // allow comments as boolean\n $items[$key]['allow_comments'] = (bool) $row['allow_comments'];\n\n // reset allow comments\n if (!FrontendModel::get('fork.settings')->get('Blog', 'allow_comments')) {\n $items[$key]['allow_comments'] = false;\n }\n\n // image?\n if (isset($row['image'])) {\n foreach ($folders as $folder) {\n $items[$key]['image_' . $folder['dirname']] = $folder['url'] . '/' . $folder['dirname'] .\n '/' . $row['image'];\n }\n }\n }\n\n // get all tags\n $tags = FrontendTagsModel::getForMultipleItems('Blog', array_keys($items));\n\n // loop tags and add to correct item\n foreach ($tags as $postId => $data) {\n $items[$postId]['tags'] = $data;\n }\n\n // return\n return $items;\n }",
"public function get_paginated_reading_list_posts($offset, $per_page)\n {\n $ids_string = generate_ids_string($this->get_reading_list_post_ids());\n $sql = \"SELECT * FROM (\" . $this->post_model->query_string() . \" AND posts.id IN({$ids_string}) ORDER BY posts.created_at DESC LIMIT ?,?) AS table_posts\";\n $query = $this->db->query($sql, array(clean_number($offset), clean_number($per_page)));\n return $query->result();\n }",
"function range () {\n\n\t\t$offset = 2;\n\n\t\t$low_end = max(1, ($this->_page_num - $offset));\n\n\t\t$offset = 2;\n\n\t\t$high_end = min($this->_page_count, ($this->_page_num + $offset));\n\n\t\t$range = array();\n\t\tfor ( $i = $low_end; $i <= $high_end; $i++ ) {\n\t\t\tarray_push($range, $i);\n\t\t}\n\t\t\n\t\treturn($range);\n\t}"
] | [
"0.76722664",
"0.6294739",
"0.59124696",
"0.5844736",
"0.58200467",
"0.5814821",
"0.58084476",
"0.5759128",
"0.5691235",
"0.56548977",
"0.56236076",
"0.5585556",
"0.5559985",
"0.5531448",
"0.5488834",
"0.5411015",
"0.5402281",
"0.5377411",
"0.5371853",
"0.53368586",
"0.52980316",
"0.5266371",
"0.5240079",
"0.52135926",
"0.51786053",
"0.5174692",
"0.5165835",
"0.5059115",
"0.5051622",
"0.50194794"
] | 0.86195385 | 0 |
/ Get the UIDs of articles found by the conditions defining the list \param $number Number of articles to return \param $start Index of first article sought \return array of UIDs in the order in which they should appear \todo Factor out the code to create the SQL statement so it can be used as filter for tx_newspaper_ArticleList_Manual. Possibly factor out the code to subtract another ArticleList too. \todo Figure out how to preview hidden articles | public function getRawArticleUIDs($number, $start = 0) {
$timer = tx_newspaper_ExecutionTimer::create();
/// \todo: Implement \p filter_articlelist_exclude. This must be done separately from the SQL query.
try {
$dont_spam_devlog = new tx_newspaper_ExceptionSilencer();
$results = tx_newspaper_DB::getInstance()->selectRowsDirect(
$this->select_method_strategy->selectFields(),
$this->selectTable(),
$this->selectWhere(),
'',
$this->selectOrderBy(),
$this->selectLimit($start, $number)
);
} catch (tx_newspaper_DBException $e) {
// Guard against article lists using GET variables, which are not set in the BE
if (TYPO3_MODE != 'BE') {
tx_newspaper::devlog(
"tx_newspaper_ArticleList_Semiautomatic::getRawArticleUIDs($number, $start) error",
$e->getMessage()
);
}
$results = array();
}
return $this->select_method_strategy->rawArticleUIDs($results);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getArticles($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create(\"Automatic ArticleList(\" . $this->getUid() . \")::getArticles($number)\");\n\n try {\n $articles_sorted = $this->getSortedArticles($number, $start);\n } catch (tx_newspaper_EmptyParametrizedArticlelistException $e) {\n return array();\n }\n\n return array_map(function($record) { return $record['article']; }, $articles_sorted);\n }",
"private function getSortedArticles($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n $articles = $this->getArticlesAndOffsets($number, $start);\n\n $articles_sorted = $this->sortArticles($articles);\n $articles = array();\n foreach ($articles_sorted as $i => $article) {\n $articles[] = array($article['article']->getUid(), $article['offset']);\n }\n\n return array_slice($articles_sorted, 0, $number);\n }",
"function get_user_list($username,$start,$end){\n\t\t$sql=\"select * From article where article_author='$username' order by time desc\";\n\n\t\t$query=$this->db->query($sql);\n\t\t$result=$query->result();\n\t\treturn $result;\n\n\t}",
"public static function getList( $start_from,$numRows, $order=\"publicationDate DESC\" ) {\n \t\n }",
"function getSubRecordsIdList($uid_list,$depth=1,$beginLevel=0,$where=' ')\t{\r\n\t\t$depth = t3lib_div::intInRange($depth,0);\r\n\r\n\t\t$uid_list_arr = array_unique(t3lib_div::trimExplode(',',$uid_list,1));\r\n\t\t$uid_list='';\r\n\t\treset($uid_list_arr);\r\n\t\t\r\n\t\twhile(list(,$val)=each($uid_list_arr))\t{\r\n\t\t\t$val = t3lib_div::intInRange($val,0);\r\n\t\t\t$subids = $this->getTreeList($val,$depth,$beginLevel,$where);\r\n\t\t\t$uid_list.=$subids.',';\r\n\t\t}\r\n\t\t$uid_list = preg_replace('/,+$/','',$uid_list); \r\n\t\treturn $uid_list;\r\n\t}",
"function getRecordsIdList($uid_list,$depth=0,$beginLevel=0,$where=' ')\t{\r\n\r\n\t\t$uid_list_prepend = $uid_list;\r\n\t\t$uid_list=$this->getSubRecordsIdList($uid_list,$depth,$beginLevel,$where);\r\n\r\n\t\treturn str_replace(',,','',$uid_list_prepend.','.$uid_list);\r\n\t}",
"function ld_fetch_uids($event_id, $page = 0) {\n\t$entry_list = array();\n\n\t$query_offset = 25 * $page;\n\t$data = _ld_fetch_page('node/feed/'.$event_id.'/smart+parent/item/game/compo+jam?offset=' . $query_offset . '&limit=25');\n\t$json = json_decode($data, true);\n\t\n\tforeach($json['feed'] as $node) {\n $entry_list[] = $node['id'];\n\t}\n\n\treturn $entry_list;\n}",
"function comment_list($start, $limit) {\n\t global $database;\n\n\t $comment_array = Array();\n\t $comment_query = \"SELECT se_\".$this->comment_type.\"comments.*, se_users.user_id, se_users.user_username, se_users.user_photo FROM se_\".$this->comment_type.\"comments LEFT JOIN se_users ON se_\".$this->comment_type.\"comments.\".$this->comment_type.\"comment_authoruser_id=se_users.user_id WHERE \".$this->comment_type.\"comment_\".$this->comment_identifier.\"='\".$this->comment_identifying_value.\"' ORDER BY \".$this->comment_type.\"comment_id DESC LIMIT $start, $limit\";\n\t $comments = $database->database_query($comment_query);\n\t while($comment_info = $database->database_fetch_assoc($comments)) {\n\n\t // CREATE AN OBJECT FOR AUTHOR\n\t $author = new se_user();\n\t $author->user_info[user_id] = $comment_info[user_id];\n\t $author->user_info[user_username] = $comment_info[user_username];\n\t $author->user_info[user_photo] = $comment_info[user_photo];\n\n\t // SET COMMENT ARRAY\n\t $comment_array[] = Array('comment_id' => $comment_info[$this->comment_type.'comment_id'],\n\t\t\t\t\t'comment_author' => $author,\n\t\t\t\t\t'comment_date' => $comment_info[$this->comment_type.'comment_date'],\n\t\t\t\t\t'comment_body' => $comment_info[$this->comment_type.'comment_body']);\n\t }\n\n\t return $comment_array;\n\n\t}",
"function getArticlesOfProductAsUidList($pUid, $additionalWhere = '', $orderBy = '')\t{\n\t\t$where = 'uid_product=' .$pUid;\n\n\t\t$where .= ' AND deleted=0';\n\n\t\tif ($additionalWhere != '') {\n\t\t\t$where .= ' AND ' .$additionalWhere;\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tx_commerce_articles', $where, '', $orderBy);\n\t\tif ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)\t{\n\t\t\t$result = array();\n\t\t\twhile ($article = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t$result[] = $article['uid'];\n\t\t\t}\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function entries_between($begin, $end) {\n\tmysql_query(\"SELECT * from entries\");\n\twhile ($array = mysql_fetch_assoc()) {\n\t\tif ($array['id'] < $begin || \n\t\t $array['id'] > $end) {\n\t\t\tcontinue;\n\t\t}\n\t\t$retval[] = $array;\n\t}\n\n\treturn $retval;\n}",
"public static function getArticlesList( $numRows=100000, $order=\"publicationDate DESC\" ) {\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles\n ORDER BY :order LIMIT :numRows\";\n\n $stmt = $conn->prepare( $sql );\n\t$stmt->bindValue( \":order\", $order, PDO::PARAM_STR);\n $stmt->bindValue( \":numRows\", $numRows, PDO::PARAM_INT );\n $stmt->execute();\n $list = array();\n\n while ( $row = $stmt->fetch() ) {\n $article = new Article( $row );\n $list[] = $article;\n }\n\n // Get the total number of articles that satisfied the criteria\n $sql = \"SELECT FOUND_ROWS() AS totalRows\";\n $totalRows = $conn->query( $sql )->fetch();\n $conn = null;\n return ( array ( \"results\" => $list, \"totalRows\" => $totalRows[0] ) );\n }",
"function Get_All_Articles($nid=0,$use='',$future=0) {\n global $db;\n $Arts = array();\n $now = time() + $future*60*60*24;\n $qry = \"SELECT * FROM Articles \";\n if (!$nid) $qry .= \" WHERE ( StartDate='' OR StartDate<$now ) AND (StopDate='' OR StopDate>$now )\" . ($use? \" AND ( UsedOn='$use' ) \" :\"\");\n $qry .= \" ORDER BY UsedOn, Importance DESC, RelOrder DESC\";\n// echo \"$qry<p>\";\n $res = $db->query($qry);\n if ($res) while ($ns = $res->fetch_assoc()) $Arts[] = $ns;\n return $Arts;\n}",
"function get_agora_members_list(&$Db_object, &$databasetype, &$tableprefix, &$start, &$per_page)\n\t{\n\t\t$return_array = array();\n\n\n\t\t// Check that there is not a empty value\n\t\tif(empty($per_page)) { return $return_array; }\n\n\n\t\tif ($databasetype == 'mysql')\n\t\t{\n\t\t\t$sql = \"\n\t\t\tSELECT unixdate, userid\n\t\t\tFROM \" . $tableprefix . \"_users\n\t\t\tORDER BY unixdate\n\t\t\tLIMIT \" . $start . \",\" . $per_page;\n\n\n\t\t\t$user_list = $Db_object->query($sql);\n\n\n\t\t\twhile ($user = $Db_object->fetch_array($user_list))\n\t\t\t{\n\t\t\t\t$return_array[\"$user[unixdate]\"] = $user['userid'];\n\t\t\t}\n\t\t\treturn $return_array;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function queryUidList()\n {\n $this->applyCriteria();\n $this->applyScope();\n $model = $this->model->lists('uid');\n $this->resetModel();\n\n return $this->parserResult($model);\n }",
"function geteyeList(&$config,&$start,&$param)\n\t{\n\t\t$Count = 0;\n\t\t$page = $this->uri->segment(3,0); // page\n\t\t$isSession = $this->uri->segment(4,0); // read data from SESSION or POST (1 == POST , 0 = SESSION )\n\n\t\t$start = 0;\n\n\t\t$sortType \t\t= $param['sortType'];\n\t\t$sortField \t\t= $param['sortField'];\n\t\t$searchField \t= $param['searchField'];\n\t\t$searchString \t= $param['searchString'];\n\t\t$searchText \t= $param['searchText'];\n\t\t$searchFromDate\t= $param['searchFromDate'];\n\t\t$searchToDate \t= $param['searchToDate'];\n\t\t$searchAlpha\t= $param['searchAlpha'];\n\t\t$searchMode\t\t= $param['searchMode'];\n\t\t$searchDisplay \t= $param['searchDisplay'];\n\n\t\tif($isSession == 0)\n\t\t{\n\t\t\t$sortType \t= $this->nsession->get_param('ADMIN_EYE','sortType','DESC');\n\t\t\t$sortField \t= $this->nsession->get_param('ADMIN_EYE','sortField','id');\n\t\t\t$searchField \t= $this->nsession->get_param('ADMIN_EYE','searchField','');\n\t\t\t$searchString \t= $this->nsession->get_param('ADMIN_EYE','searchString','');\n\t\t\t$searchText \t= $this->nsession->get_param('ADMIN_EYE','searchText','');\n\t\t\t$searchFromDate = $this->nsession->get_param('ADMIN_EYE','searchFromDate','');\n\t\t\t$searchToDate \t= $this->nsession->get_param('ADMIN_EYE','searchToDate','');\n\t\t\t$searchAlpha \t= $this->nsession->get_param('ADMIN_EYE','searchAlpha','');\n\t\t\t$searchMode \t= $this->nsession->get_param('ADMIN_EYE','searchMode','STRING');\n\t\t\t$searchDisplay = $this->nsession->get_param('ADMIN_EYE','searchDisplay',20);\n\t\t}\n\n\t\t//========= SET SESSION DATA FOR SEARCH / PAGE / SORT Condition etc =====================\n\t\t$sessionDataArray = array();\n\t\t$sessionDataArray['sortType'] \t\t= $sortType;\n\t\t$sessionDataArray['sortField'] \t\t= $sortField;\n\t\tif($searchField!=''){\n\t\t\t$sessionDataArray['searchField'] \t= $searchField;\n\t\t\t$sessionDataArray['searchString'] \t= $searchString ;\n\t\t}\n\t\t$sessionDataArray['searchText'] \t= $searchText;\n\t\t$sessionDataArray['searchFromDate'] = $searchFromDate;\n\t\t$sessionDataArray['searchToDate'] \t= $searchToDate;\n\t\t$sessionDataArray['searchAlpha'] \t= $searchAlpha;\n\t\t$sessionDataArray['searchMode'] \t= $searchMode;\n\t\t$sessionDataArray['searchDisplay'] \t= $searchDisplay;\n\n\t\t$this->nsession->set_userdata('ADMIN_EYE', $sessionDataArray);\n\t\t//==============================================================\n\t\t$this->db->select('COUNT(id) as TotalrecordCount');\n\t\tif(isset($sessionDataArray['searchField'])){\n\t\t\t$this->db->like($sessionDataArray['searchField'],$sessionDataArray['searchString'],'both');\n\t\t}\n\t\t$this->db->select('eye_type.*');\n\n\t\t$recordSet = $this->db->get('eye_type');\n\t\t$config['total_rows'] = 0;\n\t\t$config['per_page'] = $searchDisplay;\n\t\tif ($recordSet)\n\t\t{\n\t\t\t$row = $recordSet->row();\n\t\t\t$config['total_rows'] = $row->TotalrecordCount;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif($page > 0 && $page < $config['total_rows'] )\n\t\t\t$start = $page;\n\t\t\t$this->db->select('eye_type.*');\n\t\t\tif(isset($sessionDataArray['searchField'])){\n\t\t\t\t$this->db->like($sessionDataArray['searchField'],$sessionDataArray['searchString'],'both');\n\t\t\t}\n\n\t\t$this->db->order_by($sortField,$sortType);\n\t\t$this->db->limit($config['per_page'],$start);\n\t\t$recordSet = $this->db->get('eye_type');\n\t\t//echo $this->db->last_query();\n\t\t$rs = false;\n\n\t\tif ($recordSet->num_rows() > 0)\n {\n \t$rs = array();\n\t\t\t$isEscapeArr = array();\n\t\t\tforeach ($recordSet->result_array() as $row)\n\t\t\t{\n\t\t\t\tforeach($row as $key=>$val){\n\t\t\t\t\tif(!in_array($key,$isEscapeArr)){\n\t\t\t\t\t\t$recordSet->fields[$key] = outputEscapeString($val);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t$rs[] = $recordSet->fields;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $rs;\n\t}",
"public function getList( $numRows=1000000, $order=\"publicationDate DESC\") {\n\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n\t$sql = \"SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles ORDER BY \" . $order . \" LIMIT :numRows\";\n\t$st = $conn->prepare( $sql );\n\t$st->bindValue(\":numRows\", $numRows, PDO::PARAM_INT);\n\t$st->execute();\n\t$list = array();\n\n\twhile ( $row = $st->fetch() ) {\n\t\t$article = new Article( $row );\n\t\t$list[] = $article;\n\t}\n\n\t// Now get total number of articles that matched the criteria\n\t$sql = \"SELECT FOUND_ROWS() AS totalRows\";\n\t$totalRows = $conn->query( $sql )->fetch();\n\t$conn = null;\n\treturn (array( \"results\" => $list, \"totalRows\" => $totalRows[0]));\n\n}",
"public function getConversationIdsInRange($start, $limit)\r\n {\r\n $db = $this->_getDb();\r\n\r\n return $db->fetchCol(\r\n $db->limit(\r\n '\r\n SELECT conversation_id\r\n FROM xf_conversation_master\r\n WHERE conversation_id > ?\r\n ORDER BY conversation_id\r\n ', $limit), $start);\r\n }",
"public function executeListIdentifiers()\n {\n if ($this->getRequestParameter('metadataPrefix', 'vacio') != 'oai_dc'){\n return $this->error('cannotDisseminateFormat', 'cannotDisseminateFormat');\n }\n \n $c = new Criteria();\n $this->filter($c);\n\n\n $this->mms = MmPeer::doSelectPublicWithI18n($c, $this->getUser()->getCulture());\n if (count($this->mms) == 0) return $this->error('noRecordsMatch', \n 'The combination of the values of the from, until, and set arguments results in an empty list');\n\n\n // Falta comprobar si el Repository soporta sets (noSetHierarchy)\n\n // y lo del ResumptionToken (badResumptionToken)\n\n\n\n\n }",
"function _getSubRecordsIdList($uidList,$level=1,$table='',$where='')\t{\r\n\t\t$table=$table?$table:$this->tableAlias;\r\n\t\t$rows = $this->getSubRecords ($uidList,$level,'uid',$table,$where);\r\n\t\treturn implode(',',array_keys($rows));\r\n\t}",
"function get_private_events_in_date_range ($start, $end) {\n // It only gets blocks of events with a solid start and a solid end.\n // if you want weekly classes you need a different table \n $query='SELECT \n private_event.start AS start, \n private_event.participant_id AS participant_id, \n DATE_FORMAT(private_event.start, \"%h:%i\") AS start_time, \n private_event.id AS private_event_id, \n location.location, \n leader.fname, \n CONCAT(participant.fname, \" \", participant.lname) AS participant_fullname,\n participant.dob AS participant_dob,\n period_diff(DATE_FORMAT(now(), \"%Y%m\"), DATE_FORMAT(participant.dob, \"%Y%m\") ) as participant_age_months,\n DATEDIFF(\"'.$end.'\", \"'.$start.'\") as num_days,\n private_event.duration \n FROM private_event \n LEFT JOIN leader ON private_event.leader_id=leader.id \n LEFT JOIN location ON private_event.location_id=location.id \n LEFT JOIN participant ON private_event.participant_id=participant.id \n WHERE DATE_FORMAT (private_event.start, \"%Y-%m-%d\") =\"'.$start.'\" \n AND DATE_FORMAT(private_event.end, \"%Y-%m-%d\") = \"'.$end.'\" ORDER BY start';\n // wow past-troy you were a crazy bastard\n // debug // echo '<pre>'.$query.'</pre>';\n if ($result = $this->db->query($query)) {\n return $result;\n } else {\n echo \"arg!<br>\"; \n echo $query;die();\n }\n }",
"public function ItemList ($intStart, $intLength)\n\t\t{\n\t\t\t$_DATA = Array ();\n\t\t\t\n\t\t\t// Pull all Id values which match against the Constraints\n\t\t\t// that are within the page limit\n\t\t\t$selSearchResults = new StatementSelect (\n\t\t\t\t$this->_strTable, \n\t\t\t\t'Id', \n\t\t\t\t$this->_arrConditions,\n\t\t\t\t$this->_strOrderClause,\n\t\t\t\t$intStart . ', ' . $intLength,\n\t\t\t\t'',\n\t\t\t\t$this->_database\n\t\t\t);\n\t\t\t\n\t\t\t$selSearchResults->Execute ($this->_arrConditions);\n\t\t\t\n\t\t\t// Store the Results as Objects in an array\n\t\t\twhile ($Item = $selSearchResults->Fetch ())\n\t\t\t{\n\t\t\t\t$_DATA [] = $this->Push ($this->ItemId ($Item ['Id']));\n\t\t\t}\n\t\t\t\n\t\t\treturn $_DATA;\n\t\t}",
"function getUidListFromList($list)\t{\n\t\t$result = array();\n\t\tif(is_array($list)){\n\t\t foreach ($list as $item)\t{\n\t\t\t$uid = $this->getUidFromKey($item, $keyData);\n\t\t\tif ($uid > 0) $result[] = $uid;\n\t\t }\n\t\t}\n\t\treturn $result;\n\t}",
"function retrieveUsers($start=0,$limit=0,$filter=array()) {\n\n if ($this->users === null) $this->_loadUserData();\n\n ksort($this->users);\n\n $i = 0;\n $count = 0;\n $out = array();\n $this->_constructPattern($filter);\n\n foreach ($this->users as $user => $info) {\n if ($this->_filter($user, $info)) {\n if ($i >= $start) {\n $out[$user] = $info;\n $count++;\n if (($limit > 0) && ($count >= $limit)) break;\n }\n $i++;\n }\n }\n\n return $out;\n }",
"public function get_articles_number(){\n\t\treturn $this->table_rows(Tables::articles());\n\t}",
"public function setArticles()\n {\n $return = $this->database\n ->table($this->articleTable);\n\n if (!is_null($this->fulltext)) {\n $return->where(\"name LIKE ?\", \"%$this->fulltext%\");\n }\n\n if (!is_null($this->public)) {\n $return->where('is_public', $this->public);\n }\n\n if (!is_null($this->delete)) {\n $return->where('is_delete', $this->delete);\n }\n\n if ($this->whiteList !== null) {\n $return->where('article.id_article', (array)$this->whiteList);\n if (count($this->whiteList) > 0) {\n $return->order('FIELD(article.id_article, ?)', (array)$this->whiteList);\n }\n }\n\n if ($this->blackList) {\n $return->where('id_article NOT', (array)$this->blackList);\n }\n\n if ($this->category) {\n $return->where(':category_has_article.id_category', $this->category);\n }\n\n if ($this->manufacturer) {\n $return->where('id_manufacturer', $this->manufacturer);\n }\n\n if ($this->priceRange) {\n $return->where('(end_price >= ? AND end_price <= ?)', $this->priceRange[0], $this->priceRange[1]);\n }\n\n if ($this->limit || $this->offset) {\n $return->limit($this->limit, $this->offset);\n }\n\n $return->order($this->order);\n\n $return->group('id_article');\n\n $this->articleList = $return;\n }",
"public function get_article_list_by_userid($user_id, $from = null, $num = null, $q = ''){\n if($from === null) $from = 0;\n if($num === null) $num = 20;\n $step = FALSE;\n\n $db = new DB;\n sql:\n if(!empty($q)){\n $res = $db->query('SELECT * FROM article WHERE USER = ?\n and (TITLE LIKE ? or CONTENT LIKE ?)\n ORDER BY PUBLISH DESC LIMIT ?, ?',\n $user_id, \"%$q%\", \"%$q%\",\n (int)$from, (int)$num);\n }else{\n $res = $db->query('SELECT * FROM article WHERE USER = ?\n ORDER BY PUBLISH DESC LIMIT ?, ?',\n $user_id, (int)$from, (int)$num);\n }\n\n if($step) goto record;\n // generate list\n $this->_article_info_list = $this->_generate_article_list($res);\n\n // detect _next\n $num++;\n $step = TRUE;\n goto sql;\n\n record:\n $this->_next = ($res->num_rows == $num)? $from + $num - 1 : -1;\n return $this->_article_info_list;\n }",
"function diagnosa_list($filter,$start,$end){\r\n\t\t\t$query = \"SELECT * FROM diagnosa\";\r\n\t\t\t\r\n\t\t\t// For simple search\r\n\t\t\tif ($filter<>\"\"){\r\n\t\t\t\t$query .=eregi(\"WHERE\",$query)? \" AND \":\" WHERE \";\r\n\t\t\t\t$query .= \" (diagnosa_id LIKE '%\".addslashes($filter).\"%' OR diagnosa_kode LIKE '%\".addslashes($filter).\"%' OR diagnosa_kategori LIKE '%\".addslashes($filter).\"%' OR diagnosa_nama LIKE '%\".addslashes($filter).\"%' OR diagnosa_keterangan LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$result = $this->db->query($query);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t$limit = $query.\" LIMIT \".$start.\",\".$end;\t\t\r\n\t\t\t$result = $this->db->query($limit); \r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}",
"public function getLotteryList($num, $offset){\n\t\t$query = $this->db->query(\"SELECT * FROM s50_001_user where account > 0 and other=0 order by account asc LIMIT ?,?\", array($offset+0, $num));\n\t\treturn $query;\n\t}",
"public function getUsers($restrictions=array()) {\n if (strpos($this->value, '_children') !== false) {\n $realValue = substr($this->value, 0, strpos($this->value, '_children'));\n $users = DBManager::get()->fetchFirst(\"SELECT `user_id` FROM `\".\n $this->userDataDbTable.\"` WHERE `\".$this->userDataDbField.\n \"` IN (SELECT `\".$this->userDataDbField.\"` FROM `\".\n $this->valuesDbTable.\"` WHERE `fakultaets_id`\".$this->compareOperator.\n \"? AND `Institut_id` IN (?) AND `inst_perms` = 'user')\",\n array($realValue, array_keys($this->config['institutes'])));\n } else {\n $users = DBManager::get()->fetchFirst(\"SELECT `user_id` \".\n \"FROM `user_inst` \".\n \"INNER JOIN `Institute` ON (`user_inst`.`Institut_id`=`Institute`.`Institut_id`) \".\n \"WHERE `user_inst`.`Institut_id`\".$this->compareOperator.\n \"? AND `user_inst`.`inst_perms` = 'user'\", array($this->value));\n }\n return $users;\n }",
"function unedtrivial_get_participants($unedid){\n GLOBAL $DB;\n \n $total = $DB->count_records_sql('SELECT COUNT(id)'\n . ' FROM {unedtrivial_mails} m'\n . ' WHERE m.idunedtrivial = ?', array($unedid));\n return $total;\n}"
] | [
"0.64478326",
"0.6412366",
"0.5508505",
"0.5467744",
"0.5387804",
"0.5312098",
"0.5195937",
"0.5091539",
"0.5063772",
"0.5037717",
"0.503428",
"0.5001784",
"0.4999919",
"0.49939916",
"0.49820185",
"0.49737152",
"0.49037078",
"0.48980784",
"0.48638836",
"0.4843467",
"0.480091",
"0.47990477",
"0.4748192",
"0.4733496",
"0.47272408",
"0.47043636",
"0.47031134",
"0.46811074",
"0.46791288",
"0.4671349"
] | 0.7411073 | 0 |
/ Get all offsets for the supplied UIDs \param $uids The UIDs for which to look up the offsets \return \code array( $uid => $offset, ... ) \endcode | public function getOffsets(array $uids) {
$timer = tx_newspaper_ExecutionTimer::create();
if (!$uids) return array();
$results = tx_newspaper::selectRows(
'uid_foreign, offset',
self::mm_table,
'uid_local = ' . intval($this->getUid()) .
' AND uid_foreign IN (' . implode(',', $uids) . ')'
);
$offsets = array();
foreach ($uids as $uid) {
foreach ($results as $result) {
if (intval($result['uid_foreign']) == intval($uid)) {
$offsets[intval($uid)] = $result['offset'];
break;
}
}
if (!isset($offsets[intval($uid)])) $offsets[intval($uid)] = 0;
}
return $offsets;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getEventsByUid($uids);",
"public function findByUids($uids) {\n\n\t\t$query = $this->createQuery();\n\t\t$constraints = array();\n\t\tif (!empty($uids)) {\n\t\t\t$constraints[] = $query->in('uid', $uids);\n\t\t}\n\t\tif (!empty($constraints)) {\n\t\t\t$query->matching($query->logicalAnd($constraints));\n\t\t}\n\n\t\treturn $query->execute();\n\t}",
"public function findByUids($uids) {\n\t\t$query = $this->createQuery();\n\t\t\n\t\t$query->matching(\n\t\t\t$query->in('uid', $uids)\n\t\t);\n\t\t\n\t\treturn $query->execute();\n\t}",
"function findAllMatchUidWithin($uids, $expression = null)\n {\n $objIds = [];\n foreach ($uids as $id)\n $objIds[] = $this->attainNextIdentifier($id);\n\n\n // Query Condition By Expression\n\n $queryConditions = [\n '_id' => [\n '$in' => $objIds\n ]\n ];\n\n if ($expression !== null) {\n $queryConditions\n += \\Module\\MongoDriver\\buildMongoConditionFromExpression($expression);\n }\n\n $r = $this->_query()->find(\n $queryConditions,\n [\n 'sort' => [\n '_id' => -1,\n ]\n ]\n );\n\n return $r;\n }",
"public function getMappings($snuids);",
"public function getUsers($uids, $ego = NULL) {\n $userBatch = array();\n if (!is_null($ego) && !is_null($auth = $ego->getAuth())) {\n // use the user authToken to fetch users\n $token = $auth->token;\n $userBatch = $this->_getUsers($uids, $token);\n $missed = array();\n foreach ($uids as $uid) {\n if (!isset($userBatch[$uid])) $missed[] = $uid;\n }\n } else {\n $missed = $uids;\n }\n\n $appBatch = array();\n if (!empty($missed) && !is_null($this->_appId) && !is_null($this->_appSecret)) {\n $token = \"$this->_appId|$this->_appSecret\";\n $appBatch = $this->_getUsers($uids, $token);\n }\n\n $raw = $userBatch + $appBatch;\n if (empty($raw)) return array();\n\n // parse the raw blob strings into User object and filter with fields\n $users = array();\n foreach ($raw as $uid => $blob) {\n $users[$uid] = User::parse($blob);\n }\n return $users;\n }",
"private function _getUsers($uids, $egoToken) {\n $batch = new FacebookBatchedRequests();\n $userFields = User::getFields();\n foreach ($uids as $uid) {\n $batch->addRequest('GET', \"/$uid?fields=\" . $userFields, NULL, $uid);\n }\n $batchResp = $batch->send($this->_graphUrl, $egoToken, $this->_maxBatch);\n\n $results = array();\n foreach ($uids as $uid) {\n if (isset($batchResp[$uid])) $results[$uid] = $batchResp[$uid];\n }\n return $results;\n }",
"public function paginate(array $uids, int $page = 1, int $per_page = 10)\n\t{\n\t\tif (count($uids) < $per_page * $page)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->get_messages(array_slice($uids, $per_page * $page - $per_page, $per_page));\n\t}",
"private function _parse_uids($uids, $mailbox)\n {\n if ($uids === '*' || $uids === '1:*') {\n if (empty($this->search_set)) {\n $uids = '1:*';\n $all = true;\n }\n // get UIDs from current search set\n // @TODO: skip fetchUIDs() and work with IDs instead of UIDs (?)\n else {\n if ($this->search_threads)\n $uids = $this->conn->fetchUIDs($mailbox, array_keys($this->search_set['depth']));\n else\n $uids = $this->conn->fetchUIDs($mailbox, $this->search_set);\n \n // save ID-to-UID mapping in local cache\n if (is_array($uids))\n foreach ($uids as $id => $uid)\n $this->uid_id_map[$mailbox][$uid] = $id;\n\n $uids = join(',', $uids);\n }\n }\n else {\n if (is_array($uids))\n $uids = join(',', $uids);\n\n if (preg_match('/[^0-9,]/', $uids))\n $uids = '';\n }\n\n return array($uids, (bool) $all);\n }",
"public function GetMyFollowers($UID)\r\n {\r\n // section -64--88-52-1--43214224:1325c0244f0:-8000:0000000000000982 begin\r\n // section -64--88-52-1--43214224:1325c0244f0:-8000:0000000000000982 end\r\n }",
"public function assembleFromUIDs(array $uids) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n $this->clearList();\n\n foreach ($uids as $uid) {\n\n self::checkArticleOffsetValidity($uid);\n\n $offset = intval($uid[1]);\n if ($offset == 0) continue;\n\n tx_newspaper::insertRows(\n self::mm_table,\n array('uid_local' => intval($this->getUid()),\n 'uid_foreign' => $uid[0],\n 'offset' => $offset)\n );\n\n }\n\n $this->callSaveHooks();\n\n }",
"public function getLidsOffset(int $offset) {\n \n // Call getAllLidsOffset method in lidDataService and set to variable\n $lids = $this->getAllLidsOffset($offset);\n \n // Return array of lids\n return $lids;\n }",
"public function timezonesCollectionWithOffsets()\n {\n $utcTime = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $timezoneList = $this->timezonesCollection()->map(function ($timezoneIdentifier) use ($utcTime) {\n $offset = (int) (new \\DateTimeZone($timezoneIdentifier))->getOffset($utcTime);\n\n return ['offset' => $offset, 'identifier' => $timezoneIdentifier];\n })->sort(function ($a, $b) {\n return ($a['offset'] === $b['offset']) ? strcmp($a['identifier'], $b['identifier']) : $a['offset'] - $b['offset'];\n })->keyBy('identifier')->map(function ($timezoneArray) {\n $sign = ($timezoneArray['offset'] > 0) ? '+' : '-';\n $offset = '(UTC '.$sign.gmdate('H:i', abs($timezoneArray['offset'])).') '.$timezoneArray['identifier'];\n\n return $offset;\n });\n\n return $timezoneList;\n }",
"public function getIdsAt($offset)\n {\n return $this->get(self::IDS, $offset);\n }",
"public function getIdsAt($offset)\n {\n return $this->get(self::IDS, $offset);\n }",
"public function findListByUid(int $uid, int $limit=5)\n {\n $res = $this->address->findListByUid($uid, $limit);\n\n return $res;\n }",
"public function lookup(array $uids): array\n {\n $provider = AwsCredentialProvider::defaultProvider();\n $credentials = $provider()->wait();\n\n // Builds an array of Requests to send\n // The key for each request is the original uid.\n $requests = array_combine(\n $uids, // Use as array key\n array_map(function ($v) use ($credentials) {\n $url = $this->apiBaseUri . sprintf(\"/v1/use-an-lpa/lpas/%s\", $v);\n\n $request = new Request('GET', $url, $this->buildHeaders());\n\n return $this->awsSignature->signRequest($request, $credentials);\n }, $uids)\n );\n\n //---\n\n // Responses from the pool\n $results = [];\n\n $pool = new Pool($this->httpClient, $requests, [\n 'concurrency' => 50,\n 'options' => [\n 'http_errors' => false,\n ],\n 'fulfilled' => function ($response, $id) use (&$results) {\n $results[$id] = $response;\n },\n 'rejected' => function ($reason, $id) {\n // Log?\n },\n ]);\n\n // Initiate transfers and create a promise\n $promise = $pool->promise();\n\n // Force the pool of requests to complete\n $promise->wait();\n\n //---\n\n // Handle all request response now\n foreach ($results as $uid => $result) {\n $statusCode = $result->getStatusCode();\n\n switch ($statusCode) {\n case 200:\n # TODO: We can some more error checking around this.\n $results[$uid] = new Response\\Lpa(\n $this->sanitiser->sanitise(json_decode((string)$result->getBody(), true)),\n new DateTime($result->getHeaderLine('Date'))\n );\n break;\n default:\n // We only care about 200s at the moment.\n unset($results[$uid]);\n }\n }\n\n return $results;\n }",
"public function findByUids(int $limit, string $uids)\n {\n $uids = explode(',', $uids);\n\n $query = $this->createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n\n $query->matching(\n $query->in('uid', $uids)\n );\n if ($limit) {\n $query->setLimit($limit);\n }\n\n return $this->orderByField($query->execute(), $uids);\n }",
"public function getStaticIdList(int $uid): array\n {\n $queryBuilder = $this->getQueryBuilder($this->table);\n\n $queryBuilder\n ->selectLiteral('DISTINCT ' . $this->table . '.uid', $this->table . '.email')\n ->from('sys_dmail_group_mm', 'sys_dmail_group_mm')\n ->innerJoin(\n 'sys_dmail_group_mm',\n 'sys_dmail_group',\n 'sys_dmail_group',\n $queryBuilder->expr()->eq(\n 'sys_dmail_group_mm.uid_local',\n $queryBuilder->quoteIdentifier('sys_dmail_group.uid')\n )\n )\n ->innerJoin(\n 'sys_dmail_group_mm',\n $this->table,\n $this->table,\n $queryBuilder->expr()->eq(\n 'sys_dmail_group_mm.uid_foreign',\n $queryBuilder->quoteIdentifier($this->table . '.uid')\n )\n )\n ->andWhere(\n $queryBuilder->expr()->and()\n ->add(\n $queryBuilder->expr()->eq(\n 'sys_dmail_group_mm.uid_local',\n $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)\n )\n )\n ->add(\n $queryBuilder->expr()->eq(\n 'sys_dmail_group_mm.tablenames',\n $queryBuilder->createNamedParameter($this->table)\n )\n )\n ->add(\n $queryBuilder->expr()->neq(\n $this->table . '.email',\n $queryBuilder->createNamedParameter('')\n )\n )\n ->add(\n $queryBuilder->expr()->eq(\n 'sys_dmail_group.deleted',\n $queryBuilder->createNamedParameter(0, Connection::PARAM_INT)\n )\n )\n )\n ->orderBy($this->table . '.uid')\n ->addOrderBy($this->table . '.email');\n\n $res = $queryBuilder->executeQuery();\n\n $outArr = [];\n\n while ($row = $res->fetchAssociative()) {\n $outArr[] = $row['uid'];\n }\n\n return $outArr;\n }",
"public function getAreaIdsAt($offset)\n {\n return $this->get(self::area_ids, $offset);\n }",
"public function find_offset_list($offset = 0, $limit = 10) {\n\t\treturn $this->db->offset($offset)->limit($limit)->order_by('id')->get($this->_table)->result();\n\t}",
"public function getAllLoansInfo($uid) {\n try {\n $this->ipapedi_db = $this->load->database('ipapedi_db', true);\n $this->ipapedi_db->select('*');\n $this->ipapedi_db->from('db_dt_prestamos');\n $this->ipapedi_db->where('cedula', $uid);\n $query = $this->ipapedi_db->get();\n if (empty($query->result())) {\n return [];\n } else {\n return $query->result();\n }\n } catch (Exception $e) {\n throw $e;\n }\n }",
"public function retrieveUsers(array $uids)\n {\n if (!is_array($uids) || !count($uids)) {\n return false;\n }\n\n $result = array();\n\n $result = AdvMySql::getTable('mybb_users')\n ->select(\n 'mybb_users.uid,mybb_sessions.sid,username,password,salt,loginkey'.\n ',email,avatar,avatardimensions,avatartype,usergroup,usertitle'\n )\n ->doNotPrependTableName()\n ->leftJoin('mybb_sessions', 'mybb_users.uid = mybb_sessions.uid')\n ->where('mybb_users.uid', $uids)->execute();\n\n\n if (!count($result)) {\n return false;\n }\n\n foreach ($result as $x => $y) {\n $this->data_users[$y['uid']] = $y;\n }\n\n return true;\n }",
"public function getToPeerIdsAt($offset)\n {\n return $this->get(self::TOPEERIDS, $offset);\n }",
"public function getUsersByIds($ids)\n {\n if (empty($ids)) {\n return;\n }\n\n $users = Dao_Users::select()\n ->where_in('id', $ids)\n ->cached(Date::MINUTE * 10, 'users_by_ids:' . implode(',', $ids))\n ->execute();\n\n if (!$users) {\n return array();\n }\n\n $models = array();\n\n foreach ($users as $user_row) {\n $models[] = $this->rowToModel($user_row);\n }\n\n return $models;\n }",
"public static function fetchFromIds(array $ids): array;",
"public function listAllOwners(): ?array\n {\n $body = '<Pull_ListAllOwners_RQ>';\n $body .= $this->getAuthenticationXml();\n $body .= '</Pull_ListAllOwners_RQ>';\n\n $response = $this->sendRequest($body);\n $result = array();\n if ($response->successful() && $this->isRuSuccessful()) {\n $XMLObject = new \\SimpleXMLElement($response->body());\n $collection = $XMLObject->Owners->Owner;\n foreach ($collection as $item) {\n $arr = $this->xmlToArray($item, false);\n $owner = $arr['Owner'];\n $owner['OwnerID'] = $arr['OwnerID'];\n $result[] = $owner;\n }\n }\n\n $this->result = $result;\n return $result;\n }",
"public function getListByIds($ids);",
"public function getUsersByIdsExceptIds(Collection $exceptIds, Collection $ids) : array\n {\n $cacheKey = 'UserRepository.getUsersByIdsExceptIds';\n\n return $this->cache($this->cacheTags, $cacheKey, $this->cacheInterval, function () use ($exceptIds, $ids) {\n return $this->toArray(UserEloquent::whereIn('id', $ids)->whereNotIn('id', $exceptIds)->get());\n });\n }",
"public function __invoke($userId)\n {\n $userFollowings = $this->getFollowDao()->fetchAllBy('user_id_audience',$userId);\n if($userFollowings) {\n $users = array();\n foreach($userFollowings as $userFollowing) {\n $users[] = $userFollowing->user_id_following;\n }\n }\n \n return $users;\n }"
] | [
"0.6404703",
"0.6307155",
"0.623608",
"0.57927793",
"0.5787454",
"0.57517123",
"0.5708091",
"0.5493874",
"0.53363925",
"0.51553464",
"0.5122793",
"0.510107",
"0.5081748",
"0.50797635",
"0.50797635",
"0.50513655",
"0.5041286",
"0.49691483",
"0.4958675",
"0.4958537",
"0.4929742",
"0.48675668",
"0.4852483",
"0.48361352",
"0.48165798",
"0.48102078",
"0.47520083",
"0.4727494",
"0.47172529",
"0.46578822"
] | 0.85170925 | 0 |
/ Sort articles, taking their offsets into account \param $articles array( array( 'article' => tx_newspaper_Article object 'offset' => offset to move article up or down in array ) ...) \return $articles sorted, taking offsets into account \attention repeatedly calling this function will garble the results! | private static function sortArticles(array $articles) {
$temp_articles = array();
foreach ($articles as $i => $article) {
if (array_key_exists('offset', $article)) $offset_key = 'offset';
else $offset_key = 1;
$scaled_offset = $article[$offset_key]*(1+self::EPSILON);
$new_index = $i-$scaled_offset;
$temp_articles["$new_index"] = $article;
}
ksort($temp_articles);
$new_articles = array();
foreach($temp_articles as $article) $new_articles[] = $article;
return $new_articles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getSortedArticles($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create();\n\n $articles = $this->getArticlesAndOffsets($number, $start);\n\n $articles_sorted = $this->sortArticles($articles);\n $articles = array();\n foreach ($articles_sorted as $i => $article) {\n $articles[] = array($article['article']->getUid(), $article['offset']);\n }\n\n return array_slice($articles_sorted, 0, $number);\n }",
"function sort() {\n usort($this->feeds,array(\"RssMerger\",\"feeds_cmp\"));\n }",
"protected function parseArticles(Database_Result $objArticles, $objTemplate=false)\n\t{\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tglobal $objPage;\n\t\t$this->import('String');\n\t\t$this->import('News4wardHelper');\n\n\t\t$arrArticles = array();\n\t\t$limit = $objArticles->numRows;\n\t\t$count = 0;\n\n\t\twhile ($objArticles->next())\n\t\t{\n\t\t\t// init FrontendTemplate if theres no object given\n\t\t\tif(!$objTemplate)\n\t\t\t{\n\t\t\t\t$objTemplate = new FrontendTemplate($this->news4ward_template);\n\t\t\t}\n\t\t\t$objTemplate->setData($objArticles->row());\n\n\t\t\t$objTemplate->count = ++$count;\n\t\t\t$objTemplate->class = (strlen($objArticles->cssClass) ? ' ' . $objArticles->cssClass : '') . (($count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % 2) == 0) ? ' odd' : ' even');\n\t\t\t$objTemplate->link = $this->News4wardHelper->generateUrl($objArticles);\n\t\t\t$objTemplate->archive = $objArticles->archive;\n\n\t\t\t// Clean the RTE output for the TEASER\n\t\t\tif ($objArticles->teaser != '')\n\t\t\t{\n\t\t\t\tif ($objPage->outputFormat == 'xhtml')\n\t\t\t\t{\n\t\t\t\t\t$objArticles->teaser = $this->String->toXhtml($objArticles->teaser);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objArticles->teaser = $this->String->toHtml5($objArticles->teaser);\n\t\t\t\t}\n\n\t\t\t\t$objTemplate->teaser = $this->String->encodeEmail($objArticles->teaser);\n\t\t\t}\n\n\n\t\t\t// Generate ContentElements\n\t\t\t$objContentelements = $this->Database->prepare('SELECT id FROM tl_content WHERE pid=? AND do=\"news4ward\" ' . (!BE_USER_LOGGED_IN ? \" AND invisible=''\" : \"\") . ' ORDER BY sorting ')->execute($objArticles->id);\n\t\t\t$strContent = '';\n\t\t\twhile($objContentelements->next())\n\t\t\t{\n\t\t\t\t$strContent .= $this->getContentElement($objContentelements->id);\n\t\t\t}\n\n\t\t\t// Clean the RTE output for the CONTENT\n\t\t\tif ($strContent != '')\n\t\t\t{\n\t\t\t\t// Clean the RTE output\n\t\t\t\tif ($objPage->outputFormat == 'xhtml')\n\t\t\t\t{\n\t\t\t\t\t$strContent = $this->String->toXhtml($strContent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strContent = $this->String->toHtml5($strContent);\n\t\t\t\t}\n\n\t\t\t\t$strContent = $this->String->encodeEmail($strContent);\n\t\t\t}\n\n\t\t\t$this->Template->content = $strContent;\n\n\n\t\t\t// Add meta information\n\t\t\t$arrMeta = $this->getMetaFields($objArticles);\n\t\t\t$objTemplate->date = $arrMeta['date'];\n\t\t\t$objTemplate->hasMetaFields = count($arrMeta) ? true : false;\n\t\t\t$objTemplate->timestamp = $objArticles->start;\n\t\t\t$objTemplate->author = $arrMeta['author'];\n\t\t\t$objTemplate->datetime = date('Y-m-d\\TH:i:sP', $objArticles->start);\n\n\t\t\t// Add teaser image\n\t\t\tif($objArticles->teaserImage && is_file(TL_ROOT.'/'.$objArticles->teaserImage))\n\t\t\t{\n\t\t\t\t$imgSize = deserialize($this->imgSize,true);\n\t\t\t\tif(count($imgSize)>1)\n\t\t\t\t{\n\t\t\t\t\t$objTemplate->teaserImage = $this->getImage($objArticles->teaserImage,$imgSize[0],$imgSize[1],$imgSize[2]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objTemplate->teaserImage = $objArticles->teaserImage;\n\t\t\t\t}\n\t\t\t\t$objTemplate->teaserImageRaw = $objTemplate->teaserImag;\n\t\t\t}\n\n\n\t\t\t// HOOK: add custom logic\n\t\t\tif(isset($GLOBALS['TL_HOOKS']['News4wardParseArticle']) && is_array($GLOBALS['TL_HOOKS']['News4wardParseArticle']))\n\t\t\t{\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['News4wardParseArticle'] as $callback)\n\t\t\t\t{\n\t\t\t\t\t$this->import($callback[0]);\n\t\t\t\t\t$this->$callback[0]->$callback[1]($this,$objArticles,$objTemplate);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrArticles[] = $objTemplate->parse();\n\t\t}\n\n\t\treturn $arrArticles;\n\t}",
"public function getArticlesList($pageOffset, $nbArticlesPerPage, $sortingMethod='DESC'){\n\t\t$sql = '\n\t\tSELECT *\n\t\tFROM articles\n\t\tORDER BY art_inserted '.$sortingMethod.'\n\t\tLIMIT '.$pageOffset.','.$nbArticlesPerPage.'\n\n\t\t';\n\n\t\t$sth = $this->dbh->prepare($sql);\n\n\t\tif ($sth->execute() === false) {\n\t\t\tprint_r($sth->errorInfo());\n\t\t} else {\n\t\t\treturn $sth->fetchAll();\n\t\t}\n\t}",
"public function asort();",
"protected function groupArticlesByYear(array $articles): array\n {\n $articlesGrouped = [];\n foreach ($articles as $item) {\n $year = substr($item->date, 0, 4);\n $articlesGrouped[$year][] = $item;\n }\n\n return $articlesGrouped;\n }",
"function show_articles($article_ids) {\n global $articles;\n $index = 0;\n foreach ($articles as $article) {\n if (in_array(intval($article['order']), $article_ids)) {\n echo get_article_html($index++, $article);\n }\n }\n}",
"public function sort();",
"public function doSort();",
"public function getArticles() {\n\t\t$this->plxMotor = plxMotor::getInstance();\n\t\t$art = array();\n\t\t\n\t\t$plxGlob_arts = clone $this->plxMotor->plxGlob_arts;\n\t\tif($files = $plxGlob_arts->query('/^[0-9]{4}.[home|'.$this->plxMotor->activeCats.',]*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/','art','sort',0,false,'before')) {\n\t\t\tforeach($files as $filename) {\n\t\t\t\tif(preg_match('/[0-9]{4}.([home|'.$this->plxMotor->activeCats.',]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/',$filename,$capture)){\n\t\t\t\t\t$catIds=explode(',',$capture[1]);\n\t\t\t\t\t$activeCats=explode(',',$this->plxMotor->activeCats);\n\t\t\t\t\tforeach($catIds as $catId) {\n\t\t\t\t\t\tif(in_array($catId, $activeCats)) {\n\t\t\t\t\t\t\t$tmp = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$filename);\n\t\t\t\t\t\t\t$y = substr($tmp['date'], 0,4);\n\t\t\t\t\t\t\t$m = substr($tmp['date'],4,2);\n\t\t\t\t\t\t\t$d = substr($tmp['date'],6,2);\n\t\t\t\t\t\t\t$art[$y][$y.$m.$d] = array(\n\t\t\t\t\t\t\t\t'month'\t=> $m,\n\t\t\t\t\t\t\t\t'day'\t=> $d,\n\t\t\t\t\t\t\t\t'url' \t=> $this->plxMotor->urlRewrite('?archives/'.$y.'/'.$m.'/'.$d),\n\t\t\t\t\t\t\t\t'title'\t=> $tmp['title']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $art;\n\t}",
"public static function articleAsc($a, $b) {\n\t\tif($a->getDate() == $b->getDate())\n\t\t\treturn 0;\n\t\treturn $a->getDate() > $b->getDate() ? 1 : -1;\n\t}",
"private function load_articles() {\n $this->articleList = $this->clean_file_list($this->scan_articles());\n return $this->articleList;\n }",
"function getNewArticles($scraper_config) {\n\n $articles = array();\n $new_count = 0;\n\n // Descend into article links on news aggregation page.\n if($scraper_config['descend']) {\n\n $aggregation_page = file_get_html($scraper_config['url']); // retrieve HTML\n \n foreach($aggregation_page->find($scraper_config['article_link']) as $article_link) {\n \n // Parse each article.\n $article_page = file_get_html(getQualifiedURL($article_link->href, $scraper_config['url']));\n $article_page -> set_callback(\"convertHTML2BBCode\");\n $article_block = $article_page->find($scraper_config['article_block'], 0);\n \n $article_images = getFormattedImages($article_block->find($scraper_config['article_body'], 0)->find(\"img\"));\n $article_preview = getFormattedPreview($article_block->find($scraper_config['article_body'], 0)->find(\"text\"));\n $article_title = getFormattedTitle($article_block->find($scraper_config['article_title'], 0));\n $article_body = getFormattedBody($article_block->find($scraper_config['article_body'], 0));\n \n // Exit early when latest news article is found to avoid double post.\n if($article_title == getLastArticleTitle($scraper_config)) { break; }\n \n // Record article data to return.\n $articles[$new_count++] = array(\n \n 'title' => $article_title,\n 'body' => ($article_body . $article_images . $article_preview)\n \n );\n \n $article_page->clear();\n \n }\n \n $aggregation_page->clear();\n\n // Not a news aggregation page, just read news straight up.\n } else {\n\n $article_page = file_get_html($scraper_config['url']); // Retrieve article.\n $article_page->set_callback(\"convertHTML2BBCode\");\n \n foreach($article_page->find($scraper_config['article_block']) as $article_block) {\n\n // Parse each article.\n $article_images = getFormattedImages($article_block->find($scraper_config['article_body'], 0)->find(\"img\"));\n $article_preview = getFormattedPreview($article_block->find($scraper_config['article_body'], 0)->find(\"text\"));\n $article_title = getFormattedTitle($article_block->find($scraper_config['article_title'], 0));\n $article_body = getFormattedBody($article_block->find($scraper_config['article_body'], 0));\n \n // Exit early when latest news article is found to avoid double post.\n if($article_title == getLastArticleTitle($scraper_config)) { break; }\n \n // Record article data to return.\n $articles[$new_count++] = array(\n \n 'title' => $article_title,\n 'body' => ($article_body . $article_images . $article_preview)\n \n );\n \n }\n\n $article_page->clear();\n \n }\n \n $articles = array_reverse($articles);\n return $articles;\n \n}",
"function NewsTop()\n{\n if(empty($this->Article)) $this->Article = Singleton::getInstance('ArticleLayout');\n\n // Масив ТОП-новин\n $arrTopNews = $this->GetTopNews();\n $rowsNews = count($arrTopNews);\n\n// // Масив ТОП-статей\n// $arrTopArticles = $this->Article->GetTopArticles();\n// $rowsArticles = count($arrTopArticles);\n\n // Об'єднаний масив ТОП-новин і ТОП-статей\n $arrMergedNews = array();\n// $arrMergedNews = array_merge($arrTopNews, $arrTopArticles);\n $arrMergedNews = array_merge($arrTopNews);\n $rowsArrMergedNews = count($arrMergedNews);\n $keys = array_keys($arrMergedNews);\n\n // Формування і сортування масиву по даті зі збереженням індекса\n $topNews = null;\n for($i=0; $i<$rowsArrMergedNews; $i++) {\n if($arrMergedNews[$i]['top_main']==1)\n $topNews = $keys[$i];\n $this->date[$i]['start_date'] = $arrMergedNews[$i]['start_date'];\n $this->date[$i]['index'] = $keys[$i];\n }\n// rsort($this->date);\n\n //Масив із 5 елементів для вивода на сайті\n $arrNews = array();\n if($topNews!=null)\n $arrNews[0] = $arrMergedNews[$topNews]; // Головна Топ новина або Топ стаття\n\n for($i=0, $n=0; $i<$rowsArrMergedNews; $i++) {\n if($topNews != $arrMergedNews[$this->date[$i]['index']]) {\n $arrNews[] = $arrMergedNews[$this->date[$i]['index']]; // Інші новини\n $n++;\n }\n if($topNews!=null) {\n if($n==4)\n break;\n }\n else {\n if($n==5)\n break;\n }\n\n }\n $rows = count($arrNews);\n //print_r($arrNews);\n if($rows==0)\n return;\n $str ='';\n $topId ='';\n $topSubject='';\n $toplink='';\n $topShort='';\n $topImage='';\n $type=array();\n $short = array(null,null,null,null,null);\n $link = array(null,null,null,null,null);\n $pathImage = array(null,null,null,null,null);\n //Вивод масиву на сайті\n for( $i=0; $i<$rows; $i++ )\n {\n $row = $arrNews[$i];\n $id[$i] =$row['id'];\n $link[$i] = $row['link'];\n\n $name[$i] = strip_tags(stripslashes($row['name']));\n $name[$i] = str_replace(\"'\", \"`\", $name[$i]);\n\n $short[$i] = strip_tags($row['short']);\n $short[$i] = str_replace(\"\\n\", \"\", $short[$i]);\n //$short[$i] = str_replace(\"'\", \"\\'\", $short[$i]);\n $short[$i] = str_replace(\"'\", \"`\", $short[$i]);\n $short[$i] = str_replace(\"\", \"\\'\", $short[$i]);\n $short[$i] = str_replace(\"\\r\", \"\", $short[$i]);\n\n $image[$i]= stripslashes($row['image']);\n $type[$i] = $row['type'];\n if(empty($image[$i]))\n $pathImage[$i] = '/images/design/noTopImage.jpg';\n else {\n if($type[$i]=='news')\n $pathDir = NewsImg_Path;\n if($type[$i]=='articles')\n $pathDir = ArticleImg_Path;\n $pathImage[$i] = $pathDir.$id[$i].'/'.$image[$i];\n }\n\n\n if($row['top_main']==1) { // Якщо основна топ новина\n $topId = $id[$i];\n $topType = $type[$i]; // news or article\n $topSubject = $name[$i];\n $toplink = $link[$i];\n $topShort = $short[$i];\n $topImage = $image[$i];\n }\n $str[$i] = '<a href=\"'.$link[$i].'\" >'.$name[$i].'</a>';\n /*?><a title=\"<?=$name ;?>\" href=\"<?=$link;?>\"><?=$name;?></a><?*/\n }\n if(empty($topId)) { // Якщо не виявилось жодної основної топ новини чи топ статті\n $topId = $id[0];\n $topType = $type[0]; // news or article\n $topSubject = $name[0];\n $toplink = $link[0];\n $topShort = $short[0];\n $topImage = $image[0];\n }\n ?>\n <div id=\"news_galery\">\n <div id=\"galery_grey\"></div>\n <div id=\"galery_left_bg\">\n <div id=\"gal_news_title\"><a href=\"<?=$toplink;?>\"><?=$topSubject;?></a></div>\n <div id=\"gal_news_text\"><?=$topShort;?></div>\n <div class=\"but_full_ver\"><a href=\"<?=$toplink;?>\">Повна версія</a></div>\n </div>\n <div id=\"galery_img\">\n <?\n if(!empty($topId)) {\n if($topType=='news') { echo $this->ShowImage( $topImage, $topId, 'size_width=435', 85, NULL, \"border=0 alt='' title='' \"); }\n if($topType=='articles') { echo $this->Article->ShowImage( $topImage, $topId, 'size_width=435', 85, NULL, \"border=0 alt='' title='' \");}\n }\n ?>\n </div>\n <div id=\"gal_news_short_block\">\n <? for($i=0; $i<$rows; $i++) {\n $class= '';\n if($i==0)\n $class= '_active';\n ?><div id=\"num<?=$i?>\" class=\"galery_news_short<?=$class?>\">\n <span class=\"galery_short_img\" onclick=\"location.href='<?=$link[$i];?>'\">\n <?\n if(!empty($image[$i])) {\n if($type[$i]=='news') {echo $this->ShowImage( $image[$i], $id[$i], 'size_width=121', 85, NULL, \"border=0 alt='\".$name[$i].\"' title='\".$name[$i].\"' \");}\n if($type[$i]=='articles') {echo $this->Article->ShowImage( $image[$i], $id[$i], 'size_width=121', 85, NULL, \"border=0 alt='\".$name[$i].\"' title='\".$name[$i].\"' \");}\n }\n else {\n ?><img src=\"/images/design/no-image.jpg\" width=\"121\" height=\"82\" alt=\"\" /><?\n }?>\n </span>\n <div class=\"gal_sh_text\" onclick=\"location.href='<?=$link[$i];?>'\"><?/*<a title=\"\" href=\"<?//=$link[$i];?>\">*/?><?=$name[$i];?><?/*</a>*/?></div>\n </div>\n <?\n }?>\n </div>\n </div>\n <?\n echo \"<script>setTopShortText('\".$rows.\"', '\". $short[0].\"','\". $short[1].\"','\". $short[2].\"','\". $short[3].\"','\". $short[4].\"');</script>\";\n echo \"<script>setTopHref('\".$rows.\"', '\". $link[0].\"','\". $link[1].\"','\". $link[2].\"','\". $link[3].\"','\". $link[4].\"');</script>\";\n echo \"<script>setTopImage('\".$rows.\"', '\".$pathImage[0].\"','\".$pathImage[1].\"','\".$pathImage[2].\"','\".$pathImage[3].\"','\".$pathImage[4].\"');</script>\";\n}",
"protected function getArticles($maxArticles = 5)\n {\n $articles = [];\n\n for ($i = 0; $i < $maxArticles; ++$i) {\n $articles[] = $this->getArticle();\n }\n\n return $articles;\n }",
"private function addKeysToArticles(array $articles): array\n {\n $returned = [];\n\n for ($i = 0; $i < count($articles); $i++) {\n $article = $articles[$i];\n $article->setLanguage(array_values(self::COUNTRIES)[$i]);\n $returned[] = $article->get();\n }\n\n return $returned;\n }",
"public function create(array $articles)\n {\n $items = [];\n\n foreach ($articles as $article) {\n $items[] = new FeedItem(\n $article->getTitle(),\n substr($article->getContent(), 0, 500).'...',\n $this->router->generate('lecomptoir.article.show', $article->getUrlParameters()),\n $article->getPublicationDate()\n );\n }\n\n return $items;\n }",
"public function natsort();",
"function get_article_authors() {\n global $articles;\n $hashmap = array();\n $authors = array();\n foreach ($articles as $index => $article) {\n foreach ($article['authors'] as $author) {\n if (!isset($hashmap[$author])) {\n $hashmap[$author] = true;\n $authors[] = $author;\n }\n }\n }\n sort($authors);\n return $authors;\n}",
"protected function attachFeedPropertiesToArticles(array $articles): array\n {\n foreach ($articles as $article) {\n $article->link = $this->buildUrl('article', ['slug' => $article->slug], true);\n $article->guid = $article->link;\n $article->pubDate = date(DATE_RSS, strtotime($article->date));\n }\n\n return $articles;\n }",
"private static function createArticles(Collection $items) : Collection\n {\n return $items->map(function ($item) {\n return Article::create($item);\n })->filter()->sort(function ($first, $second) {\n if ($first->timestamp === $second->timestamp) {\n return strnatcmp($first->title, $second->title);\n } else {\n return $first->timestamp < $second->timestamp ? -1 : 1;\n }\n })->map(function (Article $article, $key) {\n $article->setId($key);\n return $article;\n });\n }",
"function sortTopicsByPopularity($arrayToBaseOn, $arrayToSort){\n\t\t$resultSortedArray = array();\n\n\t\t// Loops through the order array that sorted array should be based on.\n\t\tforeach ($arrayToBaseOn as $topicId => $nrOfEntries) {\n\n\t\t\t// Loops through each element in array to be sort.\n\t\t\tforeach ($arrayToSort as $topic) {\n\n\t\t\t\t// if id match with the order array id.\n\t\t\t\tif($topic->getID() == $topicId){\n\t\t\t\t\t// push in a new array, which will be the sorted array.\n\t\t\t\t\tarray_push($resultSortedArray, $topic);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $resultSortedArray;\n\t}",
"function preprocessArticles() {\n\t\t// Grab all articles from the blog path\n\t\t$page = $this->ds->getArticles($this->config['articles']);\n\t\t$pages = array($page);\n\t\t$this->pages = array();\n\n\t\t// Grab all the blogs in to a flat array\n\t\twhile (!empty($pages)) {\n\t\t\t$file = array_pop($pages);\n\t\t\tif ($file->_type == 'directory') {\n\t\t\t\tforeach ($file->files as $child) {\n\t\t\t\t\tarray_push($pages, $child);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create the link for the article\n\t\t\t\t$link = $this->createLink($file);\n\t\t\t\t$file->link = $link;\n\n\t\t\t\t// Add the article to the array of articles\n\t\t\t\t$this->pages[] = $file;\n\t\t\t}\n\t\t}\n\t}",
"public function get_articles_ordering($id_page)\n\t{\n\t\t$articles = $this->get_lang_list(array('id_page' => $id_page), Settings::get_lang('default'), FALSE, FALSE, $this->parent_table.'.ordering ASC');\n\t\t\n\t\t$order_list = array();\n\t\t\n\t\tif ( ! empty($articles))\n\t\t{\n\t\t\tforeach($articles as $a)\n\t\t\t{\n\t\t\t\t$order_list[] = $a['id_article'];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $order_list;\n\t}",
"function getArticles($offset = 0, $limit = 6) {\n\n $db = dbConnect();\n\n $sql = \"SELECT * FROM linfo_articles ORDER BY a_datum DESC LIMIT $limit OFFSET $offset\";\n\n $sm = $db->prepare($sql);\n if (!$sm->execute()) {\n echo \"something not ok <br>\";\n echo \"error-code: 3\";\n die();\n }\n\n return $sm->fetchAll(\\PDO::FETCH_CLASS);\n }",
"public function mapArticleTranslationObjectData($articles)\n {\n foreach ($articles as &$product) {\n if (empty($product['objectdata']) && empty($product['objectdataFallback'])) {\n unset($product['objectdata'], $product['objectdataFallback']);\n continue;\n }\n\n $objectData = @unserialize($product['objectdata'], ['allowed_classes' => false]);\n $objectDataFallback = @unserialize($product['objectdataFallback'], ['allowed_classes' => false]);\n\n if (empty($objectData)) {\n $objectData = [];\n }\n\n if (empty($objectDataFallback)) {\n $objectDataFallback = [];\n }\n\n if (empty($objectData) && empty($objectDataFallback)) {\n continue;\n }\n\n unset($product['objectdata'], $product['objectdataFallback']);\n\n $product = $this->mapProductObjectFields($product, $objectData, $objectDataFallback, [\n 'name' => 'txtArtikel',\n 'description_long' => 'txtlangbeschreibung',\n 'description' => 'txtshortdescription',\n 'shippingtime' => 'txtshippingtime',\n 'keywords' => 'txtkeywords',\n 'metaTitle' => 'metaTitle',\n ]);\n\n $product = $this->mapProductObjectAttributeFields($product, $objectDataFallback);\n $product = $this->mapProductObjectAttributeFields($product, $objectData);\n }\n\n return $articles;\n }",
"public function setArticles($articles){\n\t\t\t$this->articles=$articles;\n\t\t}",
"public function sort_news_index($news)\n {\n $count_news = count($news);\n for ($i = 0; $i < $count_news; $i++) {\n if (isset($news[$i]['ntype_id']) && $news[$i]['ntype_id'] != null) {\n $type = array();\n $type[] = array(\n \"ntype_id\" => $news[$i]['ntype_id'],\n \"ntype_name\" => $news[$i]['ntype_name'],\n \"ntype_slug\" => $news[$i]['ntype_slug'],\n \"ntype_content\" => $news[$i]['ntype_content'],\n \"ntype_seo_title\" => $news[$i]['ntype_seo_title'],\n \"ntype_seo_description\" => $news[$i]['ntype_seo_description'],\n );\n for ($j = $i + 1; $j < $count_news; $j++) {\n if ($news[$j]['news_id'] != $news[$i]['news_id']) {\n break 1;\n } else {\n $type[] = array(\n \"ntype_id\" => $news[$j]['ntype_id'],\n \"ntype_name\" => $news[$j]['ntype_name'],\n \"ntype_slug\" => $news[$j]['ntype_slug'],\n \"ntype_content\" => $news[$j]['ntype_content'],\n \"ntype_seo_title\" => $news[$j]['ntype_seo_title'],\n \"ntype_seo_description\" => $news[$j]['ntype_seo_description'],\n );\n unset($news[$j]);\n }\n }\n $news[$i]['type'] = $type;\n }\n }\n return $news;\n }",
"public function getArticles($number, $start = 0) {\n\n $timer = tx_newspaper_ExecutionTimer::create(\"Automatic ArticleList(\" . $this->getUid() . \")::getArticles($number)\");\n\n try {\n $articles_sorted = $this->getSortedArticles($number, $start);\n } catch (tx_newspaper_EmptyParametrizedArticlelistException $e) {\n return array();\n }\n\n return array_map(function($record) { return $record['article']; }, $articles_sorted);\n }",
"function sortiereTermine($Termine)\n{\n $sortarray = array();\n global $id;\n global $document;\n foreach ($Termine as $key => $value)\n {\n $okey = $key;\n if ( strpos($key, '&') !== false ) $okey = substr($key, 0, strpos($key, '&'));\n if ( $value['parent_id'] == $id || $document['AlleAnzeigen'] == '1') {\n // Prüfen, ob Betroffen\n if ( isset($_REQUEST['Gruppe']) )\n {\n // nur Gruppe anzeigen\n $da = false;\n if ( $_REQUEST['Gruppe'] != '' )\n {\n $Gruppen = explode(',',$_REQUEST['Gruppe']);\n while ( list($nr, $gruppe) = each($Gruppen))\n {\n if ( in_array($gruppe, explode(',',$value['Gruppe'])) ||\n in_array(-1, explode(',',$value['Gruppe'])) )\n {\n // Gruppe vorhanden: Termin anzeigen\n $sortarray[$key] = $value['Datum'];\n $Termine[$key]['id'] = $okey;\n $da = true;\n }\n }\n }\n if ( ! $da )\n {\n if ( InPerson($value['Person'], $value['author_id'] )) {\n $sortarray[] = $value['Datum'];\n $Termine[$key]['id'] = $okey;\n }\n else\n unset($Termine[$key]);\n }\n }\n else if ( isset($_REQUEST['Betroffen']) )\n {\n // nur von Einzelbetroffenen anzeigen\n $Gruppen = explode(',',$_REQUEST['Betroffen']);\n while ( list($nr, $gruppe) = each($Gruppen))\n {\n // Person ist klar, nun noch die Gruppen, in denen die Person ist\n $prof = get_profile($gruppe, false);\n if ( in_array(-1, explode(',',$value['Person'])) ||\n in_array($gruppe, explode(',',$value['Person'])) ||\n InGruppe($value['Gruppe'], $prof))\n {\n // Person betroffen: Termin anzeigen\n $sortarray[$key] = $value['Datum'];\n $Termine[$key]['id'] = $okey;\n }\n else\n unset($Termine[$key]);\n }\n }\n else if ( isset($_REQUEST['Selbst']) )\n {\n // nur von Einzelbetroffenen anzeigen\n $Gruppen = explode(',',$_REQUEST['Selbst']);\n while ( list($nr, $gruppe) = each($Gruppen))\n {\n if ( $gruppe == -1 || in_array($gruppe, explode(',',$value['Person'])) )\n {\n // Person betroffen: Termin anzeigen\n $sortarray[$key] = $value['Datum'];\n $Termine[$key]['id'] = $okey;\n }\n else\n unset($Termine[$key]);\n }\n }\n elseif ( InGruppe($value['Gruppe']) || InPerson($value['Person'], $value['author_id'] )) {\n $sortarray[] = $value['Datum'];\n $Termine[$key]['id'] = $key;\n }\n else\n unset($Termine[$key]);\n }\n else\n unset($Termine[$key]);\n }\n array_multisort($sortarray, SORT_ASC, SORT_NUMERIC, $Termine);\n //array_multisort($Termine, $Termine['Datum'], SORT_ASC, SORT_NUMERIC);\n return $Termine;\n}"
] | [
"0.59966964",
"0.5473698",
"0.5433484",
"0.5426073",
"0.54204375",
"0.53946763",
"0.5333564",
"0.53092515",
"0.53060025",
"0.52945805",
"0.52795106",
"0.52617776",
"0.525271",
"0.521744",
"0.5198899",
"0.5177978",
"0.5176096",
"0.5152485",
"0.5147462",
"0.51453084",
"0.5129152",
"0.5100816",
"0.50902504",
"0.50768036",
"0.5073192",
"0.5041558",
"0.50181335",
"0.5001679",
"0.4991858",
"0.4980699"
] | 0.8372337 | 0 |
/ Replace a substring denoted as a variable with the corresponding GET parameter For example, all occurrences of \c $art are replaced with \c $_GET['art']. If \c $_GET['art'] is not set, an exception is thrown and getArticles() returns an empty list. | private static function expandGETParameter($string) {
$matches = array();
if (!preg_match_all('/\$(\w+?)(\W|$)/', $string, $matches)) return $string;
// full matches are in $matches[0], the first partial ones (first bracketed part) in $matches[1]
foreach ($matches[1] as $match) {
if ($_GET[$match]) {
$string = str_replace('$' . $match, $GLOBALS['TYPO3_DB']->quoteStr($_GET[$match], self::$table), $string);
} else {
throw new tx_newspaper_EmptyParametrizedArticlelistException();
}
}
return $string;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function replace_query_var($uri, $var, $replace) {\n return remove_query_var($uri, $var, $replace);\n}",
"function stripGetStringVars($old_url){\n if(strpos($old_url, '?') !== false){\n $new_url = substr($old_url, 0, strpos($old_url, '?'));\n } else { $new_url = $old_url; }\n return $new_url;\n }",
"public function replaceInQueryString($parameter, $value, $uri = null);",
"function remove_query_var($uri, $var, $replace='') {\n if(!$uri) $uri = this_url();\n $parts = parse_url($uri);\n $scheme = isset($parts['scheme']) && $parts['scheme'] ? \"{$parts['scheme']}:\" : \"\";\n $host = isset($parts['host']) && $parts['host'] ? \"//\".$parts['host'] : \"\";\n \n $site_url = $scheme.$host;\n \n $qs = get_query_string($uri);\n if(!$qs && !strlen($var)) return $uri;\n \n $data = [];\n parse_str($qs, $data);\n\n if(strlen($replace) || $replace) $data[$var] = $replace;\n else unset($data[$var]);\n $qs = http_build_query($data);\n \n $path = this_path($uri);\n return $qs ? \"{$site_url}{$path}?{$qs}\" : $path;\n}",
"public static function PrepareGetString($removeVar = array()) {\n \n // create a new GET string with the existing parameters and remove the $removeVars parameter(s)\n // eg. content.php?vara=1&varb=2&varc=3 if $removeVar = 'vara', becomes \"vara=1&&varc=3\"\n \n $newGetString = '&';\n $k = 0;\n foreach ($_GET as $key => $value) {\n if (!in_array($key, $removeVar)) {\n if ($k != 0) $newGetString .= '&';\n if (is_array($value)) {\n foreach ($value as $arrayValue) {\n $newGetString .= $key . '[]=' . $arrayValue;\n if ($k != 0) $newGetString .= '&';\n ++$k;\n }\n } else {\n $newGetString .= $key . '=' . $value;\n }\n ++$k;\n } // if\n } // foreach\n \n return $newGetString;\n \n }",
"function rebuild_qs($curr_var) {\n\t\t$qs = '';\n\t\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t\t$parts = explode(\"&\", $_SERVER['QUERY_STRING']);\n\t\t\t$newParts = array();\n\t\t\tforeach ($parts as $val) {\n\t\t\t\tif (stristr($val, $curr_var) == false) {\n\t\t\t\t\tarray_push($newParts, $val);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($newParts) != 0) {\n\t\t\t\t$qs = \"&\".implode(\"&\", $newParts); // this is your new created query string\n\t\t\t} \n\t\t}\n\t\tif ($this->hashtag != '') $qs .= $this->hashtag;\n\t\treturn $qs; \n\t}",
"function add_query_var($uri, $var, $replace) {\n return remove_query_var($uri, $var, $replace);\n}",
"function querystring_set($variable,$value) {\r\n $querystring = $_SERVER['QUERY_STRING'];\r\n $pos = strpos($querystring,\"&$variable=\");\r\n if($pos===FALSE) {\r\n if(strpos($querystring,\"$variable=\")===0)\r\n $pos=0;\r\n } else {\r\n $pos++;\r\n }\r\n if($pos===FALSE) {\r\n if($value=='') return $querystring;\r\n if($querystring==\"\") return \"$variable=$value\";\r\n else return $querystring.\"&$variable=$value\";\r\n }\r\n\r\n\r\n $endpos = strpos($querystring,\"&\",$pos);\r\n if($endpos===FALSE) $endpos=strlen($querystring);\r\n\r\n if($value=='') {\r\n return substr($querystring,0,max(0,$pos-1)).substr($querystring,$endpos);\r\n } else {\r\n return substr($querystring,0,$pos).\"$variable=$value\".substr($querystring,$endpos);\r\n }\r\n}",
"function queryString($var = false, $remove = false, $value = false )\n{\n $queryString = $_SERVER['QUERY_STRING'];\n \n if ($var)\n $queryString = preg_replace(\"/&?($var)=([\\w+\\s\\b\\.?\\S])[^&]*/\", \"\", $queryString);\n\n \n if ( $value !== false ) {\n $pattren = $value;\n } else {\n $pattren = '[\\w+\\s\\b\\.?\\S]';\n }\n \n if ($remove)\n {\n if (!is_array($remove)) {\n $queryString = preg_replace(\"/&?($remove)=($pattren)[^&]*/\", \"\", $queryString);\n } else {\n foreach ($remove as $rm)\n {\n $queryString = preg_replace(\"/&?($rm)=($pattren)[^&]*/\", \"\", $queryString);\n }\n }\n }\n\n if ($queryString)\n $preUrl = \"?$queryString&\";\n else\n $preUrl = \"?\";\n\n $preUrl = preg_replace(array(\"/(\\&{2,10})/\", \"/\\?\\&/\"), array(\"&\", \"?\"), $preUrl);\n\n return $preUrl . $var;\n}",
"function modified_for_url($data, $to_remove, $to_replace_with, $added_data)\n\t{\n\t\t$data_splitter = explode($to_remove, $data);\n\t\t$data_packer = array_splice($data_splitter, 0);\n\t\t$modified_data = $added_data . implode($to_replace_with, $data_packer);\n\t\treturn $modified_data;\n\t\n\t\t//example => modified_for_url($data, ' ', '-', '&Category')\n\t}",
"private function stripQueryString($var): string\n {\n if (strstr($var, '?')) {\n $var = substr($var, 0, strrpos($var, '?'));\n }\n return $var;\n }",
"function supplang_param_in_url( $lang_slug = null, $url = null ) {\n\t$param_name = SUPPLANG_GET_PARAM;\n\t$url = isset( $url ) ? $url : \"//$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n\t$lang_slug = isset( $lang_slug ) ? $lang_slug : supplang_slug_from_locale();\n\tif ( preg_match( '/[\\?|&]uil=[^&]*/', $url ) ) {\n\t\treturn preg_replace( '/([\\?|&]uil=)[^&]*/', '$1' . $lang_slug, $url );\n\t} elseif ( strstr( $url, '?' ) ) {\n\t\treturn \"$url&$param_name=$lang_slug\";\n\t} else {\n\t\treturn \"$url?$param_name=$lang_slug\";\n\t}\n}",
"public static function filterGetAddSlahes($var){\n return filter_input(INPUT_GET, $var, FILTER_SANITIZE_MAGIC_QUOTES);\n }",
"private static function updateQuerystring($querystring, $param, $value){\n\t\t$f = array();\n\t\t$ex = explode(\"&\", $querystring);\n\t\t$founded=false;\n\t\tforeach($ex as $arg){\n\t\t\t$a = explode(\"=\", $arg);\n\t\t\tif($a[0] == $param){\n\t\t\t\t$a[1] = $value;\n\t\t\t\t$founded = true;\n\t\t\t}\n\t\t\tarray_push($f,implode(\"=\", $a));\n\t\t}\n\t\tif($founded == false)array_push($f,\"{$param}={$value}\");\n\t\treturn implode(\"&\", $f);\n\t}",
"function replace_uri($param)\r\n\t{\r\n\t\t//replace uri\r\n\t\t$pattern = '/((?:https?|ftp)(?::\\/\\/[-_.!~*\\'a-zA-Z0-9;\\/?:\\@&=+\\$,%#]+))/i';\r\n\t\t$replace = '<a href=\"${1}\">${1}</a>';\r\n\t\t$param = preg_replace($pattern, $replace, $param);\r\n\t\t//replace screen_name\r\n\t\t$pattern = '/@([0-9A-Z_]+)/i';\r\n\t\t$user_uri = $this->get_uri('user', array('screen_name' => '${1}'));\r\n\t\t$replace = '<a href=\"' . escape(urldecode($user_uri)) . '\">@${1}</a>';\r\n\t\t$param = preg_replace($pattern, $replace, $param);\r\n\t\t//replace hashtag\r\n\t\t$pattern = '/(^|\\s)#(\\w+)/i';\r\n\t\t$hash_uri = $this->get_uri('search', array('q' => urlencode('#') . '${2}'));\r\n\t\t$replace = '${1}<a href=\"' . escape(urldecode($hash_uri)) . '\">#${2}</a>';\r\n\t\t$param = preg_replace($pattern, $replace, $param);\r\n\t\treturn $param;\r\n\t}",
"function get($get) {\n\t\tif ($get == \"?\") {\n\t\t\treturn adjust($_SERVER[\"QUERY_STRING\"]);\n\t\t} else {\n\t\t\treturn adjust(@$_GET[$get]);\n\t\t}\n\t}",
"function lire($params){\n\t\t$var = $params['var'];\n\t\t$this->code .= \"?->$var\\n\";\n\t}",
"function lire($params){\n\t\t$var = $params['var'];\n\t\t$this->code .= \"?->$var\\n\";\n\t}",
"function get($var, $default=\"\", $usequote=false, $regex = false){\n\t\t$result = $default;\n\t\tif (isset($_GET[$var])){\n\t\t\t$result = addslashes($_GET[$var]);\n\t\t\tif($regex) {\n\t\t\t\t$match = preg_match_all($regex, $result, $matches);\n\t\t\t\tif(!$match){\n\t\t\t\t\t$result = false;\n\t\t\t\t\t$usequote = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($usequote===true) \n\t\t\t\t$usequote = \"'\";\n\t\t\tif ($usequote!==false)\n\t\t\t\t$result = $usequote.$result.$usequote;\n\t\t}\n\t\treturn $result;\n\t}",
"public function assign($var,$val){\n $this->content = str_replace('{'.$var.'}', $val, $this->content);\n }",
"function query_string_update($url, $parameters)\n{\n $parse_url = parse_url($url);\n\n if (isset($parse_url['query'])) {\n parse_str($parse_url['query'], $query);\n $parameters = array_merge($query, $parameters);\n }\n\n $parameters = http_build_query($parameters);\n $url = $parse_url['scheme'] . '://' . $parse_url['host'] . (isset($parse_url['port']) ? \":{$parse_url['port']}\" : '');\n $url = $url . $parse_url['path'] . '?' . $parameters;\n\n return $url;\n}",
"function GET($parameter) {\r\n // XSS preventie, better safe than sorry.\r\n $value = trim(strip_tags($_GET[$parameter]));\r\n return empty($value) ? null : urldecode($value);\r\n}",
"function addToUrl ($att, $value) {\n $return = \"\";\n\n foreach ($_GET as $oldatt => $oldvalue) {\n if ($oldatt != $att) {\n $return .= \"&\".$oldatt.\"=\".urlencode($oldvalue);\n }\n }\n $return .= \"&\".$att.\"=\".urlencode($value);\n return \"?\".substr($return, 1);\n}",
"private function setGetVariables($get = NULL)\n {\n $arr = explode('&', $get);\n foreach($arr as $ar) {\n $a = explode('=', $ar);\n if(isset($a[1])) {\n $_GET[$a[0]] = $a[1];\n }\n }\n }",
"function token_replace( $key, $value, $string ) {\n\n $string = str_replace( '[[' . $key . ']]', $value, $string );\n $string = str_replace( '[[' . $key . '|urlencode]]', urlencode( $value ), $string );\n\n if ( function_exists( 'filter_var' ) ) {\n $string = str_replace( '[[' . $key . '|html]]', filter_var( $value, FILTER_SANITIZE_FULL_SPECIAL_CHARS ), $string );\n } else {\n $string = str_replace( '[[' . $key . '|html]]', htmlentities( $value, ENT_QUOTES ), $string );\n }\n\n return $string;\n}",
"function pnQueryStringSetVar($name, $value)\n{\n if (!isset($name)) {\n return;\n }\n // add the variable into the get superglobal\n $res = preg_match('/(.*)\\[(.*)\\]/i', $name, $match);\n if ($res != 0) {\n // possibly an array entry in the form a[0] or b[c]\n // $match[0] = a[0]\n // $match[1] = a\n // $match[2] = 0\n // this is everything we need to continue to build an array\n if (!isset($_REQUEST[$match[1]])) {\n $_REQUEST[$match[1]] = $_GET[$match[1]] = array();\n }\n $_REQUEST[$match[1]][$match[2]] = $_GET[$match[1]][$match[2]] = $value;\n } else {\n $_REQUEST[$name] = $_GET[$name] = $value;\n }\n return true;\n}",
"function ustr_replace($search, $replace, $subject, $cur = 0)\n{\n $pos = strpos($subject, $search, $cur);\n if ($pos !== false) {\n $subject = substr_replace($subject, $replace, (int)strpos($subject, $search, $cur), strlen($search));\n }\n return $subject;\n}",
"abstract function replace();",
"public static function filterGetString($var){\n return filter_input(INPUT_GET, $var, FILTER_SANITIZE_STRING);\n }",
"function r($search, $replace, $subject) {\n\t\treturn str_replace($search, $replace, $subject);\n\t}"
] | [
"0.5972395",
"0.57442546",
"0.57021534",
"0.5573469",
"0.5469055",
"0.54315376",
"0.53103536",
"0.52740234",
"0.52193296",
"0.5192888",
"0.51884633",
"0.5173767",
"0.5138743",
"0.50351316",
"0.503126",
"0.5010459",
"0.5000184",
"0.5000184",
"0.49973065",
"0.49856496",
"0.49732715",
"0.4892428",
"0.48811936",
"0.48785913",
"0.48732543",
"0.48679546",
"0.48624355",
"0.48463058",
"0.48377904",
"0.48375803"
] | 0.66043603 | 0 |
Flash everything excluding params | public function flashExclude() {
$results = [];
$argCount = func_num_args();
$args = func_get_args();
if ($argCount == 1 && is_array($args[0])) {
$array = $args[0];
} else {
$array = $args;
}
foreach ($this->requestData as $key => $value) {
if (!in_array($key, $array)) {
$results[$key] = $this->requestData[$key];
}
}
$_SESSION['flash']['request'] = $results;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function flash() {\n\t\t$_SESSION['flash']['request'] = $this->requestData;\n\t}",
"public function flash()\n {\n $data = (serialize($this->messages));\n session(['flashy' => $data]);\n }",
"public function emptyFlash() {\n\t\t$_SESSION['flash']['request'] = [];\n\t}",
"public function flashOnly($keys)\n {\n $keys = is_array($keys) ? $keys : func_get_args();\n return $this->flash('only', $keys);\n }",
"public function flashExcept($keys)\n {\n $keys = is_array($keys) ? $keys : func_get_args();\n return $this->flash('except', $keys);\n }",
"public function reflash() {\n\t\tforeach ($this->currentFlashData as $key => $value) {\n\t\t\t$this->flash($key, $value);\n\t\t}\n\t}",
"public function flash(array $params)\n {\n $return = [];\n $flashType = $params[0];\n $flash = $this->session->getFlash($flashType);\n if ($flashType === 'post') {\n return $flash;\n }\n if (!empty($flash)) {\n $this->session->getSegment()->clearFlash();\n $return = $flash;\n }\n return $return;\n }",
"public function flashOnly($keys)\n {\n $keys = is_array($keys) ? $keys : func_get_args();\n\n return $this->flash('only', $keys);\n }",
"public function removeFlash()\n {\n }",
"public function flashExcept($keys)\n {\n $keys = is_array($keys) ? $keys : func_get_args();\n\n return $this->flash('except', $keys);\n }",
"public function flash_notification()\n\t{\n\t\theader(\"Content-type: application/json\");\n\n\t\tif (isset($_SESSION['flash'])) {\n\t\techo json_encode($_SESSION['flash']);\n\t\t}else{\n\t\t\techo \"[]\";\n\t\t}\n\n\n\t\tunset($_SESSION['flash']);\n\n\t}",
"public function setFlash()\n {\n }",
"public function addFlash()\n {\n }",
"public function getFlashMessageParameters();",
"public function clearFlash() {\n $this->flash = array();\n }",
"public function keepFlash($name);",
"public function showFlashMessages()\n {\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n }",
"public static function finalFlash() {\n if(self::exists('names')) {\n foreach ($_SESSION['names'] as $name) {\n echo '<span style=\"font-size: 1.5em; color: red; align: center;\">'.Session::flash($name).\"</span>\";\n }\n }\n}",
"public function flash($name, $data);",
"function _HCM_flash($cesta=\"\", $sirka=null, $vyska=null){\n \n //prednastavene rozmery\n $defwidth=\"320\"; $defheight=\"240\";\n \n //nacteni parametru\n $cesta=_htmlStr($cesta);\n if(!_isAbsolutePath($cesta)){$cesta=_url.\"/\".$cesta;}\n if(!isset($sirka)){$sirka=$defwidth; $sirka_def=true;}else{$sirka=intval($sirka); $sirka_def=false;}\n if(!isset($vyska)){\n if(!$sirka_def){$vyska=round(0.75*$sirka);}\n else{$vyska=$defheight;}\n } else{$vyska=intval($vyska);}\n \n //sestaveni kodu\n return \"\n<!--[if !IE]> -->\n<object type='application/x-shockwave-flash' data='\".$cesta.\"' width='\".$sirka.\"' height='\".$vyska.\"'>\n<!-- <![endif]-->\n\n<!--[if IE]>\n<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='$sirka' height='$vyska'>\n<param name='movie' value='\".$cesta.\"' />\n<!--><!---->\n<param name='loop' value='true' />\n<param name='menu' value='false' />\n\n\".$GLOBALS['_lang']['hcm.player.alt'].\"\n</object>\n<!-- <![endif]-->\n\";\n \n}",
"public function getFlash()\n {\n }",
"public function flash($key, $value);",
"protected function flash()\n {\n $this->sessionStore->flash($this->configRepository->get('notification::session_prefix').$this->container, $this->getFlashable()->toJson());\n }",
"public function indexAction() {\n \n $this->get('session')->getFlashBag()->clear();\n\n return $this->__renderIndex();\n }",
"function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"function flash($name = '', $message = '', $class = 'alert alert-success') {\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"public function flash($filter = null, $keys = array())\n {\n $flash = !is_null($filter) ? $this->{$filter}($keys) : $this->input();\n $this->getSessionStore()->flashInput($flash);\n }",
"public function notSave()\n {\n $flash = $this->getDI()->getFlash();\n\n //Show validation messages\n foreach ($this->getMessages() as $message) {\n $flash->error($message);\n }\n }",
"function msg($mesaj, $yonlendirme = NULL, $renk='info',$tip = NULL, $flashName='msg')\n{\n $cikti =\n '<div class=\"alert alert-' . $tip . ' alert-' . $renk . '\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <strong>Uyarı!</strong> ' . $mesaj . '\n </div>';\n\n get_instance()->session->set_flashdata($flashName, $cikti);\n\n if ($yonlendirme != NULL) redirect(base_url($yonlendirme));\n}",
"function flash($status, $message) {\n $_SESSION['flash'] = ['status' => $status, 'message' => $message];\n }"
] | [
"0.6867041",
"0.6592742",
"0.6563405",
"0.6406619",
"0.63546807",
"0.6338354",
"0.6265833",
"0.6256076",
"0.6255206",
"0.6251648",
"0.62377274",
"0.6188624",
"0.6187001",
"0.6159919",
"0.6108456",
"0.60660875",
"0.60398036",
"0.598734",
"0.591738",
"0.5850923",
"0.5828489",
"0.58282274",
"0.5793832",
"0.57791233",
"0.57785386",
"0.57542443",
"0.57058173",
"0.5677895",
"0.5634094",
"0.5598395"
] | 0.6997983 | 0 |
Get user's pinned reservation | public function getAllPinnedReservation($userId)
{
/* @var $dao \DDD\Dao\Booking\PinnedReservation */
$pinnedReservationDao = $this
->getServiceLocator()
->get('dao_booking_pinned_reservation');
$result = $pinnedReservationDao->fetchAll(
['user_id' => $userId]
);
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMyReservations() {\n\t\t$user = JFactory::getUser ();\n\t\tif (isset ( $user )) {\n\t\t\tif ($user->authorise ( 'core.admin' )) {\n\t\t\t\treturn $this->_db->setQuery ( \"select * from #__ezr_reservation order by start_time\" )->loadObjectList ();\n\t\t\t} else {\n\t\t\t\t$userid = $user->id;\n\t\t\t\treturn $this->_db->setQuery ( \"select * from #__ezr_reservation where user_id = $userid order by start_time\" )->loadObjectList ();\n\t\t\t}\n\t\t}\n\t}",
"public function getReservation()\n {\n return $this->reservation;\n }",
"function get_reservation ($id_reservation)\n\t{\n\t\t$query_stmt = $this->database_conn->prepare (\"SELECT reservations.id, rooms.number, users.username, reservations.hour, reservations.date FROM reservations JOIN users ON reservations.id_user=users.id JOIN rooms ON reservations.id_room=rooms.id WHERE reservations.id=:id_reservation\");\n\t\t$query_stmt->bindParam (':id_reservation', $id_reservation);\n\t\t$query_stmt->execute ();\n\t\treturn $query_stmt->fetch();\n\t}",
"static function getCurrentOrUpcomingReservation($a_object_id)\n {\n\t\tglobal $ilDB;\n\n\t\t$now = $ilDB->quote(time(), 'integer');\n\n\t\t$ilDB->setLimit(1);\n\t\t$set = $ilDB->query('SELECT user_id, status, date_from, date_to'.\n\t\t\t' FROM booking_reservation'.\n\t\t\t' WHERE ((date_from <= '.$now.' AND date_to >= '.$now.')'.\n\t\t\t' OR date_from > '.$now.')'.\n\t\t\t' AND (status <> '.$ilDB->quote(self::STATUS_CANCELLED, 'integer').\n\t\t\t' OR STATUS IS NULL) AND object_id = '.$ilDB->quote($a_object_id, 'integer').\n\t\t\t' ORDER BY date_from');\n\t\t$row = $ilDB->fetchAssoc($set);\n\t\treturn $row;\n\t}",
"function get_reserved_slot() {\n\t\tglobal $wpdb;\n\n\t\t$this->remove_outdated_reservations();\n\n\t\t$slot_id = $wpdb->get_var( \"SELECT datetimeid FROM {$this->reservations_db_table_name} WHERE user_id = '{$this->user_id}' AND processed = '0'\" );\n\n\t\tif ( $slot_id != null ) {\n\t\t\treturn $this->get_slot_data_from_id( $slot_id );\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function has_reservation() {\n\t\tglobal $wpdb;\n\n\t\t$reservation = $wpdb->get_row( $wpdb->prepare( \"\n SELECT *\n FROM {$this->reservations_db_table_name}\n WHERE processed = 0\n AND user_id = %s\n \", $this->user_id ) );\n\n\t\treturn ( $reservation ) ? $reservation : false;\n\t}",
"public function getPinnedAttribute()\n {\n return $this->users()->where('user_id', auth()->id())->exists();\n }",
"public function reservationFor($date)\n {\n return $this->reservations()->whereRaw('date('. $date .') = date(created_at)')->first();\n }",
"public static function getReservationUser($user) {\n\t\t$qry = \"SELECT resid,reservations.quantity,room,starttime,endtime FROM reservations\n\t\tINNER JOIN users ON reservations.userid=users.userid\n\t\tINNER JOIN contentlist ON reservations.contentlistid=contentlist.contentlistid\n\t\tINNER JOIN locations ON contentlist.locationid=locations.locationid\n\t\tINNER JOIN items ON contentlist.itemid=items.itemid\n\t\tWHERE username='\" . $user->username . \"'\";\n\t\t$res = mysql_query($qry);\n\t\t\n\t\twhile ($data = mysql_fetch_assoc($res)) {\n\t\t\t$reservationList[] = new Reservation($user, $data['resid'], $data['starttime'], $data['endtime'], $data['qunatity'], $data['contentlistid']);\n\t\t}\n\t\treturn $reservationList;\n\t}",
"public function getRoomStayReservation()\n {\n return $this->roomStayReservation;\n }",
"public function getByUserId($userId)\n {\n \n $user = DB::table('reservations')\n ->where('user_id', '=', $userId)->first();\n return $user;\n }",
"public function isPinned()\n {\n return $this->pinned;\n }",
"public function getIsPinned()\n {\n return $this->isPinned;\n }",
"function get_reservation($id)\n {\n return $this->db->get_where('reservations',array('id'=>$id))->row_array();\n }",
"public function getPendingReservations() {\n\t\t$dao = $this->getServiceLocator()->get('dao_booking_booking');\n\n\t\treturn $dao->getPendingReservations();\n\t}",
"public function getReservationID()\n {\n return $this->reservationID;\n }",
"public function getLatestReservation() {\n\n return Reservation::with('book', 'student')\n ->latest()\n ->take(4)\n ->get();\n }",
"public function show($id)\n {\n $reservation = Reservations::get()->where('id',$id);\n return $reservation;\n }",
"public function show(Reservation $reservation)\n {\n if(Auth::user()->isAdmin()){\n $reservations = Reservation::get();\n }\n else{\n $reservations = Reservation::where('user_id', Auth::user()->id)->get();\n\n }\n\n $reservationsArray = [];\n foreach($reservations as $reservation) {\n $reservationsArray[] = $reservation;\n }\n\n return view ('reservation', [\n 'reservations' => $reservations\n ]);\n\n }",
"public function getVisitByReservationId($reservation_id);",
"static function getReservations($uid = null) {\n\t\t$_db = new Db();\n\t\tif($uid !== null) $_db->saveQry(\"SELECT ID FROM `#_reservations` \".\n\t\t\t\t\"WHERE `user` = ? ORDER BY `ID` DESC\", $uid);\n\t\telse $_db->saveQry(\"SELECT ID FROM `#_reservations` ORDER BY `ID` DESC\");\n\t\t\n\t\twhile($res=$_db->fetch_assoc())\n\t\t\t$ret[] = Reservation::load($res['ID']);\n\t\treturn $ret;\n\t}",
"public function show(Reservation $reservation)\n {\n\n }",
"public function index()\n {\n $reservations = Reservation::where('user_id', Auth::id())->latest()->get();\n return view('guest.reservation', compact('reservations'));\n }",
"static function getReservation($id) {\n\t\t$_db = new Db();\n\t\t$_db->saveQry(\"SELECT ID FROM `#_reservations` \".\n\t\t\t\t\"WHERE `ID` = ?\", $id);\n\t\t$r = $_db->fetch_assoc(); $res[] = Reservation::load($r['ID']);\n\t\treturn $res;\n\t}",
"public function show(Reservation $reservation)\n {\n //\n }",
"public function show($reservation_id)\n {\n $reservation = Reservation::whereId($reservation_id)->get();\n\n if ($reservation->user_id === Auth::id()) {\n $room_id = $reservation->room_id;\n $roomInfo = Room::with('rooms')->get()->find($room_id);\n\n return view('dashboard.reservationSingle', compact('reservation', 'roomInfo'));\n } else\n return redirect('dashboard/reservations')->with('error', 'You are not authorized to see that.');\n }",
"public function getReservation()\n {\n return view('reservation');\n }",
"public function getUserPaymorrowStreet()\n {\n return $this->oxuser__oxstreet->value;\n }",
"public function reservation()\n {\n return $this->belongsTo(Reservation::class);\n }",
"public function getPin()\n {\n return $this->pin;\n }"
] | [
"0.640742",
"0.60283303",
"0.59938335",
"0.58259785",
"0.5824664",
"0.5793821",
"0.5750848",
"0.56799406",
"0.5621398",
"0.56005496",
"0.55705875",
"0.5511502",
"0.5494866",
"0.54779744",
"0.546366",
"0.54576224",
"0.54204434",
"0.53921807",
"0.5383814",
"0.5379314",
"0.5369944",
"0.5349953",
"0.5324876",
"0.5273435",
"0.5260771",
"0.5255302",
"0.5251061",
"0.5249265",
"0.52432084",
"0.5236098"
] | 0.6045449 | 1 |
Get user's pinned reservations count | public function getAllPinnedReservationsCount($userId)
{
/* @var $dao \DDD\Dao\Booking\PinnedReservation */
$pinnedReservationDao = $this->getServiceLocator()->get('dao_booking_pinned_reservation');
$count = $pinnedReservationDao->getAllPinnedReservationsCount($userId);
return $count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPendingReservationsCount() {\n\t\t$dao = $this->getServiceLocator()->get('dao_booking_booking');\n\t\treturn $dao->getPendingReservationsCount();\n\t}",
"public function getCollectFromCustomerReservationsCount()\n {\n\t\t/* @var $bookingDao \\DDD\\Dao\\Booking\\Booking */\n\t\t$bookingDao = $this->getServiceLocator()->get('dao_booking_booking');\n\t\t$data = $bookingDao->getCollectFromCustomerReservations();\n\t\treturn $data->count();\n\t}",
"public static function record_count() {\n global $wpdb;\n\n $sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}ausTourReservations\";\n\n return $wpdb->get_var( $sql );\n }",
"protected function countPendingInvites()\n {\n $searchModel = new MembershipSearch();\n $searchModel->space_id = $this->space->id;\n $searchModel->status = Membership::STATUS_INVITED;\n return $searchModel->search([])->getCount();\n }",
"public function getCantReservasAprobadasTotalOwner() {\r\n// $query = Doctrine_Query::create()->query($q);\r\n // $reserve = $query->toArray();\r\n // $reservasRecibidas = null;\r\n\r\n $q2 = Doctrine_Manager::getInstance()->getCurrentConnection();\r\n $query2 = \"SELECT r.id FROM Reserve r INNER JOIN Car c on r.car_id = c.id WHERE (r.confirmed>0 or r.canceled>0) and c.user_id=\" . $this->getId();\r\n $stmt2 = $q2->prepare($query2);\r\n $stmt2->execute();\r\n $reserve = $stmt2->fetchAll();\r\n\r\n $total_reserves = count($reserve);\r\n\r\n return $total;\r\n }",
"public function pending_count($conn)\n {\n $sql = \"SELECT COUNT(*) AS RIDE FROM `tbl_ride` where `status` =1\";\n $result =$conn->query($sql);\n if ($result->num_rows > 0) {\n $row = $result->fetch_assoc();\n return $row;\n }\n }",
"public function pending_count_user($id, $conn)\n {\n $sql = \"SELECT COUNT(*) AS RIDE FROM `tbl_ride` where `status` = 1 AND `customer_user_id`='\".$id.\"' \";\n $result =$conn->query($sql);\n if ($result->num_rows > 0) {\n $row = $result->fetch_assoc();\n return $row;\n }\n }",
"function query_guest_times($user)\n{\n if (!is_VIP($user, VIP_888_ANNUAL_ID)) {\n return;\n }\n\n global $wpdb;\n $guest_count = $wpdb->get_var(\n $wpdb->prepare(\n \"SELECT meta_value\n FROM $wpdb->usermeta\n WHERE meta_key = %s\n AND user_id = %d\",\n [\"Guest\", $user]\n )\n );\n return $guest_count;\n}",
"public function findUserCount();",
"protected function computeTotalReservations()\n {\n return\n $this->totalDomesticShippingReservations +\n $this->totalInternationalShippingReservations +\n $this->totalTruckingReservations +\n $this->totalCustomsBrokerReservations +\n $this->totalWarehouseReservations;\n }",
"public function getGuestCounts()\n {\n return $this->guestCounts;\n }",
"public function count()\n {\n return count($this->addresses);\n }",
"public function has_reservation() {\n\t\tglobal $wpdb;\n\n\t\t$reservation = $wpdb->get_row( $wpdb->prepare( \"\n SELECT *\n FROM {$this->reservations_db_table_name}\n WHERE processed = 0\n AND user_id = %s\n \", $this->user_id ) );\n\n\t\treturn ( $reservation ) ? $reservation : false;\n\t}",
"public function occupiedSlotsCount()\n {\n return $this->model->where('free', 0)->with('vehicle','vehicle.vehicle_type')->get()->sum('vehicle.vehicle_type.slots');\n }",
"public function getReservationCounts() {\n $qry = \"SELECT fiTerrain, COUNT(*) AS qcfCount FROM tblReservation GROUP BY fiTerrain\";\n\n try {\n $stmt = $this->dbh->prepare($qry);\n\n if ($stmt->execute()) {\n return json_encode($stmt->fetchAll(PDO::FETCH_ASSOC));\n }\n else {\n return json_encode(false);\n }\n }\n catch(PDOException $e) {\n echo \"PDO has encountered an error: \" + $e->getMessage();\n die();\n }\n }",
"public function getPendingReservations() {\n\t\t$dao = $this->getServiceLocator()->get('dao_booking_booking');\n\n\t\treturn $dao->getPendingReservations();\n\t}",
"protected function countPendingApprovals()\n {\n $searchModel = new MembershipSearch();\n $searchModel->space_id = $this->space->id;\n $searchModel->status = Membership::STATUS_APPLICANT;\n return $searchModel->search([])->getCount();\n }",
"function getCount() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->count_visit;\n }",
"function countEditedbySingleUser($from,$to,$user)\n\t {\n\t $sql=\"SELECT COUNT(last_updated_by) As cnt FROM (SELECT * FROM candidates WHERE last_updated_by ='\".$user.\"') As sub WHERE last_updated BETWEEN '\".$from.\"' AND '\".$to.\"'\";\n\t $q=$this->db->query($sql);\n\t $row=$q->row();\n\t return $row->cnt;\n\t }",
"function buddyreshare_users_reshares_count( $user_id = 0 ) {\n\tif ( ! $user_id ) {\n\t\t$user_id = get_current_user_id();\n\t}\n\n\t$user_id = (int) $user_id;\n\t$reshares_count = wp_cache_get( $user_id, 'reshares_count' );\n\n\tif ( empty( $reshares_count ) ) {\n\t\tglobal $wpdb;\n\n\t\t$table = bp_core_get_table_prefix() . 'bp_activity_user_reshares';\n\t\t$reshares_count = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT( id ) as count FROM {$table} WHERE user_id = %d\", $user_id ) );\n\n\t\twp_cache_add( $user_id, $reshares_count, 'reshares_count' );\n\t}\n\n\treturn $reshares_count;\n}",
"function getNumberOnlineGuests()\r\n\t{\r\n\r\n\t\t// Get a unix time from 5 mintues ago\r\n\t\tdate_default_timezone_set('UTC');\r\n\t\t$active = strtotime(\"-5 minutes\", time());\r\n\t\t$db = & JFusionFactory::getDatabase($this->getJname());\r\n\t\t$query = \"SELECT COUNT(DISTINCT(session_ip)) FROM #__sessions WHERE session_user_id = 1 AND session_time > $active\";\r\n\t\t$db->setQuery($query);\r\n\t\t$result = $db->loadResult();\r\n\t\treturn $result;\r\n\t}",
"public function get_total_items_user(){\n $count = $this->fetch(\"SELECT id FROM posts WHERE user = $this->user\");\n return $count ? count($count) : 0;\n }",
"public function number_of_users_place_listing_in_last($params)\n {\n if ((!$params['days']) || (!is_numeric($params['days']))) {\n $days = 1;\n } else {\n $days = $params['days'];\n }\n\n // default to all types\n if ((!$params['listing_type']) || (!is_numeric($params['listing_type']))) {\n $type = 0;\n } else {\n $type = $params['listing_type'];\n }\n return $this->_get_user_count_with_placement($days, $type);\n }",
"protected function tasksCount()\n {\n return $this->mongoConnection->find(\n array(\n '_id' => array(\n '$lte' => $this->getCurrentId()\n )\n )\n )->count();\n }",
"public function countBlocked()\n {\n $sql = 'SELECT COUNT(*) AS number FROM users WHERE try>=5';\n return $this->db->request($sql, null, null, false);\n }",
"public function countPendingAvailable($user)\n\t{\n\t\t$query = $this->model->whereHas('users', function ($query) use ($user) {\n $query->where('user_id', '!=', $user->id);\n },'<',DB::raw('nb_users'));\n\t\t$query = $query->whereHas('users', function ($query) use ($user) {\n $query->where('user_id', '=', $user->id);\n },'=',0);\n \t$query = $query->where('level_id','<=',$user->level_id); \n \t$query = $query->where('state','=','pending');\n\n\t\treturn $query->count();\n\t}",
"function numberOfTasks($with_private = 1) {\n global $DB;\n\n $RESTRICT = \"\";\n if ($with_private!=1) {\n $RESTRICT = \" AND `is_private` = '0'\";\n }\n\n // Set number of followups\n $query = \"SELECT COUNT(*)\n FROM `glpi_tickettasks`\n WHERE `tickets_id` = '\".$this->fields[\"id\"].\"'\n $RESTRICT\";\n $result = $DB->query($query);\n\n return $DB->result($result, 0, 0);\n }",
"function countMembers()\n {\n $query = \"SELECT count(*) AS count FROM users WHERE userPermissions < '4' AND userConfirm='1' AND deleted='0' \";\n $data = $this->SelectData($query, PDO::FETCH_ASSOC);\n\n return $data[0]['count'];\n }",
"public function count()\n {\n if ($this->queryShouldBeStopped) {\n return 0;\n }\n\n $queryType = 'UserQuery::count';\n $filter = $this->normalizeFilter();\n $callback = function() use ($filter) {\n return (int) $this->bxObject->getList($order = 'ID', $by = 'ASC', $filter, [\n 'NAV_PARAMS' => [\n 'nTopCount' => 0,\n ],\n ])->NavRecordCount;\n };\n\n return $this->handleCacheIfNeeded(compact('queryType', 'filter'), $callback);\n }",
"function unread_count()\n {\n $model = $this->app->model( 'messages' );\n return $model->count_unread(\n $this->app->user->get_user_id()\n );\n }"
] | [
"0.7241084",
"0.619509",
"0.6005504",
"0.5723887",
"0.56610143",
"0.5657519",
"0.5631214",
"0.56070113",
"0.5486397",
"0.5459147",
"0.5413512",
"0.5390335",
"0.5368998",
"0.5358916",
"0.5351173",
"0.5346016",
"0.53361875",
"0.5294749",
"0.52890927",
"0.5285988",
"0.5282816",
"0.52822745",
"0.5277781",
"0.52653384",
"0.52602243",
"0.52411985",
"0.5239146",
"0.5226131",
"0.52248293",
"0.5185254"
] | 0.7212548 | 1 |
The method creates the DomesticPricingManager service and returns its instance. | public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$entityManager = $container->get('doctrine.entitymanager.orm_default');
return new DomesticPricingManager(
$entityManager,
$container->get(DomesticPricingDataManager::class),
$container->get(DomesticPricingVasManager::class),
$container->get(DomesticRangeWeightManager::class)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __invoke(ContainerInterface $container, $requestedName, array $options = null)\n {\n $entityManager = $container->get('doctrine.entitymanager.orm_default');\n\n return new PricingDataManager(\n $entityManager\n );\n }",
"private function _getServicePaymentModeCostService()\n {\n $service = PaymentModeCostServiceFactory::build();\n $service->setUpdatedBy($this->getUpdatedBy());\n $service->setIpAddress($this->getIpAddress());\n return $service;\n }",
"public function create()\n {\n return view('pages_backend.pricing.pricing3.create');\n }",
"public function store(CreateProductPricingRequest $request)\n {\n $input = $request->all();\n\n $productPricing = $this->productPricingRepository->create($input);\n\n Flash::success('Product Pricing saved successfully.');\n\n return redirect(route('backend.productPricings.index'));\n }",
"public function create()\n {\n $packages = pricing::all();\n return view('backend/pages/admin/payment/create',compact('packages'));\n }",
"public function create()\n {\n return view('management.prices.create');\n }",
"public function __invoke(ContainerInterface $container, $requestedName, array $options = null)\n {\n $entityManager = $container->get('doctrine.entitymanager.orm_default');\n\n return new PricingVasManager(\n $entityManager\n );\n }",
"public function create()\n\t{\n\t\t$this->data[ 'oDeal' ] = new Deal();\n\t\t$this->data[ 'aListingCategories' ] = ListingCategory::where ( 'type' , '=' , 'Deal' )->get ();\n\t\treturn $this->renderView ( 'providers.deals.add' );\n\t}",
"public function create()\r\n {\r\n if (!auth()->user()->can('purchase.create')) {\r\n abort(403, 'Unauthorized action.');\r\n }\r\n\r\n $business_id = request()->session()->get('user.business_id');\r\n\r\n //Check if subscribed or not\r\n if (!$this->moduleUtil->isSubscribed($business_id)) {\r\n return $this->moduleUtil->expiredResponse();\r\n }\r\n\r\n $taxes = TaxRate::where('business_id', $business_id)\r\n ->get();\r\n $orderStatuses = $this->productUtil->orderStatuses();\r\n $business_locations = BusinessLocation::forDropdown($business_id);\r\n\r\n $currency_details = $this->transactionUtil->purchaseCurrencyDetails($business_id);\r\n\r\n $default_purchase_status = null;\r\n if (request()->session()->get('business.enable_purchase_status') != 1) {\r\n $default_purchase_status = 'received';\r\n }\r\n\r\n $types = [];\r\n if (auth()->user()->can('supplier.create')) {\r\n $types['supplier'] = __('report.supplier');\r\n }\r\n if (auth()->user()->can('customer.create')) {\r\n $types['customer'] = __('report.customer');\r\n }\r\n if (auth()->user()->can('supplier.create') && auth()->user()->can('customer.create')) {\r\n $types['both'] = __('lang_v1.both_supplier_customer');\r\n }\r\n $customer_groups = ContactGroup::forDropdown($business_id);\r\n\r\n $business_details = $this->businessUtil->getDetails($business_id);\r\n $shortcuts = json_decode($business_details->keyboard_shortcuts, true);\r\n\r\n $first_location = BusinessLocation::where('business_id', $business_id)->first();\r\n $payment_line = $this->dummyPaymentLine;\r\n $payment_types = $this->productUtil->payment_types($first_location, true, true);\r\n\r\n // no need thease methods in purchase page\r\n unset($payment_types['card']);\r\n unset($payment_types['credit_sale']);\r\n //Accounts\r\n $accounts = $this->moduleUtil->accountsDropdown($business_id, true);\r\n\r\n $contact_id = $this->businessUtil->check_customer_code($business_id, 1);\r\n $type = 'supplier'; //contact type /used in quick add contact\r\n $temp_data = DB::table('temp_data')->where('business_id', $business_id)->select('pos_create_data')->first();\r\n if (!empty($temp_data)) {\r\n $temp_data = json_decode($temp_data->pos_create_data); //name by mistake it is purchase\r\n }\r\n if (!request()->session()->get('business.popup_load_save_data')) {\r\n $temp_data = [];\r\n }\r\n\r\n\r\n $tanks = FuelTank::where('business_id', $business_id)->pluck('fuel_tank_number', 'id');\r\n $is_petro_enable = $this->moduleUtil->hasThePermissionInSubscription($business_id, 'enable_petro_module');\r\n\r\n $purchase_no = $this->businessUtil->getFormNumber('purchase');\r\n\r\n $bank_group_accounts = Account::leftjoin('account_groups', 'accounts.asset_type', 'account_groups.id')\r\n ->where('accounts.business_id', $business_id)\r\n ->where('account_groups.name', 'Bank Account')\r\n ->pluck('accounts.name', 'accounts.id');\r\n\r\n $cash_account_id = Account::getAccountByAccountName('Cash')->id;\r\n\r\n return view('purchase.create')\r\n ->with(compact(\r\n 'cash_account_id',\r\n 'purchase_no',\r\n 'is_petro_enable',\r\n 'tanks',\r\n 'contact_id',\r\n 'type',\r\n 'temp_data',\r\n 'taxes',\r\n 'orderStatuses',\r\n 'business_locations',\r\n 'currency_details',\r\n 'default_purchase_status',\r\n 'customer_groups',\r\n 'types',\r\n 'shortcuts',\r\n 'payment_line',\r\n 'payment_types',\r\n 'accounts',\r\n 'bank_group_accounts'\r\n ));\r\n }",
"public function create()\n {\n return $this->hotelService->create();\n }",
"protected function getPricing() {\n if (!$this->_pricing) {\n $this->_pricing = new Pricing($this);\n }\n return $this->_pricing;\n }",
"public function create()\n {\n return view('backend.agencies.services.create');\n }",
"public function create()\n {\n if (!auth()->user()->can('purchase.create')) {\n abort(403, 'Unauthorized action.');\n }\n\n $business_id = request()->session()->get('user.business_id');\n\n //Check if subscribed or not\n if (!$this->moduleUtil->isSubscribed($business_id)) {\n return $this->moduleUtil->expiredResponse();\n }\n\n $taxes = TaxRate::where('business_id', $business_id)\n ->get();\n $orderStatuses = $this->productUtil->orderStatuses();\n $business_locations = BusinessLocation::forDropdown($business_id);\n\n $currency_details = $this->transactionUtil->purchaseCurrencyDetails($business_id);\n\n $default_purchase_status = null;\n if (request()->session()->get('business.enable_purchase_status') != 1) {\n $default_purchase_status = 'received';\n }\n\n $types = [];\n if (auth()->user()->can('supplier.create')) {\n $types['supplier'] = __('report.supplier');\n }\n if (auth()->user()->can('customer.create')) {\n $types['customer'] = __('report.customer');\n }\n if (auth()->user()->can('supplier.create') && auth()->user()->can('customer.create')) {\n $types['both'] = __('lang_v1.both_supplier_customer');\n }\n $customer_groups = CustomerGroup::forDropdown($business_id);\n\n $business_details = $this->businessUtil->getDetails($business_id);\n $shortcuts = json_decode($business_details->keyboard_shortcuts, true);\n\n $payment_line = $this->dummyPaymentLine;\n $payment_types = $this->productUtil->payment_types();\n\n $currencies = Currency::where('currency_rate', '>', 0)->pluck('code', 'id');\n $business = Business::where('id', $business_id)->first();\n $default_currency_id = $business->currency_id;\n $default_currency = Currency::findOrFail($default_currency_id);\n $default_currency_rate = $default_currency->currency_rate;\n $banks = Bank::where('business_id', '=', $business_id)->pluck('name', 'id');\n\n return view ('purchase.create')\n ->with(compact('taxes', 'orderStatuses', 'business_locations', 'banks', 'currency_details', 'default_purchase_status', 'customer_groups', 'types', 'shortcuts', 'payment_line', 'payment_types', 'currencies', 'default_currency_id', 'default_currency_rate'));\n }",
"public function create($data)\n {\n $currency = Currency::create($data);\n return $currency;\n }",
"public function create()\n\t{\n\t\treturn view('financeCharges.create');\n\t}",
"public function create()\n {\n return view('dashboard.prices.create');\n }",
"protected function create()\n {\n return $this->manager->createContainer($this->configuration);\n }",
"static function newInstance() {\n\t\tif (!\\F3::get('form_price_calculator'))\n\t\t\tthrow new \\Exception('form_price_calculator configuration cannot be empty. Enter the full classpath of the \\models\\PriceCalculator implementation.');\n\n\t\t$priceCalculatorName = \\F3::get('form_price_calculator');\n\t\treturn new $priceCalculatorName;\n\t}",
"public function create($id)\n {\n access_is_allowed('create.point.purchasing.cash.advance');\n\n $view = view('point-purchasing::app.purchasing.point.inventory.cash-advance.create');\n $view->purchase_requisition = PurchaseRequisition::find($id);\n $view->list_user_approval = UserHelper::getAllUser();\n return $view;\n }",
"public function create()\n {\n\t $prices = SetPrice::first();\n\t if(empty($prices)) {\n\t\t return view('product_price.create');\n\t }\n\t else {\n\t\t return redirect(route('set_price.edit' , ['id' => $prices->id]));\n\t }\n }",
"public function create()\n {\n return view('price.create');\n }",
"public static function createManagerForTest()\n {\n $container = self::createContainer();\n $container['isTestMode'] = true;\n\n return new self($container->get('doctrine.entityManager'));\n }",
"public function create()\n {\n $customerService=null;\n $platforms=Config::get('serviceplateform');\n $selectPlatforms=null;\n $jobs=Config::get('servicejob');\n $selectJobs=null;\n return view('admin.customer_services.create',compact('customerService','platforms','selectPlatforms','jobs','selectJobs'));\n }",
"public function create()\n {\n return $this->objectManager->create($this->className);\n }",
"public static function createInvoiceManager() {\n\t\tif(Mage::getStoreConfig('afip/config/enable_prod')) {\n\t\t\t$environment = ProductionEnvironment::getInstance();\n\t\t} else {\n\t\t\t$environment = StagingEnvironment::getInstance();\n\t\t}\n\t\t\n\t\t$logger = FileLoggerHelper::getInstance(NULL, Mage::getBaseDir('var') . '/log/afip');\n\t\t$invoiceManager = InvoiceManager::getInstance($environment, $logger);\n\t\treturn $invoiceManager;\n\t}",
"public function create() {\n\t\t$this->product = ( new Krokedil_Simple_Product() )->create();\n\t\t$order = ( new Krokedil_Order() )->create();\n\t\t$order->add_product( $this->product );\n\t\t$order->calculate_totals();\n\t\t$order->save();\n\t\t$this->order = $order;\n\t}",
"public function create()\n {\n return $this->createWithConfigurationData(array());\n }",
"public function create()\n {\n return $this->store_Nav_DesignService->create();\n }",
"public function create()\n\t{\n return $this->categoryService->create();\n\t}",
"public function create()\n {\n return view('price-list.create');\n }"
] | [
"0.5031478",
"0.4960763",
"0.49030852",
"0.48670313",
"0.48648152",
"0.4847156",
"0.48440814",
"0.4824463",
"0.48091236",
"0.48091128",
"0.47788906",
"0.4765747",
"0.47345325",
"0.47331548",
"0.47187108",
"0.47158298",
"0.46933275",
"0.4681087",
"0.46627805",
"0.463869",
"0.4633242",
"0.46223992",
"0.46139884",
"0.46098945",
"0.459844",
"0.45846456",
"0.45506474",
"0.45491084",
"0.45456988",
"0.45313188"
] | 0.5725358 | 0 |
Filter the query on the gate_id column Example usage: $query>filterByGateId(1234); // WHERE gate_id = 1234 $query>filterByGateId(array(12, 34)); // WHERE gate_id IN (12, 34) $query>filterByGateId(array('min' => 12)); // WHERE gate_id > 12 | public function filterByGateId($gateId = null, $comparison = null)
{
if (is_array($gateId)) {
$useMinMax = false;
if (isset($gateId['min'])) {
$this->addUsingAlias(GateTableMap::COL_GATE_ID, $gateId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($gateId['max'])) {
$this->addUsingAlias(GateTableMap::COL_GATE_ID, $gateId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GateTableMap::COL_GATE_ID, $gateId, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(GateTableMap::COL_GATE_ID, $key, Criteria::EQUAL);\n }",
"public function filterByUser(int $id);",
"function filterInt($field, $value) {\n if (($value = ltrim($value, '=')) !== '') {\n switch ($value[0]) {\n case '>': $this->where($field, '>', (int) substr($value, 1)); break;\n case '<': $this->where($field, '<', (int) substr($value, 1)); break;\n case '!': $this->where($field, '<>', (int) substr($value, 1)); break;\n default: $this->where($field, '=', (int) $value); break;\n }\n }\n }",
"public function withOpinionsFilter(int $min): self\n {\n return $this->andFilterHaving(['>', 'opinions_count', $min]);\n }",
"public function filterId(int $id): self;",
"public function filterBycuratorId($curatorId = null, $comparison = null)\n {\n if (is_array($curatorId)) {\n $useMinMax = false;\n if (isset($curatorId['min'])) {\n $this->addUsingAlias(EventPeer::CURATOR_ID, $curatorId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($curatorId['max'])) {\n $this->addUsingAlias(EventPeer::CURATOR_ID, $curatorId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventPeer::CURATOR_ID, $curatorId, $comparison);\n }",
"public function filterByTransitionId($transitionId = null, $comparison = null)\n {\n if (is_array($transitionId)) {\n $useMinMax = false;\n if (isset($transitionId['min'])) {\n $this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($transitionId['max'])) {\n $this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId, $comparison);\n }",
"public function complexFilter(){\n $mainoffers = Offer::get();\n $offersArr = collect($mainoffers);\n $resultOfFilter = $offersArr->filter(function($key, $value){\n return $key['id'] >= 42;\n });\n return array_values($resultOfFilter->all()); //get only values of array\n }",
"public function filterByPaymentId($value, $operator = Rule::OP_EQ)\n\t{\n\t\treturn $this->filterBy('payment_id', $value, $operator);\n\t}",
"public function filterRows()\n {\n if (!empty($this->request->query())) {\n $columns = $this->getGrid()->getColumns();\n $tableColumns = $this->getValidGridColumns();\n\n foreach ($columns as $columnName => $columnData) {\n // skip rows that are not to be filtered\n if (!$this->canFilter($columnName, $columnData)) {\n continue;\n }\n // user input check\n if (!$this->canUseProvidedUserInput($this->getRequest()->get($columnName))) {\n continue;\n }\n // column check. Since the column data is coming from a user query\n if (!$this->canUseProvidedColumn($columnName, $tableColumns)) {\n continue;\n }\n $operator = $this->extractFilterOperator($columnName, $columnData)['operator'];\n\n $this->doFilter($columnName, $columnData, $operator, $this->getRequest()->get($columnName));\n }\n }\n }",
"public function filterByIdcliente($idcliente = null, $comparison = null)\n {\n if (is_array($idcliente)) {\n $useMinMax = false;\n if (isset($idcliente['min'])) {\n $this->addUsingAlias(ClientePeer::IDCLIENTE, $idcliente['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($idcliente['max'])) {\n $this->addUsingAlias(ClientePeer::IDCLIENTE, $idcliente['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ClientePeer::IDCLIENTE, $idcliente, $comparison);\n }",
"function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periodebayar': return \"tglbayar BETWEEN '$key-01-01' AND '$key-12-31'\";\n\t\t\t}\n\t\t}",
"private function filterStartDate($query)\n {\n $query->where('created_at','>=',\\Input::get('filter_start_date'));\n }",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(KeystancesTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(KeystancesTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(KeystancesTableMap::COL_ID, $id, $comparison);\n }",
"function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}",
"public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n ];\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(BonPlanPeer::ID, $key, Criteria::EQUAL);\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(GsInteractiesGegevensPeer::INTERACTIEWAARSCHUWING_CODE, $key, Criteria::EQUAL);\n }",
"public function getWhereId ($id)\n {\n return [\n \"{$this->col_dealerId} = ?\" => $id[0],\n \"{$this->col_rmsProviderId} = ?\" => $id[1],\n ];\n }",
"protected function sqlKeyFilter()\n\t{\n\t\treturn \"`id` = @id@ AND `disposaldetail_id` = @disposaldetail_id@\";\n\t}",
"protected function sqlKeyFilter()\n {\n return \"`id` = @id@\";\n }",
"public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CustomerPeer::ID, $key, Criteria::EQUAL);\n\t}",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(CanonTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(CanonTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CanonTableMap::COL_ID, $id, $comparison);\n }",
"public function buildGrideFilters() \r\n {\r\n $request = Request::getRequest();\r\n \r\n $where = array();\r\n if (isset($request['filter']) && count($request['filter']) > 0) {\r\n foreach ($request['filter'] as $key => $value) {\r\n if ($value == '' || $value == 'all') {\r\n continue;\r\n }\r\n\r\n if (is_numeric($value)) {\r\n switch ($key) {\r\n case 'category':\r\n $where[] = 'row.id IN (SELECT product_id FROM modx_mm_p2c_link WHERE modx_id IN ('.intval($value).'))';\r\n break;\r\n default:\r\n $where[] = 'row.'.$key.' = '.$value;\r\n break;\r\n }\r\n } else {\r\n switch ($key) {\r\n case 'category':\r\n $exp = array_filter(explode(',', $value));\r\n $exp = count($exp) > 0 ? implode(',', $exp) : '';\r\n $where[] = 'row.id IN (SELECT product_id FROM modx_mm_p2c_link WHERE modx_id IN ('.$exp.'))';\r\n break;\r\n case 'create_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n case 'closed_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n case 'payed_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n default:\r\n $where[] = 'row.'.$key.' Like \"%'.$value.'%\"';\r\n break;\r\n }\r\n \r\n }\r\n }\r\n }\r\n \r\n return count($where) > 0 ? ' WHERE '.implode(' AND ', $where) : '';\r\n }",
"public function filterByClienteId($clienteId = null, $comparison = null)\n\t{\n\t\tif (is_array($clienteId)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($clienteId['min'])) {\n\t\t\t\t$this->addUsingAlias(TicketPeer::CLIENTE, $clienteId['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($clienteId['max'])) {\n\t\t\t\t$this->addUsingAlias(TicketPeer::CLIENTE, $clienteId['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(TicketPeer::CLIENTE, $clienteId, $comparison);\n\t}",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(UserPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(UserPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserPeer::ID, $id, $comparison);\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(CanonTableMap::COL_ID, $key, Criteria::EQUAL);\n }",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(BannersPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(BannersPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(BannersPeer::ID, $id, $comparison);\n }",
"public function getWhereId ($id)\n {\n return [\n \"{$this->col_dealerId} = ?\" => $id,\n ];\n }",
"function getListFilter($col,$key) {\n\t\t\tswitch($col) { \n\t\t\t\tcase 'periode': return \"'$key' between to_char(tglmulai, 'YYYYMM') AND to_char(tglselesai, 'YYYYMM')\";\n\t\t\t}\n\t\t}"
] | [
"0.6033765",
"0.5569351",
"0.5236423",
"0.5218107",
"0.51409644",
"0.50120014",
"0.5007901",
"0.49901944",
"0.4921126",
"0.48887628",
"0.486149",
"0.47760454",
"0.4773467",
"0.4770899",
"0.47458747",
"0.47418204",
"0.4711775",
"0.47044915",
"0.46870038",
"0.46831533",
"0.46798167",
"0.4679225",
"0.4677785",
"0.46632564",
"0.46608913",
"0.46583158",
"0.4654209",
"0.46483514",
"0.46432298",
"0.46380237"
] | 0.60248494 | 1 |
Filter the query on the transition_id column Example usage: $query>filterByTransitionId(1234); // WHERE transition_id = 1234 $query>filterByTransitionId(array(12, 34)); // WHERE transition_id IN (12, 34) $query>filterByTransitionId(array('min' => 12)); // WHERE transition_id > 12 | public function filterByTransitionId($transitionId = null, $comparison = null)
{
if (is_array($transitionId)) {
$useMinMax = false;
if (isset($transitionId['min'])) {
$this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($transitionId['max'])) {
$this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transitionId, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByUser(int $id);",
"public function filterId(int $id): self;",
"public function filterByTransition($transition, $comparison = null)\n {\n if ($transition instanceof \\PHPWorkFlow\\DB\\Transition) {\n return $this\n ->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transition->getTransitionId(), $comparison);\n } elseif ($transition instanceof ObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transition->toKeyValue('PrimaryKey', 'TransitionId'), $comparison);\n } else {\n throw new PropelException('filterByTransition() only accepts arguments of type \\PHPWorkFlow\\DB\\Transition or Collection');\n }\n }",
"private function filterStartDate($query)\n {\n $query->where('created_at','>=',\\Input::get('filter_start_date'));\n }",
"public function isTransitionAllowed($transition_id);",
"function filterInt($field, $value) {\n if (($value = ltrim($value, '=')) !== '') {\n switch ($value[0]) {\n case '>': $this->where($field, '>', (int) substr($value, 1)); break;\n case '<': $this->where($field, '<', (int) substr($value, 1)); break;\n case '!': $this->where($field, '<>', (int) substr($value, 1)); break;\n default: $this->where($field, '=', (int) $value); break;\n }\n }\n }",
"public function filterByid($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(ActionPropertyPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(ActionPropertyPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ActionPropertyPeer::ID, $id, $comparison);\n }",
"public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(StatePeer::STATE_CODE, $key, Criteria::EQUAL);\n\t}",
"function filter_id($id){\n\t\treturn intval($id);\n\t}",
"public function filterByunitId($unitId = null, $comparison = null)\n {\n if (is_array($unitId)) {\n $useMinMax = false;\n if (isset($unitId['min'])) {\n $this->addUsingAlias(ActionPropertyPeer::UNIT_ID, $unitId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($unitId['max'])) {\n $this->addUsingAlias(ActionPropertyPeer::UNIT_ID, $unitId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ActionPropertyPeer::UNIT_ID, $unitId, $comparison);\n }",
"public static function getFilterId()\n\t{\n\t\treturn 'TASKS_REPORT_EFFECTIVE_GRID';\n\t}",
"public function filterByid($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(EventPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(EventPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventPeer::ID, $id, $comparison);\n }",
"public function applyTransitionById($transition_id);",
"public function applyDealIdFilter($query, $value) {\n $rootAlias = $query->getRootAlias();\n\n $dm = MongoManager::getDM();\n $yas = $dm->getRepository('Documents\\YiidActivity')->findBy(array('d_id' => intval($value)));\n\n $user_ids = array();\n foreach ($yas as $ya) {\n $user_ids[] = $ya->getUId();\n }\n\n $user_ids = array_unique($user_ids);\n\n if (count($user_ids) == 0) {\n $user_ids[] = -1;\n }\n\n $query->whereIn($rootAlias.'.id', $user_ids);\n\n return $query;\n }",
"protected function filterQuery($query)\n {\n }",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(LiveEventTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(LiveEventTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LiveEventTableMap::COL_ID, $id, $comparison);\n }",
"public function _add_id_column_conditions( &$query ) {\n\t\t$query[] = 'WHERE';\n\t\t$keys = \\is_array( $this->_get_id_column_name() ) ? $this->_get_id_column_name() : [ $this->_get_id_column_name() ];\n\t\t$first = true;\n\t\tforeach ( $keys as $key ) {\n\t\t\tif ( $first ) {\n\t\t\t\t$first = false;\n\t\t\t} else {\n\t\t\t\t$query[] = 'AND';\n\t\t\t}\n\t\t\t$query[] = $this->_quote_identifier( $key );\n\t\t\t$query[] = '= %s';\n\t\t}\n\t}",
"public function filterBySchoolFunctionId($schoolFunctionId = null, $comparison = null)\n {\n if (is_array($schoolFunctionId)) {\n $useMinMax = false;\n if (isset($schoolFunctionId['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::SCHOOL_FUNCTION_ID, $schoolFunctionId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($schoolFunctionId['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::SCHOOL_FUNCTION_ID, $schoolFunctionId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::SCHOOL_FUNCTION_ID, $schoolFunctionId, $comparison);\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ActionPropertyPeer::ID, $key, Criteria::EQUAL);\n }",
"public function lessThan($propertyName, $value) {\n\t\treturn $this->queryFilter('range', array($propertyName => array('lt' => $value)));\n\t}",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(AliCalcPoschange2TableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(AliCalcPoschange2TableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliCalcPoschange2TableMap::COL_ID, $id, $comparison);\n }",
"public function withOpinionsFilter(int $min): self\n {\n return $this->andFilterHaving(['>', 'opinions_count', $min]);\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ActTableMap::COL_ID, $key, Criteria::EQUAL);\n }",
"public function filter($filter_param);",
"public function getBeforeId(int $id, array $filters = []): Post;",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(AliSmsTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(AliSmsTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliSmsTableMap::COL_ID, $id, $comparison);\n }",
"public function filterByTeam(int $id);",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(AliStockcardSTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(AliStockcardSTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliStockcardSTableMap::COL_ID, $id, $comparison);\n }",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(FairwayTableMap::COL_ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(FairwayTableMap::COL_ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FairwayTableMap::COL_ID, $id, $comparison);\n }",
"public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(UsuarioPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(UsuarioPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UsuarioPeer::ID, $id, $comparison);\n }"
] | [
"0.54486483",
"0.54474145",
"0.50780076",
"0.49690795",
"0.4866579",
"0.48235708",
"0.47891733",
"0.47526515",
"0.47328457",
"0.46458602",
"0.4633505",
"0.4615447",
"0.46090865",
"0.4604931",
"0.45311278",
"0.45029244",
"0.44911245",
"0.4470381",
"0.446264",
"0.44558987",
"0.44295824",
"0.44271043",
"0.4415511",
"0.4407794",
"0.44060123",
"0.43977153",
"0.43915334",
"0.43903306",
"0.43891346",
"0.43826255"
] | 0.59186023 | 0 |
Filter the query on the target_yasper_name column Example usage: $query>filterByTargetYasperName('fooValue'); // WHERE target_yasper_name = 'fooValue' $query>filterByTargetYasperName('%fooValue%'); // WHERE target_yasper_name LIKE '%fooValue%' | public function filterByTargetYasperName($targetYasperName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($targetYasperName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $targetYasperName)) {
$targetYasperName = str_replace('*', '%', $targetYasperName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GateTableMap::COL_TARGET_YASPER_NAME, $targetYasperName, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function where_like($column_name, $value) {\n return $this->_add_simple_where($column_name, 'LIKE', $value);\n }",
"public function where_like( $column_name, $value = null ) {\n\t\treturn $this->_add_simple_where( $column_name, 'LIKE', $value );\n\t}",
"public function q($value = all) {\n return (!$this->requestAllData($value)) ? $this->builder->where('product_datas.name', 'like', '%'.$value.'%') : null;\n }",
"public function filter_method_name() {\n\t\t// TODO: Define your filter method here\n\t}",
"public function filter_method_name() {\n\t\t // TODO:\tDefine your filter method here\n\t\t}",
"public function name($value) {\n return (!$this->requestAllData($value)) ? $this->builder->where('name', 'like', '%'.$value.'%') : null;\n }",
"public function where_not_like($column_name, $value) {\n return $this->_add_simple_where($column_name, 'NOT LIKE', $value);\n }",
"public function scopeName($query,$name){\n $query->where('name','like',\"%$name%\");\n\n }",
"public function filterBy(\n $target,\n $value = null,\n $comparison = null,\n AbstractSearchQueryWriter $searchQueryWriter = null\n ) {\n if (!$target instanceof SearchCriteriaInterface) {\n $target = new SearchCriteria($target, $value, $comparison, $searchQueryWriter);\n }\n\n $this->addCriteria($target);\n\n return $target;\n }",
"protected function addWhereName(Builder $builder)\n {\n $builder->macro('whereName', function (Builder $builder, $name) {\n if (! is_array($name)) {\n $name = func_get_args();\n $name = array_splice($name, 1);\n }\n\n return $builder->whereHas('term', function ($query) use ($name) {\n $query->whereIn('name', $name);\n });\n });\n }",
"public static function apply(Builder $builder, $value) {\n \n return $builder->whereRaw('LOWER(`products`.`name`) LIKE ? ',[trim(strtolower($value)).'%']);\n }",
"public function filter_method_name() {\n\t}",
"public function filterOptionRecipientName($collection, $column)\n {\n $filterValue = $column->getFilter()->getValue();\n if (!$filterValue)\n {\n return;\n }\n\n // remove spaces\n $filterValue = $this->removeSpaces($filterValue);\n\n $collection->getSelect()\n ->where('CONCAT(recipient_firstname, recipient_lastname) LIKE ?', \"%{$filterValue}%\");\n }",
"public function where_not_like( $column_name, $value = null ) {\n\t\treturn $this->_add_simple_where( $column_name, 'NOT LIKE', $value );\n\t}",
"public function like($column, $value) { return $this->addCondition($column, $value, Criterion::LIKE); }",
"public function where($column_name, $value) {\n return $this->where_equal($column_name, $value);\n }",
"function search($name)\n {\n return mysqli_query($this->conn,\n \"SELECT wine.*,category.* \n FROM `wine` \n INNER JOIN `category` ON category.category_id = wine.categoryid \n WHERE `name` like '%$name%' \n or `category_name` like '%$name%'\");\n }",
"function setFilterName($val){\n $this->file_name_filter = $val;\n }",
"function get_name_supplier($q)\n {\n $q = $this->db->query(\"SELECT distinct `name` FROM `batch` where name LIKE '%$q%'\");\n// $q = $this->db->query(\"SELECT distinct `name` FROM `batch` and name LIKE '%$q%'\");\n if ($q->num_rows() > 0) {\n foreach ($q->result_array() as $row) {\n $row_set[] = htmlentities(stripslashes($row['name'])); //build an array\n }\n echo json_encode($row_set); //format the array into json data\n }\n }",
"protected function name($value)\n {\n if ($value) {\n return $this->builder->whereTranslationLike('name', \"%$value%\");\n }\n\n return $this->builder;\n }",
"protected function name($value)\n {\n if ($value) {\n return $this->builder->whereTranslationLike('name', \"%$value%\");\n }\n\n return $this->builder;\n }",
"protected function name($value)\n {\n if ($value) {\n return $this->builder->whereTranslationLike('name', \"%$value%\");\n }\n\n return $this->builder;\n }",
"public function scopeName($query, $name){\n $query->where('name', 'LIKE', \"%$name%\");\n }",
"function wrny_db_filter_user_query( &$user_query ) {\n\n\tif ( is_object( $user_query ) )\n\t\t$user_query->query_where = str_replace( \"user_nicename LIKE\", \"display_name LIKE\", $user_query->query_where );\n\treturn $user_query;\n}",
"public function scopeSearchFilter($query, $q)\n {\n if(!empty($q)){\n return $query->where(DB::raw('LOWER(name)'), 'LIKE', '%' . strtolower($q) . '%');\n }\n }",
"public function name() : string\n {\n return 'filter';\n }",
"public function filterByProductId($value) {\n $this->_filter->equalTo($this->_nameMapping['product'], $value);\n }",
"public function getName()\n {\n return $this->filtername;\n }",
"abstract public function filter($name, $params = array());",
"private function filterColumn(Builder $builder, string $column, string $value)\n {\n Delegator::make([\n new ListFilter($builder),\n new WildcardFilter($builder),\n new ComparisonFilter($builder),\n new NullFilter($builder),\n new EqualsFilter($builder),\n ])->execute($column, $value);\n }"
] | [
"0.541307",
"0.51927674",
"0.51561254",
"0.51156354",
"0.5056962",
"0.5039839",
"0.4894754",
"0.48458937",
"0.4826806",
"0.48004696",
"0.4796937",
"0.4794849",
"0.47820675",
"0.4751145",
"0.47297025",
"0.46939498",
"0.46896362",
"0.4658005",
"0.4650032",
"0.46469823",
"0.46469823",
"0.46469823",
"0.46403578",
"0.46157143",
"0.46114933",
"0.4602904",
"0.45945507",
"0.45769858",
"0.45578086",
"0.45454842"
] | 0.63230693 | 0 |
Filter the query on the created_by column Example usage: $query>filterByCreatedBy(1234); // WHERE created_by = 1234 $query>filterByCreatedBy(array(12, 34)); // WHERE created_by IN (12, 34) $query>filterByCreatedBy(array('min' => 12)); // WHERE created_by > 12 | public function filterByCreatedBy($createdBy = null, $comparison = null)
{
if (is_array($createdBy)) {
$useMinMax = false;
if (isset($createdBy['min'])) {
$this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdBy['max'])) {
$this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($createdBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $createdBy)) {\n $createdBy = str_replace('*', '%', $createdBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbpaisPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(SubscriberGroupPeer::CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(SubscriberGroupPeer::CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SubscriberGroupPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($createdBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $createdBy)) {\n $createdBy = str_replace('*', '%', $createdBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(UsuarioPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function scopeCreatedBy($query,$userId)\n {\n return $query->where('created_by',$userId);\n }",
"public function searchCreatedBy($params)\n {\n $query = $this->searchCreatedByQuery($params);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->setSearchSort($dataProvider);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $this->baseFilter($query);\n\n return $dataProvider;\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function filterByCollaboratorRelatedByCreatedBy($collaborator, $comparison = null)\n {\n if ($collaborator instanceof Collaborator) {\n return $this\n ->addUsingAlias(sfGuardUserPeer::ID, $collaborator->getCreatedBy(), $comparison);\n } elseif ($collaborator instanceof PropelObjectCollection) {\n return $this\n ->useCollaboratorRelatedByCreatedByQuery()\n ->filterByPrimaryKeys($collaborator->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByCollaboratorRelatedByCreatedBy() only accepts arguments of type Collaborator or PropelCollection');\n }\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function filterByUser(int $id);",
"public function filterByIdUserCreated($idUserCreated = null, $comparison = null)\n {\n if (is_array($idUserCreated)) {\n $useMinMax = false;\n if (isset($idUserCreated['min'])) {\n $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_CREATED, $idUserCreated['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($idUserCreated['max'])) {\n $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_CREATED, $idUserCreated['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_CREATED, $idUserCreated, $comparison);\n }",
"public function filterByUserRelatedByCreatedBy($user, $comparison = null)\n {\n if ($user instanceof User) {\n return $this\n ->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $user->getId(), $comparison);\n } elseif ($user instanceof PropelObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $user->toKeyValue('PrimaryKey', 'Id'), $comparison);\n } else {\n throw new PropelException('filterByUserRelatedByCreatedBy() only accepts arguments of type User or PropelCollection');\n }\n }",
"public function filterByClientRelatedByCreatedBy($client, $comparison = null)\n {\n if ($client instanceof Client) {\n return $this\n ->addUsingAlias(sfGuardUserPeer::ID, $client->getCreatedBy(), $comparison);\n } elseif ($client instanceof PropelObjectCollection) {\n return $this\n ->useClientRelatedByCreatedByQuery()\n ->filterByPrimaryKeys($client->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByClientRelatedByCreatedBy() only accepts arguments of type Client or PropelCollection');\n }\n }",
"public function filterByCreatedAt($createdAt = null, $comparison = null)\n {\n if (is_array($createdAt)) {\n $useMinMax = false;\n if (isset($createdAt['min'])) {\n $this->addUsingAlias(UserPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdAt['max'])) {\n $this->addUsingAlias(UserPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserPeer::CREATED_AT, $createdAt, $comparison);\n }",
"public function filterByCreatedAt($createdAt = null, $comparison = null)\n {\n if (is_array($createdAt)) {\n $useMinMax = false;\n if (isset($createdAt['min'])) {\n $this->addUsingAlias(sfGuardUserPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdAt['max'])) {\n $this->addUsingAlias(sfGuardUserPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(sfGuardUserPeer::CREATED_AT, $createdAt, $comparison);\n }",
"public function filterByHistoryRelatedByCreatedBy($history, $comparison = null)\n {\n if ($history instanceof History) {\n return $this\n ->addUsingAlias(sfGuardUserPeer::ID, $history->getCreatedBy(), $comparison);\n } elseif ($history instanceof PropelObjectCollection) {\n return $this\n ->useHistoryRelatedByCreatedByQuery()\n ->filterByPrimaryKeys($history->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByHistoryRelatedByCreatedBy() only accepts arguments of type History or PropelCollection');\n }\n }",
"public function setCreatedBy($var)\n {\n GPBUtil::checkString($var, True);\n $this->created_by = $var;\n\n return $this;\n }",
"public function getCreatedBy(): ActiveQuery\n {\n return $this->hasOne(User::class, ['id' => 'created_by_id']);\n }",
"public function findEventWhereCreator($userId) {\n\n return $this->getEntityManager()->createQuery(\n '\n SELECT \n event\n FROM \n AppBundle:Event event\n WHERE \n event.createdBy = :userId\n ORDER BY \n event.createdDate\n '\n )\n ->setParameter('userId', $userId)\n ->getResult();\n }",
"public function scopeFilter($query, $request)\n {\n // filter id\n if ($request->has('id')) {\n $query->where('id',$request->get('id'));\n }\n // filter title\n if ($request->has('name')) {\n $query->where('name', 'like', \"%{$request->get('name')}%\");\n }\n // filter created_at\n if ($request->has('created_at_from')) {\n $query->where('created_at', '>=', Carbon::parse($request->get('created_at_from')));\n }\n if ($request->has('created_at_to')) {\n $query->where('created_at', '<=', Carbon::parse($request->get('created_at_to')));\n }\n return $query;\n }",
"private function filterStartDate($query)\n {\n $query->where('created_at','>=',\\Input::get('filter_start_date'));\n }",
"public function filterByCreatedAt($createdAt = null, $comparison = null)\n {\n if (is_array($createdAt)) {\n $useMinMax = false;\n if (isset($createdAt['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdAt['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_AT, $createdAt, $comparison);\n }",
"public static function filterQuery(ModelCriteria $query, Parameter $filter) {\n\t \t$column = $filter->get('column','Undefined');\n\n\t \tif (is_callable(array($query, 'filterBy'.ucfirst($column)), false, $filterBy)) {\n\t \t\t// Add OR statement while necessary\n\t \t\tif ($filter->get('chainOrStatement')) $query->_or();\n\t \t\t\n\t \t\t$query = call_user_func_array(array($query, $filterBy), array($filter->get('value','')));\n\t\t}\n\n\t\treturn $query;\n\t }",
"public function can_filter_by_user_name_on_list()\n {\n }",
"public function filterOwner()\n\t{\n\t\t// should not be searched.\n \n\t\t$criteria=new CDbCriteria;\n\n $this->owner = Yii::app()->user->id;\n $criteria->compare('owner', $this->owner);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function setCreatedBy($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Eolymp\\Wellknown\\ExpressionID::class);\n $this->created_by = $arr;\n\n return $this;\n }",
"public function filterByCreatedAt($createdAt = null, $comparison = null)\n {\n if (is_array($createdAt)) {\n $useMinMax = false;\n if (isset($createdAt['min'])) {\n $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdAt['max'])) {\n $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserTableMap::COL_CREATED_AT, $createdAt, $comparison);\n }",
"public function filterByCreated($created = null, $comparison = null)\n {\n if (is_array($created)) {\n $useMinMax = false;\n if (isset($created['min'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED, $created['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($created['max'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED, $created['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TransactionTableMap::COL_CREATED, $created, $comparison);\n }"
] | [
"0.69131",
"0.6633434",
"0.66013163",
"0.6460924",
"0.6175363",
"0.60958534",
"0.5904407",
"0.5764681",
"0.56446666",
"0.54948014",
"0.5436763",
"0.5403675",
"0.5363046",
"0.5361946",
"0.53348744",
"0.53076804",
"0.52339745",
"0.52257484",
"0.5219704",
"0.5215406",
"0.52128613",
"0.51977307",
"0.515824",
"0.5118916",
"0.5117427",
"0.51138943",
"0.5104015",
"0.51021975",
"0.5078294",
"0.50667995"
] | 0.6776882 | 1 |
Filter the query on the modified_at column Example usage: $query>filterByModifiedAt('20110314'); // WHERE modified_at = '20110314' $query>filterByModifiedAt('now'); // WHERE modified_at = '20110314' $query>filterByModifiedAt(array('max' => 'yesterday')); // WHERE modified_at > '20110313' | public function filterByModifiedAt($modifiedAt = null, $comparison = null)
{
if (is_array($modifiedAt)) {
$useMinMax = false;
if (isset($modifiedAt['min'])) {
$this->addUsingAlias(GateTableMap::COL_MODIFIED_AT, $modifiedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($modifiedAt['max'])) {
$this->addUsingAlias(GateTableMap::COL_MODIFIED_AT, $modifiedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GateTableMap::COL_MODIFIED_AT, $modifiedAt, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function test_created_at_filter_with_now() {\n\t\tself::clear_get_values();\n\t\t$dynamic_view = self::get_view_by_key( 'dynamic-view' );\n\n\t\t$filter_args = array(\n\t\t\tarray( 'type' => 'col',\n\t\t\t\t'col' => 'created_at',\n\t\t\t\t'op' => '<',\n\t\t\t\t'val' => 'NOW',\n\t\t\t),\n\t\t);\n\t\tself::add_filter_to_view( $dynamic_view, $filter_args );\n\n\t\t$d = self::get_default_args( $dynamic_view, array( 'Jamie', 'Steve', 'Steph' ), array() );\n\n\t\tself::run_get_display_data_tests( $d, 'created at filter' );\n\t}",
"public function getByDateModified(DateTime $date);",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n\t{\n\t\tif (is_array($updatedAt)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($updatedAt['min'])) {\n\t\t\t\t$this->addUsingAlias(StuffPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($updatedAt['max'])) {\n\t\t\t\t$this->addUsingAlias(StuffPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(StuffPeer::UPDATED_AT, $updatedAt, $comparison);\n\t}",
"public function filterBymodifyDatetime($modifyDatetime = null, $comparison = null)\n {\n if (is_array($modifyDatetime)) {\n $useMinMax = false;\n if (isset($modifyDatetime['min'])) {\n $this->addUsingAlias(ActionPropertyPeer::MODIFYDATETIME, $modifyDatetime['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($modifyDatetime['max'])) {\n $this->addUsingAlias(ActionPropertyPeer::MODIFYDATETIME, $modifyDatetime['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ActionPropertyPeer::MODIFYDATETIME, $modifyDatetime, $comparison);\n }",
"public function testChangedSinceFilter()\n {\n /** @var MockObject|\\Magemock_Sample_Model_Resource_Vehicle_Collection $collection */\n $collection = new \\Magemock_Sample_Model_Resource_Vehicle_Collection();\n $collection->expects($this->exactly(3))\n ->method('addFieldToFilter')\n ->with($this->equalTo('updated_at'), $this->equalTo(['gt' => '2016-01-01 10:00:00']));\n\n // test with DateTime\n $date = new \\DateTime();\n $date->setDate(2016, 1, 1);\n $date->setTime(10, 0, 0);\n $collection->addChangedSinceFilter($date);\n\n // test with Zend_Date\n $date = new \\Zend_Date('2016-01-01 10:00:00');\n $collection->addChangedSinceFilter($date);\n\n // test with string\n $collection->addChangedSinceFilter('2016-01-01 10:00:00');\n }",
"public function setModifiedAt($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->modified_at = $var;\n\n return $this;\n }",
"public function filterBymodifyDatetime($modifyDatetime = null, $comparison = null)\n {\n if (is_array($modifyDatetime)) {\n $useMinMax = false;\n if (isset($modifyDatetime['min'])) {\n $this->addUsingAlias(EventPeer::MODIFYDATETIME, $modifyDatetime['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($modifyDatetime['max'])) {\n $this->addUsingAlias(EventPeer::MODIFYDATETIME, $modifyDatetime['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventPeer::MODIFYDATETIME, $modifyDatetime, $comparison);\n }",
"public function getLastModifiedAt();",
"public function getLastModifiedAt();",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt))\n {\n $useMinMax = false;\n if (isset($updatedAt['min']))\n {\n $this->addUsingAlias(CollectionItemOfferPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max']))\n {\n $this->addUsingAlias(CollectionItemOfferPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax)\n {\n return $this;\n }\n if (null === $comparison)\n {\n $comparison = Criteria::IN;\n }\n }\n return $this->addUsingAlias(CollectionItemOfferPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function getModifiedDate();",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(EventsPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(EventsPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventsPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function getModifiedAt()\n {\n return $this->modified_at;\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(AdsLogTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(AdsLogTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AdsLogTableMap::COL_UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"function vb_filter_where( $where ) {\n\n\t$options = vb_options( views()->id );\n\n\tif ( empty( $options['date-filter'] ) )\n\t\treturn $where;\n\n\t$min_date = null;\n\t$max_date = null;\n\n\tif ( 'days-range' == $options['date-filter'] ) {\n\t\t$min_date = ! empty( $options['min-days'] ) ? strtotime( \"-{$options['min-days']} days\" ) : null;\n\t\t$max_date = ! empty( $options['max-days'] ) ? strtotime( \"-{$options['max-days']} days\" ) : null;\n\t} else if( 'date-range' == $options['date-filter'] ) {\n\t\t$min_date = ! empty( $options['date-from'] ) ? strtotime( $options['date-from'] ) : null;\n\t\t$max_date = ! empty( $options['date-to'] ) ? strtotime( $options['date-to'] ) : null;\n\t}\n\n\tif ( $max_date )\n\t\t$max_date = $max_date + 60 * 60 * 24;\n\n\t$min_date = $min_date ? date( 'Y-m-d', $min_date ) : null;\n\t$max_date = $max_date ? date( 'Y-m-d', $max_date ) : null;\n\n\tif ( $min_date )\n\t\t$where .= \" AND post_date >= '$min_date'\";\n\n\tif ( $max_date )\n\t\t$where .= \" AND post_date < '$max_date'\";\n\n\treturn $where;\n}",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(CyclicalEventsPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(CyclicalEventsPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CyclicalEventsPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function sortByModifiedTime()\n {\n return parent::sortByModifiedTime();\n }",
"public function setModifiedAt(?string $modifiedAt) : self\n {\n $this->modifiedAt = $modifiedAt;\n return $this;\n }",
"public function getDateModified();",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(CustomListElementPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(CustomListElementPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CustomListElementPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByLastUpdated($lastUpdated = null, $comparison = null)\n\t{\n\t\tif (is_array($lastUpdated)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($lastUpdated['min'])) {\n\t\t\t\t$this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($lastUpdated['max'])) {\n\t\t\t\t$this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated, $comparison);\n\t}",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(TbpaisPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(TbpaisPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TbpaisPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(UserPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(UserPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserPeer::UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(LiveEventTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(LiveEventTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LiveEventTableMap::COL_UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(FileTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(FileTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FileTableMap::COL_UPDATED_AT, $updatedAt, $comparison);\n }",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(PaypalLogTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(PaypalLogTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PaypalLogTableMap::UPDATED_AT, $updatedAt, $comparison);\n }",
"function test_created_at_filter_with_minus_one_day() {\n\t\tself::clear_get_values();\n\t\t$dynamic_view = self::get_view_by_key( 'dynamic-view' );\n\n\t\t// Update creation date on Steve's entry to NOW\n\t\tglobal $wpdb;\n\t\t$now = date( 'Y-m-d H:i:s' );\n\t\t$entry_id = FrmEntry::get_id_by_key( 'steve_entry_key' );\n\t\t$wpdb->update( $wpdb->prefix . 'frm_items', array( 'created_at' => $now ), array( 'id' => $entry_id ) );\n\n\t\t$filter_args = array(\n\t\t\tarray( 'type' => 'col',\n\t\t\t\t'col' => 'created_at',\n\t\t\t\t'op' => '>',\n\t\t\t\t'val' => '-1 day',\n\t\t\t),\n\t\t);\n\t\tself::add_filter_to_view( $dynamic_view, $filter_args );\n\n\t\t$d = self::get_default_args( $dynamic_view, array( 'Steve' ), array( 'Jamie', 'Steph' ) );\n\n\t\tself::run_get_display_data_tests( $d, 'created at filter' );\n\n\t\t// Set data back after testing\n\t\t$original_date = '2015-05-13 19:40:11';\n\t\t$wpdb->update( $wpdb->prefix . 'frm_items', array( 'created_at' => $original_date ), array( 'id' => $entry_id ) );\n\t}",
"public function filterByUpdatedAt($updatedAt = null, $comparison = null)\n {\n if (is_array($updatedAt)) {\n $useMinMax = false;\n if (isset($updatedAt['min'])) {\n $this->addUsingAlias(ActTableMap::COL_UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedAt['max'])) {\n $this->addUsingAlias(ActTableMap::COL_UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ActTableMap::COL_UPDATED_AT, $updatedAt, $comparison);\n }",
"public function findLatestByModified($_criteria = null, $order_by = null, $limit = null, $offset = null)\n {\n $order_by = array(\n 'date_modified' => \\Doctrine\\Common\\Collections\\Criteria::DESC\n );\n\n $criteria = $this->decodeCriteriaForModified($_criteria, $order_by, $limit, $offset);\n\n $builder = new \\Doctrine\\Common\\Collections\\ExpressionBuilder;\n\n return $this->matching($criteria);\n }"
] | [
"0.5818814",
"0.5757046",
"0.56485665",
"0.5587032",
"0.5574156",
"0.55587524",
"0.5487694",
"0.539188",
"0.539188",
"0.5380349",
"0.53547996",
"0.53534293",
"0.5330832",
"0.5293298",
"0.52786",
"0.5275274",
"0.5253292",
"0.52307177",
"0.52185154",
"0.5215766",
"0.5194051",
"0.51930517",
"0.51780224",
"0.51681787",
"0.51559347",
"0.51423043",
"0.5124921",
"0.5108296",
"0.51003826",
"0.50869435"
] | 0.5813777 | 1 |
Filter the query on the modified_by column Example usage: $query>filterByModifiedBy(1234); // WHERE modified_by = 1234 $query>filterByModifiedBy(array(12, 34)); // WHERE modified_by IN (12, 34) $query>filterByModifiedBy(array('min' => 12)); // WHERE modified_by > 12 | public function filterByModifiedBy($modifiedBy = null, $comparison = null)
{
if (is_array($modifiedBy)) {
$useMinMax = false;
if (isset($modifiedBy['min'])) {
$this->addUsingAlias(GateTableMap::COL_MODIFIED_BY, $modifiedBy['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($modifiedBy['max'])) {
$this->addUsingAlias(GateTableMap::COL_MODIFIED_BY, $modifiedBy['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GateTableMap::COL_MODIFIED_BY, $modifiedBy, $comparison);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function filterByUserModify($userModify = null, $comparison = null)\n {\n if (is_array($userModify)) {\n $useMinMax = false;\n if (isset($userModify['min'])) {\n $this->addUsingAlias(OperationDecouvertsPeer::USER_MODIFY, $userModify['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($userModify['max'])) {\n $this->addUsingAlias(OperationDecouvertsPeer::USER_MODIFY, $userModify['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OperationDecouvertsPeer::USER_MODIFY, $userModify, $comparison);\n }",
"public function setModifiedBy($a_modifiedby) {\n\n $this->a_modifiedby = $a_modifiedby;\n\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbpaisPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function getModifiedBy()\n\t{\n\t\treturn $this->modifiedBy; \n\n\t}",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(SubscriberGroupPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(SubscriberGroupPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SubscriberGroupPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function setModifiedBy(User $modifiedBy)\n\t{\n\t\t$this->modifiedBy=$modifiedBy; \n\t\t$this->keyModified['Modified_By'] = 1; \n\n\t}",
"public function setModifiedBy($modifiedBy)\n {\n $this->modifiedBy = $modifiedBy;\n }",
"public function getModifiedBy()\n {\n return $this->modifiedBy;\n }",
"public function filterByIdUserModified($idUserModified = null, $comparison = null)\n {\n if (is_array($idUserModified)) {\n $useMinMax = false;\n if (isset($idUserModified['min'])) {\n $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_MODIFIED, $idUserModified['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($idUserModified['max'])) {\n $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_MODIFIED, $idUserModified['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(HbfIngresosTableMap::COL_ID_USER_MODIFIED, $idUserModified, $comparison);\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(UsuarioPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function getLastModifiedBy();",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberFunctionPeer::CREATED_BY, $createdBy, $comparison);\n }",
"protected function set_modified_by( $a ){ $this->modified_by = (int)$a; return min( 0, $this->modified_by ); }",
"public function filterByLastmodifiedby($lastmodifiedby = null, $comparison = null)\n {\n if (is_array($lastmodifiedby)) {\n $useMinMax = false;\n if (isset($lastmodifiedby['min'])) {\n $this->addUsingAlias(SalesPeer::LASTMODIFIEDBY, $lastmodifiedby['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastmodifiedby['max'])) {\n $this->addUsingAlias(SalesPeer::LASTMODIFIEDBY, $lastmodifiedby['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SalesPeer::LASTMODIFIEDBY, $lastmodifiedby, $comparison);\n }",
"public function filterByCollaboratorRelatedByUpdatedBy($collaborator, $comparison = null)\n {\n if ($collaborator instanceof Collaborator) {\n return $this\n ->addUsingAlias(sfGuardUserPeer::ID, $collaborator->getUpdatedBy(), $comparison);\n } elseif ($collaborator instanceof PropelObjectCollection) {\n return $this\n ->useCollaboratorRelatedByUpdatedByQuery()\n ->filterByPrimaryKeys($collaborator->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByCollaboratorRelatedByUpdatedBy() only accepts arguments of type Collaborator or PropelCollection');\n }\n }",
"public function getByModified($Modified)\n {\n $result = $this->getList(array('Modified' => $Modified));\n return $result;\n }",
"private function addConditionForBe_user() {\n $this->addWhere('modification_user IN (\n SELECT uid FROM be_users\n WHERE username LIKE \"%' . addslashes(trim($this->input['be_user'])) . '%\"\n OR realName LIKE \"%' . addslashes(trim($this->input['be_user'])) . '%\"\n )');\n }",
"public function filterByModified($modified = null, $comparison = null)\n {\n if (is_array($modified)) {\n $useMinMax = false;\n if (isset($modified['min'])) {\n $this->addUsingAlias(RegcodeTableMap::COL_MODIFIED, $modified['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($modified['max'])) {\n $this->addUsingAlias(RegcodeTableMap::COL_MODIFIED, $modified['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(RegcodeTableMap::COL_MODIFIED, $modified, $comparison);\n }",
"public function filterBymodifyPersonId($modifyPersonId = null, $comparison = null)\n {\n if (is_array($modifyPersonId)) {\n $useMinMax = false;\n if (isset($modifyPersonId['min'])) {\n $this->addUsingAlias(ActionPropertyPeer::MODIFYPERSON_ID, $modifyPersonId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($modifyPersonId['max'])) {\n $this->addUsingAlias(ActionPropertyPeer::MODIFYPERSON_ID, $modifyPersonId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ActionPropertyPeer::MODIFYPERSON_ID, $modifyPersonId, $comparison);\n }",
"public function filterBymodifyPersonId($modifyPersonId = null, $comparison = null)\n {\n if (is_array($modifyPersonId)) {\n $useMinMax = false;\n if (isset($modifyPersonId['min'])) {\n $this->addUsingAlias(EventPeer::MODIFYPERSON_ID, $modifyPersonId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($modifyPersonId['max'])) {\n $this->addUsingAlias(EventPeer::MODIFYPERSON_ID, $modifyPersonId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventPeer::MODIFYPERSON_ID, $modifyPersonId, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(GateTableMap::COL_CREATED_BY, $createdBy, $comparison);\n }",
"function update_meta_by()\n\t{\n\t\treturn call_user_func_array(\n\t\t\tarray(get_instance()->kbcore->metadata, 'update_by'),\n\t\t\tfunc_get_args()\n\t\t);\n\t}",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TeamMemberPeer::CREATED_BY, $createdBy, $comparison);\n }",
"public function filterByCreatedBy($createdBy = null, $comparison = null)\n {\n if (is_array($createdBy)) {\n $useMinMax = false;\n if (isset($createdBy['min'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($createdBy['max'])) {\n $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TransactionTableMap::COL_CREATED_BY, $createdBy, $comparison);\n }",
"function setUpdatedBy($updated_by) {\n return $this->setUserFromFieldSet($updated_by, 'updated_by');\n }",
"public function updatedBy() {\n\t\tif ($this->getUserobjecttype() != \"\") {\n\t\t\t$objectQueryName = $this->getUserobjecttype() . 'Query';\n\t\t\tif (class_exists($objectQueryName)) {\n\t\t\t\t$query = BaseQuery::create($this->getUserobjecttype());\n\t\t\t\treturn $query->findPK($this->getUserobjectid());\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}",
"public function getByDateModified(DateTime $date);",
"public function filterByUser(int $id);"
] | [
"0.64464754",
"0.62109846",
"0.5917705",
"0.5849336",
"0.58474296",
"0.58036536",
"0.5778875",
"0.5729751",
"0.57248753",
"0.56920666",
"0.5610694",
"0.55900747",
"0.5582068",
"0.5500674",
"0.5477136",
"0.5400119",
"0.5385584",
"0.53428876",
"0.533237",
"0.5299439",
"0.52989113",
"0.52835083",
"0.52343667",
"0.5229904",
"0.51883376",
"0.51782876",
"0.517722",
"0.51431394",
"0.5093804",
"0.508932"
] | 0.6370221 | 1 |
Filter the query by a related \PHPWorkFlow\DB\Transition object | public function filterByTransition($transition, $comparison = null)
{
if ($transition instanceof \PHPWorkFlow\DB\Transition) {
return $this
->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transition->getTransitionId(), $comparison);
} elseif ($transition instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(GateTableMap::COL_TRANSITION_ID, $transition->toKeyValue('PrimaryKey', 'TransitionId'), $comparison);
} else {
throw new PropelException('filterByTransition() only accepts arguments of type \PHPWorkFlow\DB\Transition or Collection');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function filterQuery(Query $q);",
"protected function filterQuery($query)\n {\n }",
"public function scopeSiblings($query) {\n return $query->published()->where('id', '<>', $this->id)->get( );\n }",
"public function handleAction(WorkflowTransitionEvent $event) {\n $entity = $event->getEntity();\n $toState = $event->getToState();\n $eventWorkflow = $event->getWorkflow();\n // Check the new state is the published one.\n $is_published_state = $this->isPublishedState($toState, $eventWorkflow);\n $fields = $this->workflowHelper->getEntityStateField($entity);\n if ($entity instanceof EntityPublishedInterface) {\n if ($is_published_state) {\n $entity->setPublished();\n }\n else {\n $entity->setUnpublished();\n }\n }\n }",
"public function isSatisfiedBy(TransitionEvent $event);",
"public function __invoke($query, $input)\n {\n $arguments = $this->getFilterParams($input);\n\n // filter the relationship translation\n if ( isset($arguments['title'])) {\n\n $title = $input['title'];\n \n unset($arguments['title']);\n\n return $query->whereHas('translations',function ($q) use ($title) {\n $q->where(\"title\", $title);\n })->where($arguments);\n }\n\n return $query->where($arguments); \n }",
"public function filter()\n {\n\n $query = self::find()\n ->select([\n 'ac_tran.id tran_id',\n 'ac_tran.accounting_date',\n 'acc_label' => 'CASE\n `ac_tran`.`debit_rec_acc_id`\n WHEN :account_id\n THEN `c`.`label` \n ELSE `d`.`label` \n END',\n 'ac_tran.code',\n 'ac_tran.notes',\n 'ac_tran.t_datetime',\n 'ac_tran.t_user_id',\n 'ac_tran.ref_table',\n 'ac_tran.ref_id'\n ])\n ->innerJoin(\n 'ac_rec_acc AS d',\n '`ac_tran`.`debit_rec_acc_id` = `d`.`id`'\n )\n ->innerJoin(\n 'ac_rec_acc AS c',\n '`ac_tran`.`credit_rec_acc_id` = `c`.`id`'\n )\n ->where([\n 'ac_tran.period_id' => $this->filterPeriodId,\n 'ac_tran.sys_company_id' => $this->sys_company_id,\n ])\n ->andWhere(\n '(d.account_id = :account_id OR c.account_id = :account_id)',\n [':account_id' => $this->filterAccountId]\n )\n ->andFilterWhere(['ac_tran.code' => $this->filterCode])\n ->orderBy(['ac_tran.t_datetime' => SORT_ASC]);\n\n if ($this->filterWithDim) {\n if ($this->filterDimId) {\n $query\n ->addSelect([\n 'amount' => 'CASE `d`.`account_id`\n WHEN :account_id\n THEN - `ac_tran_dim`.`amt`\n ELSE + `ac_tran_dim`.`amt`\n END',\n 'dim_notes' => '`ac_tran_dim`.`notes`'\n ])\n ->innerJoin(\n 'ac_tran_dim',\n '`ac_tran_dim`.`tran_id` = `ac_tran`.`id`'\n )\n ->andWhere(['ac_tran_dim.dim_id' => $this->filterDimId])\n ->addParams([\n ':account_id' => $this->filterAccountId\n ]);\n } else {\n $query\n ->addSelect([\n 'amount' => '\n CASE `d`.`account_id`\n WHEN :account_id\n THEN - `ac_tran`.`amount`\n ELSE + `ac_tran`.`amount`\n END\n ',\n 'dim_notes' => new Expression('NULL')\n ])\n ->leftJoin(\n 'ac_tran_dim',\n '`ac_tran_dim`.`tran_id` = `ac_tran`.`id`'\n )\n ->andWhere([\n '`ac_tran_dim`.`dim_id`' => $this->filterDimId,\n '`ac_tran_dim`.`id`' => null\n ])\n ->addParams([\n ':account_id' => $this->filterAccountId\n ]);\n }\n } else {\n $query\n ->addSelect([\n 'amount' => '\n CASE `d`.`account_id`\n WHEN :account_id\n THEN - `ac_tran`.`amount`\n ELSE + `ac_tran`.`amount`\n END\n ',\n 'dim_notes' => new Expression('NULL')\n ]);\n }\n $query\n ->addSelect([\n 'username' => '`user`.`username`'\n ])\n ->leftJoin(\n 'user',\n '`user`.`id` = `ac_tran`.`t_user_id`'\n );\n $tran = $query->asArray()->all();\n if ($this->filterAddStartBalance) {\n $balanceRow = new self();\n $balanceRow->amount = AcPeriodBalance::accPeriodBalanceById($this->filterAccountId, $this->filterPeriodId);\n array_unshift($tran, $balanceRow);\n }\n return $tran;\n }",
"public function isTransitionAllowed($transition_id);",
"public function getTransitions();",
"public function getTransitions();",
"public function getTransitions();",
"public function isFreeNowFilter(): self\n {\n $subQuery = Tasks::find()\n ->select(['doer_id'])\n ->andFilterWhere(['=', 'status_task', 'На исполнении']);\n\n return $this->andWhere(['not', ['users.id' => $subQuery]]);\n }",
"function workflow_get_transition_id($from, $to) {\n return db_result(db_query(\"SELECT tid FROM {workflow_transitions} WHERE state_name = '%s' AND target_state_name = '%s'\", $from, $to));\n}",
"private function filterStartDate($query)\n {\n $query->where('created_at','>=',\\Input::get('filter_start_date'));\n }",
"public function getTransitionTo($to_state_id);",
"function venture_deal_views_handler_not_united_states($op, $filter, $filterinfo, &$query) {\n if ($filter['value'] == 1) {\n $table = $filterinfo['table'];\n $field = $filterinfo['field'];\n $query->add_where(\"$table.$field != 'United States'\");\n }\n}",
"public function getTransitionsFrom($from);",
"protected function prepareQueryStates(&$query, $options = array())\n {\n // Filter by state published.\n $published = JArrayHelper::getValue($options, \"published\", 0, \"int\");\n if (!empty($published)) {\n $query->where(\"a.published = \" . (int)$published);\n }\n\n // Filter by state approved.\n $approved = JArrayHelper::getValue($options, \"approved\", 0, \"int\");\n if (!empty($approved)) {\n $query->where(\"a.approved = \" . (int)$approved);\n }\n }",
"public function __invoke(TransitionEvent $event);",
"protected function filter(&$query)\n {\n // Concrete class can implement a global filter\n // this can be skipped with params 'filter' => false\n }",
"public function scopePublished($query){\n \n $query->where('published_at','<=',Carbon::now());\n\n }",
"public function triggerTransition(Transition $transition): TransitionResult;",
"public function test(TransitionEvent $event);",
"public function query_migration_table() {\n $database = \\Drupal::service('database');\n $query = $database->select('migrate_map_convert_public_body_to_agency', 'm');\n return $query\n ->condition('m.source_row_status', 0)\n ->fields('m', ['sourceid1', 'sourceid2', 'destid1'])\n ->orderBy('destid1', 'ASC')\n ->execute();\n }",
"public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(StatePeer::STATE_CODE, $key, Criteria::EQUAL);\n\t}",
"public function scopeFuture($query)\n {\n $query->where('date', '>' , Carbon::yesterday());\n }",
"public static function active($query)\n {\n $query->andWhere(['status' => 1]);\n }",
"public function getSingleTransQuery($params) {\r\n $this->api = \"stq\";\r\n $this->transID = $params['transID'];\r\n $this->reportStartDate = $params['reportStart'];\r\n $this->reportEndDate = $params['reportEnd'];\r\n if(isset($params[\"errors\"])) {\r\n $this->excludeErrors = $params[\"errors\"];\r\n }\r\n }",
"public function scopeDestacados($q){\n\t\treturn $q->where(\"destacado\",\"=\",\"1\");\n\t}",
"public function getPossibleTransitions();"
] | [
"0.5156776",
"0.49884567",
"0.49508858",
"0.4940121",
"0.4923032",
"0.48176023",
"0.48141176",
"0.4779738",
"0.47554561",
"0.47554561",
"0.47554561",
"0.47290695",
"0.47166684",
"0.47105163",
"0.4703487",
"0.4699875",
"0.46882936",
"0.46487895",
"0.4639262",
"0.45647934",
"0.45337301",
"0.44973975",
"0.44971523",
"0.44801396",
"0.44481605",
"0.4427286",
"0.4416361",
"0.43869478",
"0.43795973",
"0.43747643"
] | 0.5463622 | 0 |
Use the Transition relation Transition object | public function useTransitionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinTransition($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Transition', '\PHPWorkFlow\DB\TransitionQuery');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function triggerTransition(Transition $transition): TransitionResult;",
"public function getTransitions();",
"public function getTransitions();",
"public function getTransitions();",
"public function transition(StateAwareInterface $subject, $transition);",
"public function applyTransition(WorkflowTransition $transition);",
"public function __invoke(TransitionEvent $event);",
"public function runTransition($from, $to, ProcessInstance $instance);",
"protected function getTransitionTableGateway()\n {\n $doctrine = $this->getDoctrineConnection(); \n $metadata = $this->getTableMetaData()->getTransitionTable(); \n $table_name = $this->getTableMetaData()->getTransitionTableName();\n $builder = new TransitionBuilder();\n $mock_event = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')->getMock(); \n \n return new TransitionGateway($table_name,$doctrine,$mock_event,$metadata,null,$builder);\n \n }",
"function workflow_transition($object, $state_name, $workflow) {\n // Make sure new state is a valid choice.\n if (array_key_exists($state_name, workflow_field_choices($object, $workflow))) {\n if (!$object->workflow_scheduled) {\n // It's an immediate change. Do the transition.\n $comment = isset($object->workflow_comment) ? $object->workflow_comment : NULL;\n workflow_execute_transition($object, $state_name, $workflow, $comment);\n }\n else {\n // Schedule the the time to change the state.\n $comment = $object->workflow_comment;\n $old_state_name = workflow_node_current_state($object);\n\n if ($object->workflow_scheduled_date['day'] < 10) {\n $object->workflow_scheduled_date['day'] = '0' .\n $object->workflow_scheduled_date['day'];\n }\n\n if ($object->workflow_scheduled_date['month'] < 10) {\n $object->workflow_scheduled_date['month'] = '0' .\n $object->workflow_scheduled_date['month'];\n }\n\n if (!$object->workflow_scheduled_hour) {\n $object->workflow_scheduled_hour = '00:00';\n }\n\n $scheduled = $object->workflow_scheduled_date['year'] . $object->workflow_scheduled_date['month'] . $object->workflow_scheduled_date['day'] . ' ' . $object->workflow_scheduled_hour . 'Z';\n if ($scheduled = strtotime($scheduled)) {\n // Adjust for user and site timezone settings.\n global $user;\n if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) {\n $timezone = $user->timezone;\n }\n else {\n $timezone = variable_get('date_default_timezone', 0);\n }\n $scheduled = $scheduled - $timezone;\n\n // Clear previous entries and insert.\n db_query(\"DELETE FROM {workflow_scheduled_transition} WHERE nid = %d\", $object->nid);\n db_query(\"INSERT INTO {workflow_scheduled_transition} (nid, old_state_name, state_name, scheduled, comment) VALUES (%d, '%s', '%s', %d, '%s')\", $object->nid, $old_state_name, $state_name, $scheduled, $comment);\n\n $t_args = array(\n '@node_title' => $object->title,\n '%state_name' => workflow_get_state_label($state_name),\n '!scheduled_date' => format_date($scheduled),\n );\n watchdog('workflow', '@node_title scheduled for state change to %state_name on !scheduled_date', $t_args, WATCHDOG_NOTICE, l('view', \"node/$object->nid/workflow\"));\n drupal_set_message(t('@node_title is scheduled for state change to %state_name on !scheduled_date', $t_args));\n }\n }\n }\n}",
"public function changeTransition($transition){\n\t\t\t$this->validateInited();\n\t\t\t\n\t\t\t$this->params[\"slide_transition\"] = $transition;\n\t\t\t$this->updateParamsInDB();\n\t\t}",
"public function applyTransitionById($transition_id);",
"public function getTransitionTo($to_state_id);",
"function transitions($event = null) {\n\t\tif (is_object($event)) {\n\t\t\t$message = \"StateMachineBehavior::transitions() - You must define {$event->name}\";\n\t\t\t$message .= \"::(\\$event) in your {$event->name} model before continuing\";\n\t\t\ttrigger_error($message, E_USER_WARNING);\n\t\t}\n\t\treturn false;\n\t}",
"public function getTransitions()\n {\n return $this->transitions;\n }",
"public function estadoDeAnimo(){\n return $this->belongsTo('App\\EstadoDeAnimo','estado_animo_id');\n }",
"public function test(TransitionEvent $event);",
"protected function _getTransitions()\n {\n return $this->transitions === null\n ? $this->transitions = []\n : $this->transitions;\n }",
"public function handleAction(WorkflowTransitionEvent $event) {\n $entity = $event->getEntity();\n $toState = $event->getToState();\n $eventWorkflow = $event->getWorkflow();\n // Check the new state is the published one.\n $is_published_state = $this->isPublishedState($toState, $eventWorkflow);\n $fields = $this->workflowHelper->getEntityStateField($entity);\n if ($entity instanceof EntityPublishedInterface) {\n if ($is_published_state) {\n $entity->setPublished();\n }\n else {\n $entity->setUnpublished();\n }\n }\n }",
"public function createTransction() {\n }",
"public function createTransction() {\n }",
"function workflow_get_transition_id($from, $to) {\n return db_result(db_query(\"SELECT tid FROM {workflow_transitions} WHERE state_name = '%s' AND target_state_name = '%s'\", $from, $to));\n}",
"public static function transitionElement(&$element, FormStateInterface $form_state, &$complete_form) {\n // $element = [];\n\n /*\n * Input.\n */\n // A Transition object must have been set explicitly.\n /** @var $transition WorkflowTransitionInterface */\n $transition = $element['#default_value'];\n /** @var $user \\Drupal\\Core\\Session\\AccountInterface */\n $user = \\Drupal::currentUser();\n\n /*\n * Derived input.\n */\n $field_name = $transition->getFieldName();\n $workflow = $transition->getWorkflow();\n $wid = $transition->getWorkflowId();\n $force = $transition->isForced();\n $entity = $transition->getTargetEntity();\n $entity_type = $transition->getTargetEntityTypeId();\n $entity_id = $transition->getTargetEntityId();\n\n if ($transition->isExecuted()) {\n // We are editing an existing/executed/not-scheduled transition.\n // Only the comments may be changed!\n\n $current_sid = $from_sid = $transition->getFromSid();\n // The states may not be changed anymore.\n $to_state = $transition->getToState();\n $options = [$to_state->id() => $to_state->label()];\n // We need the widget to edit the comment.\n $show_widget = TRUE;\n $default_value = $transition->getToSid();\n }\n elseif ($entity) {\n // Normal situation: adding a new transition on an new/existing entity.\n\n // Get the scheduling info, only when updating an existing entity.\n // This may change the $default_value on the Form.\n // Technically you could have more than one scheduled transition, but\n // this will only add the soonest one.\n // @todo: Read the history with an explicit langcode?\n $langcode = ''; // $entity->language()->getId();\n if ($entity_id && $scheduled_transition = WorkflowScheduledTransition::loadByProperties($entity_type, $entity_id, [], $field_name, $langcode)) {\n $transition = $scheduled_transition;\n }\n\n $current_sid = $from_sid = $transition->getFromSid();\n $current_state = $from_state = $transition->getFromState();\n $options = ($current_state) ? $current_state->getOptions($entity, $field_name, $user, FALSE) : [];\n $show_widget = ($from_state) ? $from_state->showWidget($entity, $field_name, $user, FALSE) : [];\n $default_value = $from_sid;\n $default_value = ($from_state && $from_state->isCreationState()) ? $workflow->getFirstSid($entity, $field_name, $user, FALSE) : $default_value;\n $default_value = ($transition->isScheduled()) ? $transition->getToSid() : $default_value;\n }\n elseif (!$entity) {\n // Sometimes, no entity is given. We encountered the following cases:\n // - D7: the Field settings page,\n // - D7: the VBO action form;\n // - D7/D8: the Advance Action form on admin/config/system/actions;\n // If so, show all options for the given workflow(s).\n if (!$temp_state = $transition->getFromState()) {\n $temp_state = $transition->getToState();\n }\n $options = ($temp_state)\n ? $temp_state->getOptions($entity, $field_name, $user, FALSE)\n : workflow_get_workflow_state_names($wid, $grouped = TRUE);\n $show_widget = TRUE;\n $current_sid = $transition->getToSid(); // @todo\n $default_value = $from_sid = $transition->getToSid(); // @todo\n }\n else {\n // We are in trouble! A message is already set in workflow_node_current_state().\n $options = [];\n $current_sid = 0;\n $show_widget = FALSE;\n $default_value = FALSE;\n }\n\n /*\n * Output: generate the element.\n */\n // Get settings from workflow. @todo: implement default_settings.\n if ($workflow) {\n $workflow_settings = $workflow->options;\n }\n else {\n // @todo D8-port: now only tested with Action.\n $workflow_settings = [\n 'name_as_title' => 0,\n 'options' => \"radios\",\n 'schedule_timezone' => 1,\n 'comment_log_node' => \"1\",\n 'watchdog_log' => TRUE,\n ];\n }\n // Current sid and default value may differ in a scheduled transition.\n\n $workflow_settings['comment'] = $workflow_settings['comment_log_node']; // 'comment_log_tab' is removed;\n\n // Capture settings to format the form/widget.\n $settings_title_as_name = !empty($workflow_settings['name_as_title']);\n $settings_fieldset = isset($workflow_settings['fieldset']) ? $workflow_settings['fieldset'] : 0;\n $settings_options_type = $workflow_settings['options'];\n\n // Display scheduling form if user has permission.\n // Not shown on new entity (not supported by workflow module, because that\n // leaves the entity in the (creation) state until scheduling time.)\n // Not shown when editing existing transition.\n $type_id = ($workflow) ? $workflow->id() : ''; // Might be empty on Action configuration.\n $settings_schedule = !$transition->isExecuted() && $user->hasPermission(\"schedule $type_id workflow_transition\");\n if ($settings_schedule) {\n //@todo D8-port: check below code: form on VBO.\n // workflow_debug( __FILE__ , __FUNCTION__, __LINE__); // @todo D8-port: still test this snippet.\n $step = $form_state->getValue('step');\n if (isset($step) && ($form_state->getValue('step') == 'views_bulk_operations_config_form')) {\n // On VBO 'modify entity values' form, leave field settings.\n $settings_schedule = TRUE;\n }\n else {\n // ... and cannot be shown on a Content add page (no $entity_id),\n // ...but can be shown on a VBO 'set workflow state to..'page (no entity).\n $settings_schedule = !($entity && !$entity_id);\n }\n }\n\n $settings_schedule_timezone = !empty($workflow_settings['schedule_timezone']);\n // Show comment, when both Field and Instance allow this.\n $settings_comment = $workflow_settings['comment'];\n\n $transition_is_scheduled = $transition->isScheduled();\n // Save the current value of the entity in the form, for later Workflow-module specific references.\n // We add prefix, since #tree == FALSE.\n $element['workflow_transition'] = [\n '#type' => 'value',\n '#value' => $transition,\n ];\n\n // Decide if we show a widget or a formatter.\n // There is no need for a widget when the only option is the current sid.\n\n // Add a state formatter before the rest of the form,\n // when transition is scheduled or widget is hidden.\n if ((!$show_widget) || $transition_is_scheduled || $transition->isExecuted()) {\n $element['workflow_current_state'] = workflow_state_formatter($entity, $field_name, $current_sid);\n // Set a proper weight, which works for Workflow Options in select list AND action buttons.\n $element['workflow_current_state']['#weight'] = -0.005;\n }\n\n $element['#tree'] = TRUE;\n // Add class following node-form pattern (both on form and container).\n $workflow_type_id = ($workflow) ? $workflow->id() : '';\n $element['#attributes']['class'][] = 'workflow-transition-' . $workflow_type_id . '-container';\n $element['#attributes']['class'][] = 'workflow-transition-container';\n if (!$show_widget) {\n // Show no widget.\n $element['to_sid']['#type'] = 'value';\n $element['to_sid']['#value'] = $default_value;\n $element['to_sid']['#options'] = $options; // In case action buttons need them.\n $element['comment']['#type'] = 'value';\n $element['comment']['#value'] = '';\n\n return $element; // <-- exit.\n }\n\n // @todo: repair the usage of $settings_title_as_name: no container if no details (schedule/comment).\n // Prepare a UI wrapper. This might be a fieldset.\n if ($settings_fieldset == 0) { // Use 'container'.\n $element += [\n '#type' => 'container',\n ];\n }\n else {\n $element += [\n '#type' => 'details',\n '#collapsible' => TRUE,\n '#open' => ($settings_fieldset == 2) ? FALSE : TRUE,\n ];\n }\n\n $element['field_name'] = [\n '#type' => 'select',\n '#title' => t('Field name'),\n '#description' => t('Choose the field name.'),\n '#access' => FALSE, // Only show on VBO/Actions screen.\n '#options' => workflow_get_workflow_field_names($entity),\n '#default_value' => $field_name,\n '#required' => TRUE,\n '#weight' => -20,\n ];\n $element['force'] = [\n '#type' => 'checkbox',\n '#title' => t('Force transition'),\n '#description' => t('If this box is checked, the new state will be assigned even if workflow permissions disallow it.'),\n '#access' => FALSE, // Only show on VBO/Actions screen.\n '#default_value' => $force,\n '#weight' => -19,\n ];\n\n // This overrides BaseFieldDefinition. @todo: apply for form and widget.\n // The 'options' widget. May be removed later if 'Action buttons' are chosen.\n // The help text is not available for container. Let's add it to the\n // State box. N.B. it is empty on Workflow Tab, Node View page.\n $help_text = isset($element['#description']) ? $element['#description'] : '';\n // This overrides BaseFieldDefinition. @todo: apply for form and widget.\n $element['to_sid'] = [\n '#type' => ($wid) ? $settings_options_type : 'select', // Avoid error with grouped options.\n '#title' => ($settings_title_as_name && !$transition->isExecuted())\n ? t('Change @name state', ['@name' => $workflow->label()])\n : t('Target state'),\n '#access' => TRUE,\n '#options' => $options,\n // '#parents' => array('workflow'),\n '#default_value' => $default_value,\n '#description' => $help_text,\n ];\n\n // Display scheduling form under certain conditions.\n if ($settings_schedule == TRUE) {\n $timezone = $user->getTimeZone();\n\n $timezone_options = array_combine(timezone_identifiers_list(), timezone_identifiers_list());\n $timestamp = $transition ? $transition->getTimestamp() : \\Drupal::time()->getRequestTime();\n $hours = (!$transition_is_scheduled) ? '00:00' : \\Drupal::service('date.formatter')->format($timestamp, 'custom', 'H:i', $timezone);\n // Add a container, so checkbox and time stay together in extra fields.\n $element['workflow_scheduling'] = [\n '#type' => 'container',\n '#tree' => TRUE,\n ];\n // Define class for '#states' behaviour.\n // Fetch the form ID. This is unique for each entity, to allow multiple form per page (Views, etc.).\n // Make it uniquer by adding the field name, or else the scheduling of\n // multiple workflow_fields is not independent of each other.\n // If we are indeed on a Transition form (so, not a Node Form with widget)\n // then change the form id, too.\n $form_id = $form_state->getBuildInfo()['form_id'];\n $class_identifier = Html::getClass('scheduled_' . Html::getUniqueId($form_id).'-'.$field_name);\n $element['workflow_scheduling']['scheduled'] = [\n '#type' => 'radios',\n '#title' => t('Schedule'),\n '#options' => [\n '0' => t('Immediately'),\n '1' => t('Schedule for state change'),\n ],\n '#default_value' => $transition_is_scheduled ? '1' : '0',\n '#attributes' => [\n // 'id' => 'scheduled_' . $form_id,\n 'class' => [$class_identifier],\n ],\n ];\n $element['workflow_scheduling']['date_time'] = [\n '#type' => 'details', // 'container',\n '#open' => TRUE, // Controls the HTML5 'open' attribute. Defaults to FALSE.\n '#attributes' => ['class' => ['container-inline']],\n '#prefix' => '<div style=\"margin-left: 1em;\">',\n '#suffix' => '</div>',\n '#states' => [\n //'visible' => array(':input[id=\"' . 'scheduled_' . $form_id . '\"]' => array('value' => '1')),\n 'visible' => ['input.' . $class_identifier => ['value' => '1']],\n ],\n ];\n $element['workflow_scheduling']['date_time']['workflow_scheduled_date'] = [\n '#type' => 'date',\n '#prefix' => t('At'),\n '#default_value' => implode('-', [\n 'year' => date('Y', $timestamp),\n 'month' => date('m', $timestamp),\n 'day' => date('d', $timestamp),\n ]\n ),\n ];\n $element['workflow_scheduling']['date_time']['workflow_scheduled_hour'] = [\n '#type' => 'textfield',\n '#title' => t('Time'),\n '#maxlength' => 7,\n '#size' => 6,\n '#default_value' => $hours,\n '#element_validate' => ['_workflow_transition_form_element_validate_time'], // @todo D8-port: this is not called.\n ];\n $element['workflow_scheduling']['date_time']['workflow_scheduled_timezone'] = [\n '#type' => $settings_schedule_timezone ? 'select' : 'hidden',\n '#title' => t('Time zone'),\n '#options' => $timezone_options,\n '#default_value' => [$timezone => $timezone],\n ];\n $element['workflow_scheduling']['date_time']['workflow_scheduled_help'] = [\n '#type' => 'item',\n '#prefix' => '<br />',\n '#description' => t('Please enter a time.\n If no time is included, the default will be midnight on the specified date.\n The current time is: @time.', ['@time' => \\Drupal::service('date.formatter')->format(\\Drupal::time()->getRequestTime(), 'custom', 'H:i', $timezone)]\n ),\n ];\n }\n\n // This overrides BaseFieldDefinition. @todo: apply for form and widget.\n $element['comment'] = [\n '#type' => 'textarea',\n '#required' => $settings_comment == '2',\n '#access' => $settings_comment != '0', // Align with action buttons.\n '#title' => t('Workflow comment'),\n '#description' => t('A comment to put in the workflow log.'),\n '#default_value' => $transition ? $transition->getComment() : '',\n '#rows' => 2,\n ];\n\n // In WorkflowTransitionForm, a default 'Submit' button is added over there.\n // In Entity Form, a button per permitted state is added in workflow_form_alter().\n if ($settings_options_type == 'buttons' || $settings_options_type == 'dropbutton') {\n // D7: How do action buttons work? See also d.o. issue #2187151.\n // D7: Create 'action buttons' per state option. Set $sid property on each button.\n // 1. Admin sets ['widget']['options']['#type'] = 'buttons'.\n // 2. This function formElement() creates 'action buttons' per state option;\n // sets $sid property on each button.\n // 3. User clicks button.\n // 4. Callback _workflow_transition_form_validate_buttons() sets proper State.\n // 5. Callback _workflow_transition_form_validate_buttons() sets Submit function.\n\n // Performance: inform workflow_form_alter() to do its job.\n _workflow_use_action_buttons($settings_options_type);\n\n // Make sure the '#type' is not set to the invalid 'buttons' value.\n // It will be replaced by action buttons, but sometimes, the select box\n // is still shown.\n // @see workflow_form_alter().\n $element['to_sid']['#type'] = 'select';\n $element['to_sid']['#access'] = FALSE;\n }\n return $element;\n }",
"protected function _resetTransitions()\n {\n $this->transitions = [];\n }",
"public function getTransitions() {\n\t\t\treturn $this->transitions;\n\t\t}",
"protected function setRelation()\n {\n $name = $this->name;\n $this->linked = true;\n if( !$this->source->isIdPermanent() ) {\n // at least source has to have permanent id. \n $this->linked = false; // not linked, yet. \n return $this;\n }\n // delete the join entity. \n if( isset( $this->joiner ) ) {\n $this->joiner->toDelete( true );\n } else {\n $this->joiner = $this->em->newCollection();\n }\n \n // loop target entities. \n foreach( $this->source->$name as $target ) \n {\n /** @var $target EntityInterface */\n if( !$target->isIdPermanent() ) {\n $this->linked = false;\n continue;\n }\n if( $join = $this->getJoin( $target ) ) {\n // used in the join; mark the entity un-delete.\n $join->toDelete( false ); \n } else {\n // create new join for new target.\n $join = $this->em->newEntity( $this->info[ 'by' ], array(\n $this->info[ 'source' ] => $this->source[ $this->info[ 'source' ] ],\n $this->info[ 'target' ] => $target[ $this->info[ 'target' ] ],\n ) );\n $this->joiner->add( $join );\n }\n }\n return $this;\n }",
"protected function decorateTransition(stdClass $transition): stdClass\n {\n return std_object_only_with($transition, ['action', 'response', 'transition']);\n }",
"public function addTransition($transition) {\n\t\t\tif ($transition !== null) {\n\t\t\t\t$tid = ($transition instanceof Automaton\\ITransition) ? $transition->getId() : '' . $transition;\n\t\t\t\t$this->transitions->putValue($tid);\n\t\t\t}\n\t\t}",
"public function setUp()\n {\n $this->factory = new TransitionFactory($this->transitionClassName);\n }",
"public function transaccion()\n {\n return $this->belongsTo(Transaccion::class, 'id_transaccion', 'id_transaccion');\n }"
] | [
"0.59711236",
"0.58557755",
"0.58557755",
"0.58557755",
"0.5806018",
"0.56274575",
"0.5592959",
"0.5447312",
"0.53513783",
"0.5337234",
"0.5291778",
"0.52913356",
"0.5162948",
"0.51624805",
"0.5142396",
"0.50497633",
"0.5027866",
"0.5014347",
"0.5001406",
"0.49446064",
"0.49446064",
"0.49436826",
"0.49284002",
"0.4923183",
"0.4897946",
"0.4895126",
"0.4875934",
"0.4867308",
"0.48575607",
"0.48330057"
] | 0.60281146 | 0 |
Return evaluation_id and training_id from assignment row | public static function fetchAssignment($evaluation_to_training_id) {
$q_table = new ITechTable(array('name'=>'evaluation_to_training'));
$select = $q_table->select()
->from($q_table->_name)
->setIntegrityCheck(false)
->where("id = $evaluation_to_training_id");
$rows = $q_table->fetchAll($select);
//just return an array of training ids
$r = $rows->current();
if ($r)
return array($r->evaluation_id, $r->training_id);
return array(null,null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAssignment($id) {\n $this->db->query('SELECT * FROM assignment WHERE id = :id');\n $this->db->bind(':id', $id);\n $row = $this->db->single();\n return $row;\n }",
"function assign_from_row($row) {\n if (is_array($row)) {\n $this->qa_step_id = $row[\"qa_step_id\"];\n $this->qa_phase = $row[\"qa_phase\"];\n $this->qa_phase_desc = $row[\"qa_phase_desc\"];\n $this->qa_document_id = $row[\"qa_document_id\"];\n $this->qa_document_title = $row[\"qa_document_title\"];\n $this->qa_document_desc = $row[\"qa_document_desc\"];\n $this->qa_step_desc = $row[\"qa_step_desc\"];\n $this->qa_step_notes = stripslashes($row[\"qa_step_notes\"]);\n $this->qa_step_order = $row[\"qa_step_order\"];\n $this->mandatory = ($row[\"mandatory\"] == \"t\");\n $this->enabled = ($row[\"enabled\"] == \"t\");\n }\n }",
"function getReviewAssignmentId() {\n\t\treturn $this->_reviewAssignmentId;\n\t}",
"public function getEvaluation()\n\t{\n\t\treturn $this->model->where('source_id','=',Source::getPreAnnotatedForEvaluation()->id)->get();\n\t}",
"public function getAssignId()\n {\n return $this->assign_id;\n }",
"public function getAssignId()\n {\n return $this->assign_id;\n }",
"public function getAssignId()\n {\n return $this->assign_id;\n }",
"public function getListEvaluation()\n\t{\n\t\treturn $this->model->where('source_id','=',Source::getPreAnnotatedForEvaluation()->id)->pluck('name','id');\n\t}",
"public function get_training_id()\n {\n return $this->get_default_property(self::PROPERTY_TRAINING_ID);\n }",
"public function update($id)\n\t{\n\n\t\t$evaluation = Evaluation::findOrFail($id);\n\n\t\t$evaluation->evaluation_academic_period_id = Request::input('academicPeriodId');\n\t\t$evaluation->evaluation_study_subModule_id = Request::input('subModuleId');\n\t\t$evaluation->evaluation_student_id = Request::input('studentId');\n\t\t$evaluation->evaluation_mark_id = Request::input('markId');\n\t\t$evaluation->evaluation_lastUpdateUserId = Request::input('lastUpdateUserId');\n\t\t$evaluation->save();\n\n\t\treturn $evaluation;\n\n\t}",
"function student_eval($id)\n {\n $e = $this->CI->db->get_where('tbl_evaluation', array('to_evaluate' => $id, 'cycle' => $this->CI->registration->get_cycle_end()))->result_array();\n $sum = 0;\n foreach ($e as $evaluate) {\n $this->CI->db->where('id', $evaluate['evaluator'])->where('usertype', 2);\n $c = $this->CI->db->count_all_results('tbl_userreg');\n if($c > 0)\n $sum = $sum + ($evaluate['group1'] + $evaluate['group2'] + $evaluate['group3'] + $evaluate['group4']);\n }\n return $sum * STUDENT_SUPERVISOR;\n }",
"public function getAssignation(): array;",
"public function getAssignedId()\n {\n return $this->assignedId;\n }",
"function getAssignmentsForUser($user){\r\n $query = \"select * from assignment where rit_id =?\";\r\n return $this->makeParamQuery($query, array($user));\r\n }",
"public function detectAssignment()\n\t{\n\t\t$path = $this->getPath();\n\n\t\t// /bitrix/mobileapp/[moduleName]\n\t\t// /bitrix/templates/[templateName]\n\t\t// /bitrix/components/bitrix/[componentName]\n\t\t// /bitrix/activities/bitrix/[activityName]\n\t\t// /bitrix/wizards/bitrix/[wizardsName]\n\t\t// /bitrix/gadgets/bitrix/[gadgetName]\n\t\t// /bitrix/js/[moduleName]/[smth]\n\t\tforeach (Translate\\ASSIGNMENT_TYPES as $testEntry)\n\t\t{\n\t\t\t$testPath = '/bitrix/'. $testEntry;\n\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t{\n\t\t\t\treturn $testEntry;\n\t\t\t}\n\t\t}\n\n\t\t$assignment = null;\n\n\t\t$moduleName = $this->detectModuleId();\n\n\t\tif ($moduleName !== null)\n\t\t{\n\t\t\t$assignment = 'modules';\n\n\t\t\tforeach (Translate\\ASSIGNMENT_TYPES as $testEntry)\n\t\t\t{\n\t\t\t\t// /bitrix/modules/[moduleName]/install/mobileapp/[moduleName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/templates/[templateName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/components/bitrix/[componentName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/activities/bitrix/[activityName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/wizards/bitrix/[wizardsName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/gadgets/bitrix/[gadgetName]\n\t\t\t\t// /bitrix/modules/[moduleName]/install/js/[moduleName]/[smth]\n\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/install/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}\n\t\t\t\tif ($testEntry == 'templates')\n\t\t\t\t{\n\t\t\t\t\t// /bitrix/modules/[moduleName]/install/public/templates/[templateName]\n\t\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/install/public/'. $testEntry;\n\t\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $testEntry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// /bitrix/modules/[moduleName]/install/bitrix/templates/[templateName]\n\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/install/bitrix/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}\n\t\t\t\t// /bitrix/modules/[moduleName]/install/public/templates/[templateName]\n\t\t\t\t/*$testPath = '/bitrix/modules/'.$moduleName.'/install/public/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath. '/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}*/\n\t\t\t\t// /bitrix/modules/[moduleName]/lang/#LANG_ID#/[smth]\n\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/lang/#LANG_ID#/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}\n\t\t\t\t// /bitrix/modules/[moduleName]/lang/#LANG_ID#/install/[smth]\n\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/lang/#LANG_ID#/install/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}\n\n\t\t\t\t// /bitrix/modules/[moduleName]/handlers/delivery/[smth]\n\t\t\t\t// /bitrix/modules/[moduleName]/handlers/paysystem/[smth]\n\t\t\t\t$testPath = '/bitrix/modules/'.$moduleName.'/handlers/'. $testEntry;\n\t\t\t\tif (\\mb_strpos($path, $testPath.'/') === 0 || $path == $testPath)\n\t\t\t\t{\n\t\t\t\t\treturn $testEntry;\n\t\t\t\t}\n\n\n\t\t\t\t// /bitrix/modules/[moduleName]/payment/[paymentHandler]\n\t\t\t}\n\t\t}\n\n\t\treturn $assignment;\n\t}",
"public static function fetch_assignments_parameters() {\r\n return new external_function_parameters(//\r\n array(\r\n 'basic' => new external_value(PARAM_BOOL, 'return basic details only', VALUE_OPTIONAL, false),\r\n 'getproglangs' => new external_value(PARAM_BOOL, 'get programming language ids and names as well', VALUE_OPTIONAL, false),\r\n 'assignmentids' => new external_multiple_structure(\r\n new external_value(PARAM_INT, 'return details of a specific assignment by its id')\r\n , 'list of assignment ids', VALUE_OPTIONAL, false)\r\n )\r\n );\r\n }",
"public static function fetch_assignments_returns() {\r\n return new external_single_structure(\r\n array(\r\n 'warnings' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'item' => new external_value(PARAM_TEXT, 'item', VALUE_OPTIONAL),\r\n 'itemid' => new external_value(PARAM_INT, 'itemid', VALUE_OPTIONAL),\r\n 'warningcode' => new external_value(PARAM_ALPHANUM, 'number or warning code'),\r\n 'message' => new external_value(PARAM_TEXT, 'untranslated english message to explain the warning')\r\n )\r\n ), 'list of warnings', VALUE_OPTIONAL),\r\n 'courses' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'id' => new external_value(PARAM_INT, 'function name'),\r\n 'shortname' => new external_value(PARAM_TEXT, 'function name'),\r\n 'codehandins' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'id' => new external_value(PARAM_INT, 'function name'),\r\n 'contextid' => new external_value(PARAM_INT, 'function name'),\r\n 'assignname' => new external_value(PARAM_TEXT, 'function name'),\r\n 'intro' => new external_value(PARAM_RAW, 'function name'),\r\n 'duedate' => new external_value(PARAM_RAW, 'function name'),\r\n 'funcpercent' => new external_value(PARAM_INT, 'function name'),\r\n 'spectestonly' => new external_value(PARAM_BOOL, 'function name'),\r\n 'mustattemptcompile' => new external_value(PARAM_BOOL, 'function name'),\r\n 'proglang' => new external_value(PARAM_TEXT, 'function name'),\r\n 'proglangid' => new external_value(PARAM_INT, 'function name'),\r\n 'checkpoints' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'tempid' => new external_value(PARAM_TEXT, 'function name', VALUE_OPTIONAL), // not sure what this is\r\n 'id' => new external_value(PARAM_INT, 'function name', VALUE_OPTIONAL),\r\n //'assignmentid' => new external_value(PARAM_INT, 'function name'),\r\n 'name' => new external_value(PARAM_TEXT, 'function name'),\r\n 'description' => new external_value(PARAM_RAW, 'function name'),\r\n 'ordering' => new external_value(PARAM_INT, 'function name'),\r\n 'marks' => new external_value(PARAM_INT, 'function name'),\r\n 'tests' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'tempid' => new external_value(PARAM_TEXT, 'function name', VALUE_OPTIONAL), // not sure what this is\r\n 'id' => new external_value(PARAM_INT, 'function name', VALUE_OPTIONAL),\r\n 'status' => new external_value(PARAM_BOOL, 'function name'),\r\n 'description' => new external_value(PARAM_RAW, 'function name'),\r\n 'gradeonly' => new external_value(PARAM_BOOL, 'function name'),\r\n 'runtimeargs' => new external_value(PARAM_TEXT, 'function name'),\r\n 'ioastext' => new external_value(PARAM_BOOL, 'function name'),\r\n 'input' => new external_value(PARAM_TEXT, 'function name'),\r\n 'output' => new external_value(PARAM_TEXT, 'function name'),\r\n 'outputerr' => new external_value(PARAM_TEXT, 'function name'),\r\n 'retval' => new external_value(PARAM_INT, 'function name'),\r\n 'ordering' => new external_value(PARAM_INT, 'function name'),\r\n 'marks' => new external_value(PARAM_INT, 'function name')\r\n )\r\n ), 'the codehandin tests', VALUE_OPTIONAL)\r\n )\r\n ), 'the codehandin checkpoints', VALUE_OPTIONAL)\r\n )\r\n ), 'the codehandin Assignments', VALUE_OPTIONAL) // there may be no assignments\r\n )\r\n ), 'the codehandin Assignments', VALUE_OPTIONAL), // there may be no assignments so no courses\r\n 'proglangs' => new external_multiple_structure(\r\n new external_single_structure(\r\n array(\r\n 'id' => new external_value(PARAM_INT, 'function name'),\r\n 'name' => new external_value(PARAM_TEXT, 'function name')\r\n )\r\n ), 'list of programming languages', VALUE_OPTIONAL)\r\n )\r\n );\r\n }",
"function get_assignment($pkg_name) {\n $kernel_cmp = strcmp($pkg_name, \"kernel\");\n\n if ($kernel_cmp == 0) {\n $dbfile = \"/project/maintenance/errata/assignment/kernel\";\n } else {\n $dbfile = \"/project/maintenance/errata/assignment/bug\";\n }\n\n $content = file($dbfile, FILE_IGNORE_NEW_LINES);\n $len = count($content) - 1;\n $engineers = array_slice($content, 0, $len);\n $current = (int)$content[$len];\n\n if (($current + 1) >= $len) {\n if ($kernel_cmp == 0) {\n $next = 1;\n } else {\n $next = 0;\n }\n } else {\n $next = $current + 1;\n }\n\n // update next at the last line\n exec('sed -i \"\\$ c'.$next.'\" '.$dbfile);\n\n if ($kernel_cmp == 0) {\n $assignee = $engineers[0];\n $qa = $engineers[$current];\n } else {\n $assignee = $engineers[$current];\n $qa = $engineers[$next];\n }\n\n return array ($assignee, $qa);\n}",
"public function getEvaluations()\n\t{\n\t\t$sql = sprintf(\"SELECT * FROM %s a LEFT JOIN %s e USING (evaluation_id) WHERE session_id=? ORDER BY evaluation_id,question_index\", \n\t\t\t\tmobilAP_session::SESSION_EVALUATION_ANSWERS_TABLE,\n\t\t\t\tmobilAP_session::SESSION_EVALUATION_TABLE);\n\t\t\t$params = array($this->session_id);\n\t\t$result = mobilAP::query($sql,$params);\n\t\t$evaluations = array();\n\t\tif (mobilAP_Error::isError($result)) {\n\t\t\treturn $evaluations;\n\t\t}\n\t\t$evaluation_id = 0;\n\t\t$idx = -1;\n\t\twhile ($row = $result->fetchRow()) {\n\t\t\tif ($row['evaluation_id'] != $evaluation_id) {\n\t\t\t\t$idx++;\n\t\t\t\t$evaluations[$idx] = array(\n\t\t\t\t\t'evaluation_id'=>$row['evaluation_id'],\n\t\t\t\t\t'post_user'=>$row['post_user'],\n\t\t\t\t\t'post_timestamp'=>$row['post_timestamp'],\n\t\t\t\t\t'answers'=>array()\n\t\t\t\t);\n\t\t\t}\n\t\t\t$evaluations[$idx]['answers'][$row['question_index']] = $row['question_answer'];\n\t\t}\n\t\t\n\t\treturn $evaluations;\n\t}",
"function get_assignment_details($id) {\n global $course_id;\n return Database::get()->querySingle(\"SELECT * FROM assignment WHERE course_id = ?d AND id = ?d\", $course_id, $id);\n}",
"public function assignment()\n {\n return $this->belongsTo(Assignment::class);\n }",
"public static function getTeamIdByAssignment($a_ass_id, $a_user_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result = $ilDB->query(\"SELECT type\".\n\t\t\t\" FROM exc_assignment\".\n\t\t\t\" WHERE id = \".$ilDB->quote($a_ass_id, \"integer\"));\n\t\t$type = $ilDB->fetchAssoc($result);\n\t\t\n\t\tif($type[\"type\"] == self::TYPE_UPLOAD_TEAM)\n\t\t{\t\t\t\n\t\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\t\" FROM il_exc_team\".\n\t\t\t\t\" WHERE ass_id = \".$ilDB->quote($a_ass_id, \"integer\").\n\t\t\t\t\" AND user_id = \".$ilDB->quote($a_user_id, \"integer\"));\n\t\t\t$team_id = $ilDB->fetchAssoc($set);\n\t\t\treturn $team_id[\"id\"];\n\t\t}\n\t}",
"function getEmployeeAssignments(){\n\t\t\t\t\n // SQL query to select all assignments for given employee. \n // Adds extra column if assignment has tasks \n $query = \"SELECT a.Name, a.Id, \n (CASE WHEN a.Id = t.Assignment_Id THEN 'True' ELSE 'False' END) as 'HasTasks' \n FROM assignment a \n LEFT JOIN task t ON a.Id = t.Assignment_Id \n LEFT JOIN employee_assignment ON a.id = employee_assignment.Assignment_Id \n LEFT JOIN employee ON employee.Id = employee_assignment.Employee_Id \n WHERE employee.Id = :employeeId \n GROUP BY a.Name\";\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n\t\t\t\t\n // Santize and bind property\n $this->employee_Id = parent::sanitize($this->employee_Id);\n $stmt->bindParam(\":employeeId\", $this->employee_Id);\n \n // Execute query\n $stmt->execute();\n\t\t\t \n // Creates associative array with keys to contain values from fetched from database\n $employeeProp = array_fill_keys(array(\"name\", \"id\", \"hasTasks\"),\"\");\n \n // Populate array with values from database\n $dataArr = parent::fetchRows($stmt, $employeeProp);\n \n // Return associative array\n return $dataArr;\n }",
"function is_valid_assignment($class_config, $assignment_id) {\n $assignments = $class_config[\"assignments\"];\n foreach ($assignments as $one) {\n if ($one[\"assignment_id\"] == $assignment_id) {\n return true;\n }\n }\n return false;\n}",
"function exercise_submission_ids_by_course ($course) {\n\n global $CFG;\n\n return get_records_sql (\"SELECT s.id , s.exerciseid\n FROM {$CFG->prefix}exercise_submissions s,\n {$CFG->prefix}exercise w\n WHERE w.course = '$course' AND\n s.exerciseid = w.id\");\n }",
"public function getAssignedIdenty($id){\r\n return $this->Model->getAssignedIdenty($id);\r\n }",
"function get_jingdian_evaluation($id_name){\n\t\t\n\t\t$unread_id=$_SESSION['unread_evaluate_id'];\n\t\t$sql1=\"SELECT * FROM jingdian_evaluate WHERE id_name='$id_name' AND evaluate_id<'$unread_id' ORDER BY time_stamp DESC LIMIT 3\";\n\t\t$result1 = mysqli_query($con,$sql1);\n\t\tif (mysql_num_rows($result1)>1){\n\t\t\t$i=0;\n\t\t\t$jingdian_evaluate=\"\";\n\t\t\twhile($row1 = mysqli_fetch_array($result1)){\n\t\t\t\t$id=$row1['evaluator_id'];\n\t\t\t\t//$jingdian_evaluate[$i]['evaluator_id']=$row1['evaluator_id'];\n\t\t\t\t//iconv('gb2312//IGNORE','UTF-8',$row1['evaluator_name']);\n\t\t\t\t//$name=$row1['evaluator_name'];\n\t\t\t\t//echo $name;\n\t\t\t\t//echo $jingdian_evaluate[$i]['evaluator_name'];\n\t\t\t\t$sql2=\"SELECT * FROM user WHERE user_id='$id'\";\n\t\t\t\t$result2=mysqli_query($con,$sql2);\n\t\t\t\t$row2=mysqli_fetch_array($result2);\n\t\t\t\t$jingdian_evaluate[$i]['evaluate_id']=$row1['evaluate_id'];\n\t\t\t\t$jingdian_evaluate[$i]['portrait']=$row2['portrait'];\n\t\t\t\t$jingdian_evaluate[$i]['evaluator_name']=$row2['user_name'];\n\t\t\t\t$jingdian_evaluate[$i]['content']==$row1['content'];\n\t\t\t\t$jingdian_evaluate[$i]['star']=$row1['star'];\n\t\t\t\t$_SESSION['unread_evaluate_id']=$row1['evaluate_id'];\n\t\t\t\t$i++;\n\t\t\t} \n\t\t\t//return $row1['reply_id'];\n\t\t\t//$new_reply_id = $row1['reply_id'];\n\t\t\t//$new_reply_id++;\n\t\t\t//return $new_reply_id;\n\t\t\t//return $user_id;\n\t\t\t//return $status_id;\n\t\t\t//return $object_name;\n\t\t\t//mysql_query(\"set names 'gbk'\");\n\t\t\t//$content=iconv('UTF-8','gb2312//IGNORE',$content);\n\t\t\t//return $content;\n\t\t\t\n\t\t\t//$sql2=\"INSERT INTO status_reply (user_id,status_id,object_user_name,content,flag) VALUES ('$user_id','$status_id','$object_name','$content','1')\";\n\t\t\t//return $user_id;\n\t\t\t//return $sql2;\n\t\t\t//mysql_query($sql2,$con);\n\t\t\t//$_SESSION['unread_evaluate_id']++;\n\t\t\treturn $jingdian_evaluate;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}",
"function read(){\n\n // If id property is present fetch single record\n if($this->id){\n\t\t\t\t\t\t\n\t\t\t// SQL Query to fetch a single assignment \n $query = \"SELECT a.Id, a.Name FROM {$this->tableName} a WHERE a.id = :id\";\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // Santize and bind property\n $this->id = parent::sanitize($this->id);\n $stmt->bindParam(\":id\", $this->id);\n\n }else{\n \t// SQL query to fetch all assignment records if no id is present \n $query = \"SELECT a.Id, a.Name FROM {$this->tableName} a\";\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n }\n\n // Execute query\n $stmt->execute();\n \n // Creates associative array with keys to contain values from fetched from database \t\t\t\t \n $assignmentProp = array_fill_keys(array(\"name\", \"id\"),\"\");\n // Populate array with values from database\n $dataArr = parent::fetchRows($stmt, $assignmentProp);\n\t\t\t\t\n\t\t// Return associative array \n return $dataArr;\n }",
"public function getLinkedEligibleRoleAssignmentId()\n {\n if (array_key_exists(\"linkedEligibleRoleAssignmentId\", $this->_propDict)) {\n return $this->_propDict[\"linkedEligibleRoleAssignmentId\"];\n } else {\n return null;\n }\n }",
"static function getAssignmentDataOfExercise($a_exc_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$set = $ilDB->query(\"SELECT * FROM exc_assignment \".\n\t\t\t\" WHERE exc_id = \".$ilDB->quote($a_exc_id, \"integer\").\n\t\t\t\" ORDER BY order_nr ASC\");\n\t\t$data = array();\n\n\t\t$order_val = 10;\n\t\twhile ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\t\n\t\t\t$data[] = array(\n\t\t\t\t\"id\" => $rec[\"id\"],\n\t\t\t\t\"exc_id\" => $rec[\"exc_id\"],\n\t\t\t\t\"deadline\" => $rec[\"time_stamp\"],\n\t\t\t\t\"instruction\" => $rec[\"instruction\"],\n\t\t\t\t\"title\" => $rec[\"title\"],\n\t\t\t\t\"start_time\" => $rec[\"start_time\"],\n\t\t\t\t\"order_val\" => $order_val,\n\t\t\t\t\"mandatory\" => $rec[\"mandatory\"],\n\t\t\t\t\"type\" => $rec[\"type\"]\n\t\t\t\t);\n\t\t\t$order_val += 10;\n\t\t}\n\t\treturn $data;\n\t}"
] | [
"0.57650006",
"0.53487825",
"0.5315117",
"0.5307076",
"0.5280962",
"0.5280962",
"0.5280962",
"0.5075033",
"0.49177083",
"0.48364794",
"0.4814473",
"0.4763822",
"0.47470802",
"0.47123432",
"0.47027427",
"0.47017646",
"0.469403",
"0.4680392",
"0.466326",
"0.4638325",
"0.46267238",
"0.4615125",
"0.46078932",
"0.46016967",
"0.4599813",
"0.4578631",
"0.4539499",
"0.45367548",
"0.4526032",
"0.44953695"
] | 0.668704 | 0 |
this function is used to create a bargraph | function create_bar_graph() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionBargraph()\n {\n $allDefects = Defect::find()\n ->select('COUNT(*) AS cnt, defect_type.title AS title')\n ->leftJoin('defect_type', 'defect_type.uuid=defect.defectTypeUuid')\n ->asArray()\n ->groupBy('defectTypeUuid')\n ->all();\n\n return $this->render('bargraph', [\n 'defects' => $allDefects,\n ]);\n }",
"function create_bar_chart($data,$x_label='X axis',$y_label='Y axis',$x_units='',$y_units='')\n{\n\tif ($x_units!='') $x_label.=' ('.$x_units.')';\n\tif ($y_units!='') $y_label.=' ('.$y_units.')';\n\n\t// Work out some stats about our graph\n\t$average=0.0;\n\t$max_y=0.0;\n\tforeach ($data as $value)\n\t{\n\t\tif (is_array($value)) $value=array_shift($value);\n\n\t\tif ((is_float($value)?$value:floatval($value))>$max_y) $max_y=is_float($value)?$value:floatval($value);\n\t\t$average+=$value;\n\t}\n\t$max_x=count($data);\n\tif (count($data)!=0)\n\t{\n\t\t$average/=count($data);\n\t}\n\tif ($max_y==0.0) $max_y=1.0;\n\t$y_scale=PLOT_HEIGHT/$max_y;\n\n\t// Start of output\n\t$output=_start_svg();\n\n\t// Draw bars\n\t$i=0;\n\t$colour='333333';\n\t$plot='';\n\t$labels='';\n\tforeach ($data as $key=>$value)\n\t{\n\t\tif (is_array($value)) $value=array_shift($value);\n\n\t\t$x=Y_LABEL_WIDTH+Y_AXIS_WIDTH+X_PADDING+$i*(X_PADDING+BAR_WIDTH);\n\t\t$y=PLOT_HEIGHT-$value*$y_scale+PLOT_HEIGHT_BIAS;\n\t\t$height=(is_float($value)?$value:floatval($value))*$y_scale;\n\n\t\t// Bar and label\n\t\t$plot.='<rect id=\"'.float_to_raw_string($x).float_to_raw_string($y).'_bar\" x=\"'.float_to_raw_string($x).'\" y=\"'.float_to_raw_string($y).'\" width=\"'.float_to_raw_string(BAR_WIDTH).'\" height=\"'.float_to_raw_string($height).'\" style=\"fill: #'.($colour).';\" class=\"bar_chart\" />'.chr(10);\n\t\t$labels.='<text style=\"fill: '.(($height==0.0)?'black':'white').'; font-weight: normal\" id=\"'.float_to_raw_string($x).float_to_raw_string($y).'\" transform=\"translate('.float_to_raw_string($x+TEXT_HEIGHT-3).','.float_to_raw_string(PLOT_HEIGHT+PLOT_HEIGHT_BIAS-TEXT_HEIGHT).') rotate(270)\" class=\"bar_chart_text\">'.escape_html($key).'</text>\n\t\t<script type=\"text/javascript\">\n\t\t<![CDATA[\n\t\t\tpageLoaded=true;\n\t\t\taddEventListenerAbstract(document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\"),\"mouseover\",function(event) { if (window.current_bar) window.current_bar.de_clarify(); window.current_bar=this; document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\").setAttribute(\"style\",\"fill: red; background-color: black; z-index: 999999;\"); },false);\n\t\t\tdocument.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\").de_clarify=function(event) { document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\").setAttribute(\"style\",\"fill: '.(($height==0.0)?'black':'white').'\"); };\n\t\t\taddEventListenerAbstract(document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\"),\"focus\",function(event) { this.onmouseover(event); },false);\n\t\t\taddEventListenerAbstract(document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'_bar\"),\"mouseover\",function(event) { if (window.current_bar) window.current_bar.de_clarify(); window.current_bar=this; document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\").setAttribute(\"style\",\"fill: red; background-color: black; z-index: 999999;\"); },false);\n\t\t\tdocument.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'_bar\").de_clarify=function(event) { document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'\").setAttribute(\"style\",\"fill: '.(($height==0.0)?'black':'white').'\"); };\n\t\t\taddEventListenerAbstract(document.getElementById(\"'.float_to_raw_string($x).float_to_raw_string($y).'_bar\"),\"focus\",function(event) { this.onmouseover(event); },false);\n\t\t]]>\n\t\t</script>'.chr(10);\n\n\t\t// Iterate\n\t\t$i++;\n\t\t$colour=_get_next_colour($colour);\n\t}\n\n\t$output.=_draw_axes($max_y,$y_scale,$x_label,$y_label);\n\t$output.=_draw_average($average,$y_scale);\n\t$output.=_finish_svg($plot.$labels);\n\n\treturn _filter_svg_css($output);\n}",
"function makeBread(){\n $sandwich = $this->crumbs;\n $slices = array();\n foreach($sandwich as $slice){ \n if (isset($slice['link']) && $slice['link'] != '') {\n if($slice['crumb']=='Inicio') {\n $slices[] = '<a href=\"' . $slice['link'] . '\" '.$this->href_param.'><i class=\"icon-home\"></i>' . $slice['crumb'] . '</a>';\n } else {\n $slices[] = '<a href=\"' . $slice['link'] . '\" '.$this->href_param.' class=\"'.$slice['class'].'\">' . $slice['crumb'] . '</a>';\n }\n } else {\n $slices[] = '<a href=\"javascript:void(0)\" class=\"'.$slice['class'].'\">'.$slice['crumb'].'</a>';\n } \n }\n $this->bread = join($this->seperator, $slices);\n return $this->bread;\n }",
"function barLabels($data,$config,$label){\n $id=$config['id'];\n $width=$config['width'];\n $height=$config['height'];\n $bgURL=$config['bgURL'];\n $font=$config['font'];\n $startPoint2=10;//$config['startPoint2'];\n $max1=$config['max1']-60;;\n $gap=10;//$config['gap'];\n $xgap=ceil($width/(sizeof($data)+1));//$config['xgap'];\n $wd=$config['wd'];\n $scale=$max1/100;//ceil($width/120);//$config['scale'];\n \n $b=2;\n $res=$this->create($id,$width,$height,$b);\n $res.=$this->getCanvas($id);\n $res.=$this->setFont($id,$font);\n $res.=$this->gridCanvas($id,$width,$height,$max1,$font);\n \n if(strlen($bgURL)>4)\n {\n $res.=$this->setBackground($id,$bgURL);\n $res.=$this->onload($id,$bgURL);\n }\n else\n {\n $func=$id.'_action';\n $res.=\"\n document.addEventListener('DOMContentLoaded', $func);\n function $func(){\n \";\n }\n \n \n $i=1;\n $colorNum=sizeof($this->color);\n \n foreach($data as $var){\n $l_variable=ceil($var*$scale);\n $y_variable=$max1-$l_variable;\n $startP=$startPoint2+$i*$xgap;\n $j=$i%$colorNum;//10;\n $color=$this->color[$j];\n $res.=$this->rect($id, $startP,$gap,$var,$y_variable,$wd,$l_variable,$color);\n $txt=$label[$i];\n $res.=$this->text($id, $startP,$txt,$max1,$font);\n $i++;\n }\n $res.=$this->endScript();\n return $res;\n }",
"public function createGraph() \n\t{\n\t\t//setup axis if not already setup by user\n\t\tif ($this->bool_data){\n\t\t\t$this->analyzeData();\n\t\t\tif (!$this->bool_x_axis_setup) { \n\t\t\t\t$this->setupXAxis(); \n\t\t\t}\n\t\t\tif (!$this->bool_y_axis_setup){ \n\t\t\t\t$this->setupYAxis(); \n\t\t\t}\n\t\t\t\n\t\t\t//calculations\n\t\t\t$this->calcTopMargin();\n\t\t\t$this->calcRightMargin();\n\t\t\t$this->calcCoords();\n\t\t\t$this->setupData();\n\t\t\t\n\t\t\t//start creating actual image elements\n\t\t\tif ($this->bool_background) { \n\t\t\t\t$this->generateBackgound(); \n\t\t\t}\n\t\t\t\n\t\t\t//always gen grid values, even if not displayed\n\t\t\t$this->setupGrid();\n\n\t\t\tif ($this->bool_bars_generate) { \n\t\t\t\t$this->generateBars(); \n\t\t\t}\n\t\t\tif ($this->bool_data_points) {\n\t\t\t\t$this->generateDataPoints(); \n\t\t\t}\n\t\t\tif ($this->bool_legend) { \n\t\t\t\t$this->generateLegend(); \n\t\t\t}\n\t\t\tif ($this->bool_title) { \n\t\t\t\t$this->generateTitle(); \n\t\t\t}\n\t\t\tif ($this->bool_x_axis) { \n\t\t\t\t$this->generateXAxis(); \n\t\t\t}\n\t\t\tif ($this->bool_y_axis) { \n\t\t\t\t$this->generateYAxis(); \n\t\t\t}\n\t\t} else {\n\t\t\t$this->error[] = \"No valid data added to graph. Add data with the addData() function.\";\n\t\t}\n\n\t\t//display errors\n\t\t$this->displayErrors();\n\n\t\t//output to browser\n\t\tif ($this->output_file) {\n\t\t\timagepng($this->image, $this->output_file);\n\t\t} else {\n\t\t\timagepng($this->image);\n\t\t}\n\t\timagedestroy($this->image);\n\t}",
"function graphColumn($id,$width,$height,$data,$bgURL,$font,$startPoint2,$max1,$gap,$xgap,$wd,$scale){\n $b=2;\n $res=$this->create($id,$width,$height,$b);\n $res.=$this->getCanvas($id);\n $res.=$this->setBackground($id,$bgURL);\n $res.=$this->setFont($id,$font);\n $res.=$this->onload($id,$bgURL);\n \n $i=1;\n $colorNum=sizeof($this->color);\n foreach($data as $var){\n $l_variable=$var*$scale;\n $y_variable=$max1-$l_variable;\n $startP=$startPoint2+$i*$xgap;\n $j=$i%$colorNum;//10;\n $color=$this->color[$j];\n $res.=$this->rect($id, $startP,$gap,$var,$y_variable,$wd,$l_variable,$color);\n $i++;\n }\n $res.=$this->endScript();\n return $res;\n }",
"public function drawGraph(){\n\t\t$data = $this->getCountedColorFields();\n\t\tksort($data);\n\t\t$arguments['data'] = $data;\n\t\t$graph = Cundd::getModel('Graph/Barchart',$arguments);\n\t\treturn $graph->draw();\n\t}",
"public function createBarGlassChart()\n {\n return new OFCBarGlassChart();\n }",
"public function getDataChartOfBarra1x10() {\n \n $data = array(\n 'dataSource' => array(\n 'chart' => array(),\n 'categories' => array(\n ),\n 'dataset' => array(\n ),\n ),\n );\n $chart = array();\n\n //$chart[\"caption\"] = \"General 1x10 Estados\";\n $chart[\"captionFontColor\"] = \"#e20000\";\n $chart[\"captionFontSize\"] = \"20\"; \n $chart[\"palette\"] = \"1\";\n $chart[\"showvalues\"] = \"1\";\n $chart[\"paletteColors\"] = \"#0075c2,#c90606,#f2c500,#12a830,#1aaf5d\";\n $chart[\"showBorder\"] = \"0\";\n $chart[\"showCanvasBorder\"] = \"0\";\n $chart[\"yaxisvaluespadding\"] = \"10\";\n $chart[\"valueFontColor\"] = \"#ffffff\";\n $chart[\"rotateValues\"] = \"1\";\n $chart[\"bgAlpha\"] = \"0,0\";//Fondo \n $chart[\"theme\"] = \"fint\";\n $chart[\"showborder\"] = \"0\";\n $chart[\"decimals\"] = \"0\";\n $chart[\"showLegend\"] = \"0\";\n $chart[\"legendBgColor\"] = \"#ffffff\";\n $chart[\"legendItemFontSize\"] = \"10\";\n $chart[\"legendItemFontColor\"] = \"#666666\";\n $chart[\"baseFontColor\"] = \"#ffffff\"; \n $chart[\"outCnvBaseFontColor\"] = \"#ffffff\";\n $chart[\"formatNumberScale\"] = \"0\";\n\n $chart[\"usePlotGradientColor\"] = \"0\";\n $chart[\"plotBorderAlpha\"] = \"10\";\n $chart[\"legendBorderAlpha\"] = \"0\";\n $chart[\"legendBgAlpha\"] = \"0\";\n $chart[\"legendItemFontColor\"] = \"#ffffff\";\n $chart[\"baseFontColor\"] = \"#ffffff\";\n $chart[\"legendItemFontColor\"] = \"#ffffff\";\n \n $chart[\"divLineDashed\"] = \"0\";\n $chart[\"showHoverEffect\"] = \"1\";\n $chart[\"valuePosition\"] = \"ABOVE\";\n $chart[\"dashed\"] = \"0\";\n $chart[\"divLineDashLen\"] = \"0\";\n $chart[\"divLineGapLen\"] = \"0\";\n $chart[\"canvasBgAlpha\"] = \"0,0\";\n $chart[\"toolTipBgColor\"] = \"#000000\";\n\n $em = $this->getDoctrine()->getManager();\n \n $label = $dataPlan = $dataReal = array();\n $count = 1;\n $votoNO = $votoSI = 0;\n\n $estados = [\n 1 => \"EDO. CARABOBO\", \n 2 => \"EDO. ZULIA\", \n 3 => \"EDO. ANZOATEGUI\",\n 4 => \"OTROS\" \n ];\n \n foreach ($estados as $value) {\n $estado = $estados[$count];\n $label[\"label\"] = $estado; \n $category[] = $label; \n \n if ($estado != \"OTROS\") {\n $resultEstado = $em->getRepository(\"\\Pequiven\\SEIPBundle\\Entity\\Sip\\Centro\")->findByBarra1x10($estado); \n }else{\n $resultEstado = $em->getRepository(\"\\Pequiven\\SEIPBundle\\Entity\\Sip\\Centro\")->findByBarra1x10Otros(); \n }\n \n if (isset($resultEstado[0][\"SUM(votoSI)\"])) {\n $votoSI = $resultEstado[0][\"SUM(votoSI)\"]; \n }else{\n $votoSI = 0;\n }\n\n if (isset($resultEstado[0][\"SUM(votoNO)\"])) {\n $votoNO = $resultEstado[0][\"SUM(votoNO)\"]; \n }else{\n $votoNO = 0;\n }\n \n $dataReal1[\"value\"] = $votoSI; //Carga de valores General\n $dataSetReal[\"data\"][] = $dataReal1; //data \n \n $dataPlan1[\"value\"] = $votoNO + $votoSI; //Carga de valores General\n $dataSetPlan[\"data\"][] = $dataPlan1; //data \n\n $count++; \n } \n\n $dataSetReal[\"seriesname\"] = \"Real\"; \n $dataSetPlan[\"seriesname\"] = \"Plan\"; \n\n $data['dataSource']['chart'] = $chart;\n $data['dataSource']['categories'][][\"category\"] = $category;\n $data['dataSource']['dataset'][] = $dataSetPlan;\n $data['dataSource']['dataset'][] = $dataSetReal;\n\n return json_encode($data);\n }",
"private function diagram() {\n $diagram_data = array();\n\n $data = array(\n\t\t\t'filter_category_id' => $this->category_id,\n 'filter_params' => $this->params\n\t\t);\n\n if ($this->min_price_get && $this->max_price_get && count($this->matches) == 1) {\n unset($data['filter_params']);\n }\n\n $product_prices_result = $this->model_catalog_filter->getProductPrices($data);\n\n if ($product_prices_result && count($product_prices_result['products']) > 1) {\n $diagram_width = 158; # diagram box width (px)\n $diagram_height = 30; # diagram box height (px)\n\n $min_price = $product_prices_result['min'];\n $max_price = $product_prices_result['max'];\n $price_diff = $max_price-$min_price;\n\n if ($price_diff > $diagram_width) {\n $price_range = $price_diff/$diagram_width;\n $diagram_item_width = 1;\n } else {\n $price_range = 1;\n $diagram_item_width = $diagram_width/$price_diff;\n }\n\n $diagram_items = round($diagram_width/$diagram_item_width);\n\n $max_count = 0;\n $diagram = array();\n\n for ($i = 0; $i < $diagram_items; $i++) {\n $from = $i*$price_range+$min_price;\n $to = ($i+1)*$price_range+$min_price;\n\n $count = 0;\n\n foreach ($product_prices_result['products'] as $product_id => $price) {\n if ($price >= $from && $price <= $to) {\n $count++;\n }\n }\n\n if ($count > $max_count) {\n $max_count = $count;\n }\n\n $diagram[] = array(\n 'from' => floor($from),\n 'to' => ceil($to),\n 'count' => $count\n );\n }\n\n foreach ($diagram as $item) {\n\n # Items height scale\n\n if ($max_count > $diagram_height) {\n $height = floor($item['count']/($max_count/$diagram_height));\n } elseif ($max_count) {\n $height = floor($item['count']*($diagram_height/$max_count));\n } else {\n $height = $item['count'];\n }\n\n $diagram_data[] = array(\n 'from' => $item['from'],\n 'to' => $item['to'],\n 'count' => $item['count'],\n 'width' => $diagram_item_width . 'px',\n 'height' => $height . 'px'\n );\n }\n }\n # end\n return $diagram_data;\n }",
"function graphGauge($id,$width,$height,$font,$n,$r,$lowestBest,$title){\n $border=0;\n $res=$this->create($id,$width,$height,$border);\n $res.=$this->getCanvas($id);\n $res.=$this->setFont($id,$font);\n $res.=$this->initiateGauge($id,$r,$n,$lowestBest,$title,$font);\n $res.=$this->endScript();\n return $res;\n \n }",
"function bbp_head()\n{\n}",
"abstract protected function getGraph();",
"protected function generateBars() \n\t{\n\t\t$this->finalizeColors();\n\n\t\t$barCount = 0;\n\t\t$adjustment = 0;\n\t\tif ($this->bool_user_data_range && $this->data_min >= 0) {\n\t\t\t$adjustment = $this->data_min * $this->unit_scale;\n\t\t}\n\n\t\t//reverse array to order data sets in order of priority\n\t\t$this->data_array = array_reverse($this->data_array);\n\n\t\t//set different offsets based on number of data sets\n\t\t$dataset_offset = 0;\n\t\tswitch ($this->data_set_count) {\n\t\t\tcase 2: \n\t\t\t\t$dataset_offset = $this->bar_width * (self::MULTI_OFFSET_TWO / 100); \n\t\t\t\tbreak;\n\t\t\tcase 3: \n\t\t\t\t$dataset_offset = $this->bar_width * (self::MULTI_OFFSET_THREE / 100); \n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\t\t$dataset_offset = $this->bar_width * (self::MULTI_OFFSET_FOUR / 100); \n\t\t\t\tbreak;\n\t\t\tcase 5: \n\t\t\t\t$dataset_offset = $this->bar_width * (self::MULTI_OFFSET_FIVE / 100); \n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tforeach ($this->data_array as $data_set_num => $data_set) {\n\t\t\t$lineX2 = null;\n\t\t\t$xStart = $this->y_axis_x1 + ($this->space_width / 2);\n\t\t\tforeach ($data_set as $key => $item) {\n\t\t\t\t$hideBarOutline = false;\n\n\t\t\t\t$x1 = round($xStart + ($dataset_offset * $data_set_num));\n\t\t\t\t$x2 = round(($xStart + $this->bar_width) + ($dataset_offset * $data_set_num));\n\t\t\t\t$y1 = round($this->x_axis_y1 - ($item * $this->unit_scale) + $adjustment);\n\t\t\t\t$y2 = round($this->x_axis_y1);\n\t\t\t\t\n\t\t\t\t//if we are using a user specified data range, need to limit what's displayed\n\t\t\t\tif ($this->bool_user_data_range) {\n\t\t\t\t\tif ($item <= $this->data_range_min) {\n\t\t\t\t\t\t//don't display, we are out of our allowed display range!\n\t\t\t\t\t\t$y1 = $y2;\n\t\t\t\t\t\t$hideBarOutline = true;\n\t\t\t\t\t} elseif ($item >= $this->data_range_max) {\n\t\t\t\t\t\t//display, but cut off display above range max\n\t\t\t\t\t\t$y1 = $this->x_axis_y1 - ($this->actual_displayed_max_value * $this->unit_scale) + $adjustment;\t\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t//draw bar \n\t\t\t\tif ($this->bool_bars) {\n\t\t\t\t\tif ($this->bool_gradient) {\n\t\t\t\t\t\t//draw gradient if desired\n\t\t\t\t\t\t$this->drawGradientBar($x1, $y1, $x2, $y2, $this->multi_gradient_colors_1[$data_set_num], $this->multi_gradient_colors_2[$data_set_num], $data_set_num);\n\t\t\t\t\t} else {\n\t\t\t\t\t\timagefilledrectangle($this->image, $x1, $y1,$x2, $y2, $this->multi_bar_colors[$data_set_num]);\n\t\t\t\t\t}\n\t\t\t\t\t//draw bar outline\t\n\t\t\t\t\tif ($this->bool_bar_outline && !$hideBarOutline) { \n\t\t\t\t\t\timagerectangle($this->image, $x1, $y2, $x2, $y1, $this->outline_color); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// draw line\n\t\t\t\tif ($this->bool_line) {\n\t\t\t\t\t$lineX1 = $x1 + ($this->bar_width / 2); //MIDPOINT OF BARS, IF SHOWN\n\t\t\t\t\t$lineY1 = $y1;\n\t\t\t\t\tif (isset($lineX2)) {\n\t\t\t\t\t\timageline($this->image, $lineX2, $lineY2, $lineX1, $lineY1, $this->line_color[$data_set_num]);\n\t\t\t\t\t\t$lineX2 = $lineX1;\n\t\t\t\t\t\t$lineY2 = $lineY1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$lineX2 = $lineX1;\n\t\t\t\t\t\t$lineY2 = $lineY1;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t// display data points\n\t\t\t\tif ($this->bool_data_points) {\n\t\t\t\t\t//dont draw datapoints here or will overlap poorly with line\n\t\t\t\t\t//instead collect coordinates\n\t\t\t\t\t$pointX = $x1 + ($this->bar_width / 2); //MIDPOINT OF BARS, IF SHOWN\n\t\t\t\t\t$this->data_point_array[] = array($pointX, $y1);\n\t\t\t\t}\n\t\t\t\t// display data values\n\t\t\t\tif ($this->bool_data_values) {\n\t\t\t\t\t$dataX = ($x1 + ($this->bar_width / 2)) - ((strlen($item) * self::DATA_VALUE_TEXT_WIDTH) / 2);\n\t\t\t\t\t//value to be graphed is equal/over 0\n\t\t\t\t\tif ($item >= 0) {\n\t\t\t\t\t\t$dataY = $y1 - self::DATA_VALUE_PADDING - self::DATA_VALUE_TEXT_HEIGHT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//check for item values below user spec'd range\n\t\t\t\t\t\tif ($this->bool_user_data_range && $item <= $this->data_range_min) {\n\t\t\t\t\t\t\t$dataY = $y1 - self::DATA_VALUE_PADDING - self::DATA_VALUE_TEXT_HEIGHT;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$dataY = $y1 + self::DATA_VALUE_PADDING;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//add currency sign, formatting etc\n\t\t\t\t\tif ($this->data_format_array) {\n\t\t\t\t\t\t$item = $this->applyDataFormats($item);\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->data_currency) {\n\t\t\t\t\t\t$item = $this->applyDataCurrency($item);\n\t\t\t\t\t}\n\t\t\t\t\t//recenter data position if necessary\n\t\t\t\t\t$dataX -= ($this->data_additional_length * self::DATA_VALUE_TEXT_WIDTH) / 2;\n\t\t\t\t\timagestring($this->image, 2, $dataX, $dataY, $item, $this->data_value_color);\n\t\t\t\t}\n\t\t\t\t//write x axis value \n\t\t\t\tif ($this->bool_x_axis_values) {\n\t\t\t\t\tif ($data_set_num == $this->data_set_count - 1) {\n\t\t\t\t\t\tif ($this->bool_x_axis_values_vert) {\n\t\t\t\t\t\t\tif ($this->bool_all_negative) {\n\t\t\t\t\t\t\t\t//we must put values above 0 line\n\t\t\t\t\t\t\t\t$textVertPos = round($this->y_axis_y2 - self::AXIS_VALUE_PADDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//mix of both pos and neg numbers\n\t\t\t\t\t\t\t\t//write value y axis bottom value (will be under bottom of grid even if x axis is floating due to\n\t\t\t\t\t\t\t\t$textVertPos = round($this->y_axis_y1 + (strlen($key) * self::TEXT_WIDTH) + self::AXIS_VALUE_PADDING);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$textHorizPos = round($xStart + ($this->bar_width / 2) - (self::TEXT_HEIGHT / 2));\n\t\t\t\t\t\n\t\t\t\t\t\t\t//skip and dispplay every x intervals\n\t\t\t\t\t\t\tif ($this->x_axis_value_interval) {\n\t\t\t\t\t\t\t\tif ($this->x_axis_value_interval_counter < $this->x_axis_value_interval) {\n\t\t\t\t\t\t\t\t\t$this->x_axis_value_interval_counter++;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\timagestringup($this->image, 2, $textHorizPos, $textVertPos, $key, $this->x_axis_text_color);\n\t\t\t\t\t\t\t\t\t$this->x_axis_value_interval_counter = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\timagestringup($this->image, 2, $textHorizPos, $textVertPos, $key, $this->x_axis_text_color);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif ($this->bool_all_negative) {\n\t\t\t\t\t\t\t\t//we must put values above 0 line\n\t\t\t\t\t\t\t\t$textVertPos = round($this->y_axis_y2 - self::TEXT_HEIGHT - self::AXIS_VALUE_PADDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//mix of both pos and neg numbers\n\t\t\t\t\t\t\t\t//write value y axis bottom value (will be under bottom of grid even if x axis is floating due to\n\t\t\t\t\t\t\t\t$textVertPos = round($this->y_axis_y1 + (self::TEXT_HEIGHT * 2 / 3) - self::AXIS_VALUE_PADDING);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//horizontal data keys\n\t\t\t\t\t\t\t$textHorizPos = round($xStart + ($this->bar_width / 2) - ((strlen($key) * self::TEXT_WIDTH) / 2));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//skip and dispplay every x intervals\n\t\t\t\t\t\t\tif ($this->x_axis_value_interval) {\n\t\t\t\t\t\t\t\tif ($this->x_axis_value_interval_counter < $this->x_axis_value_interval) {\n\t\t\t\t\t\t\t\t\t$this->x_axis_value_interval_counter++;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\timagestring($this->image, 2, $textHorizPos, $textVertPos, $key, $this->x_axis_text_color);\n\t\t\t\t\t\t\t\t\t$this->x_axis_value_interval_counter = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\timagestring($this->image, 2, $textHorizPos, $textVertPos, $key, $this->x_axis_text_color);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$xStart += $this->bar_width + $this->space_width;\n\t\t\t}\n\t\t}\n\t}",
"function __construct( $show_breadcrumb )\n {\n parent::__construct();\n \n try\n {\n $html = new THtmlRenderer('app/resources/google_bar_chart.html');\n \n $meses = [ 1 => 'Janeiro', 2 => 'Fevereiro', 3 => 'Março', 4 => 'Abril', 5 => 'Maio', 6 => 'Junho',\n 7 => 'Julho', 8 => 'Agosto', 9 => 'Setembro', 10 => 'Outubro', 11 => 'Novembro', 12 => 'Dezembro' ];\n \n $data = array();\n $data[] = [ 'Mês', 'Valor' ];\n \n TTransaction::open('microerp');\n $pedidos_mes = Pedido::getPedidosMes( date('y'), TSession::getValue('userunitid') );\n TTransaction::close();\n \n foreach ($pedidos_mes as $mes => $valor)\n {\n $data[] = [ $meses[ (int)$mes], $valor ];\n }\n \n $panel = new TPanelGroup('Pedidos / mês - ' . date('Y'));\n $panel->style = 'width:100%';\n $panel->add($html);\n \n // replace the main section variables\n $html->enableSection('main', array('data' => json_encode($data),\n 'width' => '100%',\n 'height' => '300px',\n 'title' => 'Pedidos por mês',\n 'ytitle' => 'Pedidos',\n 'xtitle' => 'Mês'));\n $container = new TVBox;\n $container->style = 'width: 100%';\n if ($show_breadcrumb)\n {\n $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n }\n $container->add($panel);\n parent::add($container);\n }\n catch (Exception $e)\n {\n new TMessage('error', $e->getMessage());\n }\n }",
"function graph_creator( $h, $w, $t, $label, $data, $center_value = 0.45 ) {\r\n\t\t//initialize class variables\r\n\t\t$this->height = $h;\t\t\t//graph height\r\n\t\t$this->width = $w;\t\t\t//graph width\r\n\t\t$this->title = $t;\t\t\t//graph title\r\n\t\t$this->label = $label;\t\t//label of data on the graph or the legend\r\n\t\t$this->data = $data;\t\t//the data to be presented\r\n\t\t$this->bgImage = $bgImg;\t//the background image\r\n\t}",
"public function renderGraph()\n\t{\n\t\t$maxLogoWidth = 0;\n\t\t$maxLogoHeight = 0;\n\t\tforeach($this->ordinateLogos as $logoPath)\n\t\t{\n\t\t\t$absoluteLogoPath = self::getAbsoluteLogoPath($logoPath);\n\t\t\t$logoWidthHeight = self::getLogoWidthHeight($absoluteLogoPath);\n\t\t\t$logoWidth = $logoWidthHeight[self::WIDTH_KEY];\n\t\t\t$logoHeight = $logoWidthHeight[self::HEIGHT_KEY];\n\n\t\t\tif($logoWidth > $maxLogoWidth)\n\t\t\t{\n\t\t\t\t$maxLogoWidth = $logoWidth;\n\t\t\t}\n\n\t\t\tif($logoHeight > $maxLogoHeight)\n\t\t\t{\n\t\t\t\t$maxLogoHeight = $logoHeight;\n\t\t\t}\n\t\t}\n\n\t\t// truncate report\n\t\t$graphHeight = $this->getGraphBottom() - $this->getGridTopMargin($horizontalGraph = true);\n\t\t$abscissaMaxWidthHeight = $this->maxWidthHeight($this->abscissaSerie);\n\t\t$abscissaMaxHeight = $abscissaMaxWidthHeight[self::HEIGHT_KEY];\n\t\t$maxLineWidth = $abscissaMaxHeight > $maxLogoHeight ? $abscissaMaxHeight : $maxLogoHeight;\n\t\t$maxNumOfValues = floor($graphHeight / $maxLineWidth);\n\t\t$abscissaSerieCount = count($this->abscissaSerie);\n\n\t\tif($maxNumOfValues < $abscissaSerieCount - 1)\n\t\t{\n\t\t\t$truncatedOrdinateSerie = array();\n\t\t\t$truncatedOrdinateLogos = array();\n\t\t\t$truncatedAbscissaSerie = array();\n\n\t\t\t$i = 0;\n\t\t\tfor(; $i < $maxNumOfValues; $i++)\n\t\t\t{\n\t\t\t\t$truncatedOrdinateSerie[] = $this->ordinateSerie[$i];\n\t\t\t\t$truncatedOrdinateLogos[] = isset($this->ordinateLogos[$i]) ? $this->ordinateLogos[$i] : null;\n\t\t\t\t$truncatedAbscissaSerie[] = $this->abscissaSerie[$i];\n\t\t\t}\n\n\t\t\t$sumOfOthers = 0;\n\t\t\tfor(; $i < $abscissaSerieCount; $i++)\n\t\t\t{\n\t\t\t\t$sumOfOthers += $this->ordinateSerie[$i];\n\t\t\t}\n\t\t\t$truncatedOrdinateSerie[] = $sumOfOthers;\n\t\t\t$truncatedAbscissaSerie[] = Piwik_Translate('General_Others');\n\t\t\t$this->ordinateSerie = $truncatedOrdinateSerie;\n\t\t\t$this->ordinateLogos = $truncatedOrdinateLogos;\n\t\t\t$this->abscissaSerie = $truncatedAbscissaSerie;\n\t\t}\n\n\t\t// blank characters are used to pad labels so the logo can be displayed\n\t\t$blankCharWidthHeight = $this->getTextWidthHeight(self::PADDING_CHARS);\n\t\t$blankCharWidth = $blankCharWidthHeight[self::WIDTH_KEY];\n\t\t$numOfPaddingBlankChar = ceil($maxLogoWidth / $blankCharWidth);\n\n\t\t$paddingText = '';\n\t\tfor($i = 0 ; $i < $numOfPaddingBlankChar ; $i++)\n\t\t{\n\t\t\t$paddingText .= self::PADDING_CHARS;\n\t\t}\n\n\t\t$paddingWidth = 0;\n\t\tif($numOfPaddingBlankChar > 0)\n\t\t{\n\t\t\t$paddingWidthHeight = $this->getTextWidthHeight($paddingText);\n\t\t\t$paddingWidth = $paddingWidthHeight[self::WIDTH_KEY];\n\t\t}\n\n\t\t// determine the maximum label width according to the minimum comfortable graph size\n\t\t$minGraphSize = self::MIN_GRAPH_SIZE;\n\n\t\t$metricTitleWidthHeight = $this->getTextWidthHeight($this->metricTitle);\n\t\t$legendWidth = $metricTitleWidthHeight[self::WIDTH_KEY] + self::LEGEND_LEFT_MARGIN + self::LEGEND_SQUARE_WIDTH;\n\t\tif($this->showMetricTitle)\n\t\t{\n\t\t\tif($legendWidth > $minGraphSize)\n\t\t\t{\n\t\t\t\t$minGraphSize = $legendWidth;\n\t\t\t}\n\t\t}\n\n\t\t$gridLeftMarginWithoutLabels = $this->getGridLeftMargin($horizontalGraph = true, $withLabel = false);\n\t\t$gridRightMargin = $this->getGridRightMargin($horizontalGraph = true);\n\t\t$labelWidthLimit =\n\t\t\t\t$this->width\n\t\t\t\t- $gridLeftMarginWithoutLabels\n\t\t\t\t- $gridRightMargin\n\t\t\t\t- $paddingWidth\n\t\t\t\t- $minGraphSize;\n\n\t\t// truncate labels if needed\n\t\t$truncationTextWidthHeight = $this->getTextWidthHeight(self::TRUNCATION_TEXT);\n\t\t$truncationTextWidth = $truncationTextWidthHeight[self::WIDTH_KEY];\n\t\tforeach($this->abscissaSerie as &$label)\n\t\t{\n\t\t\t$labelWidthHeight = $this->getTextWidthHeight($label);\n\t\t\t$labelWidth = $labelWidthHeight[self::WIDTH_KEY];\n\t\t\tif($labelWidth > $labelWidthLimit)\n\t\t\t{\n\t\t\t\t$averageCharWidth = $labelWidth / strlen($label);\n\t\t\t\t$charsToKeep = floor(($labelWidthLimit - $truncationTextWidth) / $averageCharWidth);\n\t\t\t\t$label = substr($label, 0, $charsToKeep) . self::TRUNCATION_TEXT;\n\t\t\t}\n\t\t}\n\n\t\t$gridLeftMarginBeforePadding = $this->getGridLeftMargin($horizontalGraph = true, $withLabel = true);\n\n\t\t// pad labels for logo space\n\t\tforeach($this->abscissaSerie as &$label)\n\t\t{\n\t\t\t$label .= $paddingText;\n\t\t}\n\n\t\t$this->initGridChart(\n\t\t\t$displayVerticalGridLines = false,\n\t\t\t$drawCircles = false,\n\t\t\t$horizontalGraph = true,\n\t\t\t$showTicks = false\n\t\t);\n\n\t\t$valueColor = $this->colors[self::VALUE_COLOR_KEY];\n\t\t$this->pImage->drawBarChart(\n\t\t\tarray(\n\t\t\t\t'DisplayValues' => true,\n\t\t\t\t'Interleave' => self::INTERLEAVE,\n\t\t\t\t'DisplayR' => $valueColor['R'],\n\t\t\t\t'DisplayG' => $valueColor['G'],\n\t\t\t\t'DisplayB' => $valueColor['B'],\n\t\t\t)\n\t\t);\n\n\t\t// display icons\n\t\t$graphData = $this->pData->getData();\n\t\t$sizeOfOrdinateSerie = sizeof($this->ordinateSerie);\n\t\t$logoInterleave = $this->getGraphHeight(true) / $sizeOfOrdinateSerie;\n\t\tfor($i = 0; $i < $sizeOfOrdinateSerie; $i++)\n\t\t{\n\t\t\tif(isset($this->ordinateLogos[$i]))\n\t\t\t{\n\t\t\t\t$logoPath = $this->ordinateLogos[$i];\n\t\t\t\t$absoluteLogoPath = self::getAbsoluteLogoPath($logoPath);\n\n\t\t\t\t$logoWidthHeight = self::getLogoWidthHeight($absoluteLogoPath);\n\n\t\t\t\t$pathInfo = pathinfo($logoPath);\n\t\t\t\t$logoExtension = strtoupper($pathInfo['extension']);\n\t\t\t\t$drawingFunction = 'drawFrom' . $logoExtension;\n\n\t\t\t\t$logoYPosition =\n\t\t\t\t\t\t($logoInterleave * $i)\n\t\t\t\t\t\t+ $this->getGridTopMargin(true)\n\t\t\t\t\t\t+ $graphData['Axis'][1]['Margin']\n\t\t\t\t\t\t- $logoWidthHeight[self::HEIGHT_KEY] / 2\n\t\t\t\t\t\t+ 1;\n\n\t\t\t\t$this->pImage->$drawingFunction(\n\t\t\t\t\t$gridLeftMarginBeforePadding,\n\t\t\t\t\t$logoYPosition,\n\t\t\t\t\t$absoluteLogoPath\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}",
"protected function drawBergerTable()\n {\n $a = [];\n $table = [];\n\n for ($i = 1; $i < $this->teamsCount; $i++) {\n $a[] = $i;\n }\n\n for ($i = 0; $i < $this->teamsCount - 1; $i++) {\n $table[$i] = [];\n if (!$this->isOdd) {\n $table[$i][] = [$a[0], $this->teamsCount];\n }\n for ($j = 1; $j < $this->pairCnt; $j++) {\n $table[$i][] = [$a[$j], $a[$this->teamsCount - 1 - $j]];\n }\n $a[] = array_shift($a);\n }\n\n $table = $this->addReversMarches($table);\n\n return $table;\n }",
"public function create_breadcrumb()\n\t{\n\t\t$this->breadcrumb = new stdClass();\n\n\t\tif ( isset($this->schema->{'@Context'}) && !empty($this->schema->{'@Context'}) )\n\t\t\t$this->breadcrumb->{'@Context'} = $this->schema->{'@Context'};\n\t\telse\n\t\t\t$this->breadcrumb->{'@Context'} = \"http://schema.org\";\n\n\t\t$this->breadcrumb->{'@type'} = \"BreadcrumbList\";\n\n\t\t$this->breadcrumb->itemListElement = array();\n\t}",
"function _drawGuides()\n {\n $guideCount = 10;\n $spacing = floor($this->graphHeight/$guideCount);\n for($y=0; $y<$guideCount; $y++)\n {\n imageline( $this->imageRes, $this->maxX, ($y*$spacing) + $this->padding, $this->minX, ($y*$spacing) + $this->padding, $this->guideLineColor );\n }\n\n // Put the amts on the right side\n $x = $this->maxX + 3;\n $chunk = ($this->highestValue / $guideCount);\n if ( $this->highestValue >= 10 ) {\n $chunk = floor($chunk);\n }\n else {\n $chunk = round($chunk, 1);\n }\n\n for($y=0; $y<$guideCount; $y++)\n {\n $amt = $this->highestValue - ($chunk * $y);\n $str = (string)$amt;\n\n if ( $str > 1000000000 ) {\n $str = round( $str/1000000000,1 ).'B';\n }\n else if ( $str > 1000000 ) {\n $str = round( $str/1000000, 1 ).'M';\n }\n else if ( $str > 1000 ) {\n $str = round( $str/1000, 1 ).'k';\n }\n\n for($i=0; $i<strlen($str); $i++)\n {\n imagechar( $this->imageRes, 1, $x+($i*5), $y*$spacing+$this->padding, $str{$i}, $this->numberColor);\n }\n }\n\n\n // Put the amts on the left side\n $x = $this->minX - 3 - 5;\n for($y=0; $y<$guideCount; $y++)\n {\n $amt = $this->highestValue - ($chunk * $y);\n $str = (string)$amt;\n\n if ( $str > 1000000000 ) {\n $str = round( $str/1000000000,1 ).'B';\n }\n else if ( $str > 1000000 ) {\n $str = round( $str/1000000, 1 ).'M';\n }\n else if ( $str > 1000 ) {\n $str = round( $str/1000, 1 ).'k';\n }\n\n for($i=0; $i<strlen($str); $i++)\n {\n imagechar( $this->imageRes, 1, $x-($i*5), $y*$spacing+$this->padding, $str{strlen($str)-$i-1}, $this->numberColor);\n }\n }\n }",
"private function agregarBreadCrumb(){\n\n if(is_array($this->opcionesBreadCrumb)){\n if(array_key_exists(\"selector\",$this->opcionesBreadCrumb)){\n $selector = $this->opcionesBreadCrumb['selector'];\n unset($this->opcionesBreadCrumb['selector']);\n }\n $lis=\"\";\n foreach ($this->opcionesBreadCrumb as $campo => $valor) {\n $span = Selector::crear('span',array('data-id'=>\"$valor[enlace]\"),$valor['nombreLink'],5);\n $link = Selector::crear('a',array('href'=>$valor['enlace']),$span,5);\n $lis .= Selector::crear('li',null,$link,4);\n }\n $ol = Selector::crear('ol',array('class'=>$this->cssBreadcrumb),$lis,3);\n $div = Selector::crear('div',array('class'=>'col-lg-12 col-md-12'),$ol,2);\n $bc = Selector::crear('section',array('class'=>'row'),$div);\n return $bc;\n\n return $bc;\n }//fin if\n }",
"public function createGraph()\n {\n return $this->getCycleNegative()->createGraph();\n }",
"public function createBreadcrumb() {\n $breadcrumb = \"<ul class='breadcrumb'>\\n<li><a href='movies.php'>Filmer</a> »</li>\\n\";\n \n if (isset($_GET[\"new\"])) {\n $breadcrumb .= \"<li>Ny</li>\\n\";\n }\n else if (isset($_GET[\"edit\"])) {\n $breadcrumb .= \"<li>Redigera</li>\\n\";\n }\n else if (isset($_GET[\"delete\"])) {\n $breadcrumb .= \"<li>Radera</li>\\n\";\n }\n else if (isset($_GET[\"genre\"])) {\n $breadcrumb .= \"<li>{$_GET[\"genre\"]}</li>\\n\";\n }\n else if (isset($_GET[\"id\"])) {\n $breadcrumb .= \"<li>{$this->getTitle($_GET['id'])}</li>\\n\";\n }\n \n $breadcrumb .= \"</ul>\\n\";\n return $breadcrumb;\n }",
"function get_base_chart($data_array, $out_file, $data_format){\n \n // Creo il grafico\n $graph = new PHPGraphLib(CHART_WIDTH, CHART_HEIGTH, $out_file);\n $graph->addData($data_array);\n \n // Calcolo le statistiche\n $max = max($data_array);\n $min = min($data_array);\n $avg = round(array_sum($data_array) / count($data_array) , 2);\n \n $graph->setBars(false);\n $graph->setLine(true);\n\n //imposto i punti dei valori\n $graph->setDataPoints(true);\n $graph->setDataPointColor('red');\n $graph->setDataPointSize(5);\n\n //Imposto la formattazione dei valori\n $graph->setDataValues(false);\n $graph->setDataValueColor('maroon');\n $graph->setDataFormat($data_format);\n \n $graph->setTitleLocation('left');\n \n //Stampo le statistiche\n $graph->setLegend(true);\n $graph->setSwatchOutlineColor(\"white\");\n $graph->setLegendOutlineColor(\"white\");\n $graph->setLegendTitle('Min: '.$min.$data_format.' Max: '.$max.$data_format.' Avg: '.$avg.$data_format);\n \n //Stampo la linea di media\n $graph->setGoalLine($avg, 'black', 'dashed');\n \n //Imposto l'asse delle X\n $graph->setXValues(true);\n $graph->setXValuesHorizontal(true);\n $graph->setXValuesInterval(5);\n \n return $graph;\n}",
"private function __generateBarCss($data){\n\t\t\t$colWidth = (($data['width'] + $data['spacing']['padding']) / count($data['data'][0]) / $data['width']) * 100;\n\t\t\t$margin = round($data['spacing']['padding'] / 2);\n\t\t\t$colWidth -= $data['spacing']['padding'];\n\n\t\t\treturn <<<cssData\n\t.html-chart.bar.verticle{\n\t\twidth: {$data['width']}px;\n\t\theight: {$data['height']}px;\n\t\tbackground-color: #{$data['color']['background']};\n\t\tcolor: #{$data['color']['text']};\n\t\tborder-bottom: 1px solid #{$data['color']['lines']};\n\t}\n\n\t.html-chart.bar.verticle .y-axis{\n\t\tborder-right: 1px solid #{$data['color']['lines']};\n\t}\n\n\t.html-chart.bar.verticle table{\n\t\theight: {$data['height']}px;\n\t}\n\n\t.html-chart.bar.verticle td.col div{\n\t\tmargin-left: {$margin}px;\n\t\tmargin-right: {$margin}px;\n\t}\n\n\t.html-chart.bar.verticle .empty{\n\t\tbackground-color: #{$data['color']['background']};\n\t}\n\n\t.html-chart.bar.verticle .fill{\n\t\tbackground-color: #{$data['color']['fill']};\n\t}\n\ncssData;\n\n\t\t}",
"function declare_bread( $config ){\n\t\t$default\t=\tarray(\n\t\t\t'divider' \t\t\t=>\t\t'/',\n\t\t\t'wrapper'\t\t\t=>\t\t'ul',\n\t\t\t'wrapper_class'\t\t=>\t\t'wrapper-class',\n\t\t\t'wrapper_id'\t\t=>\t\t'wrappper-id',\n\t\t\t'item_class'\t\t=>\t\t'item-class',\n\t\t\t'item_id'\t\t\t=>\t\t'item-id',\n\t\t\t'text_before_bread'\t=>\t\t'',\n\t\t\t'container'\t\t\t=>\t\t'div',\n\t\t\t'container_class'\t=>\t\t'container-class',\n\t\t\t'container_id'\t\t=>\t\t'container-id',\n\t\t\t'word_limiter'\t\t=>\t\t10,\n\t\t\t'text_before_bread_loop'\t=>\t''\n\t\t);\n\t\t$config\t\t=\tarray_merge( $default , $config );\n\t\treturn set_active_theme_vars( 'breadcrumbs_setup' , $config );\n\t}",
"public function createNewGraph()\n {\n // I am assuming that the packagist repo vendor, and the github login\n // are the same\n $this->init();\n $this->addNode($this->username_a);\n $this->addNode($this->username_b);\n }",
"public function getGraph();",
"protected function _generateBreadcrumb() {\r\n\r\n // id_menu_news = 'News'\r\n\r\n $listTitle = $this->view->translate('Figure');\r\n\r\n\r\n\r\n if ($this->_hasParam('id')) {\r\n\r\n // Param\r\n\r\n $id = $this->_getParam('id');\r\n\r\n\r\n\r\n // Model\r\n\r\n $db = new Model_DbTable_Figure;\r\n\r\n\r\n\r\n // Data\r\n\r\n $figure = $db->findWithDescription($id, $this->_languageId);\r\n\r\n $title = $figure['name'];\r\n }\r\n\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n\r\n $links = null;\r\n\r\n switch ($this->_request->getActionName()) {\r\n\r\n case 'detail':\r\n\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => $this->view->baseUrl('figure'),\r\n $title => '',\r\n );\r\n\r\n $this->view->pageTitle = $title;\r\n\r\n break;\r\n\r\n case 'index':\r\n\r\n default:\r\n\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => '',\r\n );\r\n\r\n $this->view->pageTitle = $listTitle;\r\n }\r\n\r\n Zend_Registry::set('breadcrumb', $links);\r\n }",
"public function createBarStackChart()\n {\n return new OFCBarStackChart();\n }"
] | [
"0.59687835",
"0.58660036",
"0.5814336",
"0.57566726",
"0.54297477",
"0.54148835",
"0.5413002",
"0.5394055",
"0.53427446",
"0.5285934",
"0.5285179",
"0.5282503",
"0.5278615",
"0.5238647",
"0.5202875",
"0.5172392",
"0.51622546",
"0.51349473",
"0.50870883",
"0.50751984",
"0.5069475",
"0.50634164",
"0.50589895",
"0.5047486",
"0.5043249",
"0.5040928",
"0.5040249",
"0.5014751",
"0.5013434",
"0.4998822"
] | 0.7447586 | 0 |
Prepares a type 'url' render element for input.html.twig. | public static function preRenderUrl($element) {
$element['#attributes']['type'] = 'url';
Element::setAttributes($element, ['id', 'name', 'value', 'size', 'maxlength', 'placeholder']);
static::setAttributes($element, ['form-url']);
return $element;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function thumbnail_url_field( $html ) {\n\tglobal $post;\n\t$value = get_post_meta( $post->ID, '_thumbnail_ext_url', TRUE ) ? : \"\";\n\t$nonce = wp_create_nonce( 'thumbnail_ext_url_' . $post->ID . get_current_blog_id() );\n\t$html .= '<input type=\"hidden\" name=\"thumbnail_ext_url_nonce\" value=\"' . esc_attr( $nonce ) . '\">';\n\t$html .= '<div><p>' . __('Or', 'txtdomain') . '</p>';\n\t$html .= '<p>' . __( 'Enter the url for external image', 'txtdomain' ) . '</p>';\n\t$html .= '<p><input type=\"url\" name=\"thumbnail_ext_url\" value=\"' . $value . '\"></p>';\n\tif ( ! empty($value) && url_is_image( $value ) ) {\n\t\t$html .= '<p><img style=\"max-width:150px;height:auto;\" src=\"' . esc_url($value) . '\"></p>';\n\t\t$html .= '<p>' . __( 'Leave url blank to remove.', 'txtdomain' ) . '</p>';\n\t}\n\t$html .= '</div>';\n\treturn $html;\n}",
"public function setTypeUrl($var) {}",
"public function setTypeUrl($var) {}",
"public function render_base_url_field() {\n\t\t?>\n\t\t<input\n\t\t\tstyle=\"width: 600px; height: 40px;\"\n\t\t\tname=\"coral_talk_base_url\"\n\t\t\tplaceholder=\"https://talk.my-site.com\"\n\t\t\tid=\"coral_talk_base_url\"\n\t\t\ttype=\"url\"\n\t\t\tvalue=\"<?php echo esc_url( get_option( 'coral_talk_base_url' ) ); ?>\"\n\t\t/>\n\t\t<?php\n\t}",
"public function url()\n\t{\n\t\t$this->addValidaterule('url', 'true');\n\t}",
"static function url($name, $value = '', $attributes = null) {\n if(empty($attributes)) {\n $attributes = array();\n } // if\n \n $attributes['type'] = 'url';\n $attributes['placeholder'] = 'http://';\n \n return self::input($name, $value, $attributes);\n }",
"function setURL($url, $type=\"\") {\r\n\t\t$key = \"URL\";\r\n\t\tif ($type!=\"\") $key.= \";$type\";\r\n\t\t$this->properties[$key] = $url;\r\n\t}",
"public function getTypeUrl() {}",
"public function getTypeUrl() {}",
"public static function url($url=\"\",$label=\"\",$type=\"\",$attribute=\"\")\n\t\t{\n\t\t\t$link = self::defineUrl($url,$type);\n\t\t\t$url = self::triggerUrl($url);\n\t\t\t\n\t\t\treturn \"<a href='\".$link.$url.\"' \".getutility::setString($attribute,\"\",\" \",\"=\",\"'\").\">\".$label.\"</a>\";\n\t\t}",
"public function url($name = null, $value = null, $attributes = null) {\n\t\t$this->attributes = $attributes;\n\t\n\t\t$this->result = null;\n\t\t$this->result .= '<input type=\"url\" name=\"'.$name.'\" value=\"'.$value.'\"';\n\t\t$this->result .= $this->get_attributes();\n\t\t$this->result .= '/>';\n\t\n\t\treturn $this->result;\n\t}",
"public function applicationURLField() {\n\t\tammm_get_template( 'Admin/Options/input-field', array(\n\t\t\t'field' => self::OPT_NAME . '[application_url]',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->options['application_url'],\n\t\t\t'desc' => 'Enter missions trip application url',\n\t\t\t'example' => 'https://your-app.com',\n\t\t) );\n\t}",
"public function url_callback() {\n printf( '<input type=\"text\" size=\"55\" id=\"url\" name=\"%s[url]\" value=\"\" />',\n $this->dataset_tab_group_name );\n }",
"function ee_mph_render__input($type, $slug, $placeholder = false, $class = 'bg-gray-200 text-lg appearance-none rounded-xl w-full pt-4 pb-4 px-6 leading-tight focus:outline-none focus:bg-white focus:border-black placeholder-gray')\n{\n\n $placeholder = ($placeholder) ? 'placeholder=\"' . $placeholder . '\"' : false;\n\n return '<input class=\"' . $class . ' gradient-border\" name=\"' . $slug . '\" type=\"' . $type . '\" ' . $placeholder . '>';\n}",
"public function setRequestTypeUrl($var) {}",
"function display_linkedin_element()\n{\n\t?>\n \t<input type=\"text\" name=\"linkedin_url\" id=\"linkedin_url\" value=\"<?php echo get_option('linkedin_url'); ?>\" size=\"50\"/>\n <?php\n}",
"public function _settings_field_kayako_url()\n\t{\n\n\t\tif (!empty($this->settings) && array_key_exists('kayako_url', $this->settings)) {\n\t\t\t$kayako_url = htmlspecialchars($this->settings['kayako_url']);\n\t\t}\n\t\t?>\n\t\t<input type=\"text\" name=\"kayako-settings[kayako_url]\" id=\"kayako-settings[kayako_url]\" size=\"60\" value=\"<?php echo $kayako_url; ?>\"/> <?php\n\t}",
"public function setUrl($value);",
"protected function getForm_Type_UrlService()\n {\n @trigger_error('The \"form.type.url\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.url'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType();\n }",
"function field_base_url_callback() {\n\t$fem_options = get_option( FEM_PREFIX . 'options' );\n\t?>\n\t<input\n\t\ttype=\"text\"\n\t\tname=\"<?= esc_attr( FEM_PREFIX . 'options' ) ?>[base_url]\"\n\t\tid=\"<?= esc_attr( FEM_PREFIX . 'options' ) ?>[base_url]\"\n\t\tvalue=\"<?= isset( $fem_options ) ? esc_attr( $fem_options['base_url'] ) : ''; ?>\"\n\t\tstyle=\"width:25em;\"\n\t>\n\t<?php\n}",
"public function testUrlType()\n { \n $type = new UrlType();\n $form = $this->factory->create($type);\n \n $formData = array(\n 'url' => 'http://google.es', \n );\n\n $form->submit($formData);\n\n $object = new Url('http://google.es');\n \n $this->assertTrue($form->isSynchronized());\n $this->assertEquals($object, $form->getData());\n\n $view = $form->createView();\n $children = $view->children;\n\n foreach (array_keys($formData) as $key) {\n $this->assertArrayHasKey($key, $children);\n }\n }",
"function display_twitter_element()\n{\n\t?>\n \t<input type=\"text\" name=\"twitter_url\" id=\"twitter_url\" value=\"<?php echo get_option('twitter_url'); ?>\" size=\"50\"/>\n <?php\n}",
"private function addChannelTextInput($url) {\r\n $textInput=$this->dom->createElement('textinput');\r\n $textInput->setAttribute('rdf:resource',$url);\r\n $this->channel->appendChild($textInput);\r\n }",
"public function setUrlAttribute($value)\n {\n $this->attributes['url'] = urldecode($value);\n }",
"function me_rb4_sanitize_customizer_url( $input ) {\n\treturn esc_url( $input );\n}",
"public static function getUrl(string $input, string $target_type = null, $options = []) {\n $url = null;\n\n // Internal Uri\n if (!empty($target_type) && $targetId = EntityAutocomplete::extractEntityIdFromAutocompleteInput($input)) {\n $entity = \\Drupal::entityTypeManager()->getStorage($target_type)->load($targetId);\n\n if ($entity !== null) {\n $url = $entity->toUrl('canonical', $options);\n }\n }\n // External Uri\n elseif (!empty($input)) {\n $url = Url::fromUri($input, $options);\n $url->setOption('external', true);\n }\n\n return $url;\n }",
"public function link($type='')\n\t{\n\t\t$link = 'index.php?option=com_tags&tag=' . $this->get('tag');\n\n\t\tswitch (strtolower($type))\n\t\t{\n\t\t\tcase 'edit':\n\t\t\t\t$link .= '&task=edit';\n\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$link .= '&task=delete';\n\t\t\tbreak;\n\n\t\t\tcase 'permalink':\n\t\t\tdefault:\n\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $link;\n\t}",
"public function isURL($input){\r\n return $this->typeof($input) == \"url\" ? true : false;\r\n }",
"public function resolveWidget() {\n if (in_array($this->type, ['file', 'select'])) {\n return 'form/' . $this->type;\n }\n return 'form/input';\n }",
"private static function get_font_src_per_type( $type, $url ) {\n\t\t\t$src = 'url(\\'' . esc_attr( $url ) . '\\') ';\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'woff':\n\t\t\t\tcase 'woff2':\n\t\t\t\tcase 'svg':\n\t\t\t\t\t$src .= 'format(\\'' . $type . '\\')';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ttf':\n\t\t\t\t\t$src .= 'format(\\'truetype\\')';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'eot':\n\t\t\t\t\t$src = 'url(\\'' . esc_attr( $url ) . '?#iefix\\') format(\\'embedded-opentype\\')';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $src;\n\t\t}"
] | [
"0.6321687",
"0.6280442",
"0.6280442",
"0.61970043",
"0.6003157",
"0.5997324",
"0.57399184",
"0.5638118",
"0.5638118",
"0.5605024",
"0.5585977",
"0.5580372",
"0.55734986",
"0.5502776",
"0.5473133",
"0.54295397",
"0.5405367",
"0.540407",
"0.5385703",
"0.5374581",
"0.53028774",
"0.5299106",
"0.526991",
"0.5261949",
"0.5260262",
"0.52305514",
"0.5226527",
"0.5219302",
"0.51940244",
"0.5191095"
] | 0.6967913 | 0 |
Test the user_has_attempt function. | public function test_user_has_attempt() {
global $DB;
$course = $this->generator->create_course();
$coursecontext = \context_course::instance($course->id);
$question = $this->attemptgenerator->create_embeddable_question('truefalse', null, [], ['contextid' => $coursecontext->id]);
$page = $this->generator->create_module('page', ['course' => $course->id,
'content' => '<p>Try this question: ' . $this->attemptgenerator->get_embed_code($question) . '</p>']);
$pagecontext = \context_module::instance($page->cmid);
// Create a student with an attempt at that question.
$user = $this->generator->create_user();
$this->generator->enrol_user($user->id, $course->id, 'student');
// Make the cache.
$cache = \cache::make(attempt_tracker::CACHE_COMPONENT,
attempt_tracker::CACHE_AREA);
// Verify that there is no cache at this time.
$this->assertFalse($cache->has($coursecontext->id));
// Verify that there is no attempt for the given context and user.
$this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));
$this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));
// Verify that now we have the cache at this time.
$this->assertTrue($cache->has($coursecontext->id));
// Verify that the value from the cache is False.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => false]
], $cache->get($coursecontext->id));
// Insert the dummy data to report_embedquestion_attempt table.
// We do not want to use create_attempt_at_embedded_question here because it will trigger the cache invalidation event.
$now = time();
$attemptinfo = [
'userid' => $user->id,
'contextid' => $pagecontext->id,
'embedid' => (string) $question->idnumber,
'questionusageid' => 1,
'pagename' => 'Test cache',
'pageurl' => (new \moodle_url('/report/embedquestion/activity.php'))->out_as_local_url(false),
'timecreated' => $now,
'timemodified' => $now
];
$DB->insert_record('report_embedquestion_attempt', (object) $attemptinfo);
// Verify that the value from the cache is still False.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => false],
], $cache->get($coursecontext->id));
// Verify that the function will get the value from the cache, not from the database.
$this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));
$this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));
// Invalidate the cache.
attempt_tracker::user_attempts_changed($pagecontext);
// Verify that the value from the cache is updated to True.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => true]
], $cache->get($coursecontext->id));
// Verify that the function will return the correct value.
$this->assertTrue(attempt_tracker::user_has_attempt($coursecontext->id));
$this->assertTrue(attempt_tracker::user_has_attempt($pagecontext->id));
// Remove the dummy data.
$DB->delete_records('report_embedquestion_attempt', ['questionusageid' => $attemptinfo['questionusageid']]);
// Verify that the value from the cache is still True.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => true]
], $cache->get($coursecontext->id));
// Verify that the function will get the value from the cache, not from the database.
$this->assertTrue(attempt_tracker::user_has_attempt($coursecontext->id));
$this->assertTrue(attempt_tracker::user_has_attempt($pagecontext->id));
// Invalidate the cache.
attempt_tracker::user_attempts_changed($pagecontext);
// Verify that the value from the cache is updated to True.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => false]
], $cache->get($coursecontext->id));
// Verify that the function will return the correct value.
$this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));
$this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasUser();",
"public function has_attempts()\n {\n return (bool) count($this->learner_attempts);\n }",
"public function test_adminExist()\n {\n $this->assertTrue(Auth::attempt($this->user));\n }",
"public function attempts()\n\t{\n\t\t$userId = $this->user['id'];\n\t\t$this->countAttempts = $this->user['login_attempts'];\n\t\t$this->countAttempts++;\n\n\t\tSession::set('blockUserData', $this->user['id']);\n\n\t\tif ( $this->countAttempts <= Config::get('login.attempts') ) {\n\t\t\t$updateUser = $this->newUpdate();\n\t\t\t$updateUser->executeUpdate('users', ['login_attempts' => $this->countAttempts], 'WHERE id = :id', \"id={$userId}\");\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function userMakesLoginAttempt(): bool\n {\n return isset($_POST[self::$login]);\n }",
"public function hasUser(): bool;",
"function checkuser() {\n\n return true;\n }",
"public function check() {\n return $this->hasUserInSession();\n }",
"function checkUserAccess() {\n\n if ($this->Session->check('Auth.Member')) {\n\n echo 'yes';\n } else {\n\n\n echo 'no';\n }\n\n exit;\n }",
"public function canSignup()\n {\n $attempt_key = $this->getSignupCacheName();\n\n return Cache::get($attempt_key, false);\n }",
"public function attemptLogin_succesful1()\n {\n $uid = 'elzenknopje';\n $passwd = 'idebian';\n $this->assertTrue($this->attemptLogin($uid, $passwd));\n }",
"function test_user() {\n\tif (isset($_SESSION['user'])) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}",
"public static function check()\n {\n return static::user() ? true : false;\n }",
"public function loginAttempt(){\n\t\treturn isset($_POST[self::$login]);\n\t}",
"public function check()\n {\n if (isset($_SESSION['user'])) {\n $active = User::find($_SESSION['user'])->active;\n if ($active) {\n return isset($_SESSION['user']);\n }\n }\n\n }",
"public function check(){\n return $this->user() != null;\n }",
"public function check_user(){\n return $this->user->check_user($this->data);\n }",
"public function checkbrute($user) {\n\t //Obtén timestamp en tiempo actual\n\t $now = time();\n\t //Todos los intentos de inicio de sesión son contados desde las 2 horas anteriores.\n\t $valid_attempts = $now - (2 * 60 * 60);\n\t $this->where('user_id', $user);\n\t $this->where('time',array('>' => $valid_attempts));\n\t if($this->get('login_attempts', NULL ,'time')== FALSE){\n\t\t //echo 'ES FALSE, NO HAY INTENTOS REGISTRADOS';\n\t\t return TRUE;\n\t\t}else{\n\t\t\treturn $this->count;\n\t\t\t}\n\t}",
"function checkAttempt($userName)\n {\n// echo $userName;\n// exit();\n if($userName) {\n if($this->session->userdata('loginCountAttempt') < 5)\n {\n if($userName == $this->session->userdata('PrevUsername'))\n {\n $count = $this->session->userdata('loginCountAttempt');\n $total = $count+1;\n $this->session->set_userdata('loginCountAttempt', $total);\n return false;\n }\n else\n {\n $this->session->set_userdata('loginCountAttempt', 1);\n $this->session->set_userdata('PrevUsername', $userName);\n return false;\n }\n }\n else\n {\n return true;\n }\n }\n else{\n $this->session->set_userdata('PrevUsername', $userName);\n $this->session->set_userdata('loginCountAttempt', 0);\n return false;\n }\n }",
"protected function checkAccess()\n\t{\n\t\treturn UserFactory::auth()->checkAccess([\n\t\t\t'user_id' => $this->getInvoice()->user_id,\n\t\t\t'ip' => $this->getInvoice()->user_ip,\n\t\t]);\n\t}",
"public function check()\r\n {\r\n return ! is_null($this->user());\r\n }",
"public function userCheck($acronym)\r\n {\r\n $user = $_SESSION[\"acronym\"];\r\n if ($user == $acronym) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function hasUserLoginSucceed()\n {\n return $this->getFailedRegistration() == self::REGISTRATION_STEP_USER_LOGIN_SUCCESS;\n }",
"private function verifyUser() {\n\t\t//TODO: add logic to check if a user is authorised to edit/view something\n\t\tif(isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function _hasAccess()\r\n {\r\n // create user object\r\n $user =& User::singleton();\r\n\r\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\r\n $candID = $timePoint->getCandID();\r\n\r\n $candidate =& Candidate::singleton($candID);\r\n\r\n // check user permissions\r\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\r\n }",
"function verify_user(){\n \n \n }",
"function quiz_user_complete($course, $user, $mod, $quiz) {\n/// a given particular instance of this module, for user activity reports.\n\n if ($attempts = get_records_select('quiz_attempts', \"userid='$user->id' AND quiz='$quiz->id'\", 'attempt ASC')) {\n if ($quiz->grade and $quiz->sumgrades && $grade = get_record('quiz_grades', 'userid', $user->id, 'quiz', $quiz->id)) {\n echo get_string('grade').': '.round($grade->grade, $quiz->decimalpoints).'/'.$quiz->grade.'<br />';\n }\n foreach ($attempts as $attempt) {\n echo get_string('attempt', 'quiz').' '.$attempt->attempt.': ';\n if ($attempt->timefinish == 0) {\n print_string('unfinished');\n } else {\n echo round($attempt->sumgrades, $quiz->decimalpoints).'/'.$quiz->sumgrades;\n }\n echo ' - '.userdate($attempt->timemodified).'<br />';\n }\n } else {\n print_string('noattempts', 'quiz');\n }\n\n return true;\n}",
"public function check(): bool\n {\n return $this->hasUserInSession();\n }",
"public static function checkAuth() {\n return isset($_SESSION['user']);\n }",
"private function isActived(){\n $user = $this->getUser();\n return $user->activedMe ? true : false;\n }"
] | [
"0.64309824",
"0.63989383",
"0.63855565",
"0.6351331",
"0.6324392",
"0.622887",
"0.6210388",
"0.61833054",
"0.61216486",
"0.6103067",
"0.6099983",
"0.6090972",
"0.6061722",
"0.6052404",
"0.6015291",
"0.59779",
"0.5952802",
"0.59433544",
"0.5925994",
"0.5924615",
"0.5906161",
"0.5901378",
"0.5891083",
"0.58690363",
"0.5857826",
"0.58396256",
"0.58333045",
"0.58324885",
"0.58085227",
"0.5801638"
] | 0.71600866 | 0 |
Test the user_has_attempt function with old cache hierarchy. | public function test_user_has_attempt_with_old_cache_hierarchy() {
$course = $this->generator->create_course();
$coursecontext = \context_course::instance($course->id);
$question = $this->attemptgenerator->create_embeddable_question('truefalse', null, [], ['contextid' => $coursecontext->id]);
$page = $this->generator->create_module('page', ['course' => $course->id,
'content' => '<p>Try this question: ' . $this->attemptgenerator->get_embed_code($question) . '</p>']);
$pagecontext = \context_module::instance($page->cmid);
// Create a student with an attempt at that question.
$user = $this->generator->create_user();
$this->generator->enrol_user($user->id, $course->id, 'student');
// Make the cache.
$cache = \cache::make(attempt_tracker::CACHE_COMPONENT,
attempt_tracker::CACHE_AREA);
// Verify that there is no cache at this time.
$this->assertFalse($cache->has($coursecontext->id));
// Create old cache hierarchy.
$cache->set($coursecontext->id, ['value' => false]);
// Verify that there is no attempt for the given context and user.
$this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));
// Verify the cache hierarchy will be converted to the new one.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => false]
], $cache->get($coursecontext->id));
// Create old cache hierarchy.
$cache->set($coursecontext->id, ['value' => false]);
// Verify that there is no attempt for the given context and user.
$this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));
// Verify the cache hierarchy will be converted to the new one.
$this->assertEquals([
'value' => false,
'subcontext' => [$pagecontext->id => false]
], $cache->get($coursecontext->id));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_user_has_attempt() {\n global $DB;\n\n $course = $this->generator->create_course();\n $coursecontext = \\context_course::instance($course->id);\n $question = $this->attemptgenerator->create_embeddable_question('truefalse', null, [], ['contextid' => $coursecontext->id]);\n $page = $this->generator->create_module('page', ['course' => $course->id,\n 'content' => '<p>Try this question: ' . $this->attemptgenerator->get_embed_code($question) . '</p>']);\n $pagecontext = \\context_module::instance($page->cmid);\n\n // Create a student with an attempt at that question.\n $user = $this->generator->create_user();\n $this->generator->enrol_user($user->id, $course->id, 'student');\n\n // Make the cache.\n $cache = \\cache::make(attempt_tracker::CACHE_COMPONENT,\n attempt_tracker::CACHE_AREA);\n\n // Verify that there is no cache at this time.\n $this->assertFalse($cache->has($coursecontext->id));\n\n // Verify that there is no attempt for the given context and user.\n $this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));\n $this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));\n\n // Verify that now we have the cache at this time.\n $this->assertTrue($cache->has($coursecontext->id));\n // Verify that the value from the cache is False.\n $this->assertEquals([\n 'value' => false,\n 'subcontext' => [$pagecontext->id => false]\n ], $cache->get($coursecontext->id));\n\n // Insert the dummy data to report_embedquestion_attempt table.\n // We do not want to use create_attempt_at_embedded_question here because it will trigger the cache invalidation event.\n $now = time();\n $attemptinfo = [\n 'userid' => $user->id,\n 'contextid' => $pagecontext->id,\n 'embedid' => (string) $question->idnumber,\n 'questionusageid' => 1,\n 'pagename' => 'Test cache',\n 'pageurl' => (new \\moodle_url('/report/embedquestion/activity.php'))->out_as_local_url(false),\n 'timecreated' => $now,\n 'timemodified' => $now\n ];\n $DB->insert_record('report_embedquestion_attempt', (object) $attemptinfo);\n\n // Verify that the value from the cache is still False.\n $this->assertEquals([\n 'value' => false,\n 'subcontext' => [$pagecontext->id => false],\n ], $cache->get($coursecontext->id));\n // Verify that the function will get the value from the cache, not from the database.\n $this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));\n $this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));\n\n // Invalidate the cache.\n attempt_tracker::user_attempts_changed($pagecontext);\n\n // Verify that the value from the cache is updated to True.\n $this->assertEquals([\n 'value' => false,\n 'subcontext' => [$pagecontext->id => true]\n ], $cache->get($coursecontext->id));\n // Verify that the function will return the correct value.\n $this->assertTrue(attempt_tracker::user_has_attempt($coursecontext->id));\n $this->assertTrue(attempt_tracker::user_has_attempt($pagecontext->id));\n\n // Remove the dummy data.\n $DB->delete_records('report_embedquestion_attempt', ['questionusageid' => $attemptinfo['questionusageid']]);\n\n // Verify that the value from the cache is still True.\n $this->assertEquals([\n 'value' => false,\n 'subcontext' => [$pagecontext->id => true]\n ], $cache->get($coursecontext->id));\n // Verify that the function will get the value from the cache, not from the database.\n $this->assertTrue(attempt_tracker::user_has_attempt($coursecontext->id));\n $this->assertTrue(attempt_tracker::user_has_attempt($pagecontext->id));\n\n // Invalidate the cache.\n attempt_tracker::user_attempts_changed($pagecontext);\n\n // Verify that the value from the cache is updated to True.\n $this->assertEquals([\n 'value' => false,\n 'subcontext' => [$pagecontext->id => false]\n ], $cache->get($coursecontext->id));\n // Verify that the function will return the correct value.\n $this->assertFalse(attempt_tracker::user_has_attempt($coursecontext->id));\n $this->assertFalse(attempt_tracker::user_has_attempt($pagecontext->id));\n }",
"public function attempts()\n\t{\n\t\t$userId = $this->user['id'];\n\t\t$this->countAttempts = $this->user['login_attempts'];\n\t\t$this->countAttempts++;\n\n\t\tSession::set('blockUserData', $this->user['id']);\n\n\t\tif ( $this->countAttempts <= Config::get('login.attempts') ) {\n\t\t\t$updateUser = $this->newUpdate();\n\t\t\t$updateUser->executeUpdate('users', ['login_attempts' => $this->countAttempts], 'WHERE id = :id', \"id={$userId}\");\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function checkAttempt($userName)\n {\n// echo $userName;\n// exit();\n if($userName) {\n if($this->session->userdata('loginCountAttempt') < 5)\n {\n if($userName == $this->session->userdata('PrevUsername'))\n {\n $count = $this->session->userdata('loginCountAttempt');\n $total = $count+1;\n $this->session->set_userdata('loginCountAttempt', $total);\n return false;\n }\n else\n {\n $this->session->set_userdata('loginCountAttempt', 1);\n $this->session->set_userdata('PrevUsername', $userName);\n return false;\n }\n }\n else\n {\n return true;\n }\n }\n else{\n $this->session->set_userdata('PrevUsername', $userName);\n $this->session->set_userdata('loginCountAttempt', 0);\n return false;\n }\n }",
"public function handleInvalidLoginAttempts($username){\n $userRow = \\R::findOne('users','email=:ui OR user_name = :ui',array(':ui'=>$username));\n if($userRow && $userRow->locked == 0){\n $objRequest = new \\utilities\\Request();\n $login_attempts_left = 0;\n // check if user has already login attemps \n $userLoginAttemptsRow = \\R::findOne($this->_name,'user_id = :ui',array(':ui'=>$userRow->id));\n if($userLoginAttemptsRow){\n \n // lock user account if login attempts are =5\n if($userLoginAttemptsRow->invalid_login_attempts == 5){\n $userRow->locked = 1;\n $userRow->locked_status_updatetime = time();\n $this->_redBeans->store($userRow);\n return 0;\n }\n //else modify ther required details in user_login_attempts_table\n $invalidLoginAttempts = $userLoginAttemptsRow->invalid_login_attempts+1;\n $userLoginAttemptsRow->user_id = $userRow->id; \n $userLoginAttemptsRow->last_attempt = time(); \n $userLoginAttemptsRow->invalid_login_attempts = $invalidLoginAttempts;\n $userLoginAttemptsRow->ipaddress = inet_pton($objRequest->getServer('REMOTE_ADDR')); // ip address for tracking\n $login_attempts_left = 5-$invalidLoginAttempts;\n }\n //insert new row\n else{\n $userLoginAttemptsRow = $this->_redBeans->dispense($this->_name);\n $userLoginAttemptsRow->user_id = $userRow->id; \n $userLoginAttemptsRow->last_attempt = time(); \n $userLoginAttemptsRow->invalid_login_attempts = 1;\n $userLoginAttemptsRow->ipaddress = inet_pton($objRequest->getServer('REMOTE_ADDR')); // ip address for tracking\n $login_attempts_left = 4;\n }\n \n $this->_redBeans->store($userLoginAttemptsRow);\n return $login_attempts_left;\n }\n return false;\n }",
"public function update_failed_attempt(){\n\t\t$user_id = $this->ion_auth->user()->row()->id;\n\t\t$this->login_model->login_failed_attempts_success($user_id); \n\t\n\t}",
"function increment_attempts() {\n $attempts = 0;\n\n $db = new database();\n $db->dblink();\n\n $result = $db->get_recs(\"login_attempts\",\n \"ip,\n attempts\",\n \"ip='{$this->ip}'\");\n\n $recs = $db->fetch_objects($result);\n\n if(is_array($recs)) {\n $attempts = $recs[0]->attempts;\n } else {\n $attempts = $recs->attempts;\n } // end if\n\n if($attempts >= $this->max_attempts) {\n // number of attempts exceeded\n return false;\n } // end if\n\n $attempts++;\n\n $result = $db->db_update(\"login_attempts\",\n \"attempts='{$attempts}'\",\n \"ip='{$this->ip}'\");\n return true;\n }",
"public function viaRemember()\n {\n // Nothing need to do for this function. Just call $this->user() is enough\n return false;\n }",
"static function needUpgrade($user) {\n\t\t$cacheVersion = (int)\\OCP\\Config::getUserValue($user, 'files', 'cache_version', 4);\n\t\tif ($cacheVersion < 5) {\n\t\t\t$legacy = new \\OC\\Files\\Cache\\Legacy($user);\n\t\t\tif ($legacy->hasItems()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tself::upgradeDone($user);\n\t\t}\n\n\t\treturn false;\n\t}",
"public function accountTemporarilyLocked()\n {\n if (($this->getLastLoginAttempt('U') +\n sfConfig::get('app_sf_easy_auth_lockout_duration')) > time())\n {\n if ($this->getFailedLogins() >= sfConfig::get('app_sf_easy_auth_login_attempt_threshold'))\n {\n return true;\n }\n }\n\n return false;\n }",
"function CheckBrute($userid){\n\t\t$now = time();\n\t\t//all login attempts are counted from the past 2 hours\n\t\t$valid_attempts = $now - (2 * 60 * 60);\n\t\t\n\t\t$sql = \"Select time From tbl_login_attempts Where User_ID = :User_ID And time > '\" .$valid_attempts .\"'\";\n\t\t$query = $this->_database->prepare($sql);\n\t\t$query->execute(array(\":User_ID\" => $userid));\n\t\t\n\t\tif($query->rowCount() > 5){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function increaseAttempt()\n {\n $attempt_key = $this->getAttemptCacheName();\n $attempts = Cache::get($attempt_key, 0);\n\n $throttle_time_period = $this->getCredential('throttle_time_period', 10);\n\n // used throttling login attempts\n Cache::put($attempt_key, $attempts + 1, $throttle_time_period);\n }",
"private function loginAttempt( $passed = false )\n\t{\n\t\t//\n\t\t$ip_address = $this->input->ip_address(); \n\n\t\t// If the user logged in with success.\n\t\t//\n\t\tif ( $passed ):\n\t\t\t\t// Clear this user loginAttempts.\n\t\t\t\t//\n\t\t\t\t$this->db->where('ip_address', $ip_address)->update('login_attempts', array( 'attempts' => 0, 'lastLogin' => time() ) );\n\n\t\t// This is a failed login attempt.\n\t\t//\n\t\telse:\n\t\t\t\t// Check if we have the user record.\n\t\t\t\t//\n\t\t\t\t$record = $this->db->where('ip_address', $ip_address)->get('login_attempts')->row();\n\t\t\t\tif ( empty( $record ) ):\n\t\t\t\t\t\t// Create the user record.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t$this->db->insert('login_attempts', array( 'ip_address' => $ip_address, 'attempts' => 1, 'lastLogin' => time() ) );\n\n\t\t\t\t// We do, check if the user needs to be blocked.\n\t\t\t\t//\n\t\t\t\telse:\n\t\t\t\t\t\t// The user exceeded the login attempts.\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif ( $record->attempts < 5 ):\n\t\t\t\t\t\t\t\t// Update the user record.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$this->db->where('ip_address', $ip_address)->update('login_attempts', array( 'attempts' => ( $record->attempts + 1), 'lastLogin' => time() ) );\n\t\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\tendif;\n\n\t\t// We are done here.\n\t\t//\n\t\treturn true;\n\t}",
"public function checkbrute($user) {\n\t //Obtén timestamp en tiempo actual\n\t $now = time();\n\t //Todos los intentos de inicio de sesión son contados desde las 2 horas anteriores.\n\t $valid_attempts = $now - (2 * 60 * 60);\n\t $this->where('user_id', $user);\n\t $this->where('time',array('>' => $valid_attempts));\n\t if($this->get('login_attempts', NULL ,'time')== FALSE){\n\t\t //echo 'ES FALSE, NO HAY INTENTOS REGISTRADOS';\n\t\t return TRUE;\n\t\t}else{\n\t\t\treturn $this->count;\n\t\t\t}\n\t}",
"function checkbrute($user_id, $mysqli) {\n // Get timestamp of current time \n $now = time();\n \n // All login attempts are counted from the past 2 hours. \n $valid_attempts = $now - (2 * 60 * 60);\n \n if ($stmt = $mysqli->prepare(\"SELECT time \n FROM login_attempts \n WHERE user_id = ? \n AND time > '$valid_attempts'\")) {\n $stmt->bind_param('i', $user_id);\n \n // Execute the prepared query. \n $stmt->execute();\n $stmt->store_result();\n \n // If there have been more than 5 failed logins \n if ($stmt->num_rows > 5) {\n return true;\n } else {\n return false;\n }\n }\n}",
"public function update_login_attempts(){\n $ip_address = ip_address(); \n $query = $this->db\n \t\t\t->where('ip_address', $ip_address)\n \t\t\t->where('timestamp >=', date(\"'Y-m-d - h:i:s A\", strtotime(\"-\" . '5 minutes')))\n \t\t\t->get(db_prefix().'login_attempts');\n\n if ($query->num_rows() == 0){\n $data['ip_address'] = $ip_address;\n $data['timestamp'] = set_date();\n $data['login_attempts'] = 1;\n $this->db->insert(db_prefix().'login_attempts', $data);\n return TRUE;\n } \n\n if ($query->num_rows() >0){\n $row = $query->row();\n $data['timestamp'] = set_date();\n $data['login_attempts'] = $row->login_attempts + 1;\n \n $this->db->where('id', $row->id)->update(db_prefix().'login_attempts', $data);\n\n if ($data['login_attempts'] > 5){\n return FALSE;\n } else {\n return TRUE;\n }\n }\n\n }",
"function checkbrute($user_id, $mysqli) {\r\n $now = time();\r\n\r\n // Todos los intentos de login son contados desde las dos horas anteriores.\r\n $valid_attempts = $now - (2 * 60 * 60);\r\n \r\n if ($stmt = $mysqli->prepare(\"SELECT time \r\n FROM login_attempts \r\n WHERE user_id = ? \r\n AND time > '$valid_attempts'\")) {\r\n $stmt->bind_param('i', $user_id);\r\n \r\n // Ejecuta la sentencia preparada.\r\n $stmt->execute();\r\n $stmt->store_result();\r\n \r\n // Si ha habido más de cinco intentos de login\r\n if ($stmt->num_rows > 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n}",
"function checkReattempt( $enrollmentid ){\n\t\t$this->CoursesEnrollment->id = $enrollmentid;\n\t\t$this->is_reattempt = $this->isReattempt( $enrollmentid );\n\t\treturn;\n\t}",
"function reset_login_failure_count($user_guid) {\n\t$user_guid = (int)$user_guid;\n\t$user = get_entity($user_guid);\n\n\tif (($user_guid) && ($user) && ($user instanceof ElggUser)) {\n\t\t$fails = (int)$user->getPrivateSetting(\"login_failures\");\n\n\t\tif ($fails) {\n\t\t\tfor ($n = 1; $n <= $fails; $n++) {\n\t\t\t\t$user->removePrivateSetting(\"login_failure_$n\");\n\t\t\t}\n\n\t\t\t$user->removePrivateSetting(\"login_failures\");\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// nothing to reset\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"public function access() {\n $result = AccessResult::allowedIf(\n $this->requestStack->getCurrentRequest()->getSession()->get('menu_test', 0) < 2\n );\n return $result->setCacheMaxAge(0);\n }",
"protected function restoreAccessToken() {\n\n if ($this->hasState('uid') && parent::restoreAccessToken()) {\n $this->uid = $this->getState('uid');\n\n return true;\n }\n else {\n $this->uid = null;\n return false;\n }\n \n }",
"public function isRemembered()\n\t\t{\n\t\t}",
"public function incrementLoginAttempts();",
"public function hasTooManyLoginAttempts();",
"function menu_is_cached(){\n\t\tglobal $mydir;\n\t\treturn(!(\n\t\t\tarray_key_exists($mydir,$_SESSION) && \n\t\t\tarray_key_exists('usr',$_SESSION[$mydir]) && \n\t\t\t!array_key_exists(\"_privileges_menu\",$_SESSION[$mydir]['usr'])));\n\t}",
"public function resetAttempt($email)\n {\n if (empty($email) === false) {\n $user = $this->find(\n 'first',\n array(\n 'fields' => array(\n 'User.email',\n 'User.access_attempts',\n )\n ),\n array(\n 'conditions' => array('User.email' => $email)\n )\n );\n\n if (empty($user) === false) {\n $this->updateAll(\n array(\n 'User.access_attempts' => (int) 0,\n ),\n array('User.email' => $user['User']['email'])\n );\n\n return $user['User']['access_attempts'];\n }//end if\n\n }//end if\n\n }",
"private function check_access()\n {\n }",
"public function addTemporarilyLoginAttempt(): void;",
"function block_userquiz_monitor_get_exam_attempts($quizid) {\n global $DB, $USER;\n\n // Get user's attempts list.\n $sql = \"\n SELECT\n distinct(ua.id),\n ua.uniqueid,\n ua.timefinish\n FROM\n {quiz_attempts} ua\n WHERE\n ua.userid = ? AND\n ua.timefinish <> 0 AND\n ua.quiz = ?\n ORDER BY\n ua.timefinish ASC\n \";\n return $DB->get_records_sql($sql, array($USER->id, $quizid));\n}",
"function fulladmincheck($user) {\n if (!$user->moderator) return false;\n //THIS is the full check part\n global $db, $db_prefix, $_COOKIE;\n $userdata = cookie_decode($_COOKIE[\"btuser\"]);\n if ($userdata[0] != $user->id) return false;\n if (addslashes($userdata[1]) != $user->name) return false;\n $sql = \"SELECT id FROM \".$db_prefix.\"_users WHERE id = '\".$user->id.\"' AND username = '\".$user->name.\"' AND level = 'moderator' AND act_key = '\".addslashes($userdata[3]).\"' AND password = '\".addslashes($userdata[2]).\"';\";\n $res = $db->sql_query($sql) or btsqlerror($sql);\n $n1 = $db->sql_numrows($res);\n $db->sql_freeresult($res);\n if (!$n1) {\n $sql = \"SELECT id FROM \".$db_prefix.\"_users WHERE id = '\".$user->id.\"' AND username = '\".$user->name.\"' AND level = 'admin' AND act_key = '\".addslashes($userdata[3]).\"' AND password = '\".addslashes($userdata[2]).\"';\";\n $res = $db->sql_query($sql) or btsqlerror($sql);\n $n2 = $db->sql_numrows($res);\n $db->sql_freeresult($res);\n if (!$n2) return false;\n\t\t}\n return true;\n}",
"public function checkAccess() { return true; }"
] | [
"0.66880804",
"0.6075311",
"0.57260233",
"0.55540484",
"0.54398334",
"0.5393016",
"0.5348369",
"0.5342269",
"0.532746",
"0.5318913",
"0.53074574",
"0.52549005",
"0.52391696",
"0.52297926",
"0.5195768",
"0.5187524",
"0.5177809",
"0.5174208",
"0.5130938",
"0.5127828",
"0.5118276",
"0.51088446",
"0.5106373",
"0.50990593",
"0.50932765",
"0.50919884",
"0.50890845",
"0.508555",
"0.50754654",
"0.50639075"
] | 0.7846286 | 0 |
requests a Two Legged access token from the API | public function requestTwoLeggedAccessToken(){
if($this->defaultAccessToken == null ||
($this->defaultAccessToken != null
&& $this->defaultAccessToken->isExpired())) {
$params = ['scope' => static::TWO_LEGGED_SCOPE, 'grant_type' => static::CLIENT_CREDENTIALS_GRANT_TYPE];
$request = $this->request('POST', 'oauth/token', $params, null, null, $this->defaultApiVersion);
return $this->lastResponse = $this->client->sendRequest($request);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getToken(){\n $baerer = base64_encode(Funciones::$app_id . \":\". Funciones::$app_secret);\n\n $response = Curl::to('https://v2.api.xapo.com/oauth2/token')\n ->withContentType('application/x-www-form-urlencoded')\n ->withHeader('Authorization: Basic '.$baerer)\n ->withData( array( 'grant_type' => 'client_credentials','redirect_uri' => Funciones::$redirect_uri ) )\n ->post();\n\n return $response;\n }",
"private function _getToken()\r\n\t{\r\n\t\t$this->_http->resetHelper();\r\n\t\t$this->_setDefaultHeaders();\r\n\t\t$this->_http->setUrl($this->_createApiUrl(\"oauth2/token\"));\r\n\t\t$this->_http->setAuthentication($this->_client_id . \":\" . $this->_client_secret);\r\n\t\t$this->_http->setBody(\"grant_type=client_credentials\");\r\n\t\t$returnData = $this->_http->sendRequest();\r\n\t\t$this->_token = $returnData['access_token'];\r\n\t}",
"function getAccessToken();",
"public function getOAuthToken() {\n\t\t$url = $this->apiBaseURL . \"oauth2/token\";\n\n\t\t// if (!isset($_SESSION)) session_start();\n\t\t// if (!empty($_SESSION[\"sn_access_token\"])) {\n\n\t\t\t\n\t\t// \t$header = array('Accept:application/json','Authorization: Bearer ' . $_SESSION[\"sn_access_token\"]);\n\t\t// \t$response = self::makeCurlRequest ($url, $header, \"\", false);\n\t\t// \tif (!empty($response)) {\n\t\t// \t\t$json_response = json_decode($response);\n\t\t// \t\tif (isset($json_response->access_token)) {\n\t\t// \t\t\t$_SESSION[\"sn_access_token\"] = $json_response->access_token;\n\t\t// \t\t\treturn $_SESSION[\"sn_access_token\"];\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\t/* Get a new access key */\n\t\t$header = array('Accept:application/json','Authorization: Basic ' . $this->encodedCredentials); \n\n\t\t$username = $this->fromEmail;\n\t\t$grant_type = \"password\";\n\t\t$password = $this->password;\n\t\t$scope = \"*\";\n\n\t\t$parameters = array('username'=> $username,'password' => $password, 'grant_type'=> $grant_type,'scope'=> $scope);\n\n\t\t$response = self::makeCurlRequest ($url, $header, $parameters);\n\t\t$json_response = json_decode($response);\n\n\t\t// echo \"<pre>\";\n\t\t// print_r($json_response);\n\t\t// echo \"</pre>\";\n\n\t\tif (!isset($_SESSION)) session_start();\n\t\t$_SESSION[\"sn_access_token\"] = $json_response->access_token;\n\n\t\treturn $_SESSION[\"sn_access_token\"];\n\t\t//return $json_response;\n\t}",
"public function getSdk2($oauth_token, $oauth_token_secret);",
"public function getAccessToken();",
"public function getAccessToken();",
"public function getAccessToken();",
"public function getAccessToken();",
"public function getAccessToken();",
"abstract public function getAccessToken();",
"private static function obtain_token() {\n\t\tglobal $CFG;\n\n\t\t$url = \"https://api.hipchat.com/v2/oauth/token\";\n\n\t\t$ch = curl_init();\n\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $CFG->oauth_id . \":\" . $CFG->oauth_secret);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"grant_type=client_credentials&scope=admin_room\");\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\n\n\t\t$body = curl_exec($ch);\n\t\t$data = json_decode($body);\n\n\t\tif (isset($data->access_token)) {\n\t\t\treturn $data->access_token;\n\t\t}\n\t}",
"abstract function getAccessToken();",
"final protected function requestToken() {\n // Get request info for token request.\n $httpParams = $this->prepareTokenRequest(\n $this->getFlowId(),\n $this->params['scope']);\n\n // Make the http request.\n try {\n $request = new HTTPRequest($this->params['token_endpoint'],$httpParams);\n $response = $request->makeRequest();\n } catch (Exception $e) {\n throw new OAuth2Exception(\n $e->getMessage(),\n OAuth2Exception::OAUTH_EXCEPTION_BAD_REQUEST);\n }\n\n // Throw exception if response was not 200.\n if ($response->statusCode != 200) {\n $message = __METHOD__ . ': remote server did not grant access token: '\n . \"got $response->statusCode\";\n $ex = new OAuth2Exception($message,OAuth2Exception::OAUTH_EXCEPTION_FAILED_REQUEST);\n $ex->errorData = json_decode($response->data);\n throw $ex;\n }\n\n // Decode the response payload as a PHP array.\n $tok = json_decode($response->data,true);\n\n // Calculate the token's expiration time.\n $tok['expiration_time'] = $_SERVER['REQUEST_TIME'] + $tok['expires_in'];\n\n return $tok;\n }",
"function get_access_token() {\r\n global $api_clientId, $api_secret, $host; //los datos del usuario API\r\n\r\n $postFields= 'grant_type=client_credentials';\r\n $url = $host.'/v1/oauth2/token'; //endpoint de dond obtener\r\n\r\n $curl = curl_init($url); \r\n curl_setopt($curl, CURLOPT_POST, true); \r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($curl, CURLOPT_USERPWD, $api_clientId . \":\" . $api_secret);\r\n curl_setopt($curl, CURLOPT_HEADER, false); \r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); \r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); \r\n curl_setopt($curl, CURLOPT_VERBOSE, TRUE);\r\n $response = curl_exec( $curl );\r\n if (empty($response)) {\r\n // some kind of an error happened\r\n die(curl_error($curl));\r\n curl_close($curl); // close cURL handler\r\n } else {\r\n $info = curl_getinfo($curl);\r\n curl_close($curl); // close cURL handler\r\n if($info['http_code'] != 200 && $info['http_code'] != 201 ) {\r\n echo \"Received error: \" . $info['http_code']. \"\\n\";\r\n echo \"Raw response:\".$response.\"\\n\";\r\n die();\r\n }\r\n }\r\n\r\n // Convert the result from JSON format to a PHP array \r\n $jsonResponse = json_decode( $response );\r\n return $jsonResponse->access_token;\r\n}",
"public function getOauthAccessToken();",
"protected function generateToken() {\n\t\t$server = $this->getServer();\n\n\t\t// Handle a request for an OAuth2.0 Access Token and send the response to the client\n\t\treturn $server->handleTokenRequest(Request::createFromGlobals())->send();\n\t}",
"function get_access_token($rt_key,$rt_secret){\n $params = array();\n global $accesstoken_url;\n global $sign_method;\n $tmp_token = new OAuthToken($rt_key,$rt_secret);\n $oauth_request = OAuthRequest::from_consumer_and_token($this->consumer,$tmp_token,\"GET\",$accesstoken_url,$params);\n $oauth_request->sign_request($sign_method,$this->consumer,$tmp_token);\n return $this->fetch_token($oauth_request);\n }",
"public function getToken(){\n\t $url = \\Drupal::state()->get('endpoint');\n\t\t$data = array('grant_type' => 'client_credentials', 'client_id' => \\Drupal::state()->get('cliend_id'),'client_secret' => \\Drupal::state()->get('cliend_secret'));\n\n\t\t// use key 'http' even if you send the request to https://...\n\t\t$options = array(\n\t\t 'http' => array(\n\t\t 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t 'method' => 'POST',\n\t\t 'content' => http_build_query($data)\n\t\t )\n\t\t);\n\t\t$context = stream_context_create($options);\n\t\t$result = file_get_contents($url, false, $context);\n\t $params = explode('\",\"',file_get_contents($url, false, $context));\n\n\t $token = explode('\":\"',array_shift($params));\n return $token[true];\n }",
"public function get_token()\n {\n $clientID = $this->clientID;\n $clientSecret = $this->clientSecret;\n\n $auth = $clientID . ':' . $clientSecret;\n $basic_token = 'Basic ' . base64_encode($auth);\n\n $client = new Client();\n\n try {\n $response = $client->post(\n $this->host . '/oauth/v2/token', [\n 'form_params' => [\n 'grant_type' => 'client_credentials',\n ],\n\n 'headers' => [\n 'Authorization' => $basic_token,\n 'Content-Type' => 'application/x-www-form-urlencoded'\n ]\n ]\n );\n\n $data = json_decode($response->getBody(), true);\n\n return $data['access_token'];\n\n } catch (RequestException $ex) {\n abort(501, $ex->getMessage());\n }\n }",
"protected function liveToken()\n {\n $url = 'https://api.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n $curl = curl_init();\n curl_setopt( $curl, CURLOPT_URL, $url );\n $credentials = base64_encode( $this -> key.':'.$this -> secret );\n curl_setopt( $curl, CURLOPT_HTTPHEADER, [ 'Authorization: Basic '.$credentials ] );\n curl_setopt( $curl, CURLOPT_HEADER, false );\n curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );\n\n $curl_response = curl_exec( $curl );\n\n return json_decode( $curl_response ) -> access_token;\n }",
"function get_access_token(){\r\r\n\r\r\n if(empty($_REQUEST['code'])) exit(false);\r\r\n\r\r\n require_once akd_importer()->plugin_dir . 'lib/Dropbox/autoload.php';\r\r\n\r\r\n $accessToken = get_transient('akd-dropbox-access-token');\r\r\n\r\r\n if(!$accessToken){\r\r\n $appInfo = \\Dropbox\\AppInfo::loadFromJson($this->config);\r\r\n $webAuth = new \\Dropbox\\WebAuthNoRedirect($appInfo,'PHP-Example/1.0');\r\r\n list($accessToken, $dropboxUserId) = $webAuth->finish($_REQUEST['code']);\r\r\n\r\r\n if ($accessToken){\r\r\n set_transient('akd-dropbox-access-token', $accessToken, 3500);\r\r\n set_transient('akd-dropbox-code', $_REQUEST['code'], 3500);\r\r\n }\r\r\n }\r\r\n\r\r\n exit($accessToken);\r\r\n }",
"protected function sandBoxToken()\n {\n $url = 'https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n $curl = curl_init();\n curl_setopt( $curl, CURLOPT_URL, $url );\n $credentials = base64_encode( $this -> key.':'.$this -> secret );\n curl_setopt( $curl, CURLOPT_HTTPHEADER, [ 'Authorization: Basic '.$credentials ] );\n curl_setopt( $curl, CURLOPT_HEADER, false );\n curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );\n\n $curl_response = curl_exec( $curl );\n\n return json_decode( $curl_response ) -> access_token;\n }",
"protected function get_access_token() {\n\n\t\tif ( 'access' !== $this->status )\n\t\t\treturn;\n\n\t\t$this->request_method = $this->settings->access_token_method;\n\t\t$this->request_url = $this->settings->access_token_url;\n\t\t$this->build_request_parameter();\n\t\t$http = new self::$http_adapter();\n\n\t\tif ( $this->param_in_header ) {\n\t\t\t$url = $this->settings->access_token_url;\n\t\t\t$headers = $this->get_header();\n\t\t} else {\n\t\t\t$url = $this->settings->access_token_url . '?' . $this->get_query_string();\n\t\t\t$headers = array();\n\t\t}\n\t\t$reply = call_user_func_array(\n\t\t\tarray( $http, $this->request_method ),\n\t\t\tarray( $url, $headers )\n\t\t);\n\n\t\tif ( 200 == $reply[ 'response' ][ 'code'] ) {\n\t\t\t$response = array();\n\t\t\tparse_str( $reply[ 'body' ], $response );\n\t\t\t$this->oauth_access_token = $response[ 'oauth_token' ];\n\t\t\t$this->oauth_access_secret = $response[ 'oauth_token_secret' ];\n\t\t\t$this->status = 'signed_in';\n\t\t}\n\t}",
"public function obtainToken()\n {\n $b = [\n \"grant_type\" => \"client_credentials\",\n \"client_id\" => $this->getClientId(),\n \"client_secret\" => $this->getClientSecret(),\n \"scope\" => \"*\"\n ];\n\n // Scafolding request's options\n $options = [\n 'headers'=> [\n 'Accept: application/json',\n 'Content-Type: application/json',\n 'Cache-Control: no-cache'\n ],\n 'params' => $b\n ];\n // Sending POST Request\n $result = $this->post('oauth/token', $options, \"application/json\");\n\n $result = (array)json_decode($result, true);\n\n return $result; \n \n\n }",
"abstract protected function getAccessToken($oauth_token);",
"public function getAccessToken()\n\t{\n\t\t$token = $this->getReqToken();\n\t\t$this->setToken($token);\n\t\t$response = $this->fetch('POST', self::API_URL, self::ACCESS_TOKEN_METHOD);\n\t\t$token = $this->parseTokenString($response['body']);\n\t\t$this->setToken($token);\n\t}",
"public function requestRequestToken();",
"private static function auth () {\n\n\t\t$content = http_build_query ( array (\n\t\t\t'grant_type' => 'client_credentials'\n\t\t) );\n\n\t\t$context = array (\n\t\t\t'http' => array (\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'header' => array (\n\t\t\t\t\t\"User-Agent: illbethere.in\",\n\t\t\t\t\t\"Authorization: Basic \" . static::encodeKeys(),\n\t\t\t\t\t\"Content-Length: \". strlen( $content ),\n\t\t\t\t\t\"Content-Type: application/x-www-form-urlencoded;charset=UTF-8\"\n\t\t\t\t),\n\t\t\t\t'timeout' => 5,\n\t\t\t\t'content' => $content\n\t\t\t)\n\t\t);\n\n\t\treturn static::request ( static::token_uri, $context );\n\t}",
"public function getCurrentAccessToken();"
] | [
"0.737428",
"0.7243885",
"0.7192067",
"0.7071396",
"0.7049653",
"0.70313054",
"0.70313054",
"0.70313054",
"0.70313054",
"0.70313054",
"0.6981216",
"0.6976802",
"0.696864",
"0.6962338",
"0.695737",
"0.6951186",
"0.69479483",
"0.68573684",
"0.6849139",
"0.68091625",
"0.6801079",
"0.67815197",
"0.6757903",
"0.6733977",
"0.6684717",
"0.6669606",
"0.66604364",
"0.66511494",
"0.6647906",
"0.6647461"
] | 0.8220857 | 0 |
builds api url based on the the api version and the port number. | public function buildApiUrl(array $config){
$scheme = isset($config['scheme']) ? $config['scheme'] . '://' : static::DEFAULT_API_SCHEME. '://';
$host = isset($config['host']) ? $config['host'] : static::DEFAULT_API_HOST;
$port = isset($config['port']) ? ':' . $config['port'] : ':' . static::DEFAULT_API_PORT;
$contextPath = isset($config['context_path']) ? $config['context_path'] : static::DEFAULT_API_CONTEXT_PATH;
$version = isset($config['version']) ? $config['version'] . '/' : static::DEFAULT_API_VERSION . '/';
return $scheme . $host . $port . $contextPath . $version;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getApiUrl()\n {\n return 'https://' . $this->hostname . ':' . $this->port . '/api2';\n }",
"private function buildUrl($url, $apiVersion)\n {\n return (string) Url::fromString($url)\n ->addPath('rest')\n ->addPath('api/')\n ->addPath($apiVersion . '/');\n }",
"public function api_uri() {\r\n return $this->api_url . $this->api_version . \"/\";\r\n }",
"private function getBaseUri(){\n return \"{$this->config['api_url']}/v{$this->config['api_version']}/\";\n }",
"protected function getBaseApiUrl()\n {\n return self::API_URI;\n }",
"protected function getApiUrl()\n\t{\n\t\t$repo = $this->getConfig('repo');\n\n\t\t$url = \"/repos/$repo/releases\";\n\t\treturn $url;\n\t}",
"public static function getApiUrl()\n {\n if (null !== self::$apiUrl) {\n return self::$apiUrl;\n }\n return self::$apiBase . '/api/' . self::$apiVersion;\n }",
"public function getGenratedApiUrl(): string {\n\n\t\t$queryString = $this->buildQueryString();\n\n\t\treturn\n\t\t\tempty($queryString)\n\t\t\t\t? self::API_ENDPOINT\n\t\t\t\t: self::API_ENDPOINT . '?' . $queryString;\n\t}",
"function http_build_url($builder) {\n if (!$builder['host']) return false;\n if (!$builder['scheme']) $builder['scheme'] = 'http';\n $url = $builder['scheme'] . '://';\n if ($builder['user'] && $builder['pass']) $url .= \"${builder['user']}:${builder['pass']}@\";\n if ($builder['host']) $url .= \"${builder['host']}\";\n if ($builder['port']) $url .= \":${builder['port']}\";\n if ($builder['path']) {\n $path = $builder['path'];\n if (strpos($path, '/') === 0) {\n $url .= \"$path\";\n } else {\n $url .= \"/$path\";\n }\n } else {\n $url .= '/'; // TODO: ???\n }\n if ($builder['query']) $url .= \"?${builder['query']}\";\n if ($builder['fragment']) $url .= \"#${builder['fragment']}\";\n return $url;\n}",
"private function build_url() {\n $args = array(\n $this->query_var => $this->options['client_key'],\n );\n\n $url = $this->options['client_remote_url'];\n $url = add_query_arg($args, $url);\n\n return $url;\n }",
"private function getApiUrlBase() {\n\t\treturn Config::get('app.api_url');\n\t}",
"public function getApiUrl () {\n\t\t$urlParts = $this->getUrlParts();\n\t\t$path = $urlParts['scheme'] . '://' . $urlParts['host'] \n\t\t\t\t. self::LOCAL_API_PATH;\n\t\tif ( substr($path, strlen($path) - 2, 1) ) {\n\t\t\t$path .= '/';\n\t\t}\n\t\treturn $path;\n\t}",
"public function getBuiltUrl()\n {\n return $this->apiUrl . '?' . http_build_query($this->fields);\n }",
"protected function getUrlApi()\n {\n return $this->baseUrlFull;\n }",
"protected function getApiURL() : string\n {\n return $this->config['apiURI'];\n }",
"function getApiURL(){\n\t\treturn $this->enabled ? $this->config['api'] : '';\n\t}",
"private function generateUrl($method, $version)\n {\n $baseUrl = self::DEFAULT_BASE_URL;\n if($this->baseUrl !== null){\n $baseUrl = $this->baseUrl;\n }\n\n if ($version == 1) {\n $endpoint = 'v1/api/' . $method ;\n } else if ($version == 2) {\n $endpoint = 'api/'. $this->endpoint. '/v2/' . $method;\n } else {\n throw new Exception('Only v1 and v2 are supported.');\n }\n\n return $baseUrl . $endpoint;\n }",
"public function getApiUrl()\n {\n return ($this->getMode() == 'sandbox') ?\n self::API_URL_SANDBOX :\n self::API_URL_PRODUCTION;\n }",
"protected function getApiBaseUrl() {\n return $this->apiUrl . $this->apiVersion;\n }",
"private function buildBaseURL(): string\n {\n return $this->service . '/' . $this->version . '/' . $this->profile;\n }",
"protected function getAPIURL():string\n {\n return \"https://api.myjson.com/bins/11wxz1\";\n }",
"private function getBaseUrl() {\n return $this->protocol . '://' . $this->address . '/webapi/';\n }",
"function baseURL() {\n\t\twhile(list($k,$v)= @each($this->obj->getvars)) {\n\t\t\tif (!is_int($k)) {\n\t\t\t\tif (substr($k,0,2)!='dg') { \n\t\t\t\t$j[] = \"$k=$v\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//$x = @implode(\"/\",$j);\n\t\t//$this->baseurl = appurl($this->name_module.\"/\".$this->name_service.\"/$x/\");\n\t\t$this->baseurl = appurl($this->name_module.\"/\".$this->name_service.$this->extra_url);\n\t}",
"public function get_api_server_url() {\n\n\t\t// When OpenSSL version is not supported, remove https protocol\n\t\tif ( function_exists( 'kalium_get_openssl_version_number' ) && version_compare( kalium_get_openssl_version_number(), '1.0', '<' ) ) {\n\t\t\treturn str_replace( 'https://', 'http://', $this->api_server );\n\t\t}\n\n\t\treturn $this->api_server;\n\t}",
"function getApiUrl(){\n\t\treturn $this->base_url;\n\t}",
"protected function getApiBaseUrl() : string\n {\n return self::API_URL;\n }",
"protected function buildBaseUrl() {\n\t\t$urlParts = parse_url($this->eIdScriptUrl);\n\t\t$this->baseUrl = $urlParts['scheme'] . '://';\n\t\tif ($urlParts['user']) {\n\t\t\t$this->baseUrl .= $urlParts['user'];\n\t\t\tif ($urlParts['pass']) {\n\t\t\t\t$this->baseUrl .= ':' . $urlParts['pass'];\n\t\t\t}\n\t\t\t$this->baseUrl .= '@';\n\t\t}\n\t\t$this->baseUrl .= $urlParts['host'];\n\t\tif ($urlParts['port']) {\n\t\t\t$this->baseUrl .= ':' . $urlParts['port'];\n\t\t}\n\t\t$this->baseUrl .= '/';\n\t}",
"private function getUrl()\n {\n $env = '';\n\n if ($this->options['env'] !== 'live') {\n if ($this->options['env'] === 'stage') {\n $env = 'test.'; // There is no stage. Use test and send the x-forge-environment header\n } else {\n $env = $this->options['env'] . '.';\n }\n }\n\n return str_replace('{env}', $env, self::ORBIT_WEBSERVICE_URL);\n }",
"private function getApiUrl(array $config): string\n {\n return \"https://{$config['store_uri']}/admin/api/{$config['version']}/\";\n }",
"private function buildAdvertiserUrl()\n {\n return $this->advertiserUrlBase . http_build_query($this->urlFieldArray);\n }"
] | [
"0.7135188",
"0.7111133",
"0.71100473",
"0.68514866",
"0.6842084",
"0.6802361",
"0.6739426",
"0.66201746",
"0.6612831",
"0.65595555",
"0.6554708",
"0.65510815",
"0.6542522",
"0.65280586",
"0.6479735",
"0.6474714",
"0.644391",
"0.6437666",
"0.6437536",
"0.6416729",
"0.64064515",
"0.64002246",
"0.6396195",
"0.6319825",
"0.6286851",
"0.6260889",
"0.62516236",
"0.62465703",
"0.6232824",
"0.6216268"
] | 0.7474757 | 0 |
remove "Private: " from titles | function remove_private_prefix($title) {
$title = str_replace('Private: ', '', $title);
return $title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function the_title_trim($title) {\n $title = attribute_escape($title);\n $findthese = array(\n '#Protected:#',\n '#Private:#'\n );\n $replacewith = array(\n '', // What to replace \"Protected:\" with\n '' // What to replace \"Private:\" with\n );\n $title = preg_replace($findthese, $replacewith, $title);\n return $title;\n}",
"function funky_change_protected_title( $title ) {\r\n\r\n\t$find = array(\r\n\t\t'#Protected:#',\r\n\t\t'#Private:#'\r\n\t);\r\n\r\n\t$replace = array(\r\n\t\t'', // What to replace \"Protected:\" with\r\n\t\t'' // What to replace \"Private:\" with\r\n\t);\r\n\r\n\t$title = preg_replace( $find, $replace, $title );\r\n\t\r\n\treturn $title;\r\n\t\r\n}",
"function raw_change_protected_title( $title ) {\r\n\r\n\t$title = esc_attr( $title );\r\n\r\n\t$findthese = array(\r\n\t\t'#Protected:#',\r\n\t\t'#Private:#'\r\n\t);\r\n\r\n\t$replacewith = array(\r\n\t\t'', // What to replace \"Protected:\" with\r\n\t\t'' // What to replace \"Private:\" with\r\n\t);\r\n\r\n\t$title = preg_replace( $findthese, $replacewith, $title );\r\n\treturn $title;\r\n\t\r\n}",
"function una_userproauth_dash_title( $menu ) {\n $menu = str_ireplace( 'Author', 'Author', $menu );\n return $menu;\n}",
"function grd_custom_archive_title( $title ) {\n\t// Remove any HTML, words, digits, and spaces before the title.\n\treturn preg_replace( '#^[\\w\\d\\s]+:\\s*#', '', strip_tags( $title ) );\n}",
"function una_authorpro_dash_title( $menu ) {\n $menu = str_ireplace( 'Authors', 'Profiles', $menu );\n return $menu;\n}",
"function una_userauthor_dash_title( $menu ) {\n $menu = str_ireplace( 'Users', 'Authors', $menu );\n return $menu;\n}",
"function remove_protected_text() {\r\n return __('%s');\r\n}",
"function private_lock($title){\r\n\t$pT = get_post_type();\r\n\tif(get_post_status() == 'private'){\r\n\t\t// Might aswell make use of this function to escape attributes\r\n\t\t$title = attribute_escape($title);\r\n\t\t// What to find in the title\r\n\t\t$findthese = array(\r\n\t\t\t'#Protected:#', // # is just the delimeter\r\n\t\t\t'#Private:#'\r\n\t\t);\r\n\t\t// What to replace it with\r\n\t\t$replacewith = array(\r\n\t\t\t'<div class=\"lock-icon '.$pT.'\"></div>', // What to replace protected with\r\n\t\t\t'<div class=\"lock-icon '.$pT.'\"></div>' // What to replace private with\r\n\t\t);\r\n\t\t// Items replace by array key\r\n\t\t$title = preg_replace($findthese, $replacewith, $title);\r\n\t\treturn $title;\r\n\t}else{\r\n\t\treturn $title;\r\n\t}\r\n}",
"function get_clean_title($page) {\n\t\t$main = $this->config->meta->title->main;\n\t\t$seperator = $this->config->meta->title->seperator ? $this->config->meta->title->seperator : ' | ';\n\t\t$title = $this->convert_title($page, true);\n\n\n\t\treturn \"$title\";\n\t}",
"function remove_protected_text() {\n return __('%s');\n}",
"function una_userpro_dash_title( $menu ) {\n $menu = str_ireplace( 'Profile', 'Author', $menu );\n return $menu;\n}",
"function remove_widget_title($widget_title)\n{\n if (substr($widget_title, 0, 1) === '!')\n return;\n else\n return ($widget_title);\n}",
"function updt_hide_post_title() {\n\tremove_post_type_support('post', 'title');\n}",
"function filter_title( $title ) {\n $substrings = explode( ' | ', $title );\n $title = '';\n \n foreach ($substrings as $key => $s) {\n $title .= ($key % 2 === 0) ? $s : ' <span>' . $s . '</span>';\n }\n \n $substrings = explode( '|', $title );\n $title = '';\n \n foreach ($substrings as $key => $s) {\n $title .= ($key % 2 === 0) ? $s : '<span>' . $s . '</span>';\n }\n \n return $title;\n}",
"function mjf_modify_title( $t ) {\r\n\t$desc = get_bloginfo( 'admin_email' );\r\n\t$sep = '-';\r\n\r\n\t$t .= $desc . $sep;\r\n\r\n\treturn $t;\r\n}",
"function removeTitle($string, $keyReplace = \"/\"){\n\t$string = removeAccent($string);\n\t$string = trim(preg_replace(\"/[^A-Za-z0-9]/i\",\" \",$string)); // khong dau\n\t$string = str_replace(\" \",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace(\"--\",\"-\",$string);\n\t$string = str_replace($keyReplace,\"-\",$string);\n\treturn strtolower($string);\n}",
"function my_title( $title ) {\n\tif ( ! is_admin() ) {\n\t\treturn lighted_title( $title );\n\t} else {\n\t\treturn $title;\n\t}\n\n}",
"function wpshed_cf_maybe_format_title( $key ) {\n $prefix = (string)apply_filters( 'hompage_control_prefix', 'wpshed_display_' );\n $title = $key;\n\n $title = str_replace( $prefix, '', $title );\n $title = str_replace( '_', ' ', $title );\n $title = ucwords( $title );\n\n return $title;\n}",
"function next_categories_remove_title_attributes($output) {\n $output = preg_replace('` title=\"(.+)\"`', '', $output);\n return $output;\n}",
"function ninja_forms_mp_hide_page_titles( $title, $form_id, $current_page ){\n \treturn '';\n}",
"function shortTitle ($title){\r\n\t\t$title = substr($title, 0, -4);\r\n\t\t$title = str_replace('_', ' ', $title);\r\n\t\t$title = ucwords($title);\r\n\t\treturn $title;\r\n\t}",
"public function removeTitle() {\n return $this->setUpdate('Title', null);\n }",
"public function subTitle(): string\n {\n $roles = $this->entity->roles->pluck('name')->implode(' / ');\n\n return (string) Str::of($roles)\n ->limit(20)\n ->whenEmpty(fn () => __('Regular User'));\n }",
"public function ExhibitSuperTitle() {\n\treturn\n\t 'items <a href=\"'.vcGlobals::Me()->GetWebPath_forCatalogPages()\n\t .'\">supplied</a> by '\n\t .$this->SupplierRecord()->ShopLink().\"'s \"\n\t .$this->DepartmentRecord()->ShopLink().' department:'\n\t ;\n }",
"function kpl_user_bio_visual_editor_unfiltered() {\n\t\tremove_all_filters('pre_user_description');\n\t}",
"function bbp_filter_modify_page_title($new_title = '', $old_title = '', $sep = '')\n{\n}",
"public function getStrippedTitle()\n {\n $text = strtolower($this->getTitle());\n\n // strip all non word chars\n $text = preg_replace('/\\W/', ' ', $text);\n // replace all white space sections with a dash\n $text = preg_replace('/\\ +/', '-', $text);\n // trim dashes\n $text = preg_replace('/\\-$/', '', $text);\n $text = preg_replace('/^\\-/', '', $text);\n\n return $text;\n }",
"function temple_remove_metaversion(){\n return '';\n }",
"function remove_widget_title( $widget_title ) {\n\tif ( substr ( $widget_title, 0, 1 ) == '#' )\n\t\treturn;\n else{\n\t\treturn ( $widget_title );\n }\n}"
] | [
"0.76898324",
"0.7473049",
"0.7441904",
"0.6815888",
"0.6479282",
"0.64073807",
"0.6328643",
"0.6277525",
"0.6265947",
"0.6239453",
"0.6238079",
"0.62221694",
"0.6151032",
"0.6139685",
"0.6021912",
"0.6005514",
"0.5901807",
"0.5900241",
"0.58933276",
"0.58883315",
"0.58745855",
"0.5872695",
"0.58534175",
"0.585339",
"0.5838021",
"0.5836149",
"0.5833808",
"0.5830895",
"0.5824884",
"0.5805698"
] | 0.8317025 | 0 |
Remove Empty Collections from main query. | function remove_empty_collections_from_main_query($query){
global $post;
if(
!is_admin() &&
$query->is_main_query() &&
is_post_type_archive('lists')
){
$query->set('posts_per_page', 100);
$query->set( 'meta_query', array(
array(
'key' => 'list_items',
'compare' => '!=',
'value' => ["", array(), false]
)
) );
}
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEmptyCollection();",
"public function clear(): Collection;",
"public function nullCollection();",
"public function filterEmptyItems();",
"public function removeAll() {\n\t\treturn delete_data($this->preprocessSql(\"\n\t\t\tDELETE FROM {TABLE}\n\t\t\tWHERE {IN_LIST}\n\t\t\"));\n\t}",
"public function clear() {\n $this->collection = [];\n }",
"public function removeAll();",
"public function removeAll();",
"public function removeAll();",
"private function unsetEmptyCollectionEntries(array &$collection)\n\t{\n\t\tif (count(array_filter(array_keys($collection), 'is_string')) > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($collection as $index => &$_entry)\n\t\t{\n\t\t\t// not a collection, but a list\n\t\t\tif (!is_array($_entry)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$unset = true;\n\t\t\tforeach ($_entry as $key => &$value) {\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$this->unsetEmptyCollectionEntries($value);\n\n\t\t\t\t\tif (empty($value)) {\n\t\t\t\t\t\tunset($_entry[$key]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!str_starts_with($key, '_')) {\n\t\t\t\t\t$unset = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($unset) {\n\t\t\t\tunset($collection[$index]);\n\t\t\t}\n\t\t}\n\t}",
"function clearFilters() {\n $this->_query->reset('where');\n }",
"public function removeAll() {\n\t\t// TODO: Implement removeAll() method.\n\t}",
"public function getEmptyCollection()\n\t{\n\t\treturn new GeneralCollectionDefault();\n\t}",
"public function getEmptyCollection()\n {\n return new GeneralCollectionDefault();\n }",
"private function clear()\n {\n $this->inner_join_array = [];\n $this->left_join_array = [];\n $this->params_array = [];\n $this->where_array = [];\n $this->select_array = [];\n $this->order_by = \"\";\n $this->group_by = \"\";\n $this->having = \"\";\n $this->limit = null;\n $this->page = null;\n }",
"public function purgeEmptyParameters()\n\t{\n\t\t$this->parameters = $this->array_filter_recursive($this->parameters);\n\t}",
"public abstract function removeAll();",
"public function clearAlats()\n {\n $this->collAlats = null; // important to set this to null since that means it is uninitialized\n $this->collAlatsPartial = null;\n\n return $this;\n }",
"public function testWhenAnEmptyArrayOfFieldIsGivenThenReturnAnEmptyCollection()\n {\n $mapper = new SchemaMapper();\n $response = $mapper->buildTableFieldCollectionFromPersistence([]);\n\n static::assertEquals([], $response->toArray());\n }",
"public function clear(){\n $this->_query = array();\n return $this;\n }",
"public function clearDiklats()\n {\n $this->collDiklats = null; // important to set this to null since that means it is uninitialized\n $this->collDiklatsPartial = null;\n\n return $this;\n }",
"public function testFindAllEmptyCollection()\n {\n // reset fixtures since we already have some from setUp\n $this->loadFixturesLocal([]);\n $client = static::createRestClient();\n $client->request('GET', '/core/app/');\n\n $response = $client->getResponse();\n $results = $client->getResults();\n\n $this->assertResponseContentType(self::CONTENT_TYPE, $response);\n $this->assertResponseSchemaRel(self::SCHEMA_URL_COLLECTION, $response);\n\n $this->assertEquals([], $results);\n }",
"abstract public function removeAll();",
"private function clear() {\n\t\t$this->where = array();\n\t\t$this->order = '';\n\t\t$this->limit = '';\n\t}",
"function remove_all() \r\n\t{\r\n\t\t$this->reset();\r\n }",
"public function emptyChildren();",
"public function removeAll()\n {\n $this->_data = array();\n }",
"public function allEmpty()\n {\n return $this->allEqualTo(false);\n }",
"public function removeAll()\n {\n }",
"public function clear()\n {\n $query = clone $this->query;\n $query->clear($this->relation->entity())\n ->execute();\n }"
] | [
"0.7047689",
"0.6690191",
"0.6543913",
"0.6453559",
"0.6389099",
"0.6226184",
"0.6164965",
"0.6164965",
"0.6164965",
"0.6096396",
"0.609408",
"0.6078276",
"0.6077954",
"0.6065898",
"0.6025316",
"0.5963459",
"0.59478104",
"0.5945822",
"0.5923451",
"0.58925307",
"0.5870454",
"0.5856582",
"0.58462584",
"0.5838038",
"0.5828622",
"0.5803938",
"0.5773671",
"0.57727945",
"0.5769173",
"0.576509"
] | 0.77743644 | 0 |
/ Payment Gateway IPN listener | public function swpm_ipn_listener() {
//Listen and handle PayPal IPN
$swpm_process_ipn = filter_input(INPUT_GET, 'swpm_process_ipn');
if ($swpm_process_ipn == '1') {
include(SIMPLE_WP_MEMBERSHIP_PATH . 'ipn/swpm_handle_pp_ipn.php');
exit;
}
//Listen and handle Stripe Buy Now IPN
$swpm_process_stripe_buy_now = filter_input(INPUT_GET, 'swpm_process_stripe_buy_now');
if ($swpm_process_stripe_buy_now == '1') {
include(SIMPLE_WP_MEMBERSHIP_PATH . 'ipn/swpm-stripe-buy-now-ipn.php');
exit;
}
//Listen and handle Stripe Subscription IPN
$swpm_process_stripe_subscription = filter_input(INPUT_GET, 'swpm_process_stripe_subscription');
if ($swpm_process_stripe_subscription == '1') {
include(SIMPLE_WP_MEMBERSHIP_PATH . 'ipn/swpm-stripe-subscription-ipn.php');
exit;
}
//Listen and handle Braintree Buy Now IPN
$swpm_process_braintree_buy_now = filter_input(INPUT_GET, 'swpm_process_braintree_buy_now');
if ($swpm_process_braintree_buy_now == '1') {
include(SIMPLE_WP_MEMBERSHIP_PATH . 'ipn/swpm-braintree-buy-now-ipn.php');
exit;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function onIpn()\n\t{\n\t\t$config = JFactory::getConfig();\n\t\t$log = FabTable::getInstance('log', 'FabrikTable');\n\t\t$log->referring_url = $_SERVER['REQUEST_URI'];\n\t\t$log->message_type = 'fabrik.ipn.start';\n\t\t$log->message = json_encode($_REQUEST);\n\t\t$log->store();\n\n\t\t//lets try to load in the custom returned value so we can load up the form and its parameters\n\t\t$custom = JRequest::getVar('custom');\n\t\tlist($formid, $rowid) = explode(\":\", $custom);\n\n\t\t//pretty sure they are added but double add\n\t\tJModel::addIncludePath(COM_FABRIK_FRONTEND . '/models');\n\t\t$formModel = JModel::getInstance('Form', 'FabrikFEModel');\n\t\t$formModel->setId($formid);\n\t\t$listModel = $formModel->getlistModel();\n\t\t$params = $formModel->getParams();\n\t\t$table = $listModel->getTable();\n\t\t$db = $listModel->getDb();\n\n\t\t$renderOrder = JRequest::getInt('renderOrder');\n\t\t$ipn_txn_field = 'pp_txn_id';\n\t\t$ipn_payment_field = 'amount';\n\n\t\t$ipn_status_field = 'pp_payment_status';\n\n\t\t$w = $this->getWorker();\n\n\t\t$email_from = $admin_email = $config->get('mailfrom');\n\t\t// read the post from Subscriptions system and add 'cmd'\n\t\t$req = 'cmd=_notify-validate';\n\t\tforeach ($_POST as $key => $value)\n\t\t{\n\t\t\t$value = urlencode(stripslashes($value));\n\t\t\t$req .= '&' . $key . '=' . $value;\n\t\t}\n\n\t\t// post back to Subscriptions system to validate\n\t\t$header .= \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n\t\t$header .= \"Host: www.paypal.com:443\\r\\n\";\n\t\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t$header .= \"Content-Length: \" . JString::strlen($req) . \"\\r\\n\\r\\n\";\n\n\t\t$subscriptionsurl ($_POST['test_ipn'] == 1) ? 'ssl://www.sandbox.paypal.com' : 'ssl://www.paypal.com';\n\n\t\t// assign posted variables to local variables\n\t\t$item_name = JRequest::getVar('item_name');\n\t\t$item_number = JRequest::getVar('item_number');\n\t\t$payment_status = JRequest::getVar('payment_status');\n\t\t$payment_amount = JRequest::getVar('mc_gross');\n\t\t$payment_currency = JRequest::getVar('mc_currency');\n\t\t$txn_id = JRequest::getVar('txn_id');\n\t\t$txn_type = JRequest::getVar('txn_type');\n\t\t$receiver_email = JRequest::getVar('receiver_email');\n\t\t$payer_email = JRequest::getVar('payer_email');\n\n\t\t$status = 'ok';\n\t\t$err_msg = '';\n\t\tif (empty($formid) || empty($rowid))\n\t\t{\n\t\t\t$status = 'form.subscriptions.ipnfailure.custom_error';\n\t\t\t$err_msg = \"formid or rowid empty in custom: $custom\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//@TODO implement a curl alternative as fsockopen is not always available\n\t\t\t$fp = fsockopen ($subscriptionsurl, 443, $errno, $errstr, 30);\n\t\t\tif (!$fp)\n\t\t\t{\n\t\t\t\t$status = 'form.subscriptions.ipnfailure.fsock_error';\n\t\t\t\t$err_msg = \"fsock error: $errno;$errstr\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfputs ($fp, $header . $req);\n\t\t\t\twhile (!feof($fp))\n\t\t\t\t{\n\t\t\t\t\t$res = fgets ($fp, 1024);\n\t\t\t\t\t// subscriptions steps (from their docs):\n\t\t\t\t\t// check the payment_status is Completed\n\t\t\t\t\t// check that txn_id has not been previously processed\n\t\t\t\t\t// check that receiver_email is your Primary Subscriptions email\n\t\t\t\t\t// check that payment_amount/payment_currency are correct\n\t\t\t\t\t// process payment\n\t\t\t\t\tif (JString::strcmp ($res, \"VERIFIED\") == 0)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$query = $db->getQuery(true);\n\t\t\t\t\t\t$query->select($ipn_status_field)->from('#__fabrik_subs_invoices')\n\t\t\t\t\t\t->where($db->quoteName($ipn_txn_field) . ' = ' . $db->quote($txn_id));\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$txn_result = $db->loadResult();\n\t\t\t\t\t\tif (!empty($txn_result))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($txn_result == 'Completed')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($payment_status != 'Reversed' && $payment_status != 'Refunded')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$status = 'form.subscriptions.ipnfailure.txn_seen';\n\t\t\t\t\t\t\t\t\t$err_msg = \"transaction id already seen as Completed, new payment status makes no sense: $txn_id, $payment_status\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($txn_result == 'Reversed')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($payment_status != 'Canceled_Reversal')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$status = 'form.subscriptions.ipnfailure.txn_seen';\n\t\t\t\t\t\t\t\t\t$err_msg = \"transaction id already seen as Reversed, new payment status makes no sense: $txn_id, $payment_status\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($status == 'ok')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$set_list = array();\n\n\t\t\t\t\t\t\t$set_list[$ipn_txn_field] = $txn_id;\n\t\t\t\t\t\t\t$set_list[$ipn_payment_field] = $payment_amount;\n\t\t\t\t\t\t\t$set_list[$ipn_status_field] = $payment_status;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$ipn = $this->getIPNHandler($params, $renderOrder);\n\n\t\t\t\t\t\t\tif ($ipn !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$request = $_REQUEST;\n\t\t\t\t\t\t\t\t$ipn_function = 'payment_status_' . $payment_status;\n\t\t\t\t\t\t\t\tif (method_exists($ipn, $ipn_function))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$status = $ipn->$ipn_function($listModel, $request, $set_list, $err_msg);\n\t\t\t\t\t\t\t\t\tif ($status != 'ok')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$txn_type_function = 'txn_type_' . $txn_type;\n\t\t\t\t\t\t\t\tif (method_exists($ipn, $txn_type_function))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$status = $ipn->$txn_type_function($listModel, $request, $set_list, $err_msg);\n\t\t\t\t\t\t\t\t\tif ($status != 'ok')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!empty($set_list))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$set_array = array();\n\t\t\t\t\t\t\t\tforeach ($set_list as $set_field => $set_value)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$set_value = $db->quote($set_value);\n\t\t\t\t\t\t\t\t\t$set_field = $db->quoteName($set_field);\n\t\t\t\t\t\t\t\t\t$set_array[] = \"$set_field = $set_value\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$query = $db->getQuery(true);\n\t\t\t\t\t\t\t\t$query->update('#__fabrik_subs_invoices')\n\t\t\t\t\t\t\t\t->set( implode(',', $set_array))->where('id = ' . $db->quote($rowid));\n\t\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\t\tif (!$db->query())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$status = 'form.subscriptions.ipnfailure.query_error';\n\t\t\t\t\t\t\t\t\t$err_msg = 'sql query error: ' . $db->getErrorMsg();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (JString::strcmp ($res, \"INVALID\") == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$status = 'form.subscriptions.ipnfailure.invalid';\n\t\t\t\t\t\t$err_msg = 'subscriptions postback failed with INVALID';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfclose ($fp);\n\t\t\t}\n\t\t}\n\n\t\t$receive_debug_emails = (array) $params->get('subscriptions_receive_debug_emails');\n\t\t$receive_debug_emails = $receive_debug_emails[$renderOrder];\n\t\t$send_default_email = (array) $params->get('subscriptions_send_default_email');\n\t\t$send_default_email = $send_default_email[$renderOrder];\n\t\tif ($status != 'ok')\n\t\t{\n\t\t\tforeach ($_POST as $key => $value)\n\t\t\t{\n\t\t\t\t$emailtext .= $key . \" = \" .$value .\"\\n\\n\";\n\t\t\t}\n\n\t\t\tif ($receive_debug_emails == '1')\n\t\t\t{\n\t\t\t\t$subject = $config->get('sitename').\": Error with Fabrik Subscriptions IPN\";\n\t\t\t\tJUtility::sendMail($email_from, $email_from, $admin_email, $subject, $emailtext, false);\n\t\t\t}\n\t\t\t$log->message_type = $status;\n\t\t\t$log->message = $emailtext .\"\\n//////////////\\n\" . $res .\"\\n//////////////\\n\". $req . \"\\n//////////////\\n\".$err_msg;\n\t\t\tif ($send_default_email == '1')\n\t\t\t{\n\t\t\t\t$payer_emailtext = \"There was an error processing your Subscriptions payment. The administrator of this site has been informed.\";\n\t\t\t\tJUtility::sendMail($email_from, $email_from, $payer_email, $subject, $payer_emailtext, false);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($_POST as $key => $value)\n\t\t\t{\n\t\t\t\t$emailtext .= $key . \" = \" .$value .\"\\n\\n\";\n\t\t\t}\n\t\t\tif ($receive_debug_emails == '1')\n\t\t\t{\n\t\t\t\t$subject = $config->get('sitename') . ': IPN ' . $payment_status;\n\t\t\t\tJUtility::sendMail($email_from, $email_from, $admin_email, $subject, $emailtext, false);\n\t\t\t}\n\t\t\t$log->message_type = 'form.subscriptions.ipn.' . $payment_status;\n\t\t\t$query = $db->getQuery();\n\t\t\t$log->message = $emailtext .\"\\n//////////////\\n\" . $res .\"\\n//////////////\\n\". $req . \"\\n//////////////\\n\".$query;\n\n\t\t\tif ($send_default_email == '1')\n\t\t\t{\n\t\t\t\t$payer_subject = \"Subscriptions success\";\n\t\t\t\t$payer_emailtext = \"Your Subscriptions payment was succesfully processed. The Subscriptions transaction id was $txn_id\";\n\t\t\t\tJUtility::sendMail( $email_from, $email_from, $payer_email, $payer_subject, $payer_emailtext, false);\n\t\t\t}\n\t\t}\n\n\t\t$log->message .= \"\\n IPN custom function = $ipn_function\";\n\t\t$log->message .= \"\\n IPN custom transaction function = $txn_type_function\";\n\t\t$log->store();\n\t\tjexit();\n\t}",
"public function process_ipn() {\n\t\t\t\t\n\t\t\trequire_once( plugin_dir_path( __FILE__ ) . 'virtex-lib.php' );\n\t\t\t$virtexapi = new VirtEx_Lib( $this->merchant_key, $this->merchant_secret );\n\t\t\t\n\t\t\t$rawData = file_get_contents(\"php://input\");\n\t\t\t$params = json_decode($rawData, TRUE);\n\t\t\t\n\t\t\tif( ! $params ) {\n\t\t\t\tvrxlog( 'Empty IPN received. <code>'.$rawData.'</code>' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tvrxlog( 'IPN received. <code>'.$rawData.'</code>' );\n\t\t\t}\n\t\t\t\n\t\t\t$custom_1 = json_decode( $params['custom_1'], true );\n\t\t\tif ( $custom_1['hash'] != crypt( $this->merchant_secret, $this->merchant_key) ) {\n\t\t\t\tvrxlog( 'Authentication failed. Bad hash. <code>'.$rawData.'</code>' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$merchant_confirm_ipn = $virtexapi->merchant_confirm_ipn( $params );\n\t\t\tif( $merchant_confirm_ipn['status'] != 'ok' ) { //RRR\n\t\t\t\tvrxlog( 'Authentication failed. IPN cannot be verified. <code>'.json_encode($merchant_confirm_ipn).'</code>' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* @todo vxCurl() currently doesnt work with GET. Since we have received IPN, mark payment complete for now\n\t\t\t// has the invoice been paid in full? if yes, success; if not, continue waiting\n\t\t\t$paid = $virtexapi->merchant_invoice_balance_check( $params['order_key'] );\n\t\t\t$paid_in_full = in_array($paid['status'], array('credited', 'confirmed', 'complete', 'paid')); //RRR\n\t\t\tif( $paid_in_full ) {\n\t\t\t\treturn $this->payment_successful( $params['order_key'] );\n\t\t\t} else {\n\t\t\t\tvrxlog( 'Order not updated. Payment not complete. <code>'.json_encode($paid).'</code>' );\n\t\t\t\treturn;\n\t\t\t}*/ return $this->payment_successful( $params['order_key'] );\n\t\t\t\n\t\t}",
"function mcs_receive_ipn() {\n\tif ( isset( $_GET['mcsipn']) && $_GET['mcsipn'] == 'true' ) {\n\t\tglobal $wpdb; \n\t\tmcs_check();\n\t\tif ( get_option( 'mcs_gateway' ) == 'authorizenet' ) {\n\t\t\trequire_once 'gateways/AuthorizeNet.php'; // The SDK\n\t\t\t$url = add_query_arg( 'mcsipn','true', home_url() );\n\t\t\t$api = get_option( 'mcs_authnet_api' );\n\t\t\t$hash = get_option( 'mcs_authnet_hash' );\n\t\t\t// these all need to be set from Authorize.Net data\n\t\t\t$payment_status = mcs_map_status( $_POST['x_response_code'] ); // map response to equivalent from PayPal\n\t\t\t$item_number = 1; // mandatory for Paypal, but only represents a submissions purchase here.\n\t\t\t$price = $_POST['x_amount'];\n\t\t\t$quantity = ( isset($_POST['quantity']) )?$_POST['quantity']:1; // need to add to form\n\t\t\t$quantity = ( is_int($quantity) )?$quantity:1;\n\t\t\t$payer_email = $_POST['x_payer_email']; // must add to form\n\t\t\t$payer_first_name = $_POST['x_first_name'];\n\t\t\t$payer_last_name = $_POST['x_last_name'];\n\t\t\t$mc_fee = '0.00'; // not included in data\n\t\t\t$item_name = sprintf(__('%s Event Submission','my-calendar-submissions'),get_option('blogname')); // required by Paypal\n\t\t\t$parent = '';\t\n\t\t\t$redirect_url = $_POST['x_referer_url'];\t\t\t\n\t\t\t// paypal IPN data\n $ipn = new AuthorizeNetSIM($api, $hash);\n\t\t\tif ( $ipn->isAuthorizeNet()\t) {\t\n\t\t\t\tif ( $ipn->approved ) { \n\t\t\t\t\t$response = 'VERIFIED'; \n\t\t\t\t\t$redirect_url = add_query_arg( array( 'response_code'=>'1', 'transaction_id'=>$ipn->transaction_id ), $redirect_url ); \n\t\t\t\t\t$txn_id = $ipn->transaction_id;\n\t\t\t\t} else { \n\t\t\t\t\t$response = 'ERROR'; \n\t\t\t\t\t$redirect_url = add_query_arg( array( 'response_code'=>$ipn->response_code, 'response_reason_text'=>$ipn->response_reason_text ), $redirect_url );\n\t\t\t\t\t$txn_id = false;\n\t\t\t\t}\n\t\t\t\t$response_code = '200';\n\t\t\t} else {\n\t\t\t\twp_die( __('That transaction was not handled by Authorize.net. Please verify your MD5 setting.','my-calendar-submissions' ) );\n\t\t\t}\n\t\t} else {\n\t\t\n\t\t\tif ( isset( $_POST['payment_status'] ) ) {\n\t\t\t\t$sandbox = get_option(\"mcs_use_sandbox\");\n\t\t\t\t$receiver = strtolower( get_option('mcs_paypal_email') );\n\t\t\t\t$url = ( $sandbox == 'true' )?'https://www.sandbox.paypal.com/webscr':'https://www.paypal.com/webscr';\n\n\t\t\t\t$req = 'cmd=_notify-validate';\n\t\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t\t$value = urlencode(stripslashes($value));\n\t\t\t\t\t$req .= \"&$key=$value\";\n\t\t\t\t}\t\t\n\t\t\t\t$args = wp_parse_args( $req, array() );\n\t\t\t\tglobal $mcs_version;\n\t\t\t\t$params = array(\n\t\t\t\t\t'body'\t\t=> $args,\n\t\t\t\t\t'sslverify' => false,\n\t\t\t\t\t'timeout' \t=> 30,\n\t\t\t\t\t'user-agent' => \"WordPress/My Calendar Pro $mcs_version; \" . get_bloginfo( 'url' )\n\t\t\t\t);\n\t\t\t\t// transaction variables to store\n\t\t\t\t$payment_status = $_POST['payment_status'];\n\t\t\t\t$item_number = $_POST['item_number'];\n\t\t\t\t$price = $_POST['mc_gross'];\n\t\t\t\t$payment_currency = $_POST['mc_currency'];\n\t\t\t\t$receiver_email = $_POST['receiver_email'];\n\t\t\t\t$quantity = ( isset($_POST['quantity']) )?$_POST['quantity']:1;\n\t\t\t\t$quantity = ( is_int($quantity) )?$quantity:1;\n\t\t\t\t$payer_email = $_POST['payer_email'];\n\t\t\t\t$payer_first_name = $_POST['first_name'];\n\t\t\t\t$payer_last_name = $_POST['last_name'];\n\t\t\t\t$mc_fee = $_POST['mc_fee'];\n\t\t\t\t$item_name = $_POST['item_name'];\n\t\t\t\t$txn_id = $_POST['txn_id'];\n\t\t\t\t$parent = isset( $_POST['parent_txn_id'] )?$_POST['parent_txn_id']:'';\t\n\t\t\t\t// paypal IPN data\n\t\t\t\t$ipn = wp_remote_post( $url, $params );\n\t\t\t\t$response = $ipn['body'];\n\t\t\t\t$response_code = $ipn['response']['code'];\n\t\t\t\t// die conditions for PayPal\n\t\t\t\t// if receiver email or currency are wrong, this is probably a fraudulent transaction.\n\t\t\t\tif ( strtolower($receiver_email) != $receiver || $payment_currency != get_option('mcs_currency') ) { \n\t\t\t\t\twp_mail( get_option('mcs_to'), 'Payment Conditions Error', 'PayPal receiver email did not match account or payment currency did not match payment' ); \n\t\t\t\t\twp_die(); \n\t\t\t\t} \n\t\t\t\t$redirect_url = false;\n\t\t\t} else {\n\t\t\t\twp_die( \"No valid IPN request made\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( $response_code == '200' ) {\n\t\t\tif ( $response == \"VERIFIED\" ) {\n\t\t\t\t$status = \"\";\n\t\t\t\tif ( get_option( 'mcs_gateway' ) != 'authorizenet' ) {\n\t\t\t\t\t// See whether the transaction already exists. (For refunds, reversals, or canceled reversals)\n\t\t\t\t\t$sql = \"SELECT id, hash, status FROM \".my_calendar_payments_table().\" WHERE txn_id = %s\";\n\t\t\t\t\t$txn = ( $parent != '' )?$wpdb->get_row( $wpdb->prepare( $sql, array($parent) ) ):$wpdb->get_row( $wpdb->prepare( $sql, array($txn_id) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$txn = false;\n\t\t\t\t}\n\t\t\t\tswitch ( $payment_status ) {\n\t\t\t\t\tcase 'Completed':\n\t\t\t\t\tcase 'Created':\n\t\t\t\t\tcase 'Denied':\n\t\t\t\t\tcase 'Expired':\n\t\t\t\t\tcase 'Failed':\n\t\t\t\t\tcase 'Processed':\n\t\t\t\t\tcase 'Voided':$status = $payment_status;break;\n\t\t\t\t\tcase 'Pending': $status = $payment_status.': '.$post['pending_reason']; break;\n\t\t\t\t\tcase 'Refunded':\n\t\t\t\t\tcase 'Reversed':\n\t\t\t\t\tcase 'Canceled_Reversal': $status = $payment_status.': '.$post['ReasonCode']; break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( empty( $txn ) ) {\n\t\t\t\t\t//error_log(\"INSERT: \".$txn_id.\" \".$status);\n\t\t\t\t\t$uniqid = uniqid('E');\n\t\t\t\t\t$hash = mcs_uniqid( $uniqid );\n\t\t\t\t\t$sql = \"INSERT INTO \".my_calendar_payments_table().\"\n\t\t\t\t\t\t\t(item_number,quantity,total,hash,txn_id,price,fee,status,transaction_date,first_name,last_name,payer_email)\n\t\t\t\t\t\t\tVALUES(%d, %d, %d, %s, %s, %f, %f, %s, NOW(), %s, %s, %s )\";\n\t\t\t\t\t$wpdb->query( $wpdb->prepare( $sql,array( $item_number,$quantity,$quantity,$hash,$txn_id,$price,$mc_fee,$status,$payer_first_name,$payer_last_name,$payer_email) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$hash = $txn->hash;\n\t\t\t\t\t//error_log(\"UPDATE: \".$txn_id.\" \".$status.\" \".$hash.\" ->\".$item_number);\n\t\t\t\t\t$sql = \"UPDATE \".my_calendar_payments_table().\"\n\t\t\t\t\t\t\tSET status = %s,price=%f,fee=%f,transaction_date = NOW() WHERE id = %d\";\n\t\t\t\t\t$r = $wpdb->query($wpdb->prepare($sql,array( $status,$price,$mc_fee,$txn->id)));\n\t\t\t\t\t//error_log(var_dump($r, true));\n\t\t\t\t}\t\t\t\n\t\t\t\tif ( $status == \"Completed\" ) {\n\t\t\t\t\tmcs_send_notifications( $payer_first_name, $payer_last_name, $payer_email, $price, $hash, $quantity );\n\t\t\t\t\tsetcookie(\"mcs_receipt\", 'true', time()+60*60, SITECOOKIEPATH, COOKIE_DOMAIN, false, true );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// log for manual investigation\n\t\t\t\t$blogname = get_option('blogname');\n\t\t\t\t$mail_From = \"From: $blogname Events <\".get_option('mcs_from').\">\";\t\t\t\t\n\t\t\t\t$mail_Subject = __(\"INVALID IPN on My Calendar Submission Payment\",'my-calendar-submissions');\n\t\t\t\t$mail_Body = __(\"Something went wrong. Hopefully this information will help:\",'my-calendar-submissions').\"\\n\\n\";\n\t\t\t\tforeach ( $_POST as $key => $value ) {\n\t\t\t\t\t$mail_Body .= $key . \" = \" .$value .\"\\n\";\n\t\t\t\t}\n\t\t\t\twp_mail( get_option('mcs_to'), $mail_Subject, $mail_Body, $mail_From);\n\t\t\t}\n\t\t} else {\n\t\t\t$blogname = get_option('blogname');\n\t\t\t$mail_From = \"From: $blogname Events <\".get_option('mcs_from').\">\";\n\t\t\t$mail_Subject = __(\"WP HTTP Failed to contact Paypal\",'my-calendar-submissions');\n\t\t\t$mail_Body = __(\"Something went wrong. Hopefully this information will help:\",'my-calendar-submissions').\"\\n\\n\";\n\t\t\t$mail_Body .= print_r( $ipn,1 );\n\t\t\twp_mail( get_option('mcs_to'), $mail_Subject, $mail_Body, $mail_From);\n\t\t}\n\t\tif ( $redirect_url ) {\n\t\t\techo AuthorizeNetDPM::getRelayResponseSnippet($redirect_url); \t\t\t\t\t\t\n\t\t\t//wp_safe_redirect( $redirect_url );\n\t\t\texit;\n\t\t} else {\n\t\t\tstatus_header(200);\n\t\t}\t\t\n\t} else {\n\t\treturn;\n\t}\n}",
"public function process_ipn() {\n\n\t\tif( empty( $_GET['affwp-listener'] ) || 'paypal' !== strtolower( $_GET['affwp-listener'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$ipn_data = $_POST;\n\n\t\tif( ! is_array( $ipn_data ) ) {\n\t\t\twp_parse_str( $ipn_data, $ipn_data );\n\t\t}\n\n\t\t$verified = $this->verify_ipn( $ipn_data );\n\n\t\tif( ! $verified ) {\n\t\t\tdie( 'IPN verification failed' );\n\t\t}\n\n\t\t$to_process = array(\n\t\t\t'web_accept',\n\t\t\t'cart',\n\t\t\t'subscr_payment',\n\t\t\t'express_checkout',\n\t\t\t'recurring_payment',\n\t\t);\n\n\t\tif( ! empty( $ipn_data['txn_type'] ) && ! in_array( $ipn_data['txn_type'], $to_process ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( empty( $ipn_data['mc_gross'] ) ) {\n\n\t\t\t$this->log( 'IPN not processed because mc_gross was empty' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif( empty( $ipn_data['custom'] ) ) {\n\n\t\t\t$this->log( 'IPN not processed because custom was empty' );\n\n\t\t\treturn;\n\t\t}\n\n\t\t$total = sanitize_text_field( $ipn_data['mc_gross'] );\n\t\t$custom = explode( '|', $ipn_data['custom'] );\n\t\t$visit_id = $custom[0];\n\t\t$affiliate_id = $custom[1];\n\t\t$referral_id = $custom[2];\n\t\t$visit = affwp_get_visit( $visit_id );\n\t\t$referral = affwp_get_referral( $referral_id );\n\n\t\tif( empty( $affiliate_id ) ) {\n\n\t\t\t$this->log( 'IPN not processed because affiliate ID was empty' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! $visit || ! $referral ) {\n\n\t\t\tif( ! $visit ) {\n\n\t\t\t\t$this->log( 'Visit not successfully retrieved during process_ipn()' );\n\n\t\t\t}\n\n\t\t\tif( ! $referral ) {\n\n\t\t\t\t$this->log( 'Referral not successfully retrieved during process_ipn()' );\n\n\t\t\t}\n\n\t\t\tdie( 'Missing visit or referral data' );\n\t\t}\n\n\t\t$this->log( 'Referral ID (' . $referral->ID . ') successfully retrieved during process_ipn()' );\n\n\t\t$payer_email = ! empty( $ipn_data['payer_email'] ) ? sanitize_text_field( $ipn_data['payer_email'] ) : '';\n\n\t\tif ( ! empty( $payer_email ) ) {\n\n\t\t\t$customer = affwp_get_customer( $payer_email );\n\n\t\t\tif ( ! $customer ) {\n\n\t\t\t\t$first_name = ! empty( $ipn_data['first_name'] ) ? sanitize_text_field( $ipn_data['first_name'] ) : '';\n\t\t\t\t$last_name = ! empty( $ipn_data['last_name'] ) ? sanitize_text_field( $ipn_data['last_name'] ) : '';\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'email' => $payer_email,\n\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t'last_name' => $last_name,\n\t\t\t\t\t'affiliate_id' => $affiliate_id,\n\t\t\t\t\t'ip' => $visit->ip\n\t\t\t\t);\n\n\t\t\t\t$user = get_user_by( 'email', $payer_email );\n\n\t\t\t\tif ( $user ) {\n\t\t\t\t\t$args['user_id'] = $user->ID;\n\t\t\t\t}\n\n\t\t\t\taffwp_add_customer( $args );\n\n\t\t\t} else {\n\n\t\t\t\taffwp_add_customer_meta( $customer->customer_id, 'affiliate_id', $affiliate_id, true );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif( 'completed' === strtolower( $ipn_data['payment_status'] ) ) {\n\n\t\t\tif( 'pending' !== $referral->status ) {\n\n\t\t\t\t$this->log( 'Referral has status other than Pending during process_ipn()' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$visit->set( 'referral_id', $referral->ID, true );\n\n\t\t\t$reference = sanitize_text_field( $ipn_data['txn_id'] );\n\t\t\t$description = ! empty( $ipn_data['item_name'] ) ? sanitize_text_field( $ipn_data['item_name'] ) : sanitize_text_field( $ipn_data['payer_email'] );\n\t\t\t$amount = $this->calculate_referral_amount( $total, $reference, 0, $referral->affiliate_id );\n\n\t\t\t$referral->set( 'description', $description );\n\t\t\t$referral->set( 'amount', $amount );\n\t\t\t$referral->set( 'reference', $reference );\n\n\t\t\t$this->log( 'Referral updated in preparation for save(): ' . print_r( $referral->to_array(), true ) );\n\n\t\t\tif( $referral->save() ) {\n\n\t\t\t\t$this->log( 'Referral saved: ' . print_r( $referral->to_array(), true ) );\n\n\t\t\t\t$completed = $this->complete_referral( $referral );\n\n\t\t\t\tif( $completed ) {\n\n\t\t\t\t\t$this->log( 'Referral completed successfully during process_ipn()' );\n\n\t\t\t\t\treturn;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$this->log( 'Referral failed to be completed during process_ipn()' );\n\n\t\t\t\t}\n\n\t\t\t\treturn;\n\n\t\t\t} else {\n\n\t\t\t\t$this->log( 'Referral not updated successfully during process_ipn()' );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t} elseif ( 'refunded' === strtolower( $ipn_data['payment_status'] ) || 'reversed' === strtolower( $ipn_data['payment_status'] ) ) {\n\n\t\t\tif( ! affiliate_wp()->settings->get( 'revoke_on_refund' ) ) {\n\n\t\t\t\t$this->log( 'Referral not rejected because revoke on refund is not enabled' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$referral = affiliate_wp()->referrals->get_by( 'reference', $ipn_data['parent_txn_id'] );\n\n\t\t\tif ( $referral ) {\n\n\t\t\t\t$this->reject_referral( $referral->reference );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$this->log( 'Payment status in IPN data not Complete, Refunded, or Reversed' );\n\n\t\t}\n\n\t}",
"public function onSubscriptionTransactionIpn(\n Payment_Model_Order $order, Engine_Payment_Ipn $ipn) {\n \n }",
"function ipn() {\n // update your database to activate or process the order, or setup\n // the database with the user's order details, email an administrator,\n // etc. You can access a slew of information via the ipn_data() array.\n // Check the paypal documentation for specifics on what information\n // is available in the IPN POST variables. Basically, all the POST vars\n // which paypal sends, which we send back for validation, are now stored\n // in the ipn_data() array.\n // For this example, we'll just email ourselves ALL the data.\n $to = '[email protected]'; // your email\n\n if ($this->paypal_lib->validate_ipn()) {\n $body = 'An instant payment notification was successfully received from ';\n $body .= $this->paypal_lib->ipn_data['payer_email'] . ' on ' . date('m/d/Y') . ' at ' . date('g:i A') . \"\\n\\n\";\n $body .= \" Details:\\n\";\n\n foreach ($this->paypal_lib->ipn_data as $key => $value)\n $body .= \"\\n$key: $value\";\n\n // load email lib and email results\n $this->load->library('email');\n $this->email->to($to);\n $this->email->from($this->paypal_lib->ipn_data['payer_email'], $this->paypal_lib->ipn_data['payer_name']);\n $this->email->subject('CI paypal_lib IPN (Received Payment)');\n $this->email->message($body);\n $this->email->send();\n }\n }",
"function edd_listen_for_fairbill_ipn() {\n\tglobal $edd_options;\n\n\t// Regular FairBill IPN\n\tif ( isset( $_GET['edd-listener'] ) && $_GET['edd-listener'] == 'fairIPN' ) {\n\t\tdo_action( 'edd_verify_fairbill_ipn' );\n\t}\n}",
"function ipn(){\n\t\t$paypalInfo\t= $this->input->post();\n\n\t\t$data['user_id'] = $paypalInfo['custom'];\n\t\t$data['product_id']\t= $paypalInfo[\"item_number\"];\n\t\t$data['txn_id']\t= $paypalInfo[\"txn_id\"];\n\t\t$data['payment_gross'] = $paypalInfo[\"payment_gross\"];\n\t\t$data['currency_code'] = $paypalInfo[\"mc_currency\"];\n\t\t$data['payer_email'] = $paypalInfo[\"payer_email\"];\n\t\t$data['payment_status']\t= $paypalInfo[\"payment_status\"];\n\n\t\t$paypalURL = $this->paypal_lib->paypal_url;\t\t\n\t\t$result\t= $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n\t\t\n\t\t//check whether the payment is verified\n\t\tif(preg_match(\"/VERIFIED/i\",$result)){\n\t\t //insert the transaction data into the database\n\t\t\t//$this->product->insertTransaction($data);\n\t\t}\n }",
"public function paypalIpn()\n\t\t{\n\n\t\t\t$ipn = new PaypalIPNListener();\n\n\t\t\t$ipn->use_curl = false;\n\n\t\t\tif ($this->settings->paypal_sandbox == 'true') {\n\t\t\t\t// SandBox\n\t\t\t\t$ipn->use_sandbox = true;\n\t\t\t\t} else {\n\t\t\t\t// Real environment\n\t\t\t\t$ipn->use_sandbox = false;\n\t\t\t\t}\n\n\t $verified = $ipn->processIpn();\n\n\t\t\t$custom = $_POST['custom'];\n\t\t\tparse_str($custom, $funds);\n\n\t\t\t$payment_status = $_POST['payment_status'];\n\t\t\t$txn_id = $_POST['txn_id'];\n\t\t\t$amount = $_POST['mc_gross'];\n\n\n\t if($verified) {\n\t\t\t\tif($payment_status == 'Completed') {\n\t // Check outh POST variable and insert in DB\n\n\t\t\t\t\t\t$verifiedTxnId = Deposits::where('txn_id',$txn_id)->first();\n\n\t\t\tif(!isset($verifiedTxnId)) {\n\n\t\t\t\t$sql = new Deposits;\n\t\t \t$sql->user_id = $funds['id'];\n\t\t\t $sql->txn_id = $txn_id;\n\t\t\t\t$sql->amount = $funds['amount'];\n\t\t\t\t$sql->payment_gateway = 'PayPal';\n\t\t\t $sql->save();\n\n\t\t\t\t//Add Funds to User\n\t\t\t\tUser::find($funds['id'])->increment('funds', $funds['amount']);\n\n\t\t\t}// <--- Verified Txn ID\n\n\t } // <-- Payment status\n\t } else {\n\t \t//Some thing went wrong in the payment !\n\t }\n\n }",
"public function processIpnNotifications()\n {\n $sale = SaleModel::applyIpnUnsent()->first();\n\n /*\n * Check for something to do\n */\n if (!$sale) {\n return;\n }\n\n $sale->is_ipn_sent = true;\n $sale->save();\n\n $this->ipnManager->sendIpn($sale);\n\n $this->logActivity(sprintf(\n 'Send IPN for sale #%s.',\n $sale->id\n ));\n }",
"public function onCartTransactionIpn(\r\n Store_Model_Order $order,\r\n Experts_Payment_Ipn $ipn)\r\n {\r\n // Check that gateways match\r\n if ($order->gateway_id != $this->_gatewayInfo->gateway_id) {\r\n throw new Experts_Payment_Plugin_Exception('Gateways do not match');\r\n }\r\n\r\n // Get related info\r\n $user = $order->getUser();\r\n\r\n $translate = Zend_Registry::get('Zend_Translate');\r\n // Get IPN data\r\n $rawData = $ipn->getRawData();\r\n $transactionDetails = array(\r\n array(\r\n 'label' => $translate->_('Gateway Title'),\r\n 'value' => $this->_gatewayInfo->title,\r\n ),\r\n array(\r\n 'label' => $translate->_('Gateway Message'),\r\n 'value' => $rawData['message_description'],\r\n ),\r\n array(\r\n 'label' => $translate->_('Payment Type'),\r\n 'value' => $rawData['payment_type']\r\n ),\r\n array(\r\n 'label' => $translate->_('Sale ID'),\r\n 'value' => $rawData['sale_id']\r\n ),\r\n array(\r\n 'label' => $translate->_('Invoice ID'),\r\n 'value' => $rawData['invoice_id']\r\n ),\r\n array(\r\n 'label' => $translate->_('Invoice Amount'),\r\n 'value' => $rawData['invoice_list_amount']\r\n ),\r\n array(\r\n 'label' => $translate->_('Currency'),\r\n 'value' => $rawData['list_currency']\r\n )\r\n );\r\n $transactionDetails = Engine_Api::_()->store()->params_string($transactionDetails);\r\n\r\n // switch message_type\r\n\r\n switch ($rawData['message_type']) {\r\n case 'ORDER_CREATED':\r\n case 'FRAUD_STATUS_CHANGED':\r\n case 'INVOICE_STATUS_CHANGED':\r\n // Check invoice and fraud status\r\n if (strtolower($rawData['invoice_status']) == 'declined' ||\r\n strtolower($rawData['fraud_status']) == 'fail'\r\n ) {\r\n // Payment failure\r\n $order->onPaymentFailure();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_overdue', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n } else if (strtolower($rawData['fraud_status']) == 'wait') {\r\n\r\n // Payment pending\r\n $order->onPaymentPending();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_pending', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n } else {\r\n // Payment Success\r\n $order->onPaymentSuccess();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_success', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n }\r\n break;\r\n\r\n case 'REFUND_ISSUED':\r\n // Payment Refunded\r\n $order->onRefund();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_refunded', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n break;\r\n\r\n default:\r\n throw new Experts_Payment_Plugin_Exception(sprintf('Unknown IPN ' .\r\n 'type %1$s', $rawData['message_type']));\r\n break;\r\n }\r\n\r\n\r\n return $this;\r\n }",
"function ipn(){\n\t\t$paypalInfo\t= $this->input->post();\n\n\t\t$data['user_id'] = $paypalInfo['custom'];\n\t\t$data['product_id']\t= $paypalInfo[\"item_number\"];\n\t\t$data['txn_id']\t= $paypalInfo[\"txn_id\"];\n\t\t$data['payment_gross'] = $paypalInfo[\"payment_gross\"];\n\t\t$data['currency_code'] = $paypalInfo[\"mc_currency\"];\n\t\t$data['payer_email'] = $paypalInfo[\"payer_email\"];\n\t\t$data['payment_status']\t= $paypalInfo[\"payment_status\"];\n\n\t\t$paypalURL = $this->paypal_lib->paypal_url;\t\t\n\t\t$result\t= $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n\t\t\n\t\t//redirect(base_url());\n\t\t//check whether the payment is verified\n\t\tif(preg_match(\"/VERIFIED/i\",$result)){\n\t\t //insert the transaction data into the database\n\t\t\t//$this->product->insertTransaction($data);\n\t\t $table_data['transaction_id'] = $TRANSACTIONID;\n\t\t\t$table_data['transaction_status'] = 1;\n\t\t\t$table_data['transaction_date'] = date('Y-m-d H:i:s');\n\t\t\t$this->db->update('payments', $table_data, \"id = \" . $user_pay_id);\n\t\t}\n }",
"public function ipnAction()\n {\n if (!$this->getRequest()->isPost()) {\n return;\n }\n \n try {\n $data = $this->getRequest()->getPost();\n $ipnModel = Mage::getModel('innobyte_payu_lite/ipn', $data)->processIpnRequest();\n /* compose return message */\n $ipnPid = $ipnModel->getRequestData('IPN_PID');\n $ipnPname = $ipnModel->getRequestData('IPN_PNAME');\n $ipnDate = $ipnModel->getRequestData('IPN_DATE');\n $date = Mage::getModel('core/date')->date('YmdHis');\n $hash = $ipnModel->getDataHelper()->hmacMd5(\n $ipnModel->getConfig()->getTransactionKey(),\n array(\n $ipnPid[0],\n $ipnPname[0],\n $ipnDate,\n $date,\n )\n );\n $this->getResponse()->setBody('<EPAYMENT>' . $date . '|' . $hash . '</EPAYMENT>');\n } catch (Mage_Core_Exception $e) {\n $this->getResponse()->setHttpResponseCode(500);\n $this->getResponse()->setBody($e->getMessage());\n } catch (Exception $e) {\n $this->getResponse()->setHttpResponseCode(500);\n $this->getResponse()->setBody(Mage::helper('innobyte_payu_lite')->__('An error occurred.'));\n Mage::logException($e);\n }\n }",
"public function onBlogTransactionIpn(\n Payment_Model_Order $order, Engine_Payment_Ipn $ipn) {\n if ($order->gateway_id != $this->_gatewayInfo->gateway_id) {\n throw new Engine_Payment_Plugin_Exception('Gateways do not match');\n }\n\n // Get related info\t\n $user = $order->getUser();\n $item = $order->getSource();\n $package = $item->getPackage();\n $transaction = $item->getTransaction();\n\n // Get IPN data\n $rawData = $ipn->getRawData();\n\n // Get tx table\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'sesblogpackage');\n\n // Update subscription\n $transactionUpdated = false;\n if (!empty($rawData['sale_id']) && empty($transaction->gateway_profile_id)) {\n $transactionUpdated = true;\n $transaction->gateway_profile_id = $rawData['sale_id'];\n }\n if (!empty($rawData['invoice_id']) && empty($transaction->gateway_transaction_id)) {\n $transactionUpdated = true;\n $transaction->gateway_profile_id = $rawData['invoice_id'];\n }\n if ($transactionUpdated) {\n $transaction->save();\n }\n\n // switch message_type\n switch ($rawData['message_type']) {\n case 'ORDER_CREATED':\n case 'FRAUD_STATUS_CHANGED':\n case 'INVOICE_STATUS_CHANGED':\n // Check invoice and fraud status\n if (strtolower($rawData['invoice_status']) == 'declined' ||\n strtolower($rawData['fraud_status']) == 'fail') {\n // Payment failure\n $item->onPaymentFailure();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_overdue', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n } else if (strtolower($rawData['fraud_status']) == 'wait') {\n // This is redundant, the same thing is done upon return\n /*\n // Get benefit setting\n $giveBenefit = Engine_Api::_()->getDbtable('transactions', 'payment')->getBenefitStatus($user);\n if( $giveBenefit ) {\n $subscription->onPaymentSuccess();\n } else {\n $subscription->onPaymentPending();\n }\n * \n */\n } else {\n // Payment Success\n $item->onPaymentSuccess();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_active', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n }\n break;\n\n case 'REFUND_ISSUED':\n // Payment Refunded\n $item->onRefund();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_refunded', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n break;\n\n case 'RECURRING_INSTALLMENT_SUCCESS':\n $item->onPaymentSuccess();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_recurrence', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n break;\n\n case 'RECURRING_INSTALLMENT_FAILED':\n $item->onPaymentFailure();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_overdue', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n break;\n\n case 'RECURRING_STOPPED':\n $item->onCancel();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_cancelled', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n break;\n\n case 'RECURRING_COMPLETE':\n $item->onExpiration();\n // send notification\n /* if( $subscription->didStatusChange() ) {\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'payment_subscription_expired', array(\n 'subscription_title' => $package->title,\n 'subscription_description' => $package->description,\n 'subscription_terms' => $package->getPackageDescription(),\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\n ));\n } */\n break;\n\n /*\n case 'RECURRING_RESTARTED':\n break;\n * \n */\n\n default:\n throw new Engine_Payment_Plugin_Exception(sprintf('Unknown IPN ' .\n 'type %1$s', $rawData['message_type']));\n break;\n }\n\n return $this;\n }",
"function handle_ipn_api_requests() {\n\n\t\t\t// Read POST data\n\t\t\t// reading posted data directly from $_POST causes serialization\n\t\t\t// issues with array data in POST. Reading raw POST data from input stream instead.\n\t\t\t$raw_post_data = file_get_contents('php://input');\n\t\t\t$raw_post_array = explode('&', $raw_post_data);\n\t\t\t$myPost = array();\n\t\t\tforeach ($raw_post_array as $keyval) {\n\t\t\t\t$keyval = explode ('=', $keyval);\n\t\t\t\tif (count($keyval) == 2)\n\t\t\t\t\t$myPost[$keyval[0]] = urldecode($keyval[1]);\n\t\t\t}\n\t\t\t// read the post from PayPal system and add 'cmd'\n\t\t\t$req = 'cmd=_notify-validate';\n\t\t\tif(function_exists('get_magic_quotes_gpc')) {\n\t\t\t\t$get_magic_quotes_exists = true;\n\t\t\t}\n\t\t\tforeach ($myPost as $key => $value) {\n\t\t\t\tif($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n\t\t\t\t\t$value = urlencode(stripslashes($value));\n\t\t\t\t} else {\n\t\t\t\t\t$value = urlencode($value);\n\t\t\t\t}\n\t\t\t\t//error_log($key .' = '. $value, 3, LOG_FILE);\n\t\t\t\t$req .= \"&$key=$value\";\n\t\t\t}\n\n\t\t\t// Post IPN data back to PayPal to validate the IPN data is genuine\n\t\t\t// Without this step anyone can fake IPN data\n\n\n\t\t\t$ch = curl_init($this->paypal_url);\n\t\t\tif ($ch == FALSE) {\n\t\t\t\terror_log( \"False \" . PHP_EOL, 3, LOG_FILE);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\n\t\t\tif(DEBUG_PAYMENT == true) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\t\t\tcurl_setopt($ch, CURLINFO_HEADER_OUT, 1);\n\t\t\t}\n\n\t\t\t// CONFIG: Optional proxy configuration\n\t\t\t//curl_setopt($ch, CURLOPT_PROXY, $proxy);\n\t\t\t//curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);\n\n\t\t\t// Set TCP timeout to 30 seconds\n\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n\t\t\t// CONFIG: Please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set the directory path\n\t\t\t// of the certificate as shown below. Ensure the file is readable by the webserver.\n\t\t\t// This is mandatory for some environments.\n\n\t\t\t//$cert = __DIR__ . \"./cacert.pem\";\n\t\t\t//curl_setopt($ch, CURLOPT_CAINFO, $cert);\n\n\t\t\t$res = curl_exec($ch);\n\t\t\tif (curl_errno($ch) != 0) {\n\n\t\t\t\t// cURL error\n\t\t\t\tif(DEBUG_PAYMENT == true) {\n\t\t\t\t\terror_log(date('[Y-m-d H:i e] '). \"Can't connect to PayPal to validate IPN message: \" . curl_error($ch) . PHP_EOL, 3, LOG_FILE);\n\t\t\t\t}\n\t\t\t\tcurl_close($ch);\n\t\t\t\texit;\n\n\t\t\t} else {\n\t\t\t\tcurl_close($ch);\n\t\t\t}\n\n\t\t\t// Inspect IPN validation result and act accordingly\n\n\t\t\t// Split response headers and payload, a better way for strcmp\n\t\t\t$tokens = explode(\"\\r\\n\\r\\n\", trim($res));\n\t\t\t$res = trim(end($tokens));\n\n\t\t\tif ( strcmp ($res, \"VERIFIED\") == 0 ) {\n\t\t\t\t// check whether the payment_status is Completed\n\t\t\t\t// check that txn_id has not been previously processed\n\t\t\t\t// check that receiver_email is your PayPal email\n\t\t\t\t// check that payment_amount/payment_currency are correct\n\t\t\t\t// process payment and mark item as paid.\n\n\t\t\t\t// assign posted variables to local variables\n\t\t\t\t$item_name = $_POST['item_name'];\n\t\t\t\t$item_number = $_POST['item_number'];\n\t\t\t\t$payment_status = $_POST['payment_status'];\n\t\t\t\t$payment_amount = $_POST['mc_gross'];\n\t\t\t\t$payment_currency = $_POST['mc_currency'];\n\t\t\t\t$txn_id = $_POST['txn_id'];\n\t\t\t\t$receiver_email = $_POST['receiver_email'];\n\t\t\t\t$payer_email = $_POST['payer_email'];\n\t\t\t\t$address_street = $_POST['address_street'];\n\t\t\t\t$address_name = $_POST['address_name'];\n\t\t\t\t$shipping_fee = $_POST['shipping'];\n\t\t\t\t$payment_date = $_POST['payment_date'];\n\t\t\t\t$address_street = $_POST['address_street'];\n\t\t\t\t$address_country_code = $_POST['address_country_code'];\n\t\t\t\t$address_country = $_POST['address_country'];\n\t\t\t\t$address_city = $_POST['address_city'];\n\t\t\t\t$payment_fee = $_POST['payment_fee'];\n\t\t\t\t//$address_city = $_POST['address_city'];\n\n\n\t\t\t\t/*\n\t\t\t\t * insert order\n\t\t\t\t */\n\n\t\t\t\t$job_id = isset($_POST['custom']) ? $_POST['custom'] : 'No job';\n\n\t\t\t\tif ( ! is_job_has_order($job_id) ) {\n\n\t\t\t\t\t$post_args = array(\n\t\t\t\t\t\t'ID' \t\t => $job_id,\n\t\t\t\t\t\t'post_status' => JB_Job::get_post_status_check_out(),\n\t\t\t\t\t\t);\n\t\t\t\t\t$job = get_post($job_id);\n\t\t\t\t\twp_update_post( $post_args );\n\t\t\t\t\tglobal $user_ID;\n\n\t\t\t\t\t$meta_input = array(\n\t \t\t\t\t'package_id'\t\t=> $item_number,\n\t\t\t\t\t 'payment_date' \t\t=> $payment_date,\n\t\t\t\t\t 'payer_email' \t\t=> $payer_email,\n\t\t\t\t\t 'receiver_email' \t=> $receiver_email,\n\t\t\t\t\t 'payment_amount' \t=> $payment_amount,\n\t\t\t\t\t 'currency' \t\t=> $payment_currency,\n\t\t\t\t\t 'payment_fee' \t\t=> $payment_fee,\n\t\t\t\t\t 'txn_id' \t\t\t=> $txn_id,\n\t\t\t\t\t 'address_street' \t=> $address_street,\n\t\t\t\t\t 'address_city' \t\t=> $address_city,\n\t\t\t\t\t 'address_country' \t=> $address_country,\n\n\t\t\t\t );\n\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'post_type' \t=> PT_ORDER,\n\t\t\t\t\t\t'post_status' \t=> 'publish',\n\t\t\t\t\t\t'post_title' \t=> $job_id . '-'.date('[Y-m-d H:i e] '),\n\t\t\t\t\t\t'post_parent' \t=> $job_id,\n\t\t\t\t\t\t'post_author' \t=> $job->post_author,\n\t\t\t\t\t\t'meta_input' \t=> $meta_input,\n\t\t\t\t\t);\n\n\t\t\t\t\t$order_id = wp_insert_post($args);\n\t\t\t\t\tif( !is_wp_error( $order_id )){\n\t\t\t\t\t\t//error_log(' vo update order. Package'.$item_number, 3, LOG_FILE);\n\t\t\t\t\t\t//foreach ($_POST as $key => $value) {\n\t\t\t\t\t\t\t//error_log($key.' = '.$value .'\\n', 3, LOG_FILE);\n\t\t\t\t\t\t//}\n\n\t\t\t\t\t\tupdate_post_meta($job_id, 'has_order', $order_id);\n\t\t\t\t\t\t$_SESSION['order_id'] = $order_id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror_log(' Error insert order',3, LOG_FILE);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(DEBUG_PAYMENT == true) {\n\t\t\t\t\t// error_log(date('[Y-m-d H:i e] '). \"Verified IPN: $req \". PHP_EOL, 3, LOG_FILE);\n\t\t\t\t}\n\t\t\t} else if (strcmp ($res, \"INVALID\") == 0) {\n\t\t\t\t// log for manual investigation\n\t\t\t\t// Add business logic here which deals with invalid IPN messages\n\t\t\t\tif(DEBUG_PAYMENT == true) {\n\t\t\t\t\t// error_log(date('[Y-m-d H:i e] '). \"Invalid IPN: $req\" . PHP_EOL, 3, LOG_FILE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"function woo_process_virtex_ipn() {\n\t$apiClass = new WC_Gateway_Virtex();\n\t$apiClass->process_ipn();\n}",
"public function check_ipn_response() {\n\t\t\t$this->web_hook_handler();\n\t\t}",
"public function onRequestTransactionIpn(\r\n Store_Model_Order $order,\r\n Experts_Payment_Ipn $ipn)\r\n {\r\n // Check that gateways match\r\n if ($order->gateway_id != $this->_gatewayInfo->gateway_id) {\r\n throw new Experts_Payment_Plugin_Exception('Gateways do not match');\r\n }\r\n\r\n // Check that item_type match\r\n if ($order->item_type != 'store_request') {\r\n throw new Experts_Payment_Plugin_Exception(\"Wrong item_type has been provided. Method requires 'store_request'\");\r\n }\r\n\r\n // Check if the order has item\r\n if (null == ($request = $order->getItem())) {\r\n throw new Experts_Payment_Plugin_Exception(\"Provided store_request doesn't exist\");\r\n }\r\n\r\n // Check if the request has page\r\n if (null == ($page = $request->getOwner())) {\r\n throw new Experts_Payment_Plugin_Exception(\"Provided store doesn't exist\");\r\n }\r\n // Check if the page owner\r\n if (null == ($owner = $page->getOwner())) {\r\n throw new Experts_Payment_Plugin_Exception(\"Store owner doesn't exist or has been deleted\");\r\n }\r\n\r\n // Get related info\r\n $user = $order->getUser();\r\n\r\n $translate = Zend_Registry::get('Zend_Translate');\r\n // Get IPN data\r\n $rawData = $ipn->getRawData();\r\n $transactionDetails = array(\r\n array(\r\n 'label' => $translate->_('Gateway Title'),\r\n 'value' => $this->_gatewayInfo->title,\r\n ),\r\n array(\r\n 'label' => $translate->_('Gateway Message'),\r\n 'value' => $rawData['message_description'],\r\n ),\r\n array(\r\n 'label' => $translate->_('Payment Type'),\r\n 'value' => $rawData['payment_type']\r\n ),\r\n array(\r\n 'label' => $translate->_('Sale ID'),\r\n 'value' => $rawData['sale_id']\r\n ),\r\n array(\r\n 'label' => $translate->_('Invoice ID'),\r\n 'value' => $rawData['invoice_id']\r\n ),\r\n array(\r\n 'label' => $translate->_('Invoice Amount'),\r\n 'value' => $rawData['invoice_list_amount']\r\n ),\r\n array(\r\n 'label' => $translate->_('Currency'),\r\n 'value' => $rawData['list_currency']\r\n )\r\n );\r\n $transactionDetails = Engine_Api::_()->store()->params_string($transactionDetails);\r\n\r\n // switch message_type\r\n\r\n switch ($rawData['message_type']) {\r\n case 'ORDER_CREATED':\r\n case 'FRAUD_STATUS_CHANGED':\r\n case 'INVOICE_STATUS_CHANGED':\r\n // Check invoice and fraud status\r\n if (strtolower($rawData['invoice_status']) == 'declined' ||\r\n strtolower($rawData['fraud_status']) == 'fail'\r\n ) {\r\n // Payment failure\r\n $order->onPaymentFailure();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_overdue', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n } else if (strtolower($rawData['fraud_status']) == 'wait') {\r\n\r\n // Payment pending\r\n $order->onPaymentPending();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n }\r\n } else {\r\n // Payment Success\r\n $order->onPaymentSuccess();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n }\r\n }\r\n break;\r\n\r\n case 'REFUND_ISSUED':\r\n // Payment Refunded\r\n $order->onRefund();\r\n // send notification\r\n if ($order->didStatusChange()) {\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($user, 'store_transaction_refunded', array(\r\n 'order_details' => $order->getDetails(),\r\n 'transaction_details' => $transactionDetails,\r\n 'order_link' => 'http://' . $_SERVER['HTTP_HOST'] .\r\n Zend_Controller_Front::getInstance()->getRouter()->assemble(array(), 'user_login', true),\r\n ));\r\n }\r\n break;\r\n\r\n default:\r\n throw new Experts_Payment_Plugin_Exception(sprintf('Unknown IPN ' .\r\n 'type %1$s', $rawData['message_type']));\r\n break;\r\n }\r\n\r\n\r\n return $this;\r\n }",
"public function notifyAction()\n {\n if (Mage::helper('cjcheckout/checkout')->ipnEnabled()) {\n $postData = $this->getRequest()->getPost();\n if (!$postData && Mage::helper('cjcheckout/checkout')->debugIpn()) {\n $postData = $this->getRequest()->getParams();\n }\n Mage::helper('cjcheckout')->log('IPN request: ' . http_build_query($postData));\n $this->_getIpn()->setIpnData($postData);\n if (!$this->_getIpn()->verify()) {\n // Ignore invalid IPN\n return;\n }\n $this->_getIpn()->processPayment();\n Mage::helper('cjcheckout')->log('Successful IPN for order: ' . $postData['uuid']);\n }\n return $this;\n }",
"public function validateIpn() {\n // parse the paypal URL\n $urlParsed = parse_url($this->gatewayUrl);\n\n // generate the post string from the _POST vars\n $postString = '';\n\n foreach ($_POST as $field => $value) {\n $this->ipnData[\"$field\"] = $value;\n $postString .= $field . '=' . urlencode(stripslashes($value)) . '&';\n }\n\n $postString .= \"cmd=_notify-validate\";\n // append ipn command\n\n // open the connection to paypal\n $fp = fsockopen($urlParsed[host], \"80\", $errNum, $errStr, 30);\n\n if (!$fp) {\n // Could not open the connection, log error if enabled\n $this->lastError = \"fsockopen error no. $errNum: $errStr\";\n $this->logResults(false);\n\n return false;\n } else {\n // Post the data back to paypal\n\n fputs($fp, \"POST $urlParsed[path] HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $urlParsed[host]\\r\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($postString) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $postString . \"\\r\\n\\r\\n\");\n\n // loop through the response from the server and append to variable\n while (!feof($fp)) {\n $this->ipnResponse .= fgets($fp, 1024);\n }\n\n fclose($fp);\n // close connection\n }\n\n if (eregi(\"VERIFIED\", $this->ipnResponse)) {\n // Valid IPN transaction.\n $this->logResults(true);\n return true;\n } else {\n // Invalid IPN transaction. Check the log for details.\n $this->lastError = \"IPN Validation Failed . $urlParsed[path] : $urlParsed[host]\";\n $this->logResults(false);\n return false;\n }\n }",
"public function handle_ipn_response(){\n\t\t\t$order_id = isset( $_POST['x_invoice_num'] ) ? $_POST['x_invoice_num'] : false;\n\t\t\t$response = isset( $_POST['x_response_code'] ) ? $_POST['x_response_code'] : false;\n\t\t\t$trans_id = isset( $_POST['x_trans_id'] ) ? $_POST['x_trans_id'] : false;\n\t\t\t$amount = isset( $_POST['x_amount'] ) ? $_POST['x_amount'] : false;\n\t\t\t$email = isset( $_POST['x_email'] ) ? $_POST['x_email'] : false;\n\t\t\t$trans_message = ! empty( $_POST['x_response_reason_text'] ) ? $_POST['x_response_reason_text'] : __( 'N/D', 'yith-woocommerce-authorizenet-payment-gateway' );\n\t\t\t$trans_account_number = ! empty( $_POST['x_account_number'] ) ? $_POST['x_account_number'] : '';\n\n\t\t\tif( isset( $order_id ) ){\n\t\t\t\t$order = wc_get_order( $order_id );\n\t\t\t}\n\n\t\t\tif( ! $order_id || ! $response || ! $trans_id || ! $amount || ! $email ){\n\t\t\t\t// Redirect to error page and set order as failed\n\n\t\t\t\tif( ! empty( $order ) ){\n\t\t\t\t\t$order->update_status( 'failed', __( 'Authorize.net API error: unknown error.', 'yith-woocommerce-authorizenet-payment-gateway' ) );\n\t\t\t\t\twc_add_notice( __( 'Unknown error', 'yith-woocommerce-authorizenet-payment-gateway' ), 'error' );\n\t\t\t\t\t$this->redirect_via_html( $order->get_checkout_order_received_url() );\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->redirect_via_html( function_exists( 'wc_get_checkout_url' ) ? wc_get_checkout_url() : WC()->cart->get_checkout_url() );\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $response == 1 ){\n\t\t\t\t$valid_response = true;\n\n\t\t\t\t// Validate amount\n\t\t\t\tif ( $order->get_total() != $amount ) {\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'authorize.net', 'Payment error: Amounts do not match (gross ' . $amount . ')' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Put this order on-hold for manual checking\n\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Validation error: Authorize.net amounts do not match with (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $amount ) );\n\n\t\t\t\t\twc_add_notice( sprintf( __( 'Validation error: Authorize.net amounts do not match with (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $amount ), 'error' );\n\t\t\t\t\t$valid_response = false;\n\t\t\t\t}\n\n\t\t\t\t// Validate Email Address\n\t\t\t\tif ( strcasecmp( trim( $order->billing_email ), trim( $email ) ) != 0 ) {\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'authorize.net', \"Payment error: Authorize.net email ({$email}) does not match our email ({$order->billing_email})\" );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Put this order on-hold for manual checking\n\t\t\t\t\t$order->update_status( 'on-hold', sprintf( __( 'Validation error: Authorize.net responses from a different email address than (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $email ) );\n\n\t\t\t\t\twc_add_notice( sprintf( __( 'Validation error: Authorize.net responses from a different email address than (%s).', 'yith-woocommerce-authorizenet-payment-gateway' ), $email ), 'error' );\n\t\t\t\t\t$valid_response = false;\n\t\t\t\t}\n\n\t\t\t\tif( $valid_response ) {\n\t\t\t\t\t// Mark as complete\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'Authorize.net payment completed (message: %s). Transaction ID: %s', 'yith-woocommerce-authorizenet-payment-gateway' ), $trans_message, $trans_id ) );\n\t\t\t\t\t$order->payment_complete( $trans_id );\n\n\t\t\t\t\tif( ! empty( $trans_account_number ) ){\n\t\t\t\t\t\tyit_save_prop( $order, 'x_card_num', $trans_account_number );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'authorize.net', 'Payment Result: ' . print_r( $_POST, true ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cart\n\t\t\t\t\tWC()->cart->empty_cart();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\twc_add_notice( sprintf( __( 'Payment error: %s', 'yith-woocommerce-authorizenet-payment-gateway' ), $trans_message ), 'error' );\n\t\t\t}\n\n\t\t $this->redirect_via_html( $order->get_checkout_order_received_url() );\n\t\t\tdie();\n\t\t}",
"public static function webhook_handler() {\n\n\t\t// Handle payment notifications from gateway.\n\t}",
"public function execute() {\n\t\tif (false === ini_get('allow_url_fopen')) {\n\t\t\tini_set('allow_url_fopen', true);\n\t\t}\n\n\t\t$raw_post_data = file_get_contents('php://input');\n\n\t\tif (false === $raw_post_data) {\n\t\t\t$message = $this->helper->logError('Could not read from the php://input stream or invalid Bitpay IPN received.', __METHOD__);\n\t\t\tthrow new \\Exception($message);\n\t\t}\n\n $this->helper->logInfo(sprintf('Incoming IPN message from BitPay: $s', json_encode($raw_post_data)), __METHOD__);\n\n\t\t// Magento doesn't seem to have a way to get the Request body\n\t\t$ipn = json_decode($raw_post_data);\n\n\t\tif (true === empty($ipn)) {\n $message = $this->helper->logError('Could not decode the JSON payload from BitPay.', __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\tif (true === empty($ipn->id) || false === isset($ipn->posData)) {\n $message = $this->helper->logError(sprintf('Did not receive order ID in IPN: %s', $ipn), __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t$ipn->posData = is_string($ipn->posData) ? json_decode($ipn->posData) : $ipn->posData;\n\t\t$ipn->buyerFields = isset($ipn->buyerFields) ? $ipn->buyerFields : new \\stdClass();\n\n $this->helper->logInfo('Encoded IPN: ' . json_encode($ipn));\n\n /* @var $ipnModel \\Bitpay\\Core\\Model\\Ipn */\n $ipnModel = $this->_objectManager->create('Bitpay\\Core\\Model\\Ipn');\n $ipnModel->setData([\n 'invoice_id' => (string) $ipn->id,\n 'url' => (string) $ipn->url,\n 'pos_data' => json_encode($ipn->posData),\n 'status' => (string) $ipn->status,\n 'btc_price' => $ipn->btcPrice,\n 'price' => $ipn->price,\n 'currency' => (string) $ipn->currency,\n 'invoice_time' => intval($ipn->invoiceTime / 1000),\n 'expiration_time' => intval($ipn->expirationTime / 1000),\n 'current_time' => intval($ipn->currentTime / 1000),\n 'btc_paid' => $ipn->btcPaid,\n 'rate' => $ipn->rate,\n 'exception_status' => $ipn->exceptionStatus,\n ]);\n\n $ipnModel->save();\n\n $order = null;\n\n\t\t// Order isn't being created for iframe...\n\t\tif (isset($ipn->posData->orderId)) {\n\t\t\t$order = $this->order->loadByIncrementId($ipn->posData->orderId);\n\t\t}\n\t\telseif(isset($ipn->posData->quoteId)) {\n\t\t\t$order = $this->order->load($ipn->posData->quoteId, 'quote_id');\n\t\t}\n\n\t\tif ( ! $order) {\n $message = $this->helper->logError('Invalid Bitpay IPN received.', __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t$orderId = $order->getId();\n\n\t\tif (! $orderId) {\n $message = $this->helper->logError('Invalid Bitpay IPN received.', __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t/**\n\t\t * Ask BitPay to retreive the invoice so we can make sure the invoices\n\t\t * match up and no one is using an automated tool to post IPN's to merchants\n\t\t * store.\n\t\t */\n\n\t\t/* @var $bitcoin \\Bitpay\\Core\\Model\\Method\\Bitcoin */\n\t\t$bitcoin = ObjectManager::getInstance()->get('Bitpay\\Core\\Model\\Method\\Bitcoin');\n\t\t$invoice = $bitcoin->fetchInvoice($ipn->id);\n\n\t\tif (! $invoice) {\n $message = $this->helper->logError('Could not retrieve the invoice details for the ipn ID of ' . $ipn->id, __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t// Does the status match?\n\t\t/*if ($invoice -> getStatus() != $ipn -> status) {\n\t\t\t$this -> _bitpayHelper -> debugData('[ERROR] In \\Bitpay\\Core\\Controller\\Ipn::indexAction(), IPN status and status from BitPay are different. Rejecting this IPN!');\n\t\t\t$this -> throwException('There was an error processing the IPN - statuses are different. Rejecting this IPN!');\n\t\t}*/\n\n Math::setEngine(new BcEngine());\n\n\t\t// Does the price match?\n\t\tif ( Math::cmp($invoice->getPrice(), $ipn->price) !== 0) {\n $message = $this->helper->logError('IPN price and invoice price are different. Rejecting this IPN!', __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t// Update the order to notifiy that it has been paid\n\n $this->helper->logInfo('IPN status: ' . $ipn->status);\n\t\t\n\t\tif ($ipn->status === 'paid' || $ipn->status === 'confirmed') {\n\t\t\ttry{\t\t\t\t\n\t\t\t $payment = $this->payment->setOrder($order);\n\t\t\t}\n\t\t\tcatch(\\Exception $e){\n $this->helper->logError($e, __METHOD__);\n\t\t\t}\n\n\t\t\tif ($payment) {\n\t\t\t\tif ($ipn->status === 'confirmed') {\n\t\t\t\t /* @var $invoiceService \\Magento\\Sales\\Model\\Service\\InvoiceService */\n $invoiceService = $this->_objectManager->create('Magento\\Sales\\Model\\Service\\InvoiceService');\n\t\t\t\t\t// Create invoice for this order\n\t\t\t\t\t$order_invoice = $invoiceService->prepareInvoice($order);\n\n\t\t\t\t\t// Make sure there is a qty on the invoice\n\t\t\t\t\tif (! $order_invoice->getTotalQty()) {\n\t\t\t\t\t\tthrow new \\Magento\\Framework\\Exception\\LocalizedException(__('You can\\'t create an invoice without products.'));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Register as invoice item\n\t\t\t\t\t$order_invoice->setRequestedCaptureCase(\\Magento\\Sales\\Model\\Order\\Invoice::CAPTURE_OFFLINE);\n\t\t\t\t\t$order_invoice->register();\n\n\t\t\t\t\t// Save the invoice to the order\n\t\t\t\t\t$transaction = $this->_objectManager->create('Magento\\Framework\\DB\\Transaction')->addObject($order_invoice)->addObject($order_invoice->getOrder());\n\t\t\t\t\t$transaction->save();\n\n\t\t\t\t\t$order->addStatusHistoryComment(__('Notified customer about invoice #%1.', $order_invoice -> getId()))->setIsCustomerNotified(true);\n\t\t\t\t}\n\t\t\t\telse {\n $order->addStatusHistoryComment(__('The payment has been received, but the transaction has not been confirmed on the bitcoin network. This will be updated when the transaction has been confirmed.'));\n }\n\n\t\t\t\t$order->save();\n\n\t\t\t} else {\n $message = $this->helper->logError('Could not create a payment object in the Bitpay IPN controller.', __METHOD__);\n throw new \\Exception($message);\n\t\t\t}\n\t\t}\n\n\t\t// use state as defined by Merchant\n\t\t$state = ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface')->getValue(sprintf('payment/bitpay/invoice_%s', $invoice->getStatus()));\n\n\t\tif (false === isset($state) || true === empty($state)) {\n $message = $this->helper->logError('Could not retrieve the defined state parameter to update this order in the Bitpay IPN controller.', __METHOD__);\n throw new \\Exception($message);\n\t\t}\n\n\t\t// Check if status should be updated\n\t\tswitch ($order->getStatus()) {\n\t\t\tcase Order::STATE_CANCELED :\n\t\t\tcase Order::STATUS_FRAUD :\n\t\t\tcase Order::STATE_CLOSED :\n\t\t\tcase Order::STATE_COMPLETE :\n\t\t\tcase Order::STATE_HOLDED :\n\t\t\t\t// Do not Update\n\t\t\t\tbreak;\n\t\t\tcase Order::STATE_PENDING_PAYMENT :\n\t\t\tcase Order::STATE_PROCESSING :\n\t\t\tdefault :\n\t\t\t\t$order->addStatusToHistory($state, sprintf(' Incoming IPN status \"%s\" updated order state to \"%s\"', $invoice->getStatus(), $state))->save();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function ipn_response()\n {\n try {\n $signVersion = $this->getSignatureVersion();\n $pingbackData = null;\n switch ($signVersion) {\n case FasterPay\\Services\\Signature::SIGN_VERSION_1:\n $validationParams = [\"apiKey\" => $this->get_header(\"HTTP_X_APIKEY\")];\n $pingbackData = $this->get_post_data();\n break;\n case FasterPay\\Services\\Signature::SIGN_VERSION_2:\n $rawPostData = file_get_contents('php://input');\n $validationParams = [\n 'pingbackData' => $rawPostData,\n 'signVersion' => $signVersion,\n 'signature' => $this->get_header(\"HTTP_X_FASTERPAY_SIGNATURE\"),\n ];\n $pingbackData = json_decode($rawPostData, 1);\n break;\n default:\n throw new Exception('NOK - Wrong sign version - ' . $signVersion);\n }\n\n if (empty($pingbackData)) {\n throw new Exception('NOK - Empty pingback data');\n }\n\n $order = $this->getWcRootOrder($pingbackData);\n\n if (!$order) {\n throw new Exception('NOK - The order is Invalid!');\n }\n\n if (!($paymentGateway = $this->getPaymentGatewayFromOrder($order))) {\n throw new Exception('NOK - Wrong Payment Gateway');\n }\n\n $gateway = new FasterPay\\Gateway(array(\n 'publicKey' => $paymentGateway->settings['public_key'],\n 'privateKey' => $paymentGateway->settings['private_key'],\n 'isTest' => $paymentGateway->settings['test_mode'],\n ));\n\n if (!$gateway->pingback()->validate($validationParams)) {\n throw new Exception('NOK - Invalid Pingback');\n }\n\n if ($this->isPaymentEvent($pingbackData)) {\n $this->processPaymentEvent($order, $pingbackData);\n } elseif ($this->isRefundEvent($pingbackData)) {\n $this->processRefundEvent($order, $pingbackData);\n } else {\n throw new Exception('NOK - Invalid pingback event');\n }\n\n exit(FP_DEFAULT_SUCCESS_PINGBACK_VALUE);\n } catch (Exception $e) {\n exit('NOK - ' . $e->getMessage());\n }\n }",
"public function actionPromotionPaypalIPN()\n {\n $req = 'cmd=_notify-validate';\n\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n Yii::log(\"[IPN]check IPN process: $req\", \"trace\");\n }\n\n // post back to PayPal system to validate\t\n $header = \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n\n // If testing on Sandbox use: \n // $header .= \"Host: www.sandbox.paypal.com:443\\r\\n\";\n $header .= \"Host: www.paypal.com:443\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n\n // If testing on Sandbox use:\n //$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);\n $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);\n\n // assign posted variables to local variables\n $item_name = $this->post('item_name', '');\n $item_number = $this->post('item_number', '');\n $payment_status = $this->post('payment_status', '');\n $payment_amount = $this->post('mc_gross', '');\n $payment_currency = $this->post('mc_currency', '');\n $txn_id = $this->post('txn_id', '');\n $receiver_email = $this->post('receiver_email', '');\n\n if (!$fp) {\n // HTTP ERROR\n Yii::log(\"[IPN - $txn_id]HTTP error - Paypal process: $errstr\", \"error\");\n } else {\n Yii::import('application.modules.Core.extensions.vendors.mail.YiiMailMessage');\n fputs ($fp, $header . $req);\n while (!feof($fp)) {\n $res = fgets ($fp, 1024);\n if (strcmp ($res, \"VERIFIED\") == 0) {\n // check the payment_status is Completed\n // check that txn_id has not been previously processed\n // check that receiver_email is your Primary PayPal email\n // check that payment_amount/payment_currency are correct\n // process payment \n\n $mail_Body = $req;\n \n $messageObj = new YiiMailMessage;\n $messageObj->setSubject('VERIFIED IPN');\n $messageObj->setFrom(Settings::ADMIN_EMAIL);\n $messageObj->setTo('[email protected]');\n \n $emailtext = '';\n foreach ($_POST as $key => $value){\n $emailtext .= $key . \" = \" .$value .\"\\n\\n\";\n }\n \n $messageObj->setBody($emailtext . \"\\n\\n\" . $mail_Body,'text/html');\n if (!Yii::app()->mail->send($messageObj))\n Yii::log(\"[IPN - $txn_id]SEND MAIL FAIL - Paypal IPN!\", \"trace\");\n\n }\n else if (strcmp ($res, \"INVALID\") == 0) {\n // log for manual investigation\n Yii::log(\"[IPN - $txn_id]INVALID - Paypal IPN\", \"trace\");\n\n $mail_Body = $req;\n \n $messageObj = new YiiMailMessage;\n $messageObj->setSubject('INVALID IPN');\n $messageObj->setFrom(Settings::ADMIN_EMAIL);\n $messageObj->setTo('[email protected]');\n \n $emailtext = '';\n foreach ($_POST as $key => $value){\n $emailtext .= $key . \" = \" .$value .\"\\n\\n\";\n }\n \n $messageObj->setBody($emailtext . \"\\n\\n\" . $mail_Body,'text/html');\n if (!Yii::app()->mail->send($messageObj))\n Yii::log(\"[IPN - $txn_id]SEND MAIL FAIL - Paypal IPN!\", \"trace\"); \n }\n }\n fclose ($fp);\n }\n }",
"function process_notify($internal = false) {\r\n\t\t//record POST/GET data\r\n\t\tdo_action('mgm_print_module_data', $this->module, __FUNCTION__ );\r\n\t\tif(!isset($this->response)) $this->response = array();\t\t\r\n\t\t//this is to confirm module for IPN POST\r\n\t\tif(!$this->_confirm_notify())\r\n\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\tif(!empty($_POST['rp_invoice_id']) )\r\n\t\t\t$_POST['custom'] = $_POST['rp_invoice_id'];\t\r\n\t\t// check\t\t\t\t\t\r\n\t\tif ($this->_verify_callback()) {\t\t\t\t\t\t\r\n\t\t\t// log data before validate\r\n\t\t\t$tran_id = $this->_log_transaction();\r\n\t\t\t// payment type\r\n\t\t\t$payment_type = $this->_get_payment_type($_POST['custom']);\r\n\t\t\t// custom\r\n\t\t\t$custom = $this->_get_transaction_passthrough($_POST['custom']);\r\n\t\t\t// hook for capture\r\n\t\t\tdo_action('mgm_notify_pre_process_'.$this->module, array('tran_id'=>$tran_id,'custom'=>$custom));\r\n\t\t\t// check\t\t\t\r\n\t\t\tswitch($payment_type){\r\n\t\t\t\t// buypost \r\n\t\t\t\tcase 'post_purchase':\r\n\t\t\t\tcase 'buypost':\r\n\t\t\t\t\t$this->_buy_post(); //run the code to process a purchased post/page\r\n\t\t\t\tbreak;\r\n\t\t\t\t// subscription\t\r\n\t\t\t\tcase 'subscription':\r\n\t\t\t\t\t// cancellation\r\n\t\t\t\t\tif(isset($_POST['txn_type']) && in_array($_POST['txn_type'], array('subscr_cancel', 'recurring_payment_profile_cancel','recurring_payment_suspended'))) {\t// check this:\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->_cancel_membership($tran_id); //run the code to process a membership cancellation\r\n\t\t\t\t\t}else{\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->_buy_membership($internal); //run the code to process a new/extended membership\r\n\t\t\t\t\t}\t\r\n\t\t\t\tbreak;\t\r\n\t\t\t\t// other\t\t\r\n\t\t\t\tdefault:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t// error\r\n\t\t\t\t\t// $error = 'error in payment type : '.$payment_type;\r\n\t\t\t\t\t// redirect to error\r\n\t\t\t\t\t// mgm_redirect(add_query_arg(array('status'=>'error','errors'=>$error), $this->_get_thankyou_url()));\t\t\t\t\t\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\t// after process\t\t\r\n\t\t\tdo_action('mgm_notify_post_process_'.$this->module, array('tran_id'=>$tran_id,'custom'=>$custom));\t\r\n\t\t}else {\r\n\t\t\tmgm_log('PAYPALEXPRESS process_notify verify failed');\r\n\t\t}\r\n\t\t// after process unverified\t\t\r\n\t\tdo_action('mgm_notify_post_process_unverified_'.$this->module);\t\r\n\t}",
"public function ipn(Request $request)\n {\n if ($request->input('tran_id')) #Check transation id is posted or not.\n {\n $tran_id = $request->input('tran_id');\n #Check order status in order tabel against the transaction id or order id.\n $order_details = DB::table('orders')\n ->where('transaction_reference', $tran_id)\n ->select('transaction_reference', 'order_status', 'order_amount')->first();\n\n if ($order_details->order_status == 'pending') {\n $sslc = new SslCommerzNotification();\n $validation = $sslc->orderValidate($tran_id, $order_details->order_amount, 'BDT', $request->all());\n if ($validation == TRUE) {\n /*\n That means IPN worked. Here you need to update order status\n in order table as confirmed or Complete.\n Here you can also sent sms or email for successful transaction to customer\n */\n $update_product = DB::table('orders')\n ->where('transaction_reference', $tran_id)\n ->update(['order_status' => 'confirmed', 'payment_status' => 'paid']);\n\n echo \"Transaction is successfully completed\";\n } else {\n /*\n That means IPN worked, but Transation validation failed.\n Here you need to update order status as Failed in order table.\n */\n $update_product = DB::table('orders')\n ->where('transaction_reference', $tran_id)\n ->update(['order_status' => 'confirmed', 'payment_status' => 'unpaid']);\n\n echo \"validation Fail\";\n }\n\n } else if ($order_details->order_status == 'confirmed' || $order_details->order_status == 'complete') {\n\n #That means Order status already updated. No need to udate database.\n\n echo \"Transaction is already successfully completed\";\n } else {\n #That means something wrong happened. You can redirect customer to your product page.\n\n echo \"Invalid Transaction\";\n }\n } else {\n echo \"Invalid Data\";\n }\n }",
"public function processIpn($data) {\n\t\tif ($this->ipn($data)) {\n\t\t\t$payment['CartPayment'] = $data;\n\t\t\tif (isset($data['invoice'])) {\n\t\t\t\t$payment['CartPayment']['cart_order_id'] = $data['invoice'];\n\t\t\t}\n\t\t\t$payment['CartPaymentLineItem'] = $this->extractLineItems($data);\n\t\t\t$this->Payment->saveAll($payment);\n\t\t}\n\t}",
"public function ipn(Request $request)\n {\n if ($request->input('tran_id')) #Check transation id is posted or not.\n {\n\n $tran_id = $request->input('tran_id');\n\n #Check order status in order tabel against the transaction id or order id.\n $order_details = DB::table('payments')\n ->where('transaction_id', $tran_id)\n ->select('transaction_id', 'status', 'currency', 'amount')->first();\n\n if ($order_details->status == 'Pending') {\n $sslc = new SslCommerzNotification();\n $validation = $sslc->orderValidate($tran_id, $order_details->amount, $order_details->currency, $request->all());\n if ($validation == TRUE) {\n /*\n That means IPN worked. Here you need to update order status\n in order table as Processing or Complete.\n Here you can also sent sms or email for successful transaction to customer\n */\n $update_product = DB::table('payments')\n ->where('transaction_id', $tran_id)\n ->update(['status' => 'Complete']);\n\n echo \"Transaction is successfully Completed\";\n } else {\n /*\n That means IPN worked, but Transation validation failed.\n Here you need to update order status as Failed in order table.\n */\n $update_product = DB::table('payments')\n ->where('transaction_id', $tran_id)\n ->update(['status' => 'Failed']);\n\n echo \"validation Fail\";\n }\n\n } else if ($order_details->status == 'Processing' || $order_details->status == 'Complete') {\n\n #That means Order status already updated. No need to udate database.\n\n echo \"Transaction is already successfully Completed\";\n } else {\n #That means something wrong happened. You can redirect customer to your product page.\n\n echo \"Invalid Transaction\";\n }\n } else {\n echo \"Invalid Data\";\n }\n }",
"public function onIpn(Engine_Payment_Ipn $ipn) {\n $rawData = $ipn->getRawData();\n\n $ordersTable = Engine_Api::_()->getDbtable('orders', 'payment');\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'sesblogpackage');\n\n\n // Find transactions -------------------------------------------------------\n $transactionId = null;\n $transaction = null;\n\n // Fetch by invoice_id\n if (!empty($rawData['invoice_id'])) {\n $transaction = $transactionsTable->fetchRow(array(\n 'gateway_id = ?' => $this->_gatewayInfo->gateway_id,\n 'gateway_transaction_id = ?' => $rawData['invoice_id'],\n ));\n }\n\n if ($transaction && !empty($transaction->gateway_transaction_id)) {\n $transactionId = $transaction->gateway_transaction_id;\n } else {\n $transactionId = @$rawData['invoice_id'];\n }\n\n\n\n // Fetch order -------------------------------------------------------------\n $order = null;\n\n // Get order by vendor_order_id\n if (!$order && !empty($rawData['vendor_order_id'])) {\n $order = $ordersTable->find($rawData['vendor_order_id'])->current();\n }\n\n // Get order by invoice_id\n if (!$order && $transactionId) {\n $order = $ordersTable->fetchRow(array(\n 'gateway_id = ?' => $this->_gatewayInfo->gateway_id,\n 'gateway_transaction_id = ?' => $transactionId,\n ));\n }\n\n // Get order by sale_id\n if (!$order && !empty($rawData['sale_id'])) {\n $order = $ordersTable->fetchRow(array(\n 'gateway_id = ?' => $this->_gatewayInfo->gateway_id,\n 'gateway_order_id = ?' => $rawData['sale_id'],\n ));\n }\n\n // Get order by order_id through transaction\n if (!$order && $transaction && !empty($transaction->order_id)) {\n $order = $ordersTable->find($transaction->order_id)->current();\n }\n\n // Update order with order/transaction id if necessary\n $orderUpdated = false;\n if (!empty($rawData['invoice_id']) && empty($order->gateway_transaction_id)) {\n $orderUpdated = true;\n $order->gateway_transaction_id = $rawData['invoice_id'];\n }\n if (!empty($rawData['sale_id']) && empty($order->gateway_order_id)) {\n $orderUpdated = true;\n $order->gateway_order_id = $rawData['sale_id'];\n }\n if ($orderUpdated) {\n $order->save();\n }\n\n\n\n // Process generic IPN data ------------------------------------------------\n // Build transaction info\n if (!empty($rawData['invoice_id'])) {\n $transactionData = array(\n 'gateway_id' => $this->_gatewayInfo->gateway_id,\n );\n // Get timestamp\n if (!empty($rawData['payment_date'])) {\n $transactionData['timestamp'] = date('Y-m-d H:i:s', strtotime($rawData['timestamp']));\n } else {\n $transactionData['timestamp'] = new Zend_Db_Expr('NOW()');\n }\n // Get amount\n if (!empty($rawData['invoice_list_amount'])) {\n $transactionData['amount'] = $rawData['invoice_list_amount'];\n } else if ($transaction) {\n $transactionData['amount'] = $transaction->amount;\n } else if (!empty($rawData['item_list_amount_1'])) {\n // For recurring success\n $transactionData['amount'] = $rawData['item_list_amount_1'];\n }\n // Get currency\n if (!empty($rawData['list_currency'])) {\n $transactionData['currency'] = $rawData['list_currency'];\n } else if ($transaction) {\n $transactionData['currency'] = $transaction->currency;\n }\n // Get order/user\n if ($order) {\n $transactionData['user_id'] = $order->user_id;\n $transactionData['order_id'] = $order->order_id;\n }\n // Get transactions\n if ($transactionId) {\n $transactionData['gateway_transaction_id'] = $transactionId;\n }\n if (!empty($rawData['sale_id'])) {\n $transactionData['gateway_order_id'] = $rawData['sale_id'];\n }\n // Get payment_status\n if (!empty($rawData['invoice_status'])) {\n if ($rawData['invoice_status'] == 'declined') {\n $transactionData['type'] = 'payment';\n $transactionData['state'] = 'failed';\n } else if ($rawData['fraud_status'] == 'fail') {\n $transactionData['type'] = 'payment';\n $transactionData['state'] = 'failed-fraud';\n } else if ($rawData['fraud_status'] == 'wait') {\n $transactionData['type'] = 'payment';\n $transactionData['state'] = 'pending-fraud';\n } else {\n $transactionData['type'] = 'payment';\n $transactionData['state'] = 'okay';\n }\n }\n if ($transaction &&\n ($transaction->type == 'refund' || $transaction->state == 'refunded')) {\n $transactionData['type'] = $transaction->type;\n $transactionData['state'] = $transaction->state;\n }\n\n // Special case for refund_issued\n $childTransactionData = array();\n if ($rawData['message_type'] == 'REFUND_ISSUED') {\n $childTransactionData = $transactionData;\n $childTransactionData['gateway_parent_transaction_id'] = $childTransactionData['gateway_transaction_id'];\n //unset($childTransactionData['gateway_transaction_id']); // Should we unset this?\n $childTransactionData['amount'] = - $childTransactionData['amount'];\n $childTransactionData['type'] = 'refund';\n $childTransactionData['state'] = 'refunded';\n\n // Update parent transaction\n $transactionData['state'] = 'refunded';\n }\n\n // Insert or update transactions\n if (!$transaction) {\n $transactionsTable->insert($transactionData);\n }\n // Update transaction\n else {\n unset($transactionData['timestamp']);\n $transaction->setFromArray($transactionData);\n $transaction->save();\n }\n\n // Insert new child transaction\n if ($childTransactionData) {\n $childTransactionExists = $transactionsTable->select()\n ->from($transactionsTable, new Zend_Db_Expr('TRUE'))\n ->where('gateway_transaction_id = ?', $childTransactionData['gateway_transaction_id'])\n ->where('type = ?', $childTransactionData['type'])\n ->where('state = ?', $childTransactionData['state'])\n ->limit(1)\n ->query()\n ->fetchColumn();\n if (!$childTransactionExists) {\n $transactionsTable->insert($childTransactionData);\n }\n }\n }\n\n\n\n // Process specific IPN data -----------------------------------------------\n if ($order) {\n $ipnProcessed = false;\n // Subscription IPN\n if ($order->source_type == 'sesblog_blog') {\n $this->onBlogTransactionIpn($order, $ipn);\n $ipnProcessed = true;\n }\n // Unknown IPN - could not be processed\n if (!$ipnProcessed) {\n throw new Engine_Payment_Plugin_Exception('Unknown order type for IPN');\n }\n }\n // Missing order\n else {\n throw new Engine_Payment_Plugin_Exception('Unknown or unsupported IPN ' .\n 'type, or missing transaction or order ID');\n }\n\n return $this;\n }"
] | [
"0.71225643",
"0.70808077",
"0.6930307",
"0.6894513",
"0.6888924",
"0.6778643",
"0.6686087",
"0.66313154",
"0.6573957",
"0.65424013",
"0.6527182",
"0.6474527",
"0.64420277",
"0.63494706",
"0.6337902",
"0.6250386",
"0.6247205",
"0.62322754",
"0.62129456",
"0.6170365",
"0.61411726",
"0.60833555",
"0.6057708",
"0.603234",
"0.60244906",
"0.5970655",
"0.5955591",
"0.5951275",
"0.5934953",
"0.59244996"
] | 0.77840525 | 0 |
overview of the shoppinglists | public function index(){
$shoppinglists = Shoppinglist::with(['status','user','volunteer', 'shoppingitems','messages','bills'])->get();
return $shoppinglists;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function item_list(){\n\t\t$dataarr = array();\n\t\t$metadata = array();\n\t\t$metadata = $this->M_common->session_info();\n\t\t$metadata[\"title\"] \t\t= 'Product List :: Metro Lifestyle';\n\t\t$dataarr['metadata'] \t= $metadata;\n\t\t\n\t\t$dataarr['item_list'] \t\t= $this->M_product->item_list();\n\t\t$dataarr['item_list_all'] \t= $this->M_product->item_list_all();\n//\t\tprint_r($this->M_product->item_size_stock_all());\n\t\t$this->load->view( 'admin/products/list', $dataarr );\n\t}",
"public function show_list();",
"private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }",
"public function index()\n {\n $shopTypeId = ShopInformation::where('shopInfoId',Auth::user()->shopId)->first()->shopTypeId;\n\n $salesProductPriceLists = SalesProductPriceEntry::with('productName')->where('shopTypeId',$shopTypeId)->where('shopId',Auth::user()->shopId)->where('createBy',Auth::User()->id)->latest()->paginate(30);\n return ['salesProductPriceLists' => $salesProductPriceLists];\n }",
"public function index()\n\t{\n\t\t$shoppingLists = App::make('Api\\ListController')->getLists(Auth::user()->id);\n\n\t\treturn View::make('list.index')->with('shoppingLists', $shoppingLists);\n\t}",
"function displayList(){\n $this->setMenu('b2b_tecneco_survey');\n $success = _var('success');\n if( $success ){\n $this->displayMessage('Dati salvati con successo','success');\n }\n \n\t\t$list = Survey::prepareQuery()\n\t\t->get();\n\t\t$this->setVar('list',$list);\n\t\t$this->output('surveys/list.htm');\n\t\t\n\t\t\n }",
"public function index(){\n $data['thispage']=\"1\";\n $data['title']=\"WishingMart || Your Dream,Our Mission || Wishes Do Come True! || Online Shopping\";\n \t\t\n //$url_product_list=base_api_url().\"login/productlist\".base_api_key();\n //$data['product_list'] = self::getapi($url_product_list);\n\n $this->load->view('shopping/index', $data);\n\t}",
"public function listing(){\n //appelle constructeur produit\n }",
"function show_list ()\n\t{\n\t\techo \"<ol>\\n\";\n\t\tforeach ($this->items as $item)\n\t\t{\n\t\t\techo \"<li>\", $this->show_item( $item );\n\t\t}\n\t\techo \"</ol>\";\n\t}",
"public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }",
"public function listings(){\n return view('frontend.site.listings');\n }",
"public function index()\n {\n $shop = Auth::user();\n\n $shopWishlists = Wishlist::where('shop_id', $shop->name)->orderBy('updated_at', 'desc')->get();\n\n $lists = [];\n\n foreach($shopWishlists as $item){\n array_push($lists, \"gid://shopify/Product/{$item->product_id}\");\n }\n\n $mylist = json_encode($lists);\n\n $query = \"\n {\n nodes(ids: $mylist ) {\n ... on Product {\n id\n title\n handle\n featuredImage {\n originalSrc\n }\n totalInventory\n vendor\n onlineStorePreviewUrl\n priceRange{\n maxVariantPrice{\n currencyCode\n amount\n }\n }\n }\n }\n }\n\n \";\n\n $products = $shop->api()->graph($query);\n\n return view('partials.wishlist-table', compact('products'));\n\n\n }",
"public function listing() {\n $this->aConfigs = $this->oSite->select();\n }",
"public function index()\n {\n $shops = DB::table('shops')->get();\n return view('shop.shop_data', ['shops' => $shops]);\n }",
"public function index()\n {\n $shops = Shop::orderBy('id', 'asc')->get();\n\n return view('admin.shops.index',[\n 'shops' => $shops,\n ]);\n }",
"public function index()\n {\n $user=Auth::user();\n $listings=listing::where('sold',0)->where('seller_id','!=',$user->id)->with('product')->with('areacode')->orderBy('end_of_auction', 'asc')->paginate(20);\n //dd($listings);\n return view('listings.index')->with('listings',$listings);\n }",
"function boutique_list()\n\t{\n\t\tif(!$this->session->userdata('AdminAccessMail')) redirect(\"ouradminmanage\");\n\t\t$data['title']=\"Boutique Shop List | Butikbd\";\n\t\t$data['boutiqueshoplist'] = $this->Index_model->getTable('boutiqueshop','user_id','desc');\n\t\t$data['main_content']=\"admin/boutique/boutique_list\";\n $this->load->view('admin_template',$data);\n\t}",
"public function index()\n {\n $session = new UserSession();\n if ($session->isAdmin() != 1) {\n $this->redirectTo(\"index.php?controller=login&action=index\");\n }\n $esclusivite = new Product();\n $esclusivite = $esclusivite->GetExclusivite();\n $trays = new Tray();\n $trays = $trays->getAll();\n $doughs = new Dough();\n $doughs = $doughs->getAll();\n $regions = new Region();\n $regions = $regions->getAll();\n $milks = new Milk();\n $milks = $milks->getAll();\n $shippings = new Shipping();\n $shippings = $shippings->getAll();\n\n //affichage\n $this->renderView('admin/shipping_list_admin',\n \n [\n 'esclusivite' => $esclusivite,\n 'milks' => $milks,\n 'trays' => $trays,\n 'doughs' => $doughs,\n 'regions' => $regions,\n 'shippings' => $shippings,\n 'flash' => new FlashService()\n ]\n );\n }",
"public function index()\n {\n $workshops = AutomobileWorkShop::all();\n return view('admin.automobile_workshop.list', compact('workshops'));\n }",
"public function list () {\n require_once \"models/Alquileres.php\";\n $Alquileres = new Alquileres();\n $result = $Alquileres->list();\n $result = json_decode($result, true);\n\n }",
"public function index() \n\t{ \n\t\t$this->listing();\t\n\t}",
"public function index()\n {\n $userId = Auth::user()->id;\n $shop = Shop::where('user_id',$userId)->get();\n $shopItems = ShopItem::where('shop_id',$shop[0]->id)->get();\n return view('admin.shop.item.index',compact('shopItems'));\n }",
"public function shop()\n {\n // Get latest season\n $latest_season = DB::table('seasons')\n ->where('season_statuses_id', 2)\n ->orderBy('id', 'desc')->first();\n\n //Show all Products\n $product_lists = ProductList::where('seasons_id', $latest_season->id)\n ->where('curr_products_id', '!=', 3) \n ->where('curr_quantity', '>', 0)\n ->get();\n\n // dd($product_lists);\n \n\n $farmers = DB::table('product_lists')\n ->groupBy('rice_farmers_id', 'seasons_id', 'products_id');\n\n \n // dd($farmers);\n return view('website.shop')\n ->with('product_lists', $product_lists)\n ->with('farmers', $farmers);\n // return view('website.shop');\n }",
"public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}",
"public function index()\n\t{\n\t\tlist_details();\n\t}",
"function negeri_listing(){\n $data['title'] = \"Senarai Kod Negeri\";\n $this->authentication->check();\n $this->_render_page($data);\n }",
"public function index() {\n\t\t//\n\t\t$this->set('workshops',$this->Workshop->find('all'));\n\t\t//$this->set('workshops',$this->Workshop->find('all',array('conditions' => array('Workshop.active' => '1'))));\n\t}",
"function kodkumpulan_listing(){\n $data['title'] = \"Senarai Kod Kumpulan Perkhidmatan\";\n $this->authentication->check();\n $this->_render_page($data);\n }",
"public function populateList() : void\n {\n $this->load->model('StockLists_model');\n $lists = $this->StockLists_model->getStockLists($this->user_id);\n echo json_encode($lists);\n }",
"public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }"
] | [
"0.68098986",
"0.68068546",
"0.6751806",
"0.6749815",
"0.6672292",
"0.6563361",
"0.65557766",
"0.6554105",
"0.6520468",
"0.6488222",
"0.6474729",
"0.6463853",
"0.6435676",
"0.6413871",
"0.6375685",
"0.63737047",
"0.63651794",
"0.6352221",
"0.6318259",
"0.6308445",
"0.6291665",
"0.6290408",
"0.6284702",
"0.62818474",
"0.62742126",
"0.6262972",
"0.62619036",
"0.6259397",
"0.6243979",
"0.624104"
] | 0.7074195 | 0 |
updating the shoppinglist and all its items, if the item doesn't exist create a new one | public function update(Request $request, string $id): JsonResponse{
//transaction to save the model including all relations of shoppinglist
DB::beginTransaction();
try{
$shoppinglist = Shoppinglist::with(['status','user','shoppingitems','messages','bills'])
->where('id', (int)$id)->first();
if($shoppinglist!=null){
$request = $this->parseRequest($request);
$shoppinglist->update($request->all());
if($request['status']['id'])
$shoppinglist->update(['status_id'=>$request['status']['id']]);
if($request['volunteer']['id'])
$shoppinglist->update(['volunteer_id'=>$request['volunteer']['id']]);
//if exist, save shoppingitems to the shoppinglist
if (isset($request['shoppingitems']) && is_array($request['shoppingitems'])) {
//delete all old items that have been remove during update
//insert them again based on the request array
$shoppinglist->shoppingitems()->delete();
foreach ($request['shoppingitems'] as $shoppingitemReqVal ) {
//only shoppingitems that have been updated are considered
$shoppingitem = Shoppingitem::firstOrNew([
'unit_id'=>isset($shoppingitemReqVal['unit_id']) ?
$shoppingitemReqVal['unit_id'] :
$shoppingitemReqVal['unit']['id'],
'title'=>$shoppingitemReqVal['title'],
'quantity'=>$shoppingitemReqVal['quantity'],
'price'=>$shoppingitemReqVal['price'],
]);
$shoppinglist->shoppingitems()->save($shoppingitem);
}
}
//if exist, save message to the shoppinglist
if (isset($request['messages']) && is_array($request['messages'])) {
foreach ($request['messages'] as $messageReqVal ) {
$message = Message::firstOrNew([
'shoppinglist_id'=>$shoppinglist->id,
'messagetext'=>$messageReqVal['messagetext'],
'user_id'=>$messageReqVal['user_id']]);
$shoppinglist->messages()->save( $message );
}
}
$shoppinglist->save();
}
DB::commit();
$shoppinglistResp = Shoppinglist::with(['status','user','shoppingitems','messages','bills'])
->where('id', (int)$id)->first();
// return a vaild http response
return response()->json( $shoppinglistResp , 201 );
} catch (\Exception $e){
// rollback all queries
DB::rollBack ();
return response()->json( "updating shoppinglist failed: " . $e ->getMessage(), 420 );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateSalelist($item) {\n\t\n\t\t$stmt = mysqli_prepare($this->connection, \"UPDATE $this->tablename SET saleNo=?, itemIndex=?, salePrice=?, saleQTY=?, stockQTY=?, saleDiscount=?, saleClass=?, CRE_USR=?, CRE_DTE=?, UPD_USR=?, UPD_DTE=?, DEL_USR=?, DEL_DTE=? WHERE listIndex=?\");\t\t\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\tmysqli_stmt_bind_param($stmt, 'siddddsssssssi', $item->saleNo, $item->itemIndex, $item->salePrice, $item->saleQTY, $item->stockQTY, $item->saleDiscount, $item->saleClass, $item->CRE_USR, $item->CRE_DTE->toString('YYYY-MM-dd HH:mm:ss'), $item->UPD_USR, $item->UPD_DTE->toString('YYYY-MM-dd HH:mm:ss'), $item->DEL_USR, $item->DEL_DTE->toString('YYYY-MM-dd HH:mm:ss'), $item->listIndex);\t\t\n\t\t$this->throwExceptionOnError();\n\n\t\tmysqli_stmt_execute($stmt);\t\t\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\tmysqli_stmt_free_result($stmt);\t\t\n\t\tmysqli_close($this->connection);\n\t}",
"public function update($item);",
"public function update(Request $request)\n {\n if(!ListItem::exists($request->listitem)) {\n return response()->json([\n 'message' => 'The Shopping List Item doesn\\'t exist',\n ], 500); \n }\n\n $validator = Validator::make($request->all(), [\n 'name' => 'required|unique:list_items',\n // 'shopping_list_id' => 'required'\n ]);\n\n if($validator->fails()) {\n return response()->json([\n 'message' => 'There is an error in the request',\n 'errors' => $validator->errors()\n ], 500);\n } else {\n $listItem = ListItem::where('id', $request->listitem)->first();\n $listItem->name = $request->name;\n $listItem->save();\n\n return response()->json([\n 'message' => 'List Item updated successfully',\n ], 201);\n }\n }",
"public function updateItems() { \n foreach ($this->items as $value) { \n $value->update();\n }\n }",
"public function update($item){\r\n\t\n\t\t$prod = $this->findByModel( $item['MODEL']);\n\t\t\n// \t\tdebug($prod['EntrenueProduct']['id']);\n\t\tif(!isset($prod['EntrenueProduct']['id']) ||\n\t\t\t\t$prod['EntrenueProduct']['id'] == null){\n\t\t\t\n\t\t\t$this->addItem($item);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\r\n\t\t$MAP = (isset($item['MAP']))? $item['MAP'] : null;\r\n\t \t$this->query('UPDATE `entrenue_products`\r\n\t\t\t\tSET PRICE = '.$item['PRICE'].' , QUANTITY = '.$item['QUANTITY'].',\r\n\t\t\t\tMAP = \"'.$MAP.'\",\r\n\t\t\t\tupdated = \"'.date('Y-m-d H:i:s').'\"\r\n\t\t\t\tWHERE PRODUCT_ID = '.$item['PRODUCT_ID'].' ');\r\n\t\n\t\t\n\t\treturn true;\r\n\t}",
"public function update($itemData, $createIfAbsent = false);",
"public function update(Request $request)\n {\n ProductList::where('id', '=', $request->id)->delete();\n\n $user_id = Auth::user()->id;\n\n $list = new ProductList;\n $list->user_id = $user_id;\n $list->name = $request->name;\n $list->date = $request->date;\n $list->pending = 1;\n $list->save();\n\n $list_id = $list->id;\n\n for($i=0;$i<count($request->list);$i++){\n $item = new ListItem;\n $item->product_list_id = $list_id;\n $item->product_name = $request->list[$i];\n $item->save();\n }\n\n return ['message' => 'list created'];\n }",
"function item_put()\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $this->_put_args);\n $this->supplies->update($record);\n $this->response(array('ok'), 200);\n }",
"public function update_item() {\r\n\t\t$data = array(\r\n\t\t\t\t'rowid' => $this->input->post('row_id'),\r\n\t\t\t\t'qty' => $this->input->post('qty')\r\n\t\t);\r\n\t\t$this->cart->update($data);\r\n\t\t$this->load_cart();\r\n\t}",
"public function update($shoppinglist){\r\n\t\t$sql = 'UPDATE shoppinglist SET name = ?, status = ?, date_created = ?, date_closed = ?, household_id = ?, user_id = ? WHERE shoppinglist_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\t$sqlQuery->set($shoppinglist->name);\n\t\t$sqlQuery->set($shoppinglist->status);\n\t\t$sqlQuery->set($shoppinglist->dateCreated);\n\t\t$sqlQuery->set($shoppinglist->dateClosed);\n\t\t$sqlQuery->set($shoppinglist->householdId);\n\t\t$sqlQuery->set($shoppinglist->userId);\n\r\n\t\t$sqlQuery->set($shoppinglist->shoppinglistId);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}",
"public function updateProducts(){\n \n MPCController::setJSONcacheTable('items_data_init');\n MPCController::setJSONcacheProduct();\n\n }",
"public function update(ItemRequest $request, Item $item, $id)\n {\n\n\n $test_opening = OpeningStock::where('item_id',$id);\n $test_opening->delete();\n\n $opening_count = $request->opening_cnt;\n\n for ($j=0; $j < $opening_count; $j++) \n { \n $openings = new OpeningStock();\n \n $openings->item_id = $id;\n $openings->location = $request->location[$j];\n $openings->batch_no = $request->batch_no[$j];\n $openings->opening_qty = $request->quantity[$j];\n $openings->rate = $request->rate[$j];\n $openings->amount = $request->amount[$j];\n $openings->applicable_date = $request->applicable_date[$j];\n $openings->black_or_white = $request->black_or_white[$j];\n\n $openings->save();\n\n }\n \n\n $item = Item::find($id);\n $item->name = $request->name;\n $item->item_type = $request->item_type;\n if ($request->item_type == \"Repack\") {\n $item->bulk_item_id = $request->bulk_item_id;\n }\n\n if ($request->item_type == \"Parent\") {\n $item->child_item_id = $request->child_item_id;\n $item->child_unit = $request->child_unit;\n }\n\n if ($request->weight_in_grams != \"\" && $request->weight_in_grams > 0) {\n $item->weight_in_grams = $request->weight_in_grams;\n $item->weight_in_kg = $request->weight_in_grams / 1000;\n } else {\n $item->weight_in_grams = 0;\n $item->weight_in_kg = 0;\n }\n $item->code = $request->code;\n $item->supplier_id = $request->supplier_id;\n $item->category_id = $request->category_id;\n $item->brand_id = $request->brand_id;\n $item->print_name_in_english = $request->print_name_in_english;\n $item->print_name_in_language_1 = $request->print_name_in_language_1;\n $item->print_name_in_language_2 = $request->print_name_in_language_2;\n $item->print_name_in_language_3 = $request->print_name_in_language_3;\n //$item->ptc = $request->ptc;\n // $item->barcode = $request->barcode;\n $item->mrp = $request->mrp;\n $item->hsn = $request->hsn;\n $item->default_selling_price = $request->default_selling_price;\n $item->uom_id = $request->uom_id;\n $item->is_expiry_date = $request->is_expiry_date;\n $item->is_machine_weight_applicable = $request->is_machine_weight_applicable;\n $item->is_minimum_sales_qty_applicable = $request->is_minimum_sales_qty_applicable;\n\n \n\n if (!empty($request->expiry_date)) {\n $item->expiry_date = date('Y-m-d', strtotime($request->expiry_date));\n }\n\n if ($request->is_minimum_sales_qty_applicable == 1) {\n $item->minimum_sales_price = $request->minimum_sales_price;\n $item->minimum_sales_qty = $request->minimum_sales_qty;\n } else {\n $item->minimum_sales_price = $request->minimum_sales_price;\n $item->minimum_sales_qty = $request->minimum_sales_qty;\n }\n\n $item->created_by = 0;\n if ($item->save()) {\n $now = Carbon::now()->toDateTimeString();\n // $batch_insert = [];\n\n\n /* Store Barcode Details Start Here */\n $batch_barcode_insert = [];\n if ($request->has('barcode')) {\n foreach ($request->barcode as $barcode_key => $barcode_value) {\n $exist_barcode_count = ItemBracodeDetails::where('barcode', $barcode_value)->get();\n // if ($barcode_value != \"\" && count($exist_barcode_count) == 0) {\n if ($barcode_value != \"\") {\n $data = [\n 'item_id' => $item->id,\n 'barcode' => $barcode_value,\n 'created_by' => 0,\n 'created_at' => $now,\n 'updated_at' => $now,\n ];\n $batch_barcode_insert[] = $data;\n }\n }\n }\n /* Update Existing Barcode Details Start Here */\n $batch_barcode_update = [];\n if ($request->has('old_barcode')) {\n foreach ($request->old_barcode as $exist_barcode_key => $exist_barcode_value) {\n if ($exist_barcode_value != \"\") {\n $exist_item_barcode_details = ItemBracodeDetails::find($request->item_barcode_details_id[$exist_barcode_key]);\n $exist_item_barcode_details->item_id = $item->id;\n $exist_item_barcode_details->barcode = $exist_barcode_value;\n $exist_item_barcode_details->updated_by = 0;\n $exist_item_barcode_details->save();\n }\n }\n }\n\n /* Update Existing Barcode Details end Here */\n\n $tax_detail = ItemTaxDetails::where('item_id',$id);\n $tax_detail->delete();\n\n $count = $request->count;\n $tax = Tax::all();\n\n for($i=0;$i<$count;$i++)\n {\n foreach ($tax as $key => $value) \n {\n $str_json = json_encode($value->name); \n $tax_name = str_replace('\"', '', $str_json);\n $value_name = $tax_name.'_id';\n \n\n $tax_details = new ItemTaxDetails;\n $tax_details->item_id =$id;\n $tax_details->tax_master_id =$request->$tax_name[$i];\n $tax_details->value =$request->$value_name[$i];\n $date = date(\"Y-m-d\", strtotime($request->valid_from[$i]));\n $tax_details->valid_from =$date;\n\n $tax_details->save();\n\n }\n //break;\n }\n\n\n // if (count($batch_insert) > 0) {\n // ItemTaxDetails::insert($batch_insert);\n // }\n\n if (count($batch_barcode_insert) > 0) {\n $batch_barcode_insert = array_unique($batch_barcode_insert, SORT_REGULAR);\n\n ItemBracodeDetails::insert($batch_barcode_insert);\n }\n\n\n\n return Redirect::back()->with('success', 'Updated Successfully');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }",
"public function testUpdateObjectItem()\n {\n }",
"public function update(StoreItem $request, Item $item)\n {\n $item->fill($request->all())->save();\n return redirect('/item');\n }",
"public function updateTableItem() {\n\t\t$keyWord = new SearchKeysForm;\n\t\t$items = Goods::model()->searchItems($keyWord);\n\t\t\n\t\tforeach ($items as $item) {\n\t\t\t$item->conditionbackup = $item->conditionid;\n\t\t\t/*\n\t\t\t * expire in the next five days\n\t\t\t */\n\t\t\t$item->expire_time = time() + 60 * 60 * 24 * 5;\n\t\t\t$item->save(false, array(\"conditionbackup\", \"expire_time\") );\n\t\t}\n\t}",
"function update_item_post() {\n\t\t$id = $this->post('item-id');\n\t\t$data_update = array(\n\t\t\t'item_name' => $this->post('item-name'),\n\t\t\t'item_price' => $this->post('item-price'),\n\t\t\t'item_status' => $this->post('item-status')\n\t\t);\n\t\t$update = $this->item_model->update($data_update, ['item_id' => $id]);\n\t\tif($update) {\n\t\t\t$output['success'] = true;\n\t\t\t$output['message'] = \"Data berhasil diperbarui\";\n\t\t} else {\n\t\t\t$output['success'] = false;\n\t\t\t$output['message'] = \"Data gagal diperbarui\";\n\t\t}\n\t\treturn $this->response($output, REST::HTTP_OK);\n\t}",
"public function updateField_infoservicelist($item) {\n\n \t\t$rs = Capsule::update(\"UPDATE $this->tablename SET slistID=?, slist_name=?, slist_note=?, slist_active=?, slist_showDefault=?, slist_1=?, slist_2=?, slist_3=?, slist_4=?, slist_5=? WHERE slistNo=?\",[$item->slistID, $item->slist_name, $item->slist_note, $item->slist_active, $item->slist_showDefault, $item->slist_1, $item->slist_2, $item->slist_3, $item->slist_4, $item->slist_5, $item->slistNo]);\t\t\n return $rs;\n }",
"public function updateItems($data)\n { \n\t\tMage::dispatchEvent('checkout_cart_update_items_before', array('cart'=>$this, 'info'=>$data));\t\t\n foreach ($data as $itemId => $itemInfo) {\n $item = $this->getQuote()->getItemById($itemId);\n\t\t\tif (!$item) {\n continue;\n }\r \n if (!empty($itemInfo['remove']) || (isset($itemInfo['qty']) && $itemInfo['qty']=='0')) {\n $this->removeItem($itemId);\n continue;\r }\n $qty = isset($itemInfo['qty']) ? (float) $itemInfo['qty'] : false;\n if ($qty > 0) {\n $item->setQty($qty);\n } \r \r if (isset($itemInfo['options'])) {\r $optionId = '';\r foreach ($item->getOptions() as $option){\r //echo $option->getId();\r if($option->getCode() == 'info_buyRequest'){ \r $unserialized = unserialize($option->getValue());\r $options = array();\r foreach($unserialized['options'] as $key=>$infoOption) {\r $options[$key] = $itemInfo['options'][$key];\r }\r $unserialized['options'] = $options;\r $option->setValue(serialize($unserialized)); \r } elseif ($option->getCode() == 'option_ids'){\r $option->setValue($option->getValue());\r $optionId = $option->getValue();\r } elseif ($option->getCode() == 'option_'.$optionId){\r $option->setValue($itemInfo['options'][$optionId]);\r }\r } \r }\n }\n Mage::dispatchEvent('checkout_cart_update_items_after', array('cart'=>$this, 'info'=>$data));\n return $this;\n }",
"public function addShoppingItem(AbstractShoppingItem $item, AbstractWishList $list)\n {\n\n $orderItem = $list->addItem($item);\n\n if($orderItem->getId()){\n $this->em->merge($orderItem);\n }\n else{\n $this->em->persist($orderItem);\n }\n\n $this->em->flush();\n\n return $orderItem;\n }",
"public function updateQuoteItems($data)\n {\n if (is_array($data)) {\n try {\n foreach ($data as $itemId => $info) {\n if (!empty($info['configured'])) {\n $item = $this->getQuote()->updateItem($itemId, new Varien_Object($info));\n $itemQty = (float)$item->getQty();\n } else {\n $item = $this->getQuote()->getItemById($itemId);\n $itemQty = (float)$info['qty'];\n }\n if ($item) {\n if ($item->getProduct()->getStockItem()) {\n if (!$item->getProduct()->getStockItem()->getIsQtyDecimal()) {\n $itemQty = (int)$itemQty;\n } else {\n $item->setIsQtyDecimal(1);\n }\n }\n\n //$itemQty = $itemQty > 0 ? $itemQty : 1;\n if($itemQty > 0) {\n if (isset($info['custom_price'])) {\n $itemPrice = $this->_parseCustomPrice($info['custom_price']);\n } else {\n $itemPrice = null;\n }\n // $noDiscount = !isset($info['use_discount']);\n $noDiscount = false;\n\n if (empty($info['action']) || !empty($info['configured'])) {\n $item->setQty($itemQty);\n $item->setCustomPrice($itemPrice);\n $item->setOriginalCustomPrice($itemPrice);\n $item->setNoDiscount($noDiscount);\n $item->getProduct()->setIsSuperMode(true);\n $item->getProduct()->unsSkipCheckRequiredOption();\n $item->checkData();\n } else {\n $this->moveQuoteItem($item->getId(), $info['action'], $itemQty);\n }\n } else {\n $this->getQuote()->removeItem($item->getId());\n }\n } else {\n try {\n $itemQty = (float)$info['qty'];\n $t = explode('-',$itemId);\n $realItemId = $itemId;\n if (isset($t[0])){\n $realItemId = $t[0];\n }\n\n if ($itemQty > 0 && $realItemId > 0){\n //$reload = Mage::app()->getRequest()->getParam('reload_order');\n $reload = 0;\n if($reload){\n if (strpos($itemId, '-') === false) {\n $quote_item = Mage::getModel('sales/quote_item')->load($itemId);\n $product_id = $quote_item->getData('product_id');\n $this->addProductReload($product_id,$info);\n }\n }\n else{\n $this->addProductReload($itemId, $info);\n }\n }\n /**\n * Fixed: Cant update custom price at first time click button Update Items\n */\n $this->recollectCart();\n $this->updateCustomPrice($data);\n }\n catch (Mage_Core_Exception $e){\n $this->getSession()->addError($e->getMessage());\n }\n catch (Exception $e){\n return $e;\n }\n }\n }\n } catch (Mage_Core_Exception $e) {\n $this->recollectCart();\n throw $e;\n } catch (Exception $e) {\n Mage::logException($e);\n }\n $this->recollectCart();\n }\n return $this;\n }",
"public function updateItems(CartInterface $quote);",
"function updateItem($menuid, $itemid, $mp) {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'hasextras', 1 => 'haschoices', 2 => 'id', 3 => 'number_of_items');\n $idfields = array(0 => 'basket_id', 1 => 'item_id');\n $idvals = array(0 => $this->ID, 1 => $itemid);\n if ((isset($mpdesc)) && (!is_null($mp)))\n {\n array_push($idfields, 'multiprice_description');\n array_push($idvals, $mpdesc);\n }\n $rs = $DBA->selectQuery(DBBASKETITEMSTABLE, $fields, $idfields, $idvals);\n\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n if (($res['hasextras'] == \"Y\") || ($res['haschoices'] == \"Y\"))\n {\n $this->AddItem2($menuid, $itemid, $mp);\n }\n else\n {\n //otherwise just increment the number_of_items by one and send back\n $this->incrementTotalItem($res['id'], $res['number_of_items']);\n }\n }\n }\n else\n {\n $this->AddItem2($menuid, $itemid, $mp);\n }\n\n return (true);\n }",
"function updateProduct($item)\n\t\t{\n\t\t\techo \"enter update function....\";\n\n\t\t\tif(isset($_SESSION['cart'])==true)\n\t\t\t{\n\t\t\t\t$cart=$_SESSION['cart'];\n\t\t\t\tforeach ($cart as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif($item == $val['id'])\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \" updates the quantity of the item\";\n\t\t\t\t\t\t$cart[$key]['quantity']+=1;\n\t\t\t\t\t\t$cost = $cart[$k]['price']*$cart[$k]['quantity'];\n\t\t\t\t\t\techo \"update total price = \".$cost;\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $cart;\n\t\t\t}\n\t\t\telse return 0;\n\t\t\t\n\t\t}",
"public function updateItem($itemId, $itemData);",
"public function addItemAction(){\n $this->isEnabled();\n if($this->prDispatch()){\n $this->_redirect('*/index/');\n return;\n }\n if($this->_getHelper()->checkIsValidList()){\n Mage::getSingleton('core/session')->addError('Você não possui listas criadas, crie uma lista');\n $this->_redirect('*/index/', array('login'=>1));\n return;\n }\n \n $productId = $this->getRequest()->getParam('id');\n if(!empty($productId)){\n Mage::getModel('jbp_giftlist/item')->saveData($productId);\n $this->_redirectUrl(Mage::getSingleton('core/session')->getLastUrl());\n return;\n }\n $this->_redirect('/');\n }",
"protected function _updateShoppingCart()\n {\n try {\n $cartData = $this->getRequest()->getParam('cart');\n if (is_array($cartData)) {\n if (!$this->cart->getCustomerSession()->getCustomerId() && $this->cart->getQuote()->getCustomerId()) {\n $this->cart->getQuote()->setCustomerId(null);\n }\n $cartData = $this->quantityProcessor->process($cartData);\n $cartData = $this->cart->suggestItemsQty($cartData);\n $this->cart->updateItems($cartData)->save();\n }\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->messageManager->addErrorMessage(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($e->getMessage())\n );\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage($e, __('We can\\'t update the shopping cart.'));\n $this->_objectManager->get(\\Psr\\Log\\LoggerInterface::class)->critical($e);\n }\n }",
"public function store()\n {\n if (! auth()->user()->wishlistHas(request('productId'))) {\n auth()->user()->wishlist()->attach(request('productId'));\n }\n }",
"private function saveItems($parent, $data){\n if(count($data->items)){\n foreach($data->items as $it){\n\n if(empty($it->id)){\n // ignore the items that doesnt have id\n continue;\n }\n\n $item = $parent->items()->firstOrCreate([\n 'local_id' => $it->id\n ]);\n\n $item->quantity = empty($it->quantity) ? 0 : $it->quantity;\n $item->description = $it->description;\n $item->unit = $it->unit->name;\n\n if(!empty($item->deliveryLocation)){\n $item->lat = $it->deliveryLocation->geometry->coordinates[0][0];\n $item->lng = $it->deliveryLocation->geometry->coordinates[0][1];\n $item->point = \"({$item->lat} {$item->lng})\";\n }\n\n $item->update();\n\n }\n }\n }",
"public function action_update() {\r\n $quantity = $this->request->postWrap('qty');\r\n $productId = $this->request->postWrap('productId');\r\n $service = $this->pixie->cart;\r\n $service->setProductCount($productId, $quantity);\r\n\r\n $res = ['items_qty' => count($service), 'total_price' => $service->getTotalPrice()];\r\n $this->jsonResponse($res);\r\n }",
"function updateItem($db, $pid) {\n $cartID = getCartID();\n $qty = getQuantity();\n if ($qty <= 0) {\n deleteItem($db, $pid);\n } else {\n $sql = \"UPDATE shoppingcarts SET Quantity=$qty \n WHERE CartID='$cartID' AND ProductID=$pid\";\n $db->query($sql);\n }\n }"
] | [
"0.6612314",
"0.6535741",
"0.65357083",
"0.6485335",
"0.6449506",
"0.6377921",
"0.63607043",
"0.6285539",
"0.6271077",
"0.6221827",
"0.62130934",
"0.62053794",
"0.6198884",
"0.6196663",
"0.61778617",
"0.6176947",
"0.6167311",
"0.61446035",
"0.6113038",
"0.6109905",
"0.6061679",
"0.6042743",
"0.6009925",
"0.5997462",
"0.59877694",
"0.5977178",
"0.5975913",
"0.5958494",
"0.59499884",
"0.5943885"
] | 0.6581739 | 1 |
Fetch the text of a Message from the table 'message' using the 'key' field. | public function getMessageTextByKey($k)
{
$sql = "SELECT text FROM message WHERE msg_key = '".$k."'";
$result = $this->db->query($sql);
return $result->row['text'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_text($key) {\n if (isset($this->text[$key])) {\n return $this->text[$key];\n }\n }",
"public function getMessage($key)\n {\n return array_key_exists($key, $this->messages)\n ? $this->messages[$key]\n : null;\n }",
"public function getField()\n {\n $extracted = explode('key ', $this->message);\n return str_replace('\\'', '', $extracted[1]);\n }",
"function getTagText($tag_key) {\r\n\t\r\n\t\tglobal $CONN, $CONFIG;\r\n\t\t\r\n\t\treturn $CONN->GetOne(\"SELECT text FROM {$CONFIG['DB_PREFIX']}tags WHERE tag_key='$tag_key'\");\r\n\t\t\r\n\t}",
"function fetchMessage($id)\n {\n return $this->message->getMessage($id);\n }",
"function Messages($key=\"\",$skey=\"Name\")\n {\n if (empty($this->Messages))\n {\n $this->MyMod_Language_Read();\n }\n\n if (!empty($key))\n {\n if (!empty($this->Messages[ $key ]))\n {\n return $this->GetRealNameKey($this->Messages[ $key ],$skey);\n }\n\n return $key;\n }\n\n return $this->Messages;\n }",
"public function fetchmessage($msgnum) {\n return @imap_fetchbody($this->conn, $msgnum, '');\n }",
"public function readContentByKey($key) {\n return $this->run('readContentByKey', array($key));\n }",
"function Mensaje($idmessage){\n $c = conectar();\n $select = \"select body from message where idmessage=$idmessage;\";\n $resultado = mysqli_query($c, $select);\n $fila = mysqli_fetch_assoc($resultado);\n desconectar($c);\n return $fila['body'];\n}",
"function get_message($msg_id, $user_id)\n {\n $sql = 'SELECT m.*, s.status, t.subject, ' . USER_TABLE_USERNAME .\n ' FROM ' . $this->db->dbprefix . 'msg_messages m ' .\n ' JOIN ' . $this->db->dbprefix . 'msg_threads t ON (m.thread_id = t.id) ' .\n ' JOIN ' . $this->db->dbprefix . USER_TABLE_TABLENAME . ' ON (' . USER_TABLE_ID . ' = m.sender_id) '.\n ' JOIN ' . $this->db->dbprefix . 'msg_status s ON (s.message_id = m.id AND s.user_id = ? ) ' .\n ' WHERE m.id = ? ' ;\n\n $query = $this->db->query($sql, array($user_id, $msg_id));\n\n return $query->result_array();\n }",
"function __text($key) {\n\t\techo Lang::getMessage($key);\n\t}",
"function get_message() {\r\n\t\t\r\n\t\t$this->Fields(array(\r\n\t\t\t\t\t\t\t\"description\",\r\n\t\t\t\t\t\t\t\"user_from\",\r\n\t\t\t\t\t\t\t\"messaging_time\"\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\r\n\t\t$this->From(\"messaging\");\r\n\t\t$this->Where(array(\"user_to\"=>$this->_user_to));\r\n\r\n\t\t$this->Select();\r\n\t\t//echo $this->lastQuery();\r\n\t\treturn $this->resultArray();\r\n\t\t\r\n\t}",
"public function getMessageInfo($message_id = 0) {\n ###$userId = Yii::$app->user->getId();\n $query = new Query;\n $query->select('uf.email sender_email, uf.id sender_id, ut.email receiver_email, ut.id receiver_id,')\n ->from('messages')\n ->join('LEFT JOIN', 'user uf', 'uf.id = messages.user_from')\n ->join('LEFT JOIN', 'user ut', 'ut.id = messages.user_to')\n ->where('message_id =' . $message_id);### . ' AND user_to =' . $userId\n return $query->createCommand()->queryOne();\n }",
"public function findMessageById($message_id);",
"public function readAction() {\n\t $id = $this->_getParam(\"id\");\n\t require_once APPLICATION_PATH . \"/model/Message.php\";\n\t $table = new Message;\n\t $message = $table->fetchRow($table->select()->from($table, array('id', 'date', 'sender', 'subject', 'text'))->where('id = ?', $id));\n\t $this->view->message = $message;\n\t}",
"public function get_autotext($key){\n if (!isset($this->ci->autotext_m)){\n $this->ci->load->model('mail/autotext_m');\n }\n if (is_int($key)){\n $autotext = $this->ci->autotext_m->get($key);\n }else{\n $autotext = $this->ci->autotext_m->get_by(array('name'=>$key), TRUE);\n }\n \n return $autotext;\n }",
"function getMessage() {\n\t\treturn $this->_dao->message;\n\t}",
"function imap_fetchtext($imap_stream, $msg_number, $options = false)\n{\n}",
"public function get_message ( $id )\n {\n $query = $this->db->get_where('messages', array ( 'id' => $id ) );\n return array ( \"id\" => $query->row()->id,\n \"author\" => $query->row()->author,\n \"title\" => $query->row()->title,\n \"message\" => $query->row()->message,\n \"likes\" => $query->row()->likes,\n \"dislikes\" => $query->row()->dislikes,\n \"datecreated\" => $query->row()->datecreated,\n \"views\" => $query->row()->views\n ); \n }",
"public function field($key, $message = null, $class = null)\n {\n $class = $class ?: $this->getClass('fieldList');\n return $this->render($message, $key, $class);\n }",
"public function fetch($key)\n {\n return $this->pluck($key);\n }",
"public function offsetGet($key)\n {\n return $this->validate()->content[$key];\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PdnPonMessagePeer::ID, $key, Criteria::EQUAL);\n }",
"public function getMessageArray(string $key, string $message): array\n {\n return [$key => $message];\n }",
"public static function getMessage($id) {\n return self::model()->findByPk($id);\n }",
"private function _get_key($key)\n {\n return $this->rest->db\n ->where(config_item('rest_key_column'), $key)\n ->get(config_item('rest_keys_table'))\n ->row();\n }",
"public function retrieveApikey (Skulk_Client_Message $message)\n {\n if (! $message->getProviderkey() || ! $message->getToken()) {\n require_once 'Skulk/Client/Exception.php';\n throw new Skulk_Client_Exception(\n 'provider and token must be provided');\n }\n $this->setUri($this->endpoint . '/retrieve/apikey');\n $this->setParameterGet('providerkey', $message->getProviderkey());\n $this->setParameterGet('token', $message->getToken());\n $response = $this->request(Zend_Http_Client::GET);\n require_once 'Skulk/Client/Response.php';\n return new Skulk_Client_Response($response->getRawBody());\n }",
"public function get($key)\n {\n if ($this->has($key)) {\n $flashMessages = $this->storage->get(self::FLASH_KEY);\n $message = $flashMessages[$key];\n\n $this->remove($key);\n\n if ($this->translator instanceof TranslatorInterface) {\n $message = $this->translator->translate($message);\n }\n\n return $message;\n } else {\n throw new RuntimeException(sprintf(\n 'Attempted to read non-existing key %s', $key\n ));\n }\n }",
"protected function findPkSimple($key, $con)\n {\n $sql = 'SELECT `id`, `pon_header_id`, `tanggal`, `member_id`, `title`, `content_message`, `is_approved` FROM `pdn_pon_message` WHERE `id` = :p0';\n try {\n $stmt = $con->prepare($sql);\n $stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n }\n $obj = null;\n if ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n $obj = new PdnPonMessage();\n $obj->hydrate($row);\n PdnPonMessagePeer::addInstanceToPool($obj, (string)$key);\n }\n $stmt->closeCursor();\n\n return $obj;\n }",
"public function read(Message $message);"
] | [
"0.65128946",
"0.6191002",
"0.6071781",
"0.5904537",
"0.58790374",
"0.5737614",
"0.5700695",
"0.5700056",
"0.5695483",
"0.5684523",
"0.5633375",
"0.56005365",
"0.55720663",
"0.5542026",
"0.5487236",
"0.5478272",
"0.54264283",
"0.5415228",
"0.5406679",
"0.5402985",
"0.53916514",
"0.53555995",
"0.5342276",
"0.5336178",
"0.53138757",
"0.53093714",
"0.5309225",
"0.5306774",
"0.52522916",
"0.52461654"
] | 0.74293613 | 0 |
Test trusted host pattern | public function testTrustedHostPattern()
{
$pattern = '^' . str_replace('.', '\.', $this->expected_host) . '$';
$message = print_r($this->settings['trusted_host_patterns'], true);
$this->assertContains($pattern, $this->settings['trusted_host_patterns'], $message);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testIsValidHost(): void\n {\n $testCases = [\n \"\" => true,\n \"[1:2:3:4:5:6:7:8]\" => true,\n \"[v7.1:2:3:4]\" => true,\n \"localhost\" => true,\n // All of the valid characters together\n \"%00azAZ09-._~!$&'()*+,;=\" => true,\n // Invalid characters and percent encodings\n \"/\" => false,\n \"?\" => false,\n \"#\" => false,\n \"%A\" => false,\n \"%G\" => false,\n \"%GA\" => false,\n \"%AG\" => false\n ];\n\n foreach ($testCases as $host => $isValid) {\n $this->assertEquals($isValid, Rfc3986::isValidHost($host), \"Failed for case '$host'.\");\n }\n }",
"public function checkHost() {\n\t\tif (!$this->host) {\n\t\t\tthrow new URLException(120);\n\t\t}\n\t\t$regexp = '/^\\d{2,3}(\\.\\d{1,3}){3}$/';\n\t\tif (!checkdnsrr($this->host, 'A') && !preg_match($regexp, $this->host)) {\n\t\t\tthrow new URLException(120);\n\t\t}\n\t}",
"function _validHost($host) {\n return preg_match('/^\\[?(?:[a-zA-Z0-9-:\\]_]+\\.?)+$/', $host);\n}",
"function drupal_valid_http_host($host) {\n return preg_match('/^\\[?(?:[a-zA-Z0-9-:\\]_]+\\.?)+$/', $host);\n}",
"protected function checkHost($value = '')\n {\n return preg_match('/[a-zA-Z0-9.-]{1,253}/', $value);\n }",
"public function isAllowed($host);",
"function is_hostname ( $host ) {\n\n\t\t$ret_val = true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ar $host pirmasis simbolis raide arba skaitmuo; ar yra bent vienas taskas; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ar yra vien raides, skaitmenys, bruksniai ir taskai; ar pabaigoje\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// yra TLD. t.y. a) maziausiai 2 simboliai ir b) sudarytas tik is raidziu\n\n\t\tif ( !preg_match ( \"^[a-z0-9]{1}[a-z0-9]\\.\\-]*\\.[a-z]{2,}$\", $host ) ) $ret_val = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ar prasmingas kompiuterio vardas, t.y. nesudarytas is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// paeiliui uzrasytu tasku arba bruksniu\n\n\t\tif ( preg_match (\"\\.\\.\", $host) || preg_match (\"\\.-\", $host) || preg_match ( \"-\\.\", $host ) ) $ret_val = false;\n\n\t\treturn $ret_val;\n\t}",
"public function validate_host() {\n if (isset($this->initial_data[\"host\"])) {\n # Ensure it is a valid hostname\n if (is_hostname($this->initial_data[\"host\"])) {\n $this->validated_data[\"host\"] = $this->initial_data['host'];\n } else {\n $this->errors[] = APIResponse\\get(2046);\n }\n } else {\n $this->errors[] = APIResponse\\get(2007);\n }\n }",
"public function verifyHost() { return $this->__verifyHost; }",
"public function verifyHost() { return $this->__verifyHost; }",
"private function isMatchedHost(string $host): bool\n {\n return (!$this->host || preg_match('~^' . str_replace('.', '\\\\.', $this->host) . '$~i', $host));\n }",
"public static function isHost($parameter) {\r\n\r\n\t\treturn self::isMatchRegex($parameter, \"/^([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?\\\\.)+[a-zA-Z]{2,6}/\", \"host\")\r\n\t\t\t&& !self::isEmpty($parameter);\r\n\t}",
"public function testEncodeHost(): void\n {\n // (String should also be converted to lower case)\n $this->assertEquals(\"aazz09!$&'()*+,;=%3A%2F%3F%23%5B%5D%40\", Rfc3986::encodeHost(\"aAzZ09!$&'()*+,;=:/?#[]@\"));\n\n // Test that we do not perform encoding for IPv6 or IPVFuture addresses\n $this->assertEquals(\"[1:2:3:4:5:6:7:8]\", Rfc3986::encodeHost(\"[1:2:3:4:5:6:7:8]\"));\n $this->assertEquals(\"[v7.1:2:3:4]\", Rfc3986::encodeHost(\"[v7.1:2:3:4]\"));\n }",
"public function testValidateIpV6()\n {\n $res = $this->ipObj->validateIp('2001:6b0:1::200');\n $this->assertContains(\"kth\", $res['hostname']);\n }",
"function getHost($server_http_host = '', array $avail_host = array())\n\t{\n\t \tforeach( $avail_host as $value)\n\t \t{\n\t \t\t$host = stripos($server_http_host, $value); \n\t \t\tif($host !== false)\n\t \t\t{\n\t \t\treturn $value;\n\t \t\texit();\n\t \t\t} \n\t \t}\n\t}",
"public function testRemoteAddrMethod()\n {\n $_SERVER = array('REMOTE_ADDR' => '24.24.24.24');\n $lookup = new Whip($_SERVER, Whip::REMOTE_ADDR);\n $this->assertEquals('24.24.24.24', $lookup->getValidIpAddress());\n }",
"public function getInsecureServerHost();",
"function testHostname($key, $allow = ISPK_HOST_ALLOW_ALL)\n\t{\n\t\tif (!$this->keyExists($key)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Inspekt::isHostname($this->_getValue($key), $allow)) {\n\t\t\treturn $this->_getValue($key);\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"function is_valid_domain_name(){\n // add more `domain-name`\n $domains = array('localhost','192.168.43.147','kamal');\n if (in_array($_SERVER['HTTP_HOST'], $domains)){\n // $domain = $_SERVER['HTTP_HOST'];\n return true;\n }\n else{\n // $domain = 'localhost';\n return false;\n }\n}",
"function isTrustedProxy($addr)\n {\n return (boolean)preg_match('/^((10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|'\n . '(172\\.(1[6-9]|2[0-9]|3[0-1])\\.\\d{1,3}\\.\\d{1,3})|'\n . '(192\\.168\\.\\d{1,3}\\.\\d{1,3}))$/', $addr);\n }",
"function isip($ip) {\r\n return preg_match(\"/^[0-9a-zA-Z\\/.:]{7,}$/\", $ip);\r\n}",
"function test_url_with_protocol_case( $sanitized, $unsanitized ) {\n\t\t$this->assertEquals( $sanitized, yourls_sanitize_url( $unsanitized ) );\n\t}",
"function gethostbyname ($hostname) {}",
"public static function isValidHost(string $host)\n {\n if (self::isIPLiteral($host)) {\n return true;\n }\n\n return (\n self::isPercentEncodingValid($host) &&\n boolval(preg_match(\"/^[%a-zA-Z0-9\\-._~!$&'()*+,;=]*$/\", $host))\n );\n }",
"public function testHost(): void\n {\n self::assertEquals(gethostname(), $this->message->getHost());\n\n $this->message->setHost(\"example.local\");\n self::assertEquals(\"example.local\", $this->message->getHost());\n }",
"public function getHost();",
"public function getHost();",
"public function getHost();",
"public function matchHost($host = null) : bool\n {\n $routeHost = $this->route->getHost();\n if (empty($routeHost) || $routeHost == $host) {\n $this->hostMatches = (array)$host;\n return true;\n }\n $matches = array();\n $match = preg_match('#^'.$routeHost.'$#', $host, $matches);\n $this->hostMatches = $matches;\n return $match;\n }",
"function checkdnsrr ($host, $type = \"MX\") {}"
] | [
"0.75021875",
"0.7232036",
"0.71807605",
"0.69899017",
"0.6946194",
"0.6913567",
"0.68170553",
"0.65812725",
"0.6497401",
"0.6497401",
"0.6365611",
"0.6299776",
"0.62249357",
"0.61060447",
"0.60871106",
"0.6058161",
"0.6055322",
"0.604043",
"0.6018109",
"0.60173506",
"0.599661",
"0.5995709",
"0.59781647",
"0.5971516",
"0.5971349",
"0.59433514",
"0.59433514",
"0.59433514",
"0.59321433",
"0.5930234"
] | 0.83712965 | 0 |
Fixed project price and finish project | public function fixedPrice(Request $request)
{
$project = Project::findOrFail($request->input('project_id'));
$this->authorize('finish', $project);
$proposal = $project->offeredProposal();
$proposal->update([
'price3' => $proposal->price2
]);
$invoiceTo = $request->input('invoice_to') ? $request->input('invoice_to') : $project->user->name;
$project->update([
'invoice_to' => $invoiceTo,
'delivered_at' => Carbon::now()
]);
event(new EmailShouldBeSent(new ProjectFinish($project->title)));
$project->setStatus('delivered');
Flash::success(__('flash_messages.projects.fixed_price_success'))->important();
return redirect()->back();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function SubmitPrice(){\n\t\t$price = 1;\n\t\tif($this->Estimate)\n\t\t\t$price++;\n\t\tif($this->ScheduleOfPricesV2()->count() > 0)\n\t\t\t$price += $this->ScheduleOfPricesV2()->count();\n\t\tif($this->SpecificationsV2()->count() > 0)\n\t\t\t$price += $this->SpecificationsV2()->count();\n\t\tif($this->DrawingsV2()->count() > 0)\n\t\t\t$price += $this->DrawingsV2()->count();\n\t\tif($this->TermsOfPaymentV2()->count() > 0)\n\t\t\t$price += $this->TermsOfPaymentV2()->count();\n\t\tif($this->StandardConditionsV2()->count() > 0)\n\t\t\t$price += $this->StandardConditionsV2()->count();\n\t\tif($this->SpecialConditionsV2()->count() > 0)\n\t\t\t$price += $this->SpecialConditionsV2()->count();\n\t\tif($this->ConditionsOfTenderingV2()->count() > 0)\n\t\t\t$price += $this->ConditionsOfTenderingV2()->count();\n\t\tif($price > 1)\n\t\t\t $price--;\n\t\treturn $price;\n\t}",
"function PrecioFinal($precio,$desc,$iva){\n $preciofi=$precio-($precio/100*$desc)+($precio/100*$iva);\n return $preciofi;\n }",
"public function projectToIncome()\n {\n //project assset\n $project_payment = DB::table('project')\n ->join('project_payment', 'project.id_project', '=', 'project_payment.id_project' )\n ->where('status', 'SELESAI')\n ->get()\n ->sum('transfer');\n\n $worker_payment = DB::table('project')\n ->join('project_salary_transaction', 'project.id_project', '=', 'project_salary_transaction.id_project')\n ->where('project.status', 'SELESAI')\n ->sum('project_salary_transaction.nominal');\n\n $worker_contract = DB::table('project')\n ->join('project_contract_transaction', 'project.id_project', '=', 'project_contract_transaction.id_project' )\n ->where('status', 'SELESAI')\n ->sum('nominal');\n\n $project_bonus = DB::table('project')\n ->join('project_bonus', 'project.id_project', '=', 'project_bonus.id_project')\n ->where('project.status', 'SELESAI')\n ->where('project_bonus.status', 'DIAMBIL')\n ->get()\n ->sum('bonus');\n \n $project_mutation_in = DB::table('project')\n ->join('mutation', 'project.id_project', '=', 'mutation.destiny')\n ->where('destiny', '<>', 'PERUSAHAAN')\n ->where('project.status' , 'SELESAI')\n ->get()\n ->sum('nominal');\n\n $project_mutation_out = DB::table('project')\n ->join('mutation', 'project.id_project', '=', 'mutation.source')\n ->where('source', '<>', 'PERUSAHAAN')\n ->where('project.status' , 'SELESAI')\n ->get()\n ->sum('nominal');\n\n $project_purchase = DB::table('project')\n ->join('project_purchase', 'project.id_project', '=', 'project_purchase.id_project') \n ->select(DB::raw('sum(price_per_item * total_item) as total'))\n ->where('project.status', 'SELESAI')\n ->first(); \n\n $project_income = $project_payment + $project_mutation_in;\n \n $project_outcome = ($worker_payment) + $worker_contract \n + $project_bonus + ($project_purchase->total) \n + $project_mutation_out;\n\n $project_asset = $project_income - $project_outcome; \n //end project asset\n\n return $project_asset;\n }",
"public function calculatePricePT()\n {\n//\t\tvar_dump($this->Price_pT_Base_override).\"<br>\";\n\t\tif(isset($this->Price_pT_Base_override) && $this->Price_pT_Base_override != \"\")\n\t\t\t{\n//\t\t\techo \"Price over ride<br>\";\n\t\t\t$this->Price_Sub_Total = $this->Price_pT_Base_override + $this->Price_production_pT + $this->Price_transport_pT;\t\n\t\t\t}\n\t\telse{\n\t\t\t//First calculate the price per ton, which is the sum of the ingedients->product price per tom\n\t \t\t$sum = 0;\n\t\t\tforeach($this->ingredients as $ingredientItem)\n\t\t\t\t{\n\t\t\t\t$sum += $ingredientItem->weightedCost;\n\t\t\t\t}\n\t\t\t$this->Price_pT_Base = $sum;\n\t\t\t$this->Price_Sub_Total = $this->Price_pT_Base + $this->Price_production_pT + $this->Price_transport_pT;\n\t\t}\n\t\t\n\n\t\t\n }",
"public function estimatePay() {\n\t\t$pirepid = DB::escape($this->get->pirepid);\n\t\t$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pireps` WHERE `pirepid` = '.$pirepid;\n\t\t$pirep = DB::get_row($sql);\n\t\t\n\t\t$pilot = PilotData::getPilotData($pirep->pilotid);\n\t\t\n\t\t// Explode the flighttimes\n\t\t$flighttime = explode('.', $pirep->flighttime);\n\t\t$flighttime_min = ($flighttime[0] * 60) + ($flighttime[1]);\n\t\t$totalpay = ($pilot->payrate / 60) * $flighttime_min;\n\t\t\n\t\techo '<h3>PIREP - #'.$pirepid.' & Pilot - '.$pilot->firstname.' '.$pilot->lastname.' Estimated Pay</h3>';\n\t\techo $pirep->depicao.' => '.$pirep->arricao;\n\t\techo '<br />';\n\t\techo 'Payrate Per Hour: $'.$pilot->payrate;\n\t\techo '<br />';\n\t\techo '<strong>Estimated Pay for this flight - '.FinanceData::formatMoney($totalpay).'</strong>';\n\t}",
"function costs(){\n\t\t\tforeach ($this->_companies as $company){\n\t\t\t\t$company->setInterestTotal();\t\t\t\t\n\t\t\t\t$this->_costs[$company->getId()]['pr_fixed_cost']=$company->getPrFixedCost();\n\t\t\t\t$this->_costs[$company->getId()]['hr_hiring_costs']=$company->getHrHiringCost();\n\t\t\t\t$this->_costs[$company->getId()]['hr_training_costs']=$company->getHrTrainingCost();\n\t\t\t\t$this->_costs[$company->getId()]['hr_wages_costs']=$company->getHrWagesCost();\t\n\t\t\t\t// Los de distribución sacados de abajo porque se calculan completos (excepto los de distribución de stock) en la rutina $company->getPrDistribCost()\n\t\t\t\tif (! isset($this->_costs[$company->getId()]['pr_distrib_costs'])){\n\t\t\t\t\t$this->_costs[$company->getId()]['pr_distrib_costs']=0;\n\t\t\t\t}\n\t\t\t\t$this->_costs[$company->getId()]['pr_distrib_costs']=$company->getPrDistribCost();\n\t\t\t\t//todo lo incluido en este foreach funciona debidamente\n\t\t\t\tforeach ($this->_channels as $channel){\n\t\t\t\t\tforeach ($this->_regions as $region){\n\t\t\t\t\t\tforeach ($this->_products as $product){ \n\t\t\t\t\t\t\t$availability=$this->_games->getProductAvailibility($this->_game['id'], $this->_round['round_number'],$company->getId(), $product->getProductNumber());\n\t\t\t\t\t\t\tif($availability==1){\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['pr_var_costs'])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_var_costs']=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_var_costs']+=$company->getPrVarCost($channel->getChannelNumber(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $region->getRegionNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $product->getProductNumber());\n\t\t\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['pr_rawMaterials_costs'][$channel->getChannelNumber()])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_rawMaterials_costs'][$channel->getChannelNumber()]=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_rawMaterials_costs'][$channel->getChannelNumber()]+=$company->getPrRawMaterialsCost($channel->getChannelNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$region->getRegionNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$product->getProductNumber());\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['pr_distrib_costs'])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_distrib_costs']=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Sacado el cálculo fuera porque la rutina ya calcula el total.\n\t\t\t\t\t\t\t\t// $this->_costs[$company->getId()]['pr_distrib_costs']+=(($company->getPrDistribCost($channel->getChannelNumber(), $region->getRegionNumber(), $product->getProductNumber())));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//test\n\t\t\t\t\t\t\t\t// if ($company->getId()==168) {\n\t\t\t\t\t\t\t\t\t\t// echo(\"Costes distribución Test. Empresa: \" . $company->getId() . \", Canal: \" . $channel->getChannelNumber() . \", Región : \" . $region->getRegionNumber() . \", Producto: \" . $product->getProductNumber() . \", COSTE = \" . ($company->getPrDistribCost($channel->getChannelNumber(), $region->getRegionNumber(), $product->getProductNumber())) . \"<br/>\");\n\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t//VERO: Costes de distribución de stocks\n\t\t\t\t\t\t\t\tforeach($this->_channels as $channelD){\n\t\t\t\t\t\t\t\t\tforeach ($this->_regions as $regionD){\n\t\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['pr_distrib_costs']+=$company->getStDistribCost($channel->getChannelNumber(), $channelD->getChannelNumber(), $region->getRegionNumber(), $regionD->getRegionNumber(), $product->getProductNumber());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//VERO\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['mk_sales_costs'][$channel->getChannelNumber()])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_sales_costs'][$channel->getChannelNumber()]=0;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_sales_costs'][$channel->getChannelNumber()]+=$company->getMkSalesCost($channel->getChannelNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$region->getRegionNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$product->getProductNumber());\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['mk_fixed_costs'][$channel->getChannelNumber()])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_fixed_costs'][$channel->getChannelNumber()]=0;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_fixed_costs'][$channel->getChannelNumber()]+=$company->getMkFixedCost2($channel->getChannelNumber(), $region->getRegionNumber(), $product->getProductNumber()); // getMkFixedCost does not have $product as argument!\n\t\t\t\t\t\t\t\t// AHG 20171122 Mode change can be done by providing or not $product as argument\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//Costes funcionan por canal, para todos los productos y todas las regiones\n\t\t\t\t\n\t\t\t\tforeach ($this->_medias as $media){\n\t\t\t\t\tforeach ($this->_regions as $region){\n\t\t\t\t\t\tforeach ($this->_products as $product){\n\t\t\t\t\t\t\t$availability=$this->_games->getProductAvailibility($this->_game['id'], $this->_round['round_number'],$company->getId(), $product->getProductNumber());\n\t\t\t\t\t\t\tif($availability==1){\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['mk_advert_costs'][$media->getMediaNumber()])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_advert_costs'][$media->getMediaNumber()]=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_advert_costs'][$media->getMediaNumber()]+=$company->getMkAdvertCost($media->getMediaNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$region->getRegionNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$product->getProductNumber());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($this->_trademedias as $trademedia){\n\t\t\t\t\tforeach ($this->_channels as $channel){\n\t\t\t\t\t\tforeach ($this->_products as $product){\n\t\t\t\t\t\t\t$availability=$this->_games->getProductAvailibility($this->_game['id'], $this->_round['round_number'],$company->getId(), $product->getProductNumber());\n\t\t\t\t\t\t\tif($availability==1){\n\t\t\t\t\t\t\t\tif (! isset($this->_costs[$company->getId()]['mk_trade_costs'][$trademedia['trademedia_number']])){\n\t\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_trade_costs'][$trademedia['trademedia_number']]=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->_costs[$company->getId()]['mk_trade_costs'][$trademedia['trademedia_number']]+=$company->getMkTradeCost($trademedia['trademedia_number'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$channel->getChannelNumber(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$product->getProductNumber());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Medias y TradeMedias funcionan para todos los productos y todas las regiones\n\t\t\t\t\n\t\t\t\t//costes de las iniciativas selecionadas funcionando OK.\n\t\t\t\t$this->_costs[$company->getId()]['initiatives_pr_costs']=$company->getInitiativesProductionCost();\n\t\t\t\t$this->_costs[$company->getId()]['initiatives_mk_costs']=$company->getInitiativesMarketingCost();\n\t\t\t\t$this->_costs[$company->getId()]['initiatives_hr_costs']=$company->getInitiativesHumanResourcesCost();\n\t\t\t\t\n\t\t\t\t//costes de los estudios de mercado solicitados funcionando OK\n\t\t\t\t$this->_costs[$company->getId()]['market_researches_costs']=$company->getMarketResearchesCosts();\n\t\t\t\t//costes de cambios de I+D+i funcionando OK\n\t\t\t\t$this->_costs[$company->getId()]['idi_changes_costs']=$company->getIdiChangesCosts();\n\t\t\t\t//costes de I+D+i en lanzamiento de nuevos productos funcionando OK\n\t\t\t\t$this->_costs[$company->getId()]['idi_new_costs']=$company->getIdiNewCosts();\n\t\t\t\t\n\t\t\t\t$this->_costs[$company->getId()]['fi_debt_costs_st']=$company->getFiDebtCostsSt();\n\t\t\t\t$this->_costs[$company->getId()]['fi_debt_costs_lt']=$company->getFiDebtCostsLt();\n\t\t\t\techo(\"<br>CORE (1) FIDEBTCOSTS: \".$company->getFiDebtCostsLt().\"<br>\");\n\t\t\t\t\n\t\t\t\t//Para que no haya ningun coste a NULL\n\t\t\t\tforeach ($this->_costs[$company->getId()] as $name=>$cost){\n\t\t\t\t\tif(!isset($cost)){\n\t\t\t\t\t\t$this->_costs[$company->getId()][$name]=0;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t$this->save_costs();\n\t\t}",
"function pricing() {\r\n\t\t/*else*/ $this->layout = 'before_login';\r\n\t\t\r\n\t\t//session_regenerate_id();\r\n\t\t\r\n\t\t$cond['conditions']['Pricing.status'] = 0;\r\n\t\t$cond['conditions']['Pricing.validity'] = 6;\r\n\t\t$package1 = $this->Pricing->find('all', $cond);\r\n\t\t\r\n\t\t$cond['conditions']['Pricing.validity'] = 12;\r\n\t\t$package2 = $this->Pricing->find('all', $cond);\r\n\t\t\r\n\t\t$this->set('app', $this);\r\n\t\t$this->set('package1', $package1);\r\n\t\t$this->set('package2', $package2);\r\n\t\t$this->set('tab', array('7'));\r\n\t\t$this->getFeedback();\r\n\r\n\t}",
"function checkout() :int {\n $price = 200.1;\n $taxRate = 1.03;\n $FullPrice = $price * $taxRate;\n return $FullPrice;\n}",
"protected function setProfit()\n {\n $this->liveData->profit = $this->liveData->value - $this->investment->totalCost();\n }",
"public function presentPrice()\n {\n //$pricetotal = asDollars($pricetotal);\n return \"$\".number_format($this->price / 100);\n }",
"protected function giveCost()\n\t{\n\t\t$solarSavings=2;\n\t\t$this->valueNow=210.54/$solarSavings;\n\t\t\n\t\treturn $this->valueNow;\n\t}",
"public function getEstimatePay() {\n\t\t$pirepid = DB::escape($this->get->pirepid);\n\t\t$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pireps` WHERE `pirepid` = '.$pirepid;\n\t\t$pirep = DB::get_row($sql);\n\t\t\n\t\t$pilot = PilotData::getPilotData($pirep->pilotid);\n\t\t\n\t\t// Explode the flighttimes\n\t\t$flighttime = explode('.', $pirep->flighttime);\n\t\t$flighttime_min = ($flighttime[0] * 60) + ($flighttime[1]);\n\t\t$totalpay = ($pilot->payrate / 60) * $flighttime_min;\n\t\t\n\t\treturn FinanceData::formatMoney($totalpay);\n\t}",
"public function revised() {\n\t\t// Set the PIREP & Define the original flighttime variables\n\t\t$sql = \"SELECT * FROM \".TABLE_PREFIX.\"pireps WHERE pirepid = '$this->pirepid'\";\n\t\t$pirep = DB::get_row($sql);\n\t\t$flighttime = $pirep->flighttime;\n\t\t$flighttime_stamp = $pirep->flighttime_stamp;\n\n\t\t// Define Pilot's Payrate\n\t\t$pilot = PilotData::getPilotData($pirep->pilotid);\n\t\t$payrate = $pilot->payrate;\n\t\t// $payrate = 60; // For my debugging purposes\n\t\t\n\t\t// Display The Payrate\n\t\tself::displayData(\"Current Pilot's Payrate (per hour)\", $payrate);\n\n\t\t// Explode the flighttimes\n\t\t$flighttime = explode('.', $flighttime);\n\t\t$flighttime_stamp = explode(':', $flighttime_stamp);\n\n\t\t// Grab the Flighttime Decimal field values\n\t\t$flighttime_hour = $flighttime[0];\n\t\t$flighttime_min = ($flighttime_hour * 60) + ($flighttime[1]);\n\n\t\t// Grab the Flighttime_Stamp field values\n\t\t$flighttime_stamp_hour = $flighttime_stamp[0];\n\t\t$flighttime_stamp_min = ($flighttime_stamp_hour * 60) + ($flighttime[1]);\n\n\t\t$totalpay_decimal = ($payrate / 60) * $flighttime_min;\n\t\t$totalpay_stamp = ($payrate / 60) * $flighttime_stamp_min;\n\n\t\t$totalpay_original = $payrate * $pirep->flighttime;\n\n\n\t\tself::displayData(\"New Algorithm Using Decimal Form\", $totalpay_decimal);\n\t\tself::displayData(\"New Algorithm Using Flight Stamp Form\", $totalpay_stamp);\n\n\t\tself::displayData(\"What you are getting now (I think)\", $totalpay_original);\n\t\t\n\t\t// Revenue\n if(!empty($pirep->payforflight)) {\n $pilot->payrate = $pirep->payforflight;\n $payment_type = PILOT_PAY_SCHEDULE;\n } else {\n $payment_type = PILOT_PAY_HOURLY;\n }\n\t\t\n\t\t$revenue = PIREPData::getPIREPRevenue(json_decode(json_encode($pirep), true), $payment_type);\n\t\t\n\t\tself::displayData(\"Revenue For This PIREP\", $revenue);\n\t}",
"public function calculatePay()\r\n {\r\n return;\r\n }",
"function checkout() {\n $price = 200.1;\n $taxRate = 1.03;\n $FullPrice = $price * $taxRate;\n return $FullPrice;\n}",
"public function totaliza_pedido()\r\n {\r\n\r\n $this->mgt_nota_fiscal_valor_produtos->Text = '0.00';\r\n $this->mgt_nota_fiscal_valor_ipi->Text = '0.00';\r\n $this->mgt_nota_fiscal_valor_produtos->Text = '0.00';\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_nota_fiscal_cliente_desconto->Text;\r\n $frete = $this->mgt_nota_fiscal_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $Comando_SQL = \"select * from mgt_notas_entradas_produtos where mgt_nota_entrada_produto_numero_nota = \" . trim($this->mgt_nota_fiscal_faturamento->Text) . \" order by mgt_nota_entrada_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Fields['mgt_nota_entrada_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Fields['mgt_nota_entrada_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_nota_fiscal_valor_produtos->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_nota_fiscal_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_nota_fiscal_valor_produtos->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }",
"function calculateEstimate($simCount, $iosCount, $androidCount, $rentDays) {\n $simPrice = 29.99; ///-- put in config?\n $iphonePrice = 3.99;\n $androidPrice = 2.99;\n $subtotal = ($simCount * $simPrice) + ((($iosCount * $iphonePrice) + ($androidCount * $androidPrice)) * $rentDays);\n\n return $subtotal;\n}",
"function summary()\n {\n global $g_layout;\n $output = '<b>'.text(\"summary\", \"projectplan\").'</b><br><br>';\n $output.= $g_layout->data_top();\n $output.= '<tr>'.$g_layout->ret_td_datatitle();\n $output.= $g_layout->ret_td_datatitle(text(\"quotation\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"initial\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"current\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"planned\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"actual\", \"projectplan\"));\n $output.='</tr>';\n $output.='<tr class=\"row1\"><td class=\"table\">'.text(\"project_total\").'</td>';\n $output.='<td class=\"table\">'.$this->amount_format($this->m_project['fixed_price']).'</td>';\n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"initial_amount\"]>$this->m_project[\"fixed_price\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['initial_amount']).'</td>'; \n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"current_amount\"]>$this->m_project_totals[\"initial_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['current_amount']).'</td>'; \n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"planned_amount\"]>$this->m_project_totals[\"current_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['planned_amount']).'</td>';\n $output.='<td class=\"table\" style=\"background-color: '.($this->m_project_totals[\"booked_amount\"]>$this->m_project_totals[\"initial_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_project_totals['booked_amount']).'</td>';\n $output.='</tr>';\n $output.= $g_layout->data_bottom();\n return $output;\n }",
"function increase_due() {\n \n }",
"function transmitProjected()\n{\n $rows=$this->secInfo->projected; \n if (!$rows) {\n\t print (\"transmitProjected - \".'no projected rows'.'\\n');\n\t return;\n\t }\n $projected = count($rows);\n $this->secInfo->projectedScript='';\n $this->secInfo->ar_graphObj[\"projected\"]->createFiles();\n \n foreach($rows as $row)\n \t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//&& count($row->PROJECTED_OPENING_PRICE)>2\n\t\t if ((int)$row->PROJECTED_OPENING_PRICE==99999 || $row->PROJECTED_OPENING_PRICE==0)\n\t\t \t$price=$this->secInfo->startPrice / pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS]);\n\t//\tif ($row->ORDER_NUMBER==\"\")\n\t\t $price= (strpos($row->PROJECTED_OPENING_PRICE,\".\")==false ?((int)($row->PROJECTED_OPENING_PRICE.\"00\")) / (pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS])) \n\t\t\t\t :$row->PROJECTED_OPENING_PRICE/pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS]));\n\t\t \n//\t\t $vol = (int)$row->TOTAL_TRADED_VOLUME * 1;\n \t $milis= $this->data_io->formatTimeStr($row->OASIS_TIME).'0';\n//\t\t $hi = (strpos($row->TODAYS_HIGH_PRICE,\".\")==false ?((int)$row->TODAYS_HIGH_PRICE) / (pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS])) :$row->TODAYS_HIGH_PRICE);\n//\t\t $low = (strpos($row->TODAYS_LOW_PRICE,\".\")==false ?((int)$row->TODAYS_LOW_PRICE) / (pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS])) :$row->TODAYS_LOW_PRICE);\n\t\t $vol = ((int)$row->VOLUME) * 1;\n\t\t// if ($price > 0) {\n\t\t \t$this->secInfo->ar_graphObj[\"projected\"]->addDataFile($milis.\",\".$price.\",\".($vol==0 ?\",\":$vol));\n\t\t\t//}\n\t\t if ($row->ORDER_NUMBER!=\"\")\n\t\t {\n\t\t $url=\"javascript:createTradeOrdersWindow_bid('\" . $row->OASIS_TIME .\"','\" . \"Precall Order\" .\"','\". $row->ORDER_NUMBER .\"','\". \"00000\".\"','Order Detail','order');\";\n \t\t $this->secInfo->ar_graphObj[\"projected\"]->addEventFile($milis, \"\",\"Order:\".$row->ORDER_NUMBER.\"<br>\".\"Id: \".$row->ORDER_ID.\"<br>Pr: \".$price.\"<br>B Vol: \".$vol, $url, 1); // ordr: graph id\n\t\t }\n\t\t }\n\t\t \n $this->secInfo->ar_graphObj[\"projected\"]->close();\t\t \n/*\n $rows=$this->secInfo->projected_orders; \n foreach($rows as $row)\n \t\t{\n\t\t $omilis= $this->data_io->formatTimeStr($row->otime).'0';\n\t\t $ob_price= ((int)$row->oprice) / (pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS]));\n\t\t $ovol = ((int)$row->ovolume) * 1;\n\t\t \n\t\t $this->addDataFile($this->secInfo->graphProjectedFname2,$omilis.\",\".$ob_price);\n\t\t \n\t\t $url=$url_b.\"javascript:createTradeOrdersWindow_bid('\" . $row->otime .\"','\" . \"Precall Order\" .\"','\". $row->onumber .\"','\". \"00000\".\"','Order Detail','order');\";\n \t\t $this->addEventFile($this->secInfo->graphProjectedEventsFname,$omilis,$row->onumber,\"Id: \".$row->oid.\"<br>Pr: \".$ob_price.\"<br>B Vol: \".$ovol, $url, 1); // ordr: graph id\n\t\t }\n*/\t\t \n $this->secInfo->openAuctionPrice = $rows[$projected-1]->OPENING_PRICE_AUCTION_PRICE;\n $open = ((int)$this->secInfo->openAuctionPrice) / (pow(10,$this->tableIS['PRICE'][_IDX_DECIMALS]));\t \n \t\n }",
"private function processCurrentPrice(){\n $priceprocess = Priceprocess::where('id', '=', 1)\n ->where('last_process_date', '<', \\Carbon\\Carbon::now()->toDateString())\n ->first();\n \n if($priceprocess){\n \n $today = \\Carbon\\Carbon::today()->toDateString();\n \n //proses harga dengan harga baru\n $products = Product::where('qty', '>', 0)->get();\n foreach($products as $product){\n $product->currentprice_id = \\App\\Http\\Controllers\\Custom\\PriceFunction::updateCurrentPrice($product->id);\n $product->last_price_update = $today;\n $product->save();\n }\n \n //update tanggal update harga\n $priceprocess->last_process_date = $today;\n $priceprocess->save();\n \n }\n \n }",
"public function cost()\n {\n $cin_date = new \\DateTime($this->check_in);\n $cout_date = new \\DateTime($this->check_out);\n $diff = $cin_date->diff($cout_date);\n\n //multiply p/pn by about of days spent. \n return $this->room->price_per_night * (int)$diff->days;\n }",
"public function index()\n {\n $inputDate = Input::get('c') ? Input::get('c') : Carbon::now()->format('Y-m');\n $current = Carbon::createFromFormat('Y-m', $inputDate);\n\n $year = $current->year;\n\n $calendar = [\n 'current' => $current,\n 'next' => (clone $current)->addMonth(),\n 'prev' => (clone $current)->addMonth('-1')\n ];\n $projects = Project::visible()->with([\n 'contract',\n 'outputValues' => function($query) use ($year) {\n $query->where('year', '<=', $year);\n },\n 'receipts' => function($query) use ($year) {\n $query->where('year', '<=', $year);\n },\n //'receipts.total',\n 'capitalPlans'=> function($query) use ($current) {\n $query->where('calendar', '<=', $current);\n },\n 'sections' => function($query) use ($current) {\n $query->where('completion_date', '<=', (clone $current)->lastOfMonth());\n },\n ])->has('contract')->get();\n\n $balances = collect();\n\n foreach ($projects as $index=>$project) {\n\n // 按照公式计算结果\n $signed_money = $project->contract->signed_money;\n if (!($signed_money>0)) {\n continue;\n }\n $last_month_output_value = $project->outputValues->where('year', $calendar['prev']->year)->first()['m_'.$calendar['prev']->month];\n $last_month_receipt = $project->receipts->where('year', $calendar['prev']->year)->first()['m_'.$calendar['prev']->month];\n $total_output_value = 0.0;\n $total_pay_times = 0;\n\n foreach ($project->outputValues as $output) {\n $total_output_value += $output->totalBefore($calendar['current']);\n $total_pay_times += $output->timesBefore($calendar['current']);\n }\n\n $advance_payment_amount = $project->contract->advance_payment_amount;\n $progress_payment_pct = $project->contract->progress_payment_pct;\n $current_month_receivable = $last_month_output_value * $progress_payment_pct / 100;\n $total_receivable = $total_output_value * $progress_payment_pct / 100;\n\n // 根据预方式计算预付款扣除\n $advance_payment_times = $project->contract->getOriginal('advance_payment_times');\n if (is_null($advance_payment_times)) {\n $advance_payment_deducted = $advance_payment_amount * ($total_output_value / $signed_money);\n } else if ($total_pay_times >= $advance_payment_times || $advance_payment_times == 0) {\n $advance_payment_deducted = $advance_payment_amount;\n } else {\n $advance_payment_deducted = $total_pay_times / $advance_payment_times * $advance_payment_amount;\n }\n\n $total_receipt = 0.0;\n foreach ($project->receipts as $receipt) {\n $total_receipt += $receipt->totalBefore($calendar['current']);\n }\n $total_arrears = $available_capital = $total_receivable + $advance_payment_amount - $advance_payment_deducted - $total_receipt;\n $planned_expenditure = $project->capitalPlans->sum('payment_amount');\n\n // 按部位计算项目重新计算必要项\n $pay_mode = $project->contract->getOriginal('pay_mode');\n $current_month_receivable_warning = false;\n $advance_payment_deducted_warning = false;\n $total_receivable_warning = false;\n\n if ($pay_mode == 1) {\n if ($project->sections->isEmpty()) {\n $current_month_receivable_warning = true;\n $total_receivable_warning = true;\n } else {\n $last_month_output_value = $project->sections\n ->where('completion_date', '>=', (clone $calendar['prev'])->firstOfMonth())\n ->where('completion_date', '<=', (clone $calendar['prev'])->lastOfMonth())\n ->sum('receivable');\n $total_sections_output_value = $project->sections->sum('receivable');\n $total_pay_times = $advance_payment_deducted = $project->sections->count();\n\n // 预付款扣除重计算\n $customize = $project->sections->where('advance_deducted', '>=', '0')->isNotEmpty();\n if ($customize && !is_null($advance_payment_times)) {\n $advance_payment_deducted_warning = true;\n }\n if ($customize) {\n $advance_payment_deducted = $project->sections->sum('advance_deducted');\n } else {\n if (is_null($advance_payment_times)) {\n $advance_payment_deducted = $advance_payment_amount * ($total_sections_output_value / $signed_money);\n } else if ($advance_payment_times >= $total_pay_times || $advance_payment_times == 0) {\n $advance_payment_deducted = $advance_payment_amount;\n } else {\n $advance_payment_deducted = $total_pay_times / $advance_payment_times * $advance_payment_amount;\n }\n }\n\n $current_month_receivable = $last_month_output_value * $progress_payment_pct / 100;;\n $total_receivable = $project->sections->sum('receivable') * $progress_payment_pct / 100;\n $available_capital = $total_receivable + $advance_payment_amount - $advance_payment_deducted - $total_receipt;\n }\n }\n $available_capital_warning = $current_month_receivable_warning && $advance_payment_deducted_warning;\n\n $balances->push(collect([\n 'id' => $project->id,\n 'name' => $project->name,\n 'signed_money' => $signed_money,\n 'pay_mode' => $project->contract->pay_mode,\n 'advance_payment_amount' => $advance_payment_amount,\n 'advance_payment_mode' => $project->contract->advance_payment_mode,\n 'manager' => $project->manager,\n 'build_area' => $project->build_area,\n // 总产值\n 'total_output_value' => $total_output_value,\n // 上个月产值\n 'last_month_output_value' => $last_month_output_value,\n // 按进度付款比例\n 'progress_payment_pct' => $progress_payment_pct,\n // 当月应收\n 'current_month_receivable' => $current_month_receivable,\n // 累计应收\n 'total_receivable' => $total_receivable,\n // 已扣除预付款\n 'advance_payment_deducted' => $advance_payment_deducted,\n // 累计已收\n 'total_receipt' => $total_receipt,\n // 可收\n 'available_capital' => $available_capital,\n // 欠款总额\n 'total_arrears' => $total_arrears,\n // 计划支出\n 'planned_expenditure' => $planned_expenditure,\n // 上月实收\n 'last_month_receipt' => $last_month_receipt,\n 'warnings' => [\n 'current_month_receivable' => $current_month_receivable_warning,\n 'total_receivable' => $total_receivable_warning,\n 'advance_payment_deducted' => $advance_payment_deducted_warning,\n 'available_capital' => $available_capital_warning,\n ]\n ]));\n }\n\n return view('charts.balance', compact('calendar', 'balances'));\n }",
"public function pricesUpdFormSubmitted(Form $form)\r\n\t{\r\n\t\tif ($form['pricecalc']->isSubmittedBy()) {\r\n\t $instance = new Produkt;\r\n\t\t\t$kalk = new Kalkul;\r\n\t\t\t$data = (array) $form->values;\r\n\t\t\t$idp = (int) $this->getParam('id');\r\n\t\t\t$item = $instance->find($idp)->fetch();\r\n\t\t\t$id_meny = (int) $data['id_meny'];\r\n\t\t\t$id_pocty = (int) $data['id_pocty'];\r\n\t\t\t$vzorec = (int) $data['vzorec'];\r\n\t\t\t//recalculate BOMs\r\n\t\t\t$result = $kalk->calcMatPrices($idp, $item->idn);\r\n\t\t\tif(!$result){\r\n\t\t\t\t$this->flashMessage('BOM se nepodařilo zrekalkulovat. Ověřte správnost dat BOMu.','warning');\r\n\t\t\t\t$this->redirect('detail', $idp);\r\n\t\t\t}\r\n\t\t\t//recalculate costs\r\n\t\t\t$result = $kalk->costsCalc($idp, $item->idsso);\r\n\t\t\tif(!$result){\r\n\t\t\t\t$this->flashMessage('Náklady nebyly aktualizovány. Přiřaďte produkt nabídce.','warning');\r\n\t\t\t} else {\r\n\t\t\t\t//calculate prices\r\n\t\t\t\t$res = $kalk->kalkulPrices($item->idn, $idp, $vzorec, $item->idss, $id_pocty, $id_meny);\r\n\t\t\t\t//$res = $kalk->pricesCalc($item->idn, $idp, $item->idss, $id_meny, $id_pocty, $vzorec);\r\n\t\t\t\tif($res){\r\n\t\t\t\t\t$rins = $res['r_ins'];\r\n\t\t\t\t\t$rupd = $res['r_upd'];\r\n\t\t\t\t\t//nějaký FAKE - hodnoty se vracejí obráceně - UPD namísto INS???\r\n\t\t\t\t\t$this->flashMessage(\"Náklady i ceny byly úspěšně aktualizovány (upd/ins = $rins/$rupd).\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->flashMessage(\"Náklady i ceny zřejmě nebyly správně zaktualizovány.\",\"exclamation\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->redirect('detail', $this->getParam('id'));\r\n\t}",
"public function getAmountPlanned();",
"function miniature_pricer($s, $t){\n\tif(isset($s) && isset($t) && $t !='' && $s !=''){ //CHECK FOR INCOMIMG PARAMERTS\n\t\t//GET CURRENT SPOT PRICE\n\t\t$sort_price = $s;\n\t\t//GET TIME IN YEAR FOR FINDING FUTURE PRICE\n\t\t$time_in_year = $t;\n\t\t//SET YEAR DAYS\n\t\t$total_days_in_year = 365;\n\t\t//SET Interest TABLE\n\t\t$Intrest_rate['1'] = 10/100; //10 %\n\t\t$Intrest_rate['30'] = 5/100; //5 %\n\t\t$Intrest_rate['60'] = 4/100; //4 %\n\t\t$Intrest_rate['90'] = 2/100; //2 %\n\t\t$Intrest_rate['210'] = 2; //2\n\t\t\n\t\tif(!isset($Intrest_rate[$time_in_year])){\n\t\t\techo 'No Interest For This Time Frame ONLY USE 1 / 30 / 60 / 90 / 210 DAYS'; // MATCHING VALUES FOR INTREST TABLE DATA // CURRENTLY I PASS WITH ECHO.. CORRECT WAY IS RETURN VALUE\n\t\t\texit();\n\t\t}\n\t\t$t = (float)$time_in_year/(float)$total_days_in_year; // total Time in year divide by Total Days in year.\n\t\t$intrestrate = (float)$Intrest_rate[(string)$time_in_year]; // Generate Intrest Rate\n\t\t$mergeInterst = ((float)$intrestrate)*((float)($t)); // Mearge Interest with Total Time finding future price\n\t\t\n\t\t//echo intval($Intrest_rate[(string)$time_in_year]).'<br>';\n\t\t$F = (float)$sort_price * exp($t); \n\t\t\techo 'Future contract = '.$F; // ANSWER // CURRENTLY I PASS WITH ECHO.. CORRECT WAY IS RETURN VALUE\n }else{\n\t\t\techo 'Missing Parameter'; // ERROR MISSING PARAMERTER // CURRENTLY I PASS WITH ECHO.. CORRECT WAY IS RETURN VALUE\n\t}\n}",
"function jr_plan_price( $plan_data ) {\n\n\t$price = $plan_data[JR_FIELD_PREFIX.'price'];\n\n\tif ( ( get_query_var('job_relist') || isset($_POST['relist']) ) && isset($plan_data[JR_FIELD_PREFIX.'relist_price']) ) {\n\t\t$price = intval($plan_data[JR_FIELD_PREFIX.'relist_price']);\n\t}\n\treturn apply_filters( 'jr_plan_price', $price, $plan_data );\n}",
"public function Go() {\n\tif($this->get->pirepid) {\n\t\t$this->pirepid = DB::escape($this->get->pirepid);\n\t}\n\t\t// PIREPData.class.php => Calculate PIREPPayment\n $pirep = DB::get_row(\n 'SELECT `pirepid`, `pilotid`,\n `flighttime_stamp`, `pilotpay`,\n `paytype`, `flighttype`, `accepted`\n FROM `'.TABLE_PREFIX.'pireps`\n WHERE `pirepid`='.$this->pirepid\n );\n\n if($pirep->paytype == PILOT_PAY_HOURLY) {\n # Price out per-hour?\n $peices = explode(':', $pirep->flighttime_stamp);\n $minutes = ($peices[0] * 60) + $peices[1];\n $amount = $minutes * ($pirep->pilotpay / 60);\n\n } elseif($pirep->paytype == PILOT_PAY_SCHEDULE) {\n $amount = $pirep->pilotpay;\n }\n\t\t\n\t$pilot = PilotData::getPilotData($pirep->pilotid);\n\techo '<h3>PIREP Data for PIREP #'.$this->pirepid.' & Pilot - '.$pilot->firstname.' '.$pilot->lastname.'</h3>';\n\techo '<br />';\n\n self::displayData(\"PIREPData => CalculatePIREPPayment\", $amount);\n\n\t\t// PIREPData.class.php => PopulatePIREPFinance\n\t\t// Nothing in this function as it sets the DB's pilotpay field to the pilot's payrate\n\n\t\t// PIREPData.class.php => getPIREPRevenue\n\t\t// Nothing in this function as it returns revenue data only\n\n\t\t// PilotData.class.php => resetPilotPay\n\t\t$sql = \"SELECT SUM(`amount`) AS `total` FROM `\".TABLE_PREFIX.\"ledger` WHERE `pilotid` = '$pirep->pilotid'\";\n\t\t$total = DB::get_row($sql);\n\n self::displayData(\"PilotData => resetPilotPay\", $total->total);\n\n\t\t$this->revised();\n\t}",
"public function getMerchandisePricing();",
"function cp_print_funds_item_item($item_xml){ \n\t\t$header = cp_find_xml_value($item_xml, 'header');\n\t\t$project = cp_find_xml_value($item_xml, 'project');\n\t\t\n\t\t//Condition to check Projects are not empty\n\t\tif($project <> ''){\n\t\t\t//Fetch All elements here\n\t\t\t$ign_fund_goal = get_post_meta($project, 'ign_fund_goal', true);\n\t\t\t$ign_project_id = get_post_meta($project, 'ign_project_id', true);\n\t\t\t$ign_product_image1 = get_post_meta($project, 'ign_product_image1', true);\n\t\t\t$ignition_date = get_post_meta($project, 'ign_fund_end', true);\n\t\t\t$ignition_datee = date('d-m-Y h:i:s',strtotime($ignition_date));\n\t\t\t\n\t\t\t$getPledge_cp = getPledge_cp($ign_project_id);\n\t\t\t$current_date = date('d-m-Y h:i:s');\n\t\t\t$project_date = new DateTime($ignition_datee);\n\t\t\t$current = new DateTime($current_date);\n\t\t\t\n\t\t\t$days = round(($project_date->format('U') - $current->format('U')) / (60*60*24));\n\n\t\t?>\n\t\t<div id=\"charity_progress\">\n\t\t\t<h3><a href=\"<?php echo get_permalink($project);?>\"><?php echo get_the_title($project);?></a></h3>\n\t\t\t<div id=\"charity_process_inner\">\n\t\t\t\t<div class=\"span4 img first\">\n\t\t\t\t\t<img src=\"<?php echo esc_url($ign_product_image1);?>\" alt=\"<?php echo get_the_title($project);?>\"/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"span8 progress_report\">\n\t\t\t\t<h2> <?php esc_html_e('$','mosque_crunchpress');?><?php echo getTotalProductFund_cp($ign_project_id);?> </h2>\n\t\t\t\t<h4><?php esc_html_e('Pledged of','mosque_crunchpress');?> <?php esc_html_e('$','mosque_crunchpress');?><?php echo esc_attr($ign_fund_goal);?> <?php esc_html_e('Goal','mosque_crunchpress');?></h4>\n\t\t\t\t\t<div class=\"progress progress-striped active\"> \n\t\t\t\t\t\t<div style=\"width:<?php echo getPercentRaised_cp($ign_project_id);?>%;\" class=\"bar p80\"></div> \n\t\t\t\t\t</div>\n\t\t\t\t\t <div class=\"info\"> \n\t\t\t\t\t\t\t<div class=\"span6 first\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-user\"></i> <span> <?php echo esc_attr($getPledge_cp[0]->p_number);?></span> <?php esc_html_e('Pledgers','mosque_crunchpress');?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span6 ntr\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar-empty\"></i> <span> <?php echo esc_attr($days);?></span> <?php esc_html_e('Days Left','mosque_crunchpress');?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\n\t<?php\n\t\t}// Condition Ends Here\n\t}"
] | [
"0.6242503",
"0.6039847",
"0.6020592",
"0.59766036",
"0.5930611",
"0.58718914",
"0.57373047",
"0.5718269",
"0.57094693",
"0.5688206",
"0.56862384",
"0.5671156",
"0.56509256",
"0.56422293",
"0.56392276",
"0.5629415",
"0.56185555",
"0.5573686",
"0.5570224",
"0.55631584",
"0.5538836",
"0.55375683",
"0.5536251",
"0.55260944",
"0.5514868",
"0.5514734",
"0.5486153",
"0.5478465",
"0.54689914",
"0.54591334"
] | 0.6587355 | 0 |
======================================================================== Adiciona folha de estilo no editor tinymce add_action( 'init', 'oowptheme_add_editor_styles' ); | function oowptheme_add_editor_styles() {
add_editor_style( 'assets/css/tinymce.css' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mr_theme_add_editor_styles() {\n add_editor_style( 'editor-style.css' );\n}",
"function idaho_webmaster_add_editor_styles() {\n\t\tadd_editor_style();\n\t}",
"function theclick_editor_styles()\n{\n add_editor_style('assets/admin/css/editor.css');\n}",
"function editor_styles() {\n\n\t add_editor_style( 'tinymce-formats.css' );\n\t}",
"function weavr_add_editor_styles() {\n add_editor_style( '/assets/css/editor-styles.css' );\n}",
"function underskeleton_add_editor_styles() {\n // Load 'theme.min.css' as most of it is necessary for editor as well.\n add_editor_style( array( 'css/editor-style.min.css', 'css/theme.min.css' ) );\n}",
"function my_theme_add_editor_styles() {\n\t// add_editor_style( 'http://august.services/assets/august.css' );\n}",
"function wpdocs_theme_add_editor_styles() {\n add_editor_style( 'custom-editor-style.css' );\n}",
"function my_setup() {\n\tadd_editor_style();\n\n}",
"function mtws_custom_excerpt_theme_add_editor_styles() {\n add_editor_style( 'custom-excerpt-editor-style.css' );\n}",
"function <%= name %>_mce_before_init( $styles ){\n $style_formats = array(\n array(\n 'title' => 'Button',\n 'selector' => 'a',\n 'classes' => 'btn'\n )\n );\n $styles['style_formats'] = json_encode( $style_formats );\n // Remove h1 and code\n $styles['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6';\n // Let only the colors you want\n $styles['textcolor_map'] = '[' . \"'000000', 'Noir', '565656', 'Texte'\" . ']';\n return $styles;\n}",
"function i3_editor_styles() {\n add_editor_style( '/inc/css/editor-style.css' );\n }",
"public function admin_init_functions() {\n $this->admin_css();\n \n // Add custom admin scripts\n $this->add_action('admin_print_footer_scripts', 'admin_print_footer_scripts', 99);\n \n // Add custom styles for TinyMCE editor\n add_editor_style('admin/css/editor.css');\n }",
"function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) {\n\n\t$styles = twentytwenty_get_customizer_css( 'classic-editor' );\n\n\tif ( ! isset( $mce_init['content_style'] ) ) {\n\t\t$mce_init['content_style'] = $styles . ' ';\n\t} else {\n\t\t$mce_init['content_style'] .= ' ' . $styles . ' ';\n\t}\n\n\treturn $mce_init;\n\n}",
"function mtws_load_custom_excerpt_content_editor_style() {\n wp_register_style( 'custom_excerpt_main_content_wp_admin_css', get_bloginfo( 'stylesheet_directory' ) . '/custom-excerpt-main-content-editor-style.css', false, '1.0.0' );\n wp_enqueue_style( 'custom_excerpt_main_content_wp_admin_css' );\n}",
"function editor_init() {\r\n\t\t?>\r\n\t\t<div style=\"display:none;\">\r\n\t\t\t<?php\r\n\t\t\t\t$settings = array(\r\n\t\t\t\t\t'tinymce' => array(\r\n\t\t\t\t\t\t'resize' => true,\r\n\t\t\t\t\t\t'wp_autoresize_on' => true,\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t\tadd_filter('user_can_richedit', '__return_true');\r\n\t\t\t\twp_editor('', 'carbon_settings', $settings);\r\n\t\t\t\tremove_filter('user_can_richedit', '__return_true');\r\n\t\t\t?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}",
"function codearosa_editor_styles() {\n\twp_enqueue_style( 'codearosa-editor-style', get_stylesheet_directory_uri() . '/css/custom-editor-style.min.css' );\n\n}",
"function plume_classic_editor_styles() {\n\t$classic_editor_styles = ['/assets/css/editor-style-classic.css'];\n\n\tadd_editor_style($classic_editor_styles);\n}",
"function twentytwenty_classic_editor_styles() {\n\n\t$classic_editor_styles = array(\n\t\t'/assets/css/editor-style-classic.css',\n\t);\n\n\tadd_editor_style( $classic_editor_styles );\n\n}",
"function idkomm_gutenberg_editor_style() {\n\twp_enqueue_style( 'idkomm-gutenberg-editor', get_theme_file_uri( '/style-editor.css' ), FALSE );\n}",
"function editor_style()\n {\n wp_enqueue_style(\n 'editor-style',\n get_theme_file_uri('/assets/stylesheets/editor.css')\n );\n\n wp_enqueue_script(\n 'webpack-style-js',\n get_theme_file_uri('/assets/javascripts/style.js'),\n array(),\n null,\n true\n );\n\n wp_enqueue_script(\n 'editor-bundle',\n get_theme_file_uri('/assets/javascripts/customizer.js'),\n array(),\n null,\n true\n );\n }",
"function boilerplate_mce_before_init( $settings ) {\n\n\t$style_formats = array(\n\t\tarray( 'title' => esc_html__( 'Intro Text', '__theme_txtd' ), 'selector' => 'p', 'classes' => 'intro' ),\n\t\tarray( 'title' => esc_html__( 'Highlight', '__theme_txtd' ), 'inline' => 'span', 'classes' => 'highlight' ),\n\t\tarray( 'title' => esc_html__( 'Dropcap', '__theme_txtd' ), 'inline' => 'span', 'classes' => 'dropcap' ),\n\t\tarray(\n\t\t\t'title' => esc_html__( 'Pull Left', '__theme_txtd' ),\n\t\t\t'wrapper' => true,\n\t\t\t'block' => 'blockquote',\n\t\t\t'classes' => 'pull-left'\n\t\t),\n\t\tarray(\n\t\t\t'title' => esc_html__( 'Pull Right', '__theme_txtd' ),\n\t\t\t'wrapper' => true,\n\t\t\t'block' => 'blockquote',\n\t\t\t'classes' => 'pull-right'\n\t\t),\n\t);\n\n\t$settings['style_formats'] = json_encode( $style_formats );\n\n\treturn $settings;\n}",
"function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {\n\n\t$styles = TwentyTwenty_Non_Latin_Languages::get_non_latin_css( 'classic-editor' );\n\n\t// Return if there are no styles to add.\n\tif ( ! $styles ) {\n\t\treturn $mce_init;\n\t}\n\n\tif ( ! isset( $mce_init['content_style'] ) ) {\n\t\t$mce_init['content_style'] = $styles . ' ';\n\t} else {\n\t\t$mce_init['content_style'] .= ' ' . $styles . ' ';\n\t}\n\n\treturn $mce_init;\n\n}",
"function tinymce_buttons() {\n /* Add MCE css file to the admin section. This is used mainly for using dashicons as the MCE buttons, but you can also include your own custom buttons here. */\n wp_enqueue_style( 'custom_tinymce_plugin', get_template_directory_uri() . '/css/custom-tinymce-plugin.css', __FILE__ );\n}",
"function tkmnineteen_mce_before_init( $settings ) {\n\n \t$style_formats = array(\n \t\tarray(\n \t\t\t'title' => 'Button',\n \t\t\t'selector' => 'a',\n \t\t\t'classes' => 'button',\n \t\t),\n\t\tarray(\n\t\t\t'title' => 'Large Paragraph',\n\t\t\t'selector' => 'p',\n\t\t\t'classes' => 'large',\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Small Paragraph',\n\t\t\t'selector' => 'p',\n\t\t\t'classes' => 'small',\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Extra Margin Paragraph',\n\t\t\t'selector' => 'p',\n\t\t\t'classes' => 'extra-margin',\n\t\t)\n \t);\n \t$settings['style_formats'] = json_encode( $style_formats );\n \treturn $settings;\n }",
"function content_add_my_stylesheet(){\n\t\tglobal $ecpt_base_dir;\n\t\t wp_register_style( 'content_add_my_stylesheet',$ecpt_base_dir.'includes/tinymce/css/style.css' );\n\t}",
"public function enqueueThemeEditorStyles()\n {\n // Enqueue block editor stylesheet.\n add_editor_style( 'assets/css/editor/editor-styles.min.css' );\n }",
"public function __construct() {\n add_action( 'init' , __CLASS__ . '::myplugin_add_styles' );\n\n }",
"function momizat_admin_init(){\n\tglobal $current_screen;\n\t\n\t//enqueue the script and CSS files for the TinyMCE editor formatting buttons\n\tif($current_screen->base=='post'){\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('jquery-ui-dialog');\n\t\tadd_editor_style('framework/shortcodes/sc.css');\n\t}\n}",
"function mcekit_editor_enqueue() {\n $StyleUrl = get_stylesheet_directory_uri().'/css/tinymce.css'; // Customstyle.css is relative to the current file\n\t\t\n wp_enqueue_style( 'myCustomStyles', $StyleUrl );\n}"
] | [
"0.8094701",
"0.80432504",
"0.79696715",
"0.79310095",
"0.77925324",
"0.77567077",
"0.77230114",
"0.76221955",
"0.7535316",
"0.7432283",
"0.74044204",
"0.7401068",
"0.72715986",
"0.7130331",
"0.7066652",
"0.7061373",
"0.7049573",
"0.7000999",
"0.6969886",
"0.6944418",
"0.6939287",
"0.6939161",
"0.69335335",
"0.6918744",
"0.690745",
"0.6887276",
"0.6882827",
"0.68564725",
"0.6810333",
"0.67745733"
] | 0.86716634 | 0 |
Creates a new Tareas model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
$model = new Tareas();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index']);
// return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
'area' => Tareas::getAreaLaboral(),
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new Area();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Area();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('/addres/area/create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new CdekArea();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n \t$model->status = 1;\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n\n {\n return view('admin.tareas.create');\n }",
"public function add(){\n\t\tif ($_POST) {\n\t\t\tif ($this->tareas->save('tareas', $_POST)) {\n\t\t\t\t$this->redirect(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller'=>'tareas',\n\t\t\t\t\t\t\t\t'action'=>'index'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$this->redirect(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller'=>'tareas',\n\t\t\t\t\t\t\t\t'action'=>'index'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->_view->categorias = $this->db->find('categorias','all');\n\t\t\t$this->_view->titulo = \"Agregar tarea\";\n\t\t\t$this->_view->renderizar('add');\n\t\t}\n\t}",
"public function create()\n {\n //\n return view('areas.create');\n }",
"public function create()\n {\n //\n return view('areas.create');\n }",
"public function create()\n\t{\n\t\treturn view ('areas.create');\n\t}",
"public function agregar()\n\t\t{\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$tareas = $this->loadModel(\"tarea\");\n\t\t\t\t$this->_view->tareas = $tareas->agregar($_POST);\n\t\t\t\t$this->redirect(array(\"controller\"=>\"tareas\"));\n\t\t\t}\n\t\t\t$categorias = $this->loadModel(\"categoria\");\n\t\t\t$this->_view->categorias=$categorias->getCategorias();\n\t\t\t$this->_view->titulo=\"Agregar Tarea\";\n\t\t\t$this->_view->renderizar(\"agregar\");\n\t\t}",
"public function create() {\n return View::make('tareas::create');\n }",
"public function create()\n {\n // $proyecto = Proyecto::orderBy('nombre')->get();\n // return view('tarea.create')->with(compact('proyecto')); //formulario para nuevo registro\n return view('admin.tarea.create');\n }",
"public function create()\n {\n $areas = Area::all()->where('ESTADO_AREA', '=', 1);\n return view('admin.areas.crear', compact('areas'));\n }",
"public function newAction()\n {\n $entity = new Tarea();\n $tareasService = $this->get('contadores.servicios.tareas');\n $vencimientoService = $this->get('contadores.servicios.vencimiento');\n $form = $this->createForm(new TareaType($tareasService,$vencimientoService), $entity, array(\n 'user' => $this->getUser(),\n 'periodica' => false\n ));\n\n return $this->render('ContadoresBundle:Tarea:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'tarea_new'\n ));\n }",
"public function create()\n {\n return view('production.areas.create');\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Trazabilidad;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Trazabilidad']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Trazabilidad'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function create()\n {\n /*if (Auth::user()->can('areas.create')) {*/\n $areas = Area::all();\n $countries = Country::all();\n return view('admin.area.create', compact('areas', 'countries'));\n /*}\n return redirect(route('admin.home'));*/\n }",
"public function create()\n {\n $carreras = Carrera::pluck('nombre' , 'id');\n\n return view('areas.create' , compact('carreras'));\n }",
"public function actionCreate() {\n $model = new Forms();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post())) {\n $model->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n $materias = Materia::where('user_id', Auth::user()->id)->get();\n return view('tareas.create', compact('materias'));\n }",
"public function create()\n {\n return view('military::military_areas.create');\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Tacones;\n\t\t$colores = Colores::model()->findAll();\n\t\t$suelas = Suelas::model()->findAll('activo=1');\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Tacones']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Tacones'];\n\t\t\tif($model->save()){\n\t\t\t\tforeach ($_POST['TaconesColores']['id_colores'] as $id => $value) {\n\t\t\t\t\t$suelaColor = new TaconesColores;\n\t\t\t\t\t$suelaColor->id_tacones = $model->id;\n\t\t\t\t\t$suelaColor->id_colores = $id;\n\t\t\t\t\t$suelaColor->save();\n\t\t\t\t}\n\t\t\t\tforeach ($_POST['TaconesNumeros']['numero'] as $numero => $value) {\n\t\t\t\t\t$suelaNumero = new TaconesNumeros;\n\t\t\t\t\t$suelaNumero->numero = $numero;\n\t\t\t\t\t$suelaNumero->id_tacones = $model->id;\n\t\t\t\t\t$suelaNumero->save();\n\t\t\t\t}\n\t\t\t\tforeach ($_POST['TaconesSuelas']['id_suelas'] as $id_suela => $value) {\n\t\t\t\t\t$suelaTacon = new SuelasTacones;\n\t\t\t\t\t$suelaTacon->id_suelas = $id_suela;\n\t\t\t\t\t$suelaTacon->id_tacones = $model->id;\n\t\t\t\t\t$suelaTacon->save();\n\t\t\t\t}\n\t\t\t\t$taconNumero = new TaconesNumeros;\n\t\t\t\t$taconNumero->numero = 0;\n\t\t\t\t$taconNumero->id_tacones = $model->id;\n\t\t\t\t$taconNumero->save();\n\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'colores'=>$colores,\n\t\t\t'suelas'=>$suelas,\n\t\t));\n\t}",
"public function create()\n {\n $areas = Area::all();\n return view('paralegals.create', compact('areas'));\n }",
"public function create()\n {\n return view('admin.addarea');\n }",
"public function create()\n {\n $lct1s = Lct1::orderBy('area_id')->orderBy('name')->get();\n foreach ($lct1s as $lct1) {\n $arrLct1s[] = array('id' => $lct1->id,\n 'name' => $lct1->name . ' --- ' . $lct1->area->name);\n }\n $varComboSups = $arrLct1s;\n $model = 'lct2s';\n $labelAreaLct1Lct2 = 'Ubicación DOS';\n $labelNameSup = 'Ubcicación UNO';\n $fieldNameSup = 'lct1_id';\n return view('configuration.AreasLct1sLct2s.createAreaLct1Lct2', compact('varComboSups', 'model', 'labelAreaLct1Lct2', 'labelNameSup', 'fieldNameSup'));\n }",
"public function actionCreate()\n {\n $us = Usuarios::find()->where(['id' => Yii::$app->user->id])->one();\n if ($us->rol !== 'C') {\n return $this->goHome();\n }\n $model = new Alumnos();\n $model->colegio_id = $us->colegio_id;\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function crear(){\n\t\t\t$usuario=Login::getUsuario();\n\t\t\tif(!$usuario->admin) throw new Exception('Operació vàlida només per Administradors');\n\t\t\tif(!empty($_POST['nueva'])){\n\t\t\t\t$area = new AreaModel();\n\t\t\t\t$area->nom = $_POST['nom'] ;\n\t\t\t\t// guardar el area en BBDD con el modelo\t\n\t\t\t\tif(!$area->guardar())\n\t\t\t\t\tthrow new Exception('No es va poder guardar l\\'àrea');\n\t\t\t\telse{\n\t\t\t\t\t//mostrar la vista de la lista exito\n\t\t\t\t\t$datos = array();\n\t\t\t\t\t$datos['usuario'] = Login::getUsuario();\n\t\t\t\t\t$datos['mensaje'] = '<h5>Àrea Creada:'.$area.'</h5>';\n\t\t\t\t\t$this->load_view('view/exito.php', $datos);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//mostrar la vista de Nuevo Area\t\t\t\t\n\t\t\t\t$datos = array();\n\t\t\t\t$datos['usuario'] = Login::getUsuario();\n\t\t\t\t$this->load_view('view/areas/nueva_area.php', $datos);\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"public function create()\n {\n //pluck\n $empleados = Empleado::all();\n return view('tareas.form',compact('empleados'));\n return view('tareas.form');\n }",
"public function add(){\n\t\t\n\t\t$this->form_validation->set_rules('area', 'AREA', 'trim|required|is_unique['.AREA.'.area]');\n $this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n\n if ($this->form_validation->run() == true) {\t\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'state_id' => $this->input->post('state_id'),\n\t\t\t\t'city_id' => $this->input->post('city_id'),\n\t\t\t\t'area' => $this->input->post('area'),\n\t\t\t\t'zipcode' => $this->input->post('zipcode'),\n\t\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\t,\t\n\t\t\t\t'created_by'=>$this->session->userdata('id')\t\t\t\t\t\n\t\t\t);\n\t\t\n\t\t\t$result = $this->db->insert(AREA,$data);\n\t\t\tif($result){\n\t\t\t\t$msg = \"Area added Sucessfully!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('success',$msg));\t\t\t\t\n\t\t\t\tredirect('area');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$msg = \"Error in adding!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('danger',$msg));\t \n\t\t\t\tredirect('area');\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t$data['state'] = $this->Area_model->getState();\t\n\t\t$data['city'] = $this->Area_model->getCity();\n\t\t$data['Title']=\"Add Area\";\n\t\t$this->load->view('add' ,$data);\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new Post;\n\t\t\n\t\tif(isset($_POST['Post']))\n\t\t{\n\t\t\tif(isset($_POST['Area'])){\n\t\t\t\t\t$area = implode(',', $_POST['Area']);\n\t\t\t\t\t$_POST['Post']['area'] = $area;\n\t\t\t}\n\t\t\t//print_r($_POST['Post']);die;\n\t\t\t$model->attributes=$_POST['Post'];\n\t\t\t\n\t\t\t$file = CUploadedFile::getInstance($model,'images'); //获得一个CUploadedFile的实例 \n if(is_object($file)&&get_class($file) === 'CUploadedFile'){ // 判断实例化是否成功 \n $model->images = Yii::app()->request->hostInfo . '/upload/'.time().'_'.rand(0,9999).'.'.$file->extensionName; //定义文件保存的名称 \n }else{\n $model->images = Yii::app()->request->hostInfo . '/upload/noPic.jpg'; // 若果失败则应该是什么图片 \n }\n\t\t\tif($model->save()){\n\t\t\t\t if(is_object($file)&&get_class($file) === 'CUploadedFile'){ \n $file->saveAs(str_replace(Yii::app()->request->hostInfo, Yii::getPathOfAlias('webroot'), $model->images)); // 上传图片 \n }\n\t\t\t\t $this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Capitulo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['aula/view', 'id' => $model->Aula_id]);\n } else {\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }"
] | [
"0.77024627",
"0.7435727",
"0.7399639",
"0.73133606",
"0.7103238",
"0.7096573",
"0.7096573",
"0.69979966",
"0.6864621",
"0.6855625",
"0.6823171",
"0.67270386",
"0.6681858",
"0.66488105",
"0.66465026",
"0.66445065",
"0.65648216",
"0.65599763",
"0.6549185",
"0.6514836",
"0.6510416",
"0.64928174",
"0.6485612",
"0.6459693",
"0.64029735",
"0.6392456",
"0.6384554",
"0.63786125",
"0.63754195",
"0.6372066"
] | 0.8717311 | 0 |
Updates an existing Tareas model. If update is successful, the browser will be redirected to the 'view' page. | public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index']);
//return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
'area' => Tareas::getAreaLaboral(),
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($this->request->isPost && $model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('/addres/area/update', [\n 'model' => $model,\n ]);\n }",
"public function edit($id = null){\n\t\tif ($_POST) {\n\t\t\t\t\n\t\t\t\tif ($this->tareas->update('tareas', $_POST)) {\n\t\t\t\t$this->redirect(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller'=>'tareas',\n\t\t\t\t\t\t\t\t'action'=>'index'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'controller'=>'tareas',\n\t\t\t\t\t\t\t\t\t'action'=>'edit/'.$_POST['id']\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\n\t\t} else {\n\t\t\t\t$conditions = array(\n\t\t\t\t\t\t'conditions'=>'id='.$id\n\t\t\t\t\t);\n\t\t\t\t$this->_view->tarea = $this->db->find('tareas', 'first', $conditions);\n\t\t\t\t$this->_view->categorias = $this->db->find('categorias','all');\n\t\t\t\t//$categorias = $this->_view->categorias->fetchAll(PDO::FETCH_NUM);\n\t\t\t\t//$categorias = $this->_view->categorias->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t$this->_view->titulo = \"Editar tarea\";\n\t\t\t\t$this->_view->renderizar('edit');\n\t\t}\n\n\t}",
"public function update(Request $request, Tarea $tarea)\n {\n $request->validate([\n 'nombre' => 'required|min:1|max:30',\n 'asunto' => 'required|min:1|max:50',\n 'descripcion' => 'required|min:1|max:80' \n ]);\n\n $tarea->nombre = $request->nombre;\n $tarea->asunto = $request->asunto;\n $tarea->descripcion = $request->descripcion;\n $tarea->empleados()->sync($request->empleado_id);\n\n $tarea->save();\n return redirect()->route('tareas.show', $tarea->id);\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->loadModel ( $id );\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif (isset ( $_POST ['Atleta'] )) {\n\t\t\t$model->attributes = $_POST ['Atleta'];\n\t\t\tif ($model->save ())\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'view',\n\t\t\t\t\t\t'id' => $model->cpf \n\t\t\t\t) );\n\t\t}\n\t\t\n\t\t$this->render ( 'update', array (\n\t\t\t\t'model' => $model \n\t\t) );\n\t}",
"public function update(Request $request, Tarea $tarea)\n {\n $data = $request->validate([\n 'nombre' => 'required|string',\n 'materia' => 'required'\n ]);\n\n $tarea->nombre_tarea = $data[\"nombre\"];\n $tarea->materia_id = $data[\"materia\"];\n $tarea->update();\n\n return redirect()->route('tareas.index')\n ->with('update', 'Tarea actualizada con éxito');\n }",
"public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->user->id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function edit($id){\n\t\t$data['area_id'] = $this->Area_model->getAreaById($id);\n\t\t$this->form_validation->set_rules('area', 'area', 'trim|required');\n $this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n if($this->form_validation->run() == true){\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'state_id' => $this->input->post('state_id'),\n\t\t\t\t'city_id' => $this->input->post('city'),\n\t\t\t\t'area' => $this->input->post('area'),\n\t\t\t\t'is_active' => $this->input->post('is_active'),\n\t\t\t\t'modified_at'=>date(\"Y-m-d H:i:s\")\t,\t\n\t\t\t\t'modified_by'=>$this->session->userdata('id')\t\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$result = $this->Area_model->update($data,$id);\n\t\t\t\n\t\t\tif($result){\n\t\t\t\t$msg = \"Update Sucessfully!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('success',$msg));\t\t\t\t\n\t\t\t\tredirect('area');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$msg = \"Error in editing!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('danger',$msg));\t \n\t\t\t\tredirect('area');\n\t\t\t}\t\n }\n $cityid=$data['area_id']['city_id'];\n\t\t$data['state'] = $this->Area_model->getState();\t\n\t\t$data['city'] = $this->Area_model->getCityById($cityid);\n\t\t$data['Title']=\"Edit Area\";\t\n\t\t$this->load->view('edit',$data );\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->LonID]);\n }\n if(Yii::$app->request->isAjax){\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n }\n else{\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n\n }",
"public function update(EditarAreaRequest $request, $id)\n\t{\n\t\t$areas = Area::find($id);\n\t\t$areas -> fill($request->all());\n\t\t$areas ->save();\n\t\treturn redirect() ->route('areas.index');\n\n\t\t//$areas = Area::find($id);\n\t\t//$areas -> detalle = $request->input('detalle');\n\t\t//$areas ->save();\n\t\t//return redirect() ->route('areas.index');\n\t}",
"public function update(Request $request, OrchardWorksM $tareas_huerto)\n {\n\n if($request->date_work==null)\n {\n $tareas_huerto->update($request->except('date_work'));\n }\n else {\n $tareas_huerto->update(\n $request->all()\n );\n }\n\n return redirect(\"huertos\");\n }",
"public function actionUpdate($id)\r\n\t{\r\n\t\t$model=$this->loadModel($id);\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Contencao']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Contencao'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->contencao_id));\r\n\t\t}\r\n\r\n\t\t$this->render('update',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}",
"public function editar($id=null)\n\t\t{\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$tareas = $this->loadModel(\"tarea\");\n\t\t\t\t$tareas->actualizar($_POST);\n\t\t\t\t$this->redirect(array(\"controller\"=>\"tareas\"));\n\t\t\t}\n\t\t\t$tareas = $this->loadModel(\"tarea\");\n\t\t\t$this->_view->tarea = $tareas->buscarPorId($id);\n\n\t\t\t$categorias = $this->loadModel(\"categoria\");\n\t\t\t$this->_view->categorias=$categorias->getCategorias();\n\n\t\t\t$this->_view->titulo=\"Editar Tarea\";\n\t\t\t$this->_view->renderizar(\"editar\");\n\t\t}",
"public function actionUpdate($id)\n {\n $model = $this->loadModel($id);\n $activo_area = new ActivoArea();\n $activo_area->activo_id = $model->id;\n// $activos_areas = ActivoArea::model()->findAllByAttributes(array('activo_id'=>$model->id));\n// foreach ($activos_areas as $relacion){\n// $model->areas[] = $relacion->area_id;\n// }\n// $proceso = new Proceso();\n// $proceso->activo_id = $model->id;\n if (isset($_POST['Activo'])) {\n try{\n $transaction = Yii::app()->db->beginTransaction();\n\n $usuario = User::model()->getUsuarioLogueado();\n if(is_null($usuario) || is_null($usuario->ultimo_proyecto_id)){\n throw new Exception(\"Debe seleccionar un proyecto para empezar a trabajar\");\n\n }\n $model->proyecto_id = $usuario->ultimo_proyecto_id;\n $model->attributes = $_POST['Activo'];\n if (!$model->save()) {\n throw new Exception(\"Error al actualizar activo\");\n }\n// foreach ($activos_areas as $relacion){\n// if(!$relacion->delete()){\n// throw new Exception(\"Error al eliminar relacion vieja\");\n// }\n// }\n//\n// if(isset($_POST['Activo']['areas']) && !empty($_POST['Activo']['areas'])){\n// foreach ($_POST['Activo']['areas'] as $area_id){\n// $activo_area = new ActivoArea();\n// $activo_area->activo_id = $model->id;\n// $activo_area->area_id = $area_id;\n// if(!$activo_area->save()){\n// throw new Exception(\"Error al crear relacion activo area\");\n// }\n// }\n// }\n $transaction->commit();\n Yii::app()->user->setNotification('success','Activo actualizado con exito');\n $this->redirect(array('admin'));\n }catch (Exception $exception){\n $transaction->rollBack();\n Yii::app()->user->setNotification('error',$exception->getMessage());\n }\n\n }\n\n $this->render('update', array(\n 'model' => $model,'activo_area'=>$activo_area\n ));\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Trazabilidad']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Trazabilidad'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->getResouseBoards('apartment');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //$model->setResourseBoards();\n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update($id, Area $area, updateArea $request)\n\t{\n\t\t$input = $request->all();\n\t\t$input['usu_mod_id']=Auth::user()->id;\n\t\t//update data\n\t\t\n\t\t$area=$area->find($id);\n\t\t$area->update( $input );\n\n\t\treturn redirect()->route('areas.index')->with('message', 'Registro Actualizado.');\n\t}",
"public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\t\tif(isset($_POST['Post']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Post'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Subastas']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Subastas'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function update(Request $request, Tarea $tarea)\n {\n $tarea->nombre = $request['data']['nombre'];\n $tarea->nombre = $request['data']['nombre'];\n $tarea->descripcion = $request['data']['descripcion'];\n $tarea->save();\n\n return response()->json(['mensaje'=>\"Modificado Correctamente\", 200]);\n }",
"public function actionUpdate($id) {\r\n\r\n try{\r\n $model = $this->loadModel($id);\r\n $model->confirmeSenha = $model->senha;\r\n\r\n // Uncomment the following line if AJAX validation is needed\r\n // $this->performAjaxValidation($model);\r\n\r\n if (isset($_POST['Usuario'])) {\r\n\r\n $model->attributes = $_POST['Usuario'];\r\n $model->telefone = $_POST['Usuario']['telefone'];\r\n $model->isAdmin = $_POST['Usuario']['isAdmin'];\r\n\r\n if ($model->save()) {\r\n $this->setFlashMessage(\"success\",\"Usuário atualizado com sucesso\");\r\n $this->redirect(array('view', 'id' => $model->idUsuario));\r\n }\r\n }\r\n }\r\n catch(Exception $e){\r\n $this->setFlashMessage(\"error\",$e->getMessage());\r\n }\r\n\r\n\r\n $this->render('update', array(\r\n 'model' => $model,\r\n ));\r\n }",
"public function update(Request $request, TypeJobM $tipos_tarea)\n {\n $tipos_tarea->update($request->all());\n\n return redirect(\"tipos_tarea\");\n }",
"public function action_update()\n\t{\n\t\t$element = ORM::Factory($this->_orm_model, $_GET['id']);\n\t\t\n\t\t$form = Formo::form()->orm('load',$element);\n\t\t$form->add('update', 'submit', 'Save');\n\t\t\n\t\tif($form->load($_POST)->validate())\n\t\t{\n\t\t\t$this->_update_passed($form, $element);\n\t\t\t$element->save();\n\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri(array('controller'=> Inflector::plural($this->_orm_model))));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_update_failed($form, $element);\n\t\t}\n\n\t\t$this->response->body(self::View('crud/'.$this->_template.'/update')\n\t\t ->set(array('name' => $this->_orm_model,\n\t\t 'form' => $form,\n\t\t 'route' => $this->_route_name))\n\t\t);\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n //var_dump(Yii::$app->request->post());\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $presencas = Yii::$app->request->post('Aula')['presencas'];\n //var_dump($presencas);\n $estadoAula = Yii::$app->request->post('Aula')['Estado'];\n\n if($estadoAula != 0){\n $guardarPresencas = true;\n\n foreach ($presencas as $index => $camposPresenca) {\n if ($camposPresenca['Estado'] == 0) {\n $guardarPresencas = false;\n }\n }\n\n if ($guardarPresencas == true) {\n foreach ($presencas as $index => $camposPresenca) {\n $presenca = Presenca::findOne($camposPresenca['idPresenca']);\n $presenca->setAttributes($camposPresenca);\n $presenca->save();\n\n }\n\n Yii::$app->getSession()->setFlash('success', 'Alterações guardadas com sucesso!');\n\n return $this->redirect(array('aula/index'));\n }else{\n Yii::$app->getSession()->setFlash('error', 'Alunos não confirmados!');\n return $this->redirect(array('view', 'id' => $id));\n }\n }else{\n Yii::$app->getSession()->setFlash('error', 'Estado da aula não confirmado!');\n return $this->redirect(array('view', 'id' => $id));\n }\n\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n\n\n }",
"public function update(){\n if($this->input->post('actualizar')){\n $this->cesta->update();\n }\n redirect('cesta/ver', 'refresh');\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n\n if (isset ( $_POST ['Usuarios'] )) {\n \t$model->attributes = $_REQUEST[\"Usuarios\"];\n // var_dump($model->attributes);die();\n \t$model->usuario_login = $model->usuario_email;\n\n \tdate_default_timezone_set(\"UTC\");\n \t$now_time_UTC = date(\"Y-m-d H:i:s\", time());\n \t$model->usuario_fecha_creacion = $now_time_UTC;\n \t$model->usuario_fecha_modificacion = $now_time_UTC;\n\n \t$password = $model->usuario_password;\n\n \tif ($model->validate ()){\n \t\t$model->usuario_password = md5($model->usuario_password);\n \t\t$model->usuario_password_confirmacion = md5($model->usuario_password_confirmacion);\n \t} else {\n \t\t$model->usuario_password = $model->usuario_password;\n \t\t$model->usuario_password_confirmacion = $model->usuario_password_confirmacion;\n \t}\n\n\n \t$model->usuario_fecha_nacimiento = date('Y-m-d', strtotime($model->usuario_fecha_nacimiento));\n\n\t\t\t\t\tif ($model->save ()){\n\n\t\t\t\t//\t\tYii::app()->user->setFlash('success', \"<span class='fa fa-check'></span> Idioma Actualizado!\");\n\t\t\t\t\t\tYii::$app->session->setFlash('success', \"<span class='fa fa-check'></span> Usuario Actualizado!\");\n\n\t\t\t\t\t// return $this->redirect(['view', 'id' => $model->idioma_id]);\n\t\t\t\t\treturn $this->render('update', [\n\t\t\t\t\t\t\t'model' => $model,\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t//$this->redirect ( array (\n\t\t\t\t\t\t\t//\t'update',\n\t\t\t\t\t\t//\t\t'id' => $model->idioma_id\n\t\t\t\t\t//\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $this->render('update', [\n\t\t\t\t\t\t'model' => $model,\n\t\t\t\t\t\t\t]);\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\tif (isset($_POST['Analisis'])) {\n\t\t\t$model->attributes = $_POST['Analisis'];\n\t\t\tif ($model->save())\n\t\t\t\t$this->redirect(array('view', 'id' => $model->id));\n\t\t}\n\t\t$this->render('update', array(\n\t\t\t'model' => $model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Atividade']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Atividade'];\n\t\t\t\n\t\t\tif(isset($_POST['Atividade']['projetos']))\n\t\t\t\t$model->projetos = $_POST['Atividade']['projetos'];\n\t\t\t\t\n\t\t\tif(isset($_POST['Atividade']['pessoas']))\t\n\t\t\t $model->pessoas = $_POST['Atividade']['pessoas'];\n\t\t\t \n\t\t\tif(isset($_POST['Atividade']['bolsas'])) \n\t\t\t\t$model->bolsas = $_POST['Atividade']['bolsas'];\n\n\t\t\tif(isset($_POST['Atividade']['cod_categoria']))\t\t\t\t\n\t\t\t\t$model->cod_categoria = $_POST['Atividade']['cod_categoria'];\n\t\t\t\n\t\t\tif($model->save()){\n\t\t\t\t\n\t\t\t\tif(count($model->bolsas) > 0)\n\t\t\t\t\t$this->savaBolsas($model->cod_atividade, $model->bolsas);\n\t\t\t\t\n\t\t\t\tif(count($model->pessoas) > 0)\n\t\t\t\t\t$this->savaPessoas($model->cod_atividade, $model->pessoas);\n\t\t\t\t\n\t\t\t\tif(count($model->projetos) > 0)\n\t\t\t\t\t$this->savaProjetos($model->cod_atividade, $model->projetos);\n\t\t\t\t\t\t\t\n\t\t\t\t$this->redirect(array('view','id'=>$model->cod_atividade));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Vehiculos']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Vehiculos'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function update(areaFormRequest $request, $id)\n {\n //\n $area=area::findOrFail($id);\n $area->Nombre=$request->get('Nombre');\n $area->Dependencia=$request->get('Dependencia');\n $area->Descripcion=$request->get('Descripcion');\n $area->update();\n return Redirect::to('/areas');\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pt_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }"
] | [
"0.6947645",
"0.6466348",
"0.64547104",
"0.6447687",
"0.6403852",
"0.6372951",
"0.6362892",
"0.62765515",
"0.62662417",
"0.6264312",
"0.62609243",
"0.6260353",
"0.6255403",
"0.62394464",
"0.62354296",
"0.6218252",
"0.62124723",
"0.6206386",
"0.61983204",
"0.6154433",
"0.6130854",
"0.61259705",
"0.61130583",
"0.6111521",
"0.61050355",
"0.6095951",
"0.6083341",
"0.60730684",
"0.60540533",
"0.6048773"
] | 0.71636343 | 0 |
Finds the Tareas model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | protected function findModel($id)
{
if (($model = Tareas::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findModel($id)\n {\n if (($model = Area::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Area::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('backend', 'The requested page does not exist.'));\n }",
"protected function findModel($id)\n {\n if (($model = CdekArea::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public function find($key): ?Model;",
"private function findModel($id)\n {\n $model=Post::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n {\n $model = Akm::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id) {\n $model = Spt::model()->findByPk($id);\n if ($model === null) {\n throw new CHttpException(404, Yii::t('trans', 'The requested page does not exist.'));\n }\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Location::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Tenant::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Tacones::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n\t\t$model = Atleta::model ()->findByPk ( $id );\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException ( 404, 'The requested page does not exist.' );\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Productionkot::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n {\n $model=EmailTemplate::model()->with('layouts')->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function find($uid) {\n\t\ttry {\n\t\t\t$model = $this->map->get($uid);\n\t\t} catch (tx_oelib_Exception_NotFound $exception) {\n\t\t\t$model = $this->createGhost($uid);\n\t\t}\n\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Empresa::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=KPelamarT::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function find($id)\n {\n $wpdb = $this->__connect();\n $sql = $wpdb->prepare(\"SELECT * FROM \" . $this->get_table() . \" WHERE id = %d\", $id);\n $record = $wpdb->get_row($sql, ARRAY_A);\n if ($record) {\n $model = $this->fetch_model($record);\n return $model;\n }\n\n return null;\n }",
"protected function findModel($id)\n {\n \tif (($model = Constancia::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Subastas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Permisos::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"protected function findModel($id) {\n\t\tif (($model = ServiceMapping::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}",
"protected function findModel($id) {\n if (($model = Was16a::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Apartment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n\t{\n\t\tif (($model = TicketComment::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}",
"protected function findModel($id)\n {\n if (($model = University::findBySql('SELECT *, AsText(location) AS location FROM university WHERE id=' . $id)->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id) {\n\t\tif (($model = Beaches::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Postulante::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Host::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"protected function findModel($id)\n\t{\n if (($model = CoreLanguages::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=CoursePost::model()->findByPk($id);\n\t\tif($model===null)\n\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}"
] | [
"0.6347978",
"0.63231844",
"0.62703764",
"0.6105501",
"0.5982897",
"0.5913469",
"0.58705544",
"0.58395255",
"0.58148396",
"0.5814186",
"0.5804808",
"0.57923853",
"0.5791736",
"0.5781953",
"0.5778462",
"0.5757417",
"0.57364255",
"0.5721906",
"0.57133013",
"0.57007587",
"0.56958854",
"0.56900966",
"0.5688812",
"0.5688644",
"0.56773406",
"0.5675441",
"0.56750643",
"0.56730956",
"0.5658632",
"0.5658606"
] | 0.68239474 | 0 |
lire le fichier json | function lirejson(){
$file= '../data/data.json';
$data = file_get_contents($file);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readJson();",
"public function jsonFile(){\n $insta = DB_DataObject::Factory('Rexr_instagram');\n DB_DataObject::debugLevel(0);\n $insta->find();\n $dataInsta=[];\n $i=0;\n while($insta->fetch()){\n $dataInsta[$i]['low_resolution']=$insta->low_resolution ;\n $dataInsta[$i]['count']=$insta->count ;\n $dataInsta[$i]['link']=$insta->link ;\n $dataInsta[$i]['tags']=$insta->tags ;\n $dataInsta[$i]['likes']=$insta->likes ;\n $dataInsta[$i]['img_low_resolution']=$insta->img_low_resolution ;\n $dataInsta[$i]['text']=$insta->text ;\n $dataInsta[$i]['username']=$insta->username ;\n $dataInsta[$i]['profile_picture']=$insta->profile_picture ;\n $dataInsta[$i]['insta_id']=$insta->insta_id ;\n $i++;\n }\n //printVar($dataInsta,'arreglo de datos instagram');\n $insta->free();\n $fp = fopen('results/d.json', 'w');\n fwrite($fp, json_encode($dataInsta));\n fclose($fp);\n\n }",
"public function readJ(){\n\t\t$input = Request::all();\n\t\t$json_request=$input;\n\n\t\t$myFile = \"json/medi.json\";\n \t\n\n\t\t\t try\n\t\t\t {\n\t\t\t\t \n\t\t\t\t //Get data from existing json file\n\t\t\t\t $jsondata = file_get_contents($myFile);\n\n\t\t\t\t // converts json data into array\n\t\t\t\t $arr_data = json_decode($jsondata, true);\n\n\t\t\t\t\techo json_encode($arr_data);\n\n\t\t\t }\n\t\t\t catch (Exception $e) {\n\t\t\t echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n\t\t\t }\n\t}",
"public function jsonFile() {\n\n $content = file_get_contents(public_path('filejson.json'));\n return $content;\n }",
"function readjson($file)\r\n{\r\n\r\nif(file_exists($file)) {// check if the fiLe exists\r\n\t$filedata = file_get_contents($file);//read fiLe\r\n\t$objson = json_decode($filedata, true); // true geeft associatieve array\r\n $objson = AddSchool($objson);\r\n\techo\"<hr><code><pre>\";\r\n\t\tprint_r($objson); //Laat de array zien\r\n\t\techo\"</pre></code><hr>\";\r\n\t\tfile_put_contents('text.json', json_encode($objson));\r\n}\r\n else echo $file .' not exists'; }",
"public function index()\n {\n $json= File::get('../items.json');\n echo $json;\n }",
"function readJson($url);",
"function getData() {\n $json = file_get_contents('https://my-json-server.typicode.com/dp-danielortiz/dptest_jsonplaceholder/items');\n $obj = json_decode($json);\n $green = array_filter($obj, \"onlyGreen\");\n // Nombre del archivo\n $fichero = 'Respuesta1.json';\n // Convierte los datos a json\n $respuesta = json_encode($green);\n // Guarda los datos en el archivo\n file_put_contents($fichero, $respuesta);\n // Retorna los datos\n print_r($respuesta);\n }",
"function json_get( $file )\n{\n\treturn json_decode(file_get_contents($file), true , 12);\n}",
"function readJson($file){\n $fileStr = file_get_contents($file);\n $jsonData = json_decode($fileStr,true);\n return $jsonData;\n }",
"function getJSON(){\n\t\t$data \t\t= file_get_contents('data_anggota.json'); // Mendapatkan data JSON\n\n\t\treturn $data; // Mengembalikan data dalam bentuk ARRAY\n\t}",
"function getJSON(){\n\t\tglobal $data;\n\t\t$jsonString = file_get_contents('data.json');\n\t\t$data = json_decode($jsonString);\n\t}",
"public function getJson();",
"public function load()\n {\n $result = json_decode($this->file, true);\n if(json_last_error() === 0){\n return $result;\n } else {\n echo \"JSON file has invalid format!\";\n return null;\n }\n }",
"function decodeCatalogJsonFile()\n{\n //Providers JSON File\n $path = storage_path() . env('HOTELS_FILE_PATH');\n\n $jsonRequest = file_get_contents($path);\n //Decoding JSON\n return json_decode($jsonRequest);\n}",
"private function load()\n\t{\n\t\t$this->_container = json_decode(file_get_contents($this->_file), true);\n\t}",
"public function json()\n {\n header('Content-Type: application/vnd.geo+json');\n header('Content-Disposition: attachment; filename=\"' . $this->walk . '.geojson\"');\n header(\"Access-Control-Allow-Origin: *\");\n echo $this->getJson();\n exit;\n }",
"function getJsonFile() {\n $file = Storage::get('public/db.json');\n return (array) json_decode($file);\n}",
"function getDataFromJsonFile($nameFile) {\n return json_decode(file_get_contents($nameFile));\n }",
"public function getJSON($data) {\n\t\t \n\t\t $this->json = new \\stdClass();\n\t\t $this->json = file_get_contents($data);\n\t\t \n\t\t return $this->json;\n\t\t \n\t}",
"function loadJSON(){\n //Load json from data.json and decode to assoc array\n $json_data = file_get_contents('data.json');\n return json_decode($json_data, true);\n\n}",
"function getJsonData(string $file): array\n{\n $data = json_decode(file_get_contents('../' . $file . '.json'), true);\n\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n echo ' - Aucune erreur';\n break;\n case JSON_ERROR_DEPTH:\n echo ' - Profondeur maximale atteinte';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n echo ' - Inadéquation des modes ou underflow';\n break;\n case JSON_ERROR_CTRL_CHAR:\n echo ' - Erreur lors du contrôle des caractères';\n break;\n case JSON_ERROR_SYNTAX:\n echo ' - Erreur de syntaxe ; JSON malformé';\n break;\n case JSON_ERROR_UTF8:\n echo ' - Caractères UTF-8 malformés, probablement une erreur d\\'encodage';\n break;\n default:\n echo ' - Erreur inconnue';\n break;\n }\n\n return $data;\n}",
"private static function JSON_getAll()\n {\n $file = file_get_contents(\"json/users.json\");\n $file = explode(PHP_EOL,$file);\n array_pop($file);\n $users=[];\n foreach ($file as $user) {\n $users[]=json_decode($user,true);\n }\n return $users;\n }",
"function openDataFile() {\n return json_decode(file_get_contents(\"data.json\"), true);\n }",
"function load_json_data($local_path)\r\n{\r\n\t$json_data = json_decode(file_get_contents($local_path), true);\r\n\treturn $json_data;\r\n}",
"private function readCacheFile() {\n $json_str = file_get_contents($this->filepath);\n return json_decode($json_str);\n }",
"private function check_file()\n {\n\n // Checks if DIR exists, if not create\n if (! is_dir($this->dir)) {\n mkdir($this->dir, 0700);\n }\n // Checks if JSON file exists, if not create\n if (! file_exists($this->file)) {\n touch($this->file);\n // $this->commit();\n }\n\n if ($this->load == 'partial') {\n $this->fp = fopen($this->file, 'r+');\n if (! $this->fp) {\n throw new \\Exception('Unable to open json file');\n }\n\n $size = $this->check_fp_size();\n if ($size) {\n $content = get_json_chunk($this->fp);\n\n // We could not get the first chunk of JSON. Lets try to load everything then\n if (! $content) {\n $content = fread($this->fp, $size);\n } else {\n // We got the first chunk, we still need to put it into an array\n $content = sprintf('[%s]', $content);\n }\n\n $content = json_decode($content, true);\n } else {\n // Empty file. File was just created\n $content = [];\n }\n } else {\n // Read content of JSON file\n $content = file_get_contents($this->file);\n $content = json_decode($content, true);\n }\n\n // Check if its arrays of jSON\n if (! is_array($content) && is_object($content)) {\n throw new \\Exception('An array of json is required: Json data enclosed with []');\n }\n // An invalid jSON file\n if (! is_array($content) && ! is_object($content)) {\n throw new \\Exception('json is invalid');\n }\n $this->content = $content;\n return true;\n }",
"private function saveArticleJson() {\n \\Drupal::service('file_system')->saveData($this->articleJson, $this->entityDirectory . '/article.json');\n }",
"public static function ReadFile()\n\t{\n\t\t$file = file_get_contents(\"exjobb.json\");\n\t\techo \"File read\";\n\t}",
"public function get_json($dir, $filename, $lang = true) {\t\t\n\t\t// lang dir\n\t\t$lang = ($lang) ? ($this->language) . '/' : '';\n\t\t\n\t\tif (defined('ICL_SITEPRESS_VERSION')) {\n\t\t\t$lang = apply_filters('gavern-get-json',$dir,$lang);\n\t\t}\n\t\t$path = get_template_directory() . '/gavern/' . $dir . '/' . $lang . $filename . '.json';\n\t\t// check if the specified file exists\n\t\tif(file_exists($path)) {\n\t\t\t// decode data from the JSON file\n\t\t\t$json_data = json_decode(file_get_contents($path));\n\t\t\t// check for the older PHP versions\n\t\t\tif(function_exists('json_last_error')) {\n\t\t\t\t// get the errors\n\t\t\t\tswitch(json_last_error()) {\n\t\t\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t\t array_push($this->problems, 'JSON ERROR: Maximum stack depth exceeded in ' . $path);\n\t\t\t\t\t return array();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t\t array_push($this->problems, 'JSON ERROR: Unexpected control character found in ' . $path);\n\t\t\t\t\t return array();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t\t array_push($this->problems, 'JSON ERROR: Syntax error, malformed JSON in ' . $path);\n\t\t\t\t\t return array();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t\t // No errors\n\t\t\t\t\t return json_decode(file_get_contents($path));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn json_decode(file_get_contents($path));\n\t\t\t}\n\t\t} else {\n\t\t\t// if the file doesn't exist - push the error\n\t\t\tarray_push($this->problems, 'JSON ERROR: file '.$path.' doesn\\'t exist');\n\t\t\treturn array();\n\t\t}\n\t}"
] | [
"0.7663304",
"0.7521651",
"0.7289538",
"0.72135055",
"0.7144292",
"0.6761557",
"0.67496103",
"0.67470986",
"0.6738658",
"0.6701041",
"0.6688992",
"0.6686775",
"0.6652579",
"0.6606159",
"0.65681994",
"0.65439874",
"0.6493878",
"0.64609563",
"0.6460316",
"0.64524466",
"0.6434621",
"0.63872784",
"0.63767815",
"0.6316418",
"0.6297463",
"0.62758183",
"0.622493",
"0.6221524",
"0.6218878",
"0.62054086"
] | 0.75631773 | 1 |
Change Order Status to Disapproved | public function changeOrderDisapprove($type = "", $OrderID = false, $Note = false){
return $this->changeOrderStatus('pending', DIDUEAT . ' - Order Declined', "emails.order_disapprove", 'Order has been disapproved!', "orders/list/" . $type, $OrderID, $Note);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setOrderPaymentStatusAsPending($order_id)\n{\n /*\n * Most shops does not need to do nothing here but there are some scenarios may affect you:\n *\n * - Items in the order are saved from the stock (i.e. another customer could purchase the same item)\n * - You don't want to place on hold specific orders\n *\n * If any of these scenarios apply to your checkout process, then you have to return `false` here.\n */\n return true;\n}",
"public function markAsUnpaid(){\n $this->status = \"NOT APPROVED\";\n $this->save();\n }",
"public function disapprove()\n {\n $this->unsetApprovedFlag()->save();\n\n // :TODO: Fire an event here\n }",
"private function setOrderAsProcessing()\n {\n if (\n $this->isOrderInPaymentReview()\n ) {\n $this->order->setState(\n self::MAGENTO_DESIRED_STATUS,\n true,\n Mage::helper('pagarme_core')\n ->__('Paid'),\n true\n );\n }\n }",
"function reapprove() {\n $comment = \"Set to In Progress status for re-approval.\";\n foreach ($this->approvals_required() as $ap_type_id => $ap_type_desc) {\n $this->approve($ap_type_id, \"\", $comment);\n } // foreach\n }",
"public function setStatePending(Mage_Sales_Model_Order $order)\n {\n if ($order->getHoldBeforeState() && !$order->canUnhold()) {\n Mage::throwException($this->__('Error removing hold status.'));\n }\n $state = $order->getHoldBeforeState() ? $order->getHoldBeforeState() : $order->getState();\n $order->setState(Mage_Sales_Model_Order::STATE_NEW, true)->save();\n $order->setHoldBeforeState(null);\n $order->setHoldBeforeStatus(null);\n }",
"protected function payment_status_pending( $order, $request ){\n\t\t\t$this->payment_status_completed( $order, $request );\n\t\t}",
"function change_status_of_order()\n{\n\tupdate('products_orders')->values(array('order_status'=>$_POST['val']))->where('order_id = '.$_POST['order_id']);\n\treturn true;\n}",
"function decline() {\n\n global $conn;\n\n $sql = \"UPDATE tb_orders SET order_status = -1 WHERE id_order = \".\"'\".$_GET['reject'].\"'\".\"\";\n\n $result = $conn->query($sql);\n if ($result === TRUE) {\n $_SESSION['success'] = 'decline';\n header(\"Location: ../views/admin.php\");\n exit();\n } else {\n $_SESSION['edit_error'] = 'Gagal merubah pesanan';\n header(\"Location: ../views/admin.php\");\n exit();\n }\n }",
"public function handleStatus()\n {\n $magentoTransaction = Mage::getModel(\n 'core/resource_transaction'\n );\n\n try {\n if ($this->order->getState() === Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {\n /**\n * Cannot cancel order's with Payment Review State.\n * So we move the order to Pending Payment before cancel it.\n */\n $this->order->setState(\n Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,\n false,\n Mage::helper('pagarme_core')\n ->__('Review finished. Cancelling the order.'),\n false\n );\n }\n\n $this->cancel();\n $magentoTransaction->addObject($this->order)->save();\n\n $logMessage = sprintf(\n 'Order %s, transaction %s updated to %s',\n $this->order->getId(),\n $this->transaction->getId(),\n Mage_Sales_Model_Order::STATE_CANCELED\n );\n \n Mage::log($logMessage);\n } catch (\\Exception $exception) {\n $logExceptionMessage = sprintf(\n 'Tried to update order %s, transaction %s updated to %s but failed. %s',\n $this->order->getId(),\n $this->transaction->getId(),\n Mage_Sales_Model_Order::STATE_CANCELED,\n $exception->getMessage()\n );\n\n Mage::logException($logExceptionMessage);\n }\n \n return $this->order;\n }",
"function change_po_status($order_id, $status) {\r\n\t\t$this->db->trans_begin();\r\n \r\n $this->db->where('po_id', $order_id);\r\n $this->db->set(array('status' => $status));\r\n $this->db->update('purchase_order');\r\n \r\n //$product_id = $this->db->insert_id();\r\n\r\n if($requisition_id){\r\n //Requisition Item Work will go here.\r\n }\r\n \r\n $this->db->trans_complete();\r\n \r\n if($this->db->trans_status() === FALSE) {\r\n $this->db->trans_rollback();\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n\t}",
"public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }",
"public function actionOrderToggleShipped() {\n\n\t\t$id = $this->getvars['id'];\n\t\t$order = $this->Order->findById($id);\n\n\t\tif (!empty($order)) {\n\t\t\tif ($order['order_shipping_status'] == 'shipped') {\n\t\t\t\t$order['order_shipping_status'] = 'open';\n\t\t\t\t$order['order_shipping_date'] = '';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$order['order_shipping_status'] = 'shipped';\n\t\t\t\t$order['order_shipping_date'] = strftime('%F %T');\n\t\t\t}\n\t\t\t$this->Order->save($order);\n\t\t}\n\n\t\t$this->changeAction('default');\n\t}",
"public function setVendorDisapproved($v_id){\n $this->db->where('v_id',$v_id);\n $this->db->update('vendor_details',['status'=>'disapproved']);\n }",
"public function setPending()\n {\n $this->status = self::STATUS_PENDING;\n $this->save();\n }",
"public function notifyOrderStatus()\n {\n }",
"public function actionApproved()\n\t{\n $this->iostatus = 3;\n $this->_iov();\n\t}",
"public function changeOrderStatus(Order $order, Request $request)\n {\n $data = ['status' => $request->status];\n\n if ($request->status == Order::STATUS_CONFIRMED) {\n $data = [\n 'payer_id' => Auth::id(),\n 'paid_at' => Carbon::now(),\n 'status' => Order::STATUS_CONFIRMED,\n 'payment_method_id' => $request->payment_method_id\n ];\n }\n\n $order->update($data);\n\n return response()->json(null, 204);\n\t}",
"function wosw_order_status_cancelled($order_id){\n $this->order_id =$order_id;\n\n \t // Get an instance of the WC_Order Object from the Order ID (if required)\n \t $order = wc_get_order( $order_id );\n \n // check if wassalNow shipping created \n \t if($this->have_shipment_wassalNow($order) == false)\n \t \treturn;\n \n // if shipping method is wasslnow\n if('wasslnow' == $this->get_shipping_method_id() ):\n \n // create order shipment in WassalNow by using Api \n $status_Create_order = $this->Cancel_a_Shipment( $this->have_shipment_wassalNow($order) );\n \n // update order with trackNo and shipmentID\n //update_post_meta( $order_id,'_wassalNow_Track_order', '');\n \t\t\n \t\t endif;\n }",
"function _commerce_collector_cancel_deprecated_transactions($order) {\n // Find all invoices which can be activated.\n $query = db_select('commerce_payment_transaction', 't');\n $query->condition('t.order_id', $order->order_id);\n $query->condition('t.status', COMMERCE_PAYMENT_STATUS_PENDING);\n $query->condition(db_or()->isNull('t.remote_id')->condition('t.remote_id', ''));\n $query->fields('t');\n $result = $query->execute()->fetchAllKeyed();\n\n $transactions = entity_load('commerce_payment_transaction', array_keys($result));\n foreach ($transactions as $transaction) {\n $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;\n $transaction->message = t('Payment transaction has been discarded.');\n commerce_payment_transaction_save($transaction);\n }\n}",
"public function updateDefaultOrderStatusToNull(): bool\n {\n return OrderStatus::whereIsDefault(1)->update(['is_default' => 0]);\n }",
"function update_order_status($order_id, $toStatus, $origStatus, $operator, $remark = '') {\n $result = $this->updateAll(array('status' => $toStatus, 'lastupdator' => $operator, 'business_remark' => 'concat(business_remark, \"'.$remark.'\")'), array('id' => $order_id, 'status' => $origStatus));\n\n if ($result) {\n $cartM = ClassRegistry::init('Cart');\n $cartM->updateAll(array('status'=>$toStatus), array('order_id'=>$order_id, 'status' => $origStatus));\n\n $affectedRows = $this->getAffectedRows();\n if ($origStatus == ORDER_STATUS_SHIPPED && $toStatus == ORDER_STATUS_RECEIVED) {\n $this->log('change order '.$order_id.' status from '.$toStatus.' to '.$origStatus);\n $order = $this->findById($order_id);\n $scoreM = ClassRegistry::init('Score');\n if (!empty($order)) {\n $creator = $order['Order']['creator'];\n $rtn = $scoreM->add_score_by_bought($creator, $order_id, $order['Order']['total_all_price']);\n $this->log('add_score_by_bought: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($rtn));\n if (!empty($rtn)) {\n $userM = ClassRegistry::init('User');\n $userM->add_score($creator, $rtn['Score']['score']);\n }\n }\n } else if ($origStatus == ORDER_STATUS_WAITING_PAY && $toStatus == ORDER_STATUS_CANCEL) {\n $order = $this->findById($order_id);\n// $scoreM = ClassRegistry::init('Score');\n// $RebateLogM = ClassRegistry::init('RebateLog');\n// $userM = ClassRegistry::init('User');\n if (!empty($order)) {\n// $creator = $order['Order']['creator'];\n// $rtn = $scoreM->restore_score_by_undo_order($creator, $order['Order']['applied_score'], $order_id);\n// $this->log('restore_score_by_undo_order: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($rtn));\n// if (!empty($rtn)) {\n// $userM->add_score($creator, $rtn['Score']['score']);\n// }\n// $restoreRebateRtn = $RebateLogM->restore_rebate_by_undo_order($creator, $order['Order']['applied_rebate'], $order_id);\n// $this->log('restore_rebate_by_undo_order: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($restoreRebateRtn));\n// if(!empty($rtn)){\n// $userM->add_rebate_money($creator, $restoreRebateRtn['RebateLog']['money']);\n// }\n $couponItemM = ClassRegistry::init('CouponItem');\n $couponItemM->updateAll(array('status' => COUPONITEM_STATUS_TO_USE, 'applied_order' => '0'),\n array('applied_order' => $order_id, 'status' => COUPONITEM_STATUS_USED));\n }\n }\n } else {\n $affectedRows = 0;\n }\n return array($result, $affectedRows);\n }",
"public function setInitialStatus(){\n $this->order->status()->attach(1, ['user_id'=>$this->vendor->user->id, 'comment'=>'Social Network order']);\n\n //Set automatically approved by admin - since it it social\n //$this->order->status()->attach(2, ['user_id'=>1, 'comment'=>__('Automatically approved by admin')]);\n }",
"public function preapprove()\n {\n return $this->setAttribute('preapproved', !$this->preapproved)->save();\n }",
"public function post_order_status_to_priority($order_id){\n if(empty(get_post_meta($order_id,'_post_done',true))){\n return;\n }\n $config = json_decode(stripslashes($this->option('setting-config')));\n $statdes = null;\n $order = new \\WC_Order($order_id);\n foreach ($config->status_convert[0] as $key=>$value){\n if($order->get_status()==$key){\n $statdes = $value;\n }\n }\n if(!$statdes){\n return;\n }\n // get the invoice number from Priority\n $order_field = $this->option('otc_order_field');\n $url_addition = 'EINVOICES?$filter='.$order_field.' eq \\''.$order_id.'\\'';\n $response = $this->makeRequest('GET', $url_addition,[],false);\n if ($response['status']) {\n $response_data = json_decode($response['body_raw'], true);\n $invoice = $response_data['value'][0];\n $ivnum = $invoice['IVNUM'];\n }\n // post status to Priority\n $url_addition = 'EINVOICES(IVNUM=\\''.$ivnum.'\\',IVTYPE=\\'E\\',DEBIT=\\'D\\')';\n $data = ['STATDES' => $statdes ];\n $response = $this->makeRequest('PATCH', $url_addition,['body' => json_encode($data)],false);\n if ($response['status']) {\n $response_data = json_decode($response['body_raw'], true);\n }\n }",
"public function actionPending()\n\t{\n $this->iostatus = 21;\n $this->_iov();\n\t}",
"public function disableNew(Order $order)\n {\n $order->new = false;\n $userOrder = UserOrder::whereOrderId($order->id)->first();\n if ($userOrder) {\n Mail::to($userOrder->user->email)\n ->send(new OrderSuccess(['product' => $userOrder->product]));\n }\n $order->save();\n return redirect()->route('home.order.index');\n }",
"public function changeDisApproveStatus($goalDataID)\n {\n $goalData = self::find($goalDataID);\n $goalData->is_approved = 2;\n $goalData->update();\n\n }",
"public function changeOrderApprove($type = \"\", $OrderID = false, $Note = false){\n return $this->changeOrderStatus('approved', DIDUEAT . ' - Order Approved', \"emails.order_approve\", 'Your order has been approved!', \"orders/list/\" . $type, $OrderID, $Note);\n }",
"public function changeOrderStatus(Request $req, $id) {\n $performer = $req->get('performer');\n\n $order = PerformerProductTracking::where([\n 'performerId' => $performer->id,\n 'id' => $id\n ])\n ->first();\n\n if (!$order) {\n return Response()->json([\n 'success' => false,\n 'data' => [\n 'message' => 'Order not found!'\n ]\n ]);\n }\n\n if (Input::get('shippingStatus')) {\n $order->shippingStatus = Input::get('shippingStatus');\n }\n if (Input::get('note')) {\n $order->note = Input::get('note');\n }\n if (Input::get('status')) {\n $order->status = Input::get('status');\n }\n\n if (!$order->save()) {\n return Response()->json([\n 'success' => false,\n 'data' => [\n 'message' => 'Server error'\n ]\n ]);\n }\n\n return Response()->json([\n 'success' => true,\n 'data' => $order\n ]);\n }"
] | [
"0.71257246",
"0.68882596",
"0.6854994",
"0.64219356",
"0.6384269",
"0.6296657",
"0.6237296",
"0.62019545",
"0.6194293",
"0.61787057",
"0.61208504",
"0.61197215",
"0.608762",
"0.6083143",
"0.6075535",
"0.6056705",
"0.6032341",
"0.6014478",
"0.6011113",
"0.5993138",
"0.59877515",
"0.59716105",
"0.5958587",
"0.5954261",
"0.5944165",
"0.59322304",
"0.5867557",
"0.58263314",
"0.58240104",
"0.581689"
] | 0.6965259 | 1 |
Change Order Status to $status, send email (using $subject/$email) and $flash | public function changeOrderStatus($status, $subject = "", $email = "", $flash = "", $URL = "", $OrderID = false, $Note = false){
$post = \Input::all();
if ($OrderID) {
$post['id'] = $OrderID;
}
if ($Note) {
$post['note'] = $Note;
}
if (isset($post) && count($post) > 0 && !is_null($post)) {
if (!isset($post['id']) || empty($post['id'])) {
return $this->failure("[Order Id] is missing!", $URL);
}
/*
if (is_numeric($post['id']) && (!isset($post['note']) || empty($post['note']))) {
return $this->failure("[Note Field] is missing!", $URL);
}
*/
try {
if (is_numeric($post['id'])) {
$ob = \App\Http\Models\Reservations::find($post['id']);
} else {
$ob = \App\Http\Models\Reservations::where('guid', $post['id'])->first();
$flash = "Order " . $status . " via email";
$post['note'] = $flash;
}
$ob->populate(array('status' => $status, 'note' => $post['note'], 'time' => now()));
$ob->save();
if ($ob->user_id && $subject && $email) {
$userArray = \App\Http\Models\Profiles::find($ob->user_id)->toArray();
$userArray['mail_subject'] = $subject;
$userArray['note'] = $post['note'];
$this->sendEMail($email, $userArray);
}
return $this->success($flash, $URL);
} catch (\Exception $e) {
return $this->failure(handleexception($e), $URL);
}
} else {
return $this->failure("Invalid request made!", $URL);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function orderStatusAction() {\n if (!Arr::get($this->post, 'id')) {\n $this->error([\n 'msg' => __('Выберите заказ!'),\n ]);\n }\n\n $__order = \\Wezom\\Modules\\Orders\\Models\\Orders::getRow(Arr::get($this->post, 'id')); // Old older. We need status of this order\n\n $post = $this->getDataFromSerialize(Arr::get($this->post, 'data'));\n $statuses = Config::get('order.statuses');\n if (!isset($statuses[Arr::get($post, 'status')]) OR ! isset($post['status'])) {\n $this->error([\n 'msg' => __('Укажите статус!'),\n ]);\n }\n\n if (Arr::get($post, 'status') != $__order->status) {\n Common::factory('orders')->update(['status' => Arr::get($post, 'status')], Arr::get($this->post, 'id'));\n\n if ((int) Arr::get($post, 'sendEmail', 0)) {\n $order = \\Wezom\\Modules\\Orders\\Models\\Orders::getRow(Arr::get($this->post, 'id'));\n $mail = false;\n if (Arr::get($post, 'status') == 1) {\n $mail = DB::select()->from('mail_templates')->where('id', '=', 21)->where('status', '=', 1)->find();\n } else if (Arr::get($post, 'status') == 3) {\n $mail = DB::select()->from('mail_templates')->where('id', '=', 20)->where('status', '=', 1)->find();\n }\n if ($mail && filter_var($order->email, FILTER_VALIDATE_EMAIL)) {\n $from = ['{{site}}', '{{name}}', '{{last_name}}', '{{middle_name}}', '{{amount}}', '{{id}}'];\n $to = [\n Arr::get($_SERVER, 'HTTP_HOST'), $order->name, $order->last_name, $order->middle_name,\n $order->amount, $order->id\n ];\n $subject = str_replace($from, $to, $mail->subject);\n $text = str_replace($from, $to, $mail->text);\n Email::send($subject, $text, $order->email);\n }\n }\n\n if ($__order->user_id) {\n $user = Users::getForOrder($__order->user_id);\n if ($user && $user->partner) {\n if (Arr::get($post, 'status') == 1) {\n Common::factory('orders')->update(['done' => time()], Arr::get($this->post, 'id'));\n } else if (Arr::get($post, 'status') != 1 && $__order->status == 1) {\n Common::factory('orders')->update(['done' => NULL], Arr::get($this->post, 'id'));\n }\n }\n }\n }\n\n Message::GetMessage(1, __('Данные сохранены!'));\n $this->success(['reload' => 1]);\n }",
"public function order_status_mail($order_id) {\n $orderdetails = $this->Order->find('first', array('conditions' => array('order_id' => $order_id)));\n $user = ClassRegistry::init('User')->find('first', array('conditions' => array('user_id' => $orderdetails['Order']['user_id'])));\n $in = $this->admin_get_invoice_prefix($user['User']['user_type'], $orderdetails['Order']['cod_status']);\n\n $adminmailid = $this->Adminuser->find('first', array('conditions' => array('admin_id' => '1')));\n\n App::uses('CakeEmail', 'Network/Email');\n\n $email = new CakeEmail();\n $email->emailFormat('html');\n $email->from(array(trim($adminmailid['Adminuser']['email']) => SITE_NAME));\n $email->template('default', 'default');\n $email->to(trim($user['User']['email']));\n $subject = \" Order # \" . $in . $orderdetails['Order']['invoice'] . \" Order Status : \" . $orderdetails['Orderstatus']['order_status'];\n $email->subject(SITE_NAME . $subject);\n $message = \"<p>Dear {$user['User']['first_name']}</p>\";\n $message .= \"<p>Your Order status has been recently changed</p>\";\n $message .= \"<p>Your Order # {$in}{$orderdetails['Order']['invoice']}</p>\";\n $message .= \"<p>Order Status : {$orderdetails['Orderstatus']['order_status']}</p>\";\n $message .= \"<p>Thanks.</p>\";\n// $invoice = $this->requestAction(array('action' => 'admin_orderpdf', $orderdetails['Order']['order_id'], 'F'), array('return', 'bare' => false));\n// $email->attachments('files/invoices/'.$in . $orderdetails['Order']['invoice'].'.pdf');\n\n $email->send($message);\n $email->reset();\n }",
"private function _sendEmail($order)\n {\n $orderStatusLabel = $this->_getOrderStatusLabel($order->getStatus());\n\n $emailTemplate = Mage::getModel('core/email_template');\n\n // Get sender email address (System->Configuration->Order Status Notifier)\n $salesData['name'] = Mage::getStoreConfig('orderstatusnotifier/orderstatusnotifier_group/sender_name');\n $salesData['email'] = Mage::getStoreConfig('orderstatusnotifier/orderstatusnotifier_group/sender_email');\n\n // Get receiver email addresses (System->Configuration->Order Status Notifier)\n $receivers = explode(\";\", Mage::getStoreConfig('orderstatusnotifier/orderstatusnotifier_group/receiver_emails'));\n\n // Loading email template\n $emailTemplate->loadDefault('wapone_order_status_notifier');\n\n // Email Subject is set in the email template\n // $emailTemplate->setTemplateSubject($email_subject);\n\n $emailTemplate->setSenderName($salesData['name']);\n $emailTemplate->setSenderEmail($salesData['email']);\n\n $emailTemplateVariables['order'] = $order;\n $emailTemplateVariables['store'] = Mage::app()->getStore();\n $emailTemplateVariables['order_status'] = $orderStatusLabel;\n $emailTemplateVariables['username'] = $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname();\n $emailTemplateVariables['order_id'] = $order->getIncrementId();\n $emailTemplateVariables['store_name'] = $order->getStoreName();\n $emailTemplateVariables['store_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);\n $emailTemplateVariables['payment_method'] = $order->getPayment()->getMethodInstance()->getTitle();\n\n $emailTemplate->send($receivers, $order->getStoreName(), $emailTemplateVariables);\n }",
"private function sendMail($order)\n {\n Mail::to($order->user->email)->send(new OrderStatus($order));\n }",
"function change_notification($order_id, $status_id){\n\t\t$status = $this->find('first', array(\n\t\t\t'conditions' => array('Status.id' => $status_id),\n\t\t\t'contain' => array(\n\t\t\t\t'MailTemplate' => array(\n\t\t\t\t\t'fields' => array('MailTemplate.id')\n\t\t\t\t),\n\t\t\t\t'SMSTemplate' => array(\n\t\t\t\t\t'fields' => array('SMSTemplate.id')\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t\n\t\tif (!empty($status)) {\n\t\t\t// nactu si detaily z objednavky\n\t\t\t$order = $this->Order->find('first', array(\n\t\t\t\t'conditions' => array('Order.id' => $order_id),\n\t\t\t\t'contain' => array()\n\t\t\t));\n\t\n\t\t\t// ma status nejakou SMS sablonu?\n\t\t\tif (isset($status['SMSTemplate']['id']) && $status['SMSTemplate']['id']) {\n\t\t\t\t// ma se k dane objednavce posilat SMS notifikace?\n\t\t\t\tif ($this->Order->sendSMSNotification($order_id)) {\n\t\t\t\t\t$sms_template = $this->SMSTemplate->process($status['SMSTemplate']['id'], $order_id);\n\t\t\t\t\tApp::import('Vendor', 'GoSMS', array('file' => 'gosms.php'));\n\t\t\t\t\t$this->GoSMS = &new GoSMS;\n\t\t\t\t\t$this->GoSMS->send($order['Order']['customer_phone'], $sms_template['SMSTemplate']['content']);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($status['MailTemplate']['id']) && $status['MailTemplate']['id']) {\n\t\t\t\t$mail_template = $this->MailTemplate->process($status['MailTemplate']['id'], $order_id);\n\t\n\t\t\t\t// natahnu si mailovaci skript\n\t\t\t\tApp::import('Vendor', 'phpmailer', array('file' => 'phpmailer/class.phpmailer.php'));\n\t\t\t\t$ppm = &new phpmailer;\n\t\t\t\t$ppm->CharSet = 'utf-8';\n\t\t\t\t$ppm->Hostname = CUST_ROOT;\n\t\t\t\t$ppm->Sender = CUST_MAIL;\n\t\t\t\t$ppm->From = CUST_MAIL;\n\t\t\t\t$ppm->FromName = CUST_NAME;\n\t\t\t\t$ppm->AddReplyTo(CUST_MAIL, CUST_NAME);\n\t\t\t\t\t\t\n\t\t\t\t$ppm->Body = $mail_template['MailTemplate']['content'];\n\t\t\t\t$ppm->Subject = $mail_template['MailTemplate']['subject'];\n\t\t\t\t$ppm->AddAddress($order['Order']['customer_email'], $order['Order']['customer_name']);\n\t\t\t\t$ppm->IsHtml(true);\n\t\n\t\t\t\treturn $ppm->Send();\t\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function backorder_status_custom_notification($order_id, $order)\n{\n $heading = __('Your Awaiting delivery order', 'woocommerce');\n $subject = '[{site_title}] Awaiting delivery order ({order_number}) - {order_date}';\n\n // Getting all WC_emails objects\n $mailer = WC()->mailer()->get_emails();\n\n // Customizing Heading and subject In the WC_email processing Order object\n $mailer['WC_Email_Customer_Processing_Order']->heading = $heading;\n $mailer['WC_Email_Customer_Processing_Order']->subject = $subject;\n\n // Sending the customized email\n $mailer['WC_Email_Customer_Processing_Order']->trigger($order_id);\n}",
"function email_latest_status($oID) {\r\n require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'order_status_email.php');\r\n global $db;\r\n $orders_status_array = array();\r\n $orders_status = $db->Execute(\"select orders_status_id, orders_status_name\r\n from \" . TABLE_ORDERS_STATUS . \"\r\n where language_id = '\" . (int)$_SESSION['languages_id'] . \"'\");\r\n while (!$orders_status->EOF) {\r\n $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];\r\n $orders_status->MoveNext();\r\n }\r\n\r\n $customer_info = $db->Execute(\"SELECT customers_name, customers_email_address, date_purchased\r\n FROM \" . TABLE_ORDERS . \"\r\n WHERE orders_id = '\" . $oID . \"'\");\r\n\r\n $status_info = $db->Execute(\"SELECT orders_status_id, comments\r\n FROM \" . TABLE_ORDERS_STATUS_HISTORY . \"\r\n WHERE orders_id = '\" . $oID . \"'\r\n ORDER BY date_added Desc limit 1\");\r\n\r\n $status = $status_info->fields['orders_status_id'];\r\n if (zen_not_null($status_info->fields['comments']) && $status_info->fields['comments'] != '') {\r\n $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $status_info->fields['comments'] . \"\\n\\n\";\r\n }\r\n\r\n // send email to customer\r\n $message = STORE_NAME . \"\\n\" . EMAIL_SEPARATOR . \"\\n\" .\r\n EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . \"\\n\\n\" .\r\n EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . \"\\n\\n\" .\r\n EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']) . \"\\n\\n\" .\r\n strip_tags($notify_comments) .\r\n EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .\r\n EMAIL_TEXT_STATUS_PLEASE_REPLY;\r\n\r\n $html_msg['EMAIL_CUSTOMERS_NAME'] = $customer_info->fields['customers_name'];\r\n $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;\r\n $html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href=\"' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'\">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';\r\n $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']);\r\n $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = $notify_comments;\r\n $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\\n','', EMAIL_TEXT_STATUS_UPDATED);\r\n $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));\r\n $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];\r\n $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);\r\n\r\n zen_mail($customer_info->fields['customers_name'], $customer_info->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');\r\n\r\n // send extra emails\r\n if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {\r\n zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');\r\n }\r\n\r\n //_TODO accept an optional array of additional recipients\r\n\r\n}",
"public function email_notification( $order, $sent_to_admin, $plain_text = false ){\n \tif ( ! $sent_to_admin && 'on-hold' === $order->status ) {\n \t\t$this->notification( $order->id, 'email' );\n\t\t}\t\t\n\t}",
"public function propertyStatus($orderId, $stat) {\n $propertyStatusSentId = Mage::getSingleton ( 'core/session' )->getPropertyStatusSentOrderIdForChecking ();\n if ($propertyStatusSentId != $orderId) {\n $hostEmail = array ();\n /**\n * Load by order ID\n */\n $value = Mage::getModel ( 'sales/order' )->loadByIncrementId ( $orderId );\n \n /**\n * Buyer Email\n */\n $buyerEmail = $value->getCustomerEmail ();\n /**\n * Get customer first name\n */\n $buyerName = $value->getCustomerFirstname ();\n $collections = Mage::getModel ( 'airhotels/airhotels' )->load ($orderId,'order_id' ); \n /**\n * Get Entity id\n */\n $productId = $collections ['entity_id'];\n $model = Mage::getModel ( 'catalog/product' );\n /**\n * load by product ID\n */\n $product = $model->load ( $productId );\n $hostId = $product->getUserid ();\n /**\n * Load customer data\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $hostId );\n /**\n * Get customer email\n */\n $hostEmail [0] = $customer->getEmail ();\n /**\n * Get customer name\n */\n $hostName = $customer->getName ();\n /**\n * Get status\n */\n $status = $this->getStatusLabel ();\n if ($stat) {\n $status = static::STATE_CLOSED;\n }\n $postObject = new Varien_Object ();\n $postObject->setData ( array (\n 'incrementid' => $orderId,\n 'status' => $status,\n 'customername' => $buyerName \n ) );\n /**\n * Get model of email template\n */\n $mailTemplate = Mage::getModel ( 'core/email_template' );\n $mailTemplate->setTemplateSubject ( 'Order Status' );\n $mailTemplate->setDesignConfig ( array (\n 'area' => 'frontend' \n ) )->sendTransactional ( Mage::getStoreConfig ( static::XML_PATH_ORDERSTUTS_TEMPLATE ), Mage::getStoreConfig ( static::XML_PATH_EMAIL_SENDER ), $buyerEmail, $buyerName, array (\n 'orderstatus' => $postObject \n ) );\n $postObject = new Varien_Object ();\n $postObject->setData ( array (\n 'incrementid' => $orderId,\n 'status' => $status,\n 'customername' => $hostName \n ) );\n $mailTemplate = Mage::getModel ( 'core/email_template' );\n $mailTemplate->setTemplateSubject ( 'Order Status' );\n $mailTemplate->setDesignConfig ( array (\n 'area' => 'frontend' \n ) )->sendTransactional ( Mage::getStoreConfig ( static::XML_PATH_ORDERSTUTS_TEMPLATE ), Mage::getStoreConfig ( static::XML_PATH_EMAIL_SENDER ), $hostEmail, $hostName, array (\n 'orderstatus' => $postObject \n ) );\n /**\n * Check status closed or not.\n */\n if ($status == static::STATE_CLOSED) {\n Mage::getSingleton ( 'core/session' )->setPropertyStatusSentOrderIdForChecking ( $orderId );\n }\n }\n }",
"public function testSetsOrderStateAndSetEmailWithStatusEqualsOne()\n {\n $status = '1';\n $total = '123';\n\n $modelPaymentMock = $this->getModelMock('sales/order_payment', ['registerCaptureNotification']);\n\n $modelPaymentMock->expects($this->once())\n ->method('registerCaptureNotification')\n ->with($total);\n\n $this->replaceByMock('model', 'sales/order_payment', $modelPaymentMock);\n\n $modelOrderMock = $this->_getOrderModelMockWithGettingPaymentAndGrandTotal($modelPaymentMock, $total);\n\n $this->_modelOrder->handle($modelOrderMock, $status);\n }",
"function set_status($status, $email = true, $ignore_spaces = false){\n\t\tglobal $wpdb;\n\t\t$action_string = strtolower($this->status_array[$status]); \n\t\t//if we're approving we can't approve a booking if spaces are full, so check before it's approved.\n\t\tif(!$ignore_spaces && $status == 1){\n\t\t\tif( !$this->is_reserved() && $this->get_event()->get_bookings()->get_available_spaces() < $this->get_spaces() && !get_option('dbem_bookings_approval_overbooking') ){\n\t\t\t\t$this->feedback_message = sprintf(__('Not approved, spaces full.','events-manager'), $action_string);\n\t\t\t\t$this->add_error($this->feedback_message);\n\t\t\t\treturn apply_filters('em_booking_set_status', false, $this);\n\t\t\t}\n\t\t}\n\t\t$this->previous_status = $this->booking_status;\n\t\t$this->booking_status = $status;\n\t\t$result = $wpdb->query($wpdb->prepare('UPDATE '.EM_BOOKINGS_TABLE.' SET booking_status=%d WHERE booking_id=%d', array($status, $this->booking_id)));\n\t\tif($result !== false){\n\t\t\t$this->feedback_message = sprintf(__('Booking %s.','events-manager'), $action_string);\n\t\t\tif( $email && $this->previous_status != $this->booking_status ){ //email if status has changed\n\t\t\t\tif( $this->email() ){\n\t\t\t\t if( $this->mails_sent > 0 ){\n\t\t\t\t $this->feedback_message .= \" \".__('Email Sent.','events-manager');\n\t\t\t\t }\n\t\t\t\t}else{\n\t\t\t\t\t//extra errors may be logged by email() in EM_Object\n\t\t\t\t\t$this->feedback_message .= ' <span style=\"color:red\">'.__('ERROR : Email Not Sent.','events-manager').'</span>';\n\t\t\t\t\t$this->add_error(__('ERROR : Email Not Sent.','events-manager'));\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//errors should be logged by save()\n\t\t\t$this->feedback_message = sprintf(__('Booking could not be %s.','events-manager'), $action_string);\n\t\t\t$this->add_error(sprintf(__('Booking could not be %s.','events-manager'), $action_string));\n\t\t\t$result = false;\n\t\t}\n\t\treturn apply_filters('em_booking_set_status', $result, $this);\n\t}",
"function webinarjam_autocomplete_orders( $order_status, $order_id ) {\n\n\t$order = new WC_Order( $order_id );\n\tif ( 'processing' === $order_status && ( 'on-hold' === $order->status || 'pending' === $order->status || 'failed' === $order->status ) ) {\n\t\t$virtual_order = null;\n\t\tif ( count( $order->get_items() ) > 0 ) {\n\t\t\tforeach ( $order->get_items() as $item ) {\n\t\t\t\tif ( 'line_item' === $item['type'] ) {\n\t\t\t\t\t$_product = $item->get_product();// $order->get_product_from_item($item);\n\t\t\t\t\tif ( 'webinarjam' === $_product->product_type ) {\n\t\t\t\t\t\t// send email here:) .\n\t\t\t\t\t\t// email is sent by woocommerce in other hook.\n\t\t\t\t\t\treturn 'completed';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $order_status;\n}",
"public function sendConfirmationEmail($email,$orderNo)\r\n {\r\n /* THIS CODE CANNOT RUN ON TURING/HOPPER\r\n $msg = \"Thank you for purchasing parts through our system!\\n\r\n This is your order confirmation. Your order number is:\\n\r\n \".$orderNo;\r\n mail($email,\"Parts Shipping Confirmation\",$msg);\r\n */\r\n $orderNo += 1;\r\n \r\n echo '<h1 align=\"center\">Your order is confirmed, a confirmation email has been sent!</h1>';\r\n echo '<br /><h2 align=\"center\">email address: '.$email.' order number: '.$orderNo.' </h2>';\r\n \r\n }",
"function learn_press_send_user_email_order( $status, $order_id ) {\r\n\treturn;\r\n\t$status = strtolower( $status );\r\n\tif ( 'completed' == $status ) {\r\n\t\t$order = new LP_Order( $order_id );\r\n\t\t$mail_to = $order->get_user( 'email' );\r\n\t\t$instructors = array();\r\n\t\t$course_title = '';\r\n\r\n\t\t$transaction_object = $order->get_items();\r\n\t\t$items = $transaction_object->products;\r\n\t\t$item = array_shift( $items );\r\n\r\n\t\t$course = get_post( $item['id'] );\r\n\r\n\t\t$course_title = get_the_title( $item['id'] );\r\n\r\n\t\t$instructor = LP_User::get_user( $course->post_author );\r\n\t\t$instructors[$instructor->ID] = $instructor->data->display_name;\r\n\r\n\t\tlearn_press_send_mail(\r\n\t\t\t$mail_to,\r\n\t\t\t'enrolled_course',\r\n\t\t\tapply_filters(\r\n\t\t\t\t'learn_press_vars_enrolled_course',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'user_name' => $order->get_user( 'display_name' ),\r\n\t\t\t\t\t'course_name' => $course_title,\r\n\t\t\t\t\t'course_link' => get_permalink( $item['id'] )\r\n\t\t\t\t),\r\n\t\t\t\t$course,\r\n\t\t\t\t$instructor\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n}",
"function change_po_status($order_id, $status) {\r\n\t\t$this->db->trans_begin();\r\n \r\n $this->db->where('po_id', $order_id);\r\n $this->db->set(array('status' => $status));\r\n $this->db->update('purchase_order');\r\n \r\n //$product_id = $this->db->insert_id();\r\n\r\n if($requisition_id){\r\n //Requisition Item Work will go here.\r\n }\r\n \r\n $this->db->trans_complete();\r\n \r\n if($this->db->trans_status() === FALSE) {\r\n $this->db->trans_rollback();\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n\t}",
"private function sendSuccessEmail($order)\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $orderSender = $objectManager->get('Magento\\Sales\\Model\\Order\\Email\\Sender\\OrderSender');\n $orderSender->send($order, false, true);\n }",
"function orderstatus($action, $email, $guid){\n $post = \\Input::all();\n if (isset($post) && count($post) > 0 && !is_null($post)) {\n $URL = url('/orders/list/' . $action . '/email/' . $email . '/' . $guid);\n /*\n if (!isset($post['note']) || empty($post['note'])) {\n return $this->failure(\"[Note Field] is missing!\", $URL);\n } else {\n */\n $Order = select_field(\"reservations\", \"guid\", $guid);\n if ($Order) {\n $Restaurant = select_field(\"restaurants\", \"id\", $Order->restaurant_id);\n if ($Restaurant->email != $email) {//check if the email address specified is registed to this restaurant\n $NotificationAddress = select_field(\"notification_addresses\", \"address\", $email);\n if ($NotificationAddress && $Order) {\n $User = select_field(\"profiles\", \"id\", $NotificationAddress->user_id);\n if ($Order->restaurant_id != $User->restaurant_id) {\n $action = \"Email address does not belong to the restaurant\";\n }\n } else {\n $action = \"Email address not found\";\n }\n }\n\n if ($action) {\n if ($action == \"approve\") {\n return $this->changeOrderApprove(\"restaurant\", $Order->id, $post['note']);\n } else if ($action == \"cancel\") {\n return $this->changeOrderCancel(\"restaurant\", $Order->id, $post['note']);\n }\n }\n } else {\n $action = \"Order not found\";\n\n return $this->failure($action, \"/\");\n }\n } else {\n $Order = select_field(\"reservations\", \"guid\", $guid);\n if ($Order && $Order->status == \"pending\") {\n return view('popups.mini_approve', array(\"action\" => $action, \"email\" => $email, \"guid\" => $guid));\n }\n return $this->failure(\"That order either doesn't exist or has already been approved or denied\", \"/\");\n }\n }",
"private function sendConfirmation() {\n\t\t// Template Pfad und Template laden\n\t\t$tPath = shopStatic::getMailTemplate('confirmation');\n\t\t$tpl = new templateImproved($tPath);\n\t\t// Warenkorb view einbauen\n\t\t$cart = new defaultCart($this->Order);\n\t\t// Spezielle Templates verwenden\n\t\t$cart->setEntryTemplate('mail-cart-article');\n\t\t$cart->setListTemplate('mail-cart');\n\t\t// Diesen im Template so darstellen\n\t\t$tpl->addSubtemplate(\n\t\t\t'CART_DEFAULT_LIST',\n\t\t\t$cart->getTemplate()\n\t\t);\n\t\t// Bestellnummer im Mail ermöglichen\n\t\t$tpl->addData('ORDER_ID',$this->Order->getShoID());\n\t\t$message = $this->Order->getMessage();\n\t\tif (strlen($message) == 0)\n\t\t\t$message = $this->Res->html(656,page::language());\n\t\t$tpl->addData('USER_MESSAGE',$message);\n\t\t// Payment informationen einfügen\n\t\t$this->addPaymentInfo($tpl);\n\t\t// Mail Erstellen und konfigurieren\n\t\t$mail = new phpMailer();\n\t\t//$mail->CharSet = 'utf-8';\n\t\t//$mail->Encoding = 'quoted-printable';\n\t\t$mail->From = shopModuleConfig::MAIL_FROM;\n\t\t$mail->FromName = shopModuleConfig::MAIL_FROMNAME;\n\t\t$mail->AddAddress($this->User->getUsername());\n\t\t$mail->AddBCC(shopModuleConfig::MAIL_FROM);\n\t\t// Inhalte definieren\n\t\t$mail->IsHTML(true);\n\t\t$mail->Body = $tpl->output();\n\t\t$mail->Subject = $this->Res->normal(1108, page::language()).' #'.$this->Order->getShoID();\n\t\t// Absenden\n\t\t$mail->Send();\n\t}",
"public function updateOrderStatus(){\n\t\tif (Request::ajax()) {\t\t\t\n\t\t\t$orderId\t\t\t\t\t=\tInput::get('order_id');\n\t\t\t$status\t\t\t\t\t\t=\tInput::get('order_status');\n\t\t\t$orderObj\t\t\t\t\t=\tOrderItem::find($orderId);\n\t\t\t$orderObj->order_status\t\t=\t(int) $status;\n\t\t\tif($status == ORDER_SHIPPED){\n\t\t\t\t$messages\t=\tarray('tracking_url.required_with' =>'The tracking url field is required.',\n\t\t\t\t\t\t\t\t\t 'tracking_number.required_with' =>'The tracking number field is required.');\n\t\t\t\t\n\t\t\t\t$validator = Validator::make(Input::all(), array(\n 'tracking_url'\t\t => 'required_with:tracking_number|url',\n\t\t\t\t\t'tracking_number' \t => 'required_with:tracking_url|numeric',\n ),$messages);\n \n if($validator->fails()){\n\t\t\t\t\t$allErrors = '<ul>';\n foreach ($validator->errors()->all('<li>:message</li>') as $message) {\n $allErrors .= $message;\n }\n $allErrors .= '</ul>';\n $response = array(\n 'success' => false,\n 'errors' => $allErrors\n );\n return Response::json($response);\n die;\n }else{\n\t\t\t\t\t$orderObj->shipped_at\t\t=\tdate(Config::get('Reading.date'));\n\t\t\t\t\t$orderObj->tracking_url\t\t=\tInput::get('tracking_url');\n\t\t\t\t\t$orderObj->tracking_number\t=\tInput::get('tracking_number');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$orderObj->delivered_at\t\t\t=\tdate(Config::get('Reading.date'));\t\n\t\t\t}\n\t\t\t\t$orderObj->save();\n\t\t\t//$orderObj->save();\n\t\t\t\n\t\t\t$orderStatus\t\t=\t($status == ORDER_SHIPPED) ? 'shipped' : 'delivered';\n\t\t\t/* send notification to buyer regarding order status */\n\t\t\t\n\t\t\t$notificationData\t=\tarray(\n\t\t\t\t'user_id'\t\t\t=>\t$orderObj->buyer_id,\n\t\t\t\t'created_by'\t\t=>\t$orderObj->seller_id,\n\t\t\t\t'notification_type'\t=>\tORDER_STATUS,\n\t\t\t\t'status_of_order'\t=>\t$orderStatus,\n\t\t\t\t'url'\t\t\t\t=> route('market-place-buying',array('order_id'=>$orderId)),\n\t\t\t\t'item_name'\t\t\t=>\t$orderObj->title\n\t\t\t);\n\t\t\n\t\t\t$this->save_notifications($notificationData);\n\t\t\t\t\t\n\t\t\t$response = array(\n\t\t\t\t'success' => true\n\t\t\t);\n\t\t\t\n\t\t\treturn Response::json($response);\n\t\t\t\n }\n\t}",
"protected function processStatusOrder($order, $status, $message)\n {\n if ($status == Mage_Sales_Model_Order::STATE_PROCESSING) {\n $order->setState(\n Mage_Sales_Model_Order::STATE_PROCESSING,\n $status,\n $message\n );\n } else {\n if ($status == Mage_Sales_Model_Order::STATE_COMPLETE) {\n $order->setData('state', Mage_Sales_Model_Order::STATE_COMPLETE);\n $order->addStatusToHistory($status, $message, true);\n } else {\n $order->addStatusToHistory($status, $message, true);\n }\n }\n }",
"public function update(Order $order, OrderRequest $request): \\Illuminate\\Http\\Response\n {\n if ($order['status'] !== 'canceled') {\n\n if ($order['status'] != $request['status']) {\n $order->update(['status' => $request['status']]);\n $this->sendMail($order);\n }\n\n return ($request['status'] == \"canceled\")\n ?\n response(['message' => 'Order canceled successfully.'], 202)\n :\n response(['message' => 'Order status successfully updated to ' . $request['status'] . \".\"], 202);\n } else\n return response(['message' => 'You are not able to change the Canceled orders status.'], 200);\n }",
"public function sendConfirmation()\n {\n Mail::to($this->getEmail())->send(new OrderConfirmed($this));\n }",
"public function testSendingEmail($data, $status) {\n\n $this->testAction('/logins/forgotPassword', array('method' => 'post', 'data' => $data));\n $message = \"Check your email to reset password please!\";\n $this->assertEquals($message, $this->vars['message']);\n\n }",
"public function updateStatus($status)\n\t{\n\t\t$this->update(compact('status'));\n\n\t\t$this->getAttribute('invoice_order')->update(['order_status' => $status]);\n\t}",
"public function updateStatus($status)\n\t{\n\t\t$this->update(compact('status'));\n\n\t\t$this->getAttribute('invoice_order')->update(['order_status' => $status]);\n\t}",
"public function sendEmail( $orderID ){\n // Customer Email\n $baseUrl = $GLOBALS['TSFE']->baseUrl;\n $bookedData = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'name, forename, email, event, date', \n 'tx_hevents_domain_model_booking', \n 'ppref = \"'.$orderID.'\" AND deleted = 0 AND hidden = 0'); \n $eventDate = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'start, end, eventstarttime, eventendtime', \n 'tx_hevents_domain_model_date', \n 'uid= \"'.$bookedData[0]['date'].'\" AND deleted = 0 AND hidden = 0');\n $eventData = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', \n 'tx_hevents_domain_model_event', \n 'uid= \"'.$bookedData[0]['event'].'\" AND deleted = 0 AND hidden = 0'); \n \n $separateImg = explode( ',', $eventData[0]['images']);\n \n $custEmailbody .= '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.salText\", $this->request->getControllerExtensionName() ).' '.ucwords( $bookedData[0][\"name\"] ).\" \".ucwords( $bookedData[0][\"forename\"] ).',</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.custThanksMsg\", $this->request->getControllerExtensionName() ).'</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\" style=\"font-size:36px\"><b>'.$eventData[0][\"title\"].'</b></td></tr>';\n\t $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"><img src=\"'.$baseUrl.'uploads/tx_hevents/'.$separateImg[0].'\" width=\"250\" /></td></tr>';\n \t $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"><b>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.evenDescription\", $this->request->getControllerExtensionName() ).'</b></td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\">'.$eventData[0][\"description\"].'</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td><b>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.bookedDate\", $this->request->getControllerExtensionName() ).'</b></td><td> : </td><td>'.date( \"d.m.Y\", $eventDate[0][\"start\"] ).\" - \".date( \"d.m.Y\", $eventDate[0][\"end\"] ).'</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n\t $custEmailbody .= '<tr><td><b>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.bookedTime\", $this->request->getControllerExtensionName() ).'</b></td><td> : </td><td>'.date( \"H:i\", $eventDate[0][\"eventstarttime\"] ).\" - \".date( \"H:i\", $eventDate[0][\"eventendtime\"] ).'</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n if( !empty( $eventData[0][\"locationaddress\"] ) ){\n\t \t$custEmailbody .= '<tr><td style=\"vertical-align:top;\"><b>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.locationAddress\", $this->request->getControllerExtensionName() ).'</b></td><td style=\"vertical-align:top;\"> : </td><td>'.$eventData[0][\"locationaddress\"].'</td></tr>';\n\t \t$custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n }\n if( !empty( $eventData[0][\"provider\"] ) ){\n\t \t$custEmailbody .= '<tr><td style=\"vertical-align:top;\"><b>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.providerName\", $this->request->getControllerExtensionName() ).'</b></td><td style=\"vertical-align:top;\"> : </td><td>'.$eventData[0][\"provider\"].'</td></tr>';\n\t \t$custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n }\n $custEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.custAdditionalMsg\", $this->request->getControllerExtensionName() ).'</td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $custEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.greetingsMsg\", $this->request->getControllerExtensionName() ).'</td></tr>';\n\t $custEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n\t $custEmailbody .= '<tr><td colspan=\"3\"><img src=\"'.$baseUrl.'fileadmin/templates/img/logo.png\" /></td></tr>';\n $custEmailbody .= '</table>';\n \n $custfromEmail = $this->settings['saferpay']['adminEmail'];\n $custfromName = $this->settings['saferpay']['adminName'];\n $custtoEmail = $bookedData[0]['email'];\n $custtoName = ucwords( $bookedData[0][\"name\"] ).\" \".ucwords( $bookedData[0][\"forename\"] );\n\n $custSubject = sprintf( Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.custSubject\", $this->request->getControllerExtensionName() ), $eventData[0][\"title\"], date( \"d.m.Y H:i\", $eventDate[0][\"start\"] ).\" - \".date( \"d.m.Y H:i\", $eventDate[0][\"end\"] ) );\n \n $mail = t3lib_div::makeInstance( 't3lib_mail_message' );\n\t $mail->setFrom( array( $custfromEmail => $custfromName ) );\n\t $mail->setTo( array( $custtoEmail => $custtoName ) );\n\t $mail->setSubject( $custSubject );\n\t $mail->setBody( $custEmailbody, 'text/html' );\n\t $mail->send();\n \n // Admin Email\n $adminEmailbody .= '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">';\n $adminEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.adminThanksMsg\", $this->request->getControllerExtensionName() ).'</td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $adminEmailbody .= '<tr><td>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.adminCustName\", $this->request->getControllerExtensionName() ).'</td><td> : </td><td>'.ucwords( $bookedData[0][\"name\"] ).\" \".ucwords( $bookedData[0][\"forename\"] ).'</td></tr>';\n $adminEmailbody .= '<tr><td>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.bookedEvent\", $this->request->getControllerExtensionName() ).'</td><td> : </td><td>'.$eventData[0][\"title\"].'</td></tr>';\n $adminEmailbody .= '<tr><td>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.bookedDate\", $this->request->getControllerExtensionName() ).'</td><td> : </td><td>'.date( \"d.m.Y\", $eventDate[0][\"start\"] ).\" - \".date( \"d.m.Y\", $eventDate[0][\"end\"] ).'</td></tr>';\n $adminEmailbody .= '<tr><td>'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.bookedTime\", $this->request->getControllerExtensionName() ).'</td><td> : </td><td>'.date( \"H:i\", $eventDate[0][\"eventstarttime\"] ).\" - \".date( \"H:i\", $eventDate[0][\"eventendtime\"] ).'</td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\">'.Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.greetingsMsg\", $this->request->getControllerExtensionName() ).'</td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\"> </td></tr>';\n $adminEmailbody .= '<tr><td colspan=\"3\"><img src=\"'.$baseUrl.'fileadmin/templates/img/logo.png\" /></td></tr>';\n $adminEmailbody .= '</table>';\n \n $adminfromEmail = $bookedData[0]['email'];\n $adminfromName = ucwords( $bookedData[0][\"name\"] ).\" \".ucwords( $bookedData[0][\"forename\"] );\n $admintoEmail = $this->settings['saferpay']['adminEmail'];\n $admintoName = $this->settings['saferpay']['adminName'];\n \n $adminSubject = sprintf( Tx_Extbase_Utility_Localization::translate( \"tx_hevents_domain_model_booking.email.adminSubject\", $this->request->getControllerExtensionName() ), $eventData[0][\"title\"], date( \"d.m.Y H:i\", $eventDate[0][\"start\"] ).\" - \".date( \"d.m.Y H:i\", $eventDate[0][\"end\"] ) );\n \n $mail = t3lib_div::makeInstance( 't3lib_mail_message' );\n\t $mail->setFrom( array( $adminfromEmail => $adminfromName ) );\n\t $mail->setTo( array( $admintoEmail => $admintoName ) );\n\t $mail->setSubject( $adminSubject );\n\t $mail->setBody( $adminEmailbody, 'text/html' );\n return $mail->send();\n }",
"private function _sendEmail($incrementId, $orderPaymentStatus, $grandTotal, $paidTotal, $latestData) {\r\n //send this message to the customer's email\r\n //get customer details from the order ie the customer's email address\r\n $orderDetails = Mage::helper('Boonagel_Cba')->orderObjectGet($incrementId);\r\n\r\n if ($orderDetails == null) {\r\n return;\r\n }\r\n\r\n /* * get billing data* */\r\n $salesOrder = Mage::helper('Boonagel_Cba')->salesOrderObject($orderDetails['entity_id']);\r\n\r\n if ($salesOrder == null) {\r\n return;\r\n }\r\n $billingEmail = $salesOrder->getBillingAddress()->getEmail();\r\n\r\n if ($billingEmail == null) {\r\n return;\r\n }\r\n $billingFirstName = $salesOrder->getBillingAddress()->getFirstname();\r\n /* * * */\r\n\r\n $mailTemplate = Mage::getModel('core/email_template')->loadDefault('cba_mpesa_payment_info');\r\n\r\n $mailTemplateVariables = array();\r\n\r\n $mailTemplateVariables['custFirstName'] = $orderDetails['customer_firstname'];\r\n\r\n if ($orderPaymentStatus == 'complete') {\r\n $mailTemplateVariables['orderStatus'] = 'PAYMENT COMPLETE';\r\n } else {\r\n $mailTemplateVariables['orderStatus'] = 'PAYMENT PENDING';\r\n }\r\n\r\n $receivedAmt = (int) $latestData->getTransAmount();\r\n $mailTemplateVariables['orderIncrementId'] = $incrementId;\r\n $mailTemplateVariables['grandTotal'] = Mage::helper('Boonagel_Cba')->getCurrentCurrency() . ' ' . Mage::helper('Boonagel_Cba')->formatNumber($grandTotal, 2);\r\n $mailTemplateVariables['latestAmount'] = Mage::helper('Boonagel_Cba')->getCurrentCurrency() . ' ' . Mage::helper('Boonagel_Cba')->formatNumber($receivedAmt, 2);\r\n $mailTemplateVariables['orderTotalPaid'] = Mage::helper('Boonagel_Cba')->getCurrentCurrency() . ' ' . Mage::helper('Boonagel_Cba')->formatNumber($paidTotal, 2);\r\n\r\n $orderRemainderAmt = $grandTotal - $paidTotal;\r\n if ($orderRemainderAmt >= 0) {\r\n //return positive they paid exact or they have a pending payment amount.\r\n $mailTemplateVariables['orderRemainder'] = Mage::helper('Boonagel_Cba')->getCurrentCurrency() . ' ' . Mage::helper('Boonagel_Cba')->formatNumber($orderRemainderAmt, 2);\r\n } else {\r\n //return - meaning they paid excess.\r\n $orderRemainderAmt = $orderRemainderAmt * (-1);\r\n $mailTemplateVariables['orderRemainder'] = 'Over paid By ' . Mage::helper('Boonagel_Cba')->getCurrentCurrency() . ' ' . Mage::helper('Boonagel_Cba')->formatNumber($orderRemainderAmt, 2);\r\n }\r\n\r\n $mailTemplateVariables['logoSource'] = Mage::helper('Boonagel_Cba')->logoSource();\r\n\r\n //get the processed template\r\n $mailTemplate->getProcessedTemplate($mailTemplateVariables);\r\n\r\n $storeId = Mage::helper('Boonagel_Cba')->storeId();\r\n\r\n $mailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email', $storeId));\r\n\r\n $mailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name', $storeId));\r\n\r\n //send the processed template\r\n $mailTemplate->send($billingEmail, $billingFirstName, $mailTemplateVariables);\r\n }",
"function update_order_status($order_id, $toStatus, $origStatus, $operator, $remark = '') {\n $result = $this->updateAll(array('status' => $toStatus, 'lastupdator' => $operator, 'business_remark' => 'concat(business_remark, \"'.$remark.'\")'), array('id' => $order_id, 'status' => $origStatus));\n\n if ($result) {\n $cartM = ClassRegistry::init('Cart');\n $cartM->updateAll(array('status'=>$toStatus), array('order_id'=>$order_id, 'status' => $origStatus));\n\n $affectedRows = $this->getAffectedRows();\n if ($origStatus == ORDER_STATUS_SHIPPED && $toStatus == ORDER_STATUS_RECEIVED) {\n $this->log('change order '.$order_id.' status from '.$toStatus.' to '.$origStatus);\n $order = $this->findById($order_id);\n $scoreM = ClassRegistry::init('Score');\n if (!empty($order)) {\n $creator = $order['Order']['creator'];\n $rtn = $scoreM->add_score_by_bought($creator, $order_id, $order['Order']['total_all_price']);\n $this->log('add_score_by_bought: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($rtn));\n if (!empty($rtn)) {\n $userM = ClassRegistry::init('User');\n $userM->add_score($creator, $rtn['Score']['score']);\n }\n }\n } else if ($origStatus == ORDER_STATUS_WAITING_PAY && $toStatus == ORDER_STATUS_CANCEL) {\n $order = $this->findById($order_id);\n// $scoreM = ClassRegistry::init('Score');\n// $RebateLogM = ClassRegistry::init('RebateLog');\n// $userM = ClassRegistry::init('User');\n if (!empty($order)) {\n// $creator = $order['Order']['creator'];\n// $rtn = $scoreM->restore_score_by_undo_order($creator, $order['Order']['applied_score'], $order_id);\n// $this->log('restore_score_by_undo_order: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($rtn));\n// if (!empty($rtn)) {\n// $userM->add_score($creator, $rtn['Score']['score']);\n// }\n// $restoreRebateRtn = $RebateLogM->restore_rebate_by_undo_order($creator, $order['Order']['applied_rebate'], $order_id);\n// $this->log('restore_rebate_by_undo_order: uid='.$creator.', order_id='.$order_id.', result:'. json_encode($restoreRebateRtn));\n// if(!empty($rtn)){\n// $userM->add_rebate_money($creator, $restoreRebateRtn['RebateLog']['money']);\n// }\n $couponItemM = ClassRegistry::init('CouponItem');\n $couponItemM->updateAll(array('status' => COUPONITEM_STATUS_TO_USE, 'applied_order' => '0'),\n array('applied_order' => $order_id, 'status' => COUPONITEM_STATUS_USED));\n }\n }\n } else {\n $affectedRows = 0;\n }\n return array($result, $affectedRows);\n }",
"public function on_status_update($order_id, $old_status = '', $new_status = '')\n {\n // Check if it's enabled\n if (!$this->opt['woochimp_update_order_status'] || empty($order_id)) {\n return;\n }\n\n $this->log_add(__('Order status update process launched for order id: ', 'woochimp') . $order_id);\n\n // Try to get order object\n $order = self::wc_get_order($order_id);\n\n // Stop if there's no order and no status\n if (!$order && empty($new_status)) {\n $this->log_add(__('No order and no status found, stopping.', 'woochimp'));\n return;\n }\n\n // Check status\n $new_status = empty($new_status) ? $order->get_status() : $new_status;\n\n // Get MC store id\n try {\n $store_id = $this->ecomm_get_store();\n\n if ($store_id === false) {\n return;\n }\n }\n catch (Exception $e) {\n return;\n }\n\n // Get MC order id\n $mc_order_id = self::ecomm_get_id('order', $order_id);\n\n // Prepare order args to send\n $args = array(\n 'financial_status' => $new_status,\n 'processed_at_foreign' => $order->order_date,\n 'updated_at_foreign' => $order->modified_date,\n );\n\n // Check if MailChimp is loaded\n if ($this->load_mailchimp()) {\n\n // Check if order exists in MailChimp\n if ($this->order_exists($store_id, $mc_order_id) === false) {\n $this->log_add(sprintf(__('Order %s does not exist in Store %s, stopping.', 'woochimp'), $mc_order_id, $store_id));\n return;\n }\n\n // Send request to update order\n try {\n $result = $this->mailchimp->update_order($store_id, $mc_order_id, $args);\n $this->log_add(__('Order updated successfully.', 'woochimp'));\n $this->log_process_regular_data($args, $result);\n }\n catch (Exception $e) {\n $this->log_process_exception($e);\n return;\n }\n }\n }",
"function sendSuccessfulOrderEmail($to=\"\",$name)\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\tglobal $_SESSION;\r\n\t\t\r\n\t\t$message_html = lookupDbValue('automated_email_contents','html','1','email_id');\r\n\t\t$subject = lookupDbValue('automated_email_contents','subject','1','email_id');\r\n\t\t$from = lookupDbValue('automated_email_contents','from','1','email_id');\r\n\t\t\r\n\t\t//$email_template = $_SETTINGS['ecommerce_email_template'];\r\n\t\t$email_html = file_get_contents(\"\".$_SETTINGS['website'].\"themes/\".$_SETTINGS['theme'].\"\".$_SETTINGS['ecommerce_email_template'].\"?cartid=\".$this->getCartId().\"\");\r\n\t\t\r\n\t\t// TESTING\r\n\t\t//echo \"<br><br>TEMPLATE: \".$_SETTING['ecommerce_email_template'];\r\n\t\t//die($email_html);\r\n\t\t//exit();\r\n\t\t\r\n\t\t$email_html = str_replace(\"|date|\",\"\".date(\"m/d/Y\").\"\",$email_html);\r\n\t\t$email_html = str_replace(\"|message_html|\",\"\".$message_html.\"\",$email_html);\r\n\t\t$email_html = str_replace(\"|name|\",$name,$email_html);\r\n\t\t\r\n\t\t\r\n\t\t@sendEmail($to,$from,$subject,$email_html);\r\n\t\treturn true;\r\n\t}"
] | [
"0.74727035",
"0.7427927",
"0.73744607",
"0.7116968",
"0.7113526",
"0.6937491",
"0.67373085",
"0.66785276",
"0.6666201",
"0.6663992",
"0.6589996",
"0.63916737",
"0.63291264",
"0.63082784",
"0.630471",
"0.6254228",
"0.62297237",
"0.6227942",
"0.6216914",
"0.62091655",
"0.6205614",
"0.6203915",
"0.6203456",
"0.6196312",
"0.6196312",
"0.6189474",
"0.61761326",
"0.6169732",
"0.6169033",
"0.6162148"
] | 0.8092188 | 0 |
will notify every user belonging to the restaurant via their notification addresses if no notification addresses are found, it will fall back to the restaurant's email address $RestaurantID = the restaurant to notify $Message = the message to be sent, will be passed as $body into the email template $EmailParameters = any extra parameters to be passed to the email template $EmailTemplate = the email template to use, defaults to the newsletter as it just sends the message $IncludeVan = If "call", calls Van. If any other value (except false) it sends an SMS to Van (only works on live site) $Emails/$Calls/$SMS = enable/disable that type of notification method returns a multidimensional array, first dimension = type of address ("email", "sms", "call", "total"), second dimension = addresses contacted, except for total which is the sum of all 3 types example usage outside of this controller: app('App\Http\Controllers\OrdersController')>notifystore(1, "TEST"); | public function notifystore($RestaurantID, $Message, $EmailParameters = [], $EmailTemplate = "emails.newsletter", $IncludeVan = false, $Emails = true, $Calls = true, $SMS = true) {
$NotificationAddresses = \DB::select('SELECT * FROM notification_addresses LEFT JOIN profiles ON notification_addresses.user_id=profiles.id WHERE profiles.restaurant_id = ' . $RestaurantID);
$EmailParameters["body"] = $Message;
if (!isset($EmailParameters["mail_subject"])) {
$EmailParameters["mail_subject"] = $Message;
}
//list of words to replace for easier pronunciation by the computer
$CallMessage = str_replace(array(DIDUEAT), array("did you eat"), strtolower($Message));
if($IncludeVan && islive()){$this->sendSMS("9055315331", $Message, strtolower($IncludeVan) == "call");}
$ret = array("email" => array(), "sms" => array(), "call" => array(), "total" => 0, "ret");
foreach ($NotificationAddresses as $NotificationAddress) {
//debugprint( var_export($NotificationAddress, true) );
if ($NotificationAddress->address) {
$NotificationAddress->address = trim($NotificationAddress->address);
if ($NotificationAddress->type == "Email") {
if($Emails) {
$EmailParameters['name'] = $NotificationAddress->name;
$EmailParameters["email"] = $NotificationAddress->address;
$this->sendEMail($EmailTemplate, $EmailParameters);
$ret["email"][] = $NotificationAddress->address;
}
} else if ($NotificationAddress->is_sms) {
if($SMS) {
$ret["ret"]["sms " . $NotificationAddress->address] = $this->sendSMS($NotificationAddress->address, $Message);
$ret["sms"][] = $NotificationAddress->address;
}
} else if ($Calls) {
$ret["ret"]["call " . $NotificationAddress->address] = $this->sendSMS($NotificationAddress->address, $CallMessage, true);
$ret["call"][] = $NotificationAddress->address;
}
$ret["total"] = $ret["total"] + 1;
}
}
if (!$ret["total"] && $Emails) {//emergency fallback email
$restaurant = \App\Http\Models\Restaurants::find($RestaurantID);
$EmailParameters['name'] = $restaurant->name;
$EmailParameters['email'] = $restaurant->email;
$this->sendEMail($EmailTemplate, $EmailParameters);
$ret["email"][] = $restaurant->email;
$ret["total"] = 1;
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function emailstore($RestaurantID, $Message, $EmailParameters = [], $EmailTemplate = \"emails.newsletter\"){\n $this->notifystore($RestaurantID, $Message, $EmailParameters, $EmailTemplate, false, true, false, false);\n }",
"function notifyRecipients()\n {\n //init notification key's message\n $this->initMessageKeys();\n \n $this->initFieldKeys(FALSE);\n $this->initHeaderKeys();\n return $this->sendMessage();\n }",
"public function email_notification($input_params = array())\n {\n\n $this->block_result = array();\n try\n {\n\n $email_arr[\"vEmail\"] = $input_params[\"user_email\"];\n\n $email_arr[\"vContent\"] = \"\";\n $email_arr[\"vContent\"] = $this->general->getReplacedInputParams($email_arr[\"vContent\"], $input_params);\n\n $success = $this->general->CISendMail($email_arr[\"vEmail\"], $email_arr[\"vSubject\"], $email_arr[\"vContent\"], $email_arr[\"vFromEmail\"], $email_arr[\"vFromName\"], $email_arr[\"vCCEmail\"], $email_arr[\"vBCCEmail\"], array(), $input_params);\n\n $log_arr = array();\n $log_arr['eEntityType'] = 'General';\n $log_arr['vReceiver'] = is_array($email_arr[\"vEmail\"]) ? implode(\",\", $email_arr[\"vEmail\"]) : $email_arr[\"vEmail\"];\n $log_arr['eNotificationType'] = \"EmailNotify\";\n $log_arr['vSubject'] = $this->general->getEmailOutput(\"subject\");\n $log_arr['tContent'] = $this->general->getEmailOutput(\"content\");\n if (!$success)\n {\n $log_arr['tError'] = $this->general->getNotifyErrorOutput();\n }\n $log_arr['dtSendDateTime'] = date('Y-m-d H:i:s');\n $log_arr['eStatus'] = ($success) ? \"Executed\" : \"Failed\";\n $this->general->insertExecutedNotify($log_arr);\n if (!$success)\n {\n throw new Exception(\"Failure in sending mail.\");\n }\n $success = 1;\n $message = \"Email notification send successfully.\";\n }\n catch(Exception $e)\n {\n $success = 0;\n $message = $e->getMessage();\n }\n $this->block_result[\"success\"] = $success;\n $this->block_result[\"message\"] = $message;\n $input_params[\"email_notification\"] = $this->block_result[\"success\"];\n\n return $input_params;\n }",
"public function send($notifiables, $notification);",
"public function email_notification($input_params = array())\n {\n\n $this->block_result = array();\n try\n {\n\n $email_arr[\"vEmail\"] = $input_params[\"email\"];\n\n $email_arr[\"vUsername\"] = $input_params[\"email_user_name\"];\n $email_arr[\"email_confirmation_link\"] = $input_params[\"email_confirmation_link\"];\n\n $success = $this->general->sendMail($email_arr, \"SIGNUP_EMAIL_CONFIRMATION\", $input_params);\n\n $log_arr = array();\n $log_arr['eEntityType'] = 'General';\n $log_arr['vReceiver'] = is_array($email_arr[\"vEmail\"]) ? implode(\",\", $email_arr[\"vEmail\"]) : $email_arr[\"vEmail\"];\n $log_arr['eNotificationType'] = \"EmailNotify\";\n $log_arr['vSubject'] = $this->general->getEmailOutput(\"subject\");\n $log_arr['tContent'] = $this->general->getEmailOutput(\"content\");\n if (!$success)\n {\n $log_arr['tError'] = $this->general->getNotifyErrorOutput();\n }\n $log_arr['dtSendDateTime'] = date('Y-m-d H:i:s');\n $log_arr['eStatus'] = ($success) ? \"Executed\" : \"Failed\";\n $this->general->insertExecutedNotify($log_arr);\n if (!$success)\n {\n throw new Exception(\"Failure in sending mail.\");\n }\n $success = 1;\n $message = \"Email notification send successfully.\";\n }\n catch(Exception $e)\n {\n $success = 0;\n $message = $e->getMessage();\n }\n $this->block_result[\"success\"] = $success;\n $this->block_result[\"message\"] = $message;\n $input_params[\"email_notification\"] = $this->block_result[\"success\"];\n\n return $input_params;\n }",
"function bbp_edit_user_email_send_notification($user_id = 0, $args = array())\n{\n}",
"public function notification() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n // Check if data was submitted\n if ( $this->input->post() ) {\n \n // Add form validation\n $this->form_validation->set_rules('title', 'Title', 'trim|required');\n $this->form_validation->set_rules('body', 'Body', 'trim|required');\n $this->form_validation->set_rules('template', 'Template', 'trim');\n \n // Get data\n $title = str_replace('-', '/', $this->input->post('title'));\n $body = str_replace('-', '/', $this->input->post('body'));\n $title = $this->security->xss_clean(base64_decode($title));\n $body = htmlspecialchars_decode($this->security->xss_clean(base64_decode($body)));\n $template = $this->input->post('template');\n \n // Check form validation\n if ( $this->form_validation->run() == false ) {\n \n display_mess(7);\n \n } else {\n \n if ( $this->notifications->update_msg($title, $body, $template) ) {\n \n if ( $template ) {\n \n display_mess(9);\n \n } else {\n \n // Check if admin wants to send notification via email\n if ( $this->options->check_enabled('enable-notifications-email') == false ) {\n \n display_mess(76);\n \n } else {\n \n // Gets all user's email that want to receive notifications by email\n $emails = $this->user->get_all_user_email_for_notifications();\n \n $i = 0;\n \n if ( $emails ) {\n \n foreach ( $emails as $email ) {\n \n // Sends to getted emails\n $this->email->from($this->config->item('contact_mail'), $this->config->item('site_name'));\n $this->email->to($email->email);\n $this->email->subject($title);\n $this->email->message($body);\n \n if ( $this->email->send() ) {\n \n $i ++;\n \n }\n \n }\n \n }\n \n if ( $i > 0 ) {\n \n display_mess(10, $i);\n \n } else {\n \n display_mess(76);\n \n }\n \n }\n \n }\n \n } else {\n \n display_mess(8);\n \n }\n \n }\n \n }\n \n }",
"private function sendUserRegisterationEmail(&$objRestaurant, &$objMail)\n {\n /*Below Code (From Start Comment 27 Aug 2015 Till End Comment 27 Aug 2015 \n is working fine but as there is no need for registration emails so we are \n commenting this. Gulfam - QualityClix 27 August 2015\n */\n \n /*Start Comment 27 Aug 2015 \n $mail_body=\"\";\n $mail_body=$mail_body.\"Greetings, \".trim($this->cust_your_name .\" \".$this->LastName).\"!\".\"<br><br>\";\n $mail_body=$mail_body.\"Thank you for visiting <a href='http://www.easywayordering.com/\". $objRestaurant->url .\"/'>www.easywayordering.com/\". $objRestaurant->url .\"/</a>. We hope that you will find our easywayordering system helpful for your work and home food delivery needs.\".\"<br><br>\";\n $mail_body=$mail_body.\"For your convenience, please store the following information:\".\"<br><br>\";\n $mail_body=$mail_body.\"Your login: \".$this->cust_email.\"<br>\";\n $mail_body=$mail_body.\"Your password: [The password you set while creating account]<br><br>\";\n $mail_body=$mail_body.\"Your account makes it very easy for you to place orders in the future; simply enter in your Username and Password on the main order page, and you're on your way to receiving your favorite restaurant food, delivered right to your door. With our easywayordering system you will be able to plan ahead and relax.\".\"<br><br>\";\n $mail_body=$mail_body.\"We thank you for your business and look forward to serving you!\".\"<br><br>\";\n $mail_body=$mail_body.\"Kind regards,\".\"<br><br>\";\n $mail_body=$mail_body.\"<a href='http://www.easywayordering.com/\". $objRestaurant->url .\"/'>www.easywayordering.com/\". $objRestaurant->url .\"/</a>\".\"<br>\";\n $mail_body=$mail_body.\"Phone: \". $objRestaurant->phone .\"<br>\";\n $mail_body=$mail_body.\"Fax: \". $objRestaurant->fax .\"<br>\";\n \n $objMail->from = \"[email protected]\";\n $objMail->sendTo($mail_body,\"Thank you for register at \". $objRestaurant->name .\"\",$this->cust_email);\n * End Comment 27 Aug 2015 */\n }",
"public function alertstore(){\n $Field = 'reservations.status';\n $value = \"pending\";\n if (isset($_GET[\"orderid\"]) && $_GET[\"orderid\"]) {\n $Field = 'reservations.id';\n $value = $_GET[\"orderid\"];\n }\n $Orders = \\DB::table('reservations')\n ->select(\\DB::raw(\"reservations.*, restaurants.*, reservations.id as order_id\"))\n ->leftJoin('restaurants', 'reservations.restaurant_id', '=', 'restaurants.id')\n ->where($Field, '=', $value)\n ->get();\n\n $array = array('mail_subject' => \"An order has been placed with didueat.ca\");\n\n echo '<H1>Pending orders: ' . count($Orders) . '</H1><TABLE BORDER=\"1\"><TR><TH>Order</TH><TH>Restaurant</TH><TH>Address</TH><TH>Delivery Time</TH><TH>GUID</TH><TH>Actions</TH></TR>';\n $TotalActions = array(\"Email\" => array(), \"SMS\" => array(), \"Call\" => array());\n $Addresses = array();\n foreach ($Orders as $Order) {\n echo '<TR>';\n echo '<TD>' . $Order->order_id . '</TD>';\n echo '<TD>' . $Order->restaurant_id . '</TD>';\n echo '<TD>' . $Order->address1 . ' ' . $Order->address2 . '<BR>' . $Order->city . ' ' . $Order->province . '<BR>' . $Order->country . ' ' . $Order->postal_code . '</TD>';\n echo '<TD>' . $Order->order_till . '</TD>';\n echo '<TD>' . $Order->guid . '</TD>';\n\n $NotificationAddresses = \\DB::select('SELECT * FROM notification_addresses LEFT JOIN profiles ON notification_addresses.user_id=profiles.id WHERE profiles.restaurant_id = ' . $Order->restaurant_id);\n echo '<TD>';//is_call, is_sms, type, address, profile: email,phone, mobile\n $Actions = array();\n\n //enumerate all notification methods, separated by type\n foreach ($NotificationAddresses as $NotificationAddress) {\n if ($NotificationAddress->address) {\n $NotificationAddress->address = trim($NotificationAddress->address);\n if (isset($Addresses[$NotificationAddress->address])) {\n $Addresses[$NotificationAddress->address] = $Addresses[$NotificationAddress->address] + 1;\n } else {\n $Addresses[$NotificationAddress->address] = 1;\n }\n if ($NotificationAddress->type == \"Email\") {\n $Actions[\"Email\"][] = $NotificationAddress->address;\n $Actions[\"Email\"] = array_unique($Actions[\"Email\"]);\n $TotalActions[\"Email\"][] = $NotificationAddress->address;\n\n $array[\"email\"] = $Actions[\"Email\"];\n $array[\"orderid\"] = $Order->order_id;\n $this->sendEMail(\"emails.receipt\", $array);\n\n } else if ($NotificationAddress->is_sms) {\n $Actions[\"SMS\"][] = phonenumber($NotificationAddress->address);\n $Actions[\"SMS\"] = array_unique($Actions[\"SMS\"]);\n $TotalActions[\"SMS\"][] = $NotificationAddress->address;\n } else {\n $Actions[\"Call\"][] = phonenumber($NotificationAddress->address);\n $Actions[\"Call\"] = array_unique($Actions[\"Call\"]);\n $TotalActions[\"Call\"][] = $NotificationAddress->address;\n }\n }\n }\n var_dump($Actions);\n echo '</TD>';\n\n echo '</TR>';\n }\n echo '</TABLE>';\n\n //contact each notification method\n echo '<TABLE BORDER=\"1\"><TR><TH>Action</TH><TH>Address</TH><TH>Orders</TH></TR>';\n foreach ($TotalActions as $Key => $Value) {\n $Value = array_unique($Value);\n foreach ($Value as $Address) {\n $Orders = $Addresses[$Address];\n if ($Orders == 1) {\n $Message = \"There is 1 order pending for your approval at \";\n } else {\n $Message = \"There are \" . $Orders . \" orders pending for your approval at \";\n }\n echo '<TR><TD>' . $Key . '</TD><TD>' . $Address . '</TD><TD>' . $Orders . '</TD></TR>';\n if (true) {//set to false to disable contacting\n switch ($Key) {\n case \"Call\":\n $this->sendSMS($Address, $Message . \"did you eat dot see ay\", true);\n break;\n case \"SMS\":\n $this->sendSMS($Address, $Message . \"didueat.ca\");\n break;\n case \"Email\":\n $Email = array(\"mail_subject\" => $Message . \"didueat.ca\", \"email\" => $Address, \"body\" => $Message . \"didueat.ca\", \"name\" => \"didueat.ca user\");\n $this->sendEMail(\"emails.newsletter\", $Email);\n break;\n }\n }\n }\n }\n echo '</TABLE>';\n echo '<input type=\"button\" value=\"Go Back\" onclick=\"history.back(-1);\" />';\n die();\n }",
"public function userNotifications(){\n\n \t\n\t\t//Get Order Notifications\n\n $store = StoreUser::where('user_id', \"=\", $this->user_id)->first();\n if(!empty($store)){\n \t$store_id = $store->store_id;\n \t$recent_orders = DB::table('order_items')\n ->join('orders', 'order_items.orders_id', '=', 'orders.id')\n ->join('products', 'order_items.products_id', '=', 'products.id')\n //->select('order_items.id AS order_id', 'orders.order_status_id AS status')\n ->where([\n ['products.store_id', \"=\", $store_id],\n ['orders.created_at', '<', $this->last_activity],\n ])\n ->groupBy('orders.id')\n ->get();\n \n\t $order_num = sizeof($recent_orders);\n\n\t // Approved Products\n\t $approved_products = Product::where([\n\t ['store_id', \"=\", $store_id],\n\t ['product_moderation_type_id', \"=\", 2],\n\t ['updated_at', '<', $this->last_activity],\n\t ])\n\t ->count();\n\t \n\n\t // Rejected Products\n\t $rejected_products = Product::where([\n\t ['store_id', \"=\", $store_id],\n\t ['product_moderation_type_id', \"=\", 3],\n\t ['updated_at', '<', $this->last_activity],\n\t ])\n\t ->count();\n\n\t $total = intval($recent_orders) + intval($approved_products) + intval($rejected_products);\n\t $notifications = [\n \t\t'new_orders' => $order_num,\n \t\t'approved_products' => $approved_products,\n \t\t'rejected_products' => $rejected_products,\n \t\t'total' => $total,\n \t\t'storeOwner'=> true,\n \t\t'last_activity' => $this->last_activity,\n ];\n \n }else{\n \t $notifications = [\n \t\t'new_orders' => 0,\n \t\t'approved_products' => 0,\n \t\t'rejected_products' => 0,\n \t\t'total' => 0,\n \t\t'storeOwner'=> false,\n \t\t'last_activity' => $this->last_activity,\n ];\n }\n \n return $notifications;\n }",
"static function sendOrderNotification($order_id, $email_params, $tpl_name, $receiver_email, $subject)\n {\n $smartyObj = new SmartyClass(SITE_FRONTEND);\n //pa(SITE_FRONTEND, $smartyObj);exit;\n \n EkvCommonHelper::setSiteCoreViewFake(\"frontend\");\n\n $smartyObj->assign(\"email_params\", $email_params);\n \n $notifObj = new EkvMailNotifier($smartyObj, $tpl_name);\n $notifObj->addReceiver($receiver_email);\n $notifObj->setCCReceiversAdmins();\n $notifObj->setMailSubject($subject);\n $notifObj->setFooterForOrderNotifications($order_id);\n //--- proper image displaying ---//\n $msg = $notifObj->fetchMessageFromTpl();\n $notifObj->setMailMessageWithImagesEmbeded($msg, PATH_ROOT);\n\n EkvCommonHelper::setSiteCoreViewFake(null);\n\n $notifObj->SendOnly();\n }",
"public function notify()\n {\n // Fetch all relevant and activated notifications:\n\n $this->m_log->debug(\n 'Fetching all activated notifications for this type...'\n );\n\n $l_conditions = [\n 'type' => $this->m_type['id']\n ];\n\n $this->m_notifications = $this->m_dao->get_notifications(null, $l_conditions);\n\n if (count($this->m_notifications) === 0)\n {\n $this->m_log->debug('There are no notifications for this type.');\n\n return;\n } //if\n\n // Fetch templates:\n\n $this->m_log->debug('Fetching notification templates...');\n\n $l_conditions = [\n 'notification_type' => $this->m_type['id']\n ];\n\n $this->m_templates = $this->m_dao->get_templates(null, $l_conditions);\n\n if (count($this->m_templates) === 0)\n {\n $this->m_log->warning('There are no notification templates');\n\n return;\n } //if\n\n // Handle notifications:\n\n $this->m_log->info('Handling notifications...');\n\n foreach ($this->m_notifications as $l_notification)\n {\n if ($l_notification['status'] == isys_notifications_dao::C__STATUS__DEACTIVATED) continue;\n\n if ($l_notification['limit'] >= 1 && $l_notification['count'] >= $l_notification['limit'])\n {\n $this->m_log->info(\n 'Notification limit of \"' . $l_notification['limit'] . '\" reached. Skipping notification \"' . self::_l($l_notification['title']) . '\".'\n );\n continue;\n }\n\n $this->m_log->info(\n sprintf(\n 'Handling notification \"%s\" [%s]...',\n self::_l($l_notification['title']),\n $l_notification['id']\n )\n );\n\n $this->m_notification = $l_notification;\n\n /**\n * Replace it by execute() without parameters.\n */\n $this->handle_notification($l_notification);\n } //foreach\n\n // Send messages:\n\n $this->m_log->debug('Delivering messages...');\n\n if (count($this->m_messages) === 0)\n {\n $this->m_log->debug('There are no messages to deliver.');\n }\n else\n {\n foreach ($this->m_messages as $l_message)\n {\n $this->send_message(\n $l_message['contacts'],\n $l_message['subject'],\n $l_message['body']\n );\n } //foreach\n } //if\n\n $this->m_log->debug('Finished notifying for this type.');\n }",
"public function SendingNotif ($projectID, $isApprove, $sendTo, $area){\n\t$idUser = Auth::guard('karyawan')->user()->id ;\n $getProject = DB::table('project')->where('id','=',$projectID)->get()[0];\n $getSender = DB::table('users')->where('id','=',$idUser)->get()[0];\n\n if (strtoupper($sendTo) == \"ALL\"){\n $getReceiver = DB::table('project_status')->select('users.id', 'users.email')\n ->join('users','users.id','=','project_status.user_id')\n ->where('project_status.project_id','=',$projectID)\n ->groupBy('project_status.user_id')->get();\n\n }else{\n $getReceiver = DB::table('users')->select('id','email')\n ->where('level','=',$sendTo)\n ->where(function($filter)use($sendTo,$area){\n if (strpos(strtoupper($sendTo), \"AREA\") || strtoupper($sendTo) == \"STAFF PROCUREMENT\"){\n $filter->where('area','=',$area);\n }else if (strtoupper($sendTo) == \"MANAGER UBIS\"){\n $filter->where('area','=',$area)\n ->orWhere('area2','=',$area);\n }\n })->get();\n }\n\n\n $msg = \"Project ID \".$getProject->projectid.\" Menunggu Approval.\";\n $detail = \"Telah Ada Proses \".(($isApprove)?\"APPROVE\":\"REPAIR\").\" dari \".$getSender->name.\" (\".$getSender->level.\").\";\n\n //push notification\n $arrIDS = array();\n $arrEmail = array();\n foreach ($getReceiver as $item) {\n DB::table('notification')\n ->insert([\n \"project_id\" => $projectID,\n \"sender_id\" => $getSender->id,\n \"users_id\" => $item->id,\n \"message\" => $msg,\n \"detail\" => $detail,\n \"status\" => 0,\n \"created_at\" => date('Y-m-d H:i:s'),\n \"updated_at\" => date('Y-m-d H:i:s')\n ]);\n\n array_push($arrEmail, $item->email);\n\n $getIDS = DB::table('user_session')->select('player_ids')\n ->where('id_user','=',$item->id)\n ->whereNotNull('player_ids')->get();\n\n $arrIDS = array();\n foreach ($getIDS as $item) {\n $ids = $item->player_ids;\n if (strlen($ids) > 10){\n array_push($arrIDS, $ids);\n }\n }\n\n if (count($arrIDS) > 0){\n $content = array(\"en\" => $msg);\n $fields = array(\n 'app_id' => env('APP_ID'),\n // 'included_segments' => $arrIDS,\n 'include_player_ids' => $arrIDS,\n 'data' => array(\"foo\" => \"bar\"),\n 'contents' => $content\n );\n \n $fields = json_encode($fields); \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, env('URL_NOTIF'));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8',\n 'Authorization: Basic '.env('PROJECT_ID')));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HEADER, FALSE);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n curl_exec($ch);\n curl_close($ch);\n }\n }\n\n }",
"function uap_send_user_notifications($u_id=0, $notification_type='', $rank=0, $dynamic_data=array() ){\n\t$sent = FALSE;\n\n\tif ($u_id && $notification_type){\n\t\tglobal $indeed_db;\n\t\t$send_to_admin = FALSE;\n\t\tif (empty($rank)){\n\t\t\t$rank = $indeed_db->get_affiliate_rank(0, $u_id);\n\t\t}\n\t\tif ($rank && $rank>-1){\n\t\t\t$data = $indeed_db->get_notification_for_rank($rank, $notification_type);\n\t\t}\n\t\tif (empty($data) || $rank==-1 || !$rank){\n\t\t\t$data = $indeed_db->get_notification_for_rank(-1, $notification_type);\n\t\t}\n\t\tif (!empty($data)){\n\t\t\t$subject = (empty($data['subject'])) ? '' : $data['subject'];\n\t\t\t$message = (empty($data['message'])) ? '' : $data['message'];\n\t\t\t$from_name = get_option('uap_notification_name');\n\t\t\tif (empty($from_name)){\n\t\t\t\t$from_name = get_option(\"blogname\");\n\t\t\t}\n\t\t\t//user data\n\t\t\t$u_data = get_userdata($u_id);\n\t\t\t$user_email = $u_data->data->user_email;\n\t\t\t//from email\n\t\t\t$from_email = get_option('uap_notification_email_from');\n\t\t\tif (empty($from_email)){\n\t\t\t\t$from_email = get_option('admin_email');\n\t\t\t}\n\t\t\t$message = uap_replace_constants($message, $u_id, $dynamic_data);\n\t\t\t$subject = uap_replace_constants($subject, $u_id, $dynamic_data);\n\n\t\t\t$message = stripslashes(htmlspecialchars_decode(uap_format_str_like_wp($message)));\n\t\t\t$message = apply_filters('uap_notification_filter', $message, $u_id, $notification_type);\n\t\t\t$message = \"<html><head></head><body>\" . $message . \"</body></html>\";\n\t\t\tif ($subject && $message && $user_email){\n\t\t\t\tif ($notification_type=='admin_user_register' || $notification_type=='admin_on_aff_change_rank' || $notification_type=='admin_affiliate_update_profile'){\n\t\t\t\t\t/////// ADMIN NOTIFICATION\n\t\t\t\t\t$user_email = get_option('admin_email');//we change the destination\n\t\t\t\t\t$send_to_admin = TRUE;\n\t\t\t\t}\n\t\t\t\tif (!empty($from_email) && !empty($from_name)){\n\t\t\t\t\t$headers[] = \"From: $from_name <$from_email>\";\n\t\t\t\t}\n\t\t\t\t$headers[] = 'Content-Type: text/html; charset=UTF-8';\n\t\t\t\t$sent = wp_mail($user_email, $subject, $message, $headers);\n\t\t\t}\n\t\t}\n\n\t\t/// PUSHOVER\n\t\tif ($indeed_db->is_magic_feat_enable('pushover')){\n\t\t\trequire_once UAP_PATH . 'classes/Uap_Pushover.class.php';\n\t\t\t$pushover_object = new Uap_Pushover();\n\t\t\t$pushover_object->send_notification($u_id, $rank, $notification_type, $send_to_admin);\n\t\t}\n\t\t/// PUSHOVER\n\t}\n\treturn $sent;\n}",
"public function OrderEmail($order_id)\n { \n\n $order = Order::find($order_id);\n if($order)\n {\n $restaurant = $order->foods->first()->restaurant;\n $order_restaurant_url = $this->url.'/order_details/'.$order_id.'/'.$order->secret;\n\n //SendSMS::sendOrderSms($restaurant->mobile,$order_restaurant_url); // send and return its response \n\n $restaurant = $order->foods->first()->restaurant;\n \n//----------------------- End Rider --------------\n\n //-------- Send to Customer\n $order_customer_url = $this->url.'/customer/order-placed/'.$restaurant->id.'/'.$order->id;\n $customer_title = ('Dear Customer, Your order has been successfully received');\n SendEmail::SendOrderEmail($order_id, 'Order Placed' , $order->user->email , Null,$order,$order->total,$order_customer_url,$customer_title); \n\n //-------- Send to restaurant\n $order_restaurant_url = $this->url.'/order_details/'.$order_id.'/'.$order->secret;\n $restaurant_title = ('Dear Restaurant Owner, a customer just ordered from your restaurant, please respond to the order within 5 minutes');\n SendEmail::SendOrderEmail($order_id, ' New order Placed' , $restaurant->email , Null ,$order,$order->restaurant_total,$order_restaurant_url,$restaurant_title); \n \n\n $cservice_title = ('Dear Customer Service, a customer just ordered from Spoongate, please check the status of this order');\n SendEmail::SendOrderEmail($order_id, 'Order Placed' , $this->order_email , $this->admin_email,$order,$order->total,$order_restaurant_url,$cservice_title); \n }\n\n\n}",
"public function notifyManager()\n {\n $users = User::find()->Where([\n 'type' => User::TYPE_SUPERUSER,\n 'status' => User::STATUS_ACTIVE\n ])->all();\n\n DeliveredToManagerNotification::create([\n 'method' => $this->owner,\n 'recipients' => $users,\n 'baseViewRoute' => $this->owner->getBaseViewRoute()\n ])->send();\n }",
"function notifyRecipient()\n {\n //init notification key's message\n $this->initMessageKeys();\n \n $this->initFieldKeys(true);\n $this->initHeaderKeys();\n return $this->sendMessage();\n }",
"public function notifyUsers(Notification $notification, NotifiableUser ...$users): void;",
"public function sendNow($notifiables, $notification);",
"public function notify_email($type){\n\t\t// get team leader/supervisor/approver\n\t\tif($type == 'endorsers'){\n\t\t\t$person = DB::table('team')\n\t\t\t\t->join('users', 'team.team_id', '=', 'users.team_id')\n\t\t\t\t->where('users.team_id', \\Auth::user()->team_id)\n\t\t\t\t->where(function ($query) {\n\t\t\t\t\t\t$query->orWhere('users.type_id', 3)\n\t\t\t\t\t\t\t->orWhere('users.type_id', 4)\n\t\t\t\t\t\t\t->orWhere('users.type_id', 6);\n\t\t\t\t\t})\n\t\t\t\t->get();\n\t\t}\n\t\telseif($type == 'head'){\n\t\t\t$person = DB::table('users')\n\t\t\t\t\t->where('type_id', 1)\n\t\t\t\t\t->get();\n\t\t}\n\t\t\t\t\n\t\tforeach($person as $person){\t\n\t\t\ttry{\n\t\t\t\t$email = $person->email;\n\t\t\t\t$content = \"Good day!\\r\\nThis is to notify you that \".\\Auth::user()->name.\" has filed an official business request.\";\n\t\t\t\t$data = [\n\t\t\t\t 'email' => $email,\n\t\t\t\t 'subject' => 'eUP - Official Business Request',\n\t\t\t\t 'content' => $content\n\t\t\t\t];\n\t\t\t\tMail::send(\"emails.approval\", $data, function ($message) use ($data){\t\n\t\t\t\t\t$message->from('[email protected]', 'Do not reply to this email');\n\t\t\t\t\t$message->to($data['email']);\n\t\t\t\t\t$message->subject($data['subject']);\n\t\t\t\t});\t\t\t\n\t\t\t}\n\t\t\tcatch (\\Exception $e){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}",
"public static function send_test_notification() {\n if(!current_user_can('edit_plugins')) {\n return new \\WP_REST_Response('Not Authorized', 403);\n }\n\n $emails_list = $_POST['emails'];\n $emails_validation = self::validate_emails_string($emails_list);\n $status_message = \"\";\n $error = false;\n\n $emails_plural_affix = (count($emails_validation[\"all\"]) > 1) ? \"s\" : \"\";\n\n\n if($emails_validation[\"valid\"]) {\n $sending_status = \\WatsonConv\\Email_Notificator::send_summary_notification(true, $emails_list);\n\n if($sending_status === true) {\n $status_message = \"Email{$emails_plural_affix} successfully sent\";\n }\n else if(is_array($sending_status)) {\n $error = true;\n $status_message = \"Errors while sending email{$emails_plural_affix}: \" . implode(\", \", $sending_status) . \". Please check your settings on \\\"Email Settings\\\" tab.\";\n }\n }\n else if(!$emails_validation[\"valid\"]) {\n $error = true;\n if( count($emails_validation[\"all\"]) == 0 ) {\n $status_message = \"No email addresses\";\n }\n else {\n $malformed_emails = $emails_validation[\"malformed\"];\n $address_wording = (count($malformed_emails) == 1) ? \"This address is\" : \"These addresses are\";\n $incorrect_addresses = implode(\", \", $malformed_emails);\n $status_message = \"{$address_wording} not correct: {$incorrect_addresses}. Please use valid format for email (e.g. [email protected]).\";\n }\n }\n\n return self::render_test_notification_status($status_message, $error);\n }",
"static function resendNotification($params)\n{\n\t$con =$params['dbconnection'];\t\n\t $query = \"SELECT \n\t*\n\tFROM `notifications`\n\tWHERE `id`='{$params['id']}' \";\n\t$result = mysqli_query($con,$query) ;\n\tif (mysqli_error($con) != '')\n\treturn \"mysql_Error:-\".mysqli_error($con);\n\tif (mysqli_num_rows($result) > 0)\n\t\t{\n\t\t\t$row = mysqli_fetch_assoc($result);\t\n\t\t\t$params['title']=$row['title'];\n\t\t\t$params['message']=$row['message'];\n\t\t\t$params['send_to']=$row['send_to'];\n\t\t\t$params['type']='8';\n\t\t\t\n\t\t\t//DbMethods::sendNotification($params);\n\t\t\treturn DbMethods::generateNotification($params);\n\t\t}\n\t\n}",
"public function addnotifyer($users = array(),$user_id,$type){\n try{\n //check if type is publisher add user array id as publisher\n if($type === 'publishers' ){\n //get all user id from array and add as publisher\n foreach($users as $value){\n $subscribers = array(\n 'user_id' => $user_id,\n 'publishers_id'=>$value,\n 'date_added' => date(\"Y-m-d H:i:s\", time()),\n 'date_modified' => date(\"Y-m-d H:i:s\", time())\n );\n $this->db->insert($type, $subscribers);\n }\n $user_email = $this->session->userdata('user')['email'];\n //set notification that user has added following publishers\n $this->set_notification($user_id,''.$user_email. ' has added his publishers');\n }\n //check if type is subscriber add user array id as subscriber\n else{\n //get all user id from array and add as subscriber\n foreach($users as $value){\n $subscribers = array(\n 'user_id' => $user_id,\n 'subscriber_id'=>$value,\n 'date_added' => date(\"Y-m-d H:i:s\", time()),\n 'date_modified' => date(\"Y-m-d H:i:s\", time())\n );\n $this->db->insert($type, $subscribers);\n }\n $user_email = $this->session->userdata('user')['email'];\n //set notification that user has added following subscriber\n $this->set_notification($user_id,''.$user_email. ' has added his subscribers');\n }\n return true;\n }catch (Exception $e) {\n\t\t\t\t//echo json_encode($e->getMessage());die;\n\t\t\t\tlog_message('error', json_encode($e->getMessage()));\n\t\t\t\tshow_error('Sorry, this is embarrassing. We are on working hard to get it back online.', 500);\n\t\t\t}\n }",
"public function notify($user_id, $user, $email, $phone, $item_id, $item, $title, $details, $type, $hash) {\n\t\t// register notification\n\t\t$not_data = array(\n\t\t\t'user_id' => $user_id,\n\t\t\t'nhash' => $hash,\n\t\t\t'item_id' => $item_id,\n\t\t\t'item' => $item,\n\t\t\t'new' => 1,\n\t\t\t'title' => $title,\n\t\t\t'details' => $details,\n\t\t\t'type' => $type,\n\t\t\t'reg_date' => date(fdate)\n\t\t);\n\t\t$not_ins = $this->create('ka_notify', $not_data);\n\t\tif($not_ins){\n\t\t\t// send email\n\t\t\tif($type == 'email'){\n\t\t\t\t$email_result = '';\n\t\t\t\t$from = app_email;\n\t\t\t\t$subject = $title;\n\t\t\t\t$name = app_name;\n\t\t\t\t$sub_head = $title.' Notification';\n\t\t\t\t\n\t\t\t\t$body = '\n\t\t\t\t\t<div class=\"mname\">Hi '.ucwords($user).',</div><br />You have new '.$title.' notification,<br /><br />\n\t\t\t\t\t'.$details.'<br /><br />\n\t\t\t\t\tWarm Regards.\n\t\t\t\t';\n\t\t\t\t\n\t\t\t\t$email_result = $this->send_email($email, $from, $subject, $body, $name, $sub_head);\n\t\t\t} else {\n\t\t\t\t// send sms\t\n\t\t\t}\n\t\t}\n\t}",
"public function processIpnNotifications()\n {\n $sale = SaleModel::applyIpnUnsent()->first();\n\n /*\n * Check for something to do\n */\n if (!$sale) {\n return;\n }\n\n $sale->is_ipn_sent = true;\n $sale->save();\n\n $this->ipnManager->sendIpn($sale);\n\n $this->logActivity(sprintf(\n 'Send IPN for sale #%s.',\n $sale->id\n ));\n }",
"private function new_user_notifyer($user_id,$users){\n try{\n $users_id = array();\n //get users array and implode\n foreach($users as $key => $value){\n $users_id[] = implode('',$users[$key]);\n }\n //insert subscribers\n foreach($users_id as $key => $value){\n $data = array(\n 'user_id' => $user_id,\n 'subscriber_id'=>$value,\n 'date_added' => date(\"Y-m-d H:i:s\", time()),\n 'date_modified' => date(\"Y-m-d H:i:s\", time())\n );\n $this->db->insert('subscribers', $data);\n }\n $user_email = $this->session->userdata('user')['email'];\n //set notification with below messgae\n $this->set_notification($user_id,''.$user_email. ' has added his subscribers');\n //insert publishers\n foreach($users_id as $key => $value){\n $data = array(\n 'user_id' => $user_id,\n 'publishers_id'=>$value,\n 'date_added' => date(\"Y-m-d H:i:s\", time()),\n 'date_modified' => date(\"Y-m-d H:i:s\", time())\n );\n $this->db->insert('publishers', $data);\n }\n //set notification with below messgae\n $this->set_notification($user_id,''.$user_email. ' has added his publisher');\n }catch (Exception $e) {\n\t\t\t\t//echo json_encode($e->getMessage());die;\n\t\t\t\tlog_message('error', json_encode($e->getMessage()));\n\t\t\t\tshow_error('Sorry, this is embarrassing. We are on working hard to get it back online.', 500);\n\t\t\t}\n }",
"public function notifyMultiple($ids, $message, $emailSubject = null)\n {\n if (is_array($ids))\n {\n // Select all the users\n $statement = $this->_conn->query('SELECT `phone`, `email`, `preferredContact` FROM `AUTH_Users` WHERE `user_id` IN (' . $this->_conn->quote(implode(',', $ids)) . ')');\n $results = $statement->fetchAll();\n foreach ($results as $row)\n {\n $this->execute($row, $message, $emailSubject); // For each, pass on to the logic function\n }\n } else\n {\n if (is_int($ids))\n { // Provide som helpful hints if it looks like they want the other notification function\n throw new SMNDeliveryError('Please use and array of database user row ids. If you want to notify one user, please user SMNotifier.notify() instead.', 11);\n } else\n { // Otherwise just throw an excpetion\n throw new SMNDeliveryError('Please use an array of database user row ids.', 11);\n }\n }\n }",
"public function sendEmailNotifications($tpl, array $vars)\n\t{\n\t\t$notify_list = $this->getNotifyList();\n\n\t\tif (!$notify_list['email']) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach\t($notify_list['email'] as $agent) {\n\t\t\t$message = App::getMailer()->createMessage();\n\t\t\t$message->setTemplate($tpl, $vars);\n\t\t\t$message->setToPerson($agent);\n\t\t\t$message->setFrom(App::getSetting('core.default_from_email'), App::getSetting('core.deskpro_name'));\n\t\t\tApp::getMailer()->send($message);\n\t\t}\n\t}",
"static public function email_notify( $message_text, $short_text = false ) {\n global $wpdb;\n\n //** Try to get custom WPP email. If not, the default admin_email will work. */\n if( !$notification_email = $wpdb->get_var( \"SELECT option_value FROM {$wpdb->options} WHERE option_name = 'wpp_importer_cron_email'\" ) ) {\n $notification_email = $wpdb->get_var( \"SELECT option_value FROM {$wpdb->options} WHERE option_name = 'admin_email'\" );\n }\n\n //** Need to get the domain from, DB since $_SERVER is not available in cron */\n $siteurl = $wpdb->get_var( \"SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl'\" );\n $domain = parse_url( $siteurl, PHP_URL_HOST );\n\n $subject = 'Update from XML Importer' . ( $short_text ? ': ' . $short_text : '' );\n $headers = 'From: \"XML Importer\" <xml_importer@' . $domain . '>';\n\n //$message[] = \"Update from XML Importer:\\n\";\n $message[ ] = '<div style=\"font-size: 1.6em;margin-bottom: 5px;\">XML Importer: ' . $short_text . '</div><div style=\"font-size: 1em;color:#555555;\">' . $message_text . '</div>';\n\n add_filter( 'wp_mail_content_type', create_function( '', 'return \"text/html\";' ) );\n\n if( wp_mail( $notification_email, $subject, implode( '', $message ), $headers ) ) {\n return true;\n }\n\n return false;\n\n }",
"public function mailNotification(Request $request)\n\t{\n\t\t$emails = json_decode($request->mail);\n\t\t$data = (object) $request->all();\n\n\t\t\tforeach ($emails as $email)\n\t\t\t{\n\t\t\t\tNotification::route('mail',$email)\n\t\t\t\t->notify(new ReportCredentials( $data ));\n\t\t\t}\n\n\t}"
] | [
"0.6673765",
"0.610733",
"0.5989131",
"0.59834534",
"0.5966017",
"0.5917493",
"0.58762753",
"0.5848538",
"0.5845026",
"0.57785326",
"0.5754235",
"0.5752615",
"0.5745325",
"0.56853914",
"0.5679828",
"0.567755",
"0.56475043",
"0.56379414",
"0.56103665",
"0.5600758",
"0.5581927",
"0.5576063",
"0.55304503",
"0.55200195",
"0.55199325",
"0.5504952",
"0.5489396",
"0.54888916",
"0.5488699",
"0.54831904"
] | 0.8026482 | 0 |
Saves the hidden columns for response browsing in the session | public function setHiddenColumns($iSurveyId)
{
if(Permission::model()->hasSurveyPermission($iSurveyId,'responses','read'))
{
$aHiddenFields=explode('|',Yii::app()->request->getPost('aHiddenFields'));
$_SESSION['survey_'.$iSurveyId]['HiddenFields']=$aHiddenFields;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveDataToSession()\n {\n $data = $this->getData();\n unset($data['AccountInfo']);\n unset($data['LoginDetails']);\n unset($data['LoggedInAsNote']);\n unset($data['PasswordCheck1']);\n unset($data['PasswordCheck2']);\n Session::set(\"FormInfo.{$this->FormName()}.data\", $data);\n }",
"private function saveVisibilitySettings() {\n if (isset($_POST['vs_show_csv'])) {\n variable_set('visualscience_show_csv_button', 1);\n }\n else {\n variable_set('visualscience_show_csv_button', 0);\n }\n if (isset($_POST['vs_show_messages'])) {\n variable_set('visualscience_show_messages_button', 1);\n }\n else {\n variable_set('visualscience_show_messages_button', 0);\n }\n if (isset($_POST['vs_show_livingscience'])) {\n variable_set('visualscience_show_livingscience_button', 1);\n }\n else {\n variable_set('visualscience_show_livingscience_button', 0);\n }\n if (isset($_POST['vs_show_conference'])) {\n variable_set('visualscience_show_conference_button', 1);\n }\n else {\n variable_set('visualscience_show_conference_button', 0);\n }\n }",
"public function saveState()\n {\n if (Session::has('sidebarState')) {\n Session::remove('sidebarState');\n } else {\n //colapse sidebar\n Session::put('sidebarState', 'sidebar-collapse');\n }\n }",
"public function addHiddenSentValue() {\n\t\t$this->addHiddenSent = true;\n\t}",
"function SaveView(){\n $wpm_current_user=wp_get_current_user();\n if(!session_id()){\n session_start();\n }\n if($wpm_current_user->caps['administrator']){\n if(isset($_POST['frmsubmit'])){\n $show_level = isset($_POST['show_level']) ? $_POST['show_level']:$_GET['show_level'];\n $show_post = isset($_POST['show_post']) ? $_POST['show_post']:$_GET['show_post'];\n $_SESSION['wlcceshowlevel'] = $show_level;\n $_SESSION['wlcceshowpost'] = $show_post;\n }\n }else{\n if(session_id()){\n session_destroy();\n }\n }\n }",
"function preserve_table_data()\r\n\t{\r\n\t\t$_SESSION['invoice']['qtys'] = $_POST['qtys'];\r\n\t}",
"private function saveDataToSession()\r\n\t{\r\n\t\t$this->session->set('save_data_to_session', true, 'easyfrontendseo');\r\n\r\n\t\tif($this->request->get('delete'))\r\n\t\t{\r\n\t\t\t$this->session->set('delete', $this->request->get('delete'), 'easyfrontendseo');\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif($this->request->get('title', '', 'STRING'))\r\n\t\t{\r\n\t\t\t$this->session->set('title', $this->request->get('title', '', 'STRING'), 'easyfrontendseo');\r\n\t\t}\r\n\r\n\t\tif($this->request->get('description', '', 'STRING'))\r\n\t\t{\r\n\t\t\t$this->session->set('description', stripslashes(preg_replace('@\\s+(\\r\\n|\\r|\\n)@', ' ', $this->request->get('description', '', 'STRING'))), 'easyfrontendseo');\r\n\t\t}\r\n\r\n\t\tif($this->request->get('keywords', '', 'STRING'))\r\n\t\t{\r\n\t\t\t$this->session->set('keywords', $this->request->get('keywords', '', 'STRING'), 'easyfrontendseo');\r\n\t\t}\r\n\r\n\t\tif($this->request->get('generator', '', 'STRING'))\r\n\t\t{\r\n\t\t\t$this->session->set('generator', $this->request->get('generator', '', 'STRING'), 'easyfrontendseo');\r\n\t\t}\r\n\r\n\t\tif($this->request->get('robots', '', 'STRING'))\r\n\t\t{\r\n\t\t\t$this->session->set('robots', $this->request->get('robots', '', 'STRING'), 'easyfrontendseo');\r\n\t\t}\r\n\t}",
"function db_alt_tabellen_save()\n\t{\n\t\t$_SESSION['update']['db_alt_tabellen'] = $this->db_alt_tabellen;\n\t}",
"public function hiddenFields()\n\t{\n\n\t}",
"function update_hidden_cols($meta_id, $object_id, $meta_key, $meta_value ){\n global $frm_settings;\n\n if($meta_key != 'manage'. sanitize_title($frm_settings->menu) .'_page_formidable-entriescolumnshidden')\n return;\n \n global $frm_prev_hidden_cols;\n if(!$frm_prev_hidden_cols)\n return; //don't continue if there's no previous value\n \n foreach($meta_value as $mk => $mv){\n //remove blank values\n if(empty($mv))\n unset($meta_value[$mk]);\n }\n \n $cur_form_prefix = reset($meta_value);\n $cur_form_prefix = explode('_', $cur_form_prefix);\n $cur_form_prefix = $cur_form_prefix[0];\n $save = false;\n\n foreach($frm_prev_hidden_cols as $prev_hidden){\n if(empty($prev_hidden) or in_array($prev_hidden, $meta_value)) //don't add blank cols or process included cols\n continue;\n \n $form_prefix = explode('_', $prev_hidden);\n $form_prefix = $form_prefix[0];\n if($form_prefix == $cur_form_prefix) //don't add back columns that are meant to be hidden\n continue;\n \n $meta_value[] = $prev_hidden;\n $save = true;\n unset($form_prefix);\n }\n \n if($save){\n $user = wp_get_current_user();\n update_user_option($user->ID, 'manage'. sanitize_title($frm_settings->menu) .'_page_formidable-entriescolumnshidden', $meta_value, true);\n }\n }",
"public function save()\n {\n Yii::$app->session->set($this->skeyName, $this->_wiz);\n }",
"public function setHidden($hidden);",
"function update_session()\n{\n global $listcolumns, $showtv;\n \n if ($listcolumns) $_SESSION['vdb']['listcolumns'] = $listcolumns;\n if ($showtv) $_SESSION['vdb']['showtv'] = $showtv;\n}",
"private function set_session_values() {\n\t\t$step =& $this->_steps[$this->_current_step];\n\t\tif(!$step->get_is_summary()) {\n\t\t\t$_SESSION[\"wizard\"][$step->get_name()] = $step->get_form_values();\n\t\t}\n\t}",
"function sethiddenform($hiddenform) {\n\t\t$this->hiddenform[]=$hiddenform;\n\t}",
"public function hide() {\n\t\t$hidden = new Model_Hidden();\n\t\t$hidden->entity = $this;\n\t\t$hidden->user = Model_User::me();\n\t\ttry {\n\t\t\t$hidden->save();\n\t\t} catch (Exception $e) {\n\t\t}\n\n\t}",
"public function get_hidden_columns(){\n\t\treturn array();\n\t}",
"private function inputHidden()\n {\n ?>\n <input type=\"hidden\" name=\"_token\" value=\"<?= $this->key_csfr ?>\"/>\n <?php\n }",
"private function initHiddenFields(): void\n\t{\n\t\tif ($this->propertyType === PropertyTable::TYPE_ELEMENT)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'SEARCHABLE';\n\t\t\t$this->hiddenFields[] = 'WITH_DESCRIPTION';\n\t\t\t$this->hiddenFields[] = 'COL_COUNT';\n\t\t\t$this->hiddenFields[] = 'DEFAULT_VALUE';\n\t\t}\n\t\telseif ($this->propertyType === PropertyTable::TYPE_SECTION)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'SEARCHABLE';\n\t\t\t$this->hiddenFields[] = 'WITH_DESCRIPTION';\n\t\t\t$this->hiddenFields[] = 'COL_COUNT';\n\t\t\t$this->hiddenFields[] = 'DEFAULT_VALUE';\n\t\t}\n\t\telseif ($this->propertyType === PropertyTable::TYPE_LIST)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'WITH_DESCRIPTION';\n\t\t\t$this->hiddenFields[] = 'MULTIPLE_CNT';\n\t\t\t$this->hiddenFields[] = 'COL_COUNT';\n\t\t\t$this->hiddenFields[] = 'DEFAULT_VALUE';\n\t\t}\n\t\telseif ($this->propertyType === PropertyTable::TYPE_FILE)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'FILTERABLE';\n\t\t\t$this->hiddenFields[] = 'MULTIPLE_CNT';\n\t\t\t$this->hiddenFields[] = 'SMART_FILTER';\n\t\t\t$this->hiddenFields[] = 'DISPLAY_TYPE';\n\t\t\t$this->hiddenFields[] = 'DISPLAY_EXPANDED';\n\t\t\t$this->hiddenFields[] = 'FILTER_HINT';\n\t\t\t$this->hiddenFields[] = 'DEFAULT_VALUE';\n\t\t\t$this->hiddenFields[] = 'ROW_COUNT';\n\t\t}\n\t\telseif ($this->userType === PropertyTable::USER_TYPE_HTML)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'MULTIPLE';\n\t\t}\n\n\t\t// hidden for NOT need type\n\n\t\tif ($this->propertyType !== PropertyTable::TYPE_LIST)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'LIST_TYPE';\n\t\t}\n\n\t\tif ($this->propertyType !== PropertyTable::TYPE_FILE)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'FILE_TYPE';\n\t\t}\n\n\t\tif (\n\t\t\t!in_array($this->propertyType, [PropertyTable::TYPE_SECTION, PropertyTable::TYPE_ELEMENT], true)\n\t\t\t&& $this->userType !== PropertyTable::USER_TYPE_SKU\n\t\t)\n\t\t{\n\t\t\t$this->hiddenFields[] = 'LINK_IBLOCK_ID';\n\t\t}\n\t}",
"public function print_serialized_hidden_form() {\n\t\tforeach($this->_values as $k => $v) {\n\t\t\tif(!is_string($v)) continue;\n\t\t\tprintf(\"\\t<input type='hidden' name='%s' value='%s'>\\n\", $k, htmlentities($v, ENT_QUOTES | ENT_HTML401));\n\t\t}\n\t}",
"private static function saveInSession(){\n\tSession::put('helpers', serialize(self::$helpers));\n }",
"public static function save()\n {\n session_write_close();\n }",
"public function save() {\n if(php_sapi_name() != \"cli\" || $_SESSION[self::SESSION_NAMESPACE])\n {\n $key = self::SESSION_KEY_CUSTOM_ITEMS;\n $this->session->$key = $this->customItems;\n\n $key = self::SESSION_KEY_USERID;\n $this->session->$key = $this->userId;\n\n $key = self::SESSION_KEY_ASSORTMENT_TENANT;\n $this->session->$key = $this->currentAssortmentTenant;\n\n $key = self::SESSION_KEY_ASSORTMENT_SUB_TENANT;\n $this->session->$key = $this->currentAssortmentSubTenant;\n\n $key = self::SESSION_KEY_CHECKOUT_TENANT;\n $this->session->$key = $this->currentCheckoutTenant;\n\n $key = self::SESSION_KEY_USE_GUEST_CART;\n $this->session->$key = $this->useGuestCart;\n }\n }",
"function save() {\n\t\tforeach($this->dic_list as $dic) {\n\t\t if (Z::c()->selectCell(\"SELECT count(*) FROM t_dic WHERE fidx_path = ?\", $dic[\"idx_path\"])) continue;\n\t\t $tmp = array(\n\t\t\t\t\"fstate_id\" => 1,\n\t\t\t\t\"fidx_path\" => $dic[\"idx_path\"],\n\t\t\t\t\"fdict_path\" => $dic[\"dict_path\"],\n\t\t\t\t\"fversion\" => $dic[\"version\"],\n\t\t\t\t\"fwordcount\" => $dic[\"wordcount\"],\n\t\t\t\t\"fidxfilesize\" => $dic[\"idxfilesize\"],\n\t\t\t\t\"fbookname\" => $dic[\"bookname\"],\n\t\t\t\t\"fdate\" => $dic[\"date\"],\n\t\t\t\t\"fsts\" => $dic[\"sametypesequence\"],\n\t\t\t\t\"fdescription\" => $dic[\"description\"],\n\t\t\t\t\"ferror\" => $dic[\"error\"],\n\t\t );\n\n\t\t # Set error state\n\t\t if ($tmp[\"ferror\"]) $tmp[\"fstate_id\"] = -1;\n\t\t \n\t\t\tZ::c()->query(\"INSERT INTO t_dic (?#) VALUES (?a)\", array_keys($tmp), array_values($tmp));\n\t\t}\n }",
"function add_hidden_fields($data) \n {\n\tforeach ($this->all_fields as $f) {\n\t\tif (!in_array($f,$this->fields,TRUE)) {\n\t\t\tif (isset($data[$f])) echo \"\\n<input type='hidden' name='$f' value='\".$data[$f].\"'>\";\n\t\t}\n\t}\n }",
"private function setMensagens() {\n if (isset($_SESSION['erro'])) {\n $this->dadosView['erro'] = $_SESSION['erro'];\n unset($_SESSION['erro']);\n }\n\n if (isset($_SESSION['sucesso'])) {\n $this->dadosView['sucesso'] = $_SESSION['sucesso'];\n unset($_SESSION['sucesso']);\n }\n\n if (isset($_SESSION['info'])) {\n $this->dadosView['info'] = $_SESSION['info'];\n unset($_SESSION['info']);\n }\n }",
"protected function saveData()\n {\n $data = [];\n\n foreach ($this->fields as $field => $options) {\n if ($options['flash']) {\n $data[$field] = $this->data($field, '', false);\n }\n }\n\n $this->flash->set(self::FLASH_KEY_DATA, $data);\n }",
"public function transactionFormGetHiddenFields ()\n {\n return false;\n }",
"public function saveStateToSession() {\n $_SESSION['secretWord'] = $this->secretWord;\n $_SESSION['guessedCharacters'] = $this->guessedCharacters;\n $_SESSION['isFinished'] = $this->isFinished;\n $_SESSION['lives'] = $this->player->livesLeft();\n }",
"public function saveFavoritePaintings() {\n $_SESSION['favoritePaintings'] = $this->favoritePaintings;\n }"
] | [
"0.6260627",
"0.60255766",
"0.577858",
"0.5771444",
"0.57565165",
"0.5737342",
"0.5713388",
"0.5705894",
"0.56880796",
"0.56325406",
"0.5620632",
"0.55967134",
"0.5574418",
"0.55139565",
"0.54523885",
"0.5449633",
"0.5448073",
"0.5426401",
"0.5407071",
"0.54025924",
"0.5399237",
"0.53768486",
"0.5363866",
"0.5353198",
"0.53450936",
"0.534351",
"0.532966",
"0.53167176",
"0.53025544",
"0.52819717"
] | 0.63119173 | 0 |
Supply an array with the responseIds and all files will be added to the zip and it will be be spit out on success | private function _zipFiles($iSurveyID, $responseIds, $zipfilename)
{
/**
* @todo Move this to model.
*/
Yii::app()->loadLibrary('admin/pclzip');
$tmpdir = Yii::app()->getConfig('uploaddir') . DIRECTORY_SEPARATOR."surveys". DIRECTORY_SEPARATOR . $iSurveyID . DIRECTORY_SEPARATOR."files".DIRECTORY_SEPARATOR;
$filelist = array();
$responses = Response::model($iSurveyID)->findAllByPk($responseIds);
$filecount = 0;
foreach ($responses as $response)
{
foreach ($response->getFiles() as $file)
{
$filecount++;
/*
* Now add the file to the archive, prefix files with responseid_index to keep them
* unique. This way we can have 234_1_image1.gif, 234_2_image1.gif as it could be
* files from a different source with the same name.
*/
if (file_exists($tmpdir . basename($file['filename'])))
{
$filelist[] = array(PCLZIP_ATT_FILE_NAME => $tmpdir . basename($file['filename']),
PCLZIP_ATT_FILE_NEW_FULL_NAME => sprintf("%05s_%02s_%s", $response->id, $filecount, sanitize_filename(rawurldecode($file['name']))));
}
}
}
if (count($filelist) > 0)
{
$zip = new PclZip($tmpdir . $zipfilename);
if ($zip->create($filelist) === 0)
{
//Oops something has gone wrong!
}
if (file_exists($tmpdir . '/' . $zipfilename))
{
@ob_clean();
header('Content-Description: File Transfer');
header('Content-Type: application/zip, application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($zipfilename));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($tmpdir . "/" . $zipfilename));
readfile($tmpdir . '/' . $zipfilename);
unlink($tmpdir . '/' . $zipfilename);
exit;
}
}
// No files : redirect to browse with a alert
Yii::app()->setFlashMessage(gT("Sorry, there are no files for this response."),'error');
$this->getController()->redirect(array("admin/responses","sa"=>"browse","surveyid"=>$iSurveyID));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function downloadall($id){\n$dir = 'uploads/PR/'.$id.'/';\n$archive = 'download_PR.zip';\n\n\n\n\n$zip = new ZipArchive;\n$zip->open($archive, ZipArchive::CREATE);\n$files = scandir($dir);\nunset($files[0], $files[1]);\nforeach ($files as $file) {\n$zip->addFile($dir.''.$file);\n}\n$zip->close();\n\nheader('Content-Type: application/zip');\nheader('Content-disposition: attachment; filename='.$archive);\nheader('Content-Length: '.filesize($archive));\nreadfile($archive);\nunlink($archive);\n\n\n }",
"public function actionDownloadfiles($iSurveyId,$sResponseId)\n {\n if(Permission::model()->hasSurveyPermission($iSurveyId,'responses','read'))\n {\n if(!$sResponseId) // No response id : get all survey files\n {\n $oCriteria = new CDbCriteria();\n $oCriteria->select = \"id\";\n $oSurvey = SurveyDynamic::model($iSurveyId);\n $aResponseId = $oSurvey->getCommandBuilder()\n ->createFindCommand($oSurvey->tableSchema, $oCriteria)\n ->queryColumn();\n }\n else\n {\n $aResponseId=explode(\",\",$sResponseId);\n }\n if(!empty($aResponseId))\n {\n // Now, zip all the files in the filelist\n if(count($aResponseId)==1)\n $zipfilename = \"Files_for_survey_{$iSurveyId}_response_{$aResponseId[0]}.zip\";\n else\n $zipfilename = \"Files_for_survey_{$iSurveyId}.zip\";\n\n $this->_zipFiles($iSurveyId, $aResponseId, $zipfilename);\n }\n else\n {\n // No response : redirect to browse with a alert\n Yii::app()->setFlashMessage(gT(\"The requested files do not exist on the server.\"),'error');\n $this->getController()->redirect(array(\"admin/responses\",\"sa\"=>\"browse\",\"surveyid\"=>$iSurveyId));\n }\n }\n }",
"function zip_files($files, $output) {\n // Initialize archive object\n $zip = new \\ZipArchive();\n $zip->open($output, \\ZipArchive::CREATE | \\ZipArchive::OVERWRITE);\n\n foreach ($files as $index => $file)\n {\n\t\t// Add current file to archive\n\t\t$zip->addFile($file, \\sprintf('/page%s.pdf', str_pad($index, 3, '0', STR_PAD_LEFT)));\n }\n\n // Zip archive will be created only after closing object\n $zip->close();\n}",
"function downloadMultipleFiles($a_exc_id, $a_ass_id, $array_filenames,\n\t\t$a_user_id, $a_multi_user = false)\n\t{\n\t\tglobal $lng, $ilObjDataCache;\n\t\t\n\t\tif(!$a_multi_user)\n\t\t{\n\t\t\t$array_filenames = array($a_user_id => $array_filenames);\n\t\t}\n\t\t\n\t\tinclude_once(\"./Modules/Exercise/classes/class.ilFSStorageExercise.php\");\n\t\t$fs = new ilFSStorageExercise($a_exc_id, $a_ass_id);\n\t\t\n\t\trequire_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$cdir = getcwd();\n\n\t\t$zip = PATH_TO_ZIP;\n\t\t$tmpdir = ilUtil::ilTempnam();\n\t\t$tmpfile = ilUtil::ilTempnam();\n\t\t$tmpzipfile = $tmpfile . \".zip\";\n\n\t\tilUtil::makeDir($tmpdir);\n\t\tchdir($tmpdir);\n\n\t\t$assTitle = ilExAssignment::lookupTitle($a_ass_id);\n\t\t$deliverFilename = str_replace(\" \", \"_\", $assTitle);\n\t\tif ($a_user_id > 0 && !$a_multi_user)\n\t\t{\n\t\t\t$userName = ilObjUser::_lookupName($a_user_id);\n\t\t\t$deliverFilename .= \"_\".$userName[\"lastname\"].\"_\".$userName[\"firstname\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$deliverFilename .= \"_files\";\n\t\t}\n\t\t$orgDeliverFilename = trim($deliverFilename);\n\t\t$deliverFilename = ilUtil::getASCIIFilename($orgDeliverFilename);\n\t\tilUtil::makeDir($tmpdir.\"/\".$deliverFilename);\n\t\tchdir($tmpdir.\"/\".$deliverFilename);\n\t\t\n\t\t//copy all files to a temporary directory and remove them afterwards\n\t\t$parsed_files = array();\n\t\tforeach ($array_filenames as $user_id => $files)\n\t\t{\n\t\t\t$pathname = $fs->getAbsoluteSubmissionPath().\"/\".$user_id;\n\n\t\t\tforeach($files as $filename)\n\t\t\t{\n\t\t\t\t// remove timestamp\n\t\t\t\t$newFilename = trim($filename);\n\t\t\t\t$pos = strpos($newFilename , \"_\");\n\t\t\t\tif ($pos === false)\n\t\t\t\t{\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$newFilename= substr($newFilename, $pos + 1);\n\t\t\t\t}\n\t\t\t\t$newFilename = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename.DIRECTORY_SEPARATOR.$newFilename;\n\t\t\t\t// copy to temporal directory\n\t\t\t\t$oldFilename = $pathname.DIRECTORY_SEPARATOR.$filename;\n\t\t\t\tif (!copy ($oldFilename, $newFilename))\n\t\t\t\t{\n\t\t\t\t\techo 'Could not copy '.$oldFilename.' to '.$newFilename;\n\t\t\t\t}\n\t\t\t\ttouch($newFilename, filectime($oldFilename));\n\t\t\t\t$parsed_files[] = ilUtil::escapeShellArg($deliverFilename.DIRECTORY_SEPARATOR.basename($newFilename)); \n\t\t\t}\n\t\t}\t\t\t\t\n\t\t\n\t\tchdir($tmpdir);\n\t\t$zipcmd = $zip.\" \".ilUtil::escapeShellArg($tmpzipfile).\" \".join($parsed_files, \" \");\n//echo getcwd().\"<br>\";\n//echo $zipcmd;\n\t\texec($zipcmd);\n\t\tilUtil::delDir($tmpdir);\n\t\t\n\t\tchdir($cdir);\n\t\tilUtil::deliverFile($tmpzipfile, $orgDeliverFilename.\".zip\", \"\", false, true);\n\t\texit;\n\t}",
"function downloadAllDeliveredFiles($a_exc_id, $a_ass_id, $members)\n\t{\n\t\tglobal $lng, $ilObjDataCache, $ilias;\n\t\t\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\tinclude_once(\"./Modules/Exercise/classes/class.ilFSStorageExercise.php\");\n\t\t\n\t\t$storage = new ilFSStorageExercise($a_exc_id, $a_ass_id);\n\t\t$storage->create();\n\t\t\n\t\tksort($members);\n\t\t//$savepath = $this->getExercisePath() . \"/\" . $this->obj_id . \"/\";\n\t\t$savepath = $storage->getAbsoluteSubmissionPath();\n\t\t$cdir = getcwd();\n\n\n\t\t// important check: if the directory does not exist\n\t\t// ILIAS stays in the current directory (echoing only a warning)\n\t\t// and the zip command below archives the whole ILIAS directory\n\t\t// (including the data directory) and sends a mega file to the user :-o\n\t\tif (!is_dir($savepath))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// Safe mode fix\n//\t\tchdir($this->getExercisePath());\n\t\tchdir($storage->getTempPath());\n\t\t$zip = PATH_TO_ZIP;\n\n\t\t// check first, if we have enough free disk space to copy all files to temporary directory\n\t\t$tmpdir = ilUtil::ilTempnam();\n\t\tilUtil::makeDir($tmpdir);\n\t\tchdir($tmpdir);\n\n\n\t\t$dirsize = 0;\n\t\tforeach ($members as $id => $object) {\n\t\t\t$directory = $savepath.DIRECTORY_SEPARATOR.$id;\n\t\t\t$dirsize += ilUtil::dirsize($directory);\n\t\t}\n\t\tif ($dirsize > disk_free_space($tmpdir)) {\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t$ass_type = self::lookupType($a_ass_id);\n\n\t\t// copy all member directories to the temporary folder\n\t\t// switch from id to member name and append the login if the member name is double\n\t\t// ensure that no illegal filenames will be created\n\t\t// remove timestamp from filename\n\t\t$cache = array();\n\t\tforeach ($members as $id => $user)\n\t\t{\n\t\t\t$sourcedir = $savepath.DIRECTORY_SEPARATOR.$id;\n\t\t\tif (!is_dir($sourcedir))\n\t\t\t\tcontinue;\n\t\t\t$userName = ilObjUser::_lookupName($id);\n\t\t\t$directory = ilUtil::getASCIIFilename(trim($userName[\"lastname\"]).\"_\".trim($userName[\"firstname\"]));\n\t\t\tif (array_key_exists($directory, $cache))\n\t\t\t{\n\t\t\t\t// first try is to append the login;\n\t\t\t\t$directory = ilUtil::getASCIIFilename($directory.\"_\".trim(ilObjUser::_lookupLogin($id)));\n\t\t\t\tif (array_key_exists($directory, $cache)) {\n\t\t\t\t\t// second and secure: append the user id as well.\n\t\t\t\t\t$directory .= \"_\".$id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cache[$directory] = $directory;\n\t\t\tilUtil::makeDir ($directory);\n\t\t\t$sourcefiles = scandir($sourcedir);\n\t\t\tforeach ($sourcefiles as $sourcefile) {\n\t\t\t\tif ($sourcefile == \".\" || $sourcefile == \"..\")\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$targetfile = trim(basename($sourcefile));\n\t\t\t\t$pos = strpos($targetfile, \"_\");\n\t\t\t\tif ($pos !== false)\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t$targetfile= substr($targetfile, $pos + 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$targetfile = $directory.DIRECTORY_SEPARATOR.$targetfile;\n\t\t\t\t$sourcefile = $sourcedir.DIRECTORY_SEPARATOR.$sourcefile;\n\n\t\t\t\tif (!copy ($sourcefile, $targetfile))\n\t\t\t\t{\n\t\t\t\t\t//echo 'Could not copy '.$sourcefile.' to '.$targetfile;\n\t\t\t\t\t$ilias->raiseError('Could not copy '.basename($sourcefile).\" to '\".$targetfile.\"'.\",\n\t\t\t\t\t\t$ilias->error_obj->MESSAGE);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// preserve time stamp\n\t\t\t\t\ttouch($targetfile, filectime($sourcefile));\n\t\t\t\t\t\n\t\t\t\t\t// blogs and portfolios are stored as zip and have to be unzipped\n\t\t\t\t\tif($ass_type == ilExAssignment::TYPE_PORTFOLIO || \n\t\t\t\t\t\t$ass_type == ilExAssignment::TYPE_BLOG)\n\t\t\t\t\t{\n\t\t\t\t\t\tilUtil::unzip($targetfile);\n\t\t\t\t\t\tunlink($targetfile);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t$tmpfile = ilUtil::ilTempnam();\n\t\t$tmpzipfile = $tmpfile . \".zip\";\n\t\t// Safe mode fix\n\t\t$zipcmd = $zip.\" -r \".ilUtil::escapeShellArg($tmpzipfile).\" .\";\n\t\texec($zipcmd);\n\t\tilUtil::delDir($tmpdir);\n\n\t\t$assTitle = ilExAssignment::lookupTitle($a_ass_id);\n\t\tchdir($cdir);\n\t\tilUtil::deliverFile($tmpzipfile, (strlen($assTitle) == 0\n\t\t\t? strtolower($lng->txt(\"exc_assignment\"))\n\t\t\t: $assTitle). \".zip\", \"\", false, true);\n\t}",
"function create_zip($files=array(), $file_name=\"\", $download=FALSE) {\n\t$zip = new ZipArchive();\n\n\t\t# create a temp file & open it\n\tif($download) {\n\t\t$tmp_file = tempnam('.', '');\n\t\t$zip->open($tmp_file, ZipArchive::CREATE);\n\t} else\n\t$zip->open('assets/report/zip/'.$file_name.'.zip', ZipArchive::CREATE);\n\n\t\t# loop through each file\n\tforeach ($files as $file) {\n\t\t # download file\n\t\t$download_file = file_get_contents($file);\n\t\t\n\t\t #add it to the zip\n\t\t$zip->addFromString(basename($file), $download_file);\n\t}\n\n\t\t# close zip\n\t$zip->close();\n\n\t\t# send the file to the browser as a download\n\tif($download) {\n\t\theader('Content-disposition: attachment; filename=\"'.$file_name.'.zip\"');\n\t\theader('Content-type: application/zip');\n\t\treadfile($tmp_file);\n\t\tunlink($tmp_file);\n\t} else return array(\"status\" => 1, \"msg\" => \"Pembuatan file zip berhasil\");\n\n}",
"function pewc_create_zip( $files = array(), $folder_name='', $overwrite=false, $order_id=false ) {\n\t// if the zip file already exists and overwrite is false, return false\n\tif( file_exists( $folder_name ) && ! $overwrite) {\n\t\t// return false;\n\t}\n\n\t$valid_files = array();\n\t//if files were passed in...\n\tif(is_array($files)) {\n\t\t//cycle through each file\n\t\tforeach($files as $file) {\n\t\t\t//make sure the file exists\n\n\t\t\tif(file_exists($file)) {\n\t\t\t\t$valid_files[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\n\t//if we have good files...\n\tif( count( $valid_files ) ) {\n\t\t//create the archive\n\t\t$zip = new ZipArchive();\n\t\tif( $zip->open( $folder_name . '.zip', $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true ) {\n\t\t\treturn false;\n\t\t}\n\t\t//add the files\n\t\tforeach($valid_files as $file) {\n\n\t\t\t$info = pathinfo( $file );\n\t\t\t$ext = isset( $info['extension'] ) && ! empty( $info['extension'] ) ? '.'. $info['extension'] : '';\n\t\t\t$basename = basename( $file, $ext );\n\t\t\t$zip->addFile( $file, trailingslashit( 'uploads-' . $order_id ) . $basename . $ext );\n\t\t}\n\t\t//debug\n\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n\n\t\t//close the zip -- done!\n\t\t$zip->close();\n\n\t\t//check to make sure the file exists\n\t\treturn file_exists( $folder_name . '.zip' );\n\t}\n\telse {\n\t\treturn false;\n\t}\n}",
"public function extract_zip($zip_files){\t\t\n\t\tif(extension_loaded('zip'))\t{ \n\t\t\t$zip_path = 'uploads/download/';\n\t\t\t// Checking files are selected\n\t\t\t$zip = new ZipArchive(); // Load zip library \n\t\t\t$zip_name = time().'.zip'; // Zip name\n\t\t\tif($zip->open($zip_path.$zip_name, ZIPARCHIVE::CREATE) !== TRUE){ \n\t\t\t // Opening zip file to load files\n\t\t\t\t$error .= '* Sorry ZIP creation failed at this time';\n\t\t\t}\n\t\t\tforeach($zip_files as $file){ \n\t\t\t\t$zip->addFile($file,basename($file)); // Adding files into zip\n\t\t\t}\n\t\t\t$zip->close();\n\t\t\tif(file_exists($zip_path.$zip_name)){\n\t\t\t\t// push to download the zip\n\t\t\t\theader('Content-type: application/zip');\n\t\t\t\theader('Content-Disposition: attachment; filename=\"'.$zip_name.'\"');\n\t\t\t\treadfile($zip_path.$zip_name);\n\t\t\t\t// remove zip file is exists in temp path\n\t\t\t\tunlink($zip_path.$zip_name);\n\t\t\t}else{\n\t\t\t\t$error .= 'File not exists';\n\t\t\t}\n\n\t\t}\t\t\n\t\telse{\n\t\t\t$error .= '* You dont have ZIP extension';\n\t\t}\n\t\t\n\t\techo $error;\n\t\t\n\t}",
"public function getSolrFilesAsZip(string $server_id) {\n $files = $this->getSolrFiles($server_id);\n $temp_dir =\n FileSystem::getOsTemporaryDirectory() .\n DIRECTORY_SEPARATOR .\n uniqid('search_api_pantheon-');\n $zip_archive = new \\ZipArchive();\n $zip_archive->open($temp_dir . '.zip', \\ZipArchive::CREATE);\n foreach ($files as $filename => $file_contents) {\n $zip_archive->addFromString($filename, $file_contents);\n }\n $zip_archive->close();\n return $temp_dir . '.zip';\n }",
"function zipFilesAndDownload($file_names,$archive_file_name,$file_path){\n\t\t$zip = new ZipArchive();\n\t\t//create the file and throw the error if unsuccessful\n\t\tif ($zip->open($archive_file_name, ZIPARCHIVE::CREATE )!==TRUE) {\n\t\t\texit(\"cannot open <$archive_file_name>\\n\");\n\t\t}\n\t\t//add each files of $file_name array to archive\n\t\tforeach((array)$file_names as $files) {\n\t\t\t$zip->addFile($file_path.$files,$files); \n\t\t}\n\t\t$zip->close();\n\t\t$zipped_size = filesize($archive_file_name);\n\t\theader(\"Content-Description: File Transfer\");\n\t\theader(\"Content-type: application/zip\"); \n\t\theader(\"Content-Type: application/force-download\");// some browsers need this\n\t\theader(\"Content-Disposition: attachment; filename=\\\"\" . basename($archive_file_name) . \"\\\"\");\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Pragma: public');\n\t\theader(\"Content-Length:\". \" $zipped_size\");\n\t\tob_clean();\n\t\tflush();\n\t\treadfile(\"$archive_file_name\");\n\t\tunlink(\"$archive_file_name\"); // Now delete the temp file (some servers need this option)\n\t\texit; \n\t}",
"public function download_all(Request $request, $project_id)\n {\n $project = Project::findOrFail($project_id);\n $this->authorize('user_contribute_to_project', $project);\n $assets = Asset::pimp()->where('project_id', $project_id)->get();\n\n $zip_name = uniqid();\n $zip_path = storage_path(\"app/arhive/{$zip_name}\");\n $zip = new \\ZipArchive();\n if ($zip->open($zip_path, \\ZipArchive::CREATE)) {\n foreach ($assets as $asset) {\n $path = storage_path(\"app/{$asset->path}\");\n $zip->addFile($path, $asset->name);\n }\n } else {\n return response()->json(['error' => 'Can\\'t make zip file']);\n }\n $zip->close();\n\n return response()->download($zip_path, $zip_name)->deleteFileAfterSend(true);;\n }",
"public function downloadFilesAsZipFile(Request $request){\n //setting the connection to azure storage\n $connectionString = $this->getTheConnection();\n $blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);\n $directory_name = session()->get('id');\n\n //set the getting listing files option \"Setting the prefixes is the point\", session + \"out\"\n $listBlobsOptions=new ListBlobsOptions();\n $listBlobsOptions->setPrefix($directory_name.\"out_testing/\");\n\n //Spesfi the Azure container and get the list options you have setting\n $blobs=$blobRestProxy->listBlobs(\"convertimage-2017-03-29t08-13-29-590z\",$listBlobsOptions);\n\n //Start create the Zip file to upload files in it\n $zip=new ZipArchive();\n $zipName=$directory_name.'.zip';\n $zip->open($zipName,ZipArchive::CREATE);\n\n //To get the blob its self and create zip file to keep it in !!\n foreach ($blobs->getBlobs() as $k=>$blob){\n $url = str_replace(\" \", \"%20\", $blob->getUrl());\n $zip->addFromString(basename($blob->getName()),file_get_contents($url));\n }\n $zip->close();\n try {\n // Set the header for downloading the zip file\n header('Content-Type: application/zip');\n header('Content-disposition: attachment; filename='.$zipName);\n header('Content-Length: ' . filesize($zipName));\n readfile($zipName);\n\n } catch (ServiceException $e) {\n $code = $e->getCode();\n $error_message = $e->getMessage();\n echo $code . \": \" . $error_message . \"<br />\";\n\n //Delete the converted files\n }\n\n\n }",
"function MyMod_Handle_Zip_Files_Add($zip,$files)\n {\n $paths=array();\n foreach ($files as $file)\n {\n $path=dirname($file);\n $paths[ $path ]=1;\n }\n\n $paths=array_keys($paths);\n $this->MyMod_Handle_Zip_Paths_Add($zip,$paths);\n \n foreach ($files as $file)\n {\n $zip->addFile($file);\n }\n }",
"public static function upload_and_unzip($zip = array(), $args = array())\n\t{\n $defaults = array(\n\t\t\t'folder' => '', //IMC_UPLOAD_FOLDER.'resources/stickers/',\n\t\t\t'path' => '',\n\t\t\t'src' => ''\n\t\t);\n $args = array_merge( $defaults, $args );\n\n\t\t$unzip_folder = $args['path'];\n\t\t$target_path = $args['path'].$zip['name'];\n\n\n\t\t$msg = __('No files received.','imc'); \n\t\t$response = array(\n\t\t\t'success' => false,\n\t\t\t'html' => $msg,\n 'url' => '',\n 'path' => '',\n\t\t\t'type' => 'zip'\n\t\t);\n\t\t$is_zip = 0;\n\t\t\n\t\tif( !empty($zip))\n\t\t{\n\t\t\t$name = explode('.', $zip['name']);\n\t\t\t$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed');\n\t\t\tforeach($accepted_types as $mime_type) {\n\t\t\t\tif($mime_type == $zip['type']) {\n\t\t\t\t\t//$okay = true;\n\t\t\t\t\t$is_zip = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t\t//rebuild folder name - fix for dots in name.\n\t\t\t$folder_name = '/';\n\t\t\tforeach($name as $i => $nm)\n\t\t\t{\n\t\t\t\t$dot = $i > 0 ? '.' : '';\n\t\t\t\t$folder_name .= strtolower($nm) != 'zip' ? $dot.$nm : '';\n\t\t\t\t$is_zip = strtolower($nm) == 'zip' ? 1 : $is_zip;\n\t\t\t}\n\t\t\t\n\t\t\t// Check if file is zip file to continue.\n\t\t\t$continue = $is_zip ? true : false;\n\t\t\tif(!$continue) {\n\t\t\t\t$msg = __('The file you are trying to unzip is not a .zip file. Please try again.','imc');\n\t\t\t\t$response['html'] = $msg;\n\t\t\t\t\n\t\t\t\treturn $response;\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$zip = new ZipArchive();\n\t\t\tif ($zip->open($target_path) === true) {\t\t\t\n\t\t\t\tfor($i = 0; $i < $zip->numFiles; $i++) {\t\t\t\t\n\t\t\t\t\t$zip->extractTo($unzip_folder, array($zip->getNameIndex($i)));\t\t\t\t\n\t\t\t\t\t// here you can run a custom function for the particular extracted file\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$zip->close();\t\n\t\t\t\t//unlink($target_path);\t\t\t\n\t\t\t}\n\t\t\t$msg = __('Your .zip file was uploaded and unpacked:', 'imc');\n $response['html'] = $msg;\n $response['path'] = $unzip_folder.$folder_name;\n\t\t\t$response['success'] = true;\n\t\t\t\n\t\t\t// Check if we can find a index.html file\n\t\t\t$package_files = scandir($unzip_folder.$folder_name);\n\t\t\t$has_index = in_array('index.html', $package_files) ? 1 : 0;\n\n\t\t\tif( $has_index )\n\t\t\t{\n $msg.= ' '.$unzip_folder.$folder_name.'/index.html';\n $response['url'] = ADNI_UPLOAD_SRC.$args['folder'].$folder_name.'/index.html';\n\t\t\t\t$response['html'] = $msg;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$msg.= ' but we were unable to detect an index.html file. You will need to add the start file manually to the folder name. <strong>'.$unzip_folder.$folder_name.'/</strong>';\n\t\t\t\t$response['url'] = ADNI_UPLOAD_SRC.$args['folder'].$folder_name;\n\t\t\t\t$response['html'] = $msg;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $response;\n\t}",
"function zip_extract_file()\n{\n if (empty($_POST) === false) {\n $zipper = new Zipclass();\n $arrfile = $_POST['arrfile'];\n $arrfile = json_decode($arrfile);\n $root = $_SERVER['DOCUMENT_ROOT'] . '/';\n $location = $_POST['location'];\n $error_ck = false;\n $msg = '';\n if (empty($arrfile) === false && isset($arrfile) === true) {\n $error_ck = true;\n }\n if ($error_ck === true) {\n if (is_array($arrfile)) {\n foreach ($arrfile as $file) {\n if (file_exists($file)) {\n if ($zipper->zip_extract($file, $root . $location) === false) {\n echo 'Opss something is wrong!';\n } else {\n $msg = 'successfully';\n }\n }\n }\n }\n } else {\n echo 'Invalid location';\n }\n \n if (empty($msg) === false) {\n echo $msg;\n $msg = '';\n }\n }\n}",
"public function create_zip($files,$destination,$overwrite = false) {\n\n try{\n \n //if the zip file already exists and overwrite is false, return false\n if(file_exists($destination) && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n \n // //make sure the file exists\n if(file_exists($files)) {\n $valid_files[] = $files;\n }\n else\n {\n echo \"file is not found\";\n }\n\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true)\n {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile($file,\"db.sqlite\");\n }\n\n \n //close the zip -- done!\n $zip->close();\n\n //check to make sure the file exists\n return $destination;\n }\n catch(Exception $e) {\n return 'Message: '.$e->getMessage();\n }\n\n}",
"protected function _addFiles(array $files)\n {\n $addedFiles = array();\n foreach ($files AS $data) {\n if (is_readable($data['filename'])) {\n $this->getZip()->addFile($data['filename'], $data['localname']);\n $addedFiles[] = $data;\n } else {\n $this->addError('Unable to read file: '. $data['filename']);\n }\n }\n\n if (count($addedFiles) < 1) {\n return;\n }\n\n $files = $addedFiles;\n unset($addedFiles);\n\n $result = $this->getZip()->close();\n $this->getZip()->open($this->getLocation(), ZIPARCHIVE::CREATE);\n\n if ($result === false) {\n if (count($files) > 1) {\n $limit = pow(10, floor(log10(count($files))) - 1); //force $limit to be a power of 10\n $limit = max($limit, 1);\n foreach (array_chunk($files, $limit) AS $data) {\n $this->_addFiles($data);\n }\n } else {\n $this->addError('Unable to add file: '. $files[0]['filename']); //files should only have one element\n }\n }\n }",
"function MyMod_Handle_Zip_Files($paths)\n {\n $files=array();\n foreach ($paths as $path)\n {\n $rfiles=$this->TreeFiles($path);\n foreach ($rfiles as $file)\n {\n $rfile=preg_replace('/[\\/\\.]/',\"_\",$file);\n $include=$this->CGI_POSTint($rfile);\n \n if ($include==1) { array_push($files,$file); }\n }\n }\n\n return $files;\n }",
"public function run(array &$response)\n {\n $page = Yii::app()->request->getPost('page', 0); \n $this->requestId = Yii::app()->request->getPost('request_id', '');\n \n if (empty($this->requestId))\n $this->requestId = time() . '_' . $this->projectId;\n \n $response['request_id'] = $this->requestId; \n $this->prepareTempDirectory();\n \n $isEmpty = $this->processCurrentPageOffset($page);\n if ($isEmpty) { \n $response['file_ready'] = 1;\n } else { \n $response['page'] = $page + 1;\n }\n }",
"public function getArchive(AlbumIDsRequest $request)\n\t{\n\t\tif (Storage::getDefaultDriver() === 's3') {\n\t\t\tLogs::error(__METHOD__, __LINE__, 'getArchive not implemented for S3');\n\n\t\t\treturn 'false';\n\t\t}\n\n\t\t// Illicit chars\n\t\t$badChars = array_merge(\n\t\t\tarray_map('chr', range(0, 31)),\n\t\t\t[\n\t\t\t\t'<',\n\t\t\t\t'>',\n\t\t\t\t':',\n\t\t\t\t'\"',\n\t\t\t\t'/',\n\t\t\t\t'\\\\',\n\t\t\t\t'|',\n\t\t\t\t'?',\n\t\t\t\t'*',\n\t\t\t]\n\t\t);\n\n\t\t$albumIDs = explode(',', $request['albumIDs']);\n\n\t\tif (count($albumIDs) === 1) {\n\t\t\tswitch ($albumIDs[0]) {\n\t\t\t\tcase 'starred':\n\t\t\t\t\t$zipTitle = 'Starred';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'public':\n\t\t\t\t\t$zipTitle = 'Public';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'recent':\n\t\t\t\t\t$zipTitle = 'Recent';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'unsorted':\n\t\t\t\t\t$zipTitle = 'Unsorted';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$album = Album::find($albumIDs[0]);\n\t\t\t\t\tif ($album === null) {\n\t\t\t\t\t\tLogs::error(__METHOD__, __LINE__, 'Could not find specified album');\n\n\t\t\t\t\t\treturn 'false';\n\t\t\t\t\t}\n\t\t\t\t\t$zipTitle = str_replace($badChars, '', $album->title);\n\t\t\t\t\tif ($zipTitle === '') {\n\t\t\t\t\t\t$zipTitle = 'Untitled';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\t$zipTitle = 'Albums';\n\t\t}\n\n\t\t$response = new StreamedResponse(function () use ($albumIDs, $badChars) {\n\t\t\t$options = new \\ZipStream\\Option\\Archive();\n\t\t\t$options->setEnableZip64(Configs::get_value('zip64', '1') === '1');\n\t\t\t$zip = new ZipStream(null, $options);\n\n\t\t\t$dirs = [];\n\t\t\tforeach ($albumIDs as $albumID) {\n\t\t\t\t$album = $this->getAlbum($albumID);\n\t\t\t\t$dir = $album->title;\n\t\t\t\tif ($album->smart) {\n\t\t\t\t\t$publicAlbums = $this->albumsFunctions->getPublicAlbumsId();\n\t\t\t\t\t$album->setAlbumIDs($publicAlbums);\n\t\t\t\t}\n\t\t\t\t$photos_sql = $album->get_photos();\n\n\t\t\t\t$compress_album = function ($photos_sql, $dir, &$dirs, $parent_dir, $album, $albumID) use (&$zip, $badChars, &$compress_album) {\n\t\t\t\t\tif (!$album->is_downloadable()) {\n\t\t\t\t\t\tif ($this->albumFunctions->is_smart_album($albumID)) {\n\t\t\t\t\t\t\tif (!$this->sessionFunctions->is_logged_in()) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif (!$this->sessionFunctions->is_current_user($album->owner_id)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$dir = str_replace($badChars, '', $dir);\n\t\t\t\t\tif ($dir === '') {\n\t\t\t\t\t\t$dir = 'Untitled';\n\t\t\t\t\t}\n\t\t\t\t\t// Check for duplicates\n\t\t\t\t\tif (!empty($dirs)) {\n\t\t\t\t\t\t$i = 1;\n\t\t\t\t\t\t$tmp_dir = $dir;\n\t\t\t\t\t\twhile (in_array($tmp_dir, $dirs)) {\n\t\t\t\t\t\t\t// Set new directory name\n\t\t\t\t\t\t\t$tmp_dir = $dir . '-' . $i;\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dir = $tmp_dir;\n\t\t\t\t\t}\n\t\t\t\t\t$dirs[] = $dir;\n\n\t\t\t\t\tif ($parent_dir !== '') {\n\t\t\t\t\t\t$dir = $parent_dir . '/' . $dir;\n\t\t\t\t\t}\n\n\t\t\t\t\t$files = [];\n\t\t\t\t\t$photos = $photos_sql->get();\n\t\t\t\t\t// We don't bother with additional sorting here; who\n\t\t\t\t\t// cares in what order photos are zipped?\n\n\t\t\t\t\tforeach ($photos as $photo) {\n\t\t\t\t\t\t// For photos in public smart albums, skip the ones\n\t\t\t\t\t\t// that are not downloadable based on their actual\n\t\t\t\t\t\t// parent album.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t$this->albumFunctions->is_smart_album($albumID) && !$this->sessionFunctions->is_logged_in() &&\n\t\t\t\t\t\t\t$photo->album_id !== null && !$photo->album->is_downloadable()\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$is_raw = ($photo->type == 'raw');\n\n\t\t\t\t\t\t$prefix_url = $is_raw ? 'raw/' : 'big/';\n\t\t\t\t\t\t$url = Storage::path($prefix_url . $photo->url);\n\t\t\t\t\t\t// Check if readable\n\t\t\t\t\t\tif (!@is_readable($url)) {\n\t\t\t\t\t\t\tLogs::error(__METHOD__, __LINE__, 'Original photo missing: ' . $url);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get extension of image\n\t\t\t\t\t\t$extension = Helpers::getExtension($url, false);\n\n\t\t\t\t\t\t// Set title for photo\n\t\t\t\t\t\t$title = str_replace($badChars, '', $photo->title);\n\t\t\t\t\t\tif (!isset($title) || $title === '') {\n\t\t\t\t\t\t\t$title = 'Untitled';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$file = $title . ($is_raw ? '' : $extension);\n\n\t\t\t\t\t\t// Check for duplicates\n\t\t\t\t\t\tif (!empty($files)) {\n\t\t\t\t\t\t\t$i = 1;\n\t\t\t\t\t\t\t$tmp_file = $file;\n\t\t\t\t\t\t\t$pos = strrpos($tmp_file, '.');\n\t\t\t\t\t\t\twhile (in_array($tmp_file, $files)) {\n\t\t\t\t\t\t\t\t// Set new title for photo\n\t\t\t\t\t\t\t\t$tmp_file = substr_replace($file, '-' . $i, $pos, 0);\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$file = $tmp_file;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add to array\n\t\t\t\t\t\t$files[] = $file;\n\n\t\t\t\t\t\t// Reset the execution timeout for every iteration.\n\t\t\t\t\t\tset_time_limit(ini_get('max_execution_time'));\n\n\t\t\t\t\t\t// add a file named 'some_image.jpg' from a local file 'path/to/image.jpg'\n\t\t\t\t\t\t$zip->addFileFromPath($dir . '/' . $file, $url);\n\t\t\t\t\t} // foreach ($photos)\n\n\t\t\t\t\t// Recursively compress subalbums\n\t\t\t\t\tif (!$album->smart) {\n\t\t\t\t\t\t$subDirs = [];\n\t\t\t\t\t\tforeach ($album->children as $subAlbum) {\n\t\t\t\t\t\t\tif ($this->readAccessFunctions->album($subAlbum, true) === 1) {\n\t\t\t\t\t\t\t\t$subSql = Photo::set_order(Photo::where('album_id', '=', $subAlbum->id));\n\t\t\t\t\t\t\t\t$compress_album($subSql, $subAlbum->title, $subDirs, $dir, $subAlbum, $subAlbum->id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}; // $compress_album\n\n\t\t\t\t$compress_album($photos_sql, $dir, $dirs, '', $album, $albumID);\n\t\t\t} // foreach ($albumIDs)\n\n\t\t\t// finish the zip stream\n\t\t\t$zip->finish();\n\t\t});\n\n\t\t// Set file type and destination\n\t\t$response->headers->set('Content-Type', 'application/x-zip');\n\t\t$disposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, $zipTitle . '.zip', mb_check_encoding($zipTitle, 'ASCII') ? '' : 'Album.zip');\n\t\t$response->headers->set('Content-Disposition', $disposition);\n\n\t\t// Disable caching\n\t\t$response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate');\n\t\t$response->headers->set('Pragma', 'no-cache');\n\t\t$response->headers->set('Expires', '0');\n\n\t\treturn $response;\n\t}",
"public function zipBuilder(Request $request)\n { \n $tsampDir = $request->packName;\n $zip = new ZipArchive;\n $fileName = \"myzip.zip\";\n $filePath = $request->packName;\n\n if ($zip->open(public_path($fileName), ZipArchive::CREATE) === TRUE) {\n $this->addContent($zip, public_path($filePath));\n $zip->close();\n }\n\n \n \n\n\n \n\n\n /* if ($zip->open(public_path($fileName), ZipArchive::CREATE) === TRUE) {\n $files = File::files(public_path(\"/\".$tsampDir));\n foreach ($files as $name => $file)\n {\n // Skip directories (they would be added automatically)\n if (!$file->isDir())\n {\n $relativeNameInZipFile = basename($file);\n $zip->addFile($file, $relativeNameInZipFile);\n }\n } \n $zip->close(); \n } */\n\n }",
"public function downloadFolderAction($id) {\r\n\t$em = $this -> getDoctrine() -> getManager();\r\n\t$folder = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Folder') \r\n\t\t\t-> findOneBy(array('id' => $id));\r\n\r\n\tif ($folder->getSize() == 0 && $folder->getFSize() == 0)\r\n\t{\r\n\t$folderId = $folder->getParentFolder();\r\n\treturn $this -> redirect($this -> generateUrl('_managefile', array(\r\n 'folderId' => $folderId,\r\n )));\r\n\t}\r\n\t\r\n$source_dir = $folder->getAbsolutePath();\r\n$zip_file = $folder->getName();\r\n$file_list = $folder->listDirectory($folder->getAbsolutePath());\r\n$zip = new \\ZipArchive();\r\nif ($zip->open($zip_file, ZIPARCHIVE::CREATE) === true) {\r\n foreach ($file_list as $file) {\r\n if ($file !== $zip_file) {\r\n\t $tmp = basename($file);\r\n\t if ($tmp[0] == 'f')\r\n\t {\r\n\t \t$doc = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Document') \r\n\t\t\t-> findOneBy(array('path' => $tmp));\r\n\t\t\t\t\tif (!$doc) {\r\n\t\t\tthrow $this -> createNotFoundException('No document found for path ' . $tmp);\r\n\t\t}\r\n\t\t $zip->addFromString($doc->getChosenPath().$doc->getName().'.'.$doc->getMimeType(), file_get_contents($file));\r\n\t}\t\t\r\n\t}\r\n\telse\r\n\tthrow $this -> createNotFoundException('No file found for ' . $file);\r\n }\r\n if ($zip->close() == false)\r\n\tthrow $this -> createNotFoundException('Cannot create Zip file ' . $zip_file);\r\n }\r\n\t$response = new Response();\r\n\t$response->headers->set('Content-type', 'application/zip');\r\n\t$response->headers->set('Content-Disposition', sprintf('attachment; filename=\"%s.zip\"', $zip_file));\r\n\t$response->setContent(file_get_contents($zip_file));\r\n\t@unlink($zip_file);\r\n\treturn $response;\r\n\t}",
"protected function createZip($files = array()){\n $uploaddir=$this ->getUploadDir();\n $overwrite = false;\t\t\n $thefilename= rand(0, 99999) . '_' . rand(0, 99999) . '_' . rand(0, 99999) . '.zip';\n $destination = $uploaddir . 'Nerdeez.zip';\n\n //if we have good files...\n if(count($files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,ZIPARCHIVE::CREATE) !== true) {\n return NULL;\n }\n\n //add the files\n foreach($files as $file) { \n $new_filename = substr($file, 8);\n $zip->addFile($file, $new_filename); \n }\n\n //close the zip -- done!\n $zip->close();\n\n return $destination;\n }\n else{\n return NULL;\n }\n \n //return $thefilename;\n return $destination;\n }",
"public function bulkAsUrl()\n {\n $zipUrl = $this->exporter->doExport('zip');\n return response()->json([\n 'file_url' => $zipUrl,\n ]);\n }",
"function get_message_store_report_archive($taskId){\n global $platform;\n print (\"Getting report uri ...\\n\");\n try {\n $endpoint = \"/account/~/message-store-report/\" . $taskId . \"/archive\";\n $response = $platform->get($endpoint);\n $jsonObj = $response->json();\n for ($i=0; $i < count($jsonObj->records); $i++){\n $fileName = \"message_store_content_\" . date(\"Y_m_d_H_i\", time()) . \"_\" . $i . \".zip\";\n get_message_store_report_archive_content($jsonObj->records[$i]->uri, $fileName);\n }\n } catch (\\RingCentral\\SDK\\Http\\ApiException $e) {\n // Getting error messages using PHP native interface\n print 'Expected HTTP Error: ' . $e;\n print (\"Error message: \" . $e->apiResponse->response()->error() . PHP_EOL);\n }\n}",
"function create_zip($files = array(),$destination = '',$overwrite = false) {\n \n //if the zip file already exists and overwrite is false, return false\n if(file_exists($destination) && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n //if files were passed in...\n if(is_array($files)) {\n //cycle through each file\n foreach($files as $file) {\n //make sure the file exists\n // echo \"fiel\".$file;\n if(file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if(count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile($file,$file);\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n\n //close the zip -- done!\n $zip->close(); \n //check to make sure the file exists\n return file_exists($destination);\n }\n else\n { \n return false;\n }\n }",
"function MyMod_Handle_Zip_Do()\n {\n $zipname=\"/tmp/\".$this->ModuleName.\".\".$this->MTime2FName().\".zip\";\n\n $zip=$this->OpenZip($zipname);\n\n $paths=$this->ApplicationObj()->MyApp_Globals_Upload_Paths();\n $files=$this->MyMod_Handle_Zip_Files($paths);\n \n $rpaths=$this->MyMod_Handle_Zip_Paths($files);\n\n $this->MyMod_Handle_Zip_Paths_Add($zip,$rpaths);\n $this->MyMod_Handle_Zip_Files_Add($zip,$files);\n\n $this->CloseZip($zip,$zipname);\n $this->SendZip($zipname);\n\n $this->MyMod_Handle_Zip_Tmp_Remove($zipname);\n exit();\n }",
"protected function createExportFiles($id)\n {\n if (!is_dir($this->dirPath) && !@mkdir($this->dirPath, 0777, true)) {\n $this->log->error(\"Unable to create $this->dirPath for boxalino data sync\");\n return false;\n }\n\n $metadataFactoryClassName = $this->getClassMetadataFactoryName();\n /** @var $metaDataFactory \\Doctrine\\ORM\\Mapping\\ClassMetadataFactory */\n $metaDataFactory = new $metadataFactoryClassName;\n $metaDataFactory->setEntityManager($this->getEntityManager());\n\n $zip_name = $this->dirPath . 'export.zip';\n @unlink($zip_name);\n\n $zip = new ZipArchive();\n if ($zip->open($zip_name, ZIPARCHIVE::CREATE) !== TRUE) {\n $this->log->error(\"Unable to create ZIP file $zip_name for boxalino data sync\");\n return false;\n }\n\n // Create files\n $this->startXml($id);\n $zip->addFile($this->getArticles($id), self::ITEM_PROPERTIES_CSV);\n $zip->addFile($this->getArticleDetails($id), self::ITEM_ARTICLESDETAILS_CSV);\n $zip->addFile($this->getBrands($id), self::ITEM_BRANDS_CSV);\n $zip->addFile($this->getCategories($id), self::CATEGORIES_CSV);\n $zip->addFile($this->getItemCategories($id), self::ITEM_CATEGORIES_CSV);\n if (count($this->getShopLocales($id)) > 1) {\n $zip->addFile($this->getTranslations($id), self::ITEM_TRANSLATIONS_CSV);\n }\n $zip->addFile($this->getCustomers($id), self::CUSTOMERS_CSV);\n $zip->addFile($this->getFacetValues($id), self::ITEM_FACETVALUES_CSV);\n $zip->addFile($this->getBlogs($id), self::ITEM_BLOGS_CSV);\n $zip->addFile($this->getTransactions($id), self::TRANSACTIONS_CSV);\n $zip->addFile($this->getStoreInfo($id), self::STORE_INFO_TXT);\n $zip->addFromString('properties.xml', $this->finishAndGetXml($id));\n $zip->close();\n\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($this->xml->asXML());\n $saveXML = $dom->saveXML();\n file_put_contents($this->dirPath . 'properties.xml', $saveXML);\n\n $this->db->query('TRUNCATE `exports`');\n $this->db->query('INSERT INTO `exports` values(NOW())');\n return true;\n }",
"public function downloadZip()\n{\n $data = ImgUpload::all();\n foreach($data as $key => $value)\n {\n $imgarr[] = \"storage/image\". '/' . $value->image;\n }\n\n $ziplink = $this->converToZip($imgarr);\n return $ziplink;\n\n\n}",
"public function processDownloadRequest($requestId)\n {\n try {\n $this->requestId = $requestId; \n\n $this->initPhpExcel(); \n \n // Load already prepared xml files into excel\n $this->loadXmlFilesToExcel();\n }\n catch (Exception $e) { \n \n }\n \n // Remove unnecessary files and folders\n $this->removeTempDirectories(); \n \n $objWriter = PHPExcel_IOFactory::createWriter($this->phpExcel, 'Excel2007'); \n $objWriter->save(\"php://output\");\n }"
] | [
"0.66146874",
"0.64445597",
"0.626023",
"0.62501556",
"0.6060008",
"0.5936098",
"0.59262556",
"0.5889193",
"0.5877848",
"0.5855022",
"0.58076197",
"0.56387097",
"0.5637356",
"0.55823696",
"0.5567398",
"0.55667245",
"0.55545104",
"0.5535295",
"0.55143833",
"0.5506397",
"0.55010474",
"0.54366",
"0.54128724",
"0.53812695",
"0.5369405",
"0.534264",
"0.5326922",
"0.5312353",
"0.53007853",
"0.52774036"
] | 0.8146165 | 0 |
Gets the driver that `$alias` represents. | public function get($alias)
{
return $this->drivers[$alias];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAddonDriver(string $alias): AddonDriverInterface;",
"public function getFormFieldDriver(string $alias): FormFieldDriverInterface;",
"public function getDriver(): string\n {\n return $this->driver;\n }",
"public function getDriver()\n {\n return $this->manager->getDriver();\n }",
"public function getDriver(): string\n {\n return $this->config['driver'];\n }",
"protected function getAlias(string $alias)\n {\n $path = $this->aliases[$alias] ?? null;\n\n if ($path){\n return $path;\n }\n\n throw new \\InvalidArgumentException(\"Alias [{$alias}] not found\", 500);\n }",
"public function getButtonDriver(string $alias): ButtonDriverInterface;",
"public function getDriver();",
"function getAliasOrName();",
"public function getDriver() : string\n {\n return $this->driver;\n }",
"public function getDriver(): ?string\n {\n return $this->driver;\n }",
"private function loadAlias($alias)\r\n {\r\n if(isset($this->aliases[$alias]))\r\n return class_alias($this->aliases[$alias] , $alias);\r\n }",
"public function getDriver()\n {\n return $this->driver;\n }",
"public function getDriver()\n {\n return $this->driver;\n }",
"public function getDriver()\n {\n return $this->driver;\n }",
"public function getDriver()\n {\n return $this->driver;\n }",
"public function makeFromAlias($alias)\n {\n if ($this->has($alias)) {\n $driver = $this->get($alias);\n\n return new $driver();\n }\n\n return false;\n }",
"protected function getDatabaseDriver() {\n $key = $this->connection ?: Config::get('database.default');\n return Config::get('database.connections.' . $key . '.driver');\n }",
"protected function tenantDriverName(): string\n {\n return $this->getDriver($this->tenant());\n }",
"function getTableFromAlias($alias)\n\t{\n\t\tif(strpos($alias,\".\")!==false)\n\t\t{\n\t\t\tlist($alias,$tmp) = explode(\".\",$alias,2);\t\n\t\t}\n\t\t\t\t\n\t\t$tmp = array_flip($this->joinAlias);\n\t\treturn vartrue($tmp[$alias]);\t\t\t\n\t}",
"public function getAliased($alias)\n {\n return $this->all()->getAliased($alias);\n }",
"public function getDriver()\n\t{\n\t\treturn $this->driver;\n\t}",
"public function getDriver()\n\t{\n\t\treturn $this->driver;\n\t}",
"public function getDriver($name)\n {\n $class = $this->_dataset['driver'] . '\\\\' . $name;\n return $class::getInstance();\n }",
"public function driver() : Driver\n {\n return $this->driver;\n }",
"public static function getElementByAlias($alias)\n\t{\n\t\t$alias = self::getAliasByName($alias);\n\n\t\tswitch ($alias)\n\t\t{\n\t\t\tcase 'advancedmodulemanager':\n\t\t\t\treturn 'advancedmodules';\n\n\t\t\tcase 'advancedtemplatemanager':\n\t\t\t\treturn 'advancedtemplates';\n\n\t\t\tcase 'nonumberextensionmanager':\n\t\t\t\treturn 'nonumbermanager';\n\t\t}\n\n\t\treturn $alias;\n\t}",
"private function getType($alias) {\n if (isset(self::$types[$alias])) {\n return $alias;\n }\n foreach (self::$types as $type => $aliases) {\n if (in_array($alias, $aliases, true)) {\n return $type;\n }\n }\n return null;\n }",
"public function driver($driver = null)\n {\n return $this->createDriver(\n $driver ?: $this->getDefaultDriver()\n );\n }",
"public function getDefaultDriver()\r\n {\r\n $name = $this->getConfigByKey('default');\r\n return !empty($name) ? $name : 'kdniao';\r\n }",
"public static function findByAlias($alias)\n {\n $model = static::findOne(['alias' => $alias]);\n if ($model === null)\n $model = static::findOne(['id' => $alias]);\n\n return $model;\n }"
] | [
"0.7253854",
"0.67477584",
"0.6414728",
"0.63790315",
"0.63496256",
"0.6322244",
"0.6314592",
"0.6311808",
"0.62934756",
"0.6259998",
"0.6239481",
"0.62021935",
"0.6187904",
"0.6187904",
"0.6187904",
"0.6187904",
"0.6157589",
"0.6154002",
"0.6146369",
"0.6135506",
"0.6115251",
"0.6089862",
"0.6089862",
"0.6087792",
"0.60868394",
"0.6083571",
"0.6081148",
"0.6049014",
"0.6026012",
"0.601361"
] | 0.8100522 | 0 |
Checks if a driver within the given `$alias` exists. | public function has($alias)
{
return array_key_exists($alias, $this->drivers);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function exists($alias)\n {\n return static::locator()->exists($alias);\n }",
"public function exists($alias);",
"public function isAliasExistsInDB($alias){\r\n\t\t$alias = $this->db->escape($alias);\r\n\t\t\r\n\t\t$where = \"alias='$alias'\";\r\n\t\tif(!empty($this->id)){\r\n\t\t\t$id = $this->db->escape($this->id);\r\n\t\t\t\r\n\t\t\t$where .= \" and id != '\".$id.\"' AND `type` != 'template'\";\r\n\t\t}\r\n\t\t\r\n\t\t$response = $this->db->fetch(RevSliderGlobals::$table_sliders,$where);\r\n\t\treturn(!empty($response));\r\n\t\t\r\n\t}",
"public static function isAliasExists($alias){\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t$response = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".RevSliderGlobals::$table_sliders.\" WHERE alias = %s AND `type` != 'template'\", $alias));\r\n\t\t\r\n\t\treturn(!empty($response));\r\n\t}",
"private function aliasExists($alias)\n {\n return array_key_exists($alias, AliasLoader::getInstance()->getAliases());\n }",
"public function driverExists($shortName)\n {\n return array_key_exists($shortName, $this->drivers);\n }",
"public function HasElementForAlias( $alias ){\r\n\t\treturn property_exists( $this->alias_lookup, $alias );\r\n\t}",
"public function exists($alias)\n {\n $repo = $this->getItemsName();\n $loc = &$this->$repo;\n foreach (explode('.', $alias) as $step) {\n if (!isset($loc[$step])) {\n return false;\n } else {\n $loc = &$loc[$step];\n }\n }\n return true;\n }",
"public function contains(string $alias): bool\n {\n return isset($this->aliases[$alias]);\n }",
"public static function isSystemAlias($alias)\n {\n $system_aliases = Kohana::$config->load('system-aliases')['system'];\n\n return in_array($alias, $system_aliases) ? 1 : 0;\n }",
"public function driverExists($driver)\n\t{\n\t\treturn isset($this->drivers);\n\t}",
"public function has($alias);",
"private function hasLoader($alias)\n {\n return isset($this->loaders[$alias]);\n }",
"public function has($alias)\n {\n return $this->exists($alias);\n }",
"public function hasCatalog($alias)\n {\n return isset($this->configuration[$alias]);\n }",
"public function has(string $driver): bool\n {\n return isset($this->drivers[$driver]) || isset($this->customResolvers[$driver]);\n }",
"public function getIfExists($alias);",
"public function aliasExists($alias)\n {\n $alias = $this->_normalizeIndex($alias);\n foreach ($this->_aliasMap as $aliases) {\n if (isset($aliases[$alias])) {\n return true;\n }\n }\n\n return false;\n }",
"public function aliasExists($user_id, $alias) {\n $mysqli = $this->connect();\n \n $query = \"SELECT * FROM users as u, gamemasters as g WHERE u.id=? AND u.id=g.owner AND g.alias=?\";\n $query = $mysqli->real_escape_string($query);\n\n $stmt = $mysqli->stmt_init();\n\n if(!$stmt->prepare($query)) {\n\tprint(\"Failed to prepare statement!\");\n } else {\n\t$stmt->bind_param('is', $user_id, $alias);\n\t$stmt->execute();\n\t$stmt->store_result();\n\t$stmt->fetch();\n\t$num_rows = $stmt->num_rows;\n\n\tif($num_rows >= 1) {\n\t return true;\n\t} else {\n\t return false;\n\t}\n }\n $stmt->close();\n $mysqli->close();\n }",
"public function makeFromAlias($alias)\n {\n if ($this->has($alias)) {\n $driver = $this->get($alias);\n\n return new $driver();\n }\n\n return false;\n }",
"public function load($alias)\n {\n if (static::$facadeNamespace && strpos($alias, static::$facadeNamespace) === 0) {\n $this->loadFacade($alias);\n\n return true;\n }\n\n if (isset($this->aliases[$alias])) {\n return class_alias($this->aliases[$alias], $alias);\n }\n }",
"public function has($alias) {\n if (array_key_exists($alias, $this->networks)) {\n return true;\n }\n return false;\n }",
"public function has(string ... $alias): bool\n {\n foreach ( $alias as $current ) {\n if ( ! array_key_exists($this->marshalKey($current), $this->aliases) ) {\n return false;\n }\n }\n\n return true;\n }",
"public function alias_alive_from_alias($alias){\n $alias=san(strtolower($alias));\n $sql=OriginSql::getInstance();\n $res=$sql->select('acc','*',2,array('alias=\"'.$alias.'\"'),'',1);\n if ($res!=0) {\n //$this->log('account.inc->alias_alive_from_alias true',0,true);\n return true;\n } else {\n $this->log('account.inc->alias_alive_from_alias false',0,true);\n return false;\n }\n }",
"public function has(string $name, string $alias = null): bool\n {\n return isset($this->options[$name]) || (!empty($alias) && isset($this->options[$alias]));\n }",
"function is_alias($name) {\n global $config;\n if (is_array($config['aliases']['alias'])) {\n foreach ($config['aliases']['alias'] as $alias) {\n if (strcasecmp($alias['name'], $name) == 0) {\n return $alias[\"type\"];\n }\n }\n }\n}",
"public function hasRelation($alias)\n {\n return $this->offsetExists($alias);\n }",
"public function getAddonDriver(string $alias): AddonDriverInterface;",
"function label_driver_check($driver) {\n if (!in_array($driver, pdo_drivers())) {\n echo \" <span class=\\\"missing_driver\\\">(Driver not loaded!)</span>\";\n }\n}",
"public static function registerClassAlias($alias = 'A')\n {\n if (!class_exists($alias)) {\n return class_alias('\\MathiasGrimm\\ArrayPath\\ArrayPath', $alias);\n }\n\n return false;\n }"
] | [
"0.7400901",
"0.73898995",
"0.7279398",
"0.6861175",
"0.6856411",
"0.674201",
"0.6729286",
"0.66993576",
"0.65459216",
"0.6528441",
"0.6490945",
"0.64762384",
"0.6431887",
"0.64130706",
"0.639811",
"0.6349381",
"0.63075453",
"0.6305854",
"0.6297585",
"0.6248267",
"0.6180253",
"0.6117828",
"0.6115485",
"0.61135197",
"0.5928497",
"0.59008014",
"0.5874785",
"0.58605856",
"0.5830034",
"0.5811957"
] | 0.7889002 | 0 |
Makes an `IDrive` instance based on the given `$extension`. | public function makeFromExt($extension)
{
$drivers = $this->getAll();
foreach ($drivers as $driver) {
$driver = new $driver();
if (in_array($extension, $driver->extensions())) {
return $driver;
}
unset($driver);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDriver($extension) {\n\t\t\n\t\t//Rule matching/execution goes here :-D\n\n\t\t//If no rule exists we'll try to autodetect the correct driver using the naming conventions\n\t\t$classname = ucfirst($extension).'ViewDriver';\n\t\tif ( file_exists(CURRENT_APP.'/views/drivers/'.$classname.'.php') ) {\n\t\t\tinclude_once CURRENT_APP.'/views/drivers/'.$classname.'.php';\n\t\t\tif ( class_exists($classname) ) {\n\t\t\t\treturn new $classname;\n\t\t\t}\n\t\t}\n\t\tif ( file_exists('global/views/drivers/'.$classname.'.php') ) {\n\t\t\tinclude_once 'global/views/drivers/'.$classname.'.php';\n\t\t\tif ( class_exists($classname) ) {\n\t\t\t\treturn new $classname;\n\t\t\t}\n\t\t}\n\t}",
"static public function factory ($drive, $array)\n\t{\n\n\t\trequire_once Instance::singleton ()->getCorePath () .'class/ApiAuth.php';\n\n\t\t$class = $drive .'Auth';\n\n\t\tif (!class_exists ($class, FALSE))\n\t\t\treturn NULL;\n\n\t\treturn new $class ($array);\n\t}",
"public function withExtension($extension);",
"public static function instance(string $id, callable $extension): self\n {\n return new self($id, $extension);\n }",
"public function __construct($extension)\n {\n $this->extension = $extension;\n }",
"protected function createGdDriver()\n {\n return new \\Imagine\\Gd\\Imagine();\n }",
"public function __construct(Extension $extension)\n {\n $this->extension = $extension;\n }",
"public function adapter()\n\t{\n\t\tif (!$this->get('scope'))\n\t\t{\n\t\t\t$this->set('scope', 'site');\n\t\t}\n\n\t\t$scope = strtolower($this->get('scope'));\n\t\t$cls = __NAMESPACE__ . '\\\\Adapters\\\\' . ucfirst($scope);\n\n\t\tif (!class_exists($cls))\n\t\t{\n\t\t\t$path = __DIR__ . DS . 'adapters' . DS . $scope . '.php';\n\t\t\tif (!is_file($path))\n\t\t\t{\n\t\t\t\tthrow new \\InvalidArgumentException(Lang::txt('Invalid scope of \"%s\"', $scope));\n\t\t\t}\n\t\t\tinclude_once $path;\n\t\t}\n\n\t\treturn new $cls($this->get('scope_id'));\n\t}",
"public static function instance(callable $factory, callable $extension): self\n {\n return new self($factory, $extension);\n }",
"protected function createGmagickDriver()\n {\n return new \\Imagine\\Gmagick\\Imagine();\n }",
"public function drive($driver)\n {\n if(isset($this->drivers[$driver])) {\n return $this->drivers[$driver];\n }else {\n return $this->drivers[$driver] = $this->resolve($driver);\n }\n }",
"protected static function createDriveAdapter($access_token)\n {\n $client = new Google_Client();\n $client->setAccessToken($access_token);\n $service = new Google_Service_Plus($client);\n $accountInfo = app('Pulse\\Services\\Identity\\Account\\AccountInterface');\n\n return new DriveAdapter($service, $accountInfo);\n }",
"protected function driver($ext, $path)\n {\n switch ($ext) {\n case 'php':\n $driver = new PhpDriver($this->getFilesystem());\n break;\n\n case 'json':\n $driver = new JsonDriver($this->getFilesystem());\n break;\n\n case 'ini':\n $driver = new IniDriver($this->getFilesystem());\n break;\n\n case 'xml':\n $driver = new XmlDriver($this->getFilesystem());\n break;\n\n case 'yaml':\n $driver = new YamlDriver($this->getFilesystem());\n break;\n\n case 'toml':\n $driver = new TomlDriver($this->getFilesystem());\n break;\n default:\n throw new \\RuntimeException(\n sprintf(\"Unable to find the right driver for '%s'\", $ext)\n );\n }\n\n if ($driver->supports($path)) {\n return $driver;\n }\n }",
"private function startDriveService() {\n $this->driveService = new Google_DriveService($this->driveClient);\n }",
"public function makeFromFolder($file, $driver = null, $ext = null);",
"function extension( $extension_name )\n {\n if( !$this->has_extension($extension_name) ){\n return null;\n }\n \n // require the source\n require_once( 'extensions/'.$extension_name.'/extension.php');\n \n // new extension\n $ext = $extension_name . \"_extension\";\n $extension = new $ext( $this );\n \n // load\n $extension->load();\n \n // load scripts and styles\n $this->controller->view->add_styles( $extension->styles() );\n $this->controller->view->add_scripts( $extension->scripts() );\n \n return $extension;\n }",
"function buildService($credentials) {\n $apiClient = new Google_Client();\n $apiClient->setUseObjects(true);\n $apiClient->setAccessToken($credentials);\n return new Google_DriveService($apiClient);\n }",
"function buildService($credentials) {\n $apiClient = new Google_Client();\n $apiClient->setUseObjects(true);\n $apiClient->setAccessToken($credentials);\n return new Google_DriveService($apiClient);\n }",
"public function setExtension($extension)\r\n {\r\n $this->extension = $extension;\r\n\r\n return $this;\r\n }",
"public function setExtension($extension)\n {\n $this->extension = $extension;\n\n return $this;\n }",
"private function createDriver()\n {\n $drivername = ucfirst($this->driver);\n $driverclass = sprintf('Intervention\\\\Image\\\\%s\\\\Driver', $drivername);\n\n if (class_exists($driverclass)) {\n return new $driverclass;\n }\n\n throw new \\Intervention\\Image\\Exception\\NotSupportedException(\n \"Driver ({$drivername}) could not be instantiated.\"\n );\n }",
"public function addExtension(string $extension): Loader\n {\n }",
"public function loadExtension(ExtensionInterface $extension) : Engine\n {\n $extension->register($this->plates);\n\n return $this->plates;\n }",
"public function SetExtension (string $extension) \r\n {\r\n $this->extension = $extension;\r\n\r\n return $this;\r\n }",
"public function extension($extension)\n {\n if (is_string($extension)) {\n $this->extension = ltrim($extension, '.');\n } else {\n $this->extension = null;\n }\n\n return $this;\n }",
"protected function createDriver($driver)\n {\n try {\n return parent::createDriver($driver);\n }\n catch (InvalidArgumentException $e) {\n if (! class_exists($driver)) {\n throw $e;\n }\n\n return $this->app->make($driver);\n }\n }",
"public function setExtension($extension = '.png')\n\t{\n\t\tif (substr($extension, 0, 1) != '.') {\n\t\t\t$extension = '.' . $extension;\n\t\t}\n\n\t\t$this->extension = $extension;\n\n\t\treturn $this;\n\t}",
"public function addExtension($extension);",
"public function addExtension($extension);",
"public function make($profile = null)\n {\n return $this->driver($profile);\n }"
] | [
"0.57913893",
"0.54343224",
"0.5411925",
"0.5348306",
"0.5259777",
"0.5194532",
"0.51446664",
"0.5102502",
"0.5042901",
"0.49999407",
"0.49696824",
"0.49696568",
"0.49460545",
"0.49286744",
"0.49050915",
"0.48654452",
"0.4859955",
"0.4859955",
"0.4816234",
"0.4806353",
"0.4792521",
"0.47601023",
"0.46905154",
"0.46823996",
"0.4666919",
"0.46370167",
"0.46198845",
"0.46023667",
"0.46023667",
"0.45979854"
] | 0.5743687 | 1 |
Makes an IDriver instance based on the given `$alias`. | public function makeFromAlias($alias)
{
if ($this->has($alias)) {
$driver = $this->get($alias);
return new $driver();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAddonDriver(string $alias): AddonDriverInterface;",
"public function create($alias);",
"public function __construct($alias)\n {\n $this->alias = $alias;\n $this->type = $this->type();\n }",
"public static function get($alias)\n\t{\n\t\t// If we have already loaded this module we return it right now\n\t\tif (isset(static::$registry[$alias]['instance'])) {\n\t\t\treturn static::$registry[$alias]['instance'];\n\t\t}\n\t\t// instantiate module, add it for next reference and return it\n\t\t$instance = static::factory($alias);\n\t\tstatic::$registry[$alias]['instance'] = $instance;\n\t\treturn $instance;\n\t}",
"public static function factory($alias, $arg = null)\n\t{\n\t\t$args = is_null($arg) ? null : array_slice(func_get_args(), 1);\n\n\t\t// Load it\n\t\tif (isset(static::$registry[$alias]['callback'])) {\n\t\t\treturn call_user_func_array(static::$registry[$alias]['callback'], array($args)); \n\t\t}\n\t\t\n\t\t// Check for configuration arguments\n\t\tif (!is_null($args)) {\n\t\t\t$conf = $args;\n\t\t} else {\n\t\t\t// Check for configuration file\n\t\t\t$conf = static::findConfig($alias);\n\t\t}\n\t\t\n\t\t// Auto-create it\n\t\tif ($instance = static::reflect($alias, $conf)) {\n\t\t\treturn $instance;\n\t\t}\n\n\t\tif (isset(static::$registry[$alias]['alias'])) {\n\t\t\treturn static::factory(static::$registry[$alias]['alias'], $args);\n\t\t}\n\n\t\t// Check for \\Sugi\\$alias\n\t\tif (strpos($alias, '\\\\') === false) {\n\t\t\treturn static::factory(\"\\Sugi\\\\$alias\", $args);\n\t\t}\n\t\tthrow new \\Exception(\"Could not find $alias class\");\n\t}",
"private function loadAlias($alias)\r\n {\r\n if(isset($this->aliases[$alias]))\r\n return class_alias($this->aliases[$alias] , $alias);\r\n }",
"public function setAlias(string $alias, string $name): ContainerAdapterInterface;",
"public function getFormFieldDriver(string $alias): FormFieldDriverInterface;",
"public function load($alias)\n {\n if (isset($this->aliases[$alias])) {\n class_alias($this->aliases[$alias], $alias);\n }\n }",
"public function load($alias)\n {\n if (isset($this->aliases[$alias])) {\n return class_alias($this->aliases[$alias], $alias);\n }\n }",
"public function initByAlias($alias){\r\n\t\t$alias = $this->db->escape($alias);\r\n\r\n\t\ttry{\r\n\t\t\t$where = \"alias='$alias' AND `type` != 'template'\";\r\n\t\t\t\r\n\t\t\t$sliderData = $this->db->fetchSingle(RevSliderGlobals::$table_sliders,$where);\r\n\t\t\t\r\n\t\t}catch(Exception $e){\r\n\t\t\t$arrAliases = $this->getAllSliderAliases();\r\n\t\t\t$strAliases = \"\";\r\n\t\t\t\r\n\t\t\tif(!empty($arrAliases)){\r\n\t\t\t\t$arrAliases = array_slice($arrAliases, 0, 6); //show 6 other, will be enough\r\n\t\t\t\t\r\n\t\t\t\t$strAliases = \"'\".implode(\"' or '\", $arrAliases).\"'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$errorMessage = 'Slider with alias <strong>'.esc_attr($alias).'</strong> not found.';\r\n\t\t\tif(!empty($strAliases))\r\n\t\t\t\t$errorMessage .= ' <br>Maybe you mean: '.$strAliases;\r\n\t\t\t\t\r\n\t\t\tRevSliderFunctions::throwError($errorMessage);\r\n\t\t}\r\n\t\t\r\n\t\t$this->initByDBData($sliderData);\r\n\t}",
"public function get($alias)\n {\n return $this->drivers[$alias];\n }",
"protected static function reflect($alias, $args)\n\t{\n\t\ttry {\n\t\t\t$ref = new \\ReflectionClass($alias);\n\n\t\t\t// Check we can create an instance of the class\n\t\t\tif ($ref->isAbstract()) {\n\t\t\t\tthrow new \\Exception(\"Class $alias is abstract.\");\n\t\t\t}\n\n\t\t\tif (!$ref->isInstantiable()) {\n\t\t\t\tthrow new \\Exception(\"Class $alias is not instantiable.\");\n\t\t\t}\n\n\t\t\t// Try to create it\n\t\t\t$constructor = $ref->getConstructor();\n\n\t\t\tif (is_null($constructor)) {\n\t\t\t\treturn new $alias;\n\t\t\t}\n\n\t\t\treturn $ref->newInstanceArgs(array($args));\n\t\t}\n\t\tcatch (\\ReflectionException $e) {\n\t\t\t//\n\t\t}\n\t}",
"public function __get($alias)\n {\n return $this\n ->resolveEndpoint($alias)\n ->withOrganization($this->organizationId);\n }",
"public function alias(string $alias): self {\r\n\r\n $this -> alias = $alias;\r\n return $this;\r\n }",
"public function getButtonDriver(string $alias): ButtonDriverInterface;",
"public function as(string $alias)\n {\n $this->from->as($alias);\n\n return $this;\n }",
"public function getInstance(string $alias)\n {\n if ( ! array_key_exists($alias, $this->associatedAliases) ) {\n throw new FacadeException(\n 'Unknown alias: '.$alias\n );\n }\n\n return $this->services->make($this->associatedAliases[$alias]);\n }",
"function &alias($alias)\n\t{\n\t\tif($this->q_as !== false)\n\t\t\t$this->q_as = $this->_protect_identifiers($alias);\n\t\t\n\t\treturn $this;\n\t}",
"public function registerAlias($alias, $class = null)\n\t{ \n\t\tstatic::facade($alias, $class); \n\t}",
"public static function from($myAlias=null){\n\t\t$obj = new static;\n\t\t$obj->initSql ($myAlias);\n\t\treturn $obj;\n\t}",
"function model($alias, $param=null){\n\n //translate model alias -> class\n $class_alias = strtolower($alias);\n if(config('model.'.$class_alias)){\n $class_name = config('model.'.$class_alias);\n if($param){\n return new $class_name($param);\n }\n return new $class_name;\n }\n //translate class string -> class object\n if(class_exists($alias)){\n if($param){\n return new $alias($param);\n }\n return new $alias;\n }\n\n //if the classname or alias not found, throw an error\n throw new Exception('Class alias ' . $alias .' is not exists');\n}",
"public static function getResourceByAlias($alias)\n {\n \treturn static::findOne(['alias' => $alias]);\n }",
"public function setAlias(?string $alias): self\n {\n $this->alias = $alias;\n\n return $this;\n }",
"public function alias(string $alias) : GraphLookup\n {\n return $this->graphLookup->alias($alias);\n }",
"public function setAlias($alias) {\n $this->_alias = $alias;\n\n return $this;\n }",
"public function setAlias(string $alias)\n {\n $this->alias = $alias;\n\n return $this;\n }",
"public function get(string $alias): FormInterface;",
"public static function findByAlias($alias)\n {\n $model = static::findOne(['alias' => $alias]);\n if ($model === null)\n $model = static::findOne(['id' => $alias]);\n\n return $model;\n }",
"public function setAlias($alias) {\n $this->alias = $alias;\n }"
] | [
"0.66767114",
"0.6657379",
"0.64740753",
"0.64731425",
"0.6163027",
"0.6157758",
"0.6012526",
"0.5990932",
"0.5973751",
"0.59309053",
"0.59276414",
"0.588137",
"0.5874277",
"0.5862922",
"0.5802636",
"0.57923806",
"0.5630858",
"0.56248003",
"0.5598288",
"0.5588003",
"0.55805176",
"0.55749804",
"0.5550945",
"0.55373394",
"0.55345875",
"0.54956585",
"0.54639953",
"0.5454547",
"0.544029",
"0.53750443"
] | 0.75821495 | 0 |
set the root URL the URL where the CSS files are accessible | public function setRootUrl($url) {
$this->_rootUrl = $url;
print "[info] Root URL set to $url\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set_url() {\n\t\t$this->url = $this->get_base_path( explode( '/' , plugins_url( '', __FILE__ ) ) );\n\t}",
"private function setURL() {\n $uri = System::escape((isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''));\n\n if (_PATH_ != '') {\n $array_root = explode('/', $_SERVER['PHP_SELF']);\n $array_url_base = explode('/', $this->getUrlBase());\n\n $directory_root = (isset($array_root[1])) ? trim($array_root[1]) : '';\n $directory_base = trim(array_pop($array_url_base));\n\n if ($directory_root == $directory_base) {\n $uri = '/' . str_replace(array(str_replace('/', '', $directory_base), '//'), '', $uri);\n }\n\n $uri = str_replace(_PATH_ . '/', '', $uri);\n }\n $uri = str_replace(array(\"\\\\\", \"//\"), '/', $uri);\n $uri = @explode('?', $uri);\n\n $url = isset($uri[0]) ? $uri[0] : $uri;\n\n if ($url AND $url <> '/') {\n $this->_url = $url;\n } else {\n $this->_url = 'index/init';\n }\n }",
"protected function setWebRoot() {\n $web_directory = empty($this->config['web_directory']) ? 'web' : $this->config['web_directory'];\n $this->webRoot = $this->getInstallDir() . trim($web_directory, '/') . '/';\n $this->webRoot = str_replace('//', '/', $this->webRoot);\n }",
"public function getCssDirectoryURL()\n\t{\n\t\treturn $this->cssDirectoryURL;\n\t}",
"public static function root()\n\t{\n\t\treturn self::$rootUrl;\t\n\t}",
"public static function base_url($file)\n\t{\n\t\tinclude_once static::get_stylesheet_directory() . $file;\n\t}",
"public abstract function rootUrl();",
"public function setBaseUrl($url);",
"function themesURL()\r\n {\r\n return $this->app->config->siteurl . 'modules/' . $this->app->moduleName . '/themes';\r\n }",
"public function init(){\n app()->clientScript->registerCssFile(app()->request->baseUrl .'/css/user.css');\n parent::init();\n }",
"public function stylesheet_url()\n {\n $stylesheet = $this->stylesheet();\n\n $modified = filemtime($stylesheet);\n\n $uploads = wp_get_upload_dir();\n\n return $uploads['baseurl'] . '/wptheme/customized.css?' . $modified;\n }",
"function setBaseUrl($url) {\n\n $this->baseUrl = $url;\n\n }",
"private function set_url()\n\t{\n\t\t$url\t\t= '';\n\t\t$ssl \t\t= (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');\n\t\t\n\t\t// Get the protocol\n\t\t$protocol\t= strtolower($_SERVER['SERVER_PROTOCOL']);\n\t\t$protocol\t= substr($protocol, 0, strpos($protocol, \"/\"));\n\t\tif($ssl) $protocol .= 's';\n\t\t\n\t\t// Get the request PORT\n\t\t$port\t\t= $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT'];\n\t\t\n\t\t// Set the current URL\n\t\t$this->url = $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n\t\t\n\t\treturn $this->url;\n\t}",
"public static function getStyleUrl() {\n return Yii::app()->baseUrl . '/bootstrap/dashboard/';\n }",
"function tbcf_get_stylesheet_directory_uri() {\n\n\t\treturn esc_url( untrailingslashit( tbcf_strip_protocol( get_stylesheet_directory_uri() ) ) );\n\n}",
"private function setUrls()\n {\n $host = parse_url($this->target_url, PHP_URL_HOST);\n $host = $host ? $host : parse_url($this->target_url, PHP_URL_PATH);\n $this->base_url = 'http://' . rtrim($host, '/') . '/';\n $this->domain = $host;\n $this->internal_link_pattern = str_replace(\"#domain#\", $this->domain, $this->internal_link_pattern);\n\n $this->absolute_url = substr($this->target_url, 0, strrpos($this->target_url, '/'));\n $this->absolute_url = $this->absolute_url ? $this->absolute_url . '/' : $this->base_url;\n }",
"public function setBaseURL(string $url)\n {\n if (filter_var($url, FILTER_VALIDATE_URL) === false) {\n die(\"Please provide a valid url. Example: http://example.com\\n\");\n }\n\n $parsed = parse_url($url);\n $this->baseUrlWithoutProtocol = $parsed['host'] . '/';\n\n $this->baseUrl = \"{$parsed['scheme']}://{$parsed['host']}\";\n $this->baseUrl .= $parsed['port'] ? \":{$parsed['port']}\" : '';\n $this->baseUrl .= '/';\n\n $urlPathQuery = $parsed['path'] ? \"{$parsed['path']}/\" : '';\n $urlPathQuery.= $parsed['query'] ? \"?{$parsed['query']}\" : '';\n\n $this->baseUrl = $this->baseUrl.trim($urlPathQuery, '/');\n }",
"protected function baseUrl()\n\t{\n\t\treturn WEB_ROOT;\n\t}",
"function base_url()\n{\n\t$root='';\n\t$root = \"http://\".$_SERVER['HTTP_HOST'];\n $root .= \"/\".DIR_MAIN;\n\treturn $root;\n}",
"public function baseUrl($url = \"\") {\n\t\treturn $this->getPublicDirectory() . '/' . $url;\n\t}",
"static public function root() //admin/example/images/\n\t{\n\t\t/*SERVER HTTP_HOST*/\n\t}",
"function css($filename)\r\n{\r\n return '..' .str_replace(BASE_PATH, \"\", ASSETS_DIR . 'css/'.$filename);\r\n}",
"public function setBaseUrl($url) {\n\t\t$this->baseUrl = $url;\n\t}",
"function bbp_get_root_url()\n{\n}",
"public function init() {\n $this->view->baseUrl = $this->_request->getBaseUrl();\n }",
"public function setBaseUrl($url)\n\t{\n\t\t$this->baseUrl = $url;\n\t}",
"public function setWebroot(string $webroot): void\n {\n $this->webroot = $webroot;\n }",
"public function setCssDirectoryURL($cssDirectoryURL)\n\t{\n\t\t$this->cssDirectoryURL = $cssDirectoryURL;\n\t}",
"public static function getRootURL(): string\n\t{\n\t\t$inst = self::_ensureInit();\n\t\tif (NULL === $inst->_rootURL) {\n\t\t\t$inst->_rootURL = Config::get(ConfigConstants::BASE_HREF, false);\n\t\t\tif (false === $inst->_rootURL) {\n\t\t\t\tif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {\n\t\t\t\t\t$protocol = $_SERVER['HTTP_X_FORWARDED_PROTO'];\n\t\t\t\t} else {\n\t\t\t\t\t$protocol = (empty($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'off') ? 'http' : 'https';\n\t\t\t\t}\n\t\t\t\t$inst->_rootURL = \"{$protocol}://{$_SERVER['HTTP_HOST']}\" . preg_replace('#/mfx$#', '/', dirname($_SERVER['PHP_SELF']));\n\t\t\t\tif (!preg_match('#/$#', $inst->_rootURL)) {\n\t\t\t\t\t$inst->_rootURL .= '/';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $inst->_rootURL;\n\t}",
"protected function getThemeURL() {\n return \\Config::getInstance()->getThemeURL() . '/';\n }"
] | [
"0.64081424",
"0.62502205",
"0.62391317",
"0.61416423",
"0.6035131",
"0.5989589",
"0.598633",
"0.59772843",
"0.5956923",
"0.59023345",
"0.5888968",
"0.5882989",
"0.5878314",
"0.58637714",
"0.5842178",
"0.5840834",
"0.5825609",
"0.58066803",
"0.5799798",
"0.57785994",
"0.5778374",
"0.5749109",
"0.57216924",
"0.5720675",
"0.5710054",
"0.569347",
"0.56756765",
"0.56623495",
"0.565785",
"0.5641759"
] | 0.64257056 | 0 |
set the CSS path the filesystem path where the CSS files are | public function setCssPath($path) {
if(!is_dir($path)) {
print "[error] $path doesn't exist, it cannot be used as the CSS path.\n";
} else if(!is_readable($path)) {
print "[error] $path is not readable, it cannot be used as the CSS path.\n";
} else {
$this->_cssPath = $path;
print "[info] CSS path set to $path\n";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set_css($path){\n\t\n\t//\tReset css-property:\n\t\t$this->ccs = array();\n\t\n\t//\tCheck path:\n\t\tif (is_null($path)) {return $this->css;}\n\t\tif (!is_string($path)) {return $this->css;}\n\t\n\t\n\t//\tRead file into string:\n\t\t$ccs = new css($path);\n\t\t\n\t\t$this->pdf_ccs = $ccs->get_css_array();\n\t\t\n\t\treturn $this->pdf_ccs;\n\t}",
"public function addCSS($path)\n {\n $this->stylesheets[] = \"../management/$path\";\n return $this;\n }",
"protected function loadCss($path)\n {\n $this->page->addCss($path);\n }",
"public function set_style($path){\n\t\t\n\t//\tReset style-property:\n\t\t$this->style = '';\n\t\t\n\t//\tCheck path:\n\t\tif (is_null($path)) {return $this->style;}\n\t\tif (!is_string($path)) {return $this->style;}\n\t\n\t//\tCheck if file \n\t\t$path = ROOT_ENV.trim($path);\n\t\tif (!file_exists($path) ){return $this->style;}\n\t\t\n\t//\tRead file into string:\n\t\t$this->style = '<style>'.trim(file_get_contents($path)).'</style>';\n\t\t\n\t\treturn $this->style;\n\t}",
"public function setCss($css)\n\t{\n\t\t$this->_cssFiles = $css;\n\t}",
"function includeCss($path) {\n echo '<link rel=\"stylesheet\" href=\"' . $this->getUrl($path) . '\">';\n }",
"public function add($path) {\n\t\t$location = $this->_cssPath.$path;\n\t\t\n\t\tif(is_null($this->_cssPath)) {\n\t\t\tprint \"[error] please set CSS path before adding stylesheets\\n\";\n\t\t}\n\t\t\n\t\tif(file_exists($location) && is_readable($location)) {\n\t\t\t$this->_sources[$path] = file_get_contents($this->_cssPath.$path);\n\t\t\tprint '[info] stylesheet successfully added: '.$path.\"\\n\";\n\t\t\t\n\t\t} else {\n\t\t\tprint '[error] cannot find or read stylesheet: '.$location.\"\\n\";\n\t\t}\n\t}",
"public static function headCss($path) {\n\t\tself::$head[$path] = '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.htmlspecialchars($path).'\" />';\n\t}",
"protected static function updateCss()\n {\n tap(new Filesystem, function ($files) {\n $files->deleteDirectory(resource_path('sass'));\n $files->delete(public_path('css/app.css'));\n\n if (!$files->isDirectory($directory = resource_path('css'))) {\n $files->makeDirectory($directory, 0755, true);\n }\n $files->copyDirectory(self::path('resources/css'), resource_path('css'));\n });\n }",
"public function addCSS()\n {\n // $this->addToVar('cssCode', $this->addResource('/twbs/bootstrap/dist/css/bootstrap.min', 'css'));\n // $this->addToVar('cssCode', $this->addResource('/css/alxarafe', 'css'));\n }",
"function css_path( $path = '' ) {\n\n\treturn path( 'styles/' . $path . '?d=' . DECACHE_CSS );\n\n}",
"protected function addCSS($path)\n {\n array_push($this->css, $path);\n }",
"function set_css($css)\r\n {\r\n $this->css = $css;\r\n }",
"public function style($path);",
"public static function set_css( $css )\n\t\t{\n\t\t\tself::set_asset($css, 'css');\n\t\t}",
"public function setCss()\n {\n \n }",
"function __css ($path_to_asset, $flush_cache = FALSE) {\n\techo path_to_asset ('css', $path_to_asset, $flush_cache);\n}",
"function _css ($path_to_asset, $flush_cache = FALSE) {\n\treturn path_to_asset ('css', $path_to_asset, $flush_cache);\n}",
"public function addCssFile(string $path, string $ltr_path = null)\n {\n $this->addAsset($this->css_files, \".css\", $path, $ltr_path);\n }",
"function load_css($folder='')\n {\n if ($handle = opendir($GLOBALS['site_framework_location'].$folder)) {\n \n /* This is the correct way to loop over the directory. */\n while (false !== ($entry = readdir($handle))) {\n \n if(!is_dir($entry))\n {\n $this->add_stylesheet($this->pageroot.$folder.$entry,'');\n \n }\n }\n \n closedir($handle);\n }\n \n \n }",
"function getThemeCSSPath($css_path) \r\n {\t\t\r\n \treturn Theme::getURLTheme().'css/'.$css_path;\r\n }",
"public function addStyleSheet($path) {\n\t\t$this->styleSheets[] = $path;\n\t}",
"public function setCssLintPath($cssLintPath) {\n $this->cssLintPath = $cssLintPath;\n }",
"protected function CSS ($css_file) {\n\t\t$fullpath = Config::get('application.base_path') . \"/css/$css_file\";\n?><link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"<?php echo $fullpath ?>\" />\n<?php\n\t}",
"public function add_css($path)\n {\n $name = basename($path);\n $this->cssfiles[$name] = $path;\n return $this;\n }",
"public function getThemeCssPath()\n {\n $themeDir = $this->getThemeDir();\n return Director::baseFolder() . '/' . $themeDir . '/css';\n }",
"public function set_path( $path ) {\n\t\t$this->path = $path;\n\t}",
"public static function setPath($path)\n {\n static::$path = $path;\n }",
"public function addCssFile(string $path)\n {\n if (in_array($path, $this->cssFiles)) {\n return;\n }\n\n $this->cssFiles[] = $path;\n }",
"public function setPath($path);"
] | [
"0.70534295",
"0.69435406",
"0.69309914",
"0.68616205",
"0.67973924",
"0.67758",
"0.6668426",
"0.6653877",
"0.66340786",
"0.66046846",
"0.65879804",
"0.6582525",
"0.6578368",
"0.65203476",
"0.6467396",
"0.6412051",
"0.6364313",
"0.6346313",
"0.63423437",
"0.62888205",
"0.6213417",
"0.61680996",
"0.6109291",
"0.60964817",
"0.60850185",
"0.6076374",
"0.606765",
"0.6058536",
"0.6056826",
"0.60561544"
] | 0.84862137 | 0 |
Gets the field arguments of the identifier of a given resource. | private function getResourceIdentifiersArgumentsConfiguration(string $resource, string $operationName): array
{
$arguments = [];
$identifiers = $this->identifiersExtractor->getIdentifiersFromResourceClass($resource);
foreach ($identifiers as $identifier) {
$propertyMetadata = $this->propertyMetadataFactory->create($resource, $identifier);
$propertyType = $propertyMetadata->getType();
if (null === $propertyType) {
continue;
}
$arguments[$identifier] = $this->getResourceFieldConfiguration($propertyMetadata->getDescription(), $propertyType, $resource, $operationName, true);
}
if (!$arguments) {
throw new \LogicException("Missing identifier field for resource \"$resource\".");
}
return $arguments;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getQueryFields(string $resource): array\n {\n $queryFields = [];\n $resourceMetadata = $this->resourceMetadataFactory->create($resource);\n $shortName = $resourceMetadata->getShortName();\n\n foreach ($this->getOperations($resourceMetadata, true, true) as $operationName => $queryItemOperation) {\n $fieldNamePrefix = 'get' === $operationName ? '' : $operationName;\n if ($fieldConfiguration = $this->getResourceFieldConfiguration(null, new Type(Type::BUILTIN_TYPE_OBJECT, true, $resource), $resource, $operationName)) {\n $fieldConfiguration['args'] += $this->getResourceIdentifiersArgumentsConfiguration($resource, $operationName);\n $queryFields[lcfirst($fieldNamePrefix.$shortName)] = $fieldConfiguration;\n }\n }\n\n foreach ($this->getOperations($resourceMetadata, true, false) as $operationName => $queryCollectionOperation) {\n $fieldNamePrefix = 'get' === $operationName ? '' : $operationName;\n if ($fieldConfiguration = $this->getResourceFieldConfiguration(null, new Type(Type::BUILTIN_TYPE_OBJECT, false, null, true, null, new Type(Type::BUILTIN_TYPE_OBJECT, false, $resource)), $resource, $operationName)) {\n $queryFields[lcfirst($fieldNamePrefix.Inflector::pluralize($shortName))] = $fieldConfiguration;\n }\n }\n\n return $queryFields;\n }",
"protected function getArguments()\n {\n return array(\n array('resource', \\Symfony\\Component\\Console\\Input\\InputArgument::REQUIRED, 'Resources name.'),\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('resource', InputArgument::REQUIRED, 'The id of the resource from which this action is removed.'),\n array('action name', InputArgument::REQUIRED, 'The name of the action to remove from the ressource.'),\n\t\t);\n\t}",
"public function getParameters()\n\t{\n\t\t$arg = new Template_Variable_Argument;\n\t\t$arg->name = 'property';\n\t\t$arg->display_name = 'Տվյալի անվանում';\n\t\t$arg->is_required = true;\n\t\t$arg->values = array(\n\t\t\tnew Template_Variable_Argument_Value('address', 'հասցե')\n\t\t\t//@TODO add other variable values to Template_Variable_Realty\n\t\t);\n\t\treturn array($arg);\n\t}",
"public function getArguments();",
"public function getArguments();",
"public function getArguments();",
"protected function getArguments() {\n\t\treturn [\n\t\t\t['jobId', InputArgument::REQUIRED, 'Id of job'],\n\t\t\t['fromCourse', InputArgument::REQUIRED, 'Id of from Course'],\n\t\t\t['toCourse', InputArgument::REQUIRED, 'Id of to course'],\n\t\t\t['backOfficeUser', InputArgument::REQUIRED, 'Id of back-office user'],\n\t\t];\n\t}",
"protected function getArguments()\n {\n return [\n ['CompanyID', InputArgument::REQUIRED, 'Argument CompanyID'],\n ['JobID', InputArgument::REQUIRED, 'Argument JobID '],\n ];\n }",
"protected function getArguments()\n {\n return [\n ['CompanyID', InputArgument::REQUIRED, 'Argument CompanyID'],\n ['JobID', InputArgument::REQUIRED, 'Argument JobID '],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['file', InputArgument::REQUIRED, 'File to crop.'],\n\t\t\t['id', InputArgument::REQUIRED, 'Id of Case.'],\n\t\t];\n\t}",
"protected function getArguments()\n {\n return array(\n array('id', InputArgument::OPTIONAL, 'Post ID'),\n );\n }",
"public function getParameters()\n\t{\n\t\t$arg = new Template_Variable_Argument;\n\t\t$arg->name = 'property';\n\t\t$arg->display_name = 'Ատրիբուտի անվանում';\n\t\t$oTypes = new Transaction_Property_Types();\n\t\t$result = $oTypes->getTypes(array(), false);\n\t\twhile($row = $oTypes->db_fetch_array($result))\n\t\t{\n\t\t\t$arg->values[] = new Template_Variable_Argument_Value($row['id'], $row['label']);\n\t\t}\n\t\treturn array($arg);\n\t}",
"public function getArgs(){\n\t\t$args = array();\n\t\t\n\t\tif ($this->args){\n\t\t\tforeach($this->args as $k => $varName){\n\t\t\t\t$args[substr($varName,1)] = $this->f_args[$k];\n\t\t\t}\n\t\t}\n\t\treturn $args;\n\t}",
"protected function getArguments()\n {\n return [\n ['integration', InputArgument::REQUIRED, 'The integration to use'],\n ['resource', InputArgument::REQUIRED, \"The resource for which a {$this->type} class will be generated.\"],\n ['api', InputArgument::OPTIONAL, \"The API that the resource belongs to.\"],\n ];\n }",
"protected function js_field_args() {\n\t\t\treturn array();\n\t\t}",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the class'],\n ['columns', InputArgument::OPTIONAL, 'The columns of the fillabel list'],\n ['colType', InputArgument::IS_ARRAY, 'The type of the fillabel type list'],\n ];\n }",
"public function args()\n {\n // it is passed to resolve() below\n return [\n 'id' => ['name' => 'id', 'type' => Type::nonNull(Type::int())],\n ];\n }",
"protected function getArguments()\n {\n return [\n ['CompanyID', InputArgument::REQUIRED, 'Argument CompanyID'],\n ['CronJobID', InputArgument::REQUIRED, 'Argument CronJobID'],\n ];\n }",
"abstract protected function get_arguments();",
"abstract protected function get_arguments();",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('game_id', InputArgument::REQUIRED, 'Game ID'),\n\t\t\tarray('server_id', InputArgument::REQUIRED, 'Server ID'),\n\t\t\tarray('db_qiqiwu', InputArgument::REQUIRED, 'Qiqiwu Database'),\n\t\t);\n\t}",
"function get_arguments( )\n\t{\n\t\t$args['line'] = $this->line;\n\t\t$args['file'] = $this->file_name;\n\t\t$args['error'] = $this->error;\n\t\t$args['query'] = $this->pass_query;\n\n\t\treturn $args;\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t//array('server_id', InputArgument::REQUIRED, 'Server ID'),\n\t\tarray('db_qiqiwu', InputArgument::REQUIRED, 'Qiqiwu Database'),\n\t\tarray('db_name', InputArgument::REQUIRED, 'Name Database'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'Name of the Crud.'],\n ['title', InputArgument::REQUIRED, 'Title for the page.'],\n ['key', InputArgument::REQUIRED, 'Key for the object.'],\n ['table_name', InputArgument::REQUIRED, 'table name for object.'],\n\n ];\n }",
"public function getArgs();",
"public function getArgs();",
"protected function getFieldsArgs(int $objectId = 0): array\n {\n $args = [];\n\n foreach ($this->fields as $field) {\n $fieldArgs = $field->getProps();\n $fieldArgs['content'] = $field->render($objectId);\n $args[] = $fieldArgs;\n }\n\n return $args;\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['queueid', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n {\n return [\n ['chunks', InputArgument::REQUIRED, 'How many chunks of each collection to iterate. (2, 3, 4 and etc.)'],\n ];\n }"
] | [
"0.6147786",
"0.6120019",
"0.603334",
"0.5910463",
"0.5877416",
"0.5877416",
"0.5877416",
"0.5876959",
"0.5857126",
"0.5857126",
"0.58340645",
"0.58291894",
"0.5790947",
"0.5720051",
"0.57189405",
"0.5710131",
"0.5692649",
"0.56846964",
"0.566837",
"0.5644853",
"0.5644853",
"0.56345665",
"0.5609871",
"0.5595001",
"0.5590412",
"0.5582598",
"0.5582598",
"0.5554851",
"0.5541678",
"0.55169845"
] | 0.65741473 | 0 |
Converts a builtin type to its GraphQL equivalent. | private function convertType(Type $type, string $operationName, bool $isInput = false): GraphQLType
{
switch ($type->getBuiltinType()) {
case Type::BUILTIN_TYPE_BOOL:
$graphqlType = GraphQLType::boolean();
break;
case Type::BUILTIN_TYPE_INT:
$graphqlType = GraphQLType::int();
break;
case Type::BUILTIN_TYPE_FLOAT:
$graphqlType = GraphQLType::float();
break;
case Type::BUILTIN_TYPE_STRING:
$graphqlType = GraphQLType::string();
break;
case Type::BUILTIN_TYPE_OBJECT:
if (is_a($type->getClassName(), \DateTimeInterface::class, true)) {
$graphqlType = GraphQLType::string();
break;
}
try {
$className = $type->isCollection() ? $type->getCollectionValueType()->getClassName() : $type->getClassName();
$resourceMetadata = $this->resourceMetadataFactory->create($className);
} catch (ResourceClassNotFoundException $e) {
throw new InvalidTypeException();
}
$graphqlType = $this->getResourceObjectType($className, $resourceMetadata, $operationName, $isInput);
break;
default:
throw new InvalidTypeException();
}
if ($type->isCollection()) {
return $this->paginationEnabled ? $this->getResourcePaginatedCollectionType($graphqlType, $isInput) : GraphQLType::listOf($graphqlType);
}
return $type->isNullable() ? $graphqlType : GraphQLType::nonNull($graphqlType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toType(): GraphQLType\n {\n return new CustomScalarType([\n 'name' => $this->name(),\n 'serialize' => [$this, 'serialize'],\n 'parseValue' => [$this, 'parseValue'],\n 'parseLiteral' => [$this, 'parseLiteral'],\n ]);\n }",
"public static function register_type() {\n\t\tregister_graphql_enum_type(\n\t\t\t'PostObjectFieldFormatEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The format of post field data.', 'wp-graphql' ),\n\t\t\t\t'values' => [\n\t\t\t\t\t'RAW' => [\n\t\t\t\t\t\t'name' => 'RAW',\n\t\t\t\t\t\t'description' => __( 'Provide the field value directly from database', 'wp-graphql' ),\n\t\t\t\t\t\t'value' => 'raw',\n\t\t\t\t\t],\n\t\t\t\t\t'RENDERED' => [\n\t\t\t\t\t\t'name' => 'RENDERED',\n\t\t\t\t\t\t'description' => __( 'Apply the default WordPress rendering', 'wp-graphql' ),\n\t\t\t\t\t\t'value' => 'rendered',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"public function type()\n {\n $type = GraphQL::type($this->type);\n\n return $this->collection ? Type::listOf($type) : $type;\n }",
"public function toGraphQLType(array $options = []): BaseType\n {\n return $this->type = new UnionType(array_merge($this->toArray(), $options));\n }",
"function cast($type);",
"public function getGraphQLTypeName() {\n $name = $this->conf('graphQLType', str_replace(' ','',$this->getLabel()));\n return 'Rbac'.$name;\n }",
"public static function register_type() {\n\t\tregister_graphql_enum_type(\n\t\t\t'PostObjectsConnectionDateColumnEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The column to use when filtering by date', 'wp-graphql' ),\n\t\t\t\t'values' => [\n\t\t\t\t\t'DATE' => [\n\t\t\t\t\t\t'value' => 'post_date',\n\t\t\t\t\t],\n\t\t\t\t\t'MODIFIED' => [\n\t\t\t\t\t\t'value' => 'post_modified',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"public function type();",
"public function type();",
"public function type();",
"abstract function getTypeToSql($field);",
"function graphql_register_types()\n{\n\tregister_graphql_field('Page', 'kpi', [\n\t\t'type' => 'String',\n\t\t'description' => 'Key Performance Indicators',\n\t\t'resolve' => function ($post) {\n\t\t\t$kpi_post_meta = get_post_meta($post->ID, KEY_PERFORMANCE_INDICATORS_META_FIELD, true);\n\t\t\treturn !empty($kpi_post_meta['rendered']) ? $kpi_post_meta['rendered'] : '';\n\t\t}\n\t]);\n}",
"public function phpType(): string;",
"public function type(): Type\n {\n return GraphQL::type('Lead');\n }",
"public function getGraphQLType() {\n return new RbacNodeType($this);\n }",
"public function ogType();",
"abstract public function type();",
"abstract public function type();",
"function map_field_type_to_bind_type($field_type)\n{\n switch ($field_type) {\n case MYSQLI_TYPE_DECIMAL:\n case MYSQLI_TYPE_NEWDECIMAL:\n case MYSQLI_TYPE_FLOAT:\n case MYSQLI_TYPE_DOUBLE:\n return 'd';\n\n case MYSQLI_TYPE_BIT:\n case MYSQLI_TYPE_TINY:\n case MYSQLI_TYPE_SHORT:\n case MYSQLI_TYPE_LONG:\n case MYSQLI_TYPE_LONGLONG:\n case MYSQLI_TYPE_INT24:\n case MYSQLI_TYPE_YEAR:\n case MYSQLI_TYPE_ENUM:\n return 'i';\n\n case MYSQLI_TYPE_TIMESTAMP:\n case MYSQLI_TYPE_DATE:\n case MYSQLI_TYPE_TIME:\n case MYSQLI_TYPE_DATETIME:\n case MYSQLI_TYPE_NEWDATE:\n return 't';\n\n case MYSQLI_TYPE_INTERVAL:\n case MYSQLI_TYPE_SET:\n case MYSQLI_TYPE_VAR_STRING:\n case MYSQLI_TYPE_STRING:\n case MYSQLI_TYPE_CHAR:\n case MYSQLI_TYPE_GEOMETRY:\n return 's';\n\n case MYSQLI_TYPE_TINY_BLOB:\n case MYSQLI_TYPE_MEDIUM_BLOB:\n case MYSQLI_TYPE_LONG_BLOB:\n case MYSQLI_TYPE_BLOB:\n return 'b';\n\n default:\n trigger_error(\"unknown type: $field_type\");\n return 's';\n }\n}",
"public function getTypeValue(): string;",
"abstract protected function getOpenGraphType();",
"public static function normalizeType(string $type): string\n {\n switch ($type) {\n case 'string':\n return self::STRING;\n case 'int':\n case 'integer':\n return self::INTEGER;\n case 'double':\n case 'float':\n return self::FLOAT;\n case 'bool':\n case 'boolean':\n return self::BOOLEAN;\n case 'array':\n return self::ARRAY;\n case 'null':\n case 'NULL':\n return self::NULL;\n case 'resource':\n return self::RESOURCE;\n case '?':\n return self::WILDCARD;\n default:\n return self::OBJECT;\n }\n }",
"public function register_type() {\n register_graphql_type( self::TYPE, [\n 'description' => __('The user who created the entry.', 'wp-graphql-gravity-forms'),\n 'fields' => [\n 'node' => [\n 'type' => 'User',\n 'description' => __( 'The user who created the entry.', 'wp-graphql-gravity-forms' ),\n ],\n ],\n ] );\n }",
"function _metatag_importer_convert_type($type) {\n // define('NODEWORDS_TYPE_DEFAULT', 1);\n // define('NODEWORDS_TYPE_ERRORPAGE', 2);\n // define('NODEWORDS_TYPE_FRONTPAGE', 3);\n // define('NODEWORDS_TYPE_NONE', 0);\n // define('NODEWORDS_TYPE_NODE', 5);\n // define('NODEWORDS_TYPE_PAGE', 10);\n // define('NODEWORDS_TYPE_PAGER', 4);\n // define('NODEWORDS_TYPE_TERM', 6);\n // define('NODEWORDS_TYPE_TRACKER', 7);\n // define('NODEWORDS_TYPE_USER', 8);\n // define('NODEWORDS_TYPE_VOCABULARY', 9);\n switch ($type) {\n case 1:\n return 'global';\n\n case 2:\n return 'global:404';\n\n case 3:\n return 'global:frontpage';\n\n // @todo Not yet sure how to handle pager items?\n // case 4:\n // return 'pager';\n\n case 5:\n return 'node';\n\n case 6:\n return 'taxonomy_term';\n\n // @todo Not sure what to do with tracker pages.\n // case 7:\n // return 'tracker';\n\n case 8:\n return 'user';\n\n // @todo Vocabulary records need to be converted to a config for that entity\n // bundle.\n // case 9:\n // return 'vocabulary';\n\n // @todo Page records need to be converted to Context definitions.\n // case 10:\n // return 'page';\n }\n\n return FALSE;\n}",
"public function type(): string;",
"public function getObjectTypeOrClassStringObjectType(): Type;",
"abstract public function getSQLType();",
"public function filter_wpseo_opengraph_type($type){\n\t\t \n\t\t\treturn $type;\n\t\t}",
"public function dbType();",
"public function type() {}"
] | [
"0.66936994",
"0.57318443",
"0.57276386",
"0.5651142",
"0.5442306",
"0.5412607",
"0.53295",
"0.53273463",
"0.53273463",
"0.53273463",
"0.53230405",
"0.53212297",
"0.5306171",
"0.5254317",
"0.52360165",
"0.52215904",
"0.5173745",
"0.5173745",
"0.5157378",
"0.51537764",
"0.51478225",
"0.5142936",
"0.514142",
"0.5059169",
"0.5056728",
"0.50388646",
"0.50385624",
"0.50320244",
"0.50169504",
"0.50099754"
] | 0.5909841 | 1 |
Gets the type of a paginated collection of the given resource type. | private function getResourcePaginatedCollectionType($resourceType, bool $isInput = false)
{
$shortName = $resourceType->name.($isInput ? 'Input' : '');
if (isset($this->resourceTypesCache["{$shortName}Connection"])) {
return $this->resourceTypesCache["{$shortName}Connection"];
}
$edgeObjectTypeConfiguration = [
'name' => $shortName.'Edge',
'description' => "Edge of $shortName.",
'fields' => [
'node' => $resourceType,
'cursor' => GraphQLType::nonNull(GraphQLType::string()),
],
];
$edgeObjectType = $isInput ? new InputObjectType($edgeObjectTypeConfiguration) : new ObjectType($edgeObjectTypeConfiguration);
$pageInfoObjectTypeConfiguration = [
'name' => $shortName.'PageInfo',
'description' => 'Information about the current page.',
'fields' => [
'endCursor' => GraphQLType::string(),
'hasNextPage' => GraphQLType::nonNull(GraphQLType::boolean()),
],
];
$pageInfoObjectType = $isInput ? new InputObjectType($pageInfoObjectTypeConfiguration) : new ObjectType($pageInfoObjectTypeConfiguration);
$configuration = [
'name' => $shortName.'Connection',
'description' => "Connection for $shortName.",
'fields' => [
'edges' => GraphQLType::listOf($edgeObjectType),
'pageInfo' => GraphQLType::nonNull($pageInfoObjectType),
],
];
return $this->resourceTypesCache[$shortName.'Connection'] = $isInput ? new InputObjectType($configuration) : new ObjectType($configuration);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getResourceListType()\n\t{\n\t\tif (is_object($this->res_node))\n\t\t{\n\t\t\t$children = $this->res_node->child_nodes();\n\t\t\tif (is_object($children[0]))\n\t\t\t{\n\t\t\t\treturn $children[0]->get_attribute(\"Type\");\n\t\t\t}\n\t\t}\n\t}",
"public function getPageType()\n {\n return $this->_pageType;\n }",
"abstract public function getCollectionType(): string;",
"public function getCollection($type)\n\t{\n\t\tif(!isset($this->_collections[$type]))\n\t\t{\n\t\t\t$this->_collections[$type] =\n\t\t\t\tYaPhpDoc_Token_Structure_Collection_Abstract\n\t\t\t\t\t::getCollection($this, $type);\n\t\t}\n\t\treturn $this->_collections[$type];\n\t}",
"abstract public function getCollectionTypeHelper();",
"public function type()\n {\n return GraphQL::paginate('solicitudType');\n }",
"public function get_type() {\n debugging('Call to deprecated method moodle_page::get_type. Please use $PAGE->pagetype instead.');\n return $this->get_pagetype();\n }",
"public function type()\n {\n $type = GraphQL::type($this->type);\n\n return $this->collection ? Type::listOf($type) : $type;\n }",
"public function getPagingType(): string {\n\t\treturn (string)$this->_getConfig('pagingType');\n\t}",
"function TypeCollection( $type )\n\t{\n\n\t\tif( !in_array( $type, $this->GetSchema ) )\n\t\t\treturn false;\n\n\t\t$table_name = strtolower( get_class( $this ) );\n\t\t$query = \"SELECT {$type} FROM {$table_name} GROUP BY {$type}\";\n\t\treturn $this->Collection( $query, null, 'Entity' );\n\t}",
"public function getResourceType()\n {\n return $this->type;\n }",
"public function pageType()\n\t{\n\t\treturn $this->firstPart;\n\t}",
"public function getResourceType()\n {\n return $this->route->getResourceType();\n }",
"public function getType() {\n if (!$this->paperType && is_int($this->getTypeId())) {\n $paperTypes = CachedConferenceApi::getPaperTypes();\n\n foreach ($paperTypes as $paperType) {\n if ($paperType->getId() == $this->type_id) {\n $this->paperType = $paperType;\n break;\n }\n }\n }\n\n return $this->paperType;\n }",
"public function type()\n {\n if ($this->_uri) {\n $res = $this->get($this->_uri);\n return $res->type();\n } else {\n return null;\n }\n }",
"public function getType()\n {\n return $this->getParam('_type');\n }",
"protected function _getCollectionForLoad($entityType)\n {\n return Mage::getResourceModel($entityType.'_collection');\n }",
"public function getType(){\r\n if( isset( $this->object_type_lists[ $this->type ] ) )\r\n {\r\n return $this->object_type_lists[ $this->type ];\r\n }\r\n return $this->type;\r\n }",
"function get_page_type() {\n\t\t\t$page_type = 'pages';\n\t\t\t\n\t\t\tif(is_404()) {\n\t\t\t\t$page_type = '404';\n\t\t\t}\n\t\t\t\n\t\t\tif(is_search()) {\n\t\t\t\t$page_type = 'search';\n\t\t\t}\n\t\t\t\n\t\t\tif(is_single()) {\n\t\t\t\t$page_type = 'single';\n\t\t\t}\n\t\t\t\n\t\t\tif(is_archive()) {\n\t\t\t\t$page_type = 'archive';\n\t\t\t}\n\t\t\t\n\t\t\treturn $page_type;\n\t\t}",
"public function getParent()\n {\n return CollectionType::class;\n }",
"public function getType($type)\n {\n return $this->transform(\n function($value) use($type) {\n if($this->isNestedQueryArray($value)) {\n return $this->query->make($value)->get($type);\n }\n }\n )->toArray();\n }",
"public function getType()\n\t{\n\t\treturn $this->hit['_type'];\n\t}",
"public function ctr() {\n return static::$collectionTypeReference;\n }",
"public function getCollectionClass ()\n {\n return Doctrine_Manager::getInstance()->getAttribute(Doctrine::ATTR_COLLECTION_CLASS);\n }",
"public function getResourceType()\n {\n if (!$this->_resourceType) {\n $this->setResourceType($this->getRequest()->getResourceType());\n }\n return $this->_resourceType;\n }",
"public function getCollection($collectionType, $connectionType=null)\n {\n $url = \"/{$this->id}/{$collectionType}/\";\n\n if (!is_string($collectionType) || $collectionType === \"\") {\n throw new Exception(\"Collection type must be string or must be null to set as default\");\n }\n\n if (!isset($this->_data->$collectionType)) {\n $response = $this->_getController()->getApi()->api($url);\n\n $data = $response['data'];\n\n if (isset($connectionType) && is_string($connectionType) && $connectionType !== \"\") {\n foreach($data as $datum)\n {\n $datum['type'] = $connectionType;\n }\n }\n\n $this->_data->$collectionType = new LibFacebook_Collection($data, $connectionType);\n }\n\n return $this->_data->$collectionType;\n\n }",
"protected function _getCollectionClass()\r\r\n {\r\r\n return 'sm_cameraslide/slide';\r\r\n }",
"private function loadCustomTypes(): TypeCollection\n {\n $response = $this->getClient()->execute(TypeQueryRequest::of());\n $collection = new TypeCollection();\n\n // TODO Exit on Error.\n\n if (($response instanceof PagedQueryResponse) && $response->getCount()) {\n $collection = $response->toObject();\n }\n\n return $collection;\n }",
"public function getType() {\n\t\treturn $this->get('type');\n\t}",
"public function index()\n {\n $types = Type::with('items')->paginate(15);\n\n return new TypesResource($types);\n }"
] | [
"0.64679736",
"0.6153883",
"0.61300373",
"0.5913951",
"0.5817136",
"0.57124853",
"0.56886375",
"0.5676478",
"0.56615025",
"0.55974",
"0.5596049",
"0.55461085",
"0.5471442",
"0.54143107",
"0.54091734",
"0.5403298",
"0.5388197",
"0.5377347",
"0.53519493",
"0.531189",
"0.53052586",
"0.53050387",
"0.52855325",
"0.5280585",
"0.52603316",
"0.5243612",
"0.5218012",
"0.51888186",
"0.5181815",
"0.51685"
] | 0.6740992 | 0 |
Get data source handler instance. | public function getDataSourceHandler()
{
return new \Bridge\Components\Exporter\ArrayHandler($this->getData());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDataHandler(): DataHandler\n {\n return $this->dataHandler;\n }",
"public function getDataSource()\n {\n return $this->data_source;\n }",
"public function getDataSource()\r\n {\r\n if (null === $this->_dataSource) {\r\n $this->_setDataSource();\r\n }\r\n return $this->_dataSource;\r\n }",
"public function getDataSource ( );",
"public function getDataSource()\n {\n return $this->dataSource;\n }",
"public function getDataSource()\n {\n return $this->dataSource;\n }",
"public function getDataSource()\r\n\t{\r\n\t\treturn $this->dataSource;\r\n\t}",
"public function getHandler(): mixed\n {\n return $this->handler;\n }",
"public static function getDatasource() : Datasource\n {\n return static::$datasource;\n }",
"public function datasource()\n {\n return $this->_datasource;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"public static function getHandler () {\n return self::$_handler;\n }",
"protected function readDataSource() { return $this->_datasource; }",
"protected function readDataSource() { return $this->_datasource; }",
"public function getDatasource()\n {\n \\Logger::getLogger(\\get_class($this))->debug(__METHOD__);\n return $this->datasource;\n }",
"public function getHandler()\n\t{\n\t\treturn $this->handler;\n\t}",
"public function getHandler()\n\t{\n\t\treturn $this->handler;\n\t}",
"public static function getDatasource() : Datasource;",
"public function getDatabaseHandler(): DatabaseHandler\n {\n return $this->databaseHandler;\n }",
"public function handler(){\n return $this->handler;\n }",
"public function get_handler() : handler {\n if ($this->handler === null) {\n $this->handler = handler::get_handler($this->get('component'), $this->get('area'), $this->get('itemid'));\n }\n return $this->handler;\n }",
"public function get_import_export_handler_instance() {\n\n\t\treturn $this->import_export_handler;\n\t}",
"public function getHandler();",
"public function getHandler();",
"public function getHandler();",
"public function getHandler();",
"public static function getHandler()\n {\n $this_class_name = get_called_class();\n return new $this_class_name(false);\n }"
] | [
"0.74075824",
"0.6730402",
"0.6670719",
"0.653713",
"0.64797926",
"0.64797926",
"0.64085597",
"0.63343793",
"0.6333123",
"0.6178648",
"0.61684775",
"0.61684775",
"0.61684775",
"0.61684775",
"0.61430514",
"0.6105545",
"0.6105545",
"0.6038273",
"0.6017418",
"0.6017418",
"0.6016091",
"0.5998356",
"0.5973552",
"0.5912729",
"0.58964276",
"0.5830567",
"0.5830567",
"0.5830567",
"0.5830567",
"0.5808301"
] | 0.71038866 | 1 |
Update the "remember me" token for the given user in storage. | public function updateRememberToken(Authenticatable $user, $token){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateRememberToken(HkmUserInterface $user, $token);",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n \n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n\n }",
"public function updateRememberToken()\n {\n if ($this->getRememberMe() == 1) { // If user checked rememberMe option\n $credentials = [\n $this->params['db.identifier'] => $this->getIdentifier(),\n ];\n $token = $this->refreshRememberToken($credentials);\n $this->set($this->params['db.rememberToken'], $token);\n return;\n }\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n\t{\n\t\tSession::put('currentUser.remember_token', $token);\n\t}",
"public function updateRememberToken(Authenticatable $user, $token){\n // not supported\n }",
"public function updateRememberToken(UserContract $user, $token)\n {\n // Not applicable\n }",
"public function updateRememberToken( UserContract $user, $token ) {\n\t\t$identifier = $user->id;\n\t\tlist( $id6d, $company_id ) = explode( '.', $identifier );\n\t\t$user = User::factory( compact( 'id6d', 'company_id' ) );\n\t\t$user->setRememberToken( $token );\n\n\t\t$timestamps = $user->timestamps;\n\n\t\t$user->timestamps = false;\n\n\t\t$user->save();\n\n\t\t$user->timestamps = $timestamps;\n\t}",
"public function updateRememberToken(UserContract $user, $token)\n {\n $this->conn->table($this->table)\n ->where('id', $user->getAuthIdentifier())\n ->update(['remember_token' => $token]);\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n $this->users[$user->username][$user->getRememberTokenName()] = $token;\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n // TODO: Implement updateRememberToken() method.\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n // TODO: Implement updateRememberToken() method.\n }",
"protected function refreshRememberToken(stdClass $user)\r\n {\r\n $keyName = $this->model->getKeyName();\r\n\r\n // Get a new Query from Model.\r\n $query = $this->model->newQuery();\r\n\r\n // Create a new Token and update it into Database.\r\n $user->{$this->rememberToken} = str_random(100);\r\n\r\n $query->where($keyName, $user->{$keyName})\r\n ->update(array($this->rememberToken => $user->{$this->rememberToken}));\r\n }",
"public function updateRememberToken(UserContract $user, $token)\n {\n $this->conn->table($this->table)\n ->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())\n ->update([$user->getRememberTokenName() => $token]);\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n $user->setRememberToken($token);\n\n $user->save();\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n /*$apiAuthToken = Cache::get('dorcas.auth_token.'.$user->getAuthIdentifier(), null);\n if (!empty($apiAuthToken)) {\n $this->sdk->setAuthorizationToken($apiAuthToken);\n }*/\n $resource = $this->sdk->createUserResource($user->getAuthIdentifier());\n $resource->addBodyParam('token', $token)->send('put');\n }",
"protected function setRememberToken(User $user): void\n {\n list($identifier, $token) = $this->recaller->generate();\n\n $this->cookie->set('remember', $this->recaller->generateValueForCookie($identifier, $token));\n\n $this->userProvider->setUserRememberToken($user->id, $identifier,\n $this->recaller->getTokenHasForDatabase($token));\n }",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n $user->setRememberToken($token);\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n }",
"public function updateUserRememberToken($id, $token);",
"public function updateRememberToken(Authenticatable $user, $token)\n {\n throw new \\Exception('LDAPUserProvider: Not possible to use \"remember me\" tokens.');\n }",
"public function putUser(Authenticatable $user, $remember);",
"public function setAndRemember(UserInterface $user);",
"private static function SetRememberMeCookies($user) {\n $_COOKIE[\"user_id\"] = $user->GetId();\n setcookie(\"remember_id\", $user->GetId(), time() + 3600, \"/\");\n $token = bin2hex(random_bytes(30));\n $hashed_token = hash('sha256', $token); //da salvare nel db\n setcookie(\"remember_token\", $token, time() + 3600, \"/\");\n\n //9f219be7fdef76d4d85ace164494b9326d5fd5a6835f8a1c659b4300013a\n //\n $link = MySqlProvider::Connect();\n $id = $user->GetId();\n $query = \"UPDATE users SET remember_token='$hashed_token' WHERE id='$id'\";\n $link->query($query);\n $link->close();\n }",
"public function loginAndRemember(User $user);",
"public function setRememberToken($value){\n $this->rememberToken = $value;\n }",
"public static function set_remember_me()\n {\n // Create the cookie array of the logged in user's id and a hash of\n // their email.\n $cookie = array(\n 'id' => Auth::user()->id,\n 'hash' => Hash::make(Auth::user()->email)\n );\n\n // Set a 'forever' cookie, serializing the array we created above.\n Cookie::forever('gsb_remember_me', serialize($cookie));\n }",
"public function setRememberToken($value)\n {\n\n }",
"public function setRememberToken($value)\n {\n }",
"public function setRememberToken($value)\n {\n }"
] | [
"0.81366956",
"0.7966527",
"0.79172766",
"0.788509",
"0.78603995",
"0.77629334",
"0.77539635",
"0.76656365",
"0.76320225",
"0.7620296",
"0.7603396",
"0.7572261",
"0.7572261",
"0.75162417",
"0.7497165",
"0.7490511",
"0.7381565",
"0.7309504",
"0.7296358",
"0.72587913",
"0.7082535",
"0.7062726",
"0.693283",
"0.692649",
"0.68664604",
"0.6712858",
"0.6667443",
"0.6624536",
"0.6604119",
"0.6604119"
] | 0.79772687 | 1 |
knapSolveFast2($w4, $v4, sizeof($v4) 1, $bobot_maksimal ,$m,$pickedItems) | function knapSolveFast2($w, $v, $i, $aW, &$m, &$pickedItems) {
// Return memo if we have one
if (isset($m[$i][$aW])) {
return array( $m[$i][$aW], $m['picked'][$i][$aW] );
} else {
// At end of decision branch
if ($i == 0) {
if ($w[$i] <= $aW) { // Will this item fit?
$m[$i][$aW] = $v[$i]; // Memo this item
$m['picked'][$i][$aW] = array($i); // and the picked item
return array($v[$i],array($i)); // Return the value of this item and add it to the picked list
} else {
// Won't fit
$m[$i][$aW] = 0; // Memo zero
$m['picked'][$i][$aW] = array(); // and a blank array entry...
return array(0,array()); // Return nothing
}
}
// Not at end of decision branch..
// Get the result of the next branch (without this one)
list ($without_i,$without_PI) = knapSolveFast2($w, $v, $i-1, $aW,$m,$pickedItems);
if ($w[$i] > $aW) { // Does it return too many?
$m[$i][$aW] = $without_i; // Memo without including this one
$m['picked'][$i][$aW] = array(); // and a blank array entry...
return array($without_i,array()); // and return it
} else {
// Get the result of the next branch (WITH this one picked, so available weight is reduced)
list ($with_i,$with_PI) = knapSolveFast2($w, $v, ($i-1), ($aW - $w[$i]),$m,$pickedItems);
$with_i += $v[$i]; // ..and add the value of this one..
// Get the greater of WITH or WITHOUT
if ($with_i > $without_i) {
$res = $with_i;
$picked = $with_PI;
array_push($picked,$i);
} else {
$res = $without_i;
$picked = $without_PI;
}
$m[$i][$aW] = $res; // Store it in the memo
$m['picked'][$i][$aW] = $picked; // and store the picked item
return array ($res,$picked); // and then return it
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$WBC= $ivvallist[0];\r\n$a= $ivvallist[1];\r\n$b= $ivvallist[2];\r\n$c= $ivvallist[3];\r\n\r\n// run the solution code\r\n$WAB= 60*$a;\r\n$WCD= 45*$c;\r\n\t\r\n$FAx= 0;\r\n$FBx= 0;\r\n$FCx= 0;\r\n$FDx= 0;\r\n\t\t\r\n$FCy= $WCD/2;\r\n$FBy= $WBC -$FCy;\r\n$FDy= $WCD -$FCy;\r\n$FAy= $WAB -$FBy;\r\n\r\n$MA= $a*$WAB/2 +$a*$FBy;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $FAx;\r\n$avvallist[1]= $FAy;\r\n$avvallist[2]= $MA;\r\n$avvallist[3]= $FDx;\r\n$avvallist[4]= $FDy;\r\n$avvallist[5]= $FBx;\r\n$avvallist[6]= $FBy;\r\n$avvallist[7]= $FCx;\r\n$avvallist[8]= $FCy;\r\n\r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$c= $ivvallist[0];\r\n$d= $ivvallist[1];\r\n$e= $ivvallist[2];\r\n$f= $ivvallist[3];\r\n\r\n// run the solution code\r\n$w= 600/(4*6);\r\n$W1= $w*8*4; \r\n$W2= $w*$c*$d;\r\n$W3= $w*$e*$f;\r\n$Wp= $W1 +$W2 +$W3;\r\n\t\r\n$xcW= 4*$W1 +(8-$c/2)*$W2 +(8-$e/2)*$W3;\r\n$xc= $xcW/$Wp;\r\n$ycW= 2*$W1 +($d/2)*$W2 +($f/2)*$W3;\r\n$yc= $ycW/$Wp;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $Wp;\t// av11\r\n$avvallist[1]= $xc;\t// av21\r\n$avvallist[2]= $yc;\t// av22\r\n\r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$W1= $ivvallist[0];\r\n$W2= $ivvallist[1];\r\n$c= $ivvallist[2];\r\n$d= $ivvallist[3];\r\n\r\n// run the solution code\r\n$L= 24;\r\n$h= 12;\r\n$RAx= 0;\r\n$RBx= 0;\r\n$RBy= ($c*$W1 +$d*$W2)/$L;\r\n$RAy= $W1 +$W2 -1*$RBy;\r\n\t\r\n$FEx= 0;\r\n$FEy= -1*$RAy;\r\n$ME= 1*$RAy;\r\n\t\r\n$FFx= 0;\r\n$FFy= $W1 -1*$RAy;\r\n$MF= -12*$FFy +$c*$W1;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $RAx;\t// av11\r\n$avvallist[1]= $RAy;\t// av12\r\n$avvallist[2]= $RBx;\t// av21\r\n$avvallist[3]= $RBy;\t// av22\r\n$avvallist[4]= $FEx;\t// av31\r\n$avvallist[5]= $FEy;\t// av32\r\n$avvallist[6]= $ME;\t\t// av41\r\n$avvallist[7]= $FFx;\t// av51\r\n$avvallist[8]= $FFy;\t// av52\r\n$avvallist[9]= $MF;\t\t// av61\r\n\r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$h= $ivvallist[0];\r\n\r\n// run the solution code\r\n$rho= 1000;\t\t\t// kg/m^3\r\n$g= 9.81;\t\t\t// m/s^2\r\n\r\n// find solution and save it\r\n$FPmag= 0.001*$rho*$g*$h*$h/2;\t// kN\r\n$FPdeg= 0;\r\n$yP= $h/3;\t\r\n\r\n// pack the results\t\r\n$avvallist[0]= $FPmag;\r\n$avvallist[1]= $FPdeg;\r\n$avvallist[2]= $yP;\r\n\r\n// return to caller\r\nreturn $avvallist;\r\n}",
"public function solve( ) {\r\n\t\r\n\t\t// Positive and negative elements summation:\r\n\t\tforeach($this->_array as $el) {\r\n\t\t\tif ($el > 0) {\r\n\t\t\t\t$this->_A += $el; $this->_C += $el;\r\n\t\t\t} else {\r\n\t\t\t\t$this->_B += $el; $this->_C -= $el;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Sum validation :\r\n\t\tif (($this->_sum > $this->_A) || ($this->_sum < $this->_B)) {\r\n\t\t\treturn false; // it is impossible to get such a huge/small sum with so small elements!\r\n\t\t}\r\n\t\r\n\t\t//\r\n\t\t// THE PSEUDO-DYNAMIC ALGORITHM :\r\n\t\t//\r\n\t\t// first row reset:\r\n\t\tfor($a = 0; $a <= $this->_C; $a++) {\r\n\t\t\t$this->_V[0][$a] = 0;\r\n\t\t}\r\n\t\r\n\t\t// In the first row only one element can be chosen:\r\n\t\t$first = $this->_array[0] - $this->_B; // we need to shift the index, while array does not accept negative indexes\r\n\t\t$this->_V[0][$first]++;\r\n\t\r\n\t\t// The subsequent rows :\r\n\t\tfor($i = 1; $i < $this->_n; $i++) {\r\n\t\t\t$el = $this->_array[$i]; // the loop takes elements one by one\r\n\t\t\tfor($a = 0, $b = $this->_B; $a <= $this->_C; $a++, $b++) {\r\n\t\t\t\t// \r\n\t\t\t\t// Init:\r\n\t\t\t\t// CASE 4:\r\n\t\t\t\t// \r\n\t\t\t\t$this->_V[$i][$a] = 0; \r\n\t\t\t\t\r\n\t\t\t\t// \r\n\t\t\t\t// CASE 1: We skip the current element\r\n\t\t\t\t//\r\n\t\t\t\t$skipCurrentEl = $this->_V[$i - 1][$a];\r\n\t\t\t\tif ( $skipCurrentEl ) {\r\n\t\t\t\t\t$this->_V[$i][$a] = $skipCurrentEl; // we skip the current a_k element and deduce true value from the previous subset\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\r\n\t\t\t\t// CASE 2: We start path using the current element\r\n\t\t\t\t//\r\n\t\t\t\tif ( $el == $b ) {\r\n\t\t\t\t\t$this->_V[$i][$a]++; // we build a one-element length subset containing only from one element that already equals p\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//\r\n\t\t\t\t// CASE 3: We continue path using the current element\r\n\t\t\t\t//\r\n\t\t\t\t$minusCurrentElIndex = $a - $el;\r\n\t\t\t\tif ( ($minusCurrentElIndex >= 0) && ($minusCurrentElIndex <= $this->_C) ) {\r\n\t\t\t\t\t$sumWithCurrentEl = $this->_V[$i - 1][ $minusCurrentElIndex ];\r\n\t\t\t\t\tif ( $sumWithCurrentEl ) {\r\n\t\t\t\t\t\t// a. construct the sum from elements a_1, a_2, ..., to a_k-1 that has inside a subset which sums up to p - a_k, \r\n\t\t\t\t\t\t// b. use the a_k element to sum to p\r\n\t\t\t\t\t\t$this->_V[$i][$a] += $sumWithCurrentEl;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We now must read the result from the V array:\r\n\t\t$paths = array();\r\n\t\t$this->_addToPathStack($this->_n - 1, $this->_sum, 0);\r\n\t\t$this->_buildPaths($paths);\r\n\t\t\r\n\t\treturn $paths;\r\n\t}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$w= $ivvallist[0];\r\n$h= $ivvallist[1];\r\n\r\n// run the solution code\r\n$F1= 2*$w*3*$h;\r\n$F2= $w*$h;\r\n$FRmag= $F1+$F2;\r\n$FRdeg= -90;\r\n$xR= ($F1*3*$h/2 +$F2*(3*$h+$h/2))/$FRmag;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $FRmag;\r\n$avvallist[1]= $FRdeg;\r\n$avvallist[2]= $xR;\r\n \r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$a= $ivvallist[0];\r\n$b= $ivvallist[1];\r\n$L1= $ivvallist[2];\r\n$L2= $ivvallist[3];\r\n$L= $ivvallist[4];\r\n\r\n// run the solution code\r\n$ebd= exp($b*$L2);\r\n$FR= ($a/$b)*($ebd-1);\r\n$xR= $L1 +(1/$FR)*($a/($b*$b))*( $ebd*($b*$L2-1) +1);\r\n$W= 100;\r\n$FAmag= $FR +$W;\r\n$FAdeg= 90;\r\n$MA= $xR*$FR +$W*$L/2;\t// positive\r\n\r\n// pack the results\t\r\n$avvallist[0]= $FAmag;\r\n$avvallist[1]= $FAdeg;\r\n$avvallist[2]= $MA;\r\n\r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function doIteration($n) {\n\n$u = array_fill(0, $n, 1.0);\n$_tpl = array_fill(0, $n, 0.0);\n\nfor ($i=0; $i<10; $i++){\n $v = AtAv($n,$u, $_tpl);\n $u = AtAv($n,$v, $_tpl);\n}\n\n$vBv = 0.0;\n$vv = 0.0;\n\nfor($i = 0; $i < $n; $i ++) {\n $val = $v[$i];\n $vBv += $u[$i]*$val;\n $vv += $val*$val;\n}\nreturn sqrt($vBv/$vv);\n}",
"function code_solver($ivvallist) {\r\n\r\n//$dbgtxt= \"ivvallist: \".$ivvallist[0].\", \".$ivvallist[1];\r\n//file_put_contents('./debug_ivvallist.txt',$dbgtxt);\t\r\n\r\n// solve the code part of the equations --------------------------------------->\r\n\r\n// unpack the ivs\r\n$Pf= $ivvallist[0];\r\n$Pr= $ivvallist[1];\r\n$muf= $ivvallist[2];\r\n$mur= $ivvallist[3];\r\n\r\n// run the solution code\r\n$P= 460;\r\n$Ff= 0.3*$P;\r\n$Fr= 0.35*$P;\r\n$Af= $Ff/$Pf;\r\n$Ar= $Fr/$Pr;\r\n$Ffmax= $Ff*$muf;\r\n$Frmax= $Fr*$mur;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $Ff;\t\t// av11\r\n$avvallist[1]= $Fr;\t\t// av21\r\n$avvallist[2]= $Af; \t// av31\r\n$avvallist[3]= $Ar;\t\t// av41\r\n$avvallist[4]= $Ffmax;\t// av51\r\n$avvallist[5]= $Frmax; \t// av61\r\n \r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$F1m= $ivvallist[0];\r\n$F2m= $ivvallist[1];\r\n$a21= $ivvallist[2];\r\n$a22= $ivvallist[3];\r\n\r\n// run the solution code\r\n$F2xy= $F2m*cos($a22*M_PI/180);\r\n$F2x= $F2xy*sin($a21*M_PI/180);\r\n$F2y= $F2xy*cos($a21*M_PI/180);\r\n$F2z= -1*$F2m*sin($a22*M_PI/180);\r\n$F1y= -1*$F2y;\r\n$F1z= -1*$F2z;\r\n$F1x= sqrt($F1m*$F1m-$F1y*$F1y-$F1z*$F1z);\r\n$alpha= acos($F1x/$F1m)*180/M_PI;\r\n$beta= acos($F1y/$F1m)*180/M_PI;\r\n$gamma= acos($F1z/$F1m)*180/M_PI;\r\n$FRmag= $F1x+$F2x;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $alpha;\r\n$avvallist[1]= $beta;\r\n$avvallist[2]= $gamma;\r\n$avvallist[3]= $FRmag;\r\n \r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function solve($N, $P, $W, $H) {\n return solve_large($N, $P, $W, $H);\n}",
"function code_solver($ivvallist) {\r\n\r\n//$dbgtxt= \"ivvallist: \".$ivvallist[0].\", \".$ivvallist[1];\r\n//file_put_contents('./debug_ivvallist.txt',$dbgtxt);\t\r\n\r\n// solve the code part of the equations --------------------------------------->\r\n\r\n// unpack the ivs\r\n$W= $ivvallist[0];\r\n$Q= $ivvallist[1];\r\n$theta= $ivvallist[2];\r\n$mus= $ivvallist[3];\r\n\r\n// run the solution code\r\n$thetar= $theta*M_PI/180;\r\n\t\r\n$N= $W*cos($thetar) +$Q*sin($thetar);\r\n$F= $Q*cos($thetar) -1*$W*sin($thetar);\r\nif ( $F > $N*$mus ) { $F= $N*$mus ; }\r\n\r\n// pack the results\t\r\n$avvallist[0]= $N;\t\t// av11\r\n$avvallist[1]= $F;\t\t// av21\r\n \r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function code_solver($ivvallist) {\r\n\r\n// unpack the ivs\r\n$F1x= $ivvallist[0];\r\n$F2mag= $ivvallist[1];\r\n$a21= $ivvallist[2];\r\n$a22= $ivvallist[3];\r\n$F3x= $ivvallist[4];\r\n$F3y= $ivvallist[5];\r\n$F3z= $ivvallist[6];\r\n\r\n// run the solution code\r\n$F2xy= $F2mag*cos($a22*M_PI/180);\r\n$FEx= -1*$F1x +$F2xy*sin($a21*M_PI/180) -1*$F3x;\r\n$FEy= -1*$F2xy*cos($a21*M_PI/180) -1*$F3y;\r\n$FEz= -1*$F2mag*sin($a21*M_PI/180) -1*$F3z;\r\n\r\n// pack the results\t\r\n$avvallist[0]= $FEx;\r\n$avvallist[1]= $FEy;\r\n$avvallist[2]= $FEz;\r\n \r\n// return to caller\r\nreturn $avvallist;\r\n}",
"function run(){\n\n\t//two simple test cases\n\t// $diagram = array_of_dots1();\n\t// $diagram = array_of_dots2();\n\n\t//the diagram given in the picture\n\t// $diagram = array_of_dots3();\n\n\t//the diagram with the \"F\" point added \n\t$diagram = array_of_dots4();\n\n\t$diff_ways = alg($diagram);\n\n\tprint_solution($diff_ways);\n\n}",
"function unlimitBackpacks(int $countVariousThings, int $capacityBackpack, array $weightObjects, array $costObjects)\n{\n $flag = 0;\n $bufMax = 0;\n $d[1000] = [0];\n\n while (!$flag) {\n $flag = 1;\n\n for ($i = 0; $i < $countVariousThings - 1; $i++) {\n\n if ($weightObjects[$i] > $weightObjects[$i + 1]) {\n swap($weightObjects[$i], $weightObjects[$i+1]);\n swap($costObjects[$i], $costObjects[$i+1]);\n $flag = 0;\n }\n }\n }\n\n for ($x = 1; $x <= $capacityBackpack; $x++) {\n $bufMax = 0;\n\n for ($i = 0; $i < $countVariousThings; $i++) {\n\n if (($x - $weightObjects[$i]) >= 0 && ($d[$x - $weightObjects[$i]] + $costObjects[$i]) > $bufMax) {\n $bufMax = $d[$x - $weightObjects[$i]] + $costObjects[$i];\n }\n }\n\n $d[$x] = $bufMax;\n }\n//\n// for ($i = 0; $i <= $capacityBackpack; $i++) {\n// echo \"$d[$i] \";\n// }\n\n echo \"\\n\";\n\n echo \"Стоимость рюкзака: $d[$capacityBackpack] \\n\";\n echo \"Вещей в рюкзаке: \\n\";\n\n while ($capacityBackpack > 0) {\n for ($i = 0; $i < $countVariousThings; $i++) {\n\n if ($capacityBackpack - $weightObjects[$i] >= 0) {\n\n if (($d[$capacityBackpack] - $costObjects[$i]) === $d[$capacityBackpack - $weightObjects[$i]]) {\n\n echo \"$weightObjects[$i] $costObjects[$i] \\n\";\n $capacityBackpack -= $weightObjects[$i];\n break;\n }\n }\n }\n }\n}",
"function konversi($bk){\n\t\tinclude('../config.php');\n\t\t//select data konversi\n\t\t$sql= mysqli_query($koneksi,\"SELECT `nilai_l`,`nilai_m`,`nilai_u` FROM `bobot`\") or die(mysqli_error()); \n\t\tfor($i=0;$i<mysqli_num_rows($sql);$i++){\n\t\t$data = mysqli_fetch_array($sql);\n\t\t$kon[$i] = array \n\t\t(\n\t\t\t$nilai_l = $data['nilai_l'],\n\t\t\t$nilai_m = $data['nilai_m'],\n\t\t\t$nilai_u = $data['nilai_u']\n\t\t);\n\t\t}\n\t\t$vl = $kon[0];\n\t\t$l = $kon[1];\n\t\t$m = $kon[2];\n\t\t$h = $kon[3];\n\t\t$vh = $kon[4];\n\t\tforeach($bk as $key=>$value){\n\t\tif($value == 'VH')\n\t\t\t$tfn[] = $vh; //konversi = konversi data awal ke data fuzzy\n\t\telseif($value == 'H')\n\t\t\t$tfn[] = $h;\n\t\telseif($value == 'M')\n\t\t\t$tfn[] = $m;\n\t\telseif($value == 'L')\n\t\t\t$tfn[] = $l;\n\t\telse\n\t\t\t$tfn[] = $vl;\n\t\t}\n\t\tforeach($tfn as $j => $b){\n\t\t$sum = 0;\n\t\tforeach($b as $c){\n\t\t\t$sum += $c;\n\t\t}\n\t\t$deffval[$j] = $sum/3; //deff = deffuzifikasi\n\t\t}\n\t\t$deff['tfn'] \t= $tfn;\n\t\t$deff['deffval'] = $deffval;\n\t\t\n\t\treturn $deffval;\n\t\t}",
"public function solution5()\n {\n }",
"private function Solver($nF, $nV, &$gV, &$nX, $additionalData = null){\n\n $bRet = false; // OK\n\n $fTargetVal = $gV;\n\n $nX = 0.0;\n\n $bDoneIteration = false;\n\n // Original value to be restored later if necessary\n $fSaveVal = $nV;\n\n $nMaxIter = 100; // Number max of interactions\n\n $fEps = floatval(1e-10);\n $fDelta = floatval(1e-6);\n\n $fBestX = null; // best x axis prev\n $fXPrev = null; // x axis prev\n $fBestF = null; // best formula\n $fFPrev = null; // Formula prev\n $fBestX = $fXPrev = $fSaveVal;\n\n // fFprev: RAIZ(16) === 4 => 4 - 20 => -16\n $fFPrev = $nF($nV, $additionalData) - $fTargetVal; // Calculate a prev formula\n\n\n // Set the first best value with the result of actual value sett\n $fBestF = abs( $fFPrev );\n\n // If best value is below of $fDelta then continue to find the real value\n if ( $fBestF < $fDelta )\n $bDoneIteration = true;\n\n\n // 16+(floatval(1e-10)) -> 1e-16\n $fX = $fXPrev + $fEps;\n $fF = $fFPrev; // saved prev value formula\n //$fSlope = 0.0;\n\n $nIter = 0; // set init counter\n\n $bHorMoveError = false;\n\n\n while ( !$bDoneIteration && ( $nIter++ < $nMaxIter ) ){\n\n $nV = $fX;\n\n $fF = $nF($nV, $additionalData) - $fTargetVal;\n\n if ( $fF == $fFPrev){ // Se os valores forem iguais aos calculados originalmente\n\n $nHorIter = 0;\n\n $fHorStepAngle = 5.0;\n $fHorMaxAngle = 80.4;\n $nHorMaxIter = (int) abs($fHorMaxAngle / $fHorStepAngle);\n\n $bDoneHorMove = false;\n\n while ( !$bDoneHorMove && !$bHorMoveError && $nHorIter++ < $nHorMaxIter )\n {\n\n $fHorAngle = $fHorStepAngle * ((double)$nHorIter);\n\n $fHorTangent = tan($this->deg2rad($fHorAngle));\n\n $nIdx = 0;\n\n while( $nIdx++ < 2 && !$bDoneHorMove )\n {\n $fHorX = null;\n if ( $nIdx == 1 )\n $fHorX = $fX + abs( $fF ) * $fHorTangent;\n else\n $fHorX = $fX - abs( $fF ) * $fHorTangent;\n\n $nV = $fHorX;\n\n $fF = $nF($nV, $additionalData) - $fTargetVal;\n if ( $fF != $fFPrev )\n {\n $fX = $fHorX;\n $bDoneHorMove = true;\n }\n }\n if ( !$bDoneHorMove )\n $bHorMoveError = true;\n\n }\n\n } // end if $f === $fFPrev\n\n if ( $bHorMoveError )\n break;\n else if(abs($fF) < $fDelta){\n // converged to root\n $fBestX = $fX;\n $bDoneIteration = true;\n }else{\n\n if ( (abs($fF) + $fDelta) < $fBestF )\n {\n $fBestX = $fX;\n $fBestF = abs( $fF );\n }\n\n if ( ( $fXPrev - $fX ) != 0 )\n {\n $fSlope = ( $fFPrev - $fF ) / ( $fXPrev - $fX );\n if ( abs( $fSlope ) < $fEps )\n $fSlope = $fSlope < 0.0 ? -$fEps : $fEps;\n }\n else\n $fSlope = $fEps;\n\n $fXPrev = $fX;\n $fFPrev = $fF;\n $fX = $fX - ( $fF / $fSlope );\n\n }\n\n } // End while\n\n // Try a nice rounded input value if possible.\n $fNiceDelta = ( $bDoneIteration && abs( $fBestX ) >= 1e-3 ? 1e-3 : $fDelta );\n\n $nX = $this->approxFloor( ( $fBestX / $fNiceDelta ) + 0.5 ) * $fNiceDelta;\n\n if ( $bDoneIteration )\n {\n $nV = $nX;\n if ( abs( $nF($nV, $additionalData) - $fTargetVal ) > abs( $fF ) )\n $nX = $fBestX;\n $bRet = true;\n }else if ( $bHorMoveError )\n {\n $nX = $fBestX;\n }\n\n //$nV = $fSaveVal;\n if ( !$bDoneIteration )\n {\n throw new \\Exception(\"Interpreter: NA() not available condition, not a real error\", 1);\n }\n\n return $bRet;\n\n }",
"public function firstSolution(){\n for($i=0; $i<sizeof($this->arr);$i++){\n $r = rand(0,(self::$totalcontainer-1));\n if(($this->arr[$i]+self::$wcontainer[$r])>$this->cap){\n $i--;\n }\n else{\n self::$wcontainer[$r]=self::$wcontainer[$r]+$this->arr[$i];\n self::$solution[$i]=$r;\n }\n }\n // echo \"out of this array\\n\";\n\t\t\t\tif(isset($_SESSION[\"array\"])) {\n echo \"<table width='20%' >\\n\";\n echo \"</table>\\n\t\n <table width='20%' border='1' cellspacing='0' cellpadding='0' >\n <tr>\n <td align=center>Object</td>\n <td align=center>Weight</td>\n <td align=center>Container</td>\n </tr>\\n\";\n \n $objects = array();\n $weights = array();\n $containers = array();\n\n for($i=0; $i<sizeof($this->arr);$i++){\n array_push($objects, $i);\n array_push($weights, $this->arr[$i]);\n array_push($containers, self::$solution[$i]);\n echo(\"<tr>\n <td height='40' align=center><p style='font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;color: #CC6600;'> \".$i.\" </td>\n <td height='40' align=center><p style='font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;color: #CC6600;'> \".$this->arr[$i].\" </td>\n <td height='40' align=center><p style='font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;color: #CC6600;'> \".self::$solution[$i].\" </td>\n </tr>\");\n }\n $_SESSION['objects'] = $objects;\n $_SESSION['weights_bpp'] = $weights;\n $_SESSION['containers'] = $containers;\n\n echo \"</table>\\n\";\n }\n header(\"location:index.php#linear_packing_problem\"); \n }",
"public function improveComplexMatchesCausedByHarmonizedModels() {\r\n\t\t\r\n\t\t$correspondencyCache = NLP::loadCorrespondentLabelsFromPersistedFile();\r\n\t\t$nonCorrespondencyCache = NLP::loadNonCorrespondentLabelsFromPersistedFile();\r\n\t\t$matchingCorrespondenceCache = NLP::loadMatchingCorrespondentLabelsFromPersistedFile();\r\n\t\t$matchingNonCorrespondenceCache = NLP::loadMatchingNonCorrespondentLabelsFromPersistedFile();\r\n\t\t$labelElements = NLP::loadLabelElementsFromPersistedFile();\r\n\t\t\r\n\t\t$complexMatches = $this->getComplexMatches();\r\n\t\tforeach ( $complexMatches as $match ) {\r\n\t\t\t$bestSimValue = 0;\r\n\t\t\t$nodeID1ForMap = null;\r\n\t\t\t$nodeID2ForMap = null;\r\n\t\t\t$nodeLabel1ForMap = null;\r\n\t\t\t$nodeLabel2ForMap = null;\r\n\t\t\tforeach ( $match->nodeIDsOfModel1 as $nodeID1 ) {\r\n\t\t\t\tforeach ( $match->nodeIDsOfModel2 as $nodeID2 ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$label1 = $this->epc1->getNodeLabel($nodeID1);\r\n\t\t\t\t\t$label2 = $this->epc2->getNodeLabel($nodeID2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (strtolower($label1) == strtolower($label2)) {\r\n\t\t\t\t\t\t$bestSimValue = 1;\r\n\t\t\t\t\t\t$nodeID1ForMap = $nodeID1;\r\n\t\t\t\t\t\t$nodeID2ForMap = $nodeID2;\r\n\t\t\t\t\t\t$nodeLabel1ForMap = $label1;\r\n\t\t\t\t\t\t$nodeLabel2ForMap = $label2;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Aehnlichkeit ueber Porter-Stems bestimmen\r\n\t\t\t\t\t */\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$node1 = new FunctionOntologyWithSynonyms ($this->epc1, $nodeID1, $label1);\r\n\t\t\t\t\t$node2 = new FunctionOntologyWithSynonyms ($this->epc2, $nodeID2, $label2);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$countWordstemsOfLabel1 = count ( $node1->wordstems );\r\n\t\t\t\t\t$countWordstemsOfLabel2 = count ( $node2->wordstems );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($countWordstemsOfLabel1 > $countWordstemsOfLabel2) {\r\n\t\t\t\t\t\t// Label1 muss immer dasjenigen mit der geringeren Anzahl an Komponenten (Woertern) sein\r\n\t\t\t\t\t\t$node_temp = $node1;\r\n\t\t\t\t\t\t$node1 = $node2;\r\n\t\t\t\t\t\t$node2 = $node_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$countWordstemMappings = 0;\r\n\t\t\t\t\tforeach ( $node1->wordstems as $wordstem1 ) {\r\n\t\t\t\t\t\tforeach ( $node2->wordstems as $wordstem2 ) {\r\n\t\t\t\t\t\t\tif ($wordstem1 == $wordstem2) {\r\n\t\t\t\t\t\t\t\t$countWordstemMappings ++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$stemSimilarity = round ( (2 * $countWordstemMappings / ($countWordstemsOfLabel1 + $countWordstemsOfLabel2)) * 100, 2 );\r\n\r\n\t\t\t\t\tif ( $stemSimilarity >= $bestSimValue ) {\r\n\t\t\t\t\t\t$bestSimValue = $stemSimilarity;\r\n\t\t\t\t\t\t$nodeID1ForMap = $nodeID1;\r\n\t\t\t\t\t\t$nodeID2ForMap = $nodeID2;\r\n\t\t\t\t\t\t$nodeLabel1ForMap = $label1;\r\n\t\t\t\t\t\t$nodeLabel2ForMap = $label2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ( $match->nodeIDsOfModel1 as $nodeID1 ) {\r\n\t\t\t\tforeach ( $match->nodeIDsOfModel2 as $nodeID2 ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $nodeID1ForMap == $nodeID1 && $nodeID2ForMap == $nodeID2 ) continue;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$verb1ForMap = NLP::getLabelVerb($nodeLabel1ForMap, $labelElements);\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ( $this->mapping as $index => $pair ) {\r\n\t\t\t\t\t\t$id1_arr = array_keys($pair);\r\n\t\t\t\t\t\t$id1 = $id1_arr[0];\r\n\t\t\t\t\t\t$id2 = $pair[$id1];\r\n\t\t\t\t\t\t$label1 = $this->epc1->getNodeLabel($id1);\r\n\t\t\t\t\t\t$label2 = $this->epc2->getNodeLabel($id2);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( strtolower($label1) == strtolower($label2) ) continue;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( $nodeID1 == $id1 && $nodeID2 == $id2 ) {\r\n\t\t\t\t\t\t\t$verb1 = NLP::getLabelVerb($label1, $labelElements);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ( !NLP::areAntonymVerbs($verb1, $verb1ForMap) ) {\r\n\t\t\t\t\t\t\t\tunset($this->mapping[$index]);\r\n\t\t\t\t\t\t\t\tprint(\" map between \\\"\".$label1.\"\\\" and \\\"\".$label2.\"\\\" removed (complexity reduction caused by harmonization degree)\\n\");\r\n\t\t\t\t\t\t\t\t//print(\" map between \\\"\".$label1.\"\\\" and \\\"\".$label2.\"\\\" removed (complexity reduction caused by harmonization degree, conflict: \".$nodeLabel1ForMap.\" => \".$nodeLabel2ForMap.\")\\n\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"abstract public function getSolution();",
"abstract protected function computeBestMove(): array;",
"function calculatePlates($targetweight, $barbellweight, $plates)\n{\n\n$loadedweights = [];\n$loadedweight = $barbellweight;\n\nforeach ($plates as $plate)\n{\n while ($loadedweight + ($plate*2) <= $targetweight )\n {\n\n array_push($loadedweights, $plate);\n $loadedweight += $plate*2;\n }\n\n}\n\nreturn $loadedweights;\n}",
"function QDSimilarityVector($queryFinal,$TfIdf,$tokeIndex,$qVector,$N){\r\n\t$QDsimilarity = array_fill(1,$N,0);\r\n\tfor($i=0;$i<count($queryFinal);$i++){\r\n\t\t$token = $TfIdf[$queryFinal[$i]];\r\n\t\t//find document index and add the partial values from dot product\r\n\t\tforeach($token as $key => $value){\r\n\t\t\tif($key > 0 && $key<=$N){\r\n\t\t\t\t$QDsimilarity[$key] = $QDsimilarity[$key]+$value*$qVector[$tokeIndex[$queryFinal[$i]]];\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn $QDsimilarity;\r\n}",
"function fetch_res_bm25($keywords) {\n\t\t\t$k1 = 1.2;\n\t\t\t$b = 0.75;\n\t\t\t$conn = $this->get_conn();\n\t\t\t$result = array();\n\t\t\t// Fetch the idf vector for the query\n\t\t\t$idf_qd = array();\n\t\t\tforeach ($keywords as $keyword) {\n\t\t\t\t$sql = \"SELECT idf FROM idf WHERE term = '\".$keyword.\"'\";\n\t\t\t\t$res = mysqli_query($conn, $sql);\n\t\t\t\t$row = mysqli_fetch_row($res);\n\t\t\t\t$idf = preg_split(\"/[!\\t]+/\", $row[0], -1, PREG_SPLIT_NO_EMPTY);\n\t\t\t\tarray_push($idf_qd, $idf[0]);\n\t\t\t}\n\n\t\t\t// Fetch the tf and document length vector, and save the Okapi BM25 score\n\t\t\t$mapArr = $this->get_map($keywords, \"tf\");\n\t\t\tforeach ($mapArr as $map => $subMap) {\n\t\t\t\tforeach ($subMap as $key => $value) {\n\t\t\t\t\tif (array_key_exists($key, $result))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$tf_qd = array();\n\t\t\t\t\tforeach ($mapArr as $term => $file) {\n\t\t\t\t\t\t$val = 0.0;\n\t\t\t\t\t\tif (array_key_exists($key, $file)) {\n\t\t\t\t\t\t\t$val = $file[$key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_push($tf_qd, $val);\n\t\t\t\t\t}\n\t\t\t\t\t//print_r($tf_qd);\n\t\t\t\t\t// Fetch the document length\n\t\t\t\t\t$sql_len = \"SELECT length FROM length WHERE filename = '\".$key.\"'\";\n\t\t\t\t\t$res_len = mysqli_query($conn, $sql_len);\n\t\t\t\t\t$row_len = mysqli_fetch_row($res_len);\n\t\t\t\t\t$length = $len[$key];\n\t\t\t\t\t\n\t\t\t\t\t// Calculate Okapi BM25 score\n\t\t\t\t\t$score = 0;\n\t\t\t\t\tfor ($i=0; $i<sizeof($idf_qd); $i++) {\n\t\t\t\t\t\t$left = $idf_qd[$i] * $tf_qd[$i] * ($k1+1);\n\t\t\t\t\t\t$right = $tf_qd[$i] + $k1 * (1.0 - $b + $b * $length / 3.0);\n\t\t\t\t\t\tif ($left == 0 || $right == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$score += $left / $right;\n\t\t\t\t\t}\n\n\t\t\t\t\t$result[$key] = $score;\n\t\t\t\t} \n\t\t\t}\n\n\t\t\treturn $this->get_top($result);\n\t\t}",
"function test_search_and_solve() {\n global $ROWS, $COLS, $PEERS;\n\n $g = '4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......';\n $s = solve($g);\n assert($s != false);\n assert(display_line($s, true) == '417369825632158947958724316825437169791586432346912758289643571573291684164875293');\n\n /** This takes 2.86 hours (10282.6 seconds) to fail (no solution):\n * TODO: Figure out:\n * - how deep the stack gets\n * - how much memory is used\n * - how much work is done\n * - why the Python version is so much faster (only half and hour?)\n $start = microtime(true);\n $g2 = '.....5.8....6.1.43..........1.5........1.6...3.......553.....61........4.........';\n $s2 = solve($g2);\n $end = microtime(true);\n print \"Time Elapsed: \" . ($end - $start) . \" sec\\n\"; // Time Elapsed: 10282.617163181 sec\n assert($s2 == false); // No solution found\n */\n\n pdebug(\"Test for solve() and search() passes.\\n\");\n}",
"function solve_large($N, $P, $W, $H) {\n $sum = 0;\n for ($i = 0; $i < $N; $i ++) $sum += 2 * ($W[$i] + $H[$i]);\n dd($N, 'N'); dd($P, 'P'); dd($P - $sum, 'P-sum');\n // range of extra perimeters each cookie can provide\n $low = []; $high = [];\n for ($i = 0; $i < $N; $i ++) {\n $low[$i] = 2 * min($W[$i], $H[$i]);\n $high[$i] = 2 * sqrt($W[$i] * $W[$i] + $H[$i] * $H[$i]);\n }\n // if P is not reachable\n $h = 0;\n for ($i = 0; $i < $N; $i ++) $h += $high[$i];\n if ($sum + $h < $P) return $sum + $h;\n // if P is reachable, find a subset\n $str = ''; $DP = [];\n $r = $sum + nextItem($str, $P - $sum, $low, $high, $DP); dd($DP, 'DP');\n return $r;\n}",
"private function fillSimWords($query) {\t\n\t\t$top_three = array();\t\t\t// similarity value, index --- not actually top three\n\t\t\n\t\tfor ($i = 0; $i < count($this -> comp_words); ++$i) {\n\t\t\t$word = $this -> comp_words[$i];\n\t\t\t\n\t\t\t// need to find the minimum similarity\n\t\t\t$min_similar = 10000;\n\t\t\t\n\t\t\t// used for transposing\n\t\t\t$query_copy = $query;\n\t\t\t\n\t\t\tfor ( $j = 0; $j < strlen($query_copy); ++$j ) {\n\t\t\t\t$query = $this -> transpose($query_copy, $j);\n\t\t\t\t\n\t\t\t\t$similarity = $this -> getOptimal($query, $word);\n\t\t\t\t\n\t\t\t\tif ( strlen($query) > 0 && strlen($word) > 0 ) \n\t\t\t\t\t$similarity += floor( $this -> getPenalty($query[0], $word[0]) / 2 );\t\t\t\t\t\t// can change\n\t\t\t\t\n\t\t\t\tif ( $similarity < $min_similar )\n\t\t\t\t\t$min_similar = $similarity;\n\t\t\t}\n\t\n\t\t\t// might want to change in case of transpose\n\t\t\tif ($min_similar == 0) {\n\t\t\t\t$perfect_match = array();\t\n\t\t\t\tarray_push($perfect_match, \"123--\");\t\t\t\t// poison pill\n\t\t\t\tarray_push($perfect_match, $word);\n\t\t\t\tarray_push($this -> most_sim_words, $perfect_match);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// fill up to find top three most relavent results\n\t\t\tif ( $min_similar <= $this -> score_thres ) {\t \n\t\t\t\tif ( array_key_exists(intval($min_similar), $top_three) == false ) \n\t\t\t\t\t$top_three[$min_similar] = array();\n\t\t\n\t\t\t\tarray_push($top_three[$min_similar], $word);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count($top_three) == 0 ) {\n\t\t\t$perfect_match = array();\t\n\t\t\tarray_push($perfect_match, \"321--\");\t\t\t\t// poison pill, no results\n\t\t\tarray_push($perfect_match, $query);\n\t\t\tarray_push($this -> most_sim_words, $perfect_match);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tksort($top_three);\n\t\tarray_push($this -> most_sim_words, $top_three);\t\t\t\t// also need to check if length is 0\n\t}",
"public function eigenVector()\n {\n $as = \\DB::table('nilai_alternatif')\n ->select('id_alternatif_1')\n ->orderBy('id_alternatif_1', 'asc')\n ->groupBy('id_alternatif_1')\n ->pluck('id_alternatif_1')\n ->toArray();\n $bs = \\DB::table('nilai_alternatif')\n ->select('id_alternatif_2')\n ->orderBy('id_alternatif_2', 'asc')\n ->groupBy('id_alternatif_2')\n ->pluck('id_alternatif_2')\n ->toArray();\n\n $ks = \\DB::table('nilai_kriteria')\n ->select('id_kriteria_2')\n ->orderBy('id_kriteria_2', 'asc')\n ->groupBy('id_kriteria_2')\n ->pluck('id_kriteria_2')\n ->toArray();\n\n // ambil nilai eigen vector kriteria \n $nks[] = \\DB::table('kriteria')\n ->select('eigen')\n ->orderBy('id', 'asc')\n ->pluck('eigen')\n ->toArray();\n\n // buat matriks m (3x3) alternatif1 vs alternatif2 per kriteria\n $mk = array(); // matriks kriteria\n $m = array(); // perbaris alternatif vs alternatif\n $temp = array();\n foreach ($ks as $k) {\n $m = [];\n foreach ($as as $a) {\n $temp = [];\n foreach ($bs as $b) {\n $nilai = $this->nilai($a, $b, $k);\n array_push($temp, $nilai);\n }\n array_push($m, $temp);\n }\n // $mk[$k] = $m;\n array_push($mk, $m);\n }\n\n \n // kali matriks\n $kali = [];\n foreach ($mk as $mkk) {\n $k = $this->perkalian_matriks($mkk, $mkk);\n array_push($kali, $k);\n }\n \n \n // jumlah perbaris simpan di matriks b (3x1)\n $b = array();\n for ($i = 0; $i < count($kali); $i++) {\n for ($j = 0; $j < count($bs); $j++) {\n $b[$ks[$i]][$as[$j]] = array_sum($kali[$i][$j]);\n }\n }\n // $this->cetakMatriks($b[6]);\n\n // dd($b);\n // rangking, sum baris / sum all\n $rs = array();\n for ($i = 0; $i < count($kali); $i++) {\n for ($j = 0; $j < count($bs); $j++) {\n $rs[$i][$j] = $b[$ks[$i]][$as[$j]] / array_sum($b[$ks[$i]]);\n // $rs[$ks[$i]][$as[$j]] = $b[$ks[$i]][$as[$j]] / array_sum($b[$ks[$i]]);\n }\n \n }\n\n // $this->cetakMatriks($rs);\n\n // transpose matrix using lib phpml\n $rs_matrix = new Matrix($rs);\n $rs_trans = ($rs_matrix->transpose())->toArray();\n \n // $this->cetakMatriks($rs_trans);\n \n // tranpose nilai eigen kriteria\n $nks_matrix = new Matrix($nks);\n $nks_trans = ($nks_matrix->transpose())->toArray();\n\n // $this->cetakMatriks($nks_trans);\n\n $nks_rs = $this->perkalian_matriks($rs_trans, $nks_trans);\n // $this->cetakMatriks($nks_rs);\n\n // simpen ke db\n for ($i=0; $i < count($nks_rs); $i++) {\n $alternatif = Alternatif::find($as[$i]);\n $alternatif->eigen = $nks_rs[$i][0];\n $alternatif->save();\n }\n\n }",
"public function solve($puzzle);"
] | [
"0.5819707",
"0.5764429",
"0.5761977",
"0.57015216",
"0.55862117",
"0.556329",
"0.5522856",
"0.54597765",
"0.5441546",
"0.54063773",
"0.5378338",
"0.52580035",
"0.51884",
"0.512764",
"0.509931",
"0.5075492",
"0.504983",
"0.50206757",
"0.49022233",
"0.48825404",
"0.4873662",
"0.483492",
"0.48346972",
"0.48328555",
"0.481603",
"0.48140904",
"0.47842458",
"0.47722912",
"0.4771978",
"0.4753969"
] | 0.79898924 | 0 |
Generates a string of custom CSS to display the icons for site tree subclasses. | private function generateCustomCSS()
{
// Create CSS Array:
$css = [];
// Define CSS Array:
foreach (ClassInfo::subclassesFor(SiteTree::class) as $class) {
// Obtain Icon Config:
if ($icon = Injector::inst()->get($class)->config()->icon) {
// Create CSS Selector:
$selector = implode(
', ',
array_map(
function ($value) use ($class) {
return sprintf($value, Convert::raw2htmlid($class));
},
$this->getPageIconSelectors()
)
);
// Create CSS Definition:
if (Director::fileExists($icon)) {
$css[] = sprintf("%s { background: transparent url('%s') 0 0 no-repeat; }", $selector, $icon);
} else {
$css[] = sprintf("%s { %s }", $selector, $icon);
}
}
}
// Answer CSS String:
return implode("\n", $css);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function post_type_icons() { ?>\n\t <style type=\"text/css\" media=\"screen\">\n\t\t\t/* Post Type Websites */\n\t\t\t#adminmenu .menu-icon-websites div.wp-menu-image:before { \n\t\t\t\tcontent: \"\\f322\";\n\t\t\t}\n\t </style><?php \n\t}",
"public function icons() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/icons.php';\n\t}",
"function custom_admin_icons() {\n\n\techo '\n\t<style>\n\t#adminmenu #menu-posts-smile_profile div.wp-menu-image:before { content: \"\\f328\"; }\n\t#adminmenu #menu-posts-testimonial div.wp-menu-image:before { content: \"\\f205\"; }\n\t#adminmenu #menu-posts-specials div.wp-menu-image:before { content: \"\\f323\"; }\n\t#adminmenu #menu-posts-staff div.wp-menu-image:before { content: \"\\f307\"; }\n\t</style>\n\t';\n}",
"function add_menu_icons_styles(){\r\n?><style>\r\n#adminmenu .menu-icon-socials div.wp-menu-image:before {\r\n content: \"\\f319\";\r\n}\r\n\r\n</style>\r\n <?php\r\n}",
"function getNodeIcon(&$curNode){\r\n\tglobal $JSR170SUP_conf;\r\n\t$typeproperty = $curNode -> getProperty('jcr:primaryType'); \r\n\t$typevalue = $typeproperty -> getString();\r\n\t$typevalue = java_values($typevalue);\r\n\t$icon = $JSR170SUP_conf['icons'][$typevalue]?$JSR170SUP_conf['icons'][$typevalue]:$JSR170SUP_conf['icons']['default'];\r\n\t return '<img src=\"'.$icon.'\">';\r\n}",
"public function add_menu_icon() {\r\n \r\n echo '<style type=\"text/css\">#adminmenu .menu-icon-ut-content-block div.wp-menu-image:before { content: \"\\f489\"; } </style>';\r\n \r\n }",
"public function add_menu_icon() {\r\n \r\n echo '<style type=\"text/css\">#adminmenu .menu-icon-ut-content-block div.wp-menu-image:before { content: \"\\f489\"; } </style>';\r\n \r\n }",
"function add_menu_icons_styles(){\n\n\techo'\n\t<style>\n\t#adminmenu .menu-icon-photo div.wp-menu-image:before {\n\t\tcontent: \"\\f306\";\n\t}\n\t</style>';\n\n}",
"function add_menu_icons_styles(){\n?>\n\n <style>\n #adminmenu .menu-icon-CUSTOM_POST div.wp-menu-image:before {\n content: \"\\f231\";\n }\n </style>\n\n <?php\n}",
"public function iconType()\n {\n $icon = $this->getIconForType($this->entity->type);\n\n return '<i class=\"locations__icon '.$icon.'\"></i>';\n }",
"function add_menu_icons_styles()\n{\n?> \n<style>\n#adminmenu .menu-icon-events div.wp-menu-image:before {\n content: \"\\f118\";\n}\n</style> \n<?php\n}",
"public function getBodyCssClasses()\n {\n\n //we want all possible custom object and controller classes -as sometimes a controller\n //would extend a special class that the object doesn't extend - or the other way around\n $class = $this->owner->ClassName;\n //class can be overwritten with the \"ClassName\" method\n if (method_exists($this->owner, 'ClassName')) {\n $class = $this->owner->ClassName();\n }\n $objClass = str_replace('_Controller', '', $class);\n\n //if we're on Page, just return \"Page\".\n //In order to be able to style \"Page\" properly, and as all other pages should extend page,\n //their classes don't include \"Page\"\n //Debug::dump($objClass);\n if ($objClass == 'Page') {\n return 'Page';\n }\n\n $controllerClass = $objClass . '_Controller';\n\n $objClasses = ClassInfo::ancestry($objClass);\n //Debug::dump($objClasses);\n\n $controllerClasses = ClassInfo::ancestry($controllerClass);\n //Debug::dump($controllerClasses);\n\n //combining all classes\n $allClasses = $objClasses;\n foreach ($controllerClasses as $controllerClass) {\n $class = str_replace('_Controller', '', $controllerClass);\n $allClasses[$class] = $class;\n }\n //Debug::dump($allClasses);\n\n //filterning unnecessary classes\n $str = '';\n foreach ($allClasses as $class) {\n //only add custom classes\n if (\n $class != 'Object' &&\n $class != 'ViewableData' &&\n $class != 'DataObject' &&\n $class != 'SiteTree' &&\n $class != 'Page' && //we specifically don't include \"Page\" here, so ordinary pages have a chance to be styled separately\n $class != 'RequestHandler' &&\n $class != 'Controller' &&\n $class != 'ContentController' &&\n $class != 'Page_BaseController' //this is titledk specific - TODO move out to be configurable\n ) {\n $str .= $class . ' ';\n }\n }\n\n //Debug::dump($str);\n return $str;\n }",
"public function modify_admin_icon() {\n\t\tglobal $post_type;\n\n\t\tif ( $this->post_type == $post_type )\n\t\t\techo '<style>#icon-edit { background: url(\"' . plugins_url( 'images/instapaper-48.png', __FILE__ ) . '\") no-repeat; background-size: 32px 32px; }</style>';\n\t}",
"public function GetIcon() {\n\t\treturn 'dashicons-admin-generic';\n\t}",
"public function getIconsPath(): string\n {\n return \"EXT:{$this->getExtensionKey()}/Resources/Public/Icons/ContentElement/\";\n }",
"function buildIcons() {\n $this->optimizeSvgIcons();\n $this->taskExec('node ' . self::BASE_DIR . '/build/fe/tasks/icons')\n ->dir(self::BASE_DIR)\n ->run();\n $this->_remove(self::BASE_DIR . '/web/assets/Icons/Content/icons.data.png.css');\n $this->_remove(self::BASE_DIR . '/web/assets/Icons/Content/icons.fallback.css');\n }",
"function openlucius_core_icon_classes($item) {\n if (is_array($item) && array_key_exists('type', $item) && $item['type'] == 'fa') {\n $class = 'fa fa-' . $item['icon'];\n }\n else {\n $class = 'glyphicon glyphicon-' . $item;\n }\n return $class;\n}",
"function block_core_navigation_render_submenu_icon() {\n\treturn '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" transform=\"rotate(90)\"><path d=\"M8 5v14l11-7z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>';\n}",
"protected function createIcon()\r\n {\r\n switch ($this->suit) {\r\n\r\n // Heart Icon\r\n case 'Heart':\r\n $this->icon = 'H';//'♥';\r\n break;\r\n\r\n // Diamond Icon\r\n case 'Diamond':\r\n $this->icon = 'D';//'♦';\r\n break;\r\n\r\n // Spade Icon\r\n case 'Spade':\r\n $this->icon = 'S';//'♠';\r\n break;\r\n\r\n // Club Icon\r\n case 'Club':\r\n $this->icon = 'C';//'♣';\r\n break;\r\n }\r\n }",
"function js_icons() {\n\t\t/* If we're in the backend, get an absolute path. Frontend can use a relative path. */\n\t\tif (TYPO3_MODE=='BE')\t{\n\t\t\t$path = t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelPath('wec_map');\n\t\t} else {\n\t\t\t$path = t3lib_extMgm::siteRelPath('wec_map');\n\t\t}\n\n\t\t// add default icon set\n\t\t$this->icons[] = '\nWecMap.addIcon(\"' . $this->mapName .'\", \"default\", \"'.$path.'images/mm_20_red.png\", \"'.$path.'images/mm_20_shadow.png\", new GSize(12, 20), new GSize(22, 20), new GPoint(6, 20), new GPoint(5, 1));\n\t\t\t';\n\t\treturn implode(\"\\n\", $this->icons);\n\t}",
"public function getIconName() {\n\t\t// standard filename\n\t\t$icon = 'linkListLink';\n\t\t\n\t\t// deleted\n\t\tif ($this->isDeleted) return 'Trash';\n\t\t\n\t\t// isSticky\n\t\tif ($this->isSticky == 1) $icon .= 'Sticky';\n\t\t\n\t\t// isClosed\n\t\tif ($this->isClosed) $icon .= 'Closed';\n\t\t\n\t\treturn $icon;\n\t}",
"function axiom_staff_admin_icons() \n{\n?>\n <style type=\"text/css\" media=\"screen\">\n #menu-posts-staff div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px -30px !important;\n }\n #menu-posts-staff.menu-icon-post:hover div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px 0px !important;\n }\n #menu-posts-staff.menu-icon-post.wp-menu-open div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px -60px !important;\n }\n #icon-edit.icon32.icon32-posts-staff{\n background: url(<?php echo ADMIN_URL; ?>images/icons/icons-34.png) no-repeat scroll -160px 0px !important;\n }\n </style>\n<?php \n}",
"private function _renderIcon ()\r\n {\r\n return !empty($this->_icon) ? '<i class=\"' . $this->_icon . '\"></i>' : '';\r\n }",
"public function icon() {\n\t\t$icon_url = MACHETE_BASE_URL . 'inc/' . $this->params['slug'] . '/icon.svg';\n\t\techo '<img src=\"' . esc_attr( $icon_url ) . '\" style=\"width: 96px; height: 96px;\">';\n\t}",
"private function get_icon() {\n\t\treturn '<svg width=\"18\" height=\"22\" viewBox=\"0 0 18 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9 0L0 4V10C0 15.55 3.84 20.74 9 22C14.16 20.74 18 15.55 18 10V4L9 0Z\" fill=\"#D63638\"/><path d=\"M7.99121 6.00894H10.0085V11.9968H7.99121V6.00894Z\" fill=\"#FFF\"/><path d=\"M7.99121 14.014H10.0085V15.9911H7.99121V14.014Z\" fill=\"#FFF\"/></svg>';\n\t}",
"function get_classname( $icon ) {\n\t\tif ( substr( $icon, 0, 5 ) === 'icon-' ) {\n\t\t\t$icon = str_replace( 'icon-', 'tf_fontello-', $icon );\n\t\t}\n\t\treturn $icon;\n\t}",
"function getLienCss(){\r\n\t\treturn '<link rel=\"stylesheet\" type=\"text/css\" href=\"/portFolio_GUYOT/src/menuTriangle/css/css.css?id=2\" />';\r\n\t}",
"public function getIconName() {\n\t\tif ($this->isLibrary()) {\n\t\t\t$icon = 'library';\n\t\t\tif ($this->isClosed)\n\t\t\t\t$icon .= 'Closed';\n\t\t}\n\t\telse if ($this->isCategory()) {\n\t\t\t$icon = 'category';\n\t\t} else {\n\t\t\t$icon = 'libraryRedirect';\n\t\t}\n\n\t\treturn $icon;\n\t}",
"public function get_icon()\n {\n return 'eicon-carousel oxi-el-admin-icon';\n }",
"function custom_admin_logo() \n {\n echo '<style type=\"text/css\">#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/icon.ico) !important;}</style>';\n }"
] | [
"0.62803394",
"0.61640817",
"0.61540085",
"0.5992204",
"0.59900224",
"0.5921141",
"0.5921141",
"0.5907561",
"0.58975947",
"0.5888132",
"0.5876123",
"0.5860745",
"0.57846594",
"0.57545274",
"0.57372516",
"0.57162863",
"0.5696755",
"0.56925565",
"0.56397814",
"0.5638339",
"0.56276476",
"0.5624752",
"0.560906",
"0.5607184",
"0.5594912",
"0.55704546",
"0.5534569",
"0.55095243",
"0.5497865",
"0.5492389"
] | 0.80430263 | 0 |
Answers an array of page icon selectors to use when generating the custom CSS. | private function getPageIconSelectors()
{
return $this->owner->config()->page_icon_selectors;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_icons() {\n\t\t$icons = array();\n\t\t$config = themify_fontello_get_config();\n\t\tif( $config ) {\n\t\t\tif( ! empty( $config['glyphs'] ) ) {\n\t\t\t\tforeach( $config['glyphs'] as $glyph ) {\n\n\t\t\t\t\t/* custom icons uploaded but not selected are still included in the list; skip over those. */\n\t\t\t\t\tif( isset( $glyph['src'] ) && $glyph['src'] === 'custom_icons' && $glyph['selected'] == false ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$icons[ 'tf_fontello-' . $glyph['css'] ] = $glyph['css'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'key' => 'custom',\n\t\t\t\t'label' => __( 'Icons', 'themify' ),\n\t\t\t\t'icons' => $icons\n\t\t\t),\n\t\t);\n\t}",
"public function getIcons()\n {\n return array(\n 'icon-active',\n 'icon-add',\n 'icon-assessments',\n 'icon-browse',\n 'icon-conditions',\n 'icon-copy',\n 'icon-cpdb',\n 'icon-databack',\n 'icon-databegin',\n 'icon-dataend',\n 'icon-dataforward',\n 'icon-defaultanswers',\n 'icon-do',\n 'icon-edit',\n 'icon-emailtemplates',\n 'icon-expired',\n 'icon-export',\n 'icon-exportcsv',\n 'icon-exportr',\n 'icon-exportspss',\n 'icon-exportvv',\n 'icon-expression',\n 'icon-expressionmanagercheck',\n 'icon-global',\n 'icon-import',\n 'icon-importcsv',\n 'icon-importldap',\n 'icon-importvv',\n 'icon-inactive',\n 'icon-invite',\n 'icon-label',\n 'icon-labels',\n 'icon-list',\n 'icon-logout',\n 'icon-maximize',\n 'icon-minimize',\n 'icon-organize',\n 'icon-quota',\n 'icon-remind',\n 'icon-renumber',\n 'icon-resetsurveylogic',\n 'icon-responses',\n 'icon-saved',\n 'icon-security',\n 'icon-settings',\n 'icon-shield',\n 'icon-superadmin',\n 'icon-survey',\n 'icon-takeownership',\n 'icon-template',\n 'icon-templatepermissions',\n 'icon-templates',\n 'icon-tools',\n 'icon-user',\n 'icon-usergroup',\n 'icon-viewlast'\n );\n }",
"public static function get_list_icomoon() {\n\t\t\treturn array(\n\t\t\t\t'im-icon-home',\n\t\t\t\t'im-icon-home-2',\n\t\t\t\t'im-icon-home-3',\n\t\t\t\t'im-icon-home-4',\n\t\t\t\t'im-icon-home-5',\n\t\t\t\t'im-icon-home-6',\n\t\t\t\t'im-icon-home-7',\n\t\t\t\t'im-icon-home-8',\n\t\t\t\t'im-icon-home-9',\n\t\t\t\t'im-icon-home-10',\n\t\t\t\t'im-icon-home-11',\n\t\t\t\t'im-icon-office',\n\t\t\t\t'im-icon-newspaper',\n\t\t\t\t'im-icon-pencil',\n\t\t\t\t'im-icon-pencil-2',\n\t\t\t\t'im-icon-pencil-3',\n\t\t\t\t'im-icon-pencil-4',\n\t\t\t\t'im-icon-pencil-5',\n\t\t\t\t'im-icon-pencil-6',\n\t\t\t\t'im-icon-quill',\n\t\t\t\t'im-icon-quill-2',\n\t\t\t\t'im-icon-quill-3',\n\t\t\t\t'im-icon-pen',\n\t\t\t\t'im-icon-pen-2',\n\t\t\t\t'im-icon-pen-3',\n\t\t\t\t'im-icon-pen-4',\n\t\t\t\t'im-icon-pen-5',\n\t\t\t\t'im-icon-marker',\n\t\t\t\t'im-icon-home-12',\n\t\t\t\t'im-icon-marker-2',\n\t\t\t\t'im-icon-blog',\n\t\t\t\t'im-icon-blog-2',\n\t\t\t\t'im-icon-brush',\n\t\t\t\t'im-icon-palette',\n\t\t\t\t'im-icon-palette-2',\n\t\t\t\t'im-icon-eyedropper',\n\t\t\t\t'im-icon-eyedropper-2',\n\t\t\t\t'im-icon-droplet',\n\t\t\t\t'im-icon-droplet-2',\n\t\t\t\t'im-icon-droplet-3',\n\t\t\t\t'im-icon-droplet-4',\n\t\t\t\t'im-icon-paint-format',\n\t\t\t\t'im-icon-paint-format-2',\n\t\t\t\t'im-icon-image',\n\t\t\t\t'im-icon-image-2',\n\t\t\t\t'im-icon-image-3',\n\t\t\t\t'im-icon-images',\n\t\t\t\t'im-icon-image-4',\n\t\t\t\t'im-icon-image-5',\n\t\t\t\t'im-icon-image-6',\n\t\t\t\t'im-icon-images-2',\n\t\t\t\t'im-icon-image-7',\n\t\t\t\t'im-icon-camera',\n\t\t\t\t'im-icon-camera-2',\n\t\t\t\t'im-icon-camera-3',\n\t\t\t\t'im-icon-camera-4',\n\t\t\t\t'im-icon-music',\n\t\t\t\t'im-icon-music-2',\n\t\t\t\t'im-icon-music-3',\n\t\t\t\t'im-icon-music-4',\n\t\t\t\t'im-icon-music-5',\n\t\t\t\t'im-icon-music-6',\n\t\t\t\t'im-icon-piano',\n\t\t\t\t'im-icon-guitar',\n\t\t\t\t'im-icon-headphones',\n\t\t\t\t'im-icon-headphones-2',\n\t\t\t\t'im-icon-play',\n\t\t\t\t'im-icon-play-2',\n\t\t\t\t'im-icon-movie',\n\t\t\t\t'im-icon-movie-2',\n\t\t\t\t'im-icon-movie-3',\n\t\t\t\t'im-icon-film',\n\t\t\t\t'im-icon-film-2',\n\t\t\t\t'im-icon-film-3',\n\t\t\t\t'im-icon-film-4',\n\t\t\t\t'im-icon-camera-5',\n\t\t\t\t'im-icon-camera-6',\n\t\t\t\t'im-icon-camera-7',\n\t\t\t\t'im-icon-camera-8',\n\t\t\t\t'im-icon-camera-9',\n\t\t\t\t'im-icon-dice',\n\t\t\t\t'im-icon-gamepad',\n\t\t\t\t'im-icon-gamepad-2',\n\t\t\t\t'im-icon-gamepad-3',\n\t\t\t\t'im-icon-pacman',\n\t\t\t\t'im-icon-spades',\n\t\t\t\t'im-icon-clubs',\n\t\t\t\t'im-icon-diamonds',\n\t\t\t\t'im-icon-king',\n\t\t\t\t'im-icon-queen',\n\t\t\t\t'im-icon-rock',\n\t\t\t\t'im-icon-bishop',\n\t\t\t\t'im-icon-knight',\n\t\t\t\t'im-icon-pawn',\n\t\t\t\t'im-icon-chess',\n\t\t\t\t'im-icon-bullhorn',\n\t\t\t\t'im-icon-megaphone',\n\t\t\t\t'im-icon-new',\n\t\t\t\t'im-icon-connection',\n\t\t\t\t'im-icon-connection-2',\n\t\t\t\t'im-icon-podcast',\n\t\t\t\t'im-icon-radio',\n\t\t\t\t'im-icon-feed',\n\t\t\t\t'im-icon-connection-3',\n\t\t\t\t'im-icon-radio-2',\n\t\t\t\t'im-icon-podcast-2',\n\t\t\t\t'im-icon-podcast-3',\n\t\t\t\t'im-icon-mic',\n\t\t\t\t'im-icon-mic-2',\n\t\t\t\t'im-icon-mic-3',\n\t\t\t\t'im-icon-mic-4',\n\t\t\t\t'im-icon-mic-5',\n\t\t\t\t'im-icon-book',\n\t\t\t\t'im-icon-book-2',\n\t\t\t\t'im-icon-books',\n\t\t\t\t'im-icon-reading',\n\t\t\t\t'im-icon-library',\n\t\t\t\t'im-icon-library-2',\n\t\t\t\t'im-icon-graduation',\n\t\t\t\t'im-icon-file',\n\t\t\t\t'im-icon-profile',\n\t\t\t\t'im-icon-file-2',\n\t\t\t\t'im-icon-file-3',\n\t\t\t\t'im-icon-file-4',\n\t\t\t\t'im-icon-file-5',\n\t\t\t\t'im-icon-file-6',\n\t\t\t\t'im-icon-files',\n\t\t\t\t'im-icon-file-plus',\n\t\t\t\t'im-icon-file-minus',\n\t\t\t\t'im-icon-file-download',\n\t\t\t\t'im-icon-file-upload',\n\t\t\t\t'im-icon-file-check',\n\t\t\t\t'im-icon-file-remove',\n\t\t\t\t'im-icon-file-7',\n\t\t\t\t'im-icon-file-8',\n\t\t\t\t'im-icon-file-plus-2',\n\t\t\t\t'im-icon-file-minus-2',\n\t\t\t\t'im-icon-file-download-2',\n\t\t\t\t'im-icon-file-upload-2',\n\t\t\t\t'im-icon-file-check-2',\n\t\t\t\t'im-icon-file-remove-2',\n\t\t\t\t'im-icon-file-9',\n\t\t\t\t'im-icon-copy',\n\t\t\t\t'im-icon-copy-2',\n\t\t\t\t'im-icon-copy-3',\n\t\t\t\t'im-icon-copy-4',\n\t\t\t\t'im-icon-paste',\n\t\t\t\t'im-icon-paste-2',\n\t\t\t\t'im-icon-paste-3',\n\t\t\t\t'im-icon-stack',\n\t\t\t\t'im-icon-stack-2',\n\t\t\t\t'im-icon-stack-3',\n\t\t\t\t'im-icon-folder',\n\t\t\t\t'im-icon-folder-download',\n\t\t\t\t'im-icon-folder-upload',\n\t\t\t\t'im-icon-folder-plus',\n\t\t\t\t'im-icon-folder-plus-2',\n\t\t\t\t'im-icon-folder-minus',\n\t\t\t\t'im-icon-folder-minus-2',\n\t\t\t\t'im-icon-folder8',\n\t\t\t\t'im-icon-folder-remove',\n\t\t\t\t'im-icon-folder-2',\n\t\t\t\t'im-icon-folder-open',\n\t\t\t\t'im-icon-folder-3',\n\t\t\t\t'im-icon-folder-4',\n\t\t\t\t'im-icon-folder-plus-3',\n\t\t\t\t'im-icon-folder-minus-3',\n\t\t\t\t'im-icon-folder-plus-4',\n\t\t\t\t'im-icon-folder-remove-2',\n\t\t\t\t'im-icon-folder-download-2',\n\t\t\t\t'im-icon-folder-upload-2',\n\t\t\t\t'im-icon-folder-download-3',\n\t\t\t\t'im-icon-folder-upload-3',\n\t\t\t\t'im-icon-folder-5',\n\t\t\t\t'im-icon-folder-open-2',\n\t\t\t\t'im-icon-folder-6',\n\t\t\t\t'im-icon-folder-open-3',\n\t\t\t\t'im-icon-certificate',\n\t\t\t\t'im-icon-cc',\n\t\t\t\t'im-icon-tag',\n\t\t\t\t'im-icon-tag-2',\n\t\t\t\t'im-icon-tag-3',\n\t\t\t\t'im-icon-tag-4',\n\t\t\t\t'im-icon-tag-5',\n\t\t\t\t'im-icon-tag-6',\n\t\t\t\t'im-icon-tag-7',\n\t\t\t\t'im-icon-tags',\n\t\t\t\t'im-icon-tags-2',\n\t\t\t\t'im-icon-tag-8',\n\t\t\t\t'im-icon-barcode',\n\t\t\t\t'im-icon-barcode-2',\n\t\t\t\t'im-icon-qrcode',\n\t\t\t\t'im-icon-ticket',\n\t\t\t\t'im-icon-cart',\n\t\t\t\t'im-icon-cart-2',\n\t\t\t\t'im-icon-cart-3',\n\t\t\t\t'im-icon-cart-4',\n\t\t\t\t'im-icon-cart-5',\n\t\t\t\t'im-icon-cart-6',\n\t\t\t\t'im-icon-cart-7',\n\t\t\t\t'im-icon-cart-plus',\n\t\t\t\t'im-icon-cart-minus',\n\t\t\t\t'im-icon-cart-add',\n\t\t\t\t'im-icon-cart-remove',\n\t\t\t\t'im-icon-cart-checkout',\n\t\t\t\t'im-icon-cart-remove-2',\n\t\t\t\t'im-icon-basket',\n\t\t\t\t'im-icon-basket-2',\n\t\t\t\t'im-icon-bag',\n\t\t\t\t'im-icon-bag-2',\n\t\t\t\t'im-icon-bag-3',\n\t\t\t\t'im-icon-coin',\n\t\t\t\t'im-icon-coins',\n\t\t\t\t'im-icon-credit',\n\t\t\t\t'im-icon-credit-2',\n\t\t\t\t'im-icon-calculate',\n\t\t\t\t'im-icon-calculate-2',\n\t\t\t\t'im-icon-support',\n\t\t\t\t'im-icon-phone',\n\t\t\t\t'im-icon-phone-2',\n\t\t\t\t'im-icon-phone-3',\n\t\t\t\t'im-icon-phone-4',\n\t\t\t\t'im-icon-contact-add',\n\t\t\t\t'im-icon-contact-remove',\n\t\t\t\t'im-icon-contact-add-2',\n\t\t\t\t'im-icon-contact-remove-2',\n\t\t\t\t'im-icon-call-incoming',\n\t\t\t\t'im-icon-call-outgoing',\n\t\t\t\t'im-icon-phone-5',\n\t\t\t\t'im-icon-phone-6',\n\t\t\t\t'im-icon-phone-hang-up',\n\t\t\t\t'im-icon-phone-hang-up-2',\n\t\t\t\t'im-icon-address-book',\n\t\t\t\t'im-icon-address-book-2',\n\t\t\t\t'im-icon-notebook',\n\t\t\t\t'im-icon-envelop',\n\t\t\t\t'im-icon-envelop-2',\n\t\t\t\t'im-icon-mail-send',\n\t\t\t\t'im-icon-envelop-opened',\n\t\t\t\t'im-icon-envelop-3',\n\t\t\t\t'im-icon-pushpin',\n\t\t\t\t'im-icon-location',\n\t\t\t\t'im-icon-location-2',\n\t\t\t\t'im-icon-location-3',\n\t\t\t\t'im-icon-location-4',\n\t\t\t\t'im-icon-location-5',\n\t\t\t\t'im-icon-location-6',\n\t\t\t\t'im-icon-location-7',\n\t\t\t\t'im-icon-compass',\n\t\t\t\t'im-icon-compass-2',\n\t\t\t\t'im-icon-map',\n\t\t\t\t'im-icon-map-2',\n\t\t\t\t'im-icon-map-3',\n\t\t\t\t'im-icon-map-4',\n\t\t\t\t'im-icon-direction',\n\t\t\t\t'im-icon-history',\n\t\t\t\t'im-icon-history-2',\n\t\t\t\t'im-icon-clock',\n\t\t\t\t'im-icon-clock-2',\n\t\t\t\t'im-icon-clock-3',\n\t\t\t\t'im-icon-clock-4',\n\t\t\t\t'im-icon-watch',\n\t\t\t\t'im-icon-clock-5',\n\t\t\t\t'im-icon-clock-6',\n\t\t\t\t'im-icon-clock-7',\n\t\t\t\t'im-icon-alarm',\n\t\t\t\t'im-icon-alarm-2',\n\t\t\t\t'im-icon-bell',\n\t\t\t\t'im-icon-bell-2',\n\t\t\t\t'im-icon-alarm-plus',\n\t\t\t\t'im-icon-alarm-minus',\n\t\t\t\t'im-icon-alarm-check',\n\t\t\t\t'im-icon-alarm-cancel',\n\t\t\t\t'im-icon-stopwatch',\n\t\t\t\t'im-icon-calendar',\n\t\t\t\t'im-icon-calendar-2',\n\t\t\t\t'im-icon-calendar-3',\n\t\t\t\t'im-icon-calendar-4',\n\t\t\t\t'im-icon-calendar-5',\n\t\t\t\t'im-icon-print',\n\t\t\t\t'im-icon-print-2',\n\t\t\t\t'im-icon-print-3',\n\t\t\t\t'im-icon-mouse',\n\t\t\t\t'im-icon-mouse-2',\n\t\t\t\t'im-icon-mouse-3',\n\t\t\t\t'im-icon-mouse-4',\n\t\t\t\t'im-icon-keyboard',\n\t\t\t\t'im-icon-keyboard-2',\n\t\t\t\t'im-icon-screen',\n\t\t\t\t'im-icon-screen-2',\n\t\t\t\t'im-icon-screen-3',\n\t\t\t\t'im-icon-screen-4',\n\t\t\t\t'im-icon-laptop',\n\t\t\t\t'im-icon-mobile',\n\t\t\t\t'im-icon-mobile-2',\n\t\t\t\t'im-icon-tablet',\n\t\t\t\t'im-icon-mobile-3',\n\t\t\t\t'im-icon-tv',\n\t\t\t\t'im-icon-cabinet',\n\t\t\t\t'im-icon-archive',\n\t\t\t\t'im-icon-drawer',\n\t\t\t\t'im-icon-drawer-2',\n\t\t\t\t'im-icon-drawer-3',\n\t\t\t\t'im-icon-box',\n\t\t\t\t'im-icon-box-add',\n\t\t\t\t'im-icon-box-remove',\n\t\t\t\t'im-icon-download',\n\t\t\t\t'im-icon-upload',\n\t\t\t\t'im-icon-disk',\n\t\t\t\t'im-icon-cd',\n\t\t\t\t'im-icon-storage',\n\t\t\t\t'im-icon-storage-2',\n\t\t\t\t'im-icon-database',\n\t\t\t\t'im-icon-database-2',\n\t\t\t\t'im-icon-database-3',\n\t\t\t\t'im-icon-undo',\n\t\t\t\t'im-icon-redo',\n\t\t\t\t'im-icon-rotate',\n\t\t\t\t'im-icon-rotate-2',\n\t\t\t\t'im-icon-flip',\n\t\t\t\t'im-icon-flip-2',\n\t\t\t\t'im-icon-unite',\n\t\t\t\t'im-icon-subtract',\n\t\t\t\t'im-icon-interset',\n\t\t\t\t'im-icon-exclude',\n\t\t\t\t'im-icon-align-left',\n\t\t\t\t'im-icon-align-center-horizontal',\n\t\t\t\t'im-icon-align-right',\n\t\t\t\t'im-icon-align-top',\n\t\t\t\t'im-icon-align-center-vertical',\n\t\t\t\t'im-icon-align-bottom',\n\t\t\t\t'im-icon-undo-2',\n\t\t\t\t'im-icon-redo-2',\n\t\t\t\t'im-icon-forward',\n\t\t\t\t'im-icon-reply',\n\t\t\t\t'im-icon-reply-2',\n\t\t\t\t'im-icon-bubble',\n\t\t\t\t'im-icon-bubbles',\n\t\t\t\t'im-icon-bubbles-2',\n\t\t\t\t'im-icon-bubble-2',\n\t\t\t\t'im-icon-bubbles-3',\n\t\t\t\t'im-icon-bubbles-4',\n\t\t\t\t'im-icon-bubble-notification',\n\t\t\t\t'im-icon-bubbles-5',\n\t\t\t\t'im-icon-bubbles-6',\n\t\t\t\t'im-icon-bubble-3',\n\t\t\t\t'im-icon-bubble-dots',\n\t\t\t\t'im-icon-bubble-4',\n\t\t\t\t'im-icon-bubble-5',\n\t\t\t\t'im-icon-bubble-dots-2',\n\t\t\t\t'im-icon-bubble-6',\n\t\t\t\t'im-icon-bubble-7',\n\t\t\t\t'im-icon-bubble-8',\n\t\t\t\t'im-icon-bubbles-7',\n\t\t\t\t'im-icon-bubble-9',\n\t\t\t\t'im-icon-bubbles-8',\n\t\t\t\t'im-icon-bubble-10',\n\t\t\t\t'im-icon-bubble-dots-3',\n\t\t\t\t'im-icon-bubble-11',\n\t\t\t\t'im-icon-bubble-12',\n\t\t\t\t'im-icon-bubble-dots-4',\n\t\t\t\t'im-icon-bubble-13',\n\t\t\t\t'im-icon-bubbles-9',\n\t\t\t\t'im-icon-bubbles-10',\n\t\t\t\t'im-icon-bubble-blocked',\n\t\t\t\t'im-icon-bubble-quote',\n\t\t\t\t'im-icon-bubble-user',\n\t\t\t\t'im-icon-bubble-check',\n\t\t\t\t'im-icon-bubble-video-chat',\n\t\t\t\t'im-icon-bubble-link',\n\t\t\t\t'im-icon-bubble-locked',\n\t\t\t\t'im-icon-bubble-star',\n\t\t\t\t'im-icon-bubble-heart',\n\t\t\t\t'im-icon-bubble-paperclip',\n\t\t\t\t'im-icon-bubble-cancel',\n\t\t\t\t'im-icon-bubble-plus',\n\t\t\t\t'im-icon-bubble-minus',\n\t\t\t\t'im-icon-bubble-notification-2',\n\t\t\t\t'im-icon-bubble-trash',\n\t\t\t\t'im-icon-bubble-left',\n\t\t\t\t'im-icon-bubble-right',\n\t\t\t\t'im-icon-bubble-up',\n\t\t\t\t'im-icon-bubble-down',\n\t\t\t\t'im-icon-bubble-first',\n\t\t\t\t'im-icon-bubble-last',\n\t\t\t\t'im-icon-bubble-replu',\n\t\t\t\t'im-icon-bubble-forward',\n\t\t\t\t'im-icon-bubble-reply',\n\t\t\t\t'im-icon-bubble-forward-2',\n\t\t\t\t'im-icon-user',\n\t\t\t\t'im-icon-users',\n\t\t\t\t'im-icon-user-plus',\n\t\t\t\t'im-icon-user-plus-2',\n\t\t\t\t'im-icon-user-minus',\n\t\t\t\t'im-icon-user-minus-2',\n\t\t\t\t'im-icon-user-cancel',\n\t\t\t\t'im-icon-user-block',\n\t\t\t\t'im-icon-users-2',\n\t\t\t\t'im-icon-user-2',\n\t\t\t\t'im-icon-users-3',\n\t\t\t\t'im-icon-user-plus-3',\n\t\t\t\t'im-icon-user-minus-3',\n\t\t\t\t'im-icon-user-cancel-2',\n\t\t\t\t'im-icon-user-block-2',\n\t\t\t\t'im-icon-user-3',\n\t\t\t\t'im-icon-user-4',\n\t\t\t\t'im-icon-user-5',\n\t\t\t\t'im-icon-user-6',\n\t\t\t\t'im-icon-users-4',\n\t\t\t\t'im-icon-user-7',\n\t\t\t\t'im-icon-user-8',\n\t\t\t\t'im-icon-users-5',\n\t\t\t\t'im-icon-vcard',\n\t\t\t\t'im-icon-tshirt',\n\t\t\t\t'im-icon-hanger',\n\t\t\t\t'im-icon-quotes-left',\n\t\t\t\t'im-icon-quotes-right',\n\t\t\t\t'im-icon-quotes-right-2',\n\t\t\t\t'im-icon-quotes-right-3',\n\t\t\t\t'im-icon-busy',\n\t\t\t\t'im-icon-busy-2',\n\t\t\t\t'im-icon-busy-3',\n\t\t\t\t'im-icon-busy-4',\n\t\t\t\t'im-icon-spinner',\n\t\t\t\t'im-icon-spinner-2',\n\t\t\t\t'im-icon-spinner-3',\n\t\t\t\t'im-icon-spinner-4',\n\t\t\t\t'im-icon-spinner-5',\n\t\t\t\t'im-icon-spinner-6',\n\t\t\t\t'im-icon-spinner-7',\n\t\t\t\t'im-icon-spinner-8',\n\t\t\t\t'im-icon-spinner-9',\n\t\t\t\t'im-icon-spinner-10',\n\t\t\t\t'im-icon-spinner-11',\n\t\t\t\t'im-icon-spinner-12',\n\t\t\t\t'im-icon-microscope',\n\t\t\t\t'im-icon-binoculars',\n\t\t\t\t'im-icon-binoculars-2',\n\t\t\t\t'im-icon-search',\n\t\t\t\t'im-icon-search-2',\n\t\t\t\t'im-icon-zoom-in',\n\t\t\t\t'im-icon-zoom-out',\n\t\t\t\t'im-icon-search-3',\n\t\t\t\t'im-icon-search-4',\n\t\t\t\t'im-icon-zoom-in-2',\n\t\t\t\t'im-icon-zoom-out-2',\n\t\t\t\t'im-icon-search-5',\n\t\t\t\t'im-icon-expand',\n\t\t\t\t'im-icon-contract',\n\t\t\t\t'im-icon-scale-up',\n\t\t\t\t'im-icon-scale-down',\n\t\t\t\t'im-icon-expand-2',\n\t\t\t\t'im-icon-contract-2',\n\t\t\t\t'im-icon-scale-up-2',\n\t\t\t\t'im-icon-scale-down-2',\n\t\t\t\t'im-icon-fullscreen',\n\t\t\t\t'im-icon-expand-3',\n\t\t\t\t'im-icon-contract-3',\n\t\t\t\t'im-icon-key',\n\t\t\t\t'im-icon-key-2',\n\t\t\t\t'im-icon-key-3',\n\t\t\t\t'im-icon-key-4',\n\t\t\t\t'im-icon-key-5',\n\t\t\t\t'im-icon-keyhole',\n\t\t\t\t'im-icon-lock',\n\t\t\t\t'im-icon-lock-2',\n\t\t\t\t'im-icon-lock-3',\n\t\t\t\t'im-icon-lock-4',\n\t\t\t\t'im-icon-unlocked',\n\t\t\t\t'im-icon-lock-5',\n\t\t\t\t'im-icon-unlocked-2',\n\t\t\t\t'im-icon-wrench',\n\t\t\t\t'im-icon-wrench-2',\n\t\t\t\t'im-icon-wrench-3',\n\t\t\t\t'im-icon-wrench-4',\n\t\t\t\t'im-icon-settings',\n\t\t\t\t'im-icon-equalizer',\n\t\t\t\t'im-icon-equalizer-2',\n\t\t\t\t'im-icon-equalizer-3',\n\t\t\t\t'im-icon-cog',\n\t\t\t\t'im-icon-cogs',\n\t\t\t\t'im-icon-cog-2',\n\t\t\t\t'im-icon-cog-3',\n\t\t\t\t'im-icon-cog-4',\n\t\t\t\t'im-icon-cog-5',\n\t\t\t\t'im-icon-cog-6',\n\t\t\t\t'im-icon-cog-7',\n\t\t\t\t'im-icon-factory',\n\t\t\t\t'im-icon-hammer',\n\t\t\t\t'im-icon-tools',\n\t\t\t\t'im-icon-screwdriver',\n\t\t\t\t'im-icon-screwdriver-2',\n\t\t\t\t'im-icon-wand',\n\t\t\t\t'im-icon-wand-2',\n\t\t\t\t'im-icon-health',\n\t\t\t\t'im-icon-aid',\n\t\t\t\t'im-icon-patch',\n\t\t\t\t'im-icon-bug',\n\t\t\t\t'im-icon-bug-2',\n\t\t\t\t'im-icon-inject',\n\t\t\t\t'im-icon-inject-2',\n\t\t\t\t'im-icon-construction',\n\t\t\t\t'im-icon-cone',\n\t\t\t\t'im-icon-pie',\n\t\t\t\t'im-icon-pie-2',\n\t\t\t\t'im-icon-pie-3',\n\t\t\t\t'im-icon-pie-4',\n\t\t\t\t'im-icon-pie-5',\n\t\t\t\t'im-icon-pie-6',\n\t\t\t\t'im-icon-pie-7',\n\t\t\t\t'im-icon-stats',\n\t\t\t\t'im-icon-stats-2',\n\t\t\t\t'im-icon-stats-3',\n\t\t\t\t'im-icon-bars',\n\t\t\t\t'im-icon-bars-2',\n\t\t\t\t'im-icon-bars-3',\n\t\t\t\t'im-icon-bars-4',\n\t\t\t\t'im-icon-bars-5',\n\t\t\t\t'im-icon-bars-6',\n\t\t\t\t'im-icon-stats-up',\n\t\t\t\t'im-icon-stats-down',\n\t\t\t\t'im-icon-stairs-down',\n\t\t\t\t'im-icon-stairs-down-2',\n\t\t\t\t'im-icon-chart',\n\t\t\t\t'im-icon-stairs',\n\t\t\t\t'im-icon-stairs-2',\n\t\t\t\t'im-icon-ladder',\n\t\t\t\t'im-icon-cake',\n\t\t\t\t'im-icon-gift',\n\t\t\t\t'im-icon-gift-2',\n\t\t\t\t'im-icon-balloon',\n\t\t\t\t'im-icon-rating',\n\t\t\t\t'im-icon-rating-2',\n\t\t\t\t'im-icon-rating-3',\n\t\t\t\t'im-icon-podium',\n\t\t\t\t'im-icon-medal',\n\t\t\t\t'im-icon-medal-2',\n\t\t\t\t'im-icon-medal-3',\n\t\t\t\t'im-icon-medal-4',\n\t\t\t\t'im-icon-medal-5',\n\t\t\t\t'im-icon-crown',\n\t\t\t\t'im-icon-trophy',\n\t\t\t\t'im-icon-trophy-2',\n\t\t\t\t'im-icon-trophy-star',\n\t\t\t\t'im-icon-diamond',\n\t\t\t\t'im-icon-diamond-2',\n\t\t\t\t'im-icon-glass',\n\t\t\t\t'im-icon-glass-2',\n\t\t\t\t'im-icon-bottle',\n\t\t\t\t'im-icon-bottle-2',\n\t\t\t\t'im-icon-mug',\n\t\t\t\t'im-icon-food',\n\t\t\t\t'im-icon-food-2',\n\t\t\t\t'im-icon-hamburger',\n\t\t\t\t'im-icon-cup',\n\t\t\t\t'im-icon-cup-2',\n\t\t\t\t'im-icon-leaf',\n\t\t\t\t'im-icon-leaf-2',\n\t\t\t\t'im-icon-apple-fruit',\n\t\t\t\t'im-icon-tree',\n\t\t\t\t'im-icon-tree-2',\n\t\t\t\t'im-icon-paw',\n\t\t\t\t'im-icon-steps',\n\t\t\t\t'im-icon-flower',\n\t\t\t\t'im-icon-rocket',\n\t\t\t\t'im-icon-meter',\n\t\t\t\t'im-icon-meter2',\n\t\t\t\t'im-icon-meter-slow',\n\t\t\t\t'im-icon-meter-medium',\n\t\t\t\t'im-icon-meter-fast',\n\t\t\t\t'im-icon-dashboard',\n\t\t\t\t'im-icon-hammer-2',\n\t\t\t\t'im-icon-balance',\n\t\t\t\t'im-icon-bomb',\n\t\t\t\t'im-icon-fire',\n\t\t\t\t'im-icon-fire-2',\n\t\t\t\t'im-icon-lab',\n\t\t\t\t'im-icon-atom',\n\t\t\t\t'im-icon-atom-2',\n\t\t\t\t'im-icon-magnet',\n\t\t\t\t'im-icon-magnet-2',\n\t\t\t\t'im-icon-magnet-3',\n\t\t\t\t'im-icon-magnet-4',\n\t\t\t\t'im-icon-dumbbell',\n\t\t\t\t'im-icon-skull',\n\t\t\t\t'im-icon-skull-2',\n\t\t\t\t'im-icon-skull-3',\n\t\t\t\t'im-icon-lamp',\n\t\t\t\t'im-icon-lamp-2',\n\t\t\t\t'im-icon-lamp-3',\n\t\t\t\t'im-icon-lamp-4',\n\t\t\t\t'im-icon-remove',\n\t\t\t\t'im-icon-remove-2',\n\t\t\t\t'im-icon-remove-3',\n\t\t\t\t'im-icon-remove-4',\n\t\t\t\t'im-icon-remove-5',\n\t\t\t\t'im-icon-remove-6',\n\t\t\t\t'im-icon-remove-7',\n\t\t\t\t'im-icon-remove-8',\n\t\t\t\t'im-icon-briefcase',\n\t\t\t\t'im-icon-briefcase-2',\n\t\t\t\t'im-icon-briefcase-3',\n\t\t\t\t'im-icon-airplane',\n\t\t\t\t'im-icon-airplane-2',\n\t\t\t\t'im-icon-paper-plane',\n\t\t\t\t'im-icon-car',\n\t\t\t\t'im-icon-gas-pump',\n\t\t\t\t'im-icon-bus',\n\t\t\t\t'im-icon-truck',\n\t\t\t\t'im-icon-bike',\n\t\t\t\t'im-icon-road',\n\t\t\t\t'im-icon-train',\n\t\t\t\t'im-icon-ship',\n\t\t\t\t'im-icon-boat',\n\t\t\t\t'im-icon-cube',\n\t\t\t\t'im-icon-cube-2',\n\t\t\t\t'im-icon-cube-3',\n\t\t\t\t'im-icon-cube4',\n\t\t\t\t'im-icon-pyramid',\n\t\t\t\t'im-icon-pyramid-2',\n\t\t\t\t'im-icon-cylinder',\n\t\t\t\t'im-icon-package',\n\t\t\t\t'im-icon-puzzle',\n\t\t\t\t'im-icon-puzzle-2',\n\t\t\t\t'im-icon-puzzle-3',\n\t\t\t\t'im-icon-puzzle-4',\n\t\t\t\t'im-icon-glasses',\n\t\t\t\t'im-icon-glasses-2',\n\t\t\t\t'im-icon-glasses-3',\n\t\t\t\t'im-icon-sun-glasses',\n\t\t\t\t'im-icon-accessibility',\n\t\t\t\t'im-icon-accessibility-2',\n\t\t\t\t'im-icon-brain',\n\t\t\t\t'im-icon-target',\n\t\t\t\t'im-icon-target-2',\n\t\t\t\t'im-icon-target-3',\n\t\t\t\t'im-icon-gun',\n\t\t\t\t'im-icon-gun-ban',\n\t\t\t\t'im-icon-shield',\n\t\t\t\t'im-icon-shield-2',\n\t\t\t\t'im-icon-shield-3',\n\t\t\t\t'im-icon-shield-4',\n\t\t\t\t'im-icon-soccer',\n\t\t\t\t'im-icon-football',\n\t\t\t\t'im-icon-baseball',\n\t\t\t\t'im-icon-basketball',\n\t\t\t\t'im-icon-golf',\n\t\t\t\t'im-icon-hockey',\n\t\t\t\t'im-icon-racing',\n\t\t\t\t'im-icon-eight-ball',\n\t\t\t\t'im-icon-bowling-ball',\n\t\t\t\t'im-icon-bowling',\n\t\t\t\t'im-icon-bowling-2',\n\t\t\t\t'im-icon-lightning',\n\t\t\t\t'im-icon-power',\n\t\t\t\t'im-icon-power-2',\n\t\t\t\t'im-icon-switch',\n\t\t\t\t'im-icon-power-cord',\n\t\t\t\t'im-icon-cord',\n\t\t\t\t'im-icon-socket',\n\t\t\t\t'im-icon-clipboard',\n\t\t\t\t'im-icon-clipboard-2',\n\t\t\t\t'im-icon-signup',\n\t\t\t\t'im-icon-clipboard-3',\n\t\t\t\t'im-icon-clipboard-4',\n\t\t\t\t'im-icon-list',\n\t\t\t\t'im-icon-list-2',\n\t\t\t\t'im-icon-list-3',\n\t\t\t\t'im-icon-numbered-list',\n\t\t\t\t'im-icon-list-4',\n\t\t\t\t'im-icon-list-5',\n\t\t\t\t'im-icon-playlist',\n\t\t\t\t'im-icon-grid',\n\t\t\t\t'im-icon-grid-2',\n\t\t\t\t'im-icon-grid-3',\n\t\t\t\t'im-icon-grid-4',\n\t\t\t\t'im-icon-grid-5',\n\t\t\t\t'im-icon-grid-6',\n\t\t\t\t'im-icon-tree-3',\n\t\t\t\t'im-icon-tree-4',\n\t\t\t\t'im-icon-tree-5',\n\t\t\t\t'im-icon-menu',\n\t\t\t\t'im-icon-menu-2',\n\t\t\t\t'im-icon-circle-small',\n\t\t\t\t'im-icon-menu-3',\n\t\t\t\t'im-icon-menu-4',\n\t\t\t\t'im-icon-menu-5',\n\t\t\t\t'im-icon-menu-6',\n\t\t\t\t'im-icon-menu-7',\n\t\t\t\t'im-icon-menu-8',\n\t\t\t\t'im-icon-menu-9',\n\t\t\t\t'im-icon-cloud',\n\t\t\t\t'im-icon-cloud-2',\n\t\t\t\t'im-icon-cloud-3',\n\t\t\t\t'im-icon-cloud-download',\n\t\t\t\t'im-icon-cloud-upload',\n\t\t\t\t'im-icon-download-2',\n\t\t\t\t'im-icon-upload-2',\n\t\t\t\t'im-icon-download-3',\n\t\t\t\t'im-icon-upload-3',\n\t\t\t\t'im-icon-download-4',\n\t\t\t\t'im-icon-upload-4',\n\t\t\t\t'im-icon-download-5',\n\t\t\t\t'im-icon-upload-5',\n\t\t\t\t'im-icon-download-6',\n\t\t\t\t'im-icon-upload-6',\n\t\t\t\t'im-icon-download-7',\n\t\t\t\t'im-icon-upload-7',\n\t\t\t\t'im-icon-globe',\n\t\t\t\t'im-icon-globe-2',\n\t\t\t\t'im-icon-globe-3',\n\t\t\t\t'im-icon-earth',\n\t\t\t\t'im-icon-network',\n\t\t\t\t'im-icon-link',\n\t\t\t\t'im-icon-link-2',\n\t\t\t\t'im-icon-link-3',\n\t\t\t\t'im-icon-link2',\n\t\t\t\t'im-icon-link-4',\n\t\t\t\t'im-icon-link-5',\n\t\t\t\t'im-icon-link-6',\n\t\t\t\t'im-icon-anchor',\n\t\t\t\t'im-icon-flag',\n\t\t\t\t'im-icon-flag-2',\n\t\t\t\t'im-icon-flag-3',\n\t\t\t\t'im-icon-flag-4',\n\t\t\t\t'im-icon-flag-5',\n\t\t\t\t'im-icon-flag-6',\n\t\t\t\t'im-icon-attachment',\n\t\t\t\t'im-icon-attachment-2',\n\t\t\t\t'im-icon-eye',\n\t\t\t\t'im-icon-eye-blocked',\n\t\t\t\t'im-icon-eye-2',\n\t\t\t\t'im-icon-eye-3',\n\t\t\t\t'im-icon-eye-blocked-2',\n\t\t\t\t'im-icon-eye-4',\n\t\t\t\t'im-icon-eye-5',\n\t\t\t\t'im-icon-eye-6',\n\t\t\t\t'im-icon-eye-7',\n\t\t\t\t'im-icon-eye-8',\n\t\t\t\t'im-icon-bookmark',\n\t\t\t\t'im-icon-bookmark-2',\n\t\t\t\t'im-icon-bookmarks',\n\t\t\t\t'im-icon-bookmark-3',\n\t\t\t\t'im-icon-spotlight',\n\t\t\t\t'im-icon-starburst',\n\t\t\t\t'im-icon-snowflake',\n\t\t\t\t'im-icon-temperature',\n\t\t\t\t'im-icon-temperature-2',\n\t\t\t\t'im-icon-weather-lightning',\n\t\t\t\t'im-icon-weather-rain',\n\t\t\t\t'im-icon-weather-snow',\n\t\t\t\t'im-icon-windy',\n\t\t\t\t'im-icon-fan',\n\t\t\t\t'im-icon-umbrella',\n\t\t\t\t'im-icon-sun',\n\t\t\t\t'im-icon-sun-2',\n\t\t\t\t'im-icon-brightness-high',\n\t\t\t\t'im-icon-brightness-medium',\n\t\t\t\t'im-icon-brightness-low',\n\t\t\t\t'im-icon-brightness-contrast',\n\t\t\t\t'im-icon-contrast',\n\t\t\t\t'im-icon-moon',\n\t\t\t\t'im-icon-bed',\n\t\t\t\t'im-icon-bed-2',\n\t\t\t\t'im-icon-star',\n\t\t\t\t'im-icon-star-2',\n\t\t\t\t'im-icon-star-3',\n\t\t\t\t'im-icon-star-4',\n\t\t\t\t'im-icon-star-5',\n\t\t\t\t'im-icon-star-6',\n\t\t\t\t'im-icon-heart',\n\t\t\t\t'im-icon-heart-2',\n\t\t\t\t'im-icon-heart-3',\n\t\t\t\t'im-icon-heart-4',\n\t\t\t\t'im-icon-heart-broken',\n\t\t\t\t'im-icon-heart-5',\n\t\t\t\t'im-icon-heart-6',\n\t\t\t\t'im-icon-heart-broken-2',\n\t\t\t\t'im-icon-heart-7',\n\t\t\t\t'im-icon-heart-8',\n\t\t\t\t'im-icon-heart-broken-3',\n\t\t\t\t'im-icon-lips',\n\t\t\t\t'im-icon-lips-2',\n\t\t\t\t'im-icon-thumbs-up',\n\t\t\t\t'im-icon-thumbs-up-2',\n\t\t\t\t'im-icon-thumbs-down',\n\t\t\t\t'im-icon-thumbs-down-2',\n\t\t\t\t'im-icon-thumbs-up-3',\n\t\t\t\t'im-icon-thumbs-up-4',\n\t\t\t\t'im-icon-thumbs-up-5',\n\t\t\t\t'im-icon-thumbs-up-6',\n\t\t\t\t'im-icon-people',\n\t\t\t\t'im-icon-man',\n\t\t\t\t'im-icon-male',\n\t\t\t\t'im-icon-woman',\n\t\t\t\t'im-icon-female',\n\t\t\t\t'im-icon-peace',\n\t\t\t\t'im-icon-yin-yang',\n\t\t\t\t'im-icon-happy',\n\t\t\t\t'im-icon-happy-2',\n\t\t\t\t'im-icon-smiley',\n\t\t\t\t'im-icon-smiley-2',\n\t\t\t\t'im-icon-tongue',\n\t\t\t\t'im-icon-tongue-2',\n\t\t\t\t'im-icon-sad',\n\t\t\t\t'im-icon-sad-2',\n\t\t\t\t'im-icon-wink',\n\t\t\t\t'im-icon-wink-2',\n\t\t\t\t'im-icon-grin',\n\t\t\t\t'im-icon-grin-2',\n\t\t\t\t'im-icon-cool',\n\t\t\t\t'im-icon-cool-2',\n\t\t\t\t'im-icon-angry',\n\t\t\t\t'im-icon-angry-2',\n\t\t\t\t'im-icon-evil',\n\t\t\t\t'im-icon-evil-2',\n\t\t\t\t'im-icon-shocked',\n\t\t\t\t'im-icon-shocked-2',\n\t\t\t\t'im-icon-confused',\n\t\t\t\t'im-icon-confused-2',\n\t\t\t\t'im-icon-neutral',\n\t\t\t\t'im-icon-neutral-2',\n\t\t\t\t'im-icon-wondering',\n\t\t\t\t'im-icon-wondering-2',\n\t\t\t\t'im-icon-cursor',\n\t\t\t\t'im-icon-cursor-2',\n\t\t\t\t'im-icon-point-up',\n\t\t\t\t'im-icon-point-right',\n\t\t\t\t'im-icon-point-down',\n\t\t\t\t'im-icon-point-left',\n\t\t\t\t'im-icon-pointer',\n\t\t\t\t'im-icon-hand',\n\t\t\t\t'im-icon-stack-empty',\n\t\t\t\t'im-icon-stack-plus',\n\t\t\t\t'im-icon-stack-minus',\n\t\t\t\t'im-icon-stack-star',\n\t\t\t\t'im-icon-stack-picture',\n\t\t\t\t'im-icon-stack-down',\n\t\t\t\t'im-icon-stack-up',\n\t\t\t\t'im-icon-stack-cancel',\n\t\t\t\t'im-icon-stack-checkmark',\n\t\t\t\t'im-icon-stack-list',\n\t\t\t\t'im-icon-stack-clubs',\n\t\t\t\t'im-icon-stack-spades',\n\t\t\t\t'im-icon-stack-hearts',\n\t\t\t\t'im-icon-stack-diamonds',\n\t\t\t\t'im-icon-stack-user',\n\t\t\t\t'im-icon-stack-4',\n\t\t\t\t'im-icon-stack-music',\n\t\t\t\t'im-icon-stack-play',\n\t\t\t\t'im-icon-move',\n\t\t\t\t'im-icon-resize',\n\t\t\t\t'im-icon-resize-2',\n\t\t\t\t'im-icon-warning',\n\t\t\t\t'im-icon-warning-2',\n\t\t\t\t'im-icon-notification',\n\t\t\t\t'im-icon-notification-2',\n\t\t\t\t'im-icon-question',\n\t\t\t\t'im-icon-question-2',\n\t\t\t\t'im-icon-question-3',\n\t\t\t\t'im-icon-question-4',\n\t\t\t\t'im-icon-question-5',\n\t\t\t\t'im-icon-plus-circle',\n\t\t\t\t'im-icon-plus-circle-2',\n\t\t\t\t'im-icon-minus-circle',\n\t\t\t\t'im-icon-minus-circle-2',\n\t\t\t\t'im-icon-info',\n\t\t\t\t'im-icon-info-2',\n\t\t\t\t'im-icon-blocked',\n\t\t\t\t'im-icon-cancel-circle',\n\t\t\t\t'im-icon-cancel-circle-2',\n\t\t\t\t'im-icon-checkmark-circle',\n\t\t\t\t'im-icon-checkmark-circle-2',\n\t\t\t\t'im-icon-cancel',\n\t\t\t\t'im-icon-spam',\n\t\t\t\t'im-icon-close',\n\t\t\t\t'im-icon-close-2',\n\t\t\t\t'im-icon-close-3',\n\t\t\t\t'im-icon-close-4',\n\t\t\t\t'im-icon-close-5',\n\t\t\t\t'im-icon-checkmark',\n\t\t\t\t'im-icon-checkmark-2',\n\t\t\t\t'im-icon-checkmark-3',\n\t\t\t\t'im-icon-checkmark-4',\n\t\t\t\t'im-icon-spell-check',\n\t\t\t\t'im-icon-minus',\n\t\t\t\t'im-icon-plus',\n\t\t\t\t'im-icon-minus-2',\n\t\t\t\t'im-icon-plus-2',\n\t\t\t\t'im-icon-enter',\n\t\t\t\t'im-icon-exit',\n\t\t\t\t'im-icon-enter-2',\n\t\t\t\t'im-icon-exit-2',\n\t\t\t\t'im-icon-enter-3',\n\t\t\t\t'im-icon-exit-3',\n\t\t\t\t'im-icon-exit-4',\n\t\t\t\t'im-icon-play-3',\n\t\t\t\t'im-icon-pause',\n\t\t\t\t'im-icon-stop',\n\t\t\t\t'im-icon-backward',\n\t\t\t\t'im-icon-forward-2',\n\t\t\t\t'im-icon-play-4',\n\t\t\t\t'im-icon-pause-2',\n\t\t\t\t'im-icon-stop-2',\n\t\t\t\t'im-icon-backward-2',\n\t\t\t\t'im-icon-forward-3',\n\t\t\t\t'im-icon-first',\n\t\t\t\t'im-icon-last',\n\t\t\t\t'im-icon-previous',\n\t\t\t\t'im-icon-next',\n\t\t\t\t'im-icon-eject',\n\t\t\t\t'im-icon-volume-high',\n\t\t\t\t'im-icon-volume-medium',\n\t\t\t\t'im-icon-volume-low',\n\t\t\t\t'im-icon-volume-mute',\n\t\t\t\t'im-icon-volume-mute-2',\n\t\t\t\t'im-icon-volume-increase',\n\t\t\t\t'im-icon-volume-decrease',\n\t\t\t\t'im-icon-volume-high-2',\n\t\t\t\t'im-icon-volume-medium-2',\n\t\t\t\t'im-icon-volume-low-2',\n\t\t\t\t'im-icon-volume-mute-3',\n\t\t\t\t'im-icon-volume-mute-4',\n\t\t\t\t'im-icon-volume-increase-2',\n\t\t\t\t'im-icon-volume-decrease-2',\n\t\t\t\t'im-icon-volume5',\n\t\t\t\t'im-icon-volume4',\n\t\t\t\t'im-icon-volume3',\n\t\t\t\t'im-icon-volume2',\n\t\t\t\t'im-icon-volume1',\n\t\t\t\t'im-icon-volume0',\n\t\t\t\t'im-icon-volume-mute-5',\n\t\t\t\t'im-icon-volume-mute-6',\n\t\t\t\t'im-icon-loop',\n\t\t\t\t'im-icon-loop-2',\n\t\t\t\t'im-icon-loop-3',\n\t\t\t\t'im-icon-loop-4',\n\t\t\t\t'im-icon-loop-5',\n\t\t\t\t'im-icon-shuffle',\n\t\t\t\t'im-icon-shuffle-2',\n\t\t\t\t'im-icon-wave',\n\t\t\t\t'im-icon-wave-2',\n\t\t\t\t'im-icon-arrow-first',\n\t\t\t\t'im-icon-arrow-right',\n\t\t\t\t'im-icon-arrow-up',\n\t\t\t\t'im-icon-arrow-right-2',\n\t\t\t\t'im-icon-arrow-down',\n\t\t\t\t'im-icon-arrow-left',\n\t\t\t\t'im-icon-arrow-up-2',\n\t\t\t\t'im-icon-arrow-right-3',\n\t\t\t\t'im-icon-arrow-down-2',\n\t\t\t\t'im-icon-arrow-left-2',\n\t\t\t\t'im-icon-arrow-up-left',\n\t\t\t\t'im-icon-arrow-up-3',\n\t\t\t\t'im-icon-arrow-up-right',\n\t\t\t\t'im-icon-arrow-right-4',\n\t\t\t\t'im-icon-arrow-down-right',\n\t\t\t\t'im-icon-arrow-down-3',\n\t\t\t\t'im-icon-arrow-down-left',\n\t\t\t\t'im-icon-arrow-left-3',\n\t\t\t\t'im-icon-arrow-up-left-2',\n\t\t\t\t'im-icon-arrow-up-4',\n\t\t\t\t'im-icon-arrow-up-right-2',\n\t\t\t\t'im-icon-arrow-right-5',\n\t\t\t\t'im-icon-arrow-down-right-2',\n\t\t\t\t'im-icon-arrow-down-4',\n\t\t\t\t'im-icon-arrow-down-left-2',\n\t\t\t\t'im-icon-arrow-left-4',\n\t\t\t\t'im-icon-arrow-up-left-3',\n\t\t\t\t'im-icon-arrow-up-5',\n\t\t\t\t'im-icon-arrow-up-right-3',\n\t\t\t\t'im-icon-arrow-right-6',\n\t\t\t\t'im-icon-arrow-down-right-3',\n\t\t\t\t'im-icon-arrow-down-5',\n\t\t\t\t'im-icon-arrow-down-left-3',\n\t\t\t\t'im-icon-arrow-left-5',\n\t\t\t\t'im-icon-arrow-up-left-4',\n\t\t\t\t'im-icon-arrow-up-6',\n\t\t\t\t'im-icon-arrow-up-right-4',\n\t\t\t\t'im-icon-arrow-right-7',\n\t\t\t\t'im-icon-arrow-down-right-4',\n\t\t\t\t'im-icon-arrow-down-6',\n\t\t\t\t'im-icon-arrow-down-left-4',\n\t\t\t\t'im-icon-arrow-left-6',\n\t\t\t\t'im-icon-arrow',\n\t\t\t\t'im-icon-arrow-2',\n\t\t\t\t'im-icon-arrow-3',\n\t\t\t\t'im-icon-arrow-4',\n\t\t\t\t'im-icon-arrow-5',\n\t\t\t\t'im-icon-arrow-6',\n\t\t\t\t'im-icon-arrow-7',\n\t\t\t\t'im-icon-arrow-8',\n\t\t\t\t'im-icon-arrow-up-left-5',\n\t\t\t\t'im-icon-arrow-square',\n\t\t\t\t'im-icon-arrow-up-right-5',\n\t\t\t\t'im-icon-arrow-right-8',\n\t\t\t\t'im-icon-arrow-down-right-5',\n\t\t\t\t'im-icon-arrow-down-7',\n\t\t\t\t'im-icon-arrow-down-left-5',\n\t\t\t\t'im-icon-arrow-left-7',\n\t\t\t\t'im-icon-arrow-up-7',\n\t\t\t\t'im-icon-arrow-right-9',\n\t\t\t\t'im-icon-arrow-down-8',\n\t\t\t\t'im-icon-arrow-left-8',\n\t\t\t\t'im-icon-arrow-up-8',\n\t\t\t\t'im-icon-arrow-right-10',\n\t\t\t\t'im-icon-arrow-bottom',\n\t\t\t\t'im-icon-arrow-left-9',\n\t\t\t\t'im-icon-arrow-up-left-6',\n\t\t\t\t'im-icon-arrow-up-9',\n\t\t\t\t'im-icon-arrow-up-right-6',\n\t\t\t\t'im-icon-arrow-right-11',\n\t\t\t\t'im-icon-arrow-down-right-6',\n\t\t\t\t'im-icon-arrow-down-9',\n\t\t\t\t'im-icon-arrow-down-left-6',\n\t\t\t\t'im-icon-arrow-left-10',\n\t\t\t\t'im-icon-arrow-up-left-7',\n\t\t\t\t'im-icon-arrow-up-10',\n\t\t\t\t'im-icon-arrow-up-right-7',\n\t\t\t\t'im-icon-arrow-right-12',\n\t\t\t\t'im-icon-arrow-down-right-7',\n\t\t\t\t'im-icon-arrow-down-10',\n\t\t\t\t'im-icon-arrow-down-left-7',\n\t\t\t\t'im-icon-arrow-left-11',\n\t\t\t\t'im-icon-arrow-up-11',\n\t\t\t\t'im-icon-arrow-right-13',\n\t\t\t\t'im-icon-arrow-down-11',\n\t\t\t\t'im-icon-arrow-left-12',\n\t\t\t\t'im-icon-arrow-up-12',\n\t\t\t\t'im-icon-arrow-right-14',\n\t\t\t\t'im-icon-arrow-down-12',\n\t\t\t\t'im-icon-arrow-left-13',\n\t\t\t\t'im-icon-arrow-up-13',\n\t\t\t\t'im-icon-arrow-right-15',\n\t\t\t\t'im-icon-arrow-down-13',\n\t\t\t\t'im-icon-arrow-left-14',\n\t\t\t\t'im-icon-arrow-up-14',\n\t\t\t\t'im-icon-arrow-right-16',\n\t\t\t\t'im-icon-arrow-down-14',\n\t\t\t\t'im-icon-arrow-left-15',\n\t\t\t\t'im-icon-arrow-up-15',\n\t\t\t\t'im-icon-arrow-right-17',\n\t\t\t\t'im-icon-arrow-down-15',\n\t\t\t\t'im-icon-arrow-left-16',\n\t\t\t\t'im-icon-arrow-up-16',\n\t\t\t\t'im-icon-arrow-right-18',\n\t\t\t\t'im-icon-arrow-down-16',\n\t\t\t\t'im-icon-arrow-left-17',\n\t\t\t\t'im-icon-menu-10',\n\t\t\t\t'im-icon-menu-11',\n\t\t\t\t'im-icon-menu-close',\n\t\t\t\t'im-icon-menu-close-2',\n\t\t\t\t'im-icon-enter-4',\n\t\t\t\t'im-icon-enter-5',\n\t\t\t\t'im-icon-esc',\n\t\t\t\t'im-icon-backspace',\n\t\t\t\t'im-icon-backspace-2',\n\t\t\t\t'im-icon-backspace-3',\n\t\t\t\t'im-icon-tab',\n\t\t\t\t'im-icon-transmission',\n\t\t\t\t'im-icon-transmission-2',\n\t\t\t\t'im-icon-sort',\n\t\t\t\t'im-icon-sort-2',\n\t\t\t\t'im-icon-key-keyboard',\n\t\t\t\t'im-icon-key-A',\n\t\t\t\t'im-icon-key-up',\n\t\t\t\t'im-icon-key-right',\n\t\t\t\t'im-icon-key-down',\n\t\t\t\t'im-icon-key-left',\n\t\t\t\t'im-icon-command',\n\t\t\t\t'im-icon-checkbox-checked',\n\t\t\t\t'im-icon-checkbox-unchecked',\n\t\t\t\t'im-icon-square',\n\t\t\t\t'im-icon-checkbox-partial',\n\t\t\t\t'im-icon-checkbox',\n\t\t\t\t'im-icon-checkbox-unchecked-2',\n\t\t\t\t'im-icon-checkbox-partial-2',\n\t\t\t\t'im-icon-checkbox-checked-2',\n\t\t\t\t'im-icon-checkbox-unchecked-3',\n\t\t\t\t'im-icon-checkbox-partial-3',\n\t\t\t\t'im-icon-radio-checked',\n\t\t\t\t'im-icon-radio-unchecked',\n\t\t\t\t'im-icon-circle',\n\t\t\t\t'im-icon-circle-2',\n\t\t\t\t'im-icon-crop',\n\t\t\t\t'im-icon-crop-2',\n\t\t\t\t'im-icon-vector',\n\t\t\t\t'im-icon-rulers',\n\t\t\t\t'im-icon-scissors',\n\t\t\t\t'im-icon-scissors-2',\n\t\t\t\t'im-icon-scissors-3',\n\t\t\t\t'im-icon-filter',\n\t\t\t\t'im-icon-filter-2',\n\t\t\t\t'im-icon-filter-3',\n\t\t\t\t'im-icon-filter-4',\n\t\t\t\t'im-icon-font',\n\t\t\t\t'im-icon-font-size',\n\t\t\t\t'im-icon-type',\n\t\t\t\t'im-icon-text-height',\n\t\t\t\t'im-icon-text-width',\n\t\t\t\t'im-icon-height',\n\t\t\t\t'im-icon-width',\n\t\t\t\t'im-icon-bold',\n\t\t\t\t'im-icon-underline',\n\t\t\t\t'im-icon-italic',\n\t\t\t\t'im-icon-strikethrough',\n\t\t\t\t'im-icon-strikethrough-2',\n\t\t\t\t'im-icon-font-size-2',\n\t\t\t\t'im-icon-bold-2',\n\t\t\t\t'im-icon-underline-2',\n\t\t\t\t'im-icon-italic-2',\n\t\t\t\t'im-icon-strikethrough-3',\n\t\t\t\t'im-icon-omega',\n\t\t\t\t'im-icon-sigma',\n\t\t\t\t'im-icon-nbsp',\n\t\t\t\t'im-icon-page-break',\n\t\t\t\t'im-icon-page-break-2',\n\t\t\t\t'im-icon-superscript',\n\t\t\t\t'im-icon-subscript',\n\t\t\t\t'im-icon-superscript-2',\n\t\t\t\t'im-icon-subscript-2',\n\t\t\t\t'im-icon-text-color',\n\t\t\t\t'im-icon-highlight',\n\t\t\t\t'im-icon-pagebreak',\n\t\t\t\t'im-icon-clear-formatting',\n\t\t\t\t'im-icon-table',\n\t\t\t\t'im-icon-table-2',\n\t\t\t\t'im-icon-insert-template',\n\t\t\t\t'im-icon-pilcrow',\n\t\t\t\t'im-icon-left-to-right',\n\t\t\t\t'im-icon-right-to-left',\n\t\t\t\t'im-icon-paragraph-left',\n\t\t\t\t'im-icon-paragraph-center',\n\t\t\t\t'im-icon-paragraph-right',\n\t\t\t\t'im-icon-paragraph-justify',\n\t\t\t\t'im-icon-paragraph-left-2',\n\t\t\t\t'im-icon-paragraph-center-2',\n\t\t\t\t'im-icon-paragraph-right-2',\n\t\t\t\t'im-icon-paragraph-justify-2',\n\t\t\t\t'im-icon-indent-increase',\n\t\t\t\t'im-icon-indent-decrease',\n\t\t\t\t'im-icon-paragraph-left-3',\n\t\t\t\t'im-icon-paragraph-center-3',\n\t\t\t\t'im-icon-paragraph-right-3',\n\t\t\t\t'im-icon-paragraph-justify-3',\n\t\t\t\t'im-icon-indent-increase-2',\n\t\t\t\t'im-icon-indent-decrease-2',\n\t\t\t\t'im-icon-share',\n\t\t\t\t'im-icon-new-tab',\n\t\t\t\t'im-icon-new-tab-2',\n\t\t\t\t'im-icon-popout',\n\t\t\t\t'im-icon-embed',\n\t\t\t\t'im-icon-code',\n\t\t\t\t'im-icon-console',\n\t\t\t\t'im-icon-seven-segment-0',\n\t\t\t\t'im-icon-seven-segment-1',\n\t\t\t\t'im-icon-seven-segment-2',\n\t\t\t\t'im-icon-seven-segment-3',\n\t\t\t\t'im-icon-seven-segment-4',\n\t\t\t\t'im-icon-seven-segment-5',\n\t\t\t\t'im-icon-seven-segment-6',\n\t\t\t\t'im-icon-seven-segment-7',\n\t\t\t\t'im-icon-seven-segment-8',\n\t\t\t\t'im-icon-seven-segment-9',\n\t\t\t\t'im-icon-share-2',\n\t\t\t\t'im-icon-share-3',\n\t\t\t\t'im-icon-mail',\n\t\t\t\t'im-icon-mail-2',\n\t\t\t\t'im-icon-mail-3',\n\t\t\t\t'im-icon-mail-4',\n\t\t\t\t'im-icon-google',\n\t\t\t\t'im-icon-google-plus',\n\t\t\t\t'im-icon-google-plus-2',\n\t\t\t\t'im-icon-google-plus-3',\n\t\t\t\t'im-icon-google-plus-4',\n\t\t\t\t'im-icon-google-drive',\n\t\t\t\t'im-icon-facebook',\n\t\t\t\t'im-icon-facebook-2',\n\t\t\t\t'im-icon-facebook-3',\n\t\t\t\t'im-icon-facebook-4',\n\t\t\t\t'im-icon-instagram',\n\t\t\t\t'im-icon-twitter',\n\t\t\t\t'im-icon-twitter-2',\n\t\t\t\t'im-icon-twitter-3',\n\t\t\t\t'im-icon-feed-2',\n\t\t\t\t'im-icon-feed-3',\n\t\t\t\t'im-icon-feed-4',\n\t\t\t\t'im-icon-youtube',\n\t\t\t\t'im-icon-youtube-2',\n\t\t\t\t'im-icon-vimeo',\n\t\t\t\t'im-icon-vimeo2',\n\t\t\t\t'im-icon-vimeo-2',\n\t\t\t\t'im-icon-lanyrd',\n\t\t\t\t'im-icon-flickr',\n\t\t\t\t'im-icon-flickr-2',\n\t\t\t\t'im-icon-flickr-3',\n\t\t\t\t'im-icon-flickr-4',\n\t\t\t\t'im-icon-picassa',\n\t\t\t\t'im-icon-picassa-2',\n\t\t\t\t'im-icon-dribbble',\n\t\t\t\t'im-icon-dribbble-2',\n\t\t\t\t'im-icon-dribbble-3',\n\t\t\t\t'im-icon-forrst',\n\t\t\t\t'im-icon-forrst-2',\n\t\t\t\t'im-icon-deviantart',\n\t\t\t\t'im-icon-deviantart-2',\n\t\t\t\t'im-icon-steam',\n\t\t\t\t'im-icon-steam-2',\n\t\t\t\t'im-icon-github',\n\t\t\t\t'im-icon-github-2',\n\t\t\t\t'im-icon-github-3',\n\t\t\t\t'im-icon-github-4',\n\t\t\t\t'im-icon-github-5',\n\t\t\t\t'im-icon-wordpress',\n\t\t\t\t'im-icon-wordpress-2',\n\t\t\t\t'im-icon-joomla',\n\t\t\t\t'im-icon-blogger',\n\t\t\t\t'im-icon-blogger-2',\n\t\t\t\t'im-icon-tumblr',\n\t\t\t\t'im-icon-tumblr-2',\n\t\t\t\t'im-icon-yahoo',\n\t\t\t\t'im-icon-tux',\n\t\t\t\t'im-icon-apple',\n\t\t\t\t'im-icon-finder',\n\t\t\t\t'im-icon-android',\n\t\t\t\t'im-icon-windows',\n\t\t\t\t'im-icon-windows8',\n\t\t\t\t'im-icon-soundcloud',\n\t\t\t\t'im-icon-soundcloud-2',\n\t\t\t\t'im-icon-skype',\n\t\t\t\t'im-icon-reddit',\n\t\t\t\t'im-icon-linkedin',\n\t\t\t\t'im-icon-lastfm',\n\t\t\t\t'im-icon-lastfm-2',\n\t\t\t\t'im-icon-delicious',\n\t\t\t\t'im-icon-stumbleupon',\n\t\t\t\t'im-icon-stumbleupon-2',\n\t\t\t\t'im-icon-stackoverflow',\n\t\t\t\t'im-icon-pinterest',\n\t\t\t\t'im-icon-pinterest-2',\n\t\t\t\t'im-icon-xing',\n\t\t\t\t'im-icon-xing-2',\n\t\t\t\t'im-icon-flattr',\n\t\t\t\t'im-icon-safari',\n\t\t\t\t'im-icon-foursquare',\n\t\t\t\t'im-icon-foursquare-2',\n\t\t\t\t'im-icon-paypal',\n\t\t\t\t'im-icon-paypal-2',\n\t\t\t\t'im-icon-paypal-3',\n\t\t\t\t'im-icon-yelp',\n\t\t\t\t'im-icon-libreoffice',\n\t\t\t\t'im-icon-file-pdf',\n\t\t\t\t'im-icon-file-openoffice',\n\t\t\t\t'im-icon-file-word',\n\t\t\t\t'im-icon-file-excel',\n\t\t\t\t'im-icon-file-zip',\n\t\t\t\t'im-icon-file-powerpoint',\n\t\t\t\t'im-icon-file-xml',\n\t\t\t\t'im-icon-file-css',\n\t\t\t\t'im-icon-html5',\n\t\t\t\t'im-icon-html5-2',\n\t\t\t\t'im-icon-css3',\n\t\t\t\t'im-icon-chrome',\n\t\t\t\t'im-icon-firefox',\n\t\t\t\t'im-icon-IE',\n\t\t\t\t'im-icon-opera',\n\t\t\t);\n\t\t}",
"private function generateCustomCSS()\n {\n // Create CSS Array:\n \n $css = [];\n \n // Define CSS Array:\n \n foreach (ClassInfo::subclassesFor(SiteTree::class) as $class) {\n \n // Obtain Icon Config:\n \n if ($icon = Injector::inst()->get($class)->config()->icon) {\n \n // Create CSS Selector:\n \n $selector = implode(\n ', ',\n array_map(\n function ($value) use ($class) {\n return sprintf($value, Convert::raw2htmlid($class));\n },\n $this->getPageIconSelectors()\n )\n );\n \n // Create CSS Definition:\n \n if (Director::fileExists($icon)) {\n $css[] = sprintf(\"%s { background: transparent url('%s') 0 0 no-repeat; }\", $selector, $icon);\n } else {\n $css[] = sprintf(\"%s { %s }\", $selector, $icon);\n }\n \n }\n \n }\n \n // Answer CSS String:\n \n return implode(\"\\n\", $css);\n }",
"function fusion_builder_get_icons_array() {\n\t$icons = new FAIterator( FUSION_BUILDER_FA_PATH );\n\t$icons_array = array();\n\n\tforeach ( $icons as $icon ) {\n\t\t$icons_array[ $icon->class ] = $icon->class;\n\t}\n\treturn $icons_array;\n}",
"private function get_available_repo_icons() {\n // programming language repo icons...\n return array(\n 'c',\n 'c#',\n 'c++',\n 'delphi',\n 'java',\n 'javascript',\n 'perl',\n 'php',\n 'python',\n 'ruby',\n 'shell'\n );\n }",
"public function icons() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/icons.php';\n\t}",
"function mpcth_get_icons() {\r\n\tglobal $mpcth_icons_array;\r\n\t\r\n\treturn array_flip($mpcth_icons_array);\r\n}",
"protected function _buildListOfIcons()\n {\n $icons = new \\Yana\\Views\\Icons\\Collection();\n $icons[\"1\"] = $icon1 = new \\Yana\\Views\\Icons\\File();\n $icon1->setId(\"Id1\")->setPath(\"Path1\");\n $icons[\"2\"] = $icon2 = new \\Yana\\Views\\Icons\\File();\n $icon2->setId(\"Id2\")->setPath(\"Path2\");\n return $icons;\n }",
"function icon_collection_list()\n{\n\t$icon_list = array('icon-music', 'icon-music-alt', 'icon-search', 'icon-search-alt', 'icon-mail', 'icon-heart', 'icon-heart-empty', 'icon-star', 'icon-star-empty', 'icon-user', 'icon-users', 'icon-user-add', 'icon-video', 'icon-picture', 'icon-camera', 'icon-th', 'icon-th-list', 'icon-ok', 'icon-cancel', 'icon-cancel-circle', 'icon-plus', 'icon-plus-sign', 'icon-minus', 'icon-minus-circle', 'icon-help', 'icon-help-circle', 'icon-info', 'icon-info-circle', 'icon-back', 'icon-back-alt', 'icon-home', 'icon-link', 'icon-attach', 'icon-lock', 'icon-lock-open', 'icon-eye', 'icon-tag', 'icon-bookmark', 'icon-flag', 'icon-thumbs-up', 'icon-download', 'icon-upload', 'icon-upload-cloud', 'icon-reply', 'icon-reply-all', 'icon-forward', 'icon-quote-right', 'icon-code', 'icon-export', 'icon-pencil', 'icon-feather', 'icon-print', 'icon-retweet', 'icon-keyboard', 'icon-comment', 'icon-chat', 'icon-bell', 'icon-attention', 'icon-vcard', 'icon-address', 'icon-map-marker', 'icon-map', 'icon-direction', 'icon-compass', 'icon-trash', 'icon-doc', 'icon-docs', 'icon-docs-landscape', 'icon-doc-text', 'icon-book-open', 'icon-folder', 'icon-archive', 'icon-rss', 'icon-phone', 'icon-cog', 'icon-share', 'icon-basket', 'icon-calendar', 'icon-mic', 'icon-volume-off', 'icon-volume-up', 'icon-volume', 'icon-clock', 'icon-hourglass', 'icon-lamp', 'icon-light-down', 'icon-light-up', 'icon-block', 'icon-resize-full', 'icon-resize-small', 'icon-popup', 'icon-publish', 'icon-window', 'icon-arrow-combo', 'icon-down-circle2', 'icon-left-circle2', 'icon-right-circle2', 'icon-up-circle2', 'icon-down-open', 'icon-chevron-left', 'icon-chevron-right', 'icon-up-open', 'icon-down-thin', 'icon-left-thin', 'icon-right-thin', 'icon-up-thin', 'icon-down-dir', 'icon-left-dir', 'icon-right-dir', 'icon-up-dir', 'icon-down-bold', 'icon-left-bold', 'icon-right-bold', 'icon-up-bold', 'icon-down', 'icon-left', 'icon-right', 'icon-up', 'icon-ccw', 'icon-cw', 'icon-level-down', 'icon-shuffle', 'icon-play', 'icon-stop', 'icon-pause', 'icon-record', 'icon-to-end', 'icon-to-start', 'icon-fast-fw', 'icon-fast-bw', 'icon-progress-0', 'icon-progress-1', 'icon-progress-2', 'icon-progress-3', 'icon-target', 'icon-palette', 'icon-list-add', 'icon-signal', 'icon-top-list', 'icon-battery', 'icon-back-in-time', 'icon-monitor', 'icon-mobile', 'icon-net', 'icon-cd', 'icon-inbox', 'icon-install', 'icon-globe', 'icon-cloud', 'icon-flash', 'icon-moon', 'icon-flight', 'icon-leaf', 'icon-lifebuoy', 'icon-mouse', 'icon-bag', 'icon-dot', 'icon-dot-2', 'icon-dot-3', 'icon-google-circles', 'icon-cc', 'icon-logo-entypo', 'icon-flag-sw', 'icon-logo-db');\n\t\n\t#$icon_list = array('icon phone', ' icon mobile', ' icon mouse', ' icon address', ' icon mail', ' icon paper-plane', ' icon pencil', ' icon feather', ' icon attach', ' icon inbox', ' icon reply', ' icon reply-all', ' icon forward', ' icon user', ' icon users', ' icon add-user', ' icon vcard', ' icon export', ' icon location', ' icon map', ' icon compass', ' icon direction', ' icon hair-cross', ' icon share', ' icon shareable', ' icon heart', ' icon heart-empty', ' icon star', ' icon star-empty', ' icon thumbs-up', ' icon thumbs-down', ' icon chat', ' icon comment', ' icon quote', ' icon home', ' icon popup', ' icon search', ' icon flashlight', ' icon print', ' icon bell', ' icon link', ' icon flag', ' icon cog', ' icon tools', ' icon trophy', ' icon tag', ' icon camera', ' icon megaphone', ' icon moon', ' icon palette', ' icon leaf', ' icon note', ' icon beamed-note', ' icon new', ' icon graduation-cap', ' icon book', ' icon newspaper', ' icon bag', ' icon airplane', ' icon lifebuoy', ' icon eye', ' icon clock', ' icon mic', ' icon calendar', ' icon flash', ' icon thunder-cloud', ' icon droplet', ' icon cd', ' icon briefcase', ' icon air', ' icon hourglass', ' icon gauge', ' icon language', ' icon network', ' icon key', ' icon battery', ' icon bucket', ' icon magnet', ' icon drive', ' icon cup', ' icon rocket', ' icon brush', ' icon suitcase', ' icon traffic-cone', ' icon globe', ' icon keyboard', ' icon browser', ' icon publish', ' icon progress-3', ' icon progress-2', ' icon progress-1', ' icon progress-0', ' icon light-down', ' icon light-up', ' icon adjust', ' icon code', ' icon monitor', ' icon infinity', ' icon light-bulb', ' icon credit-card', ' icon database', ' icon voicemail', ' icon clipboard', ' icon cart', ' icon box', ' icon ticket', ' icon rss', ' icon signal', ' icon thermometer', ' icon water', ' icon sweden', ' icon line-graph', ' icon pie-chart', ' icon bar-graph', ' icon area-graph', ' icon lock', ' icon lock-open', ' icon logout', ' icon login', ' icon check', ' icon cross', ' icon squared-minus', ' icon squared-plus', ' icon squared-cross', ' icon circled-minus', ' icon circled-plus', ' icon circled-cross', ' icon minus', ' icon plus', ' icon erase', ' icon block', ' icon info', ' icon circled-info', ' icon help', ' icon circled-help', ' icon warning', ' icon cycle', ' icon cw', ' icon ccw', ' icon shuffle', ' icon back', ' icon level-down', ' icon retweet', ' icon loop', ' icon back-in-time', ' icon level-up', ' icon switch', ' icon numbered-list', ' icon add-to-list', ' icon layout', ' icon list', ' icon text-doc', ' icon text-doc-inverted', ' icon doc', ' icon docs', ' icon landscape-doc', ' icon picture', ' icon video', ' icon music', ' icon folder', ' icon archive', ' icon trash', ' icon upload', ' icon download', ' icon save', ' icon install', ' icon cloud', ' icon upload-cloud', ' icon bookmark', ' icon bookmarks', ' icon open-book', ' icon play', ' icon paus', ' icon record', ' icon stop', ' icon ff', ' icon fb', ' icon to-start', ' icon to-end', ' icon resize-full', ' icon resize-small', ' icon volume', ' icon sound', ' icon mute', ' icon flow-cascade', ' icon flow-branch', ' icon flow-tree', ' icon flow-line', ' icon flow-parallel', ' icon left-bold', ' icon down-bold', ' icon up-bold', ' icon right-bold', ' icon left', ' icon down', ' icon up', ' icon right', ' icon circled-left', ' icon circled-down', ' icon circled-up', ' icon circled-right', ' icon triangle-left', ' icon triangle-down', ' icon triangle-up', ' icon triangle-right', ' icon chevron-left', ' icon chevron-down', ' icon chevron-up', ' icon chevron-right', ' icon chevron-small-left', ' icon chevron-small-down', ' icon chevron-small-up', ' icon chevron-small-right', ' icon chevron-thin-left', ' icon chevron-thin-down', ' icon chevron-thin-up', ' icon chevron-thin-right', ' icon left-thin', ' icon down-thin', ' icon up-thin', ' icon right-thin', ' icon arrow-combo', ' icon three-dots', ' icon two-dots', ' icon dot', ' icon cc', ' icon cc-by', ' icon cc-nc', ' icon cc-nc-eu', ' icon cc-nc-jp', ' icon cc-sa', ' icon cc-nd', ' icon cc-pd', ' icon cc-zero', ' icon cc-share', ' icon cc-remix', ' icon db-logo', ' icon db-shape');\n\t\n\tif(get_option('silicon_default_icon_system') == 'fontawesome')\n\t{\n\t\t$icon_list = array('icon-glass', 'icon-music', 'icon-search', 'icon-envelope', 'icon-heart', 'icon-star', 'icon-star-empty', 'icon-user', 'icon-film', 'icon-th-large', 'icon-th', 'icon-th-list', 'icon-ok', 'icon-remove', 'icon-zoom-in', 'icon-zoom-out', 'icon-off', 'icon-signal', 'icon-cog', 'icon-trash', 'icon-home', 'icon-file', 'icon-time', 'icon-road', 'icon-download-alt', 'icon-download', 'icon-upload', 'icon-inbox', 'icon-play-circle', 'icon-repeat', 'icon-refresh', 'icon-list-alt', 'icon-lock', 'icon-flag', 'icon-headphones', 'icon-volume-off', 'icon-volume-down', 'icon-volume-up', 'icon-qrcode', 'icon-barcode', 'icon-tag', 'icon-tags', 'icon-book', 'icon-bookmark', 'icon-print', 'icon-camera', 'icon-font', 'icon-bold', 'icon-italic', 'icon-text-height', 'icon-text-width', 'icon-align-left', 'icon-align-center', 'icon-align-right', 'icon-align-justify', 'icon-list', 'icon-indent-left', 'icon-indent-right', 'icon-facetime-video', 'icon-picture', 'icon-pencil', 'icon-map-marker', 'icon-adjust', 'icon-tint', 'icon-edit', 'icon-share', 'icon-check', 'icon-move', 'icon-step-backward', 'icon-fast-backward', 'icon-backward', 'icon-play', 'icon-pause', 'icon-stop', 'icon-forward', 'icon-fast-forward', 'icon-step-forward', 'icon-eject', 'icon-chevron-left', 'icon-chevron-right', 'icon-plus-sign', 'icon-minus-sign', 'icon-remove-sign', 'icon-ok-sign', 'icon-question-sign', 'icon-info-sign', 'icon-screenshot', 'icon-remove-circle', 'icon-ok-circle', 'icon-ban-circle', 'icon-arrow-left', 'icon-arrow-right', 'icon-arrow-up', 'icon-arrow-down', 'icon-share-alt', 'icon-resize-full', 'icon-resize-small', 'icon-plus', 'icon-minus', 'icon-asterisk', 'icon-exclamation-sign', 'icon-gift', 'icon-leaf', 'icon-fire', 'icon-eye-open', 'icon-eye-close', 'icon-warning-sign', 'icon-plane', 'icon-calendar', 'icon-random', 'icon-comment', 'icon-magnet', 'icon-chevron-up', 'icon-chevron-down', 'icon-retweet', 'icon-shopping-cart', 'icon-folder-close', 'icon-folder-open', 'icon-resize-vertical', 'icon-resize-horizontal', 'icon-bar-chart', 'icon-twitter-sign', 'icon-facebook-sign', 'icon-camera-retro', 'icon-key', 'icon-cogs', 'icon-comments', 'icon-thumbs-up', 'icon-thumbs-down', 'icon-star-half', 'icon-heart-empty', 'icon-signout', 'icon-linkedin-sign', 'icon-pushpin', 'icon-external-link', 'icon-signin', 'icon-trophy', 'icon-github-sign', 'icon-upload-alt', 'icon-lemon', 'icon-phone', 'icon-check-empty', 'icon-bookmark-empty', 'icon-phone-sign', 'icon-twitter', 'icon-facebook', 'icon-github', 'icon-unlock', 'icon-credit-card', 'icon-rss', 'icon-hdd', 'icon-bullhorn', 'icon-bell', 'icon-certificate', 'icon-hand-right', 'icon-hand-left', 'icon-hand-up', 'icon-hand-down', 'icon-circle-arrow-left', 'icon-circle-arrow-right', 'icon-circle-arrow-up', 'icon-circle-arrow-down', 'icon-globe', 'icon-wrench', 'icon-tasks', 'icon-filter', 'icon-briefcase', 'icon-fullscreen', 'icon-group', 'icon-link', 'icon-cloud', 'icon-beaker', 'icon-cut', 'icon-copy', 'icon-paper-clip', 'icon-save', 'icon-sign-blank', 'icon-reorder', 'icon-list-ul', 'icon-list-ol', 'icon-strikethrough', 'icon-underline', 'icon-table', 'icon-magic', 'icon-truck', 'icon-pinterest', 'icon-pinterest-sign', 'icon-google-plus-sign', 'icon-google-plus', 'icon-money', 'icon-caret-down', 'icon-caret-up', 'icon-caret-left', 'icon-caret-right', 'icon-columns', 'icon-sort', 'icon-sort-down', 'icon-sort-up', 'icon-envelope-alt', 'icon-linkedin', 'icon-undo', 'icon-legal', 'icon-dashboard', 'icon-comment-alt', 'icon-comments-alt', 'icon-bolt', 'icon-sitemap', 'icon-umbrella', 'icon-paste', 'icon-lightbulb', 'icon-exchange', 'icon-cloud-download', 'icon-cloud-upload', 'icon-user-md', 'icon-stethoscope', 'icon-suitcase', 'icon-bell-alt', 'icon-coffee', 'icon-food', 'icon-file-alt', 'icon-building', 'icon-hospital', 'icon-ambulance', 'icon-medkit', 'icon-fighter-jet', 'icon-beer', 'icon-h-sign', 'icon-plus-sign-alt', 'icon-double-angle-left', 'icon-double-angle-right', 'icon-double-angle-up', 'icon-double-angle-down', 'icon-angle-left', 'icon-angle-right', 'icon-angle-up', 'icon-angle-down', 'icon-desktop', 'icon-laptop', 'icon-tablet', 'icon-mobile-phone', 'icon-circle-blank', 'icon-quote-left', 'icon-quote-right', 'icon-spinner', 'icon-circle', 'icon-reply');\n\t}\n\t\n\tfunction cmp_sort($a, $b)\n\t{\n\t\treturn $a > $b ? 1 : -1;\n\t}\n\t\n\tuasort($icon_list, 'cmp_sort');\n\t\n\treturn $icon_list;\n}",
"public static function get_social_icons() {\n\t\t\t$list = array(\n\t\t\t\t'Share' => 'im-icon-share-2',\n\t\t\t\t'Blogger' => 'im-icon-blogger',\n\t\t\t\t'Delicious' => 'im-icon-delicious',\n\t\t\t\t'Deviantart' => 'im-icon-deviantart-2',\n\t\t\t\t'Dribbble' => 'im-icon-dribble',\n\t\t\t\t'Facebook' => 'im-icon-facebook',\n\t\t\t\t'Flattr' => 'im-icon-flattr',\n\t\t\t\t'Flickr' => 'im-icon-flickr',\n\t\t\t\t'Forrst' => 'im-icon-forrst',\n\t\t\t\t'Foursquare' => 'im-icon-foursquare-2',\n\t\t\t\t'Github' => 'im-icon-github-3',\n\t\t\t\t'Google Drive' => 'im-icon-google-drive',\n\t\t\t\t'Google Plus' => 'im-icon-google-plus',\n\t\t\t\t'Instagram' => 'im-icon-instagram',\n\t\t\t\t'Joomla' => 'im-icon-joomla',\n\t\t\t\t'Lanyrd' => 'im-icon-lanyrd',\n\t\t\t\t'Lastfm' => 'im-icon-lastfm',\n\t\t\t\t'Linkedin' => 'im-icon-linkedin',\n\t\t\t\t'Mail' => 'im-icon-envelop',\n\t\t\t\t'Picassa' => 'im-icon-picassa',\n\t\t\t\t'Pinterest' => 'im-icon-pinterest-2',\n\t\t\t\t'Reddit' => 'im-icon-reddit',\n\t\t\t\t'RSS' => 'im-icon-feed-2',\n\t\t\t\t'Skype' => 'im-icon-skype',\n\t\t\t\t'Stackoverflow' => 'im-icon-stackoverflow',\n\t\t\t\t'Steam' => 'im-icon-steam',\n\t\t\t\t'Stumbleupon' => 'im-icon-stumbleupon',\n\t\t\t\t'Tumblr' => 'im-icon-tumblr',\n\t\t\t\t'Twitter' => 'im-icon-twitter',\n\t\t\t\t'Vimeo' => 'im-icon-vimeo',\n\t\t\t\t'Vk' => 'fa-icon-icon-vk',\n\t\t\t\t'Wordpress' => 'im-icon-wordpress',\n\t\t\t\t'Xing' => 'im-icon-xing',\n\t\t\t\t'Yahoo' => 'im-icon-yahoo',\n\t\t\t\t'Yelp' => 'im-icon-yelp',\n\t\t\t\t'Youtube' => 'im-icon-youtube',\n\t\t\t);\n\t\t\treturn $list;\n\t\t}",
"public static function getPageTitleIcons( $page, $titleIconProperty ) {\n\t\t// get the title icons for this page\n\t\t$discoveredIcons =\n\t\t\tHierarchyBuilder::getPropertyFromPage( $page, $titleIconProperty, false );\n\n\t\t$icons = array();\n\t\tif ( $discoveredIcons ) {\n\t\t\tforeach ( $discoveredIcons as $icon ) {\n\n\t\t\t\t$found = false;\n\t\t\t\tforeach ( $icons as $foundIcon ) {\n\n\t\t\t\t\tif ( $foundIcon[\"icon\"] === $icon ) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( $found == false ) {\n\t\t\t\t\t$entry = array();\n\t\t\t\t\t$entry[\"page\"] = $page;\n\t\t\t\t\t$entry[\"icon\"] = $icon;\n\t\t\t\t\t$icons[] = $entry;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $icons;\n\t}",
"static protected function CSSFileNamesMap() {\n return array(\n PaymentPageDispatcher::LIST_PAYMENT => \"spisak.css\",\n PaymentPageDispatcher::DETAILS_PAYMENT => \"obracundetalji.css\",\n PaymentPageDispatcher::NEW_PAYMENT => \"formstyle.css\",\n PaymentPageDispatcher::UPDATE_PAYMENT => \"formstyle.css\",\n );\n }",
"function ivan_vc_staff_icons() {\n\treturn apply_filters('ivan_vc_staff_icons', array(\n\t\t\"envelope\" => \"Mail\",\n\t\t\"dribbble\" => \"Dribbble\",\n\t\t\"flickr\" => \"Flickr\",\n\t\t\"github\" => \"GitHub\",\n\t\t\"pinterest\" => \"Pinterest\",\n\t\t\"twitter\" => \"Twitter\",\n\t\t\"weibo\" => \"Weibo\",\n\t\t\"youtube\" => \"YouTube\",\n\t\t\"foursquare\" => \"FourSquare\",\n\t\t\"instagram\" => \"Instagram\",\n\t\t\"renren\" => \"RenRen\",\n\t\t\"facebook\" => \"Facebook\",\n\t\t\"google_plus\" => \"Google+\",\n\t\t\"linkedin\" => \"LinkedIn\",\n\t\t\"skype\" => \"Skype\",\n\t\t\"tumblr\" => \"Tumblr\",\n\t\t\"vimeo_square\" => \"Vimeo\",\n\t\t\"xing\" => \"Xing\",\n\t\t\"vk\" => \"VK\",\n\t) );\n}",
"static public function add_icon_selector_styles() {\n\t\twp_enqueue_style( 'thickbox' );\n\t\twp_enqueue_style( 'wfim_option_page', WFIM_PLUGIN_URL . 'css/web-font-icon-manager-icon-selector.css', '0.1', true );\n\t}",
"public static function appIcons() {\n $config = Config::instance();\n $icons_directory = THEME_DIRECTORY.'/'.$config->app_icons_directory;\n $icons_url = THEME_URL.'/'.$config->app_icons_directory;\n if(!file_exists($icons_directory)) return null;\n \n $files = scandir($icons_directory);\n if(!Arr::iterable($files)) return null;\n \n // Icon files should start with one of these, and be delimited by hyphens\n $icon_types = ['apple', 'android', 'favicon'];\n $paths = [];\n \n foreach($files as $file) {\n if(!preg_match('/\\.png$/', $file)) continue;\n \n // Get size from image name\n preg_match('/(\\d+x\\d+)/', $file, $sizes);\n if(!Arr::iterable($sizes)) continue;\n \n $size = reset($sizes);\n $icon_type = reset(explode('-', $file));\n if(!in_array($icon_type, $icon_types)) continue;\n \n $file_path = $icons_url.'/'.$file;\n $paths[] = View::make('meta/icon-'.$icon_type, [\n 'file' => $file_path,\n 'size' => $size,\n ]);\n }\n \n $paths[] = View::make('meta/icon-favicon-ico', [\n 'file' => $icons_url.'/favicon.ico',\n ]);\n return join('', $paths);\n }",
"public static function getIconsList()\r\n\t{\r\n\t\tif(!count(self::$iconsList))\r\n\t\t{\r\n\t\t\tforeach(new DirectoryIterator(self::$image_server_path.\"/icons\") as $file)\r\n\t\t\t{\r\n\t\t\t\tif($file->isFile() && preg_match(\"/(.jpg|.gif|.png)/\",$file->getFilename()))\r\n\t\t\t\t{\r\n\t\t\t\t\tself::$iconsList[] = $file->getFilename();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn self::$iconsList;\r\n\t}",
"function pagemenu_get_link_classes() {\n $return = array();\n foreach(pagemenu_get_links() as $type) {\n $return[$type] = mod_pagemenu_link::factory($type);\n }\n return $return;\n}",
"public static function materialIcons() {\n if (in_array(__FUNCTION__, self::$loaded))\n return;\n self::$loaded[] = __FUNCTION__;\n Conf::append('page.css', 'https://fonts.googleapis.com/icon?family=Material+Icons');\n }",
"public function getStaticPages()\n {\n $static = [];\n\n $static[] = $this->getPage('browse.recent', 'daily', '1.0');\n $static[] = $this->getPage('about', 'monthly', '0.7');\n $static[] = $this->getPage('browse.categories', 'monthly', '0.7');\n $static[] = $this->getPage('browse.tags', 'monthly', '0.7');\n $static[] = $this->getPage('auth.login', 'weekly', '0.8');\n $static[] = $this->getPage('auth.register', 'weekly', '0.8');\n\n return $static;\n }",
"public static function getAll()\n {\n //yes, this is probably a bad pattern\n return [\n OS::OS_WINDOWS => ['/windows', 'Windows', 'icon-windows', '_windows'],\n OS::OS_OSX => ['/osx', 'OS X', 'icon-apple', '_osx'],\n OS::OS_LINUX => ['/linux', 'Linux', 'icon-linux', '_linux'],\n OS::OS_ANDROID => ['/android', 'Android', 'icon-android', '_android'],\n OS::OS_IOS => ['/ios', 'iOS', 'icon-mobile', '_ios']\n ];\n }",
"public function getStylesheets()\n {\n return array(\n '/rtCorePlugin/css/markitup.css' => 'screen'\n );\n }",
"public function getPartnerIconMenus()\n {\n $dynamicDCActions = array();\n $filterDynamicDCActions = array();\n $dyn_actions_path = \"include/DashletContainer/Containers/DynamicDCActions.php\";\n if (is_file('custom/' . $dyn_actions_path))\n {\n include('custom/' . $dyn_actions_path);\n }\n else if ( is_file($dyn_actions_path) )\n {\n include($dyn_actions_path);\n }\n if (is_file('custom/application/Ext/DashletContainer/Containers/dcactions.ext.php'))\n {\n include 'custom/application/Ext/DashletContainer/Containers/dcactions.ext.php';\n }\n\n foreach($dynamicDCActions as $def)\n {\n $filterDynamicDCActions[] = $this->getDynamicMenuItem($def);\n }\n\n return $filterDynamicDCActions;\n }",
"function mixtape_qodef_mobile_icon_styles() {\n $mobile_icon_styles = array();\n if(mixtape_qodef_options()->getOptionValue('mobile_icon_color') !== '') {\n $mobile_icon_styles['color'] = mixtape_qodef_options()->getOptionValue('mobile_icon_color');\n }\n\n if(mixtape_qodef_options()->getOptionValue('mobile_icon_size') !== '') {\n $mobile_icon_styles['font-size'] = mixtape_qodef_filter_px(mixtape_qodef_options()->getOptionValue('mobile_icon_size')).'px';\n }\n\n echo mixtape_qodef_dynamic_css('.qodef-mobile-header .qodef-mobile-menu-opener a', $mobile_icon_styles);\n\n if(mixtape_qodef_options()->getOptionValue('mobile_icon_hover_color') !== '') {\n echo mixtape_qodef_dynamic_css(\n '.qodef-mobile-header .qodef-mobile-menu-opener a:hover',\n array('color' => mixtape_qodef_options()->getOptionValue('mobile_icon_hover_color')));\n }\n }",
"function press_get_icon(){\n\t$icon_root = plugin_dir_path(__FILE__).'images/icons/'; // get icons folder\n\t$plugin_url = plugin_dir_url(__FILE__);\t// get icons url\n\t$icons = array();\n\tif(is_dir($icon_root)){\n\t\tif($hh = opendir($icon_root)){\n\t\t\twhile(false !== ($icon = readdir($hh))){\n\t\t\t\tif(substr($icon,-4) == '.png'){\n\t\t\t\t\t$icons[substr($icon,0,-4)] = $plugin_url.'images/icons/'.$icon;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $icons;\n}",
"function _crum_vc_icon_settings() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Icon to display:', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_type',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_html__( 'Font Icon Manager', 'dfd' ) => 'selector',\n\t\t\t\t\tesc_html__( 'Custom Image Icon', 'dfd' ) => 'custom',\n\t\t\t\t),\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'heading' => esc_html__( 'Opacity', 'dfd' ) .' (0-100) %',\n\t\t\t\t'param_name' => 'opacity',\n\t\t\t\t'min' => '0',\n\t\t\t\t'max' => '100',\n\t\t\t\t'value' => '100',\n\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column crum_vc',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'heading' => esc_html__( 'Size of Icon', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_size',\n\t\t\t\t'edit_field_class' => 'vc_column vc_col-sm-6 crum-number-wrap crum_vc',\n\t\t\t\t'min' => 12,\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t'class' => 'crum_vc',\n\t\t\t\t'heading' => esc_html__( 'Color', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_color',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'icon_manager',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Select Icon ', 'dfd' ),\n\t\t\t\t'param_name' => 'icon',\n\t\t\t\t'value' => '',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'attach_image',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Upload Image:', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_image_id',\n\t\t\t\t'admin_label' => true,\n\t\t\t\t'value' => '',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'description' => esc_html__( 'Upload the custom image icon.', 'dfd' ),\n\t\t\t\t'dependency' => Array( 'element' => 'icon_type', 'value' => array( 'custom' ) ),\n\t\t\t),\n\n\t\t);\n\n\t}",
"public function post_type_icons() { ?>\n\t <style type=\"text/css\" media=\"screen\">\n\t\t\t/* Post Type Websites */\n\t\t\t#adminmenu .menu-icon-websites div.wp-menu-image:before { \n\t\t\t\tcontent: \"\\f322\";\n\t\t\t}\n\t </style><?php \n\t}",
"public static function get_all_icons() {\n\t\t\t$icomoon = self::get_list_icomoon();\n\t\t\t$fontawesome = self::get_list_fontawesome();\n\t\t\t$glyphicon = self::get_list_glyphicons();\n\t\t\t$all_icons = array_merge( $icomoon, $fontawesome, $glyphicon );\t\t\t\n\t\t\treturn $all_icons;\n\t\t}",
"static function getImageTypes () {\n return [\n [\n self::IMAGE_PROFILE_ID,\n self::IMAGE_PROFILE\n ],\n [\n self::IMAGE_LEAGUE_ID,\n self::IMAGE_LEAGUE\n ],\n [\n self::IMAGE_COVER_ID,\n self::IMAGE_COVER\n ],\n [\n self::IMAGE_HIDDEN_ID,\n self::IMAGE_HIDDEN\n ],\n [\n self::IMAGE_ARCHIVED_ID,\n self::IMAGE_ARCHIVED\n ],\n [\n self::IMAGE_ARTICLE_ID,\n self::IMAGE_ARTICLE\n ]\n ];\n }",
"function jobstar_core_pe_icon_option() {\r\n return apply_filters( 'jobstar_get_pe_icon_sets', array(\r\n \r\n 'pe-7s-album' => 'Album',\r\n 'pe-7s-arc' => 'Arc',\r\n 'pe-7s-back-2' => 'Back 2',\r\n 'pe-7s-bandaid' => 'Bandaid',\r\n 'pe-7s-car' => 'Car',\r\n 'pe-7s-diamond' => 'Diamond',\r\n 'pe-7s-door-lock' => 'Door Lock',\r\n 'pe-7s-eyedropper' => 'Eyedropper',\r\n 'pe-7s-female' => 'Female',\r\n 'pe-7s-gym' => 'Gym',\r\n 'pe-7s-hammer' => 'Hammer',\r\n 'pe-7s-headphones' => 'Headphones',\r\n 'pe-7s-helm' => 'Helm',\r\n 'pe-7s-hourglass' => 'Hourglass',\r\n 'pe-7s-leaf' => 'Leaf',\r\n 'pe-7s-magic-wand' => 'Magic Wand',\r\n 'pe-7s-male' => 'Male',\r\n 'pe-7s-map-2' => 'Map 2',\r\n 'pe-7s-next-2' => 'Next 2',\r\n 'pe-7s-paint-bucket' => 'Paint Bucket',\r\n 'pe-7s-pendrive' => 'Pendrive',\r\n 'pe-7s-photo' => 'Photo',\r\n 'pe-7s-piggy' => 'Piggy',\r\n 'pe-7s-plugin' => 'Plugin',\r\n 'pe-7s-refresh-2' => 'Refresh 2',\r\n 'pe-7s-rocket' => 'Rocket',\r\n 'pe-7s-settings' => 'Settings',\r\n 'pe-7s-shield' => 'Shield',\r\n 'pe-7s-smile' => 'Smile',\r\n 'pe-7s-usb' => 'Usb',\r\n 'pe-7s-vector' => 'Vector',\r\n 'pe-7s-wine' => 'Wine',\r\n 'pe-7s-cloud-upload' => 'Cloud Upload',\r\n 'pe-7s-cash' => 'Cash',\r\n 'pe-7s-close' => 'Close',\r\n 'pe-7s-bluetooth' => 'Bluetooth',\r\n 'pe-7s-cloud-download' => 'Cloud Download',\r\n 'pe-7s-way' => 'Way',\r\n 'pe-7s-close-circle' => 'Close Circle',\r\n 'pe-7s-id' => 'Id',\r\n 'pe-7s-angle-up' => 'Angle Up',\r\n 'pe-7s-wristwatch' => 'Wristwatch',\r\n 'pe-7s-angle-up-circle' => 'Angle Up Circle',\r\n 'pe-7s-world' => 'World',\r\n 'pe-7s-angle-right' => 'Angle Right',\r\n 'pe-7s-volume' => 'Volume',\r\n 'pe-7s-angle-right-circle' => 'Angle Right Circle',\r\n 'pe-7s-users' => 'Users',\r\n 'pe-7s-angle-left' => 'Angle Left',\r\n 'pe-7s-user-female' => 'User Female',\r\n 'pe-7s-angle-left-circle' => 'Angle Left Circle',\r\n 'pe-7s-up-arrow' => 'Up Arrow',\r\n 'pe-7s-angle-down' => 'Angle Down',\r\n 'pe-7s-switch' => 'Switch',\r\n 'pe-7s-angle-down-circle' => 'Angle Down Circle',\r\n 'pe-7s-scissors' => 'Scissors',\r\n 'pe-7s-wallet' => 'Wallet',\r\n 'pe-7s-safe' => 'Safe',\r\n 'pe-7s-volume2' => 'Volume2',\r\n 'pe-7s-volume1' => 'Volume1',\r\n 'pe-7s-voicemail' => 'Voicemail',\r\n 'pe-7s-video' => 'Video',\r\n 'pe-7s-user' => 'User',\r\n 'pe-7s-upload' => 'Upload',\r\n 'pe-7s-unlock' => 'Unlock',\r\n 'pe-7s-umbrella' => 'Umbrella',\r\n 'pe-7s-trash' => 'Trash',\r\n 'pe-7s-tools' => 'Tools',\r\n 'pe-7s-timer' => 'Timer',\r\n 'pe-7s-ticket' => 'Ticket',\r\n 'pe-7s-target' => 'Target',\r\n 'pe-7s-sun' => 'Sun',\r\n 'pe-7s-study' => 'Study',\r\n 'pe-7s-stopwatch' => 'Stopwatch',\r\n 'pe-7s-star' => 'Star',\r\n 'pe-7s-speaker' => 'Speaker',\r\n 'pe-7s-signal' => 'Signal',\r\n 'pe-7s-shuffle' => 'Shuffle',\r\n 'pe-7s-shopbag' => 'Shopbag',\r\n 'pe-7s-share' => 'Share',\r\n 'pe-7s-server' => 'Server',\r\n 'pe-7s-search' => 'Search',\r\n 'pe-7s-film' => 'Film',\r\n 'pe-7s-science' => 'Science',\r\n 'pe-7s-disk' => 'Disk',\r\n 'pe-7s-ribbon' => 'Ribbon',\r\n 'pe-7s-repeat' => 'Repeat',\r\n 'pe-7s-refresh' => 'Refresh',\r\n 'pe-7s-add-user' => 'Add User',\r\n 'pe-7s-refresh-cloud' => 'Refresh Cloud',\r\n 'pe-7s-paperclip' => 'Paperclip',\r\n 'pe-7s-radio' => 'Radio',\r\n 'pe-7s-note2' => 'Note2',\r\n 'pe-7s-print' => 'Print',\r\n 'pe-7s-network' => 'Network',\r\n 'pe-7s-prev' => 'Prev',\r\n 'pe-7s-mute' => 'Mute',\r\n 'pe-7s-power' => 'Power',\r\n 'pe-7s-medal' => 'Medal',\r\n 'pe-7s-portfolio' => 'Portfolio',\r\n 'pe-7s-like2' => 'Like2',\r\n 'pe-7s-plus' => 'Plus',\r\n 'pe-7s-left-arrow' => 'Left Arrow',\r\n 'pe-7s-play' => 'Play',\r\n 'pe-7s-key' => 'Key',\r\n 'pe-7s-plane' => 'Plane',\r\n 'pe-7s-joy' => 'Joy',\r\n 'pe-7s-photo-gallery' => 'Photo Gallery',\r\n 'pe-7s-pin' => 'Pin',\r\n 'pe-7s-phone' => 'Phone',\r\n 'pe-7s-plug' => 'Plug',\r\n 'pe-7s-pen' => 'Pen',\r\n 'pe-7s-right-arrow' => 'Right Arrow',\r\n 'pe-7s-paper-plane' => 'Paper Plane',\r\n 'pe-7s-delete-user' => 'Delete User',\r\n 'pe-7s-paint' => 'Paint',\r\n 'pe-7s-bottom-arrow' => 'Bottom Arrow',\r\n 'pe-7s-notebook' => 'Notebook',\r\n 'pe-7s-note' => 'Note',\r\n 'pe-7s-next' => 'Next',\r\n 'pe-7s-news-paper' => 'News Paper',\r\n 'pe-7s-musiclist' => 'Musiclist',\r\n 'pe-7s-music' => 'Music',\r\n 'pe-7s-mouse' => 'Mouse',\r\n 'pe-7s-more' => 'More',\r\n 'pe-7s-moon' => 'Moon',\r\n 'pe-7s-monitor' => 'Monitor',\r\n 'pe-7s-micro' => 'Micro',\r\n 'pe-7s-menu' => 'Menu',\r\n 'pe-7s-map' => 'Map',\r\n 'pe-7s-map-marker' => 'Map Marker',\r\n 'pe-7s-mail' => 'Mail',\r\n 'pe-7s-mail-open' => 'Mail Open',\r\n 'pe-7s-mail-open-file' => 'Mail Open File',\r\n 'pe-7s-magnet' => 'Magnet',\r\n 'pe-7s-loop' => 'Loop',\r\n 'pe-7s-look' => 'Look',\r\n 'pe-7s-lock' => 'Lock',\r\n 'pe-7s-lintern' => 'Lintern',\r\n 'pe-7s-link' => 'Link',\r\n 'pe-7s-like' => 'Like',\r\n 'pe-7s-light' => 'Light',\r\n 'pe-7s-less' => 'Less',\r\n 'pe-7s-keypad' => 'Keypad',\r\n 'pe-7s-junk' => 'Junk',\r\n 'pe-7s-info' => 'Info',\r\n 'pe-7s-home' => 'Home',\r\n 'pe-7s-help2' => 'Help2',\r\n 'pe-7s-help1' => 'Help1',\r\n 'pe-7s-graph3' => 'Graph3',\r\n 'pe-7s-graph2' => 'Graph2',\r\n 'pe-7s-graph1' => 'Graph1',\r\n 'pe-7s-graph' => 'Graph',\r\n 'pe-7s-global' => 'Global',\r\n 'pe-7s-gleam' => 'Gleam',\r\n 'pe-7s-glasses' => 'Glasses',\r\n 'pe-7s-gift' => 'Gift',\r\n 'pe-7s-folder' => 'Folder',\r\n 'pe-7s-flag' => 'Flag',\r\n 'pe-7s-filter' => 'Filter',\r\n 'pe-7s-file' => 'File',\r\n 'pe-7s-expand1' => 'Expand1',\r\n 'pe-7s-exapnd2' => 'Exapnd2',\r\n 'pe-7s-edit' => 'Edit',\r\n 'pe-7s-drop' => 'Drop',\r\n 'pe-7s-drawer' => 'Drawer',\r\n 'pe-7s-download' => 'Download',\r\n 'pe-7s-display2' => 'Display2',\r\n 'pe-7s-display1' => 'Display1',\r\n 'pe-7s-diskette' => 'Diskette',\r\n 'pe-7s-date' => 'Date',\r\n 'pe-7s-cup' => 'Cup',\r\n 'pe-7s-culture' => 'Culture',\r\n 'pe-7s-crop' => 'Crop',\r\n 'pe-7s-credit' => 'Credit',\r\n 'pe-7s-copy-file' => 'Copy File',\r\n 'pe-7s-config' => 'Config',\r\n 'pe-7s-compass' => 'Compass',\r\n 'pe-7s-comment' => 'Comment',\r\n 'pe-7s-coffee' => 'Coffee',\r\n 'pe-7s-cloud' => 'Cloud',\r\n 'pe-7s-clock' => 'Clock',\r\n 'pe-7s-check' => 'Check',\r\n 'pe-7s-chat' => 'Chat',\r\n 'pe-7s-cart' => 'Cart',\r\n 'pe-7s-camera' => 'Camera',\r\n 'pe-7s-call' => 'Call',\r\n 'pe-7s-calculator' => 'Calculator',\r\n 'pe-7s-browser' => 'Browser',\r\n 'pe-7s-box2' => 'Box2',\r\n 'pe-7s-box1' => 'Box1',\r\n 'pe-7s-bookmarks' => 'Bookmarks',\r\n 'pe-7s-bicycle' => 'Bicycle',\r\n 'pe-7s-bell' => 'Bell',\r\n 'pe-7s-battery' => 'Battery',\r\n 'pe-7s-ball' => 'Ball',\r\n 'pe-7s-back' => 'Back',\r\n 'pe-7s-attention' => 'Attention',\r\n 'pe-7s-anchor' => 'Anchor',\r\n 'pe-7s-albums' => 'Albums',\r\n 'pe-7s-alarm' => 'Alarm',\r\n 'pe-7s-airplay' => 'Airplay',\r\n ) );\r\n}"
] | [
"0.6615173",
"0.6514622",
"0.63688177",
"0.6183642",
"0.61243033",
"0.6079186",
"0.5853153",
"0.5776419",
"0.5767874",
"0.5722684",
"0.5703245",
"0.5661831",
"0.564087",
"0.5638552",
"0.56307524",
"0.5584244",
"0.5505131",
"0.5495956",
"0.5488709",
"0.5482214",
"0.548199",
"0.5474474",
"0.54680395",
"0.5429953",
"0.5422434",
"0.5412496",
"0.54005533",
"0.53882176",
"0.5379661",
"0.5362969"
] | 0.82504565 | 0 |
Devuelve la lista de validaciones posibles para un perfil | public function Get_List_Validaciones_Perfil()
{
$l_LNConfigsistema = new LNConfigsistema();
$l_ValidacionPerfil = new ENValidacionPerfil();
$l_Key_Validations_User_Profile = 26;
$l_List_Validaciones = [];
$l_List_Parametros = $l_LNConfigsistema->Get_Parametros_Sistema_object($l_Key_Validations_User_Profile,0,"");
foreach( $l_List_Parametros as $Item )
{
$l_ValidacionPerfil = new ENValidacionPerfil();
$l_ValidacionPerfil->Cod_Validacion = $Item->Cod_ParSis;
$l_ValidacionPerfil->Des_Mensaje = $Item->Des_ParSis_Tx2;
array_push($l_List_Validaciones,$l_ValidacionPerfil);
}
return $l_List_Validaciones;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function validarPerfil($datos){\r\n $errores=[];\r\n $trimeados=[];\r\n foreach ($datos as $posicion => $valor) {\r\n $trimeados[$posicion]=trim($valor);\r\n }\r\n\r\n // VALIDACION PARA NOMBRE\r\n if (!strlen($trimeados[\"name\"])) {\r\n $errores[\"nombre\"] = \"Campo obligatorio\";\r\n } elseif (!Funciones::nombreYApellido($trimeados[\"name\"])) {\r\n $errores[\"nombre\"] = \"El campo contiene carateres invalidos\";\r\n } elseif (!Funciones::determinarNombreYApellido($trimeados[\"name\"])){\r\n $errores[\"nombre\"] = \"El campo puede tener primer y segundo nombre\";\r\n }\r\n\r\n // VALIDACION PARA APELLIDO\r\n if (!strlen($trimeados[\"last_name\"])) {\r\n $errores[\"apellido\"] = \"Campo obligatorio\";\r\n } elseif (!Funciones::nombreYApellido($trimeados[\"last_name\"])) {\r\n $errores[\"apellido\"] = \"El campo contiene carateres invalidos\";\r\n } elseif (!Funciones::determinarNombreYApellido($trimeados[\"last_name\"])){\r\n $errores[\"apellido\"] = \"El campo debe tener primer y segundo apellido\";\r\n }\r\n\r\n //VALIDACION PARA CONTRASEÑAS\r\n if (!strlen($trimeados[\"password\"])) {\r\n $errores[\"pass\"] = \"Campo obligatorio\";\r\n }elseif (!strlen($trimeados[\"confirmpass\"])) {\r\n $errores[\"pass\"] = \"Verifique la contraseña\";\r\n }elseif (Funciones::contraseñaMezcla($trimeados[\"password\"]) !== 0) {\r\n $errores[\"pass\"] = \"La contraseña debe incluir al menos una mayuscula, una minuscula y un numero\";\r\n }elseif (!Funciones::contraseñaPermitida($trimeados[\"password\"])) {\r\n $errores[\"pass\"] = \"La contraseña debe incluir al menos un numero\";\r\n }\r\n\r\n //VALIDACION PARA OFERTAS\r\n if (!isset($trimeados[\"sale\"])) {\r\n $errores[\"ofertas\"] = \"Elija una opcion\";\r\n }\r\n return $errores;\r\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateEmail())) {\n $invalid_properties[] = $this->validateEmail();\n }\n if (!empty($this->validateAddress1())) {\n $invalid_properties[] = $this->validateAddress1();\n }\n if (!empty($this->validateAddress2())) {\n $invalid_properties[] = $this->validateAddress2();\n }\n if (!empty($this->validateCountry())) {\n $invalid_properties[] = $this->validateCountry();\n }\n if (!empty($this->validateState())) {\n $invalid_properties[] = $this->validateState();\n }\n if (!empty($this->validateCity())) {\n $invalid_properties[] = $this->validateCity();\n }\n if (!empty($this->validateZipcode())) {\n $invalid_properties[] = $this->validateZipcode();\n }\n if (!empty($this->validatePhone())) {\n $invalid_properties[] = $this->validatePhone();\n }\n if (!empty($this->validateFirstname())) {\n $invalid_properties[] = $this->validateFirstname();\n }\n if (!empty($this->validateLastname())) {\n $invalid_properties[] = $this->validateLastname();\n }\n return $invalid_properties;\n }",
"private function preencheDadosPermissao()\r\n\t{\r\n\t\t$idPermissao = $this->getValueForm(\"id_permissao\");\r\n $qtdeAplicacoes = $this->getValueForm(\"qtdeAplicacoes\");\r\n $idAplicacao = $_POST[\"aplicacao\"];\r\n \r\n $acesso = $_POST[\"acesso\"];\r\n\t\t$consulta = $_POST[\"consulta\"];\r\n\t\t$cadastra = $_POST[\"cadastra\"];\r\n\t\t$atualiza = $_POST[\"altera\"];\r\n\t\t$exclui = $_POST[\"exclui\"];\r\n $imprimi = $_POST[\"imprimi\"];\r\n \r\n $perfil = new Perfil();\r\n $perfil->setId($this->getValueForm(\"perfil\"));\r\n \r\n\r\n $this->listaPermissoes = new ArrayList();\r\n \r\n for($i = 0; $i < $qtdeAplicacoes; $i++){\r\n \t$aplicacao = new Aplicacao();\r\n \t\t$aplicacao->setId($idAplicacao[$i]);\r\n \t\t\r\n\t\t\t$permissao = new Permissao();\r\n\t\t\t$permissao->setId($idPermissao);\r\n\t\t\t$permissao->setPerfil($perfil);\r\n\t\t\t$permissao->setAplicacao($aplicacao);\r\n\t\t\t\r\n\t\t\tif($this->checkboxSelecionado($acesso, $aplicacao->getId()))\r\n\t\t\t\t$permissao->setAcessa('S');\r\n\t\t\t\r\n\t \tif($this->checkboxSelecionado($cadastra, $aplicacao->getId()))\r\n\t\t \t$permissao->setCadastra('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($atualiza, $aplicacao->getId()))\r\n\t\t \t$permissao->setAtualiza('S');\r\n\t\t \r\n\t \tif($this->checkboxSelecionado($exclui, $aplicacao->getId()))\r\n\t\t \t$permissao->setExclui('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($consulta, $aplicacao->getId()))\r\n\t\t \t$permissao->setConsulta('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($imprimi, $aplicacao->getId()))\r\n\t\t \t$permissao->setImprimi('S');\r\n\t \t\r\n\t \t//echo \"<br/>\".$permissao->toString();\r\n\t \t$this->listaPermissoes->add($permissao, $i);\r\n\t }\r\n\t \r\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['id'] === null) {\n $invalidProperties[] = \"'id' can't be null\";\n }\n if ($this->container['favorited'] === null) {\n $invalidProperties[] = \"'favorited' can't be null\";\n }\n if ($this->container['blocked'] === null) {\n $invalidProperties[] = \"'blocked' can't be null\";\n }\n if ($this->container['firstName'] === null) {\n $invalidProperties[] = \"'firstName' can't be null\";\n }\n if ($this->container['lastName'] === null) {\n $invalidProperties[] = \"'lastName' can't be null\";\n }\n if ($this->container['companyName'] === null) {\n $invalidProperties[] = \"'companyName' can't be null\";\n }\n if ($this->container['phone'] === null) {\n $invalidProperties[] = \"'phone' can't be null\";\n }\n if ($this->container['email'] === null) {\n $invalidProperties[] = \"'email' can't be null\";\n }\n if ($this->container['country'] === null) {\n $invalidProperties[] = \"'country' can't be null\";\n }\n if ($this->container['customFields'] === null) {\n $invalidProperties[] = \"'customFields' can't be null\";\n }\n if ($this->container['user'] === null) {\n $invalidProperties[] = \"'user' can't be null\";\n }\n if ($this->container['lists'] === null) {\n $invalidProperties[] = \"'lists' can't be null\";\n }\n if ($this->container['phoneType'] === null) {\n $invalidProperties[] = \"'phoneType' can't be null\";\n }\n if ($this->container['avatar'] === null) {\n $invalidProperties[] = \"'avatar' can't be null\";\n }\n if ($this->container['notes'] === null) {\n $invalidProperties[] = \"'notes' can't be null\";\n }\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['first_name'] === null) {\n $invalidProperties[] = \"'first_name' can't be null\";\n }\n if ($this->container['last_name'] === null) {\n $invalidProperties[] = \"'last_name' can't be null\";\n }\n if ($this->container['email'] === null) {\n $invalidProperties[] = \"'email' can't be null\";\n }\n if ($this->container['username'] === null) {\n $invalidProperties[] = \"'username' can't be null\";\n }\n if ($this->container['password'] === null) {\n $invalidProperties[] = \"'password' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['first_name'] === null) {\n $invalidProperties[] = \"'first_name' can't be null\";\n }\n if ((mb_strlen($this->container['first_name']) < 1)) {\n $invalidProperties[] = \"invalid value for 'first_name', the character length must be bigger than or equal to 1.\";\n }\n\n if ($this->container['last_name'] === null) {\n $invalidProperties[] = \"'last_name' can't be null\";\n }\n if ((mb_strlen($this->container['last_name']) < 1)) {\n $invalidProperties[] = \"invalid value for 'last_name', the character length must be bigger than or equal to 1.\";\n }\n\n if ($this->container['email_address'] === null) {\n $invalidProperties[] = \"'email_address' can't be null\";\n }\n if ((mb_strlen($this->container['email_address']) < 1)) {\n $invalidProperties[] = \"invalid value for 'email_address', the character length must be bigger than or equal to 1.\";\n }\n\n if ($this->container['designation'] === null) {\n $invalidProperties[] = \"'designation' can't be null\";\n }\n if ((mb_strlen($this->container['designation']) < 1)) {\n $invalidProperties[] = \"invalid value for 'designation', the character length must be bigger than or equal to 1.\";\n }\n\n if ($this->container['phone_number'] === null) {\n $invalidProperties[] = \"'phone_number' can't be null\";\n }\n if ((mb_strlen($this->container['phone_number']) < 1)) {\n $invalidProperties[] = \"invalid value for 'phone_number', the character length must be bigger than or equal to 1.\";\n }\n\n if (!is_null($this->container['introduction']) && (mb_strlen($this->container['introduction']) < 0)) {\n $invalidProperties[] = \"invalid value for 'introduction', the character length must be bigger than or equal to 0.\";\n }\n\n if ($this->container['id'] === null) {\n $invalidProperties[] = \"'id' can't be null\";\n }\n if ($this->container['created_at'] === null) {\n $invalidProperties[] = \"'created_at' can't be null\";\n }\n if ($this->container['updated_at'] === null) {\n $invalidProperties[] = \"'updated_at' can't be null\";\n }\n if ($this->container['is_active'] === null) {\n $invalidProperties[] = \"'is_active' can't be null\";\n }\n if ($this->container['merchant_id'] === null) {\n $invalidProperties[] = \"'merchant_id' can't be null\";\n }\n if ((mb_strlen($this->container['merchant_id']) > 10)) {\n $invalidProperties[] = \"invalid value for 'merchant_id', the character length must be smaller than or equal to 10.\";\n }\n\n if ((mb_strlen($this->container['merchant_id']) < 10)) {\n $invalidProperties[] = \"invalid value for 'merchant_id', the character length must be bigger than or equal to 10.\";\n }\n\n if (!preg_match(\"/^[a-zA-Z0-9]+$/\", $this->container['merchant_id'])) {\n $invalidProperties[] = \"invalid value for 'merchant_id', must be conform to the pattern /^[a-zA-Z0-9]+$/.\";\n }\n\n return $invalidProperties;\n }",
"public function rules()\n {\n return [\n 'name' => ['required', 'unique:users'],\n 'email' => ['required', 'unique:users', 'email'],\n 'foto_perfil' => ['required', 'unique:users', 'image', 'mimes:jpg,jpeg,png', 'max:2048'],\n 'password' => ['required'],\n ];\n }",
"public function test_valid_fillable()\n {\n $this->assertEquals([\n 'name',\n ], $this->role->getFillable());\n }",
"public function validate()\r\n\t{\r\n\t\tforeach ($this->reglas as $nombreCampo => $reglasCampo) {\r\n\t\t\t$this->applyRules($nombreCampo, $reglasCampo);\r\n\t\t}\r\n\t}",
"function validation($data, $files) {\n \n if ($data[genero]==0) {\n $errors ['genero'] = 'Debe seleccionar un género';\n }\n if ($data[rubric]==0) {\n $errors ['rubric'] = 'Debe seleccionar una rúbrica';\n }\n if ($data[pc]==0) {\n $errors ['pc'] = 'Debe seleccionar un propósito comunicativo';\n }\n return $errors;\n }",
"public function test_contains_valid_fillable_properties()\n {\n $this->assertEquals([\n 'name',\n 'lesson_id',\n ], $this->question->getFillable());\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['identificatie'] === null) {\n $invalidProperties[] = \"'identificatie' can't be null\";\n }\n if ($this->container['domein'] === null) {\n $invalidProperties[] = \"'domein' can't be null\";\n }\n if ($this->container['geometrie'] === null) {\n $invalidProperties[] = \"'geometrie' can't be null\";\n }\n if ($this->container['oorspronkelijk_bouwjaar'] === null) {\n $invalidProperties[] = \"'oorspronkelijk_bouwjaar' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n if ($this->container['geconstateerd'] === null) {\n $invalidProperties[] = \"'geconstateerd' can't be null\";\n }\n if ($this->container['documentdatum'] === null) {\n $invalidProperties[] = \"'documentdatum' can't be null\";\n }\n if ($this->container['documentnummer'] === null) {\n $invalidProperties[] = \"'documentnummer' can't be null\";\n }\n if ($this->container['voorkomen'] === null) {\n $invalidProperties[] = \"'voorkomen' can't be null\";\n }\n return $invalidProperties;\n }",
"public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['limit']) && ($this->container['limit'] < 0)) {\r\n $invalidProperties[] = \"invalid value for 'limit', must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'description', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'description', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }",
"function validation($data, $files) {\n\t\treturn array ();\n\t\t$error = array ();\n\t\t$nombre = $data ['nombre'];\n\t\t$link = $data ['link'];\n\t\t$intensidad = $data ['intensidad'];\n\t\t$categoria = $data ['categoria'];\n\t\tif (empty ( $intensidad )) {\n\t\t\t$error ['intensidad'] = \"No existe intensidad ingresado\";\n\t\t} else if (empty ( $categoria )) {\n\t\t\t$error ['categoria'] = \"No se ingreso la categoria\";\n\t\t} else if (empty ( $nombre )) {\n\t\t\t$error ['nombre'] = \"No se ingreso el nombre\";\n\t\t} else if (empty ( $link )) {\n\t\t\t$error ['link'] = \"No se ingreso el link\";\n\t\t}\n\t\treturn $error;\n\t}",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['organisation_id'] === null) {\n $invalidProperties[] = \"'organisation_id' can't be null\";\n }\n if ($this->container['organisation_name'] === null) {\n $invalidProperties[] = \"'organisation_name' can't be null\";\n }\n if ((strlen($this->container['organisation_name']) > 255)) {\n $invalidProperties[] = \"invalid value for 'organisation_name', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['background']) && (strlen($this->container['background']) > 4000)) {\n $invalidProperties[] = \"invalid value for 'background', the character length must be smaller than or equal to 4000.\";\n }\n\n if (!is_null($this->container['image_url']) && (strlen($this->container['image_url']) > 500)) {\n $invalidProperties[] = \"invalid value for 'image_url', the character length must be smaller than or equal to 500.\";\n }\n\n if (!is_null($this->container['phone']) && (strlen($this->container['phone']) > 255)) {\n $invalidProperties[] = \"invalid value for 'phone', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['phone_fax']) && (strlen($this->container['phone_fax']) > 255)) {\n $invalidProperties[] = \"invalid value for 'phone_fax', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['website']) && (strlen($this->container['website']) > 255)) {\n $invalidProperties[] = \"invalid value for 'website', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_billing_street']) && (strlen($this->container['address_billing_street']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_billing_street', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_billing_city']) && (strlen($this->container['address_billing_city']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_billing_city', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_billing_state']) && (strlen($this->container['address_billing_state']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_billing_state', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_billing_country']) && (strlen($this->container['address_billing_country']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_billing_country', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_billing_postcode']) && (strlen($this->container['address_billing_postcode']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_billing_postcode', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_ship_street']) && (strlen($this->container['address_ship_street']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_ship_street', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_ship_city']) && (strlen($this->container['address_ship_city']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_ship_city', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_ship_state']) && (strlen($this->container['address_ship_state']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_ship_state', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_ship_postcode']) && (strlen($this->container['address_ship_postcode']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_ship_postcode', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['address_ship_country']) && (strlen($this->container['address_ship_country']) > 255)) {\n $invalidProperties[] = \"invalid value for 'address_ship_country', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['social_linkedin']) && (strlen($this->container['social_linkedin']) > 255)) {\n $invalidProperties[] = \"invalid value for 'social_linkedin', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['social_facebook']) && (strlen($this->container['social_facebook']) > 255)) {\n $invalidProperties[] = \"invalid value for 'social_facebook', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['social_twitter']) && (strlen($this->container['social_twitter']) > 255)) {\n $invalidProperties[] = \"invalid value for 'social_twitter', the character length must be smaller than or equal to 255.\";\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateRecipients())) {\n $invalid_properties[] = $this->validateRecipients();\n }\n if (!empty($this->validateResultAction())) {\n $invalid_properties[] = $this->validateResultAction();\n }\n if (!empty($this->validateParameters())) {\n $invalid_properties[] = $this->validateParameters();\n }\n if (!empty($this->validateSchedule())) {\n $invalid_properties[] = $this->validateSchedule();\n }\n if (!empty($this->validateGenerationDate())) {\n $invalid_properties[] = $this->validateGenerationDate();\n }\n return $invalid_properties;\n }",
"function validation( $data, $files)\n {\n return array();\n }",
"function validation($data, $files) {\n\t\treturn array();\n\t\t$error=array();\n\t\t$email= $data['email'];\n\t\t$estatura= $data['estatura'];\n\t\t$ano= $data['ano'];\n\t\t$peso= $data['peso'];\n\t\tif (empty($email)){\n\t\t\t$error['email']=\"No existe email ingresado\";\n\t\t}\n\t\telse if (empty($estatura)){\n\t\t\t$error['estatura']= \"No se ingreso la estatura\";\n\t\t}\n\t\telse if (empty($peso)){\n\t\t\t$error['peso']=\"No se ingreso el peso.\";\n\t\t}else {\n\t\t\t$error['ano']=\"No se ingreso el año.\";\n\t\t}\n\t\treturn $error;\n\t}",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateBarcode())) {\n $invalid_properties[] = $this->validateBarcode();\n }\n if (!empty($this->validateUrl())) {\n $invalid_properties[] = $this->validateUrl();\n }\n return $invalid_properties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateTenantIds())) {\n $invalid_properties[] = $this->validateTenantIds();\n }\n if (!empty($this->validateLevel())) {\n $invalid_properties[] = $this->validateLevel();\n }\n if (!empty($this->validateKind())) {\n $invalid_properties[] = $this->validateKind();\n }\n if (!empty($this->validateFormats())) {\n $invalid_properties[] = $this->validateFormats();\n }\n if (!empty($this->validatePeriod())) {\n $invalid_properties[] = $this->validatePeriod();\n }\n return $invalid_properties;\n }",
"function validation($data, $files) {\n\t\t$error=array();\n\t\t$email= $data['email'];\n\t\t$nombre=$data['first_name'];\n\t\t$apellido=$data['apellido'];\n\t\t$comments=$data['comments'];\n\t\t\n\t\tif (empty($email)){\n\t\t\t$error['email']=\"No existe email ingresado\";\n\t\t}\n\t\telse if (empty($nombre)){\n\t\t\t$error['first_name']= \"No se ingreso el primer nombre\";\n\t\t}\n\t\telse if (empty($apellido)){\n\t\t\t$error['apellido']=\"No se ingreso el apellido.\";\n\t\t}else if(empty($comments)){\n\t\t\t$error['comments']=\"No se ingreso el comentario\";\n\t\t}\n\t\treturn $error;\n\t}",
"public static function validStructure()\r\n {\r\n // define o caminho para as pastas relacionadas com boletos\r\n $paths = [\r\n \\Yii::$app->params['boleto']['base'],\r\n \\Yii::$app->params['boleto']['pdf'],\r\n \\Yii::$app->params['boleto']['remessa'],\r\n \\Yii::$app->params['boleto']['retorno']\r\n ];\r\n \r\n // verifica se o diretorio existe e se possui permissao\r\n foreach ($paths as $path) {\r\n // verifica se o diretorio existe\r\n if (!file_exists($path)) {\r\n mkdir($path);\r\n chmod($path, 0775);\r\n }\r\n // verifica a permissao\r\n if (!is_writable($path) || !is_readable($path)) {\r\n chmod($path, 0775);\r\n }\r\n }\r\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['idadvertiser'] === null) {\n $invalidProperties[] = \"'idadvertiser' can't be null\";\n }\n $allowedValues = $this->getIdstatusAllowableValues();\n if (!is_null($this->container['idstatus']) && !in_array($this->container['idstatus'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'idstatus', must be one of '%s'\",\n $this->container['idstatus'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getIdrunstatusAllowableValues();\n if (!is_null($this->container['idrunstatus']) && !in_array($this->container['idrunstatus'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'idrunstatus', must be one of '%s'\",\n $this->container['idrunstatus'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getIdpricemodelAllowableValues();\n if (!is_null($this->container['idpricemodel']) && !in_array($this->container['idpricemodel'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'idpricemodel', must be one of '%s'\",\n $this->container['idpricemodel'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['id'] === null) {\r\n $invalidProperties[] = \"'id' can't be null\";\r\n }\r\n if ($this->container['name'] === null) {\r\n $invalidProperties[] = \"'name' can't be null\";\r\n }\r\n if ((mb_strlen($this->container['name']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be smaller than or equal to 255.\";\r\n }\r\n if ((mb_strlen($this->container['name']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getProtectStatusAllowableValues();\r\n if (!is_null($this->container['protectStatus']) && !in_array($this->container['protectStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'protectStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['type'] === null) {\r\n $invalidProperties[] = \"'type' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }",
"public function rules()\n {\n $rules = [\n 'razao_social' => 'required',\n 'nome_fantasia' => 'required',\n 'email' => 'email',\n \n ];\n $photos = count($this->input('photos'));\n foreach(range(0, $photos) as $index) {\n $rules['photos.' . $index] = 'image|mimes:jpeg,bmp,png|max:2000';\n }\n return $rules;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!is_null($this->container['country']) && (strlen($this->container['country']) > 2)) {\n $invalid_properties[] = \"invalid value for 'country', the character length must be smaller than or equal to 2.\";\n }\n\n if (!is_null($this->container['country']) && (strlen($this->container['country']) < 2)) {\n $invalid_properties[] = \"invalid value for 'country', the character length must be bigger than or equal to 2.\";\n }\n\n if (!is_null($this->container['zip']) && (strlen($this->container['zip']) > 20)) {\n $invalid_properties[] = \"invalid value for 'zip', the character length must be smaller than or equal to 20.\";\n }\n\n if (!is_null($this->container['zip']) && (strlen($this->container['zip']) < 1)) {\n $invalid_properties[] = \"invalid value for 'zip', the character length must be bigger than or equal to 1.\";\n }\n\n if (!is_null($this->container['street']) && (strlen($this->container['street']) > 100)) {\n $invalid_properties[] = \"invalid value for 'street', the character length must be smaller than or equal to 100.\";\n }\n\n if (!is_null($this->container['street']) && (strlen($this->container['street']) < 1)) {\n $invalid_properties[] = \"invalid value for 'street', the character length must be bigger than or equal to 1.\";\n }\n\n return $invalid_properties;\n }",
"public function getValidations();",
"function validation($data, $files) {\n return array();\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getFormFactorAllowableValues();\n if (!is_null($this->container['form_factor']) && !in_array($this->container['form_factor'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'form_factor', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if ($this->container['activity_id'] === null) {\n $invalid_properties[] = \"'activity_id' can't be null\";\n }\n $allowed_values = [\"Billable\", \"DoNotBill\", \"NoCharge\", \"NoDefault\"];\n if (!in_array($this->container['billable_option'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'billable_option', must be one of #{allowed_values}.\";\n }\n\n if ($this->container['member'] === null) {\n $invalid_properties[] = \"'member' can't be null\";\n }\n if (!is_null($this->container['notes']) && (strlen($this->container['notes']) > 4000)) {\n $invalid_properties[] = \"invalid value for 'notes', the character length must be smaller than or equal to 4000.\";\n }\n\n if ($this->container['status'] === null) {\n $invalid_properties[] = \"'status' can't be null\";\n }\n $allowed_values = [\"Reset\", \"Running\", \"Paused\", \"Stopped\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of #{allowed_values}.\";\n }\n\n return $invalid_properties;\n }"
] | [
"0.69821435",
"0.6344385",
"0.6202832",
"0.6043652",
"0.6034813",
"0.6033972",
"0.600386",
"0.593183",
"0.5902411",
"0.58637416",
"0.5844201",
"0.5829334",
"0.5827815",
"0.58274263",
"0.58266145",
"0.5826154",
"0.5815742",
"0.58087057",
"0.58046913",
"0.5796565",
"0.5788408",
"0.5781408",
"0.57812417",
"0.5779652",
"0.5774043",
"0.57545775",
"0.5750221",
"0.57501847",
"0.57471955",
"0.57362056"
] | 0.70183074 | 0 |
Devuelve la lista de distritos en base al nombre de un departamento y una provincia | public function Get_List_Distrito(string $p_Cod_Departamento,string $p_Cod_Provincia):array
{
$l_ADGenerico = new ADGenerico();
return [ "List_Resultado" => $l_ADGenerico->Get_List_Distrito($p_Cod_Departamento,$p_Cod_Provincia) ];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function list_distrital($dep_id){\n $tabla='';\n $departamento=$this->model_proyecto->get_departamento($dep_id);\n $distritales=$this->model_evalinstitucional->get_distritales($dep_id);\n\n $nro=1;\n $tabla.='<hr><table class=\"table table-bordered\">\n <tr>\n <td>'.$nro.'</td>\n <td><b>CONSOLIDADO - '.strtoupper($departamento[0]['dep_departamento']).'</b></td>\n <td align=center><a href=\"#\" class=\"btn btn-info enlace\" name=\"'.$departamento[0]['dep_id'].'\" id=\"0\">VER</a></td>\n </tr>';\n foreach($distritales as $row){\n $nro++;\n $tabla.='\n <tr>\n <td>'.$nro.'</td>\n <td>'.strtoupper($row['dist_distrital']).'</td>\n <td align=center><a href=\"#\" class=\"btn btn-info enlace\" name=\"'.$row['dist_id'].'\" id=\"1\">VER</a></td>\n </tr>';\n }\n \n $tabla.='</table>';\n return $tabla;\n }",
"public function Departamentos()\n {\n $oDbl = $this->getoDbl();\n $tabla = $this->getNomTabla();\n\n $oGesDirectores = new profesores\\GestorProfesorDirector();\n $cDirectores = $oGesDirectores->getProfesoresDirectores(array('f_cese' => 1), array('f_cese' => 'IS NULL'));\n\n $rta['num'] = count($cDirectores);\n if ($this->blista == true && $rta['num'] > 0) {\n $html = '<table>';\n foreach ($cDirectores as $oDirector) {\n $id_departamento = $oDirector->getId_departamento();\n $id_nom = $oDirector->getId_nom();\n $oDepartamento = new Departamento($id_departamento);\n $nom_dep = $oDepartamento->getDepartamento();\n $oPersonaDl = new personas\\PersonaDl($id_nom);\n $nom_persona = $oPersonaDl->getPrefApellidosNombre();\n $html .= \"<tr><td>$nom_dep</td><td>$nom_persona</td></tr>\";\n }\n $html .= '</table>';\n $rta['lista'] = $html;\n } else {\n $rta['lista'] = '';\n }\n return $rta;\n }",
"private function getDepartamento(){\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n // Departamentos\r\n /*\r\n $RAW_MUN = \"SELECT distinct(m.mun_nombre) from usuario u\r\n JOIN cliente_usuario as cu on cu.cli_usu_usu_id=u.usu_id\r\n JOIN cliente as c ON cu.cli_usu_cli_id = c.cli_id\r\n JOIN municipio as m ON c.cli_mun_id = m.mun_id \r\n WHERE cu.cli_usu_rol_id=6 \r\n GROUP BY u.usu_id order by m.mun_nombre asc\";*/\r\n $RAW_MUN = \"SELECT * FROM departamento WHERE dep_activo=1\";\r\n\r\n $statement_dep = $em->getConnection()->prepare($RAW_MUN);\r\n $statement_dep->execute(); \r\n $medicos_dep = $statement_dep->fetchAll(); \r\n //End Departamentos \r\n\r\n return $medicos_dep;\r\n }",
"public function list_distritales($tp_rep,$dep_id){\n $regional=$this->model_proyecto->get_departamento($dep_id);\n $distritales=$this->model_evalinstitucional->get_distritales($dep_id);\n $eficacia_regional=$this->tabla_regresion_lineal_regional($dep_id); /// Eficacia\n $economia_regional=$this->economia_por_regional($dep_id); /// Economia\n $eficiencia_regional=$this->eficiencia_por_regional($eficacia_regional[5][$this->tmes],$economia_regional[3]); /// Eficiencia\n\n $tabla='';\n // 1 : normal, 2 : Impresion\n if($tp_rep==1){ /// Normal\n $tab='class=\"table table-bordered\" align=center style=\"width:90%;\"';\n $tabla.='<h2 align=center>CUADRO DE INDICADORES</h2>';\n $color='';\n } \n else{ /// Impresion\n $tab='cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center';\n $color='#e9edec';\n }\n\n $tabla.='\n <table '.$tab.'>\n <thead>\n <tr style=\"font-size: 9px;\" align=center bgcolor='.$color.'>\n <th style=\"width:5%;height:15px;\">#</th>\n <th style=\"width:40%;\">DISTRITAL</th>\n <th style=\"width:15%;\">% EFICACIA</th>\n <th style=\"width:15%;\">% ECONOMIA</th>\n <th style=\"width:15%;\">EFICIENCIA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0; $sum_cert=0;$sum_asig=0;\n foreach($distritales as $row){\n $eficacia=$this->tabla_regresion_lineal_distrital($row['dist_id']); /// Eficacia\n $economia=$this->economia_por_distrital($row['dist_id']); /// Eficiencia\n $eficiencia=$this->eficiencia_por_distrital($eficacia[5][$this->tmes],$economia[3]);\n $nro++;\n $tabla.='<tr style=\"font-size: 9px;\">';\n $tabla.='<td style=\"width:5%;height:10px;\" align=center>'.$nro.'</td>';\n $tabla.='<td style=\"width:40%;\">'.strtoupper($row['dist_distrital']).'</td>';\n $tabla.='<td style=\"width:15%;\" align=right><b>'.$eficacia[5][$this->tmes].'%</b></td>';\n $tabla.='<td style=\"width:15%;\" align=right><b>'.$economia[3].'%</b></td>';\n $tabla.='<td style=\"width:15%;\" align=right><b>'.$eficiencia.'</b></td>';\n $tabla.='</tr>';\n }\n $tabla.='\n <tr style=\"font-size: 9px;\" bgcolor=\"#d3f8c5\">\n <td></td>\n <td><b>CONSOLIDADO REGIONAL '.strtoupper($regional[0]['dep_departamento']).'</b></td>\n <td style=\"font-size: 10px;\" align=right><b>'.$eficacia_regional[5][$this->tmes].'%</b></td>\n <td style=\"font-size: 10px;\" align=right><b>'.$economia_regional[3].'%</b></td>\n <td style=\"font-size: 10px;\" align=right><b>'.$eficiencia_regional.'</b></td>\n </tr>\n </tbody>\n </table>';\n\n return $tabla;\n }",
"public function listar_departamento()\n\t\t{\n\t\t\t$laDepartamento = array();\n\t\t\t$cont = 0;\n\t\t\t$this->conectar();\n\n\t\t\t$sql =\"SELECT * FROM tdepartamento\";\n\t\t\t$pcsql = $this->filtro($sql);\n\t\t\twhile($laRow = $this->proximo($pcsql))\n\t\t\t{\n\t\t\t\t$laDepartamento[$cont]['iddepartamento']\t= $laRow['iddepartamento'];\n\t\t\t\t$laDepartamento[$cont]['codigodep']\t= $laRow['codigodep'];\n\t\t\t\t$laDepartamento[$cont]['denominacion']\t= $laRow['denominacion'];\n\t\t\t\t$laDepartamento[$cont]['estatusdep']\t= $laRow['estatusdep'];\n\t\t\t\n\n\t\t\t\t$cont++;\n\t\t\t}\n\t\t\t$this->desconectar();\n\t\t\treturn $laDepartamento;\n\t\t}",
"public function regionales_distritales(){\n $sql = ' select *\n from _distritales\n where dist_id!=\\'0\\' and dist_estado!=\\'0\\'\n order by dep_id,dist_id asc';\n $query = $this->db->query($sql);\n return $query->result_array(); \n }",
"public function buscarProdutosReservadosRepresentante($repoid, $ordoid){\r\n \r\n $produtos = array();\r\n $sql = \"SELECT\r\n ragoid AS id_reserva_agendamento,\r\n ragordoid AS id_ordem_servico,\r\n raioid AS id_reserva_agendamento_item,\r\n raiprdoid AS id_produto,\r\n ragrasoid AS id_reserva_agendamento_status,\r\n prdoid AS id_produto,\r\n prdproduto AS descricao_produto,\r\n raiqtde_estoque AS quantidade_disponivel,\r\n raiqtde_transito AS quantidade_transito\r\n FROM\r\n reserva_agendamento\r\n INNER JOIN\r\n reserva_agendamento_item ON ragoid = rairagoid\r\n INNER JOIN\r\n produto ON prdoid = raiprdoid\r\n WHERE \r\n ragrasoid IN (1,3) AND \r\n ragrepoid = \" . $repoid . \"\r\n AND\r\n raidt_exclusao IS NULL\r\n AND ragordoid != \" . $ordoid; \r\n\r\n if (!$rs = pg_query($this->conn, $sql)) {\r\n throw new ErrorException(self::MENSAGEM_ERRO_PROCESSAMENTO);\r\n }\r\n\r\n while ($row = pg_fetch_assoc($rs)) {\r\n $produtos[] = $row;\r\n } \r\n return $produtos; \r\n }",
"public function cargarDepartamentos() {\n try {\n if ($_SESSION['posicion'] == 0) {\n $query = $this->db->connect()->prepare('SELECT nombre FROM departamento');\n\n $query->execute();\n }\n else {\n $query = $this->db->connect()->prepare('SELECT nombre \n FROM departamento\n WHERE id = :id');\n\n $query->execute(['id'=>$_SESSION['departamento']]);\n }\n\n $departamentos = [];\n\n while ($registro=$query->fetch()){\n array_push($departamentos,$registro['nombre']);\n }\n\n return $departamentos;\n }\n catch (PDOException $e) {\n return $e;\n }\n }",
"function listaDepartamentos() { \n return ($this->neg->getDepartamentos());\n }",
"private function catalogos($municipio){\n //$municipio = '014';\n\n $title = 'Valor Catastral';\n\n //Título de sección:\n $title_section = \"Valor Catastral.\";\n\n //Listado de municipios de tabasco\n //$listaMunicipios = Municipio::with('entidad')->where('entidad', '27')->orderBy('nombre_municipio')->lists('nombre_municipio','municipio');\n\n $viasComunicacion = [\n '1'=>'CARRETERA PAVIMENTADA',\n '2'=>'CARRETERA DE TERRACERIA',\n ];\n\n $usoSuelo = [\n '1' => 'SIN CONSTRUCCIÓN (BALDÍOS)',\n '2' => 'RESTAURANTES',\n '3' => 'ESTACIONAMIENTO',\n '4' => 'CINES',\n '5' => 'CLUBES',\n '6' => 'PASTIZALES',\n '7' => 'DEPARTAMENTO EN CONDOMINIO',\n '8' => 'OFICINAS DE SERVICIOS',\n '9' => 'CASA HABITACIÓN',\n ];\n $usoSueloList = [];\n\n $usoPredio = [\n '1'=>'Habitacional',\n '2'=>'Industrial',\n '3'=>'Agrícola',\n ];\n\n $tenenciaTierra = [\n '1'=>'Propiedad',\n '2'=>'Ejidal',\n '3'=>'Común',\n '4'=>'Posesión',\n ];\n\n $serviciosPublicos = [\n '1'=>'Agua',\n '2'=>'Luz',\n '3'=>'Teléfono',\n '4'=>'Banqueta',\n '5'=>'Alumbrado',\n '6'=>'Pavimento',\n '7'=>'Drenaje',\n '8'=>'Transporte',\n ];\n\n $serviciosPublicos = tiposervicios::orderBy('descripcion')->remember(120)->lists('descripcion', 'id_tiposervicio');\n\n $tiposConstruccion = [\n '01'=>'ANTIGUAS',\n '02'=>'MODERNAS',\n '03'=>'EDIFICIOS MODERNOS',\n '04'=>'CONSTRUCCIONES ESPECIALES',\n '05'=>'EDIFICIOS DE CONSTRUCCIONES ESPECIALES',\n ];\n\n $categoriasConstruccion = [\n '01' => [ //Antiguas\n '01' => 'ECONÓMICA',\n '02' => 'MEDIO',\n '03' => 'SUPERIOR',\n ],\n '02' => [ //Modernas\n '04' => 'INTERÉS SOCIAL',\n '05' => 'POPULAR',\n '06' => 'MEDIO',\n '07' => 'BUENO',\n '08' => 'SUPERIOR',\n ],\n '03' => [ //Edificios modernos\n '09' => 'INTERÉS SOCIAL',\n '10' => 'MEDIO',\n '11' => 'SUPERIOR',\n ],\n '04' => [ //Edificios construcciones especiales\n '12' => 'CORRIENTE',\n '13' => 'MEDIO',\n '14' => 'BUENO',\n ],\n '05' => [ //Edificio construcciones especiales\n '15' => 'MEDIO',\n '16' => 'BUENO',\n ]\n ];\n\n\n $t = array();\n foreach($tiposConstruccion as $k => $v){\n $t[] = ['value'=>$k, 'text'=>$v];\n }\n $tiposConstruccion = $t;\n\n $edosConstruccion = [\n '1'=>'BUENO',\n '2'=>'REGULAR',\n '3'=>'MALO',\n ];\n\n $t = array();\n foreach($edosConstruccion as $k => $v){\n $t[] = ['value'=>$k, 'text'=>$v];\n }\n $edosConstruccion = $t;\n\n $incEsquina = [\n '1'=>'NO COMERCIAL',\n '2'=>'COMERCIAL BAJA',\n '3'=>'COMERCIAL ALTA',\n ];\n\n $elementosConstruccion = [\n 'techos'=>'03',\n 'muros'=>'04',\n 'pisos'=>'17',\n 'puertas'=>'09',\n 'hidraulicas'=>'05',\n 'electricas'=>'07',\n 'sanitarias'=>'06',\n ];\n\n $oVC = ValorConstruccion::where('municipio',$municipio)->get();\n $valoresConstruccion = [];\n foreach($oVC as $vc){\n $valoresConstruccion[$vc->municipio][$vc->tipo_construccion][$vc->categoria][$vc->elemento] = [\n '1'=>$vc->factor1,\n '2'=>$vc->factor2,\n '3'=>$vc->factor3,\n ];\n }\n\n ///Catálogos para rústicos\n $distCabmun = [\n '1' => \"MENOS DE 5 Km.\",\n '2' => \"ENTRE 5 Y 10 Km.\",\n '3' => \"ENTRE 10 Y 15 Km.\",\n ];\n\n $distCenpob = [\n '1' => \"MENOS DE 5 Km.\",\n '2' => \"ENTRE 5 Y 10 Km.\",\n ];\n\n //Valores para albercas\n $tiposAlbercas = [\n '1' => 'ECONÓMICA BUENA',\n '2' => 'ECONÓMICA REGULAR',\n '3' => 'ECONÓMICA MALA',\n '4' => 'MEDIANA BUENA',\n '5' => 'MEDIANA REGULAR',\n '6' => 'MEDIANA MALA',\n '7' => 'LUJO BUENA',\n '8' => 'LUJO REGULAR',\n '9' => 'LUJO MALA',\n ];\n\n $valoresAlbercas = [\n '1' => 950,\n '2' => 900,\n '3' => 850,\n\n '4' => 1200,\n '5' => 1100,\n '6' => 1000,\n\n '7' => 1500,\n '8' => 1400,\n '9' => 1300,\n ];\n\n $vars = [\n 'title','title_section', 'subtitle_section',\n 'usoSuelo', 'serviciosPublicos','incEsquina','municipio',\n //'techos', 'muros', 'pisos', 'puertas', 'ventanas', 'hidraulicas', 'electricas', 'sanitarias', 'instEspeciales',\n 'edosConstruccion', 'usosConstruccion', 'tiposConstruccion', 'categoriasConstruccion', 'valoresConstruccion',\n 'elementosConstruccion',\n 'tipo_terreno',\n 'viasComunicacion','distCabmun','distCenpob',\n 'tiposAlbercas', 'valoresAlbercas',\n ];\n\n return compact($vars);\n\n }",
"public function getListActivar()\n {\n\n $sql = \"SELECT cod_distribuidor\n FROM distribuidor\n WHERE distribuidor.cod_estado = 2\n \";\n $list = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $item = new Distribuidor();\n $item->setCod_distribuidor($row[0]);\n \n array_push($list, $item);\n\n }\n return $list;\n\n }",
"function get_departments()\n {\n $sql = \"\n SELECT DISTINCT(dept)\n FROM pr.pr_master_seksi\n ORDER BY pr.pr_master_seksi.dept ASC\n \";\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }",
"public function selectSolicitacoesDepartmento($dados)\n\t{\n\n\t\t$query = (\"SELECT SOL.sol_codigo, substr(PRO.pro_descricao,1,60), STA.sta_descricao,\n\t\t\t\t USU.usu_nome AS Usuario_Solicitante,\n\t\t\t\t (SELECT dep_descricao FROM tb_departamento WHERE dep_codigo = \n\t\t\t\t (SELECT dep_codigo FROM tb_usuario WHERE usu_codigo = usu_codigo_solicitante)\n\t\t\t\t ) AS Departamento_Solicitante,\n\t\t\t\t substr(sol_descricao_solicitacao,1,60), \n\t\t\t\t (SELECT usu_email FROM tb_usuario WHERE usu_codigo = ATS.usu_codigo_atendente) AS Atendente,\n\t (SELECT date_format(tea_data_acao,'%d-%m-%Y %H:%i:%s') FROM tb_calculo_atendimento WHERE sol_codigo = SOL.sol_codigo AND sta_codigo = 1) AS Abertura\t\t\t\t \n\t\t\t\t FROM tb_solicitacao AS SOL\n\t\t\t\t #Traz o nome do usuario solicitante\n\t\t\t\t INNER JOIN tb_usuario as USU\n \t\t\tON usu_codigo_solicitante = USU.usu_codigo\n\t\t\t\t #Tabela de Problema, traz a descrição do problema\n\t\t\t\t INNER JOIN tb_problema AS PRO\n\t\t\t\t ON PRO.pro_codigo = SOL.pro_codigo\n\t\t\t\t INNER JOIN tb_status STA\n\t\t\t\t ON STA.sta_codigo = SOL.sta_codigo\n\t\t\t\t #Tabela de Atendente Solicitacao, traz quem esta atendendo a solicitacao\n\t\t\t\t LEFT JOIN tb_atendente_solicitacao AS ATS\n\t\t\t\t ON SOL.sol_codigo = ATS.sol_codigo\n\t\t\t\t WHERE dep_codigo_solicitado = ?\n\t AND SOL.sta_codigo LIKE ? AND SOL.pro_codigo LIKE ?\n AND usu_nome LIKE ? AND sol_descricao_solicitacao LIKE ?\n\t\t\t\t ORDER BY SOL.sol_codigo DESC\n\t\t\t\t\");\n\t\ttry\n\t\t{\n\t\t\t\t\n\t\t\t$stmt = $this->conexao->prepare($query);\n\n\t\t\t$array = array($dados[$this->dep_codigo_solicitado],\n\t\t\t\t\t\t\t\"%{$dados[$this->sta_codigo]}%\",\n\t\t\t\t\t\t\t\"%{$dados[$this->pro_codigo]}%\",\n\t\t\t\t\t\t\t\"%{$dados['usu_nome']}%\",\n\t\t\t\t\t\t\t\"%{$dados[$this->sol_descricao_solicitacao]}%\");\n\n\t\t\t$stmt->execute($array);\n\t\t\treturn($stmt);\n\n\t\t} catch (PDOException $e)\n\t\t{\n\t\t\tthrow new PDOException($e->getMessage(), $e->getCode());\n\t\t}\n\t}",
"public function listarDepartamentos(){\n\t$departamentos = $this->conexion->query(\"SELECT * FROM departamentos ORDER BY idDepartamento DESC;\");\n\treturn $departamentos;\n }",
"private function get_dept()\r\n {\r\n\t /** \r\n\t * variable streek staat in selectbox streek\r\n * twee varianten bijv. d2 en s2: resp dept_id = 2, streek_id = 2\r\n\t */\t\r\n if (isset($this->streek_id))\r\n { \r\n $sql = \"SELECT dept_id FROM tblDept_streek_dev WHERE streek_id = '$this->streek_id'\";\r\n $stmt = $this->db->query($sql);\r\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\r\n extract($row);\r\n $this->deptID[] = $dept_id;\r\n } \r\n $stmt->closeCursor(); \r\n }\t\r\n else\r\n {\r\n $this->deptID[] = $this->dept_id;\r\n }\r\n \r\n /** huisID opslaan in array */\r\n $sql = \"SELECT hz.huis_id FROM tblHuizen_dev hz \";\r\n \r\n /** checkboxen sidebar */\r\n if ($this->count_checkbox != 0)\r\n {\r\n $sql .= \" INNER JOIN sidebar_huis sb ON hz.huis_id = sb.huis_id \";\r\n } \r\n \r\n $sql .= \"WHERE hz.dept_id IN (\";\r\n $z = count($this->deptID);\r\n for ($x = 0; $x < $z; $x++)\r\n {\r\n $sql .= $this->deptID[$x]. ',';\r\n }\r\n $sql = substr($sql, 0, strlen($sql) - 1);\r\n $sql .= \") AND hz.archief = '0' AND hz.zichtbaar = '0' \";\r\n \r\n /** checkboxen sidebar */\r\n if ($this->count_checkbox != 0)\r\n {\r\n for ($x = 0; $x < $this->count_checkbox; $x++)\r\n {\r\n $fieldname = $this->arrcheckbox[$x];\r\n $sql .= \" AND sb.$fieldname = '1'\";\r\n }\r\n }\r\n\t \r\n /** selectboxen m.u.v. prijs en beschikbaarheid */\r\n if ($this->sql_select_box != '')\r\n {\r\n $sql .= $this->sql_select_box. ' ';\r\n }\r\n \r\n $stmt = $this->db->query($sql);\r\n \r\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC))\r\n {\r\n extract($row);\r\n array_push($this->huisID, $huis_id);\r\n }\t\r\n $stmt->closeCursor(); \r\n }",
"function partidas_dependientes($insumo){\n $tabla='';\n $get_partida=$this->model_partidas->get_partida($insumo[0]['par_id']); /// datos de la partda\n\n $lista_partidas=$this->model_modrequerimiento->lista_partidas_dependientes($insumo[0]['aper_id'],$get_partida[0]['par_depende']);\n foreach ($lista_partidas as $row) {\n if($insumo[0]['par_id']==$row['par_id']){\n $tabla.='<option value=\"'.$row['par_id'].'\" selected>'.$row['par_codigo'].'.- '.$row['par_nombre'].'</option>';\n }\n else{\n $tabla.='<option value=\"'.$row['par_id'].'\">'.$row['par_codigo'].'.- '.$row['par_nombre'].'</option>';\n }\n }\n\n return $tabla;\n }",
"public function run()\n {\n $departamentos=[\n [1,'AMAZONAS'],\n [2,'ANCASH'],\n [3,'APURIMAC'],\n [4,'AREQUIPA'],\n [5,'AYACUCHO'],\n [6,'CAJAMARCA'],\n [7,'CUSCO'],\n [8,'HUANCAVELICA'],\n [9,'HUANUCO'],\n [10,'ICA'],\n [11,'JUNIN'],\n [12,'LA LIBERTAD'],\n [13,'LAMBAYEQUE'],\n [14,'LIMA'],\n [15,'LORETO'],\n [16,'MADRE DE DIOS'],\n [17,'MOQUEGUA'],\n [18,'PASCO'],\n [19,'PIURA'],\n [20,'PUNO'],\n [21,'SAN MARTIN'],\n [22,'TACNA'],\n [23,'TUMBES'],\n [25,'UCAYALI'],\n\t\t];\n\t\t$provincias=[\n\t\t\t[101,1,'CHACHAPOYAS'],\n\t\t\t[102,1,'BAGUA'],\n\t\t\t[103,1,'BONGARA'],\n\t\t\t[104,1,'LUYA'],\n\t\t\t[105,1,'RODRIGUEZ DE MENDOZA'],\n\t\t\t[106,1,'CONDORCANQUI'],\n\t\t\t[107,1,'UTCUBAMBA'],\n\t\t\t[201,2,'HUARAZ'],\n\t\t\t[202,2,'AIJA'],\n\t\t\t[203,2,'BOLOGNESI'],\n\t\t\t[204,2,'CARHUAZ'],\n\t\t\t[205,2,'CASMA'],\n\t\t\t[206,2,'CORONGO'],\n\t\t\t[207,2,'HUAYLAS'],\n\t\t\t[208,2,'HUARI'],\n\t\t\t[209,2,'MARISCAL LUZURIAGA'],\n\t\t\t[210,2,'PALLASCA'],\n\t\t\t[211,2,'POMABAMBA'],\n\t\t\t[212,2,'RECUAY'],\n\t\t\t[213,2,'SANTA'],\n\t\t\t[214,2,'SIHUAS'],\n\t\t\t[215,2,'YUNGAY'],\n\t\t\t[216,2,'ANTONIO RAIMONDI'],\n\t\t\t[217,2,'CARLOS FERMIN FITZCARRALD'],\n\t\t\t[218,2,'ASUNCION'],\n\t\t\t[219,2,'HUARMEY'],\n\t\t\t[220,2,'OCROS'],\n\t\t\t[301,3,'ABANCAY'],\n\t\t\t[302,3,'AYMARAES'],\n\t\t\t[303,3,'ANDAHUAYLAS'],\n\t\t\t[304,3,'ANTABAMBA'],\n\t\t\t[305,3,'COTABAMBAS'],\n\t\t\t[306,3,'GRAU'],\n\t\t\t[307,3,'CHINCHEROS'],\n\t\t\t[401,4,'AREQUIPA'],\n\t\t\t[402,4,'CAYLLOMA'],\n\t\t\t[403,4,'CAMANA'],\n\t\t\t[404,4,'CARAVELI'],\n\t\t\t[405,4,'CASTILLA'],\n\t\t\t[406,4,'CONDESUYOS'],\n\t\t\t[407,4,'ISLAY'],\n\t\t\t[408,4,'LA UNION'],\n\t\t\t[501,5,'HUAMANGA'],\n\t\t\t[502,5,'CANGALLO'],\n\t\t\t[503,5,'HUANTA'],\n\t\t\t[504,5,'LA MAR'],\n\t\t\t[505,5,'LUCANAS'],\n\t\t\t[506,5,'PARINACOCHAS'],\n\t\t\t[507,5,'VICTOR FAJARDO'],\n\t\t\t[508,5,'HUANCA SANCOS'],\n\t\t\t[509,5,'VILCAS HUAMAN'],\n\t\t\t[510,5,'PAUCAR DEL SARA SARA'],\n\t\t\t[511,5,'SUCRE'],\n\t\t\t[601,6,'CAJAMARCA'],\n\t\t\t[602,6,'CAJABAMBA'],\n\t\t\t[603,6,'CELENDIN'],\n\t\t\t[604,6,'CONTUMAZA'],\n\t\t\t[605,6,'CUTERVO'],\n\t\t\t[606,6,'CHOTA'],\n\t\t\t[607,6,'HUALGAYOC'],\n\t\t\t[608,6,'JAEN'],\n\t\t\t[609,6,'SANTA CRUZ'],\n\t\t\t[610,6,'SAN MIGUEL'],\n\t\t\t[611,6,'SAN IGNACIO'],\n\t\t\t[612,6,'SAN MARCOS'],\n\t\t\t[613,6,'SAN PABLO'],\n\t\t\t[701,7,'CUSCO'],\n\t\t\t[702,7,'ACOMAYO'],\n\t\t\t[703,7,'ANTA'],\n\t\t\t[704,7,'CALCA'],\n\t\t\t[705,7,'CANAS'],\n\t\t\t[706,7,'CANCHIS'],\n\t\t\t[707,7,'CHUMBIVILCAS'],\n\t\t\t[708,7,'ESPINAR'],\n\t\t\t[709,7,'LA CONVENCION'],\n\t\t\t[710,7,'PARURO'],\n\t\t\t[711,7,'PAUCARTAMBO'],\n\t\t\t[712,7,'QUISPICANCHIS'],\n\t\t\t[713,7,'URUBAMBA'],\n\t\t\t[801,8,'HUANCAVELICA'],\n\t\t\t[802,8,'ACOBAMBA'],\n\t\t\t[803,8,'ANGARAES'],\n\t\t\t[804,8,'CASTROVIRREYNA'],\n\t\t\t[805,8,'TAYACAJA'],\n\t\t\t[806,8,'HUAYTARA'],\n\t\t\t[807,8,'CHURCAMPA'],\n\t\t\t[901,9,'HUANUCO'],\n\t\t\t[902,9,'AMBO'],\n\t\t\t[903,9,'DOS DE MAYO'],\n\t\t\t[904,9,'HUAMALIES'],\n\t\t\t[905,9,'MARAÑON'],\n\t\t\t[906,9,'LEONCIO PRADO'],\n\t\t\t[907,9,'PACHITEA'],\n\t\t\t[908,9,'PUERTO INCA'],\n\t\t\t[909,9,'HUACAYBAMBA'],\n\t\t\t[910,9,'LAURICOCHA'],\n\t\t\t[911,9,'YAROWILCA'],\n\t\t\t[1001,10,'ICA'],\n\t\t\t[1002,10,'CHINCHA'],\n\t\t\t[1003,10,'NAZCA'],\n\t\t\t[1004,10,'PISCO'],\n\t\t\t[1005,10,'PALPA'],\n\t\t\t[1101,11,'HUANCAYO'],\n\t\t\t[1102,11,'CONCEPCION'],\n\t\t\t[1103,11,'JAUJA'],\n\t\t\t[1104,11,'JUNIN'],\n\t\t\t[1105,11,'TARMA'],\n\t\t\t[1106,11,'YAULI'],\n\t\t\t[1107,11,'SATIPO'],\n\t\t\t[1108,11,'CHANCHAMAYO'],\n\t\t\t[1109,11,'CHUPACA'],\n\t\t\t[1201,12,'TRUJILLO'],\n\t\t\t[1202,12,'BOLIVAR'],\n\t\t\t[1203,12,'SANCHEZ CARRION'],\n\t\t\t[1204,12,'OTUZCO'],\n\t\t\t[1205,12,'PACASMAYO'],\n\t\t\t[1206,12,'PATAZ'],\n\t\t\t[1207,12,'SANTIAGO DE CHUCO'],\n\t\t\t[1208,12,'ASCOPE'],\n\t\t\t[1209,12,'CHEPEN'],\n\t\t\t[1210,12,'JULCAN'],\n\t\t\t[1211,12,'GRAN CHIMU'],\n\t\t\t[1212,12,'VIRU'],\n\t\t\t[1301,13,'CHICLAYO'],\n\t\t\t[1302,13,'FERREÑAFE'],\n\t\t\t[1303,13,'LAMBAYEQUE'],\n\t\t\t[1401,14,'LIMA'],\n\t\t\t[1402,14,'CAJATAMBO'],\n\t\t\t[1403,14,'CANTA'],\n\t\t\t[1404,14,'CAÑETE'],\n\t\t\t[1405,14,'HUAURA'],\n\t\t\t[1406,14,'HUAROCHIRI'],\n\t\t\t[1407,14,'YAUYOS'],\n\t\t\t[1408,14,'HUARAL'],\n\t\t\t[1409,14,'BARRANCA'],\n\t\t\t[1410,14,'OYON'],\n\t\t\t[1411,14,'CALLAO'],\n\t\t\t[1501,15,'MAYNAS'],\n\t\t\t[1502,15,'ALTO AMAZONAS'],\n\t\t\t[1503,15,'LORETO'],\n\t\t\t[1504,15,'REQUENA'],\n\t\t\t[1505,15,'UCAYALI'],\n\t\t\t[1506,15,'MARISCAL RAMON CASTILLA'],\n\t\t\t[1601,16,'TAMBOPATA'],\n\t\t\t[1602,16,'MANU'],\n\t\t\t[1603,16,'TAHUAMANU'],\n\t\t\t[1701,17,'MARISCAL NIETO'],\n\t\t\t[1702,17,'GENERAL SANCHEZ CERRO'],\n\t\t\t[1703,17,'ILO'],\n\t\t\t[1801,18,'PASCO'],\n\t\t\t[1802,18,'DANIEL CARRION'],\n\t\t\t[1803,18,'OXAPAMPA'],\n\t\t\t[1901,19,'PIURA'],\n\t\t\t[1902,19,'AYABACA'],\n\t\t\t[1903,19,'HUANCABAMBA'],\n\t\t\t[1904,19,'MORROPON'],\n\t\t\t[1905,19,'PAITA'],\n\t\t\t[1906,19,'SULLANA'],\n\t\t\t[1907,19,'TALARA'],\n\t\t\t[1908,19,'SECHURA'],\n\t\t\t[2001,20,'PUNO'],\n\t\t\t[2002,20,'AZANGARO'],\n\t\t\t[2003,20,'CARABAYA'],\n\t\t\t[2004,20,'CHUCUITO'],\n\t\t\t[2005,20,'HUANCANE'],\n\t\t\t[2006,20,'LAMPA'],\n\t\t\t[2007,20,'MELGAR'],\n\t\t\t[2008,20,'SANDIA'],\n\t\t\t[2009,20,'SAN ROMAN'],\n\t\t\t[2010,20,'YUNGUYO'],\n\t\t\t[2011,20,'SAN ANTONIO DE PUTINA'],\n\t\t\t[2012,20,'EL COLLAO'],\n\t\t\t[2013,20,'MOHO'],\n\t\t\t[2101,21,'MOYOBAMBA'],\n\t\t\t[2102,21,'HUALLAGA'],\n\t\t\t[2103,21,'LAMAS'],\n\t\t\t[2104,21,'MARISCAL CACERES'],\n\t\t\t[2105,21,'RIOJA'],\n\t\t\t[2106,21,'SAN MARTIN'],\n\t\t\t[2107,21,'BELLAVISTA'],\n\t\t\t[2108,21,'TOCACHE'],\n\t\t\t[2109,21,'PICOTA'],\n\t\t\t[2110,21,'EL DORADO'],\n\t\t\t[2201,22,'TACNA'],\n\t\t\t[2202,22,'TARATA'],\n\t\t\t[2203,22,'JORGE BASADRE'],\n\t\t\t[2204,22,'CANDARAVE'],\n\t\t\t[2301,23,'TUMBES'],\n\t\t\t[2302,23,'CONTRALMIRANTE VILLAR'],\n\t\t\t[2303,23,'ZARUMILLA'],\n\t\t\t[2501,25,'CORONEL PORTILLO'],\n\t\t\t[2502,25,'PADRE ABAD'],\n\t\t\t[2503,25,'ATALAYA'],\n\t\t\t[2504,25,'PURUS'],\n ];\n\n $distritos=[\n\t\t\t[10101,101,'CHACHAPOYAS'],\n\t\t\t[10102,101,'ASUNCION'],\n\t\t\t[10103,101,'BALSAS'],\n\t\t\t[10104,101,'CHETO'],\n\t\t\t[10105,101,'CHILIQUIN'],\n\t\t\t[10106,101,'CHUQUIBAMBA'],\n\t\t\t[10107,101,'GRANADA'],\n\t\t\t[10108,101,'HUANCAS'],\n\t\t\t[10109,101,'LA JALCA'],\n\t\t\t[10110,101,'LEYMEBAMBA'],\n\t\t\t[10111,101,'LEVANTO'],\n\t\t\t[10112,101,'MAGDALENA'],\n\t\t\t[10113,101,'MARISCAL CASTILLA'],\n\t\t\t[10114,101,'MOLINOPAMPA'],\n\t\t\t[10115,101,'MONTEVIDEO'],\n\t\t\t[10116,101,'OLLEROS'],\n\t\t\t[10117,101,'QUINJALCA'],\n\t\t\t[10118,101,'SAN FRANCISCO DE DAGUAS'],\n\t\t\t[10119,101,'SAN ISIDRO DE MAINO'],\n\t\t\t[10120,101,'SOLOCO'],\n\t\t\t[10121,101,'SONCHE'],\n\t\t\t[10201,102,'LA PECA'],\n\t\t\t[10202,102,'ARAMANGO'],\n\t\t\t[10203,102,'COPALLIN'],\n\t\t\t[10204,102,'EL PARCO'],\n\t\t\t[10206,102,'IMAZA'],\n\t\t\t[10301,103,'JUMBILLA'],\n\t\t\t[10302,103,'COROSHA'],\n\t\t\t[10303,103,'CUISPES'],\n\t\t\t[10304,103,'CHISQUILLA'],\n\t\t\t[10305,103,'CHURUJA'],\n\t\t\t[10306,103,'FLORIDA'],\n\t\t\t[10307,103,'RECTA'],\n\t\t\t[10308,103,'SAN CARLOS'],\n\t\t\t[10309,103,'SHIPASBAMBA'],\n\t\t\t[10310,103,'VALERA'],\n\t\t\t[10311,103,'YAMBRASBAMBA'],\n\t\t\t[10312,103,'JAZAN'],\n\t\t\t[10401,104,'LAMUD'],\n\t\t\t[10402,104,'CAMPORREDONDO'],\n\t\t\t[10403,104,'COCABAMBA'],\n\t\t\t[10404,104,'COLCAMAR'],\n\t\t\t[10405,104,'CONILA'],\n\t\t\t[10406,104,'INGUILPATA'],\n\t\t\t[10407,104,'LONGUITA'],\n\t\t\t[10408,104,'LONYA CHICO'],\n\t\t\t[10409,104,'LUYA'],\n\t\t\t[10410,104,'LUYA VIEJO'],\n\t\t\t[10411,104,'MARIA'],\n\t\t\t[10412,104,'OCALLI'],\n\t\t\t[10413,104,'OCUMAL'],\n\t\t\t[10414,104,'PISUQUIA'],\n\t\t\t[10415,104,'SAN CRISTOBAL'],\n\t\t\t[10416,104,'SAN FRANCISCO DE YESO'],\n\t\t\t[10417,104,'SAN JERONIMO'],\n\t\t\t[10418,104,'SAN JUAN DE LOPECANCHA'],\n\t\t\t[10419,104,'SANTA CATALINA'],\n\t\t\t[10420,104,'SANTO TOMAS'],\n\t\t\t[10421,104,'TINGO'],\n\t\t\t[10422,104,'TRITA'],\n\t\t\t[10423,104,'PROVIDENCIA'],\n\t\t\t[10501,105,'SAN NICOLAS'],\n\t\t\t[10502,105,'COCHAMAL'],\n\t\t\t[10503,105,'CHIRIMOTO'],\n\t\t\t[10504,105,'HUAMBO'],\n\t\t\t[10505,105,'LIMABAMBA'],\n\t\t\t[10506,105,'LONGAR'],\n\t\t\t[10507,105,'MILPUCC'],\n\t\t\t[10508,105,'MARISCAL BENAVIDES'],\n\t\t\t[10509,105,'OMIA'],\n\t\t\t[10510,105,'SANTA ROSA'],\n\t\t\t[10511,105,'TOTORA'],\n\t\t\t[10512,105,'VISTA ALEGRE'],\n\t\t\t[10601,106,'NIEVA'],\n\t\t\t[10602,106,'RIO SANTIAGO'],\n\t\t\t[10603,106,'EL CENEPA'],\n\t\t\t[10701,107,'BAGUA GRANDE'],\n\t\t\t[10702,107,'CAJARURO'],\n\t\t\t[10703,107,'CUMBA'],\n\t\t\t[10704,107,'EL MILAGRO'],\n\t\t\t[10705,107,'JAMALCA'],\n\t\t\t[10706,107,'LONYA GRANDE'],\n\t\t\t[10707,107,'YAMON'],\n\t\t\t[20101,201,'HUARAZ'],\n\t\t\t[20102,201,'INDEPENDENCIA'],\n\t\t\t[20103,201,'COCHABAMBA'],\n\t\t\t[20104,201,'COLCABAMBA'],\n\t\t\t[20105,201,'HUANCHAY'],\n\t\t\t[20106,201,'JANGAS'],\n\t\t\t[20107,201,'LA LIBERTAD'],\n\t\t\t[20108,201,'OLLEROS'],\n\t\t\t[20109,201,'PAMPAS'],\n\t\t\t[20110,201,'PARIACOTO'],\n\t\t\t[20111,201,'PIRA'],\n\t\t\t[20112,201,'TARICA'],\n\t\t\t[20201,202,'AIJA'],\n\t\t\t[20203,202,'CORIS'],\n\t\t\t[20205,202,'HUACLLAN'],\n\t\t\t[20206,202,'LA MERCED'],\n\t\t\t[20208,202,'SUCCHA'],\n\t\t\t[20301,203,'CHIQUIAN'],\n\t\t\t[20302,203,'ABELARDO PARDO LEZAMETA'],\n\t\t\t[20304,203,'AQUIA'],\n\t\t\t[20305,203,'CAJACAY'],\n\t\t\t[20310,203,'HUAYLLACAYAN'],\n\t\t\t[20311,203,'HUASTA'],\n\t\t\t[20313,203,'MANGAS'],\n\t\t\t[20315,203,'PACLLON'],\n\t\t\t[20317,203,'SAN MIGUEL DE CORPANQUI'],\n\t\t\t[20320,203,'TICLLOS'],\n\t\t\t[20321,203,'ANTONIO RAIMONDI'],\n\t\t\t[20322,203,'CANIS'],\n\t\t\t[20323,203,'COLQUIOC'],\n\t\t\t[20324,203,'LA PRIMAVERA'],\n\t\t\t[20325,203,'HUALLANCA'],\n\t\t\t[20401,204,'CARHUAZ'],\n\t\t\t[20402,204,'ACOPAMPA'],\n\t\t\t[20403,204,'AMASHCA'],\n\t\t\t[20404,204,'ANTA'],\n\t\t\t[20405,204,'ATAQUERO'],\n\t\t\t[20406,204,'MARCARA'],\n\t\t\t[20407,204,'PARIAHUANCA'],\n\t\t\t[20408,204,'SAN MIGUEL DE ACO'],\n\t\t\t[20409,204,'SHILLA'],\n\t\t\t[20410,204,'TINCO'],\n\t\t\t[20411,204,'YUNGAR'],\n\t\t\t[20501,205,'CASMA'],\n\t\t\t[20502,205,'BUENA VISTA ALTA'],\n\t\t\t[20503,205,'COMANDANTE NOEL'],\n\t\t\t[20505,205,'YAUTAN'],\n\t\t\t[20601,206,'CORONGO'],\n\t\t\t[20602,206,'ACO'],\n\t\t\t[20603,206,'BAMBAS'],\n\t\t\t[20604,206,'CUSCA'],\n\t\t\t[20605,206,'LA PAMPA'],\n\t\t\t[20606,206,'YANAC'],\n\t\t\t[20607,206,'YUPAN'],\n\t\t\t[20701,207,'CARAZ'],\n\t\t\t[20702,207,'HUALLANCA'],\n\t\t\t[20703,207,'HUATA'],\n\t\t\t[20704,207,'HUAYLAS'],\n\t\t\t[20705,207,'MATO'],\n\t\t\t[20706,207,'PAMPAROMAS'],\n\t\t\t[20707,207,'PUEBLO LIBRE'],\n\t\t\t[20708,207,'SANTA CRUZ'],\n\t\t\t[20709,207,'YURACMARCA'],\n\t\t\t[20710,207,'SANTO TORIBIO'],\n\t\t\t[20801,208,'HUARI'],\n\t\t\t[20802,208,'CAJAY'],\n\t\t\t[20803,208,'CHAVIN DE HUANTAR'],\n\t\t\t[20804,208,'HUACACHI'],\n\t\t\t[20805,208,'HUACHIS'],\n\t\t\t[20806,208,'HUACCHIS'],\n\t\t\t[20807,208,'HUANTAR'],\n\t\t\t[20808,208,'MASIN'],\n\t\t\t[20809,208,'PAUCAS'],\n\t\t\t[20810,208,'PONTO'],\n\t\t\t[20811,208,'RAHUAPAMPA'],\n\t\t\t[20812,208,'RAPAYAN'],\n\t\t\t[20813,208,'SAN MARCOS'],\n\t\t\t[20814,208,'SAN PEDRO DE CHANA'],\n\t\t\t[20815,208,'UCO'],\n\t\t\t[20816,208,'ANRA'],\n\t\t\t[20901,209,'PISCOBAMBA'],\n\t\t\t[20902,209,'CASCA'],\n\t\t\t[20903,209,'LUCMA'],\n\t\t\t[20904,209,'FIDEL OLIVAS ESCUDERO'],\n\t\t\t[20905,209,'LLAMA'],\n\t\t\t[20906,209,'LLUMPA'],\n\t\t\t[20907,209,'MUSGA'],\n\t\t\t[20908,209,'ELEAZAR GUZMAN BARRON'],\n\t\t\t[21001,210,'CABANA'],\n\t\t\t[21002,210,'BOLOGNESI'],\n\t\t\t[21003,210,'CONCHUCOS'],\n\t\t\t[21004,210,'HUACASCHUQUE'],\n\t\t\t[21005,210,'HUANDOVAL'],\n\t\t\t[21006,210,'LACABAMBA'],\n\t\t\t[21007,210,'LLAPO'],\n\t\t\t[21008,210,'PALLASCA'],\n\t\t\t[21009,210,'PAMPAS'],\n\t\t\t[21010,210,'SANTA ROSA'],\n\t\t\t[21011,210,'TAUCA'],\n\t\t\t[21101,211,'POMABAMBA'],\n\t\t\t[21102,211,'HUAYLLAN'],\n\t\t\t[21103,211,'PAROBAMBA'],\n\t\t\t[21104,211,'QUINUABAMBA'],\n\t\t\t[21201,212,'RECUAY'],\n\t\t\t[21202,212,'COTAPARACO'],\n\t\t\t[21203,212,'HUAYLLAPAMPA'],\n\t\t\t[21204,212,'MARCA'],\n\t\t\t[21205,212,'PAMPAS CHICO'],\n\t\t\t[21206,212,'PARARIN'],\n\t\t\t[21207,212,'TAPACOCHA'],\n\t\t\t[21208,212,'TICAPAMPA'],\n\t\t\t[21209,212,'LLACLLIN'],\n\t\t\t[21210,212,'CATAC'],\n\t\t\t[21301,213,'CHIMBOTE'],\n\t\t\t[21302,213,'CACERES DEL PERU'],\n\t\t\t[21303,213,'MACATE'],\n\t\t\t[21304,213,'MORO'],\n\t\t\t[21305,213,'NEPEÑA'],\n\t\t\t[21306,213,'SAMANCO'],\n\t\t\t[21307,213,'SANTA'],\n\t\t\t[21308,213,'COISHCO'],\n\t\t\t[21309,213,'NUEVO CHIMBOTE'],\n\t\t\t[21401,214,'SIHUAS'],\n\t\t\t[21402,214,'ALFONSO UGARTE'],\n\t\t\t[21403,214,'CHINGALPO'],\n\t\t\t[21404,214,'HUAYLLABAMBA'],\n\t\t\t[21405,214,'QUICHES'],\n\t\t\t[21406,214,'SICSIBAMBA'],\n\t\t\t[21407,214,'ACOBAMBA'],\n\t\t\t[21408,214,'CASHAPAMPA'],\n\t\t\t[21409,214,'RAGASH'],\n\t\t\t[21410,214,'SAN JUAN'],\n\t\t\t[21501,215,'YUNGAY'],\n\t\t\t[21502,215,'CASCAPARA'],\n\t\t\t[21503,215,'MANCOS'],\n\t\t\t[21504,215,'MATACOTO'],\n\t\t\t[21505,215,'QUILLO'],\n\t\t\t[21506,215,'RANRAHIRCA'],\n\t\t\t[21507,215,'SHUPLUY'],\n\t\t\t[21508,215,'YANAMA'],\n\t\t\t[21601,216,'LLAMELLIN'],\n\t\t\t[21602,216,'ACZO'],\n\t\t\t[21603,216,'CHACCHO'],\n\t\t\t[21604,216,'CHINGAS'],\n\t\t\t[21605,216,'MIRGAS'],\n\t\t\t[21606,216,'SAN JUAN DE RONTOY'],\n\t\t\t[21701,217,'SAN LUIS'],\n\t\t\t[21702,217,'YAUYA'],\n\t\t\t[21703,217,'SAN NICOLAS'],\n\t\t\t[21801,218,'CHACAS'],\n\t\t\t[21802,218,'ACOCHACA'],\n\t\t\t[21901,219,'HUARMEY'],\n\t\t\t[21902,219,'COCHAPETI'],\n\t\t\t[21903,219,'HUAYAN'],\n\t\t\t[21904,219,'MALVAS'],\n\t\t\t[21905,219,'CULEBRAS'],\n\t\t\t[22001,220,'ACAS'],\n\t\t\t[22002,220,'CAJAMARQUILLA'],\n\t\t\t[22003,220,'CARHUAPAMPA'],\n\t\t\t[22004,220,'COCHAS'],\n\t\t\t[22005,220,'CONGAS'],\n\t\t\t[22006,220,'LLIPA'],\n\t\t\t[22007,220,'OCROS'],\n\t\t\t[22008,220,'SAN CRISTOBAL DE RAJAN'],\n\t\t\t[22009,220,'SAN PEDRO'],\n\t\t\t[22010,220,'SANTIAGO DE CHILCAS'],\n\t\t\t[30101,301,'ABANCAY'],\n\t\t\t[30102,301,'CIRCA'],\n\t\t\t[30103,301,'CURAHUASI'],\n\t\t\t[30104,301,'CHACOCHE'],\n\t\t\t[30105,301,'HUANIPACA'],\n\t\t\t[30106,301,'LAMBRAMA'],\n\t\t\t[30107,301,'PICHIRHUA'],\n\t\t\t[30108,301,'SAN PEDRO DE CACHORA'],\n\t\t\t[30109,301,'TAMBURCO'],\n\t\t\t[30201,302,'CHALHUANCA'],\n\t\t\t[30202,302,'CAPAYA'],\n\t\t\t[30203,302,'CARAYBAMBA'],\n\t\t\t[30204,302,'COLCABAMBA'],\n\t\t\t[30205,302,'COTARUSE'],\n\t\t\t[30206,302,'CHAPIMARCA'],\n\t\t\t[30207,302,'IHUAYLLO'],\n\t\t\t[30208,302,'LUCRE'],\n\t\t\t[30209,302,'POCOHUANCA'],\n\t\t\t[30210,302,'SAÑAYCA'],\n\t\t\t[30211,302,'SORAYA'],\n\t\t\t[30212,302,'TAPAIRIHUA'],\n\t\t\t[30213,302,'TINTAY'],\n\t\t\t[30214,302,'TORAYA'],\n\t\t\t[30215,302,'YANACA'],\n\t\t\t[30216,302,'SAN JUAN DE CHACÑA'],\n\t\t\t[30217,302,'JUSTO APU SAHUARAURA'],\n\t\t\t[30301,303,'ANDAHUAYLAS'],\n\t\t\t[30302,303,'ANDARAPA'],\n\t\t\t[30303,303,'CHIARA'],\n\t\t\t[30304,303,'HUANCARAMA'],\n\t\t\t[30305,303,'HUANCARAY'],\n\t\t\t[30306,303,'KISHUARA'],\n\t\t\t[30307,303,'PACOBAMBA'],\n\t\t\t[30308,303,'PAMPACHIRI'],\n\t\t\t[30309,303,'SAN ANTONIO DE CACHI'],\n\t\t\t[30310,303,'SAN JERONIMO'],\n\t\t\t[30311,303,'TALAVERA'],\n\t\t\t[30312,303,'TURPO'],\n\t\t\t[30313,303,'PACUCHA'],\n\t\t\t[30314,303,'POMACOCHA'],\n\t\t\t[30315,303,'SANTA MARIA DE CHICMO'],\n\t\t\t[30316,303,'TUMAY HUARACA'],\n\t\t\t[30317,303,'HUAYANA'],\n\t\t\t[30318,303,'SAN MIGUEL DE CHACCRAMPA'],\n\t\t\t[30319,303,'KAQUIABAMBA'],\n\t\t\t[30401,304,'ANTABAMBA'],\n\t\t\t[30402,304,'EL ORO'],\n\t\t\t[30403,304,'HUAQUIRCA'],\n\t\t\t[30404,304,'JUAN ESPINOZA MEDRANO'],\n\t\t\t[30405,304,'OROPESA'],\n\t\t\t[30406,304,'PACHACONAS'],\n\t\t\t[30407,304,'SABAINO'],\n\t\t\t[30501,305,'TAMBOBAMBA'],\n\t\t\t[30502,305,'COYLLURQUI'],\n\t\t\t[30503,305,'COTABAMBAS'],\n\t\t\t[30504,305,'HAQUIRA'],\n\t\t\t[30505,305,'MARA'],\n\t\t\t[30506,305,'CHALLHUAHUACHO'],\n\t\t\t[30601,306,'CHUQUIBAMBILLA'],\n\t\t\t[30602,306,'CURPAHUASI'],\n\t\t\t[30603,306,'HUAYLLATI'],\n\t\t\t[30604,306,'MAMARA'],\n\t\t\t[30605,306,'MARISCAL GAMARRA'],\n\t\t\t[30606,306,'MICAELA BASTIDAS'],\n\t\t\t[30607,306,'PROGRESO'],\n\t\t\t[30608,306,'PATAYPAMPA'],\n\t\t\t[30609,306,'SAN ANTONIO'],\n\t\t\t[30610,306,'TURPAY'],\n\t\t\t[30611,306,'VILCABAMBA'],\n\t\t\t[30612,306,'VIRUNDO'],\n\t\t\t[30613,306,'SANTA ROSA'],\n\t\t\t[30614,306,'CURASCO'],\n\t\t\t[30701,307,'CHINCHEROS'],\n\t\t\t[30702,307,'ONGOY'],\n\t\t\t[30703,307,'OCOBAMBA'],\n\t\t\t[30704,307,'COCHARCAS'],\n\t\t\t[30705,307,'ANCO HUALLO'],\n\t\t\t[30706,307,'HUACCANA'],\n\t\t\t[30707,307,'URANMARCA'],\n\t\t\t[30708,307,'RANRACANCHA'],\n\t\t\t[40101,401,'AREQUIPA'],\n\t\t\t[40102,401,'CAYMA'],\n\t\t\t[40103,401,'CERRO COLORADO'],\n\t\t\t[40104,401,'CHARACATO'],\n\t\t\t[40105,401,'CHIGUATA'],\n\t\t\t[40106,401,'LA JOYA'],\n\t\t\t[40107,401,'MIRAFLORES'],\n\t\t\t[40108,401,'MOLLEBAYA'],\n\t\t\t[40109,401,'PAUCARPATA'],\n\t\t\t[40110,401,'POCSI'],\n\t\t\t[40111,401,'POLOBAYA'],\n\t\t\t[40112,401,'QUEQUEÑA'],\n\t\t\t[40113,401,'SABANDIA'],\n\t\t\t[40114,401,'SACHACA'],\n\t\t\t[40115,401,'SAN JUAN DE SIGUAS'],\n\t\t\t[40116,401,'SAN JUAN DE TARUCANI'],\n\t\t\t[40117,401,'SANTA ISABEL DE SIGUAS'],\n\t\t\t[40118,401,'SANTA RITA DE SIHUAS'],\n\t\t\t[40119,401,'SOCABAYA'],\n\t\t\t[40120,401,'TIABAYA'],\n\t\t\t[40121,401,'UCHUMAYO'],\n\t\t\t[40122,401,'VITOR'],\n\t\t\t[40123,401,'YANAHUARA'],\n\t\t\t[40124,401,'YARABAMBA'],\n\t\t\t[40125,401,'YURA'],\n\t\t\t[40126,401,'MARIANO MELGAR'],\n\t\t\t[40127,401,'JACOBO HUNTER'],\n\t\t\t[40128,401,'ALTO SELVA ALEGRE'],\n\t\t\t[40129,401,'JOSE LUIS BUSTAMANTE Y RIVERO'],\n\t\t\t[40201,402,'CHIVAY'],\n\t\t\t[40202,402,'ACHOMA'],\n\t\t\t[40203,402,'CABANACONDE'],\n\t\t\t[40204,402,'CAYLLOMA'],\n\t\t\t[40205,402,'CALLALLI'],\n\t\t\t[40206,402,'COPORAQUE'],\n\t\t\t[40207,402,'HUAMBO'],\n\t\t\t[40208,402,'HUANCA'],\n\t\t\t[40209,402,'ICHUPAMPA'],\n\t\t\t[40210,402,'LARI'],\n\t\t\t[40211,402,'LLUTA'],\n\t\t\t[40212,402,'MACA'],\n\t\t\t[40213,402,'MADRIGAL'],\n\t\t\t[40214,402,'SAN ANTONIO DE CHUCA'],\n\t\t\t[40215,402,'SIBAYO'],\n\t\t\t[40216,402,'TAPAY'],\n\t\t\t[40217,402,'TISCO'],\n\t\t\t[40218,402,'TUTI'],\n\t\t\t[40219,402,'YANQUE'],\n\t\t\t[40220,402,'MAJES'],\n\t\t\t[40301,403,'CAMANA'],\n\t\t\t[40302,403,'JOSE MARIA QUIMPER'],\n\t\t\t[40303,403,'MARIANO NICOLAS VALCARCEL'],\n\t\t\t[40304,403,'MARISCAL CACERES'],\n\t\t\t[40305,403,'NICOLAS DE PIEROLA'],\n\t\t\t[40306,403,'OCOÑA'],\n\t\t\t[40307,403,'QUILCA'],\n\t\t\t[40308,403,'SAMUEL PASTOR'],\n\t\t\t[40401,404,'CARAVELI'],\n\t\t\t[40402,404,'ACARI'],\n\t\t\t[40403,404,'ATICO'],\n\t\t\t[40404,404,'ATIQUIPA'],\n\t\t\t[40405,404,'BELLA UNION'],\n\t\t\t[40406,404,'CAHUACHO'],\n\t\t\t[40407,404,'CHALA'],\n\t\t\t[40408,404,'CHAPARRA'],\n\t\t\t[40409,404,'HUANUHUANU'],\n\t\t\t[40410,404,'JAQUI'],\n\t\t\t[40411,404,'LOMAS'],\n\t\t\t[40412,404,'QUICACHA'],\n\t\t\t[40413,404,'YAUCA'],\n\t\t\t[40501,405,'APLAO'],\n\t\t\t[40502,405,'ANDAGUA'],\n\t\t\t[40503,405,'AYO'],\n\t\t\t[40504,405,'CHACHAS'],\n\t\t\t[40505,405,'CHILCAYMARCA'],\n\t\t\t[40506,405,'CHOCO'],\n\t\t\t[40507,405,'HUANCARQUI'],\n\t\t\t[40508,405,'MACHAGUAY'],\n\t\t\t[40509,405,'ORCOPAMPA'],\n\t\t\t[40510,405,'PAMPACOLCA'],\n\t\t\t[40511,405,'TIPAN'],\n\t\t\t[40512,405,'URACA'],\n\t\t\t[40513,405,'UÑON'],\n\t\t\t[40514,405,'VIRACO'],\n\t\t\t[40601,406,'CHUQUIBAMBA'],\n\t\t\t[40602,406,'ANDARAY'],\n\t\t\t[40603,406,'CAYARANI'],\n\t\t\t[40604,406,'CHICHAS'],\n\t\t\t[40605,406,'IRAY'],\n\t\t\t[40606,406,'SALAMANCA'],\n\t\t\t[40607,406,'YANAQUIHUA'],\n\t\t\t[40608,406,'RIO GRANDE'],\n\t\t\t[40701,407,'MOLLENDO'],\n\t\t\t[40702,407,'COCACHACRA'],\n\t\t\t[40703,407,'DEAN VALDIVIA'],\n\t\t\t[40704,407,'ISLAY'],\n\t\t\t[40705,407,'MEJIA'],\n\t\t\t[40706,407,'PUNTA DE BOMBON'],\n\t\t\t[40801,408,'COTAHUASI'],\n\t\t\t[40802,408,'ALCA'],\n\t\t\t[40803,408,'CHARCANA'],\n\t\t\t[40804,408,'HUAYNACOTAS'],\n\t\t\t[40805,408,'PAMPAMARCA'],\n\t\t\t[40806,408,'PUYCA'],\n\t\t\t[40807,408,'QUECHUALLA'],\n\t\t\t[40808,408,'SAYLA'],\n\t\t\t[40809,408,'TAURIA'],\n\t\t\t[40810,408,'TOMEPAMPA'],\n\t\t\t[40811,408,'TORO'],\n\t\t\t[50101,501,'AYACUCHO'],\n\t\t\t[50102,501,'ACOS VINCHOS'],\n\t\t\t[50103,501,'CARMEN ALTO'],\n\t\t\t[50104,501,'CHIARA'],\n\t\t\t[50105,501,'QUINUA'],\n\t\t\t[50106,501,'SAN JOSE DE TICLLAS'],\n\t\t\t[50107,501,'SAN JUAN BAUTISTA'],\n\t\t\t[50108,501,'SANTIAGO DE PISCHA'],\n\t\t\t[50109,501,'VINCHOS'],\n\t\t\t[50110,501,'TAMBILLO'],\n\t\t\t[50111,501,'ACOCRO'],\n\t\t\t[50112,501,'SOCOS'],\n\t\t\t[50113,501,'OCROS'],\n\t\t\t[50114,501,'PACAYCASA'],\n\t\t\t[50115,501,'JESUS NAZARENO'],\n\t\t\t[50201,502,'CANGALLO'],\n\t\t\t[50204,502,'CHUSCHI'],\n\t\t\t[50206,502,'LOS MOROCHUCOS'],\n\t\t\t[50207,502,'PARAS'],\n\t\t\t[50208,502,'TOTOS'],\n\t\t\t[50211,502,'MARIA PARADO DE BELLIDO'],\n\t\t\t[50301,503,'HUANTA'],\n\t\t\t[50302,503,'AYAHUANCO'],\n\t\t\t[50303,503,'HUAMANGUILLA'],\n\t\t\t[50304,503,'IGUAIN'],\n\t\t\t[50305,503,'LURICOCHA'],\n\t\t\t[50307,503,'SANTILLANA'],\n\t\t\t[50308,503,'SIVIA'],\n\t\t\t[50309,503,'LLOCHEGUA'],\n\t\t\t[50401,504,'SAN MIGUEL'],\n\t\t\t[50402,504,'ANCO'],\n\t\t\t[50403,504,'AYNA'],\n\t\t\t[50404,504,'CHILCAS'],\n\t\t\t[50405,504,'CHUNGUI'],\n\t\t\t[50406,504,'TAMBO'],\n\t\t\t[50407,504,'LUIS CARRANZA'],\n\t\t\t[50408,504,'SANTA ROSA'],\n\t\t\t[50501,505,'PUQUIO'],\n\t\t\t[50502,505,'AUCARA'],\n\t\t\t[50503,505,'CABANA'],\n\t\t\t[50504,505,'CARMEN SALCEDO'],\n\t\t\t[50506,505,'CHAVIÑA'],\n\t\t\t[50508,505,'CHIPAO'],\n\t\t\t[50510,505,'HUAC-HUAS'],\n\t\t\t[50511,505,'LARAMATE'],\n\t\t\t[50512,505,'LEONCIO PRADO'],\n\t\t\t[50513,505,'LUCANAS'],\n\t\t\t[50514,505,'LLAUTA'],\n\t\t\t[50516,505,'OCAÑA'],\n\t\t\t[50517,505,'OTOCA'],\n\t\t\t[50520,505,'SANCOS'],\n\t\t\t[50521,505,'SAN JUAN'],\n\t\t\t[50522,505,'SAN PEDRO'],\n\t\t\t[50524,505,'SANTA ANA DE HUAYCAHUACHO'],\n\t\t\t[50525,505,'SANTA LUCIA'],\n\t\t\t[50529,505,'SAISA'],\n\t\t\t[50531,505,'SAN PEDRO DE PALCO'],\n\t\t\t[50532,505,'SAN CRISTOBAL'],\n\t\t\t[50601,506,'CORACORA'],\n\t\t\t[50604,506,'CORONEL CASTAÑEDA'],\n\t\t\t[50605,506,'CHUMPI'],\n\t\t\t[50608,506,'PACAPAUSA'],\n\t\t\t[50611,506,'PULLO'],\n\t\t\t[50612,506,'PUYUSCA'],\n\t\t\t[50615,506,'SAN FRANCISCO DE RAVACAYCO'],\n\t\t\t[50616,506,'UPAHUACHO'],\n\t\t\t[50701,507,'HUANCAPI'],\n\t\t\t[50702,507,'ALCAMENCA'],\n\t\t\t[50703,507,'APONGO'],\n\t\t\t[50704,507,'CANARIA'],\n\t\t\t[50706,507,'CAYARA'],\n\t\t\t[50707,507,'COLCA'],\n\t\t\t[50708,507,'HUAYA'],\n\t\t\t[50709,507,'HUAMANQUIQUIA'],\n\t\t\t[50710,507,'HUANCARAYLLA'],\n\t\t\t[50713,507,'SARHUA'],\n\t\t\t[50714,507,'VILCANCHOS'],\n\t\t\t[50715,507,'ASQUIPATA'],\n\t\t\t[50801,508,'SANCOS'],\n\t\t\t[50802,508,'SACSAMARCA'],\n\t\t\t[50803,508,'SANTIAGO DE LUCANAMARCA'],\n\t\t\t[50804,508,'CARAPO'],\n\t\t\t[50901,509,'VILCAS HUAMAN'],\n\t\t\t[50902,509,'VISCHONGO'],\n\t\t\t[50903,509,'ACCOMARCA'],\n\t\t\t[50904,509,'CARHUANCA'],\n\t\t\t[50905,509,'CONCEPCION'],\n\t\t\t[50906,509,'HUAMBALPA'],\n\t\t\t[50907,509,'SAURAMA'],\n\t\t\t[50908,509,'INDEPENDENCIA'],\n\t\t\t[51001,510,'PAUSA'],\n\t\t\t[51002,510,'COLTA'],\n\t\t\t[51003,510,'CORCULLA'],\n\t\t\t[51004,510,'LAMPA'],\n\t\t\t[51005,510,'MARCABAMBA'],\n\t\t\t[51006,510,'OYOLO'],\n\t\t\t[51007,510,'PARARCA'],\n\t\t\t[51008,510,'SAN JAVIER DE ALPABAMBA'],\n\t\t\t[51009,510,'SAN JOSE DE USHUA'],\n\t\t\t[51010,510,'SARA SARA'],\n\t\t\t[51101,511,'QUEROBAMBA'],\n\t\t\t[51102,511,'BELEN'],\n\t\t\t[51103,511,'CHALCOS'],\n\t\t\t[51104,511,'SAN SALVADOR DE QUIJE'],\n\t\t\t[51105,511,'PAICO'],\n\t\t\t[51106,511,'SANTIAGO DE PAUCARAY'],\n\t\t\t[51107,511,'SAN PEDRO DE LARCAY'],\n\t\t\t[51108,511,'SORAS'],\n\t\t\t[51109,511,'HUACAÑA'],\n\t\t\t[51110,511,'CHILCAYOC'],\n\t\t\t[51111,511,'MORCOLLA'],\n\t\t\t[60101,601,'CAJAMARCA'],\n\t\t\t[60102,601,'ASUNCION'],\n\t\t\t[60103,601,'COSPAN'],\n\t\t\t[60104,601,'CHETILLA'],\n\t\t\t[60105,601,'ENCAÑADA'],\n\t\t\t[60106,601,'JESUS'],\n\t\t\t[60107,601,'LOS BAÑOS DEL INCA'],\n\t\t\t[60108,601,'LLACANORA'],\n\t\t\t[60109,601,'MAGDALENA'],\n\t\t\t[60110,601,'MATARA'],\n\t\t\t[60111,601,'NAMORA'],\n\t\t\t[60112,601,'SAN JUAN'],\n\t\t\t[60201,602,'CAJABAMBA'],\n\t\t\t[60202,602,'CACHACHI'],\n\t\t\t[60203,602,'CONDEBAMBA'],\n\t\t\t[60205,602,'SITACOCHA'],\n\t\t\t[60301,603,'CELENDIN'],\n\t\t\t[60302,603,'CORTEGANA'],\n\t\t\t[60303,603,'CHUMUCH'],\n\t\t\t[60304,603,'HUASMIN'],\n\t\t\t[60305,603,'JORGE CHAVEZ'],\n\t\t\t[60306,603,'JOSE GALVEZ'],\n\t\t\t[60307,603,'MIGUEL IGLESIAS'],\n\t\t\t[60308,603,'OXAMARCA'],\n\t\t\t[60309,603,'SOROCHUCO'],\n\t\t\t[60310,603,'SUCRE'],\n\t\t\t[60311,603,'UTCO'],\n\t\t\t[60312,603,'LA LIBERTAD DE PALLAN'],\n\t\t\t[60401,604,'CONTUMAZA'],\n\t\t\t[60403,604,'CHILETE'],\n\t\t\t[60404,604,'GUZMANGO'],\n\t\t\t[60405,604,'SAN BENITO'],\n\t\t\t[60406,604,'CUPISNIQUE'],\n\t\t\t[60407,604,'TANTARICA'],\n\t\t\t[60408,604,'YONAN'],\n\t\t\t[60409,604,'SANTA CRUZ DE TOLED'],\n\t\t\t[60501,605,'CUTERVO'],\n\t\t\t[60502,605,'CALLAYUC'],\n\t\t\t[60503,605,'CUJILLO'],\n\t\t\t[60504,605,'CHOROS'],\n\t\t\t[60505,605,'LA RAMADA'],\n\t\t\t[60506,605,'PIMPINGOS'],\n\t\t\t[60507,605,'QUEROCOTILLO'],\n\t\t\t[60508,605,'SAN ANDRES DE CUTERVO'],\n\t\t\t[60509,605,'SAN JUAN DE CUTERVO'],\n\t\t\t[60510,605,'SAN LUIS DE LUCMA'],\n\t\t\t[60511,605,'SANTA CRUZ'],\n\t\t\t[60512,605,'SANTO DOMINGO DE LA CAPILLA'],\n\t\t\t[60513,605,'SANTO TOMAS'],\n\t\t\t[60514,605,'SOCOTA'],\n\t\t\t[60515,605,'TORIBIO CASANOVA'],\n\t\t\t[60601,606,'CHOTA'],\n\t\t\t[60602,606,'ANGUIA'],\n\t\t\t[60603,606,'COCHABAMBA'],\n\t\t\t[60604,606,'CONCHAN'],\n\t\t\t[60605,606,'CHADIN'],\n\t\t\t[60606,606,'CHIGUIRIP'],\n\t\t\t[60607,606,'CHIMBAN'],\n\t\t\t[60608,606,'HUAMBOS'],\n\t\t\t[60609,606,'LAJAS'],\n\t\t\t[60610,606,'LLAMA'],\n\t\t\t[60611,606,'MIRACOSTA'],\n\t\t\t[60612,606,'PACCHA'],\n\t\t\t[60613,606,'PION'],\n\t\t\t[60614,606,'QUEROCOTO'],\n\t\t\t[60615,606,'TACABAMBA'],\n\t\t\t[60616,606,'TOCMOCHE'],\n\t\t\t[60617,606,'SAN JUAN DE LICUPIS'],\n\t\t\t[60618,606,'CHOROPAMPA'],\n\t\t\t[60619,606,'CHALAMARCA'],\n\t\t\t[60701,607,'BAMBAMARCA'],\n\t\t\t[60702,607,'CHUGUR'],\n\t\t\t[60703,607,'HUALGAYOC'],\n\t\t\t[60801,608,'JAEN'],\n\t\t\t[60802,608,'BELLAVISTA'],\n\t\t\t[60803,608,'COLASAY'],\n\t\t\t[60804,608,'CHONTALI'],\n\t\t\t[60805,608,'POMAHUACA'],\n\t\t\t[60806,608,'PUCARA'],\n\t\t\t[60807,608,'SALLIQUE'],\n\t\t\t[60808,608,'SAN FELIPE'],\n\t\t\t[60809,608,'SAN JOSE DEL ALTO'],\n\t\t\t[60810,608,'SANTA ROSA'],\n\t\t\t[60811,608,'LAS PIRIAS'],\n\t\t\t[60812,608,'HUABAL'],\n\t\t\t[60901,609,'SANTA CRUZ'],\n\t\t\t[60902,609,'CATACHE'],\n\t\t\t[60903,609,'CHANCAYBAÑOS'],\n\t\t\t[60904,609,'LA ESPERANZA'],\n\t\t\t[60905,609,'NINABAMBA'],\n\t\t\t[60906,609,'PULAN'],\n\t\t\t[60907,609,'SEXI'],\n\t\t\t[60908,609,'UTICYACU'],\n\t\t\t[60909,609,'YAUYUCAN'],\n\t\t\t[60910,609,'ANDABAMBA'],\n\t\t\t[60911,609,'SAUCEPAMPA'],\n\t\t\t[61001,610,'SAN MIGUEL'],\n\t\t\t[61002,610,'CALQUIS'],\n\t\t\t[61003,610,'LA FLORIDA'],\n\t\t\t[61004,610,'LLAPA'],\n\t\t\t[61005,610,'NANCHOC'],\n\t\t\t[61006,610,'NIEPOS'],\n\t\t\t[61007,610,'SAN GREGORIO'],\n\t\t\t[61008,610,'SAN SILVESTRE DE COCHAN'],\n\t\t\t[61009,610,'EL PRADO'],\n\t\t\t[61010,610,'UNION AGUA BLANCA'],\n\t\t\t[61011,610,'TONGOD'],\n\t\t\t[61012,610,'CATILLUC'],\n\t\t\t[61013,610,'BOLIVAR'],\n\t\t\t[61101,611,'SAN IGNACIO'],\n\t\t\t[61102,611,'CHIRINOS'],\n\t\t\t[61103,611,'HUARANGO'],\n\t\t\t[61104,611,'NAMBALLE'],\n\t\t\t[61105,611,'LA COIPA'],\n\t\t\t[61106,611,'SAN JOSE DE LOURDES'],\n\t\t\t[61107,611,'TABACONAS'],\n\t\t\t[61201,612,'PEDRO GALVEZ'],\n\t\t\t[61202,612,'ICHOCAN'],\n\t\t\t[61203,612,'GREGORIO PITA'],\n\t\t\t[61204,612,'JOSE MANUEL QUIROZ'],\n\t\t\t[61205,612,'EDUARDO VILLANUEVA'],\n\t\t\t[61206,612,'JOSE SABOGAL'],\n\t\t\t[61207,612,'CHANCAY'],\n\t\t\t[61301,613,'SAN PABLO'],\n\t\t\t[61302,613,'SAN BERNARDINO'],\n\t\t\t[61303,613,'SAN LUIS'],\n\t\t\t[61304,613,'TUMBADEN'],\n\t\t\t[70101,701,'CUSCO'],\n\t\t\t[70102,701,'CCORCA'],\n\t\t\t[70103,701,'POROY'],\n\t\t\t[70104,701,'SAN JERONIMO'],\n\t\t\t[70105,701,'SAN SEBASTIAN'],\n\t\t\t[70106,701,'SANTIAGO'],\n\t\t\t[70107,701,'SAYLLA'],\n\t\t\t[70108,701,'WANCHAQ'],\n\t\t\t[70201,702,'ACOMAYO'],\n\t\t\t[70202,702,'ACOPIA'],\n\t\t\t[70203,702,'ACOS'],\n\t\t\t[70204,702,'POMACANCHI'],\n\t\t\t[70205,702,'RONDOCAN'],\n\t\t\t[70206,702,'SANGARARA'],\n\t\t\t[70207,702,'MOSOC LLACTA'],\n\t\t\t[70301,703,'ANTA'],\n\t\t\t[70302,703,'CHINCHAYPUJIO'],\n\t\t\t[70303,703,'HUAROCONDO'],\n\t\t\t[70304,703,'LIMATAMBO'],\n\t\t\t[70305,703,'MOLLEPATA'],\n\t\t\t[70306,703,'PUCYURA'],\n\t\t\t[70307,703,'ZURITE'],\n\t\t\t[70308,703,'CACHIMAYO'],\n\t\t\t[70309,703,'ANCAHUASI'],\n\t\t\t[70401,704,'CALCA'],\n\t\t\t[70402,704,'COYA'],\n\t\t\t[70403,704,'LAMAY'],\n\t\t\t[70404,704,'LARES'],\n\t\t\t[70405,704,'PISAC'],\n\t\t\t[70406,704,'SAN SALVADOR'],\n\t\t\t[70407,704,'TARAY'],\n\t\t\t[70408,704,'YANATILE'],\n\t\t\t[70501,705,'YANAOCA'],\n\t\t\t[70502,705,'CHECCA'],\n\t\t\t[70503,705,'KUNTURKANKI'],\n\t\t\t[70504,705,'LANGUI'],\n\t\t\t[70505,705,'LAYO'],\n\t\t\t[70506,705,'PAMPAMARCA'],\n\t\t\t[70507,705,'QUEHUE'],\n\t\t\t[70508,705,'TUPAC AMARU'],\n\t\t\t[70601,706,'SICUANI'],\n\t\t\t[70602,706,'COMBAPATA'],\n\t\t\t[70603,706,'CHECACUPE'],\n\t\t\t[70604,706,'MARANGANI'],\n\t\t\t[70605,706,'PITUMARCA'],\n\t\t\t[70606,706,'SAN PABLO'],\n\t\t\t[70607,706,'SAN PEDRO'],\n\t\t\t[70608,706,'TINTA'],\n\t\t\t[70701,707,'SANTO TOMAS'],\n\t\t\t[70702,707,'CAPACMARCA'],\n\t\t\t[70703,707,'COLQUEMARCA'],\n\t\t\t[70704,707,'CHAMACA'],\n\t\t\t[70705,707,'LIVITACA'],\n\t\t\t[70706,707,'LLUSCO'],\n\t\t\t[70707,707,'QUIÑOTA'],\n\t\t\t[70708,707,'VELILLE'],\n\t\t\t[70801,708,'ESPINAR'],\n\t\t\t[70802,708,'CONDOROMA'],\n\t\t\t[70803,708,'COPORAQUE'],\n\t\t\t[70804,708,'OCCORURO'],\n\t\t\t[70805,708,'PALLPATA'],\n\t\t\t[70806,708,'PICHIGUA'],\n\t\t\t[70807,708,'SUYCKUTAMBO'],\n\t\t\t[70808,708,'ALTO PICHIGUA'],\n\t\t\t[70901,709,'SANTA ANA'],\n\t\t\t[70902,709,'ECHARATI'],\n\t\t\t[70903,709,'HUAYOPATA'],\n\t\t\t[70904,709,'MARANURA'],\n\t\t\t[70905,709,'OCOBAMBA'],\n\t\t\t[70906,709,'SANTA TERESA'],\n\t\t\t[70907,709,'VILCABAMBA'],\n\t\t\t[70908,709,'QUELLOUNO'],\n\t\t\t[70909,709,'KIMBIRI'],\n\t\t\t[70910,709,'PICHARI'],\n\t\t\t[71001,710,'PARURO'],\n\t\t\t[71002,710,'ACCHA'],\n\t\t\t[71003,710,'CCAPI'],\n\t\t\t[71004,710,'COLCHA'],\n\t\t\t[71005,710,'HUANOQUITE'],\n\t\t\t[71006,710,'OMACHA'],\n\t\t\t[71007,710,'YAURISQUE'],\n\t\t\t[71008,710,'PACCARITAMBO'],\n\t\t\t[71009,710,'PILLPINTO'],\n\t\t\t[71101,711,'PAUCARTAMBO'],\n\t\t\t[71102,711,'CAICAY'],\n\t\t\t[71103,711,'COLQUEPATA'],\n\t\t\t[71104,711,'CHALLABAMBA'],\n\t\t\t[71105,711,'KOSÑIPATA'],\n\t\t\t[71106,711,'HUANCARANI'],\n\t\t\t[71201,712,'URCOS'],\n\t\t\t[71202,712,'ANDAHUAYLILLAS'],\n\t\t\t[71203,712,'CAMANTI'],\n\t\t\t[71204,712,'CCARHUAYO'],\n\t\t\t[71205,712,'CCATCA'],\n\t\t\t[71206,712,'CUSIPATA'],\n\t\t\t[71207,712,'HUARO'],\n\t\t\t[71208,712,'LUCRE'],\n\t\t\t[71209,712,'MARCAPATA'],\n\t\t\t[71210,712,'OCONGATE'],\n\t\t\t[71211,712,'OROPESA'],\n\t\t\t[71212,712,'QUIQUIJANA'],\n\t\t\t[71301,713,'URUBAMBA'],\n\t\t\t[71302,713,'CHINCHERO'],\n\t\t\t[71303,713,'HUAYLLABAMBA'],\n\t\t\t[71304,713,'MACHUPICCHU'],\n\t\t\t[71305,713,'MARAS'],\n\t\t\t[71306,713,'OLLANTAYTAMBO'],\n\t\t\t[71307,713,'YUCAY'],\n\t\t\t[80101,801,'HUANCAVELICA'],\n\t\t\t[80102,801,'ACOBAMBILLA'],\n\t\t\t[80103,801,'ACORIA'],\n\t\t\t[80104,801,'CONAYCA'],\n\t\t\t[80105,801,'CUENCA'],\n\t\t\t[80106,801,'HUACHOCOLPA'],\n\t\t\t[80108,801,'HUAYLLAHUARA'],\n\t\t\t[80109,801,'IZCUCHACA'],\n\t\t\t[80110,801,'LARIA'],\n\t\t\t[80111,801,'MANTA'],\n\t\t\t[80112,801,'MARISCAL CACERES'],\n\t\t\t[80113,801,'MOYA'],\n\t\t\t[80114,801,'NUEVO OCCORO'],\n\t\t\t[80115,801,'PALCA'],\n\t\t\t[80116,801,'PILCHACA'],\n\t\t\t[80117,801,'VILCA'],\n\t\t\t[80118,801,'YAULI'],\n\t\t\t[80119,801,'ASCENSION'],\n\t\t\t[80120,801,'HUANDO'],\n\t\t\t[80201,802,'ACOBAMBA'],\n\t\t\t[80202,802,'ANTA'],\n\t\t\t[80203,802,'ANDABAMBA'],\n\t\t\t[80204,802,'CAJA'],\n\t\t\t[80205,802,'MARCAS'],\n\t\t\t[80206,802,'PAUCARA'],\n\t\t\t[80207,802,'POMACOCHA'],\n\t\t\t[80208,802,'ROSARIO'],\n\t\t\t[80301,803,'LIRCAY'],\n\t\t\t[80302,803,'ANCHONGA'],\n\t\t\t[80303,803,'CALLANMARCA'],\n\t\t\t[80304,803,'CONGALLA'],\n\t\t\t[80305,803,'CHINCHO'],\n\t\t\t[80306,803,'HUALLAY-GRANDE'],\n\t\t\t[80307,803,'HUANCA-HUANCA'],\n\t\t\t[80308,803,'JULCAMARCA'],\n\t\t\t[80309,803,'SAN ANTONIO DE ANTAPARCO'],\n\t\t\t[80310,803,'SANTO TOMAS DE PATA'],\n\t\t\t[80311,803,'SECCLLA'],\n\t\t\t[80312,803,'CCOCHACCASA'],\n\t\t\t[80401,804,'CASTROVIRREYNA'],\n\t\t\t[80402,804,'ARMA'],\n\t\t\t[80403,804,'AURAHUA'],\n\t\t\t[80405,804,'CAPILLAS'],\n\t\t\t[80406,804,'COCAS'],\n\t\t\t[80408,804,'CHUPAMARCA'],\n\t\t\t[80409,804,'HUACHOS'],\n\t\t\t[80410,804,'HUAMATAMBO'],\n\t\t\t[80414,804,'MOLLEPAMPA'],\n\t\t\t[80422,804,'SAN JUAN'],\n\t\t\t[80427,804,'TANTARA'],\n\t\t\t[80428,804,'TICRAPO'],\n\t\t\t[80429,804,'SANTA ANA'],\n\t\t\t[80501,805,'PAMPAS'],\n\t\t\t[80502,805,'ACOSTAMBO'],\n\t\t\t[80503,805,'ACRAQUIA'],\n\t\t\t[80504,805,'AHUAYCHA'],\n\t\t\t[80506,805,'COLCABAMBA'],\n\t\t\t[80509,805,'DANIEL HERNANDEZ'],\n\t\t\t[80511,805,'HUACHOCOLPA'],\n\t\t\t[80512,805,'HUARIBAMBA'],\n\t\t\t[80515,805,'ÑAHUIMPUQUIO'],\n\t\t\t[80517,805,'PAZOS'],\n\t\t\t[80518,805,'QUISHUAR'],\n\t\t\t[80519,805,'SALCABAMBA'],\n\t\t\t[80520,805,'SAN MARCOS DE ROCCHAC'],\n\t\t\t[80523,805,'SURCABAMBA'],\n\t\t\t[80525,805,'TINTAY PUNCU'],\n\t\t\t[80526,805,'SALCAHUASI'],\n\t\t\t[80601,806,'AYAVI'],\n\t\t\t[80602,806,'CORDOVA'],\n\t\t\t[80603,806,'HUAYACUNDO ARMA'],\n\t\t\t[80604,806,'HUAYTARA'],\n\t\t\t[80605,806,'LARAMARCA'],\n\t\t\t[80606,806,'OCOYO'],\n\t\t\t[80607,806,'PILPICHACA'],\n\t\t\t[80608,806,'QUERCO'],\n\t\t\t[80609,806,'QUITO ARMA'],\n\t\t\t[80610,806,'SAN ANTONIO DE CUSICANCHA'],\n\t\t\t[80611,806,'SAN FRANCISCO DE SANGAYAICO'],\n\t\t\t[80612,806,'SAN ISIDRO'],\n\t\t\t[80613,806,'SANTIAGO DE CHOCORVOS'],\n\t\t\t[80614,806,'SANTIAGO DE QUIRAHUARA'],\n\t\t\t[80615,806,'SANTO DOMINGO DE CAPILLAS'],\n\t\t\t[80616,806,'TAMBO'],\n\t\t\t[80701,807,'CHURCAMPA'],\n\t\t\t[80702,807,'ANCO'],\n\t\t\t[80703,807,'CHINCHIHUASI'],\n\t\t\t[80704,807,'EL CARMEN'],\n\t\t\t[80705,807,'LA MERCED'],\n\t\t\t[80706,807,'LOCROJA'],\n\t\t\t[80707,807,'PAUCARBAMBA'],\n\t\t\t[80708,807,'SAN MIGUEL DE MAYOCC'],\n\t\t\t[80709,807,'SAN PEDRO DE CORIS'],\n\t\t\t[80710,807,'PACHAMARCA'],\n\t\t\t[90101,901,'HUANUCO'],\n\t\t\t[90102,901,'CHINCHAO'],\n\t\t\t[90103,901,'CHURUBAMBA'],\n\t\t\t[90104,901,'MARGOS'],\n\t\t\t[90105,901,'QUISQUI'],\n\t\t\t[90106,901,'SAN FRANCISCO DE CAYRAN'],\n\t\t\t[90107,901,'SAN PEDRO DE CHAULAN'],\n\t\t\t[90108,901,'SANTA MARIA DEL VALLE'],\n\t\t\t[90109,901,'YARUMAYO'],\n\t\t\t[90110,901,'AMARILIS'],\n\t\t\t[90111,901,'PILLCO MARCA'],\n\t\t\t[90201,902,'AMBO'],\n\t\t\t[90202,902,'CAYNA'],\n\t\t\t[90203,902,'COLPAS'],\n\t\t\t[90204,902,'CONCHAMARCA'],\n\t\t\t[90205,902,'HUACAR'],\n\t\t\t[90206,902,'SAN FRANCISCO'],\n\t\t\t[90207,902,'SAN RAFAEL'],\n\t\t\t[90208,902,'TOMAY-KICHWA'],\n\t\t\t[90301,903,'LA UNION'],\n\t\t\t[90307,903,'CHUQUIS'],\n\t\t\t[90312,903,'MARIAS'],\n\t\t\t[90314,903,'PACHAS'],\n\t\t\t[90316,903,'QUIVILLA'],\n\t\t\t[90317,903,'RIPAN'],\n\t\t\t[90321,903,'SHUNQUI'],\n\t\t\t[90322,903,'SILLAPATA'],\n\t\t\t[90323,903,'YANAS'],\n\t\t\t[90401,904,'LLATA'],\n\t\t\t[90402,904,'ARANCAY'],\n\t\t\t[90403,904,'CHAVIN DE PARIARCA'],\n\t\t\t[90404,904,'JACAS GRANDE'],\n\t\t\t[90405,904,'JIRCAN'],\n\t\t\t[90406,904,'MIRAFLORES'],\n\t\t\t[90407,904,'MONZON'],\n\t\t\t[90408,904,'PUNCHAO'],\n\t\t\t[90409,904,'PUÑOS'],\n\t\t\t[90410,904,'SINGA'],\n\t\t\t[90411,904,'TANTAMAYO'],\n\t\t\t[90501,905,'HUACRACHUCO'],\n\t\t\t[90502,905,'CHOLON'],\n\t\t\t[90505,905,'SAN BUENAVENTURA'],\n\t\t\t[90601,906,'RUPA-RUPA'],\n\t\t\t[90602,906,'DANIEL ALOMIA ROBLES'],\n\t\t\t[90603,906,'HERMILIO VALDIZAN'],\n\t\t\t[90604,906,'LUYANDO'],\n\t\t\t[90605,906,'MARIANO DAMASO BERAUN'],\n\t\t\t[90606,906,'JOSE CRESPO Y CASTILLO'],\n\t\t\t[90701,907,'PANAO'],\n\t\t\t[90702,907,'CHAGLLA'],\n\t\t\t[90704,907,'MOLINO'],\n\t\t\t[90706,907,'UMARI'],\n\t\t\t[90801,908,'HONORIA'],\n\t\t\t[90802,908,'PUERTO INCA'],\n\t\t\t[90803,908,'CODO DEL POZUZO'],\n\t\t\t[90804,908,'TOURNAVISTA'],\n\t\t\t[90805,908,'YUYAPICHIS'],\n\t\t\t[90901,909,'HUACAYBAMBA'],\n\t\t\t[90902,909,'PINRA'],\n\t\t\t[90903,909,'CANCHABAMBA'],\n\t\t\t[90904,909,'COCHABAMBA'],\n\t\t\t[91001,910,'JESUS'],\n\t\t\t[91002,910,'BAÑOS'],\n\t\t\t[91003,910,'SAN FRANCISCO DE ASIS'],\n\t\t\t[91004,910,'QUEROPALCA'],\n\t\t\t[91005,910,'SAN MIGUEL DE CAURI'],\n\t\t\t[91006,910,'RONDOS'],\n\t\t\t[91007,910,'JIVIA'],\n\t\t\t[91101,911,'CHAVINILLO'],\n\t\t\t[91102,911,'APARICIO POMARES'],\n\t\t\t[91103,911,'CAHUAC'],\n\t\t\t[91104,911,'CHACABAMBA'],\n\t\t\t[91105,911,'JACAS CHICO'],\n\t\t\t[91106,911,'OBAS'],\n\t\t\t[91107,911,'PAMPAMARCA'],\n\t\t\t[91108,911,'CHORAS'],\n\t\t\t[100101,1001,'ICA'],\n\t\t\t[100102,1001,'LA TINGUIÑA'],\n\t\t\t[100103,1001,'LOS AQUIJES'],\n\t\t\t[100104,1001,'PARCONA'],\n\t\t\t[100105,1001,'PUEBLO NUEVO'],\n\t\t\t[100106,1001,'SALAS'],\n\t\t\t[100107,1001,'SAN JOSE DE LOS MOLINOS'],\n\t\t\t[100108,1001,'SAN JUAN BAUTISTA'],\n\t\t\t[100109,1001,'SANTIAGO'],\n\t\t\t[100110,1001,'SUBTANJALLA'],\n\t\t\t[100111,1001,'YAUCA DEL ROSARIO'],\n\t\t\t[100112,1001,'TATE'],\n\t\t\t[100113,1001,'PACHACUTEC'],\n\t\t\t[100114,1001,'OCUCAJE'],\n\t\t\t[100201,1002,'CHINCHA ALTA'],\n\t\t\t[100202,1002,'CHAVIN'],\n\t\t\t[100203,1002,'CHINCHA BAJA'],\n\t\t\t[100204,1002,'EL CARMEN'],\n\t\t\t[100205,1002,'GROCIO PRADO'],\n\t\t\t[100206,1002,'SAN PEDRO DE HUACARPANA'],\n\t\t\t[100207,1002,'SUNAMPE'],\n\t\t\t[100208,1002,'TAMBO DE MORA'],\n\t\t\t[100209,1002,'ALTO LARAN'],\n\t\t\t[100210,1002,'PUEBLO NUEVO'],\n\t\t\t[100211,1002,'SAN JUAN DE YANAC'],\n\t\t\t[100301,1003,'NAZCA'],\n\t\t\t[100302,1003,'CHANGUILLO'],\n\t\t\t[100303,1003,'EL INGENIO'],\n\t\t\t[100304,1003,'MARCONA'],\n\t\t\t[100305,1003,'VISTA ALEGRE'],\n\t\t\t[100401,1004,'PISCO'],\n\t\t\t[100402,1004,'HUANCANO'],\n\t\t\t[100403,1004,'HUMAY'],\n\t\t\t[100404,1004,'INDEPENDENCIA'],\n\t\t\t[100405,1004,'PARACAS'],\n\t\t\t[100406,1004,'SAN ANDRES'],\n\t\t\t[100407,1004,'SAN CLEMENTE'],\n\t\t\t[100408,1004,'TUPAC AMARU INCA'],\n\t\t\t[100501,1005,'PALPA'],\n\t\t\t[100502,1005,'LLIPATA'],\n\t\t\t[100503,1005,'RIO GRANDE'],\n\t\t\t[100504,1005,'SANTA CRUZ'],\n\t\t\t[100505,1005,'TIBILLO'],\n\t\t\t[110101,1101,'HUANCAYO'],\n\t\t\t[110103,1101,'CARHUACALLANGA'],\n\t\t\t[110104,1101,'COLCA'],\n\t\t\t[110105,1101,'CULLHUAS'],\n\t\t\t[110106,1101,'CHACAPAMPA'],\n\t\t\t[110107,1101,'CHICCHE'],\n\t\t\t[110108,1101,'CHILCA'],\n\t\t\t[110109,1101,'CHONGOS ALTO'],\n\t\t\t[110112,1101,'CHUPURO'],\n\t\t\t[110113,1101,'EL TAMBO'],\n\t\t\t[110114,1101,'HUACRAPUQUIO'],\n\t\t\t[110116,1101,'HUALHUAS'],\n\t\t\t[110118,1101,'HUANCAN'],\n\t\t\t[110119,1101,'HUASICANCHA'],\n\t\t\t[110120,1101,'HUAYUCACHI'],\n\t\t\t[110121,1101,'INGENIO'],\n\t\t\t[110122,1101,'PARIAHUANCA'],\n\t\t\t[110123,1101,'PILCOMAYO'],\n\t\t\t[110124,1101,'PUCARA'],\n\t\t\t[110125,1101,'QUICHUAY'],\n\t\t\t[110126,1101,'QUILCAS'],\n\t\t\t[110127,1101,'SAN AGUSTIN'],\n\t\t\t[110128,1101,'SAN JERONIMO DE TUNAN'],\n\t\t\t[110131,1101,'SANTO DOMINGO DE ACOBAMBA'],\n\t\t\t[110132,1101,'SAÑO'],\n\t\t\t[110133,1101,'SAPALLANGA'],\n\t\t\t[110134,1101,'SICAYA'],\n\t\t\t[110136,1101,'VIQUES'],\n\t\t\t[110201,1102,'CONCEPCION'],\n\t\t\t[110202,1102,'ACO'],\n\t\t\t[110203,1102,'ANDAMARCA'],\n\t\t\t[110204,1102,'COMAS'],\n\t\t\t[110205,1102,'COCHAS'],\n\t\t\t[110206,1102,'CHAMBARA'],\n\t\t\t[110207,1102,'HEROINAS TOLEDO'],\n\t\t\t[110208,1102,'MANZANARES'],\n\t\t\t[110209,1102,'MARISCAL CASTILLA'],\n\t\t\t[110210,1102,'MATAHUASI'],\n\t\t\t[110211,1102,'MITO'],\n\t\t\t[110212,1102,'NUEVE DE JULIO'],\n\t\t\t[110213,1102,'ORCOTUNA'],\n\t\t\t[110214,1102,'SANTA ROSA DE OCOPA'],\n\t\t\t[110215,1102,'SAN JOSE DE QUERO'],\n\t\t\t[110301,1103,'JAUJA'],\n\t\t\t[110302,1103,'ACOLLA'],\n\t\t\t[110303,1103,'APATA'],\n\t\t\t[110304,1103,'ATAURA'],\n\t\t\t[110305,1103,'CANCHAYLLO'],\n\t\t\t[110306,1103,'EL MANTARO'],\n\t\t\t[110307,1103,'HUAMALI'],\n\t\t\t[110308,1103,'HUARIPAMPA'],\n\t\t\t[110309,1103,'HUERTAS'],\n\t\t\t[110310,1103,'JANJAILLO'],\n\t\t\t[110311,1103,'JULCAN'],\n\t\t\t[110312,1103,'LEONOR ORDOÑEZ'],\n\t\t\t[110313,1103,'LLOCLLAPAMPA'],\n\t\t\t[110314,1103,'MARCO'],\n\t\t\t[110315,1103,'MASMA'],\n\t\t\t[110316,1103,'MOLINOS'],\n\t\t\t[110317,1103,'MONOBAMBA'],\n\t\t\t[110318,1103,'MUQUI'],\n\t\t\t[110319,1103,'MUQUIYAUYO'],\n\t\t\t[110320,1103,'PACA'],\n\t\t\t[110321,1103,'PACCHA'],\n\t\t\t[110322,1103,'PANCAN'],\n\t\t\t[110323,1103,'PARCO'],\n\t\t\t[110324,1103,'POMACANCHA'],\n\t\t\t[110325,1103,'RICRAN'],\n\t\t\t[110326,1103,'SAN LORENZO'],\n\t\t\t[110327,1103,'SAN PEDRO DE CHUNAN'],\n\t\t\t[110328,1103,'SINCOS'],\n\t\t\t[110329,1103,'TUNAN MARCA'],\n\t\t\t[110330,1103,'YAULI'],\n\t\t\t[110331,1103,'CURICACA'],\n\t\t\t[110332,1103,'MASMA CHICCHE'],\n\t\t\t[110333,1103,'SAUSA'],\n\t\t\t[110334,1103,'YAUYOS'],\n\t\t\t[110401,1104,'JUNIN'],\n\t\t\t[110402,1104,'CARHUAMAYO'],\n\t\t\t[110403,1104,'ONDORES'],\n\t\t\t[110404,1104,'ULCUMAYO'],\n\t\t\t[110501,1105,'TARMA'],\n\t\t\t[110502,1105,'ACOBAMBA'],\n\t\t\t[110503,1105,'HUARICOLCA'],\n\t\t\t[110504,1105,'HUASAHUASI'],\n\t\t\t[110505,1105,'LA UNION'],\n\t\t\t[110506,1105,'PALCA'],\n\t\t\t[110507,1105,'PALCAMAYO'],\n\t\t\t[110508,1105,'SAN PEDRO DE CAJAS'],\n\t\t\t[110509,1105,'TAPO'],\n\t\t\t[110601,1106,'LA OROYA'],\n\t\t\t[110602,1106,'CHACAPALPA'],\n\t\t\t[110603,1106,'HUAY HUAY'],\n\t\t\t[110604,1106,'MARCAPOMACOCHA'],\n\t\t\t[110605,1106,'MOROCOCHA'],\n\t\t\t[110606,1106,'PACCHA'],\n\t\t\t[110607,1106,'SANTA BARBARA DE CARHUACAYAN'],\n\t\t\t[110608,1106,'SUITUCANCHA'],\n\t\t\t[110609,1106,'YAULI'],\n\t\t\t[110610,1106,'SANTA ROSA DE SACCO'],\n\t\t\t[110701,1107,'SATIPO'],\n\t\t\t[110702,1107,'COVIRIALI'],\n\t\t\t[110703,1107,'LLAYLLA'],\n\t\t\t[110704,1107,'MAZAMARI'],\n\t\t\t[110705,1107,'PAMPA HERMOSA'],\n\t\t\t[110706,1107,'PANGOA'],\n\t\t\t[110707,1107,'RIO NEGRO'],\n\t\t\t[110708,1107,'RIO TAMBO'],\n\t\t\t[110801,1108,'CHANCHAMAYO'],\n\t\t\t[110802,1108,'SAN RAMON'],\n\t\t\t[110803,1108,'VITOC'],\n\t\t\t[110804,1108,'SAN LUIS DE SHUARO'],\n\t\t\t[110805,1108,'PICHANAQUI'],\n\t\t\t[110806,1108,'PERENE'],\n\t\t\t[110901,1109,'CHUPACA'],\n\t\t\t[110902,1109,'AHUAC'],\n\t\t\t[110903,1109,'CHONGOS BAJO'],\n\t\t\t[110904,1109,'HUACHAC'],\n\t\t\t[110905,1109,'HUAMANCACA CHICO'],\n\t\t\t[110906,1109,'SAN JUAN DE YSCOS'],\n\t\t\t[110907,1109,'SAN JUAN DE JARPA'],\n\t\t\t[110908,1109,'TRES DE DICIEMBRE'],\n\t\t\t[110909,1109,'YANACANCHA'],\n\t\t\t[120101,1201,'TRUJILLO'],\n\t\t\t[120102,1201,'HUANCHACO'],\n\t\t\t[120103,1201,'LAREDO'],\n\t\t\t[120104,1201,'MOCHE'],\n\t\t\t[120105,1201,'SALAVERRY'],\n\t\t\t[120106,1201,'SIMBAL'],\n\t\t\t[120107,1201,'VICTOR LARCO HERRERA'],\n\t\t\t[120109,1201,'POROTO'],\n\t\t\t[120110,1201,'EL PORVENIR'],\n\t\t\t[120111,1201,'LA ESPERANZA'],\n\t\t\t[120112,1201,'FLORENCIA DE MORA'],\n\t\t\t[120201,1202,'BOLIVAR'],\n\t\t\t[120202,1202,'BAMBAMARCA'],\n\t\t\t[120203,1202,'CONDORMARCA'],\n\t\t\t[120204,1202,'LONGOTEA'],\n\t\t\t[120205,1202,'UCUNCHA'],\n\t\t\t[120206,1202,'UCHUMARCA'],\n\t\t\t[120301,1203,'HUAMACHUCO'],\n\t\t\t[120302,1203,'COCHORCO'],\n\t\t\t[120303,1203,'CURGOS'],\n\t\t\t[120304,1203,'CHUGAY'],\n\t\t\t[120305,1203,'MARCABAL'],\n\t\t\t[120306,1203,'SANAGORAN'],\n\t\t\t[120307,1203,'SARIN'],\n\t\t\t[120308,1203,'SARTIBAMBA'],\n\t\t\t[120401,1204,'OTUZCO'],\n\t\t\t[120402,1204,'AGALLPAMPA'],\n\t\t\t[120403,1204,'CHARAT'],\n\t\t\t[120404,1204,'HUARANCHAL'],\n\t\t\t[120405,1204,'LA CUESTA'],\n\t\t\t[120408,1204,'PARANDAY'],\n\t\t\t[120409,1204,'SALPO'],\n\t\t\t[120410,1204,'SINSICAP'],\n\t\t\t[120411,1204,'USQUIL'],\n\t\t\t[120413,1204,'MACHE'],\n\t\t\t[120501,1205,'SAN PEDRO DE LLOC'],\n\t\t\t[120503,1205,'GUADALUPE'],\n\t\t\t[120504,1205,'JEQUETEPEQUE'],\n\t\t\t[120506,1205,'PACASMAYO'],\n\t\t\t[120508,1205,'SAN JOSE'],\n\t\t\t[120601,1206,'TAYABAMBA'],\n\t\t\t[120602,1206,'BULDIBUYO'],\n\t\t\t[120603,1206,'CHILLIA'],\n\t\t\t[120604,1206,'HUAYLILLAS'],\n\t\t\t[120605,1206,'HUANCASPATA'],\n\t\t\t[120606,1206,'HUAYO'],\n\t\t\t[120607,1206,'ONGON'],\n\t\t\t[120608,1206,'PARCOY'],\n\t\t\t[120609,1206,'PATAZ'],\n\t\t\t[120610,1206,'PIAS'],\n\t\t\t[120611,1206,'TAURIJA'],\n\t\t\t[120612,1206,'URPAY'],\n\t\t\t[120613,1206,'SANTIAGO DE CHALLAS'],\n\t\t\t[120701,1207,'SANTIAGO DE CHUCO'],\n\t\t\t[120702,1207,'CACHICADAN'],\n\t\t\t[120703,1207,'MOLLEBAMBA'],\n\t\t\t[120704,1207,'MOLLEPATA'],\n\t\t\t[120705,1207,'QUIRUVILCA'],\n\t\t\t[120706,1207,'SANTA CRUZ DE CHUCA'],\n\t\t\t[120707,1207,'SITABAMBA'],\n\t\t\t[120708,1207,'ANGASMARCA'],\n\t\t\t[120801,1208,'ASCOPE'],\n\t\t\t[120802,1208,'CHICAMA'],\n\t\t\t[120803,1208,'CHOCOPE'],\n\t\t\t[120804,1208,'SANTIAGO DE CAO'],\n\t\t\t[120805,1208,'MAGDALENA DE CAO'],\n\t\t\t[120806,1208,'PAIJAN'],\n\t\t\t[120807,1208,'RAZURI'],\n\t\t\t[120808,1208,'CASA GRANDE'],\n\t\t\t[120901,1209,'CHEPEN'],\n\t\t\t[120902,1209,'PACANGA'],\n\t\t\t[120903,1209,'PUEBLO NUEVO'],\n\t\t\t[121001,1210,'JULCAN'],\n\t\t\t[121002,1210,'CARABAMBA'],\n\t\t\t[121003,1210,'CALAMARCA'],\n\t\t\t[121004,1210,'HUASO'],\n\t\t\t[121101,1211,'CASCAS'],\n\t\t\t[121102,1211,'LUCMA'],\n\t\t\t[121103,1211,'MARMOT'],\n\t\t\t[121104,1211,'SAYAPULLO'],\n\t\t\t[121201,1212,'VIRU'],\n\t\t\t[121202,1212,'CHAO'],\n\t\t\t[121203,1212,'GUADALUPITO'],\n\t\t\t[130101,1301,'CHICLAYO'],\n\t\t\t[130102,1301,'CHONGOYAPE'],\n\t\t\t[130103,1301,'ETEN'],\n\t\t\t[130104,1301,'ETEN PUERTO'],\n\t\t\t[130105,1301,'LAGUNAS'],\n\t\t\t[130106,1301,'MONSEFU'],\n\t\t\t[130107,1301,'NUEVA ARICA'],\n\t\t\t[130108,1301,'OYOTUN'],\n\t\t\t[130109,1301,'PICSI'],\n\t\t\t[130110,1301,'PIMENTEL'],\n\t\t\t[130111,1301,'REQUE'],\n\t\t\t[130112,1301,'JOSE LEONARDO ORTIZ'],\n\t\t\t[130113,1301,'SANTA ROSA'],\n\t\t\t[130114,1301,'SAÑA'],\n\t\t\t[130115,1301,'LA VICTORIA'],\n\t\t\t[130116,1301,'CAYALTI'],\n\t\t\t[130117,1301,'PATAPO'],\n\t\t\t[130118,1301,'POMALCA'],\n\t\t\t[130119,1301,'PUCALA'],\n\t\t\t[130120,1301,'TUMAN'],\n\t\t\t[130201,1302,'FERREÑAFE'],\n\t\t\t[130202,1302,'INCAHUASI'],\n\t\t\t[130203,1302,'CAÑARIS'],\n\t\t\t[130204,1302,'PITIPO'],\n\t\t\t[130205,1302,'PUEBLO NUEVO'],\n\t\t\t[130206,1302,'MANUEL ANTONIO MESONES MURO'],\n\t\t\t[130301,1303,'LAMBAYEQUE'],\n\t\t\t[130302,1303,'CHOCHOPE'],\n\t\t\t[130303,1303,'ILLIMO'],\n\t\t\t[130304,1303,'JAYANCA'],\n\t\t\t[130305,1303,'MOCHUMI'],\n\t\t\t[130306,1303,'MORROPE'],\n\t\t\t[130307,1303,'MOTUPE'],\n\t\t\t[130308,1303,'OLMOS'],\n\t\t\t[130309,1303,'PACORA'],\n\t\t\t[130310,1303,'SALAS'],\n\t\t\t[130311,1303,'SAN JOSE'],\n\t\t\t[130312,1303,'TUCUME'],\n\t\t\t[140101,1401,'LIMA'],\n\t\t\t[140102,1401,'ANCON'],\n\t\t\t[140103,1401,'ATE'],\n\t\t\t[140104,1401,'BREÑA'],\n\t\t\t[140105,1401,'CARABAYLLO'],\n\t\t\t[140106,1401,'COMAS'],\n\t\t\t[140107,1401,'CHACLACAYO'],\n\t\t\t[140108,1401,'CHORRILLOS'],\n\t\t\t[140109,1401,'LA VICTORIA'],\n\t\t\t[140110,1401,'LA MOLINA'],\n\t\t\t[140111,1401,'LINCE'],\n\t\t\t[140112,1401,'LURIGANCHO'],\n\t\t\t[140113,1401,'LURIN'],\n\t\t\t[140114,1401,'MAGDALENA DEL MAR'],\n\t\t\t[140115,1401,'MIRAFLORES'],\n\t\t\t[140116,1401,'PACHACAMAC'],\n\t\t\t[140117,1401,'PUEBLO LIBRE'],\n\t\t\t[140118,1401,'PUCUSANA'],\n\t\t\t[140119,1401,'PUENTE PIEDRA'],\n\t\t\t[140120,1401,'PUNTA HERMOSA'],\n\t\t\t[140121,1401,'PUNTA NEGRA'],\n\t\t\t[140122,1401,'RIMAC'],\n\t\t\t[140123,1401,'SAN BARTOLO'],\n\t\t\t[140124,1401,'SAN ISIDRO'],\n\t\t\t[140125,1401,'BARRANCO'],\n\t\t\t[140126,1401,'SAN MARTIN DE PORRES'],\n\t\t\t[140127,1401,'SAN MIGUEL'],\n\t\t\t[140128,1401,'SANTA MARIA DEL MAR'],\n\t\t\t[140129,1401,'SANTA ROSA'],\n\t\t\t[140130,1401,'SANTIAGO DE SURCO'],\n\t\t\t[140131,1401,'SURQUILLO'],\n\t\t\t[140132,1401,'VILLA MARIA DEL TRIUNFO'],\n\t\t\t[140133,1401,'JESUS MARIA'],\n\t\t\t[140134,1401,'INDEPENDENCIA'],\n\t\t\t[140135,1401,'EL AGUSTINO'],\n\t\t\t[140136,1401,'SAN JUAN DE MIRAFLORES'],\n\t\t\t[140137,1401,'SAN JUAN DE LURIGANCHO'],\n\t\t\t[140138,1401,'SAN LUIS'],\n\t\t\t[140139,1401,'CIENEGUILLA'],\n\t\t\t[140140,1401,'SAN BORJA'],\n\t\t\t[140141,1401,'VILLA EL SALVADOR'],\n\t\t\t[140142,1401,'LOS OLIVOS'],\n\t\t\t[140143,1401,'SANTA ANITA'],\n\t\t\t[140150,1401,'CHOSICA'],\n\t\t\t[140201,1402,'CAJATAMBO'],\n\t\t\t[140205,1402,'COPA'],\n\t\t\t[140206,1402,'GORGOR'],\n\t\t\t[140207,1402,'HUANCAPON'],\n\t\t\t[140208,1402,'MANAS'],\n\t\t\t[140301,1403,'CANTA'],\n\t\t\t[140302,1403,'ARAHUAY'],\n\t\t\t[140303,1403,'HUAMANTANGA'],\n\t\t\t[140304,1403,'HUAROS'],\n\t\t\t[140305,1403,'LACHAQUI'],\n\t\t\t[140306,1403,'SAN BUENAVENTURA'],\n\t\t\t[140307,1403,'SANTA ROSA DE QUIVES'],\n\t\t\t[140401,1404,'SAN VICENTE DE CAÑETE'],\n\t\t\t[140402,1404,'CALANGO'],\n\t\t\t[140403,1404,'CERRO AZUL'],\n\t\t\t[140404,1404,'COAYLLO'],\n\t\t\t[140405,1404,'CHILCA'],\n\t\t\t[140406,1404,'IMPERIAL'],\n\t\t\t[140407,1404,'LUNAHUANA'],\n\t\t\t[140408,1404,'MALA'],\n\t\t\t[140409,1404,'NUEVO IMPERIAL'],\n\t\t\t[140410,1404,'PACARAN'],\n\t\t\t[140411,1404,'QUILMANA'],\n\t\t\t[140412,1404,'SAN ANTONIO'],\n\t\t\t[140413,1404,'SAN LUIS'],\n\t\t\t[140414,1404,'SANTA CRUZ DE FLORES'],\n\t\t\t[140415,1404,'ZUÑIGA'],\n\t\t\t[140416,1404,'ASIA'],\n\t\t\t[140501,1405,'HUACHO'],\n\t\t\t[140502,1405,'AMBAR'],\n\t\t\t[140504,1405,'CALETA DE CARQUIN'],\n\t\t\t[140505,1405,'CHECRAS'],\n\t\t\t[140506,1405,'HUALMAY'],\n\t\t\t[140507,1405,'HUAURA'],\n\t\t\t[140508,1405,'LEONCIO PRADO'],\n\t\t\t[140509,1405,'PACCHO'],\n\t\t\t[140511,1405,'SANTA LEONOR'],\n\t\t\t[140512,1405,'SANTA MARIA'],\n\t\t\t[140513,1405,'SAYAN'],\n\t\t\t[140516,1405,'VEGUETA'],\n\t\t\t[140601,1406,'MATUCANA'],\n\t\t\t[140602,1406,'ANTIOQUIA'],\n\t\t\t[140603,1406,'CALLAHUANCA'],\n\t\t\t[140604,1406,'CARAMPOMA'],\n\t\t\t[140605,1406,'SAN PEDRO DE CASTA'],\n\t\t\t[140606,1406,'CUENCA'],\n\t\t\t[140607,1406,'CHICLA'],\n\t\t\t[140608,1406,'HUANZA'],\n\t\t\t[140609,1406,'HUAROCHIRI'],\n\t\t\t[140610,1406,'LAHUAYTAMBO'],\n\t\t\t[140611,1406,'LANGA'],\n\t\t\t[140612,1406,'MARIATANA'],\n\t\t\t[140613,1406,'RICARDO PALMA'],\n\t\t\t[140614,1406,'SAN ANDRES DE TUPICOCHA'],\n\t\t\t[140615,1406,'SAN ANTONIO'],\n\t\t\t[140616,1406,'SAN BARTOLOME'],\n\t\t\t[140617,1406,'SAN DAMIAN'],\n\t\t\t[140618,1406,'SANGALLAYA'],\n\t\t\t[140619,1406,'SAN JUAN DE TANTARANCHE'],\n\t\t\t[140620,1406,'SAN LORENZO DE QUINTI'],\n\t\t\t[140621,1406,'SAN MATEO'],\n\t\t\t[140622,1406,'SAN MATEO DE OTAO'],\n\t\t\t[140623,1406,'SAN PEDRO DE HUANCAYRE'],\n\t\t\t[140624,1406,'SANTA CRUZ DE COCACHACRA'],\n\t\t\t[140625,1406,'SANTA EULALIA'],\n\t\t\t[140626,1406,'SANTIAGO DE ANCHUCAYA'],\n\t\t\t[140627,1406,'SANTIAGO DE TUNA'],\n\t\t\t[140628,1406,'SANTO DOMINGO DE LOS OLLEROS'],\n\t\t\t[140629,1406,'SURCO'],\n\t\t\t[140630,1406,'HUACHUPAMPA'],\n\t\t\t[140631,1406,'LARAOS'],\n\t\t\t[140632,1406,'SAN JUAN DE IRIS'],\n\t\t\t[140701,1407,'YAUYOS'],\n\t\t\t[140702,1407,'ALIS'],\n\t\t\t[140703,1407,'AYAUCA'],\n\t\t\t[140704,1407,'AYAVIRI'],\n\t\t\t[140705,1407,'AZANGARO'],\n\t\t\t[140706,1407,'CACRA'],\n\t\t\t[140707,1407,'CARANIA'],\n\t\t\t[140708,1407,'COCHAS'],\n\t\t\t[140709,1407,'COLONIA'],\n\t\t\t[140710,1407,'CHOCOS'],\n\t\t\t[140711,1407,'HUAMPARA'],\n\t\t\t[140712,1407,'HUANCAYA'],\n\t\t\t[140713,1407,'HUANGASCAR'],\n\t\t\t[140714,1407,'HUANTAN'],\n\t\t\t[140715,1407,'HUAÑEC'],\n\t\t\t[140716,1407,'LARAOS'],\n\t\t\t[140717,1407,'LINCHA'],\n\t\t\t[140719,1407,'OMAS'],\n\t\t\t[140720,1407,'QUINCHES'],\n\t\t\t[140721,1407,'QUINOCAY'],\n\t\t\t[140722,1407,'SAN JOAQUIN'],\n\t\t\t[140723,1407,'SAN PEDRO DE PILAS'],\n\t\t\t[140724,1407,'TANTA'],\n\t\t\t[140725,1407,'TAURIPAMPA'],\n\t\t\t[140726,1407,'TUPE'],\n\t\t\t[140727,1407,'TOMAS'],\n\t\t\t[140728,1407,'VIÑAC'],\n\t\t\t[140729,1407,'VITIS'],\n\t\t\t[140730,1407,'HONGOS'],\n\t\t\t[140731,1407,'MADEAN'],\n\t\t\t[140732,1407,'PUTINZA'],\n\t\t\t[140733,1407,'CATAHUASI'],\n\t\t\t[140801,1408,'HUARAL'],\n\t\t\t[140802,1408,'ATAVILLOS ALTO'],\n\t\t\t[140803,1408,'ATAVILLOS BAJO'],\n\t\t\t[140804,1408,'AUCALLAMA'],\n\t\t\t[140805,1408,'CHANCAY'],\n\t\t\t[140806,1408,'IHUARI'],\n\t\t\t[140807,1408,'LAMPIAN'],\n\t\t\t[140808,1408,'PACARAOS'],\n\t\t\t[140809,1408,'SAN MIGUEL DE ACOS'],\n\t\t\t[140810,1408,'VEINTISIETE DE NOVIEMBRE'],\n\t\t\t[140811,1408,'SANTA CRUZ DE ANDAMARCA'],\n\t\t\t[140812,1408,'SUMBILCA'],\n\t\t\t[140901,1409,'BARRANCA'],\n\t\t\t[140902,1409,'PARAMONGA'],\n\t\t\t[140903,1409,'PATIVILCA'],\n\t\t\t[140904,1409,'SUPE'],\n\t\t\t[140905,1409,'SUPE PUERTO'],\n\t\t\t[141001,1410,'OYON'],\n\t\t\t[141002,1410,'NAVAN'],\n\t\t\t[141003,1410,'CAUJUL'],\n\t\t\t[141004,1410,'ANDAJES'],\n\t\t\t[141005,1410,'PACHANGARA'],\n\t\t\t[141006,1410,'COCHAMARCA'],\n\t\t\t[141144,1411,'CALLAO'],\n\t\t\t[141145,1411,'BELLAVISTA'],\n\t\t\t[141146,1411,'LA PUNTA'],\n\t\t\t[141147,1411,'CARMEN DE LA LEGUA-REYNOSO'],\n\t\t\t[141148,1411,'LA PERLA'],\n\t\t\t[141149,1411,'VENTANILLA'],\n\t\t\t[150101,1501,'IQUITOS'],\n\t\t\t[150102,1501,'ALTO NANAY'],\n\t\t\t[150103,1501,'FERNANDO LORES'],\n\t\t\t[150104,1501,'LAS AMAZONAS'],\n\t\t\t[150105,1501,'MAZAN'],\n\t\t\t[150106,1501,'NAPO'],\n\t\t\t[150107,1501,'PUTUMAYO'],\n\t\t\t[150108,1501,'TORRES CAUSANA'],\n\t\t\t[150110,1501,'INDIANA'],\n\t\t\t[150111,1501,'PUNCHANA'],\n\t\t\t[150112,1501,'BELEN'],\n\t\t\t[150113,1501,'SAN JUAN BAUTISTA'],\n\t\t\t[150201,1502,'YURIMAGUAS'],\n\t\t\t[150202,1502,'BALSA PUERTO'],\n\t\t\t[150203,1502,'BARRANCA'],\n\t\t\t[150204,1502,'CAHUAPANAS'],\n\t\t\t[150205,1502,'JEBEROS'],\n\t\t\t[150206,1502,'LAGUNAS'],\n\t\t\t[150207,1502,'MANSERICHE'],\n\t\t\t[150208,1502,'MORONA'],\n\t\t\t[150209,1502,'PASTAZA'],\n\t\t\t[150210,1502,'SANTA CRUZ'],\n\t\t\t[150211,1502,'TENIENTE CESAR LOPEZ ROJAS'],\n\t\t\t[150301,1503,'NAUTA'],\n\t\t\t[150302,1503,'PARINARI'],\n\t\t\t[150303,1503,'TIGRE'],\n\t\t\t[150304,1503,'URARINAS'],\n\t\t\t[150305,1503,'TROMPETEROS'],\n\t\t\t[150401,1504,'REQUENA'],\n\t\t\t[150402,1504,'ALTO TAPICHE'],\n\t\t\t[150403,1504,'CAPELO'],\n\t\t\t[150404,1504,'EMILIO SAN MARTIN'],\n\t\t\t[150405,1504,'MAQUIA'],\n\t\t\t[150406,1504,'PUINAHUA'],\n\t\t\t[150407,1504,'SAQUENA'],\n\t\t\t[150408,1504,'SOPLIN'],\n\t\t\t[150409,1504,'TAPICHE'],\n\t\t\t[150410,1504,'JENARO HERRERA'],\n\t\t\t[150411,1504,'YAQUERANA'],\n\t\t\t[150501,1505,'CONTAMANA'],\n\t\t\t[150502,1505,'VARGAS GUERRA'],\n\t\t\t[150503,1505,'PADRE MARQUEZ'],\n\t\t\t[150504,1505,'PAMPA HERMOSA'],\n\t\t\t[150505,1505,'SARAYACU'],\n\t\t\t[150506,1505,'INAHUAYA'],\n\t\t\t[150601,1506,'RAMON CASTILLA'],\n\t\t\t[150602,1506,'PEBAS'],\n\t\t\t[150603,1506,'YAVARI'],\n\t\t\t[150604,1506,'SAN PABLO'],\n\t\t\t[160101,1601,'TAMBOPATA'],\n\t\t\t[160102,1601,'INAMBARI'],\n\t\t\t[160103,1601,'LAS PIEDRAS'],\n\t\t\t[160104,1601,'LABERINTO'],\n\t\t\t[160201,1602,'MANU'],\n\t\t\t[160202,1602,'FITZCARRALD'],\n\t\t\t[160203,1602,'MADRE DE DIOS'],\n\t\t\t[160204,1602,'HUEPETUHE'],\n\t\t\t[160301,1603,'IÑAPARI'],\n\t\t\t[160302,1603,'IBERIA'],\n\t\t\t[160303,1603,'TAHUAMANU'],\n\t\t\t[170101,1701,'MOQUEGUA'],\n\t\t\t[170102,1701,'CARUMAS'],\n\t\t\t[170103,1701,'CUCHUMBAYA'],\n\t\t\t[170104,1701,'SAN CRISTOBAL'],\n\t\t\t[170105,1701,'TORATA'],\n\t\t\t[170106,1701,'SAMEGUA'],\n\t\t\t[170201,1702,'OMATE'],\n\t\t\t[170202,1702,'COALAQUE'],\n\t\t\t[170203,1702,'CHOJATA'],\n\t\t\t[170204,1702,'ICHUÑA'],\n\t\t\t[170205,1702,'LA CAPILLA'],\n\t\t\t[170206,1702,'LLOQUE'],\n\t\t\t[170207,1702,'MATALAQUE'],\n\t\t\t[170208,1702,'PUQUINA'],\n\t\t\t[170209,1702,'QUINISTAQUILLAS'],\n\t\t\t[170210,1702,'UBINAS'],\n\t\t\t[170211,1702,'YUNGA'],\n\t\t\t[170301,1703,'ILO'],\n\t\t\t[170302,1703,'EL ALGARROBAL'],\n\t\t\t[170303,1703,'PACOCHA'],\n\t\t\t[180101,1801,'CHAUPIMARCA'],\n\t\t\t[180103,1801,'HUACHON'],\n\t\t\t[180104,1801,'HUARIACA'],\n\t\t\t[180105,1801,'HUAYLLAY'],\n\t\t\t[180106,1801,'NINACACA'],\n\t\t\t[180107,1801,'PALLANCHACRA'],\n\t\t\t[180108,1801,'PAUCARTAMBO'],\n\t\t\t[180109,1801,'SAN FRANCISCO DE ASIS DE YARUSYACAN'],\n\t\t\t[180110,1801,'SIMON BOLIVAR'],\n\t\t\t[180111,1801,'TICLACAYAN'],\n\t\t\t[180112,1801,'TINYAHUARCO'],\n\t\t\t[180113,1801,'VICCO'],\n\t\t\t[180114,1801,'YANACANCHA'],\n\t\t\t[180201,1802,'YANAHUANCA'],\n\t\t\t[180202,1802,'CHACAYAN'],\n\t\t\t[180203,1802,'GOYLLARISQUIZGA'],\n\t\t\t[180204,1802,'PAUCAR'],\n\t\t\t[180205,1802,'SAN PEDRO DE PILLAO'],\n\t\t\t[180206,1802,'SANTA ANA DE TUSI'],\n\t\t\t[180207,1802,'TAPUC'],\n\t\t\t[180208,1802,'VILCABAMBA'],\n\t\t\t[180301,1803,'OXAPAMPA'],\n\t\t\t[180302,1803,'CHONTABAMBA'],\n\t\t\t[180303,1803,'HUANCABAMBA'],\n\t\t\t[180304,1803,'PUERTO BERMUDEZ'],\n\t\t\t[180305,1803,'VILLA RICA'],\n\t\t\t[180306,1803,'POZUZO'],\n\t\t\t[180307,1803,'PALCAZU'],\n\t\t\t[190101,1901,'PIURA'],\n\t\t\t[190103,1901,'CASTILLA'],\n\t\t\t[190104,1901,'CATACAOS'],\n\t\t\t[190105,1901,'LA ARENA'],\n\t\t\t[190106,1901,'LA UNION'],\n\t\t\t[190107,1901,'LAS LOMAS'],\n\t\t\t[190109,1901,'TAMBO GRANDE'],\n\t\t\t[190113,1901,'CURA MORI'],\n\t\t\t[190114,1901,'EL TALLAN'],\n\t\t\t[190115,1901,'VENTISEIS DE OCTUBRE'],\n\t\t\t[190201,1902,'AYABACA'],\n\t\t\t[190202,1902,'FRIAS'],\n\t\t\t[190203,1902,'LAGUNAS'],\n\t\t\t[190204,1902,'MONTERO'],\n\t\t\t[190205,1902,'PACAIPAMPA'],\n\t\t\t[190206,1902,'SAPILLICA'],\n\t\t\t[190207,1902,'SICCHEZ'],\n\t\t\t[190208,1902,'SUYO'],\n\t\t\t[190209,1902,'JILILI'],\n\t\t\t[190210,1902,'PAIMAS'],\n\t\t\t[190301,1903,'HUANCABAMBA'],\n\t\t\t[190302,1903,'CANCHAQUE'],\n\t\t\t[190303,1903,'HUARMACA'],\n\t\t\t[190304,1903,'SONDOR'],\n\t\t\t[190305,1903,'SONDORILLO'],\n\t\t\t[190306,1903,'EL CARMEN DE LA FRONTERA'],\n\t\t\t[190307,1903,'SAN MIGUEL DE EL FAIQUE'],\n\t\t\t[190308,1903,'LALAQUIZ'],\n\t\t\t[190401,1904,'CHULUCANAS'],\n\t\t\t[190402,1904,'BUENOS AIRES'],\n\t\t\t[190403,1904,'CHALACO'],\n\t\t\t[190404,1904,'MORROPON'],\n\t\t\t[190405,1904,'SALITRAL'],\n\t\t\t[190406,1904,'SANTA CATALINA DE MOSSA'],\n\t\t\t[190407,1904,'SANTO DOMINGO'],\n\t\t\t[190408,1904,'LA MATANZA'],\n\t\t\t[190409,1904,'YAMANGO'],\n\t\t\t[190410,1904,'SAN JUAN DE BIGOTE'],\n\t\t\t[190501,1905,'PAITA'],\n\t\t\t[190502,1905,'AMOTAPE'],\n\t\t\t[190503,1905,'ARENAL'],\n\t\t\t[190504,1905,'LA HUACA'],\n\t\t\t[190505,1905,'COLAN'],\n\t\t\t[190506,1905,'TAMARINDO'],\n\t\t\t[190507,1905,'VICHAYAL'],\n\t\t\t[190601,1906,'SULLANA'],\n\t\t\t[190602,1906,'BELLAVISTA'],\n\t\t\t[190603,1906,'LANCONES'],\n\t\t\t[190604,1906,'MARCAVELICA'],\n\t\t\t[190605,1906,'MIGUEL CHECA'],\n\t\t\t[190606,1906,'QUERECOTILLO'],\n\t\t\t[190607,1906,'SALITRAL'],\n\t\t\t[190608,1906,'IGNACIO ESCUDERO'],\n\t\t\t[190701,1907,'PARIÑAS'],\n\t\t\t[190702,1907,'EL ALTO'],\n\t\t\t[190703,1907,'LA BREA'],\n\t\t\t[190704,1907,'LOBITOS'],\n\t\t\t[190705,1907,'MANCORA'],\n\t\t\t[190706,1907,'LOS ORGANOS'],\n\t\t\t[190801,1908,'SECHURA'],\n\t\t\t[190802,1908,'VICE'],\n\t\t\t[190803,1908,'BERNAL'],\n\t\t\t[190804,1908,'BELLAVISTA DE LA UNION'],\n\t\t\t[190805,1908,'CRISTO NOS VALGA'],\n\t\t\t[190806,1908,'RINCONADA-LLICUAR'],\n\t\t\t[200101,2001,'PUNO'],\n\t\t\t[200102,2001,'ACORA'],\n\t\t\t[200103,2001,'ATUNCOLLA'],\n\t\t\t[200104,2001,'CAPACHICA'],\n\t\t\t[200105,2001,'COATA'],\n\t\t\t[200106,2001,'CHUCUITO'],\n\t\t\t[200107,2001,'HUATA'],\n\t\t\t[200108,2001,'MAÑAZO'],\n\t\t\t[200109,2001,'PAUCARCOLLA'],\n\t\t\t[200110,2001,'PICHACANI'],\n\t\t\t[200111,2001,'SAN ANTONIO'],\n\t\t\t[200112,2001,'TIQUILLACA'],\n\t\t\t[200113,2001,'VILQUE'],\n\t\t\t[200114,2001,'PLATERIA'],\n\t\t\t[200115,2001,'AMANTANI'],\n\t\t\t[200201,2002,'AZANGARO'],\n\t\t\t[200202,2002,'ACHAYA'],\n\t\t\t[200203,2002,'ARAPA'],\n\t\t\t[200204,2002,'ASILLO'],\n\t\t\t[200205,2002,'CAMINACA'],\n\t\t\t[200206,2002,'CHUPA'],\n\t\t\t[200207,2002,'JOSE DOMINGO CHOQUEHUANCA'],\n\t\t\t[200208,2002,'MUÑANI'],\n\t\t\t[200210,2002,'POTONI'],\n\t\t\t[200212,2002,'SAMAN'],\n\t\t\t[200213,2002,'SAN ANTON'],\n\t\t\t[200214,2002,'SAN JOSE'],\n\t\t\t[200215,2002,'SAN JUAN DE SALINAS'],\n\t\t\t[200216,2002,'SANTIAGO DE PUPUJA'],\n\t\t\t[200217,2002,'TIRAPATA'],\n\t\t\t[200301,2003,'MACUSANI'],\n\t\t\t[200302,2003,'AJOYANI'],\n\t\t\t[200303,2003,'AYAPATA'],\n\t\t\t[200304,2003,'COASA'],\n\t\t\t[200305,2003,'CORANI'],\n\t\t\t[200306,2003,'CRUCERO'],\n\t\t\t[200307,2003,'ITUATA'],\n\t\t\t[200308,2003,'OLLACHEA'],\n\t\t\t[200309,2003,'SAN GABAN'],\n\t\t\t[200310,2003,'USICAYOS'],\n\t\t\t[200401,2004,'JULI'],\n\t\t\t[200402,2004,'DESAGUADERO'],\n\t\t\t[200403,2004,'HUACULLANI'],\n\t\t\t[200406,2004,'PISACOMA'],\n\t\t\t[200407,2004,'POMATA'],\n\t\t\t[200410,2004,'ZEPITA'],\n\t\t\t[200412,2004,'KELLUYO'],\n\t\t\t[200501,2005,'HUANCANE'],\n\t\t\t[200502,2005,'COJATA'],\n\t\t\t[200504,2005,'INCHUPALLA'],\n\t\t\t[200506,2005,'PUSI'],\n\t\t\t[200507,2005,'ROSASPATA'],\n\t\t\t[200508,2005,'TARACO'],\n\t\t\t[200509,2005,'VILQUE CHICO'],\n\t\t\t[200511,2005,'HUATASANI'],\n\t\t\t[200601,2006,'LAMPA'],\n\t\t\t[200602,2006,'CABANILLA'],\n\t\t\t[200603,2006,'CALAPUJA'],\n\t\t\t[200604,2006,'NICASIO'],\n\t\t\t[200605,2006,'OCUVIRI'],\n\t\t\t[200606,2006,'PALCA'],\n\t\t\t[200607,2006,'PARATIA'],\n\t\t\t[200608,2006,'PUCARA'],\n\t\t\t[200609,2006,'SANTA LUCIA'],\n\t\t\t[200610,2006,'VILAVILA'],\n\t\t\t[200701,2007,'AYAVIRI'],\n\t\t\t[200702,2007,'ANTAUTA'],\n\t\t\t[200703,2007,'CUPI'],\n\t\t\t[200704,2007,'LLALLI'],\n\t\t\t[200705,2007,'MACARI'],\n\t\t\t[200706,2007,'NUÑOA'],\n\t\t\t[200707,2007,'ORURILLO'],\n\t\t\t[200708,2007,'SANTA ROSA'],\n\t\t\t[200709,2007,'UMACHIRI'],\n\t\t\t[200801,2008,'SANDIA'],\n\t\t\t[200803,2008,'CUYOCUYO'],\n\t\t\t[200804,2008,'LIMBANI'],\n\t\t\t[200805,2008,'PHARA'],\n\t\t\t[200806,2008,'PATAMBUCO'],\n\t\t\t[200807,2008,'QUIACA'],\n\t\t\t[200808,2008,'SAN JUAN DEL ORO'],\n\t\t\t[200810,2008,'YANAHUAYA'],\n\t\t\t[200811,2008,'ALTO INAMBARI'],\n\t\t\t[200901,2009,'JULIACA'],\n\t\t\t[200902,2009,'CABANA'],\n\t\t\t[200903,2009,'CABANILLAS'],\n\t\t\t[200904,2009,'CARACOTO'],\n\t\t\t[201001,2010,'YUNGUYO'],\n\t\t\t[201002,2010,'UNICACHI'],\n\t\t\t[201003,2010,'ANAPIA'],\n\t\t\t[201004,2010,'COPANI'],\n\t\t\t[201005,2010,'CUTURAPI'],\n\t\t\t[201006,2010,'OLLARAYA'],\n\t\t\t[201007,2010,'TINICACHI'],\n\t\t\t[201101,2011,'PUTINA'],\n\t\t\t[201102,2011,'PEDRO VILCA APAZA'],\n\t\t\t[201103,2011,'QUILCAPUNCU'],\n\t\t\t[201104,2011,'ANANEA'],\n\t\t\t[201105,2011,'SINA'],\n\t\t\t[201201,2012,'ILAVE'],\n\t\t\t[201202,2012,'PILCUYO'],\n\t\t\t[201203,2012,'SANTA ROSA'],\n\t\t\t[201204,2012,'CAPASO'],\n\t\t\t[201205,2012,'CONDURIRI'],\n\t\t\t[201301,2013,'MOHO'],\n\t\t\t[201302,2013,'CONIMA'],\n\t\t\t[201303,2013,'TILALI'],\n\t\t\t[201304,2013,'HUAYRAPATA'],\n\t\t\t[210101,2101,'MOYOBAMBA'],\n\t\t\t[210102,2101,'CALZADA'],\n\t\t\t[210103,2101,'HABANA'],\n\t\t\t[210104,2101,'JEPELACIO'],\n\t\t\t[210105,2101,'SORITOR'],\n\t\t\t[210106,2101,'YANTALO'],\n\t\t\t[210201,2102,'SAPOSOA'],\n\t\t\t[210202,2102,'PISCOYACU'],\n\t\t\t[210203,2102,'SACANCHE'],\n\t\t\t[210204,2102,'TINGO DE SAPOSOA'],\n\t\t\t[210205,2102,'ALTO SAPOSOA'],\n\t\t\t[210206,2102,'EL ESLABON'],\n\t\t\t[210301,2103,'LAMAS'],\n\t\t\t[210303,2103,'BARRANQUITA'],\n\t\t\t[210304,2103,'CAYNARACHI'],\n\t\t\t[210305,2103,'CUÑUMBUQUI'],\n\t\t\t[210306,2103,'PINTO RECODO'],\n\t\t\t[210307,2103,'RUMISAPA'],\n\t\t\t[210311,2103,'SHANAO'],\n\t\t\t[210313,2103,'TABALOSOS'],\n\t\t\t[210314,2103,'ZAPATERO'],\n\t\t\t[210315,2103,'ALONSO DE ALVARADO'],\n\t\t\t[210316,2103,'SAN ROQUE DE CUMBAZA'],\n\t\t\t[210401,2104,'JUANJUI'],\n\t\t\t[210402,2104,'CAMPANILLA'],\n\t\t\t[210403,2104,'HUICUNGO'],\n\t\t\t[210404,2104,'PACHIZA'],\n\t\t\t[210405,2104,'PAJARILLO'],\n\t\t\t[210501,2105,'RIOJA'],\n\t\t\t[210502,2105,'POSIC'],\n\t\t\t[210503,2105,'YORONGOS'],\n\t\t\t[210504,2105,'YURACYACU'],\n\t\t\t[210505,2105,'NUEVA CAJAMARCA'],\n\t\t\t[210506,2105,'ELIAS SOPLIN'],\n\t\t\t[210507,2105,'SAN FERNANDO'],\n\t\t\t[210508,2105,'PARDO MIGUEL'],\n\t\t\t[210509,2105,'AWAJUN'],\n\t\t\t[210601,2106,'TARAPOTO'],\n\t\t\t[210602,2106,'ALBERTO LEVEAU'],\n\t\t\t[210604,2106,'CACATACHI'],\n\t\t\t[210606,2106,'CHAZUTA'],\n\t\t\t[210607,2106,'CHIPURANA'],\n\t\t\t[210608,2106,'EL PORVENIR'],\n\t\t\t[210609,2106,'HUIMBAYOC'],\n\t\t\t[210610,2106,'JUAN GUERRA'],\n\t\t\t[210611,2106,'MORALES'],\n\t\t\t[210612,2106,'PAPA-PLAYA'],\n\t\t\t[210616,2106,'SAN ANTONIO'],\n\t\t\t[210619,2106,'SAUCE'],\n\t\t\t[210620,2106,'SHAPAJA'],\n\t\t\t[210621,2106,'LA BANDA DE SHILCAYO'],\n\t\t\t[210701,2107,'BELLAVISTA'],\n\t\t\t[210702,2107,'SAN RAFAEL'],\n\t\t\t[210703,2107,'SAN PABLO'],\n\t\t\t[210704,2107,'ALTO BIAVO'],\n\t\t\t[210705,2107,'HUALLAGA'],\n\t\t\t[210706,2107,'BAJO BIAVO'],\n\t\t\t[210801,2108,'TOCACHE'],\n\t\t\t[210802,2108,'NUEVO PROGRESO'],\n\t\t\t[210803,2108,'POLVORA'],\n\t\t\t[210804,2108,'SHUNTE'],\n\t\t\t[210805,2108,'UCHIZA'],\n\t\t\t[210901,2109,'PICOTA'],\n\t\t\t[210902,2109,'BUENOS AIRES'],\n\t\t\t[210903,2109,'CASPIZAPA'],\n\t\t\t[210904,2109,'PILLUANA'],\n\t\t\t[210905,2109,'PUCACACA'],\n\t\t\t[210906,2109,'SAN CRISTOBAL'],\n\t\t\t[210907,2109,'SAN HILARION'],\n\t\t\t[210908,2109,'TINGO DE PONASA'],\n\t\t\t[210909,2109,'TRES UNIDOS'],\n\t\t\t[210910,2109,'SHAMBOYACU'],\n\t\t\t[211001,2110,'SAN JOSE DE SISA'],\n\t\t\t[211002,2110,'AGUA BLANCA'],\n\t\t\t[211003,2110,'SHATOJA'],\n\t\t\t[211004,2110,'SAN MARTIN'],\n\t\t\t[211005,2110,'SANTA ROSA'],\n\t\t\t[220101,2201,'TACNA'],\n\t\t\t[220102,2201,'CALANA'],\n\t\t\t[220104,2201,'INCLAN'],\n\t\t\t[220107,2201,'PACHIA'],\n\t\t\t[220108,2201,'PALCA'],\n\t\t\t[220109,2201,'POCOLLAY'],\n\t\t\t[220110,2201,'SAMA'],\n\t\t\t[220111,2201,'ALTO DE LA ALIANZA'],\n\t\t\t[220112,2201,'CIUDAD NUEVA'],\n\t\t\t[220113,2201,'CORONEL GREGORIO ALBARRACIN LANCHIPA'],\n\t\t\t[220201,2202,'TARATA'],\n\t\t\t[220205,2202,'CHUCATAMANI'],\n\t\t\t[220206,2202,'ESTIQUE'],\n\t\t\t[220207,2202,'ESTIQUE PAMPA'],\n\t\t\t[220210,2202,'SITAJARA'],\n\t\t\t[220211,2202,'SUSAPAYA'],\n\t\t\t[220212,2202,'TARUCACHI'],\n\t\t\t[220213,2202,'TICACO'],\n\t\t\t[220301,2203,'LOCUMBA'],\n\t\t\t[220302,2203,'ITE'],\n\t\t\t[220303,2203,'ILABAYA'],\n\t\t\t[220401,2204,'CANDARAVE'],\n\t\t\t[220402,2204,'CAIRANI'],\n\t\t\t[220403,2204,'CURIBAYA'],\n\t\t\t[220404,2204,'HUANUARA'],\n\t\t\t[220405,2204,'QUILAHUANI'],\n\t\t\t[220406,2204,'CAMILACA'],\n\t\t\t[230101,2301,'TUMBES'],\n\t\t\t[230102,2301,'CORRALES'],\n\t\t\t[230103,2301,'LA CRUZ'],\n\t\t\t[230104,2301,'PAMPAS DE HOSPITAL'],\n\t\t\t[230105,2301,'SAN JACINTO'],\n\t\t\t[230106,2301,'SAN JUAN DE LA VIRGEN'],\n\t\t\t[230201,2302,'ZORRITOS'],\n\t\t\t[230202,2302,'CASITAS'],\n\t\t\t[230301,2303,'ZARUMILLA'],\n\t\t\t[230302,2303,'MATAPALO'],\n\t\t\t[230303,2303,'PAPAYAL'],\n\t\t\t[230304,2303,'AGUAS VERDES'],\n\t\t\t[250101,2501,'CALLERIA'],\n\t\t\t[250102,2501,'YARINACOCHA'],\n\t\t\t[250103,2501,'MASISEA'],\n\t\t\t[250104,2501,'CAMPOVERDE'],\n\t\t\t[250105,2501,'IPARIA'],\n\t\t\t[250106,2501,'NUEVA REQUENA'],\n\t\t\t[250201,2502,'PADRE ABAD'],\n\t\t\t[250202,2502,'IRAZOLA'],\n\t\t\t[250203,2502,'CURIMANA'],\n\t\t\t[250301,2503,'RAIMONDI'],\n\t\t\t[250302,2503,'TAHUANIA'],\n\t\t\t[250303,2503,'YURUA'],\n\t\t\t[250304,2503,'SEPAHUA'],\n\t\t\t[250401,2504,'PURUS'],\n\n ];\n\n foreach ($departamentos as $value) {\n \t\n\t DB::table('departamentos')->insert([\n\t \t'id'\t=>\t$value[0],\n\t 'nombre' => $value[1]\n\t \n\t ]);\n }\n\n foreach ($provincias as $value2) {\n \tDB::table('provincias')->insert([\n\t \t'id'\t\t\t\t=>\t$value2[0],\n\t \t'departamento_id'\t=>\t$value2[1],\n\t 'nombre' \t\t\t=> $value2[2]\n\t \n\t ]);\n }\n\n foreach ($distritos as $value3) {\n \tDB::table('distritos')->insert([\n\t \t'id'\t\t\t\t=>\t$value3[0],\n\t \t'provincia_id'\t\t=>\t$value3[1],\n\t 'nombre' \t\t\t=> $value3[2]\n\t \n\t ]);\n }\n }",
"public function RptListar(){\r\n $sql=\"SELECT \r\n c.idcompra,\r\n c.idproveedor,\r\n c.idcondpago,\r\n c.idusuario,\r\n c.cod_compra,\r\n c.desc_compra,\r\n pv.cod_proveedor,\r\n pv.desc_proveedor,\r\n pv.rif,\r\n pv.limite,\r\n cp.cod_condpago,\r\n cp.desc_condpago,\r\n cp.dias,\r\n u.cod_usuario,\r\n u.desc_usuario,\r\n c.numerod,\r\n c.numeroc,\r\n c.tipo,\r\n c.origend,\r\n c.origenc,\r\n c.estatus,\r\n c.subtotalh,\r\n c.impuestoh,\r\n c.totalh,\r\n c.saldoh,\r\n DATE_FORMAT(c.fechareg, '%d/%m/%Y') AS fechareg,\r\n DATE_FORMAT(c.fechaven, '%d/%m/%Y') AS fechaven \r\n FROM\r\n tbcompra AS c \r\n INNER JOIN tbproveedor AS pv ON (c.idproveedor = pv.idproveedor) \r\n INNER JOIN tbcondpago AS cp ON (c.idcondpago = cp.idcondpago) \r\n INNER JOIN tbusuario AS u ON (c.idusuario = u.idusuario)\r\n ORDER BY c.cod_compra ASC\";\r\n return ejecutarConsulta($sql);\r\n }",
"function buscar_proveedores_proyecto (){\n\t$proveedores=array();\n\t$i=0;\n\n\t$sql_proveedores_proyecto = 'SELECT * FROM v_proveedores WHERE \"estatusProveedor\"= 1 ORDER BY \"idProveedor\"';\n\t$resul_proveedores_proyecto=pg_query($sql_proveedores_proyecto) or die();\n\t\twhile ($row_prov=pg_fetch_array($resul_proveedores_proyecto)){\n\t\t\t$proveedores['id_prov'][$i] = $row_prov['id_proveedor'];\n\t\t\t$proveedores['rif_prov'][$i] = $row_prov['rif_proveedor'];\n\t\t\t$proveedores['nomb_prov'][$i] = $row_prov['nomb_proveedo'];\n\t\t\t$proveedores['telefono'][$i] = $row_prov['telef_principal'];\n\t\t\t$i++;\n\t\t}\n\t\treturn $proveedores;\n\t}",
"public function getListDesactivar()\n {\n\n $sql = \"SELECT cod_distribuidor\n FROM distribuidor\n WHERE distribuidor.cod_estado = 1\n \";\n $list = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $item = new Distribuidor();\n $item->setCod_distribuidor($row[0]);\n \n array_push($list, $item);\n\n }\n return $list;\n\n }",
"function listarDepositos(){\n\t\t$this->procedimiento='vef.ft_depositos_sel';\n\t\t$this->transaccion='VF_CDO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t\t\t//Definicion de la lista del resultado del query\n\t\t\t\t$this->setParametro('relacion_deposito','relacion_deposito','varchar');\n\t\t\t\t$this->setParametro('id_moneda_deposito_agrupado','id_moneda_deposito_agrupado','int4');\n\n\t\t\t\t$this->captura('id_apertura_cierre_caja','int4');\n $this->captura('id_punto_venta','int4');\n $this->captura('id_entrega_brinks','int4');\n $this->captura('id_usuario_cajero','int4');\n $this->captura('codigo_padre','varchar');\n $this->captura('estacion','varchar');\n $this->captura('nombre_punto_venta','varchar');\n $this->captura('codigo','varchar');\n $this->captura('cajero','text');\n $this->captura('fecha_recojo','date');\n $this->captura('fecha_venta','date');\n $this->captura('arqueo_moneda_local','numeric');\n $this->captura('arqueo_moneda_extranjera','numeric');\n $this->captura('deposito_bs','numeric');\n $this->captura('deposito_usd','numeric');\n $this->captura('tipo_cambio','numeric');\n $this->captura('diferencia_bs','numeric');\n $this->captura('diferencia_usd','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"function formDeportista(){\n $personas = $this->modelDeportista->getPersonas();\n //traer cdo de competencia y cdo Disciplina\n $categorias = $this->modelDeportista->getCategorias();\n //traer cdo de federacion y cdo de Disciplina de federacion--pueden ser null\n $federaciones = $this->modelDeportista->getFederaciones();\n\n //reestricciones--\n // Un deportista no puede formar parte de más de tres equipos en un mismo año.\n\n $this->viewDeportista->mostrarFormAltaDepor($personas,$categorias,$federaciones);\n }",
"public static function listar_resumen_venta_por_dia($fecha_inicio, $fecha_fin, $almacen_id, $tipo_documento, $distribuidor)\n {\n $tipo_documento_valor = \"\";\n if ($tipo_documento != \"\") {\n $tipo_documento_valor = \"and vent_venta_tipo_comprobante_id='\" . $tipo_documento . \"'\";\n }\n\n $almacen_id_valor = \"\";\n if ($almacen_id != \"\") {\n $almacen_id_valor = \"and vent_venta_almacen_id= '\" . $almacen_id . \"'\";\n }\n $distribuidor_id_valor = \"\";\n\n if ($distribuidor != \"\") {\n $distribuidor_id_valor = \"and vent_venta_distribuidor_id='\" . $distribuidor . \"'\";\n }\n try {\n $sql = \"select cont_periodo_id, cont_periodo_anio from cont_periodo where cont_periodo_estado= 1\";\n $QueryPeriodo = DB::select($sql);\n\n $sql = \"select\n sum(case when vent_venta_tipo_venta ='01' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_precio_cobrado*-1 else vent_venta_precio_cobrado end*1 else vent_venta_precio_cobrado*0 end) total_contado,\n sum(case when vent_venta_tipo_venta ='01' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_bi*-1 else vent_venta_bi end *1 else vent_venta_bi*0 end) bi_contado,\n sum(case when vent_venta_tipo_venta ='01' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_igv*-1 else vent_venta_igv end *1 else vent_venta_igv*0 end) igv_contado,\n\n sum(case when vent_venta_tipo_venta ='02' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_precio_cobrado*-1 else vent_venta_precio_cobrado end *1 else vent_venta_precio_cobrado*0 end) total_credito,\n sum(case when vent_venta_tipo_venta ='02' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_bi*-1 else vent_venta_bi end *1 else vent_venta_bi*0 end) bi_credito,\n sum(case when vent_venta_tipo_venta ='02' then case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_igv*-1 else vent_venta_igv end *1 else vent_venta_igv*0 end) igv_credito,\n\n sum(vent_venta_precio_cobrado*case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then -1 else 1 end ) importe_total,\n sum(vent_venta_igv* case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then -1 else 1 end ) igv_total,\n sum(vent_venta_bi* case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then -1 else 1 end ) base_total,\n\n sum(case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='01' then vent_venta_precio_cobrado else 0 end) total_facturas,\n sum(case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='03' then vent_venta_precio_cobrado else 0 end) total_boletass,\n sum(case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='07' then vent_venta_precio_cobrado else 0 end) total_notacreditos,\n sum(case when (select doc_tipo_comprobante_codigo from doc_tipo_comprabante where doc_tipo_comprobante_id = vent_venta_tipo_comprobante_id )='99' then vent_venta_precio_cobrado else 0 end) total_notas_ventas\n\nfrom vent_venta\nwhere date(vent_venta_fecha) between '\" . $fecha_inicio . \"' and '\" . $fecha_fin . \"'$tipo_documento_valor $almacen_id_valor $distribuidor_id_valor\n\nand vent_venta_periodo_id in (\n select cont_periodo_id from cont_periodo where cont_periodo_anio='\" . $QueryPeriodo[0]->cont_periodo_anio . \"'\n)\";\n\n //dd($sql);\n\n $Query = DB::select($sql);\n\n\n } catch (\\Exception $exception) {\n dd($exception);\n }\n return $Query[0];\n }",
"public function distritos($id) {\n $asociacion = Asociacion::find($id);\n $distritos = $asociacion->distritos;\n if (count($distritos) > 0) {\n $distritosf = null;\n foreach ($distritos as $value) {\n $obj[\"id\"] = $value->id;\n $obj[\"value\"] = $value->nombre;\n $distritosf[] = $obj;\n }\n return json_encode($distritosf);\n } else {\n return \"null\";\n }\n }",
"function dameproveedor(){\n\t $consulta_mysql=\"\n\t\t SELECT \n\t\t\t\ttbproveedor.nvchnombre,\n\t\t\t\ttbproveedor.intcodigo,\n\t\t\t\ttbproveedor.nvchrazon_social,\n\t\t\t\ttbproveedor.intidproveedor\n\t\t\tfrom \n\t\t\ttbproveedor\n\t \";\n\t $resultado_consulta_mysql=mysql_query($consulta_mysql);\n\t while($registro = mysql_fetch_array($resultado_consulta_mysql)){\n\t echo \"\n\t <option style='' value='\".$registro['intidproveedor'].\"'>\n\t \t\t\".$registro['nvchnombre'].\" - \".$registro['nvchrazon_social'].\"\n\t </option>\n\t \";\n\t }\n\t}",
"public function run()\n {\n $departments = array(\n\t\t array('id' => '01','name' => 'Amazonas'),\n\t\t array('id' => '02','name' => 'Áncash'),\n\t\t array('id' => '03','name' => 'Apurímac'),\n\t\t array('id' => '04','name' => 'Arequipa'),\n\t\t array('id' => '05','name' => 'Ayacucho'),\n\t\t array('id' => '06','name' => 'Cajamarca'),\n\t\t array('id' => '07','name' => 'Callao'),\n\t\t array('id' => '08','name' => 'Cusco'),\n\t\t array('id' => '09','name' => 'Huancavelica'),\n\t\t array('id' => '10','name' => 'Huánuco'),\n\t\t array('id' => '11','name' => 'Ica'),\n\t\t array('id' => '12','name' => 'Junín'),\n\t\t array('id' => '13','name' => 'La Libertad'),\n\t\t array('id' => '14','name' => 'Lambayeque'),\n\t\t array('id' => '15','name' => 'Lima'),\n\t\t array('id' => '16','name' => 'Loreto'),\n\t\t array('id' => '17','name' => 'Madre de Dios'),\n\t\t array('id' => '18','name' => 'Moquegua'),\n\t\t array('id' => '19','name' => 'Pasco'),\n\t\t array('id' => '20','name' => 'Piura'),\n\t\t array('id' => '21','name' => 'Puno'),\n\t\t array('id' => '22','name' => 'San Martín'),\n\t\t array('id' => '23','name' => 'Tacna'),\n\t\t array('id' => '24','name' => 'Tumbes'),\n\t\t array('id' => '25','name' => 'Ucayali')\n\t\t);\n\n\n\t\t$provinces = array(\n\t\t array('id' => '0101','name' => 'Chachapoyas','department_id' => '01'),\n\t\t array('id' => '0102','name' => 'Bagua','department_id' => '01'),\n\t\t array('id' => '0103','name' => 'Bongará','department_id' => '01'),\n\t\t array('id' => '0104','name' => 'Condorcanqui','department_id' => '01'),\n\t\t array('id' => '0105','name' => 'Luya','department_id' => '01'),\n\t\t array('id' => '0106','name' => 'Rodríguez de Mendoza','department_id' => '01'),\n\t\t array('id' => '0107','name' => 'Utcubamba','department_id' => '01'),\n\t\t array('id' => '0201','name' => 'Huaraz','department_id' => '02'),\n\t\t array('id' => '0202','name' => 'Aija','department_id' => '02'),\n\t\t array('id' => '0203','name' => 'Antonio Raymondi','department_id' => '02'),\n\t\t array('id' => '0204','name' => 'Asunción','department_id' => '02'),\n\t\t array('id' => '0205','name' => 'Bolognesi','department_id' => '02'),\n\t\t array('id' => '0206','name' => 'Carhuaz','department_id' => '02'),\n\t\t array('id' => '0207','name' => 'Carlos Fermín Fitzcarrald','department_id' => '02'),\n\t\t array('id' => '0208','name' => 'Casma','department_id' => '02'),\n\t\t array('id' => '0209','name' => 'Corongo','department_id' => '02'),\n\t\t array('id' => '0210','name' => 'Huari','department_id' => '02'),\n\t\t array('id' => '0211','name' => 'Huarmey','department_id' => '02'),\n\t\t array('id' => '0212','name' => 'Huaylas','department_id' => '02'),\n\t\t array('id' => '0213','name' => 'Mariscal Luzuriaga','department_id' => '02'),\n\t\t array('id' => '0214','name' => 'Ocros','department_id' => '02'),\n\t\t array('id' => '0215','name' => 'Pallasca','department_id' => '02'),\n\t\t array('id' => '0216','name' => 'Pomabamba','department_id' => '02'),\n\t\t array('id' => '0217','name' => 'Recuay','department_id' => '02'),\n\t\t array('id' => '0218','name' => 'Santa','department_id' => '02'),\n\t\t array('id' => '0219','name' => 'Sihuas','department_id' => '02'),\n\t\t array('id' => '0220','name' => 'Yungay','department_id' => '02'),\n\t\t array('id' => '0301','name' => 'Abancay','department_id' => '03'),\n\t\t array('id' => '0302','name' => 'Andahuaylas','department_id' => '03'),\n\t\t array('id' => '0303','name' => 'Antabamba','department_id' => '03'),\n\t\t array('id' => '0304','name' => 'Aymaraes','department_id' => '03'),\n\t\t array('id' => '0305','name' => 'Cotabambas','department_id' => '03'),\n\t\t array('id' => '0306','name' => 'Chincheros','department_id' => '03'),\n\t\t array('id' => '0307','name' => 'Grau','department_id' => '03'),\n\t\t array('id' => '0401','name' => 'Arequipa','department_id' => '04'),\n\t\t array('id' => '0402','name' => 'Camaná','department_id' => '04'),\n\t\t array('id' => '0403','name' => 'Caravelí','department_id' => '04'),\n\t\t array('id' => '0404','name' => 'Castilla','department_id' => '04'),\n\t\t array('id' => '0405','name' => 'Caylloma','department_id' => '04'),\n\t\t array('id' => '0406','name' => 'Condesuyos','department_id' => '04'),\n\t\t array('id' => '0407','name' => 'Islay','department_id' => '04'),\n\t\t array('id' => '0408','name' => 'La Uniòn','department_id' => '04'),\n\t\t array('id' => '0501','name' => 'Huamanga','department_id' => '05'),\n\t\t array('id' => '0502','name' => 'Cangallo','department_id' => '05'),\n\t\t array('id' => '0503','name' => 'Huanca Sancos','department_id' => '05'),\n\t\t array('id' => '0504','name' => 'Huanta','department_id' => '05'),\n\t\t array('id' => '0505','name' => 'La Mar','department_id' => '05'),\n\t\t array('id' => '0506','name' => 'Lucanas','department_id' => '05'),\n\t\t array('id' => '0507','name' => 'Parinacochas','department_id' => '05'),\n\t\t array('id' => '0508','name' => 'Pàucar del Sara Sara','department_id' => '05'),\n\t\t array('id' => '0509','name' => 'Sucre','department_id' => '05'),\n\t\t array('id' => '0510','name' => 'Víctor Fajardo','department_id' => '05'),\n\t\t array('id' => '0511','name' => 'Vilcas Huamán','department_id' => '05'),\n\t\t array('id' => '0601','name' => 'Cajamarca','department_id' => '06'),\n\t\t array('id' => '0602','name' => 'Cajabamba','department_id' => '06'),\n\t\t array('id' => '0603','name' => 'Celendín','department_id' => '06'),\n\t\t array('id' => '0604','name' => 'Chota','department_id' => '06'),\n\t\t array('id' => '0605','name' => 'Contumazá','department_id' => '06'),\n\t\t array('id' => '0606','name' => 'Cutervo','department_id' => '06'),\n\t\t array('id' => '0607','name' => 'Hualgayoc','department_id' => '06'),\n\t\t array('id' => '0608','name' => 'Jaén','department_id' => '06'),\n\t\t array('id' => '0609','name' => 'San Ignacio','department_id' => '06'),\n\t\t array('id' => '0610','name' => 'San Marcos','department_id' => '06'),\n\t\t array('id' => '0611','name' => 'San Miguel','department_id' => '06'),\n\t\t array('id' => '0612','name' => 'San Pablo','department_id' => '06'),\n\t\t array('id' => '0613','name' => 'Santa Cruz','department_id' => '06'),\n\t\t array('id' => '0701','name' => 'Prov. Const. del Callao','department_id' => '07'),\n\t\t array('id' => '0801','name' => 'Cusco','department_id' => '08'),\n\t\t array('id' => '0802','name' => 'Acomayo','department_id' => '08'),\n\t\t array('id' => '0803','name' => 'Anta','department_id' => '08'),\n\t\t array('id' => '0804','name' => 'Calca','department_id' => '08'),\n\t\t array('id' => '0805','name' => 'Canas','department_id' => '08'),\n\t\t array('id' => '0806','name' => 'Canchis','department_id' => '08'),\n\t\t array('id' => '0807','name' => 'Chumbivilcas','department_id' => '08'),\n\t\t array('id' => '0808','name' => 'Espinar','department_id' => '08'),\n\t\t array('id' => '0809','name' => 'La Convención','department_id' => '08'),\n\t\t array('id' => '0810','name' => 'Paruro','department_id' => '08'),\n\t\t array('id' => '0811','name' => 'Paucartambo','department_id' => '08'),\n\t\t array('id' => '0812','name' => 'Quispicanchi','department_id' => '08'),\n\t\t array('id' => '0813','name' => 'Urubamba','department_id' => '08'),\n\t\t array('id' => '0901','name' => 'Huancavelica','department_id' => '09'),\n\t\t array('id' => '0902','name' => 'Acobamba','department_id' => '09'),\n\t\t array('id' => '0903','name' => 'Angaraes','department_id' => '09'),\n\t\t array('id' => '0904','name' => 'Castrovirreyna','department_id' => '09'),\n\t\t array('id' => '0905','name' => 'Churcampa','department_id' => '09'),\n\t\t array('id' => '0906','name' => 'Huaytará','department_id' => '09'),\n\t\t array('id' => '0907','name' => 'Tayacaja','department_id' => '09'),\n\t\t array('id' => '1001','name' => 'Huánuco','department_id' => '10'),\n\t\t array('id' => '1002','name' => 'Ambo','department_id' => '10'),\n\t\t array('id' => '1003','name' => 'Dos de Mayo','department_id' => '10'),\n\t\t array('id' => '1004','name' => 'Huacaybamba','department_id' => '10'),\n\t\t array('id' => '1005','name' => 'Huamalíes','department_id' => '10'),\n\t\t array('id' => '1006','name' => 'Leoncio Prado','department_id' => '10'),\n\t\t array('id' => '1007','name' => 'Marañón','department_id' => '10'),\n\t\t array('id' => '1008','name' => 'Pachitea','department_id' => '10'),\n\t\t array('id' => '1009','name' => 'Puerto Inca','department_id' => '10'),\n\t\t array('id' => '1010','name' => 'Lauricocha ','department_id' => '10'),\n\t\t array('id' => '1011','name' => 'Yarowilca ','department_id' => '10'),\n\t\t array('id' => '1101','name' => 'Ica ','department_id' => '11'),\n\t\t array('id' => '1102','name' => 'Chincha ','department_id' => '11'),\n\t\t array('id' => '1103','name' => 'Nasca ','department_id' => '11'),\n\t\t array('id' => '1104','name' => 'Palpa ','department_id' => '11'),\n\t\t array('id' => '1105','name' => 'Pisco ','department_id' => '11'),\n\t\t array('id' => '1201','name' => 'Huancayo ','department_id' => '12'),\n\t\t array('id' => '1202','name' => 'Concepción ','department_id' => '12'),\n\t\t array('id' => '1203','name' => 'Chanchamayo ','department_id' => '12'),\n\t\t array('id' => '1204','name' => 'Jauja ','department_id' => '12'),\n\t\t array('id' => '1205','name' => 'Junín ','department_id' => '12'),\n\t\t array('id' => '1206','name' => 'Satipo ','department_id' => '12'),\n\t\t array('id' => '1207','name' => 'Tarma ','department_id' => '12'),\n\t\t array('id' => '1208','name' => 'Yauli ','department_id' => '12'),\n\t\t array('id' => '1209','name' => 'Chupaca ','department_id' => '12'),\n\t\t array('id' => '1301','name' => 'Trujillo ','department_id' => '13'),\n\t\t array('id' => '1302','name' => 'Ascope ','department_id' => '13'),\n\t\t array('id' => '1303','name' => 'Bolívar ','department_id' => '13'),\n\t\t array('id' => '1304','name' => 'Chepén ','department_id' => '13'),\n\t\t array('id' => '1305','name' => 'Julcán ','department_id' => '13'),\n\t\t array('id' => '1306','name' => 'Otuzco ','department_id' => '13'),\n\t\t array('id' => '1307','name' => 'Pacasmayo ','department_id' => '13'),\n\t\t array('id' => '1308','name' => 'Pataz ','department_id' => '13'),\n\t\t array('id' => '1309','name' => 'Sánchez Carrión ','department_id' => '13'),\n\t\t array('id' => '1310','name' => 'Santiago de Chuco ','department_id' => '13'),\n\t\t array('id' => '1311','name' => 'Gran Chimú ','department_id' => '13'),\n\t\t array('id' => '1312','name' => 'Virú ','department_id' => '13'),\n\t\t array('id' => '1401','name' => 'Chiclayo ','department_id' => '14'),\n\t\t array('id' => '1402','name' => 'Ferreñafe ','department_id' => '14'),\n\t\t array('id' => '1403','name' => 'Lambayeque ','department_id' => '14'),\n\t\t array('id' => '1501','name' => 'Lima ','department_id' => '15'),\n\t\t array('id' => '1502','name' => 'Barranca ','department_id' => '15'),\n\t\t array('id' => '1503','name' => 'Cajatambo ','department_id' => '15'),\n\t\t array('id' => '1504','name' => 'Canta ','department_id' => '15'),\n\t\t array('id' => '1505','name' => 'Cañete ','department_id' => '15'),\n\t\t array('id' => '1506','name' => 'Huaral ','department_id' => '15'),\n\t\t array('id' => '1507','name' => 'Huarochirí ','department_id' => '15'),\n\t\t array('id' => '1508','name' => 'Huaura ','department_id' => '15'),\n\t\t array('id' => '1509','name' => 'Oyón ','department_id' => '15'),\n\t\t array('id' => '1510','name' => 'Yauyos ','department_id' => '15'),\n\t\t array('id' => '1601','name' => 'Maynas ','department_id' => '16'),\n\t\t array('id' => '1602','name' => 'Alto Amazonas ','department_id' => '16'),\n\t\t array('id' => '1603','name' => 'Loreto ','department_id' => '16'),\n\t\t array('id' => '1604','name' => 'Mariscal Ramón Castilla ','department_id' => '16'),\n\t\t array('id' => '1605','name' => 'Requena ','department_id' => '16'),\n\t\t array('id' => '1606','name' => 'Ucayali ','department_id' => '16'),\n\t\t array('id' => '1607','name' => 'Datem del Marañón ','department_id' => '16'),\n\t\t array('id' => '1608','name' => 'Putumayo','department_id' => '16'),\n\t\t array('id' => '1701','name' => 'Tambopata ','department_id' => '17'),\n\t\t array('id' => '1702','name' => 'Manu ','department_id' => '17'),\n\t\t array('id' => '1703','name' => 'Tahuamanu ','department_id' => '17'),\n\t\t array('id' => '1801','name' => 'Mariscal Nieto ','department_id' => '18'),\n\t\t array('id' => '1802','name' => 'General Sánchez Cerro ','department_id' => '18'),\n\t\t array('id' => '1803','name' => 'Ilo ','department_id' => '18'),\n\t\t array('id' => '1901','name' => 'Pasco ','department_id' => '19'),\n\t\t array('id' => '1902','name' => 'Daniel Alcides Carrión ','department_id' => '19'),\n\t\t array('id' => '1903','name' => 'Oxapampa ','department_id' => '19'),\n\t\t array('id' => '2001','name' => 'Piura ','department_id' => '20'),\n\t\t array('id' => '2002','name' => 'Ayabaca ','department_id' => '20'),\n\t\t array('id' => '2003','name' => 'Huancabamba ','department_id' => '20'),\n\t\t array('id' => '2004','name' => 'Morropón ','department_id' => '20'),\n\t\t array('id' => '2005','name' => 'Paita ','department_id' => '20'),\n\t\t array('id' => '2006','name' => 'Sullana ','department_id' => '20'),\n\t\t array('id' => '2007','name' => 'Talara ','department_id' => '20'),\n\t\t array('id' => '2008','name' => 'Sechura ','department_id' => '20'),\n\t\t array('id' => '2101','name' => 'Puno ','department_id' => '21'),\n\t\t array('id' => '2102','name' => 'Azángaro ','department_id' => '21'),\n\t\t array('id' => '2103','name' => 'Carabaya ','department_id' => '21'),\n\t\t array('id' => '2104','name' => 'Chucuito ','department_id' => '21'),\n\t\t array('id' => '2105','name' => 'El Collao ','department_id' => '21'),\n\t\t array('id' => '2106','name' => 'Huancané ','department_id' => '21'),\n\t\t array('id' => '2107','name' => 'Lampa ','department_id' => '21'),\n\t\t array('id' => '2108','name' => 'Melgar ','department_id' => '21'),\n\t\t array('id' => '2109','name' => 'Moho ','department_id' => '21'),\n\t\t array('id' => '2110','name' => 'San Antonio de Putina ','department_id' => '21'),\n\t\t array('id' => '2111','name' => 'San Román ','department_id' => '21'),\n\t\t array('id' => '2112','name' => 'Sandia ','department_id' => '21'),\n\t\t array('id' => '2113','name' => 'Yunguyo ','department_id' => '21'),\n\t\t array('id' => '2201','name' => 'Moyobamba ','department_id' => '22'),\n\t\t array('id' => '2202','name' => 'Bellavista ','department_id' => '22'),\n\t\t array('id' => '2203','name' => 'El Dorado ','department_id' => '22'),\n\t\t array('id' => '2204','name' => 'Huallaga ','department_id' => '22'),\n\t\t array('id' => '2205','name' => 'Lamas ','department_id' => '22'),\n\t\t array('id' => '2206','name' => 'Mariscal Cáceres ','department_id' => '22'),\n\t\t array('id' => '2207','name' => 'Picota ','department_id' => '22'),\n\t\t array('id' => '2208','name' => 'Rioja ','department_id' => '22'),\n\t\t array('id' => '2209','name' => 'San Martín ','department_id' => '22'),\n\t\t array('id' => '2210','name' => 'Tocache ','department_id' => '22'),\n\t\t array('id' => '2301','name' => 'Tacna ','department_id' => '23'),\n\t\t array('id' => '2302','name' => 'Candarave ','department_id' => '23'),\n\t\t array('id' => '2303','name' => 'Jorge Basadre ','department_id' => '23'),\n\t\t array('id' => '2304','name' => 'Tarata ','department_id' => '23'),\n\t\t array('id' => '2401','name' => 'Tumbes ','department_id' => '24'),\n\t\t array('id' => '2402','name' => 'Contralmirante Villar ','department_id' => '24'),\n\t\t array('id' => '2403','name' => 'Zarumilla ','department_id' => '24'),\n\t\t array('id' => '2501','name' => 'Coronel Portillo ','department_id' => '25'),\n\t\t array('id' => '2502','name' => 'Atalaya ','department_id' => '25'),\n\t\t array('id' => '2503','name' => 'Padre Abad ','department_id' => '25'),\n\t\t array('id' => '2504','name' => 'Purús','department_id' => '25')\n\t\t);\n\n\t\t$districts = array(\n\t\t array('id' => '010101','name' => 'Chachapoyas','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010102','name' => 'Asunción','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010103','name' => 'Balsas','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010104','name' => 'Cheto','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010105','name' => 'Chiliquin','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010106','name' => 'Chuquibamba','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010107','name' => 'Granada','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010108','name' => 'Huancas','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010109','name' => 'La Jalca','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010110','name' => 'Leimebamba','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010111','name' => 'Levanto','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010112','name' => 'Magdalena','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010113','name' => 'Mariscal Castilla','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010114','name' => 'Molinopampa','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010115','name' => 'Montevideo','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010116','name' => 'Olleros','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010117','name' => 'Quinjalca','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010118','name' => 'San Francisco de Daguas','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010119','name' => 'San Isidro de Maino','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010120','name' => 'Soloco','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010121','name' => 'Sonche','province_id' => '0101','department_id' => '01'),\n\t\t array('id' => '010201','name' => 'Bagua','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010202','name' => 'Aramango','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010203','name' => 'Copallin','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010204','name' => 'El Parco','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010205','name' => 'Imaza','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010206','name' => 'La Peca','province_id' => '0102','department_id' => '01'),\n\t\t array('id' => '010301','name' => 'Jumbilla','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010302','name' => 'Chisquilla','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010303','name' => 'Churuja','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010304','name' => 'Corosha','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010305','name' => 'Cuispes','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010306','name' => 'Florida','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010307','name' => 'Jazan','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010308','name' => 'Recta','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010309','name' => 'San Carlos','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010310','name' => 'Shipasbamba','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010311','name' => 'Valera','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010312','name' => 'Yambrasbamba','province_id' => '0103','department_id' => '01'),\n\t\t array('id' => '010401','name' => 'Nieva','province_id' => '0104','department_id' => '01'),\n\t\t array('id' => '010402','name' => 'El Cenepa','province_id' => '0104','department_id' => '01'),\n\t\t array('id' => '010403','name' => 'Río Santiago','province_id' => '0104','department_id' => '01'),\n\t\t array('id' => '010501','name' => 'Lamud','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010502','name' => 'Camporredondo','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010503','name' => 'Cocabamba','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010504','name' => 'Colcamar','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010505','name' => 'Conila','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010506','name' => 'Inguilpata','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010507','name' => 'Longuita','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010508','name' => 'Lonya Chico','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010509','name' => 'Luya','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010510','name' => 'Luya Viejo','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010511','name' => 'María','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010512','name' => 'Ocalli','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010513','name' => 'Ocumal','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010514','name' => 'Pisuquia','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010515','name' => 'Providencia','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010516','name' => 'San Cristóbal','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010517','name' => 'San Francisco de Yeso','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010518','name' => 'San Jerónimo','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010519','name' => 'San Juan de Lopecancha','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010520','name' => 'Santa Catalina','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010521','name' => 'Santo Tomas','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010522','name' => 'Tingo','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010523','name' => 'Trita','province_id' => '0105','department_id' => '01'),\n\t\t array('id' => '010601','name' => 'San Nicolás','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010602','name' => 'Chirimoto','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010603','name' => 'Cochamal','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010604','name' => 'Huambo','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010605','name' => 'Limabamba','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010606','name' => 'Longar','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010607','name' => 'Mariscal Benavides','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010608','name' => 'Milpuc','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010609','name' => 'Omia','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010610','name' => 'Santa Rosa','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010611','name' => 'Totora','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010612','name' => 'Vista Alegre','province_id' => '0106','department_id' => '01'),\n\t\t array('id' => '010701','name' => 'Bagua Grande','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010702','name' => 'Cajaruro','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010703','name' => 'Cumba','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010704','name' => 'El Milagro','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010705','name' => 'Jamalca','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010706','name' => 'Lonya Grande','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '010707','name' => 'Yamon','province_id' => '0107','department_id' => '01'),\n\t\t array('id' => '020101','name' => 'Huaraz','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020102','name' => 'Cochabamba','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020103','name' => 'Colcabamba','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020104','name' => 'Huanchay','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020105','name' => 'Independencia','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020106','name' => 'Jangas','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020107','name' => 'La Libertad','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020108','name' => 'Olleros','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020109','name' => 'Pampas Grande','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020110','name' => 'Pariacoto','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020111','name' => 'Pira','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020112','name' => 'Tarica','province_id' => '0201','department_id' => '02'),\n\t\t array('id' => '020201','name' => 'Aija','province_id' => '0202','department_id' => '02'),\n\t\t array('id' => '020202','name' => 'Coris','province_id' => '0202','department_id' => '02'),\n\t\t array('id' => '020203','name' => 'Huacllan','province_id' => '0202','department_id' => '02'),\n\t\t array('id' => '020204','name' => 'La Merced','province_id' => '0202','department_id' => '02'),\n\t\t array('id' => '020205','name' => 'Succha','province_id' => '0202','department_id' => '02'),\n\t\t array('id' => '020301','name' => 'Llamellin','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020302','name' => 'Aczo','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020303','name' => 'Chaccho','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020304','name' => 'Chingas','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020305','name' => 'Mirgas','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020306','name' => 'San Juan de Rontoy','province_id' => '0203','department_id' => '02'),\n\t\t array('id' => '020401','name' => 'Chacas','province_id' => '0204','department_id' => '02'),\n\t\t array('id' => '020402','name' => 'Acochaca','province_id' => '0204','department_id' => '02'),\n\t\t array('id' => '020501','name' => 'Chiquian','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020502','name' => 'Abelardo Pardo Lezameta','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020503','name' => 'Antonio Raymondi','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020504','name' => 'Aquia','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020505','name' => 'Cajacay','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020506','name' => 'Canis','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020507','name' => 'Colquioc','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020508','name' => 'Huallanca','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020509','name' => 'Huasta','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020510','name' => 'Huayllacayan','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020511','name' => 'La Primavera','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020512','name' => 'Mangas','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020513','name' => 'Pacllon','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020514','name' => 'San Miguel de Corpanqui','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020515','name' => 'Ticllos','province_id' => '0205','department_id' => '02'),\n\t\t array('id' => '020601','name' => 'Carhuaz','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020602','name' => 'Acopampa','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020603','name' => 'Amashca','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020604','name' => 'Anta','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020605','name' => 'Ataquero','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020606','name' => 'Marcara','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020607','name' => 'Pariahuanca','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020608','name' => 'San Miguel de Aco','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020609','name' => 'Shilla','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020610','name' => 'Tinco','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020611','name' => 'Yungar','province_id' => '0206','department_id' => '02'),\n\t\t array('id' => '020701','name' => 'San Luis','province_id' => '0207','department_id' => '02'),\n\t\t array('id' => '020702','name' => 'San Nicolás','province_id' => '0207','department_id' => '02'),\n\t\t array('id' => '020703','name' => 'Yauya','province_id' => '0207','department_id' => '02'),\n\t\t array('id' => '020801','name' => 'Casma','province_id' => '0208','department_id' => '02'),\n\t\t array('id' => '020802','name' => 'Buena Vista Alta','province_id' => '0208','department_id' => '02'),\n\t\t array('id' => '020803','name' => 'Comandante Noel','province_id' => '0208','department_id' => '02'),\n\t\t array('id' => '020804','name' => 'Yautan','province_id' => '0208','department_id' => '02'),\n\t\t array('id' => '020901','name' => 'Corongo','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020902','name' => 'Aco','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020903','name' => 'Bambas','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020904','name' => 'Cusca','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020905','name' => 'La Pampa','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020906','name' => 'Yanac','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '020907','name' => 'Yupan','province_id' => '0209','department_id' => '02'),\n\t\t array('id' => '021001','name' => 'Huari','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021002','name' => 'Anra','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021003','name' => 'Cajay','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021004','name' => 'Chavin de Huantar','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021005','name' => 'Huacachi','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021006','name' => 'Huacchis','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021007','name' => 'Huachis','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021008','name' => 'Huantar','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021009','name' => 'Masin','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021010','name' => 'Paucas','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021011','name' => 'Ponto','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021012','name' => 'Rahuapampa','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021013','name' => 'Rapayan','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021014','name' => 'San Marcos','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021015','name' => 'San Pedro de Chana','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021016','name' => 'Uco','province_id' => '0210','department_id' => '02'),\n\t\t array('id' => '021101','name' => 'Huarmey','province_id' => '0211','department_id' => '02'),\n\t\t array('id' => '021102','name' => 'Cochapeti','province_id' => '0211','department_id' => '02'),\n\t\t array('id' => '021103','name' => 'Culebras','province_id' => '0211','department_id' => '02'),\n\t\t array('id' => '021104','name' => 'Huayan','province_id' => '0211','department_id' => '02'),\n\t\t array('id' => '021105','name' => 'Malvas','province_id' => '0211','department_id' => '02'),\n\t\t array('id' => '021201','name' => 'Caraz','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021202','name' => 'Huallanca','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021203','name' => 'Huata','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021204','name' => 'Huaylas','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021205','name' => 'Mato','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021206','name' => 'Pamparomas','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021207','name' => 'Pueblo Libre','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021208','name' => 'Santa Cruz','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021209','name' => 'Santo Toribio','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021210','name' => 'Yuracmarca','province_id' => '0212','department_id' => '02'),\n\t\t array('id' => '021301','name' => 'Piscobamba','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021302','name' => 'Casca','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021303','name' => 'Eleazar Guzmán Barron','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021304','name' => 'Fidel Olivas Escudero','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021305','name' => 'Llama','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021306','name' => 'Llumpa','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021307','name' => 'Lucma','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021308','name' => 'Musga','province_id' => '0213','department_id' => '02'),\n\t\t array('id' => '021401','name' => 'Ocros','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021402','name' => 'Acas','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021403','name' => 'Cajamarquilla','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021404','name' => 'Carhuapampa','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021405','name' => 'Cochas','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021406','name' => 'Congas','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021407','name' => 'Llipa','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021408','name' => 'San Cristóbal de Rajan','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021409','name' => 'San Pedro','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021410','name' => 'Santiago de Chilcas','province_id' => '0214','department_id' => '02'),\n\t\t array('id' => '021501','name' => 'Cabana','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021502','name' => 'Bolognesi','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021503','name' => 'Conchucos','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021504','name' => 'Huacaschuque','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021505','name' => 'Huandoval','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021506','name' => 'Lacabamba','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021507','name' => 'Llapo','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021508','name' => 'Pallasca','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021509','name' => 'Pampas','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021510','name' => 'Santa Rosa','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021511','name' => 'Tauca','province_id' => '0215','department_id' => '02'),\n\t\t array('id' => '021601','name' => 'Pomabamba','province_id' => '0216','department_id' => '02'),\n\t\t array('id' => '021602','name' => 'Huayllan','province_id' => '0216','department_id' => '02'),\n\t\t array('id' => '021603','name' => 'Parobamba','province_id' => '0216','department_id' => '02'),\n\t\t array('id' => '021604','name' => 'Quinuabamba','province_id' => '0216','department_id' => '02'),\n\t\t array('id' => '021701','name' => 'Recuay','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021702','name' => 'Catac','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021703','name' => 'Cotaparaco','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021704','name' => 'Huayllapampa','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021705','name' => 'Llacllin','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021706','name' => 'Marca','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021707','name' => 'Pampas Chico','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021708','name' => 'Pararin','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021709','name' => 'Tapacocha','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021710','name' => 'Ticapampa','province_id' => '0217','department_id' => '02'),\n\t\t array('id' => '021801','name' => 'Chimbote','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021802','name' => 'Cáceres del Perú','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021803','name' => 'Coishco','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021804','name' => 'Macate','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021805','name' => 'Moro','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021806','name' => 'Nepeña','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021807','name' => 'Samanco','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021808','name' => 'Santa','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021809','name' => 'Nuevo Chimbote','province_id' => '0218','department_id' => '02'),\n\t\t array('id' => '021901','name' => 'Sihuas','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021902','name' => 'Acobamba','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021903','name' => 'Alfonso Ugarte','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021904','name' => 'Cashapampa','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021905','name' => 'Chingalpo','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021906','name' => 'Huayllabamba','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021907','name' => 'Quiches','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021908','name' => 'Ragash','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021909','name' => 'San Juan','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '021910','name' => 'Sicsibamba','province_id' => '0219','department_id' => '02'),\n\t\t array('id' => '022001','name' => 'Yungay','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022002','name' => 'Cascapara','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022003','name' => 'Mancos','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022004','name' => 'Matacoto','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022005','name' => 'Quillo','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022006','name' => 'Ranrahirca','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022007','name' => 'Shupluy','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '022008','name' => 'Yanama','province_id' => '0220','department_id' => '02'),\n\t\t array('id' => '030101','name' => 'Abancay','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030102','name' => 'Chacoche','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030103','name' => 'Circa','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030104','name' => 'Curahuasi','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030105','name' => 'Huanipaca','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030106','name' => 'Lambrama','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030107','name' => 'Pichirhua','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030108','name' => 'San Pedro de Cachora','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030109','name' => 'Tamburco','province_id' => '0301','department_id' => '03'),\n\t\t array('id' => '030201','name' => 'Andahuaylas','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030202','name' => 'Andarapa','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030203','name' => 'Chiara','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030204','name' => 'Huancarama','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030205','name' => 'Huancaray','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030206','name' => 'Huayana','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030207','name' => 'Kishuara','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030208','name' => 'Pacobamba','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030209','name' => 'Pacucha','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030210','name' => 'Pampachiri','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030211','name' => 'Pomacocha','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030212','name' => 'San Antonio de Cachi','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030213','name' => 'San Jerónimo','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030214','name' => 'San Miguel de Chaccrampa','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030215','name' => 'Santa María de Chicmo','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030216','name' => 'Talavera','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030217','name' => 'Tumay Huaraca','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030218','name' => 'Turpo','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030219','name' => 'Kaquiabamba','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030220','name' => 'José María Arguedas','province_id' => '0302','department_id' => '03'),\n\t\t array('id' => '030301','name' => 'Antabamba','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030302','name' => 'El Oro','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030303','name' => 'Huaquirca','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030304','name' => 'Juan Espinoza Medrano','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030305','name' => 'Oropesa','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030306','name' => 'Pachaconas','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030307','name' => 'Sabaino','province_id' => '0303','department_id' => '03'),\n\t\t array('id' => '030401','name' => 'Chalhuanca','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030402','name' => 'Capaya','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030403','name' => 'Caraybamba','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030404','name' => 'Chapimarca','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030405','name' => 'Colcabamba','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030406','name' => 'Cotaruse','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030407','name' => 'Ihuayllo','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030408','name' => 'Justo Apu Sahuaraura','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030409','name' => 'Lucre','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030410','name' => 'Pocohuanca','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030411','name' => 'San Juan de Chacña','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030412','name' => 'Sañayca','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030413','name' => 'Soraya','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030414','name' => 'Tapairihua','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030415','name' => 'Tintay','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030416','name' => 'Toraya','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030417','name' => 'Yanaca','province_id' => '0304','department_id' => '03'),\n\t\t array('id' => '030501','name' => 'Tambobamba','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030502','name' => 'Cotabambas','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030503','name' => 'Coyllurqui','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030504','name' => 'Haquira','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030505','name' => 'Mara','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030506','name' => 'Challhuahuacho','province_id' => '0305','department_id' => '03'),\n\t\t array('id' => '030601','name' => 'Chincheros','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030602','name' => 'Anco_Huallo','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030603','name' => 'Cocharcas','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030604','name' => 'Huaccana','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030605','name' => 'Ocobamba','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030606','name' => 'Ongoy','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030607','name' => 'Uranmarca','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030608','name' => 'Ranracancha','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030609','name' => 'Rocchacc','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030610','name' => 'El Porvenir','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030611','name' => 'Los Chankas','province_id' => '0306','department_id' => '03'),\n\t\t array('id' => '030701','name' => 'Chuquibambilla','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030702','name' => 'Curpahuasi','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030703','name' => 'Gamarra','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030704','name' => 'Huayllati','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030705','name' => 'Mamara','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030706','name' => 'Micaela Bastidas','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030707','name' => 'Pataypampa','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030708','name' => 'Progreso','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030709','name' => 'San Antonio','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030710','name' => 'Santa Rosa','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030711','name' => 'Turpay','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030712','name' => 'Vilcabamba','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030713','name' => 'Virundo','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '030714','name' => 'Curasco','province_id' => '0307','department_id' => '03'),\n\t\t array('id' => '040101','name' => 'Arequipa','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040102','name' => 'Alto Selva Alegre','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040103','name' => 'Cayma','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040104','name' => 'Cerro Colorado','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040105','name' => 'Characato','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040106','name' => 'Chiguata','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040107','name' => 'Jacobo Hunter','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040108','name' => 'La Joya','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040109','name' => 'Mariano Melgar','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040110','name' => 'Miraflores','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040111','name' => 'Mollebaya','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040112','name' => 'Paucarpata','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040113','name' => 'Pocsi','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040114','name' => 'Polobaya','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040115','name' => 'Quequeña','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040116','name' => 'Sabandia','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040117','name' => 'Sachaca','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040118','name' => 'San Juan de Siguas','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040119','name' => 'San Juan de Tarucani','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040120','name' => 'Santa Isabel de Siguas','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040121','name' => 'Santa Rita de Siguas','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040122','name' => 'Socabaya','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040123','name' => 'Tiabaya','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040124','name' => 'Uchumayo','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040125','name' => 'Vitor','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040126','name' => 'Yanahuara','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040127','name' => 'Yarabamba','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040128','name' => 'Yura','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040129','name' => 'José Luis Bustamante Y Rivero','province_id' => '0401','department_id' => '04'),\n\t\t array('id' => '040201','name' => 'Camaná','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040202','name' => 'José María Quimper','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040203','name' => 'Mariano Nicolás Valcárcel','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040204','name' => 'Mariscal Cáceres','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040205','name' => 'Nicolás de Pierola','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040206','name' => 'Ocoña','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040207','name' => 'Quilca','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040208','name' => 'Samuel Pastor','province_id' => '0402','department_id' => '04'),\n\t\t array('id' => '040301','name' => 'Caravelí','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040302','name' => 'Acarí','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040303','name' => 'Atico','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040304','name' => 'Atiquipa','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040305','name' => 'Bella Unión','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040306','name' => 'Cahuacho','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040307','name' => 'Chala','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040308','name' => 'Chaparra','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040309','name' => 'Huanuhuanu','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040310','name' => 'Jaqui','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040311','name' => 'Lomas','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040312','name' => 'Quicacha','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040313','name' => 'Yauca','province_id' => '0403','department_id' => '04'),\n\t\t array('id' => '040401','name' => 'Aplao','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040402','name' => 'Andagua','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040403','name' => 'Ayo','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040404','name' => 'Chachas','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040405','name' => 'Chilcaymarca','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040406','name' => 'Choco','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040407','name' => 'Huancarqui','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040408','name' => 'Machaguay','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040409','name' => 'Orcopampa','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040410','name' => 'Pampacolca','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040411','name' => 'Tipan','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040412','name' => 'Uñon','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040413','name' => 'Uraca','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040414','name' => 'Viraco','province_id' => '0404','department_id' => '04'),\n\t\t array('id' => '040501','name' => 'Chivay','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040502','name' => 'Achoma','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040503','name' => 'Cabanaconde','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040504','name' => 'Callalli','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040505','name' => 'Caylloma','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040506','name' => 'Coporaque','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040507','name' => 'Huambo','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040508','name' => 'Huanca','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040509','name' => 'Ichupampa','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040510','name' => 'Lari','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040511','name' => 'Lluta','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040512','name' => 'Maca','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040513','name' => 'Madrigal','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040514','name' => 'San Antonio de Chuca','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040515','name' => 'Sibayo','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040516','name' => 'Tapay','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040517','name' => 'Tisco','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040518','name' => 'Tuti','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040519','name' => 'Yanque','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040520','name' => 'Majes','province_id' => '0405','department_id' => '04'),\n\t\t array('id' => '040601','name' => 'Chuquibamba','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040602','name' => 'Andaray','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040603','name' => 'Cayarani','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040604','name' => 'Chichas','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040605','name' => 'Iray','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040606','name' => 'Río Grande','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040607','name' => 'Salamanca','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040608','name' => 'Yanaquihua','province_id' => '0406','department_id' => '04'),\n\t\t array('id' => '040701','name' => 'Mollendo','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040702','name' => 'Cocachacra','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040703','name' => 'Dean Valdivia','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040704','name' => 'Islay','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040705','name' => 'Mejia','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040706','name' => 'Punta de Bombón','province_id' => '0407','department_id' => '04'),\n\t\t array('id' => '040801','name' => 'Cotahuasi','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040802','name' => 'Alca','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040803','name' => 'Charcana','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040804','name' => 'Huaynacotas','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040805','name' => 'Pampamarca','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040806','name' => 'Puyca','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040807','name' => 'Quechualla','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040808','name' => 'Sayla','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040809','name' => 'Tauria','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040810','name' => 'Tomepampa','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '040811','name' => 'Toro','province_id' => '0408','department_id' => '04'),\n\t\t array('id' => '050101','name' => 'Ayacucho','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050102','name' => 'Acocro','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050103','name' => 'Acos Vinchos','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050104','name' => 'Carmen Alto','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050105','name' => 'Chiara','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050106','name' => 'Ocros','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050107','name' => 'Pacaycasa','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050108','name' => 'Quinua','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050109','name' => 'San José de Ticllas','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050110','name' => 'San Juan Bautista','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050111','name' => 'Santiago de Pischa','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050112','name' => 'Socos','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050113','name' => 'Tambillo','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050114','name' => 'Vinchos','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050115','name' => 'Jesús Nazareno','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050116','name' => 'Andrés Avelino Cáceres Dorregaray','province_id' => '0501','department_id' => '05'),\n\t\t array('id' => '050201','name' => 'Cangallo','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050202','name' => 'Chuschi','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050203','name' => 'Los Morochucos','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050204','name' => 'María Parado de Bellido','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050205','name' => 'Paras','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050206','name' => 'Totos','province_id' => '0502','department_id' => '05'),\n\t\t array('id' => '050301','name' => 'Sancos','province_id' => '0503','department_id' => '05'),\n\t\t array('id' => '050302','name' => 'Carapo','province_id' => '0503','department_id' => '05'),\n\t\t array('id' => '050303','name' => 'Sacsamarca','province_id' => '0503','department_id' => '05'),\n\t\t array('id' => '050304','name' => 'Santiago de Lucanamarca','province_id' => '0503','department_id' => '05'),\n\t\t array('id' => '050401','name' => 'Huanta','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050402','name' => 'Ayahuanco','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050403','name' => 'Huamanguilla','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050404','name' => 'Iguain','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050405','name' => 'Luricocha','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050406','name' => 'Santillana','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050407','name' => 'Sivia','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050408','name' => 'Llochegua','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050409','name' => 'Canayre','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050410','name' => 'Uchuraccay','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050411','name' => 'Pucacolpa','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050412','name' => 'Chaca','province_id' => '0504','department_id' => '05'),\n\t\t array('id' => '050501','name' => 'San Miguel','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050502','name' => 'Anco','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050503','name' => 'Ayna','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050504','name' => 'Chilcas','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050505','name' => 'Chungui','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050506','name' => 'Luis Carranza','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050507','name' => 'Santa Rosa','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050508','name' => 'Tambo','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050509','name' => 'Samugari','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050510','name' => 'Anchihuay','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050511','name' => 'Oronccoy','province_id' => '0505','department_id' => '05'),\n\t\t array('id' => '050601','name' => 'Puquio','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050602','name' => 'Aucara','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050603','name' => 'Cabana','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050604','name' => 'Carmen Salcedo','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050605','name' => 'Chaviña','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050606','name' => 'Chipao','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050607','name' => 'Huac-Huas','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050608','name' => 'Laramate','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050609','name' => 'Leoncio Prado','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050610','name' => 'Llauta','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050611','name' => 'Lucanas','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050612','name' => 'Ocaña','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050613','name' => 'Otoca','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050614','name' => 'Saisa','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050615','name' => 'San Cristóbal','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050616','name' => 'San Juan','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050617','name' => 'San Pedro','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050618','name' => 'San Pedro de Palco','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050619','name' => 'Sancos','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050620','name' => 'Santa Ana de Huaycahuacho','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050621','name' => 'Santa Lucia','province_id' => '0506','department_id' => '05'),\n\t\t array('id' => '050701','name' => 'Coracora','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050702','name' => 'Chumpi','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050703','name' => 'Coronel Castañeda','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050704','name' => 'Pacapausa','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050705','name' => 'Pullo','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050706','name' => 'Puyusca','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050707','name' => 'San Francisco de Ravacayco','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050708','name' => 'Upahuacho','province_id' => '0507','department_id' => '05'),\n\t\t array('id' => '050801','name' => 'Pausa','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050802','name' => 'Colta','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050803','name' => 'Corculla','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050804','name' => 'Lampa','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050805','name' => 'Marcabamba','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050806','name' => 'Oyolo','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050807','name' => 'Pararca','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050808','name' => 'San Javier de Alpabamba','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050809','name' => 'San José de Ushua','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050810','name' => 'Sara Sara','province_id' => '0508','department_id' => '05'),\n\t\t array('id' => '050901','name' => 'Querobamba','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050902','name' => 'Belén','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050903','name' => 'Chalcos','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050904','name' => 'Chilcayoc','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050905','name' => 'Huacaña','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050906','name' => 'Morcolla','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050907','name' => 'Paico','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050908','name' => 'San Pedro de Larcay','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050909','name' => 'San Salvador de Quije','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050910','name' => 'Santiago de Paucaray','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '050911','name' => 'Soras','province_id' => '0509','department_id' => '05'),\n\t\t array('id' => '051001','name' => 'Huancapi','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051002','name' => 'Alcamenca','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051003','name' => 'Apongo','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051004','name' => 'Asquipata','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051005','name' => 'Canaria','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051006','name' => 'Cayara','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051007','name' => 'Colca','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051008','name' => 'Huamanquiquia','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051009','name' => 'Huancaraylla','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051010','name' => 'Hualla','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051011','name' => 'Sarhua','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051012','name' => 'Vilcanchos','province_id' => '0510','department_id' => '05'),\n\t\t array('id' => '051101','name' => 'Vilcas Huaman','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051102','name' => 'Accomarca','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051103','name' => 'Carhuanca','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051104','name' => 'Concepción','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051105','name' => 'Huambalpa','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051106','name' => 'Independencia','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051107','name' => 'Saurama','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '051108','name' => 'Vischongo','province_id' => '0511','department_id' => '05'),\n\t\t array('id' => '060101','name' => 'Cajamarca','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060102','name' => 'Asunción','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060103','name' => 'Chetilla','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060104','name' => 'Cospan','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060105','name' => 'Encañada','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060106','name' => 'Jesús','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060107','name' => 'Llacanora','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060108','name' => 'Los Baños del Inca','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060109','name' => 'Magdalena','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060110','name' => 'Matara','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060111','name' => 'Namora','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060112','name' => 'San Juan','province_id' => '0601','department_id' => '06'),\n\t\t array('id' => '060201','name' => 'Cajabamba','province_id' => '0602','department_id' => '06'),\n\t\t array('id' => '060202','name' => 'Cachachi','province_id' => '0602','department_id' => '06'),\n\t\t array('id' => '060203','name' => 'Condebamba','province_id' => '0602','department_id' => '06'),\n\t\t array('id' => '060204','name' => 'Sitacocha','province_id' => '0602','department_id' => '06'),\n\t\t array('id' => '060301','name' => 'Celendín','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060302','name' => 'Chumuch','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060303','name' => 'Cortegana','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060304','name' => 'Huasmin','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060305','name' => 'Jorge Chávez','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060306','name' => 'José Gálvez','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060307','name' => 'Miguel Iglesias','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060308','name' => 'Oxamarca','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060309','name' => 'Sorochuco','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060310','name' => 'Sucre','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060311','name' => 'Utco','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060312','name' => 'La Libertad de Pallan','province_id' => '0603','department_id' => '06'),\n\t\t array('id' => '060401','name' => 'Chota','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060402','name' => 'Anguia','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060403','name' => 'Chadin','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060404','name' => 'Chiguirip','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060405','name' => 'Chimban','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060406','name' => 'Choropampa','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060407','name' => 'Cochabamba','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060408','name' => 'Conchan','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060409','name' => 'Huambos','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060410','name' => 'Lajas','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060411','name' => 'Llama','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060412','name' => 'Miracosta','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060413','name' => 'Paccha','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060414','name' => 'Pion','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060415','name' => 'Querocoto','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060416','name' => 'San Juan de Licupis','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060417','name' => 'Tacabamba','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060418','name' => 'Tocmoche','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060419','name' => 'Chalamarca','province_id' => '0604','department_id' => '06'),\n\t\t array('id' => '060501','name' => 'Contumaza','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060502','name' => 'Chilete','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060503','name' => 'Cupisnique','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060504','name' => 'Guzmango','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060505','name' => 'San Benito','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060506','name' => 'Santa Cruz de Toledo','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060507','name' => 'Tantarica','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060508','name' => 'Yonan','province_id' => '0605','department_id' => '06'),\n\t\t array('id' => '060601','name' => 'Cutervo','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060602','name' => 'Callayuc','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060603','name' => 'Choros','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060604','name' => 'Cujillo','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060605','name' => 'La Ramada','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060606','name' => 'Pimpingos','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060607','name' => 'Querocotillo','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060608','name' => 'San Andrés de Cutervo','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060609','name' => 'San Juan de Cutervo','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060610','name' => 'San Luis de Lucma','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060611','name' => 'Santa Cruz','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060612','name' => 'Santo Domingo de la Capilla','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060613','name' => 'Santo Tomas','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060614','name' => 'Socota','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060615','name' => 'Toribio Casanova','province_id' => '0606','department_id' => '06'),\n\t\t array('id' => '060701','name' => 'Bambamarca','province_id' => '0607','department_id' => '06'),\n\t\t array('id' => '060702','name' => 'Chugur','province_id' => '0607','department_id' => '06'),\n\t\t array('id' => '060703','name' => 'Hualgayoc','province_id' => '0607','department_id' => '06'),\n\t\t array('id' => '060801','name' => 'Jaén','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060802','name' => 'Bellavista','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060803','name' => 'Chontali','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060804','name' => 'Colasay','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060805','name' => 'Huabal','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060806','name' => 'Las Pirias','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060807','name' => 'Pomahuaca','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060808','name' => 'Pucara','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060809','name' => 'Sallique','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060810','name' => 'San Felipe','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060811','name' => 'San José del Alto','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060812','name' => 'Santa Rosa','province_id' => '0608','department_id' => '06'),\n\t\t array('id' => '060901','name' => 'San Ignacio','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060902','name' => 'Chirinos','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060903','name' => 'Huarango','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060904','name' => 'La Coipa','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060905','name' => 'Namballe','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060906','name' => 'San José de Lourdes','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '060907','name' => 'Tabaconas','province_id' => '0609','department_id' => '06'),\n\t\t array('id' => '061001','name' => 'Pedro Gálvez','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061002','name' => 'Chancay','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061003','name' => 'Eduardo Villanueva','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061004','name' => 'Gregorio Pita','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061005','name' => 'Ichocan','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061006','name' => 'José Manuel Quiroz','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061007','name' => 'José Sabogal','province_id' => '0610','department_id' => '06'),\n\t\t array('id' => '061101','name' => 'San Miguel','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061102','name' => 'Bolívar','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061103','name' => 'Calquis','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061104','name' => 'Catilluc','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061105','name' => 'El Prado','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061106','name' => 'La Florida','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061107','name' => 'Llapa','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061108','name' => 'Nanchoc','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061109','name' => 'Niepos','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061110','name' => 'San Gregorio','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061111','name' => 'San Silvestre de Cochan','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061112','name' => 'Tongod','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061113','name' => 'Unión Agua Blanca','province_id' => '0611','department_id' => '06'),\n\t\t array('id' => '061201','name' => 'San Pablo','province_id' => '0612','department_id' => '06'),\n\t\t array('id' => '061202','name' => 'San Bernardino','province_id' => '0612','department_id' => '06'),\n\t\t array('id' => '061203','name' => 'San Luis','province_id' => '0612','department_id' => '06'),\n\t\t array('id' => '061204','name' => 'Tumbaden','province_id' => '0612','department_id' => '06'),\n\t\t array('id' => '061301','name' => 'Santa Cruz','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061302','name' => 'Andabamba','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061303','name' => 'Catache','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061304','name' => 'Chancaybaños','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061305','name' => 'La Esperanza','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061306','name' => 'Ninabamba','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061307','name' => 'Pulan','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061308','name' => 'Saucepampa','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061309','name' => 'Sexi','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061310','name' => 'Uticyacu','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '061311','name' => 'Yauyucan','province_id' => '0613','department_id' => '06'),\n\t\t array('id' => '070101','name' => 'Callao','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070102','name' => 'Bellavista','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070103','name' => 'Carmen de la Legua Reynoso','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070104','name' => 'La Perla','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070105','name' => 'La Punta','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070106','name' => 'Ventanilla','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '070107','name' => 'Mi Perú','province_id' => '0701','department_id' => '07'),\n\t\t array('id' => '080101','name' => 'Cusco','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080102','name' => 'Ccorca','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080103','name' => 'Poroy','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080104','name' => 'San Jerónimo','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080105','name' => 'San Sebastian','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080106','name' => 'Santiago','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080107','name' => 'Saylla','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080108','name' => 'Wanchaq','province_id' => '0801','department_id' => '08'),\n\t\t array('id' => '080201','name' => 'Acomayo','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080202','name' => 'Acopia','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080203','name' => 'Acos','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080204','name' => 'Mosoc Llacta','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080205','name' => 'Pomacanchi','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080206','name' => 'Rondocan','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080207','name' => 'Sangarara','province_id' => '0802','department_id' => '08'),\n\t\t array('id' => '080301','name' => 'Anta','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080302','name' => 'Ancahuasi','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080303','name' => 'Cachimayo','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080304','name' => 'Chinchaypujio','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080305','name' => 'Huarocondo','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080306','name' => 'Limatambo','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080307','name' => 'Mollepata','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080308','name' => 'Pucyura','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080309','name' => 'Zurite','province_id' => '0803','department_id' => '08'),\n\t\t array('id' => '080401','name' => 'Calca','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080402','name' => 'Coya','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080403','name' => 'Lamay','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080404','name' => 'Lares','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080405','name' => 'Pisac','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080406','name' => 'San Salvador','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080407','name' => 'Taray','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080408','name' => 'Yanatile','province_id' => '0804','department_id' => '08'),\n\t\t array('id' => '080501','name' => 'Yanaoca','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080502','name' => 'Checca','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080503','name' => 'Kunturkanki','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080504','name' => 'Langui','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080505','name' => 'Layo','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080506','name' => 'Pampamarca','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080507','name' => 'Quehue','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080508','name' => 'Tupac Amaru','province_id' => '0805','department_id' => '08'),\n\t\t array('id' => '080601','name' => 'Sicuani','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080602','name' => 'Checacupe','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080603','name' => 'Combapata','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080604','name' => 'Marangani','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080605','name' => 'Pitumarca','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080606','name' => 'San Pablo','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080607','name' => 'San Pedro','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080608','name' => 'Tinta','province_id' => '0806','department_id' => '08'),\n\t\t array('id' => '080701','name' => 'Santo Tomas','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080702','name' => 'Capacmarca','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080703','name' => 'Chamaca','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080704','name' => 'Colquemarca','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080705','name' => 'Livitaca','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080706','name' => 'Llusco','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080707','name' => 'Quiñota','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080708','name' => 'Velille','province_id' => '0807','department_id' => '08'),\n\t\t array('id' => '080801','name' => 'Espinar','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080802','name' => 'Condoroma','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080803','name' => 'Coporaque','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080804','name' => 'Ocoruro','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080805','name' => 'Pallpata','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080806','name' => 'Pichigua','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080807','name' => 'Suyckutambo','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080808','name' => 'Alto Pichigua','province_id' => '0808','department_id' => '08'),\n\t\t array('id' => '080901','name' => 'Santa Ana','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080902','name' => 'Echarate','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080903','name' => 'Huayopata','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080904','name' => 'Maranura','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080905','name' => 'Ocobamba','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080906','name' => 'Quellouno','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080907','name' => 'Kimbiri','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080908','name' => 'Santa Teresa','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080909','name' => 'Vilcabamba','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080910','name' => 'Pichari','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080911','name' => 'Inkawasi','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080912','name' => 'Villa Virgen','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080913','name' => 'Villa Kintiarina','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '080914','name' => 'Megantoni','province_id' => '0809','department_id' => '08'),\n\t\t array('id' => '081001','name' => 'Paruro','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081002','name' => 'Accha','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081003','name' => 'Ccapi','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081004','name' => 'Colcha','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081005','name' => 'Huanoquite','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081006','name' => 'Omachaç','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081007','name' => 'Paccaritambo','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081008','name' => 'Pillpinto','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081009','name' => 'Yaurisque','province_id' => '0810','department_id' => '08'),\n\t\t array('id' => '081101','name' => 'Paucartambo','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081102','name' => 'Caicay','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081103','name' => 'Challabamba','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081104','name' => 'Colquepata','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081105','name' => 'Huancarani','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081106','name' => 'Kosñipata','province_id' => '0811','department_id' => '08'),\n\t\t array('id' => '081201','name' => 'Urcos','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081202','name' => 'Andahuaylillas','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081203','name' => 'Camanti','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081204','name' => 'Ccarhuayo','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081205','name' => 'Ccatca','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081206','name' => 'Cusipata','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081207','name' => 'Huaro','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081208','name' => 'Lucre','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081209','name' => 'Marcapata','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081210','name' => 'Ocongate','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081211','name' => 'Oropesa','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081212','name' => 'Quiquijana','province_id' => '0812','department_id' => '08'),\n\t\t array('id' => '081301','name' => 'Urubamba','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081302','name' => 'Chinchero','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081303','name' => 'Huayllabamba','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081304','name' => 'Machupicchu','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081305','name' => 'Maras','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081306','name' => 'Ollantaytambo','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '081307','name' => 'Yucay','province_id' => '0813','department_id' => '08'),\n\t\t array('id' => '090101','name' => 'Huancavelica','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090102','name' => 'Acobambilla','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090103','name' => 'Acoria','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090104','name' => 'Conayca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090105','name' => 'Cuenca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090106','name' => 'Huachocolpa','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090107','name' => 'Huayllahuara','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090108','name' => 'Izcuchaca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090109','name' => 'Laria','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090110','name' => 'Manta','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090111','name' => 'Mariscal Cáceres','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090112','name' => 'Moya','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090113','name' => 'Nuevo Occoro','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090114','name' => 'Palca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090115','name' => 'Pilchaca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090116','name' => 'Vilca','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090117','name' => 'Yauli','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090118','name' => 'Ascensión','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090119','name' => 'Huando','province_id' => '0901','department_id' => '09'),\n\t\t array('id' => '090201','name' => 'Acobamba','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090202','name' => 'Andabamba','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090203','name' => 'Anta','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090204','name' => 'Caja','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090205','name' => 'Marcas','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090206','name' => 'Paucara','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090207','name' => 'Pomacocha','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090208','name' => 'Rosario','province_id' => '0902','department_id' => '09'),\n\t\t array('id' => '090301','name' => 'Lircay','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090302','name' => 'Anchonga','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090303','name' => 'Callanmarca','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090304','name' => 'Ccochaccasa','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090305','name' => 'Chincho','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090306','name' => 'Congalla','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090307','name' => 'Huanca-Huanca','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090308','name' => 'Huayllay Grande','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090309','name' => 'Julcamarca','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090310','name' => 'San Antonio de Antaparco','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090311','name' => 'Santo Tomas de Pata','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090312','name' => 'Secclla','province_id' => '0903','department_id' => '09'),\n\t\t array('id' => '090401','name' => 'Castrovirreyna','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090402','name' => 'Arma','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090403','name' => 'Aurahua','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090404','name' => 'Capillas','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090405','name' => 'Chupamarca','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090406','name' => 'Cocas','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090407','name' => 'Huachos','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090408','name' => 'Huamatambo','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090409','name' => 'Mollepampa','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090410','name' => 'San Juan','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090411','name' => 'Santa Ana','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090412','name' => 'Tantara','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090413','name' => 'Ticrapo','province_id' => '0904','department_id' => '09'),\n\t\t array('id' => '090501','name' => 'Churcampa','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090502','name' => 'Anco','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090503','name' => 'Chinchihuasi','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090504','name' => 'El Carmen','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090505','name' => 'La Merced','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090506','name' => 'Locroja','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090507','name' => 'Paucarbamba','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090508','name' => 'San Miguel de Mayocc','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090509','name' => 'San Pedro de Coris','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090510','name' => 'Pachamarca','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090511','name' => 'Cosme','province_id' => '0905','department_id' => '09'),\n\t\t array('id' => '090601','name' => 'Huaytara','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090602','name' => 'Ayavi','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090603','name' => 'Córdova','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090604','name' => 'Huayacundo Arma','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090605','name' => 'Laramarca','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090606','name' => 'Ocoyo','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090607','name' => 'Pilpichaca','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090608','name' => 'Querco','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090609','name' => 'Quito-Arma','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090610','name' => 'San Antonio de Cusicancha','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090611','name' => 'San Francisco de Sangayaico','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090612','name' => 'San Isidro','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090613','name' => 'Santiago de Chocorvos','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090614','name' => 'Santiago de Quirahuara','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090615','name' => 'Santo Domingo de Capillas','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090616','name' => 'Tambo','province_id' => '0906','department_id' => '09'),\n\t\t array('id' => '090701','name' => 'Pampas','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090702','name' => 'Acostambo','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090703','name' => 'Acraquia','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090704','name' => 'Ahuaycha','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090705','name' => 'Colcabamba','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090706','name' => 'Daniel Hernández','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090707','name' => 'Huachocolpa','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090709','name' => 'Huaribamba','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090710','name' => 'Ñahuimpuquio','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090711','name' => 'Pazos','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090713','name' => 'Quishuar','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090714','name' => 'Salcabamba','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090715','name' => 'Salcahuasi','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090716','name' => 'San Marcos de Rocchac','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090717','name' => 'Surcubamba','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090718','name' => 'Tintay Puncu','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090719','name' => 'Quichuas','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090720','name' => 'Andaymarca','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090721','name' => 'Roble','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090722','name' => 'Pichos','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '090723','name' => 'Santiago de Tucuma','province_id' => '0907','department_id' => '09'),\n\t\t array('id' => '100101','name' => 'Huanuco','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100102','name' => 'Amarilis','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100103','name' => 'Chinchao','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100104','name' => 'Churubamba','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100105','name' => 'Margos','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100106','name' => 'Quisqui (Kichki)','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100107','name' => 'San Francisco de Cayran','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100108','name' => 'San Pedro de Chaulan','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100109','name' => 'Santa María del Valle','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100110','name' => 'Yarumayo','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100111','name' => 'Pillco Marca','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100112','name' => 'Yacus','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100113','name' => 'San Pablo de Pillao','province_id' => '1001','department_id' => '10'),\n\t\t array('id' => '100201','name' => 'Ambo','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100202','name' => 'Cayna','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100203','name' => 'Colpas','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100204','name' => 'Conchamarca','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100205','name' => 'Huacar','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100206','name' => 'San Francisco','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100207','name' => 'San Rafael','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100208','name' => 'Tomay Kichwa','province_id' => '1002','department_id' => '10'),\n\t\t array('id' => '100301','name' => 'La Unión','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100307','name' => 'Chuquis','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100311','name' => 'Marías','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100313','name' => 'Pachas','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100316','name' => 'Quivilla','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100317','name' => 'Ripan','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100321','name' => 'Shunqui','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100322','name' => 'Sillapata','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100323','name' => 'Yanas','province_id' => '1003','department_id' => '10'),\n\t\t array('id' => '100401','name' => 'Huacaybamba','province_id' => '1004','department_id' => '10'),\n\t\t array('id' => '100402','name' => 'Canchabamba','province_id' => '1004','department_id' => '10'),\n\t\t array('id' => '100403','name' => 'Cochabamba','province_id' => '1004','department_id' => '10'),\n\t\t array('id' => '100404','name' => 'Pinra','province_id' => '1004','department_id' => '10'),\n\t\t array('id' => '100501','name' => 'Llata','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100502','name' => 'Arancay','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100503','name' => 'Chavín de Pariarca','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100504','name' => 'Jacas Grande','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100505','name' => 'Jircan','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100506','name' => 'Miraflores','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100507','name' => 'Monzón','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100508','name' => 'Punchao','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100509','name' => 'Puños','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100510','name' => 'Singa','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100511','name' => 'Tantamayo','province_id' => '1005','department_id' => '10'),\n\t\t array('id' => '100601','name' => 'Rupa-Rupa','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100602','name' => 'Daniel Alomía Robles','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100603','name' => 'Hermílio Valdizan','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100604','name' => 'José Crespo y Castillo','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100605','name' => 'Luyando','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100606','name' => 'Mariano Damaso Beraun','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100607','name' => 'Pucayacu','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100608','name' => 'Castillo Grande','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100609','name' => 'Pueblo Nuevo','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100610','name' => 'Santo Domingo de Anda','province_id' => '1006','department_id' => '10'),\n\t\t array('id' => '100701','name' => 'Huacrachuco','province_id' => '1007','department_id' => '10'),\n\t\t array('id' => '100702','name' => 'Cholon','province_id' => '1007','department_id' => '10'),\n\t\t array('id' => '100703','name' => 'San Buenaventura','province_id' => '1007','department_id' => '10'),\n\t\t array('id' => '100704','name' => 'La Morada','province_id' => '1007','department_id' => '10'),\n\t\t array('id' => '100705','name' => 'Santa Rosa de Alto Yanajanca','province_id' => '1007','department_id' => '10'),\n\t\t array('id' => '100801','name' => 'Panao','province_id' => '1008','department_id' => '10'),\n\t\t array('id' => '100802','name' => 'Chaglla','province_id' => '1008','department_id' => '10'),\n\t\t array('id' => '100803','name' => 'Molino','province_id' => '1008','department_id' => '10'),\n\t\t array('id' => '100804','name' => 'Umari','province_id' => '1008','department_id' => '10'),\n\t\t array('id' => '100901','name' => 'Puerto Inca','province_id' => '1009','department_id' => '10'),\n\t\t array('id' => '100902','name' => 'Codo del Pozuzo','province_id' => '1009','department_id' => '10'),\n\t\t array('id' => '100903','name' => 'Honoria','province_id' => '1009','department_id' => '10'),\n\t\t array('id' => '100904','name' => 'Tournavista','province_id' => '1009','department_id' => '10'),\n\t\t array('id' => '100905','name' => 'Yuyapichis','province_id' => '1009','department_id' => '10'),\n\t\t array('id' => '101001','name' => 'Jesús','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101002','name' => 'Baños','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101003','name' => 'Jivia','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101004','name' => 'Queropalca','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101005','name' => 'Rondos','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101006','name' => 'San Francisco de Asís','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101007','name' => 'San Miguel de Cauri','province_id' => '1010','department_id' => '10'),\n\t\t array('id' => '101101','name' => 'Chavinillo','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101102','name' => 'Cahuac','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101103','name' => 'Chacabamba','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101104','name' => 'Aparicio Pomares','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101105','name' => 'Jacas Chico','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101106','name' => 'Obas','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101107','name' => 'Pampamarca','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '101108','name' => 'Choras','province_id' => '1011','department_id' => '10'),\n\t\t array('id' => '110101','name' => 'Ica','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110102','name' => 'La Tinguiña','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110103','name' => 'Los Aquijes','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110104','name' => 'Ocucaje','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110105','name' => 'Pachacutec','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110106','name' => 'Parcona','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110107','name' => 'Pueblo Nuevo','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110108','name' => 'Salas','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110109','name' => 'San José de Los Molinos','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110110','name' => 'San Juan Bautista','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110111','name' => 'Santiago','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110112','name' => 'Subtanjalla','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110113','name' => 'Tate','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110114','name' => 'Yauca del Rosario','province_id' => '1101','department_id' => '11'),\n\t\t array('id' => '110201','name' => 'Chincha Alta','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110202','name' => 'Alto Laran','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110203','name' => 'Chavin','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110204','name' => 'Chincha Baja','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110205','name' => 'El Carmen','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110206','name' => 'Grocio Prado','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110207','name' => 'Pueblo Nuevo','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110208','name' => 'San Juan de Yanac','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110209','name' => 'San Pedro de Huacarpana','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110210','name' => 'Sunampe','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110211','name' => 'Tambo de Mora','province_id' => '1102','department_id' => '11'),\n\t\t array('id' => '110301','name' => 'Nasca','province_id' => '1103','department_id' => '11'),\n\t\t array('id' => '110302','name' => 'Changuillo','province_id' => '1103','department_id' => '11'),\n\t\t array('id' => '110303','name' => 'El Ingenio','province_id' => '1103','department_id' => '11'),\n\t\t array('id' => '110304','name' => 'Marcona','province_id' => '1103','department_id' => '11'),\n\t\t array('id' => '110305','name' => 'Vista Alegre','province_id' => '1103','department_id' => '11'),\n\t\t array('id' => '110401','name' => 'Palpa','province_id' => '1104','department_id' => '11'),\n\t\t array('id' => '110402','name' => 'Llipata','province_id' => '1104','department_id' => '11'),\n\t\t array('id' => '110403','name' => 'Río Grande','province_id' => '1104','department_id' => '11'),\n\t\t array('id' => '110404','name' => 'Santa Cruz','province_id' => '1104','department_id' => '11'),\n\t\t array('id' => '110405','name' => 'Tibillo','province_id' => '1104','department_id' => '11'),\n\t\t array('id' => '110501','name' => 'Pisco','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110502','name' => 'Huancano','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110503','name' => 'Humay','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110504','name' => 'Independencia','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110505','name' => 'Paracas','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110506','name' => 'San Andrés','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110507','name' => 'San Clemente','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '110508','name' => 'Tupac Amaru Inca','province_id' => '1105','department_id' => '11'),\n\t\t array('id' => '120101','name' => 'Huancayo','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120104','name' => 'Carhuacallanga','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120105','name' => 'Chacapampa','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120106','name' => 'Chicche','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120107','name' => 'Chilca','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120108','name' => 'Chongos Alto','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120111','name' => 'Chupuro','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120112','name' => 'Colca','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120113','name' => 'Cullhuas','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120114','name' => 'El Tambo','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120116','name' => 'Huacrapuquio','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120117','name' => 'Hualhuas','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120119','name' => 'Huancan','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120120','name' => 'Huasicancha','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120121','name' => 'Huayucachi','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120122','name' => 'Ingenio','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120124','name' => 'Pariahuanca','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120125','name' => 'Pilcomayo','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120126','name' => 'Pucara','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120127','name' => 'Quichuay','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120128','name' => 'Quilcas','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120129','name' => 'San Agustín','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120130','name' => 'San Jerónimo de Tunan','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120132','name' => 'Saño','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120133','name' => 'Sapallanga','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120134','name' => 'Sicaya','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120135','name' => 'Santo Domingo de Acobamba','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120136','name' => 'Viques','province_id' => '1201','department_id' => '12'),\n\t\t array('id' => '120201','name' => 'Concepción','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120202','name' => 'Aco','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120203','name' => 'Andamarca','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120204','name' => 'Chambara','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120205','name' => 'Cochas','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120206','name' => 'Comas','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120207','name' => 'Heroínas Toledo','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120208','name' => 'Manzanares','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120209','name' => 'Mariscal Castilla','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120210','name' => 'Matahuasi','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120211','name' => 'Mito','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120212','name' => 'Nueve de Julio','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120213','name' => 'Orcotuna','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120214','name' => 'San José de Quero','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120215','name' => 'Santa Rosa de Ocopa','province_id' => '1202','department_id' => '12'),\n\t\t array('id' => '120301','name' => 'Chanchamayo','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120302','name' => 'Perene','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120303','name' => 'Pichanaqui','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120304','name' => 'San Luis de Shuaro','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120305','name' => 'San Ramón','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120306','name' => 'Vitoc','province_id' => '1203','department_id' => '12'),\n\t\t array('id' => '120401','name' => 'Jauja','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120402','name' => 'Acolla','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120403','name' => 'Apata','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120404','name' => 'Ataura','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120405','name' => 'Canchayllo','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120406','name' => 'Curicaca','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120407','name' => 'El Mantaro','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120408','name' => 'Huamali','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120409','name' => 'Huaripampa','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120410','name' => 'Huertas','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120411','name' => 'Janjaillo','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120412','name' => 'Julcán','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120413','name' => 'Leonor Ordóñez','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120414','name' => 'Llocllapampa','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120415','name' => 'Marco','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120416','name' => 'Masma','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120417','name' => 'Masma Chicche','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120418','name' => 'Molinos','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120419','name' => 'Monobamba','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120420','name' => 'Muqui','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120421','name' => 'Muquiyauyo','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120422','name' => 'Paca','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120423','name' => 'Paccha','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120424','name' => 'Pancan','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120425','name' => 'Parco','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120426','name' => 'Pomacancha','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120427','name' => 'Ricran','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120428','name' => 'San Lorenzo','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120429','name' => 'San Pedro de Chunan','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120430','name' => 'Sausa','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120431','name' => 'Sincos','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120432','name' => 'Tunan Marca','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120433','name' => 'Yauli','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120434','name' => 'Yauyos','province_id' => '1204','department_id' => '12'),\n\t\t array('id' => '120501','name' => 'Junin','province_id' => '1205','department_id' => '12'),\n\t\t array('id' => '120502','name' => 'Carhuamayo','province_id' => '1205','department_id' => '12'),\n\t\t array('id' => '120503','name' => 'Ondores','province_id' => '1205','department_id' => '12'),\n\t\t array('id' => '120504','name' => 'Ulcumayo','province_id' => '1205','department_id' => '12'),\n\t\t array('id' => '120601','name' => 'Satipo','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120602','name' => 'Coviriali','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120603','name' => 'Llaylla','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120604','name' => 'Mazamari','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120605','name' => 'Pampa Hermosa','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120606','name' => 'Pangoa','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120607','name' => 'Río Negro','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120608','name' => 'Río Tambo','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120609','name' => 'Vizcatan del Ene','province_id' => '1206','department_id' => '12'),\n\t\t array('id' => '120701','name' => 'Tarma','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120702','name' => 'Acobamba','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120703','name' => 'Huaricolca','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120704','name' => 'Huasahuasi','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120705','name' => 'La Unión','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120706','name' => 'Palca','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120707','name' => 'Palcamayo','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120708','name' => 'San Pedro de Cajas','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120709','name' => 'Tapo','province_id' => '1207','department_id' => '12'),\n\t\t array('id' => '120801','name' => 'La Oroya','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120802','name' => 'Chacapalpa','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120803','name' => 'Huay-Huay','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120804','name' => 'Marcapomacocha','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120805','name' => 'Morococha','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120806','name' => 'Paccha','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120807','name' => 'Santa Bárbara de Carhuacayan','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120808','name' => 'Santa Rosa de Sacco','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120809','name' => 'Suitucancha','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120810','name' => 'Yauli','province_id' => '1208','department_id' => '12'),\n\t\t array('id' => '120901','name' => 'Chupaca','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120902','name' => 'Ahuac','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120903','name' => 'Chongos Bajo','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120904','name' => 'Huachac','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120905','name' => 'Huamancaca Chico','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120906','name' => 'San Juan de Iscos','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120907','name' => 'San Juan de Jarpa','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120908','name' => 'Tres de Diciembre','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '120909','name' => 'Yanacancha','province_id' => '1209','department_id' => '12'),\n\t\t array('id' => '130101','name' => 'Trujillo','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130102','name' => 'El Porvenir','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130103','name' => 'Florencia de Mora','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130104','name' => 'Huanchaco','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130105','name' => 'La Esperanza','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130106','name' => 'Laredo','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130107','name' => 'Moche','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130108','name' => 'Poroto','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130109','name' => 'Salaverry','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130110','name' => 'Simbal','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130111','name' => 'Victor Larco Herrera','province_id' => '1301','department_id' => '13'),\n\t\t array('id' => '130201','name' => 'Ascope','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130202','name' => 'Chicama','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130203','name' => 'Chocope','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130204','name' => 'Magdalena de Cao','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130205','name' => 'Paijan','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130206','name' => 'Rázuri','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130207','name' => 'Santiago de Cao','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130208','name' => 'Casa Grande','province_id' => '1302','department_id' => '13'),\n\t\t array('id' => '130301','name' => 'Bolívar','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130302','name' => 'Bambamarca','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130303','name' => 'Condormarca','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130304','name' => 'Longotea','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130305','name' => 'Uchumarca','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130306','name' => 'Ucuncha','province_id' => '1303','department_id' => '13'),\n\t\t array('id' => '130401','name' => 'Chepen','province_id' => '1304','department_id' => '13'),\n\t\t array('id' => '130402','name' => 'Pacanga','province_id' => '1304','department_id' => '13'),\n\t\t array('id' => '130403','name' => 'Pueblo Nuevo','province_id' => '1304','department_id' => '13'),\n\t\t array('id' => '130501','name' => 'Julcan','province_id' => '1305','department_id' => '13'),\n\t\t array('id' => '130502','name' => 'Calamarca','province_id' => '1305','department_id' => '13'),\n\t\t array('id' => '130503','name' => 'Carabamba','province_id' => '1305','department_id' => '13'),\n\t\t array('id' => '130504','name' => 'Huaso','province_id' => '1305','department_id' => '13'),\n\t\t array('id' => '130601','name' => 'Otuzco','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130602','name' => 'Agallpampa','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130604','name' => 'Charat','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130605','name' => 'Huaranchal','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130606','name' => 'La Cuesta','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130608','name' => 'Mache','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130610','name' => 'Paranday','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130611','name' => 'Salpo','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130613','name' => 'Sinsicap','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130614','name' => 'Usquil','province_id' => '1306','department_id' => '13'),\n\t\t array('id' => '130701','name' => 'San Pedro de Lloc','province_id' => '1307','department_id' => '13'),\n\t\t array('id' => '130702','name' => 'Guadalupe','province_id' => '1307','department_id' => '13'),\n\t\t array('id' => '130703','name' => 'Jequetepeque','province_id' => '1307','department_id' => '13'),\n\t\t array('id' => '130704','name' => 'Pacasmayo','province_id' => '1307','department_id' => '13'),\n\t\t array('id' => '130705','name' => 'San José','province_id' => '1307','department_id' => '13'),\n\t\t array('id' => '130801','name' => 'Tayabamba','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130802','name' => 'Buldibuyo','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130803','name' => 'Chillia','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130804','name' => 'Huancaspata','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130805','name' => 'Huaylillas','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130806','name' => 'Huayo','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130807','name' => 'Ongon','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130808','name' => 'Parcoy','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130809','name' => 'Pataz','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130810','name' => 'Pias','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130811','name' => 'Santiago de Challas','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130812','name' => 'Taurija','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130813','name' => 'Urpay','province_id' => '1308','department_id' => '13'),\n\t\t array('id' => '130901','name' => 'Huamachuco','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130902','name' => 'Chugay','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130903','name' => 'Cochorco','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130904','name' => 'Curgos','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130905','name' => 'Marcabal','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130906','name' => 'Sanagoran','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130907','name' => 'Sarin','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '130908','name' => 'Sartimbamba','province_id' => '1309','department_id' => '13'),\n\t\t array('id' => '131001','name' => 'Santiago de Chuco','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131002','name' => 'Angasmarca','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131003','name' => 'Cachicadan','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131004','name' => 'Mollebamba','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131005','name' => 'Mollepata','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131006','name' => 'Quiruvilca','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131007','name' => 'Santa Cruz de Chuca','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131008','name' => 'Sitabamba','province_id' => '1310','department_id' => '13'),\n\t\t array('id' => '131101','name' => 'Cascas','province_id' => '1311','department_id' => '13'),\n\t\t array('id' => '131102','name' => 'Lucma','province_id' => '1311','department_id' => '13'),\n\t\t array('id' => '131103','name' => 'Marmot','province_id' => '1311','department_id' => '13'),\n\t\t array('id' => '131104','name' => 'Sayapullo','province_id' => '1311','department_id' => '13'),\n\t\t array('id' => '131201','name' => 'Viru','province_id' => '1312','department_id' => '13'),\n\t\t array('id' => '131202','name' => 'Chao','province_id' => '1312','department_id' => '13'),\n\t\t array('id' => '131203','name' => 'Guadalupito','province_id' => '1312','department_id' => '13'),\n\t\t array('id' => '140101','name' => 'Chiclayo','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140102','name' => 'Chongoyape','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140103','name' => 'Eten','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140104','name' => 'Eten Puerto','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140105','name' => 'José Leonardo Ortiz','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140106','name' => 'La Victoria','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140107','name' => 'Lagunas','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140108','name' => 'Monsefu','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140109','name' => 'Nueva Arica','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140110','name' => 'Oyotun','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140111','name' => 'Picsi','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140112','name' => 'Pimentel','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140113','name' => 'Reque','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140114','name' => 'Santa Rosa','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140115','name' => 'Saña','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140116','name' => 'Cayalti','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140117','name' => 'Patapo','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140118','name' => 'Pomalca','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140119','name' => 'Pucala','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140120','name' => 'Tuman','province_id' => '1401','department_id' => '14'),\n\t\t array('id' => '140201','name' => 'Ferreñafe','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140202','name' => 'Cañaris','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140203','name' => 'Incahuasi','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140204','name' => 'Manuel Antonio Mesones Muro','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140205','name' => 'Pitipo','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140206','name' => 'Pueblo Nuevo','province_id' => '1402','department_id' => '14'),\n\t\t array('id' => '140301','name' => 'Lambayeque','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140302','name' => 'Chochope','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140303','name' => 'Illimo','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140304','name' => 'Jayanca','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140305','name' => 'Mochumi','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140306','name' => 'Morrope','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140307','name' => 'Motupe','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140308','name' => 'Olmos','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140309','name' => 'Pacora','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140310','name' => 'Salas','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140311','name' => 'San José','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '140312','name' => 'Tucume','province_id' => '1403','department_id' => '14'),\n\t\t array('id' => '150101','name' => 'Lima','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150102','name' => 'Ancón','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150103','name' => 'Ate','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150104','name' => 'Barranco','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150105','name' => 'Breña','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150106','name' => 'Carabayllo','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150107','name' => 'Chaclacayo','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150108','name' => 'Chorrillos','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150109','name' => 'Cieneguilla','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150110','name' => 'Comas','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150111','name' => 'El Agustino','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150112','name' => 'Independencia','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150113','name' => 'Jesús María','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150114','name' => 'La Molina','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150115','name' => 'La Victoria','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150116','name' => 'Lince','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150117','name' => 'Los Olivos','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150118','name' => 'Lurigancho','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150119','name' => 'Lurin','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150120','name' => 'Magdalena del Mar','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150121','name' => 'Pueblo Libre','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150122','name' => 'Miraflores','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150123','name' => 'Pachacamac','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150124','name' => 'Pucusana','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150125','name' => 'Puente Piedra','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150126','name' => 'Punta Hermosa','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150127','name' => 'Punta Negra','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150128','name' => 'Rímac','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150129','name' => 'San Bartolo','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150130','name' => 'San Borja','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150131','name' => 'San Isidro','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150132','name' => 'San Juan de Lurigancho','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150133','name' => 'San Juan de Miraflores','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150134','name' => 'San Luis','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150135','name' => 'San Martín de Porres','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150136','name' => 'San Miguel','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150137','name' => 'Santa Anita','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150138','name' => 'Santa María del Mar','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150139','name' => 'Santa Rosa','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150140','name' => 'Santiago de Surco','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150141','name' => 'Surquillo','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150142','name' => 'Villa El Salvador','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150143','name' => 'Villa María del Triunfo','province_id' => '1501','department_id' => '15'),\n\t\t array('id' => '150201','name' => 'Barranca','province_id' => '1502','department_id' => '15'),\n\t\t array('id' => '150202','name' => 'Paramonga','province_id' => '1502','department_id' => '15'),\n\t\t array('id' => '150203','name' => 'Pativilca','province_id' => '1502','department_id' => '15'),\n\t\t array('id' => '150204','name' => 'Supe','province_id' => '1502','department_id' => '15'),\n\t\t array('id' => '150205','name' => 'Supe Puerto','province_id' => '1502','department_id' => '15'),\n\t\t array('id' => '150301','name' => 'Cajatambo','province_id' => '1503','department_id' => '15'),\n\t\t array('id' => '150302','name' => 'Copa','province_id' => '1503','department_id' => '15'),\n\t\t array('id' => '150303','name' => 'Gorgor','province_id' => '1503','department_id' => '15'),\n\t\t array('id' => '150304','name' => 'Huancapon','province_id' => '1503','department_id' => '15'),\n\t\t array('id' => '150305','name' => 'Manas','province_id' => '1503','department_id' => '15'),\n\t\t array('id' => '150401','name' => 'Canta','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150402','name' => 'Arahuay','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150403','name' => 'Huamantanga','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150404','name' => 'Huaros','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150405','name' => 'Lachaqui','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150406','name' => 'San Buenaventura','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150407','name' => 'Santa Rosa de Quives','province_id' => '1504','department_id' => '15'),\n\t\t array('id' => '150501','name' => 'San Vicente de Cañete','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150502','name' => 'Asia','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150503','name' => 'Calango','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150504','name' => 'Cerro Azul','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150505','name' => 'Chilca','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150506','name' => 'Coayllo','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150507','name' => 'Imperial','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150508','name' => 'Lunahuana','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150509','name' => 'Mala','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150510','name' => 'Nuevo Imperial','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150511','name' => 'Pacaran','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150512','name' => 'Quilmana','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150513','name' => 'San Antonio','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150514','name' => 'San Luis','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150515','name' => 'Santa Cruz de Flores','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150516','name' => 'Zúñiga','province_id' => '1505','department_id' => '15'),\n\t\t array('id' => '150601','name' => 'Huaral','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150602','name' => 'Atavillos Alto','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150603','name' => 'Atavillos Bajo','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150604','name' => 'Aucallama','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150605','name' => 'Chancay','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150606','name' => 'Ihuari','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150607','name' => 'Lampian','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150608','name' => 'Pacaraos','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150609','name' => 'San Miguel de Acos','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150610','name' => 'Santa Cruz de Andamarca','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150611','name' => 'Sumbilca','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150612','name' => 'Veintisiete de Noviembre','province_id' => '1506','department_id' => '15'),\n\t\t array('id' => '150701','name' => 'Matucana','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150702','name' => 'Antioquia','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150703','name' => 'Callahuanca','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150704','name' => 'Carampoma','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150705','name' => 'Chicla','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150706','name' => 'Cuenca','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150707','name' => 'Huachupampa','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150708','name' => 'Huanza','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150709','name' => 'Huarochiri','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150710','name' => 'Lahuaytambo','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150711','name' => 'Langa','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150712','name' => 'Laraos','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150713','name' => 'Mariatana','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150714','name' => 'Ricardo Palma','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150715','name' => 'San Andrés de Tupicocha','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150716','name' => 'San Antonio','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150717','name' => 'San Bartolomé','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150718','name' => 'San Damian','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150719','name' => 'San Juan de Iris','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150720','name' => 'San Juan de Tantaranche','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150721','name' => 'San Lorenzo de Quinti','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150722','name' => 'San Mateo','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150723','name' => 'San Mateo de Otao','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150724','name' => 'San Pedro de Casta','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150725','name' => 'San Pedro de Huancayre','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150726','name' => 'Sangallaya','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150727','name' => 'Santa Cruz de Cocachacra','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150728','name' => 'Santa Eulalia','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150729','name' => 'Santiago de Anchucaya','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150730','name' => 'Santiago de Tuna','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150731','name' => 'Santo Domingo de Los Olleros','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150732','name' => 'Surco','province_id' => '1507','department_id' => '15'),\n\t\t array('id' => '150801','name' => 'Huacho','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150802','name' => 'Ambar','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150803','name' => 'Caleta de Carquin','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150804','name' => 'Checras','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150805','name' => 'Hualmay','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150806','name' => 'Huaura','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150807','name' => 'Leoncio Prado','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150808','name' => 'Paccho','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150809','name' => 'Santa Leonor','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150810','name' => 'Santa María','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150811','name' => 'Sayan','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150812','name' => 'Vegueta','province_id' => '1508','department_id' => '15'),\n\t\t array('id' => '150901','name' => 'Oyon','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '150902','name' => 'Andajes','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '150903','name' => 'Caujul','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '150904','name' => 'Cochamarca','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '150905','name' => 'Navan','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '150906','name' => 'Pachangara','province_id' => '1509','department_id' => '15'),\n\t\t array('id' => '151001','name' => 'Yauyos','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151002','name' => 'Alis','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151003','name' => 'Allauca','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151004','name' => 'Ayaviri','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151005','name' => 'Azángaro','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151006','name' => 'Cacra','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151007','name' => 'Carania','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151008','name' => 'Catahuasi','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151009','name' => 'Chocos','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151010','name' => 'Cochas','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151011','name' => 'Colonia','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151012','name' => 'Hongos','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151013','name' => 'Huampara','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151014','name' => 'Huancaya','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151015','name' => 'Huangascar','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151016','name' => 'Huantan','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151017','name' => 'Huañec','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151018','name' => 'Laraos','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151019','name' => 'Lincha','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151020','name' => 'Madean','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151021','name' => 'Miraflores','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151022','name' => 'Omas','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151023','name' => 'Putinza','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151024','name' => 'Quinches','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151025','name' => 'Quinocay','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151026','name' => 'San Joaquín','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151027','name' => 'San Pedro de Pilas','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151028','name' => 'Tanta','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151029','name' => 'Tauripampa','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151030','name' => 'Tomas','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151031','name' => 'Tupe','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151032','name' => 'Viñac','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '151033','name' => 'Vitis','province_id' => '1510','department_id' => '15'),\n\t\t array('id' => '160101','name' => 'Iquitos','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160102','name' => 'Alto Nanay','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160103','name' => 'Fernando Lores','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160104','name' => 'Indiana','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160105','name' => 'Las Amazonas','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160106','name' => 'Mazan','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160107','name' => 'Napo','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160108','name' => 'Punchana','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160110','name' => 'Torres Causana','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160112','name' => 'Belén','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160113','name' => 'San Juan Bautista','province_id' => '1601','department_id' => '16'),\n\t\t array('id' => '160201','name' => 'Yurimaguas','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160202','name' => 'Balsapuerto','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160205','name' => 'Jeberos','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160206','name' => 'Lagunas','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160210','name' => 'Santa Cruz','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160211','name' => 'Teniente Cesar López Rojas','province_id' => '1602','department_id' => '16'),\n\t\t array('id' => '160301','name' => 'Nauta','province_id' => '1603','department_id' => '16'),\n\t\t array('id' => '160302','name' => 'Parinari','province_id' => '1603','department_id' => '16'),\n\t\t array('id' => '160303','name' => 'Tigre','province_id' => '1603','department_id' => '16'),\n\t\t array('id' => '160304','name' => 'Trompeteros','province_id' => '1603','department_id' => '16'),\n\t\t array('id' => '160305','name' => 'Urarinas','province_id' => '1603','department_id' => '16'),\n\t\t array('id' => '160401','name' => 'Ramón Castilla','province_id' => '1604','department_id' => '16'),\n\t\t array('id' => '160402','name' => 'Pebas','province_id' => '1604','department_id' => '16'),\n\t\t array('id' => '160403','name' => 'Yavari','province_id' => '1604','department_id' => '16'),\n\t\t array('id' => '160404','name' => 'San Pablo','province_id' => '1604','department_id' => '16'),\n\t\t array('id' => '160501','name' => 'Requena','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160502','name' => 'Alto Tapiche','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160503','name' => 'Capelo','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160504','name' => 'Emilio San Martín','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160505','name' => 'Maquia','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160506','name' => 'Puinahua','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160507','name' => 'Saquena','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160508','name' => 'Soplin','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160509','name' => 'Tapiche','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160510','name' => 'Jenaro Herrera','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160511','name' => 'Yaquerana','province_id' => '1605','department_id' => '16'),\n\t\t array('id' => '160601','name' => 'Contamana','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160602','name' => 'Inahuaya','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160603','name' => 'Padre Márquez','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160604','name' => 'Pampa Hermosa','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160605','name' => 'Sarayacu','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160606','name' => 'Vargas Guerra','province_id' => '1606','department_id' => '16'),\n\t\t array('id' => '160701','name' => 'Barranca','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160702','name' => 'Cahuapanas','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160703','name' => 'Manseriche','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160704','name' => 'Morona','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160705','name' => 'Pastaza','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160706','name' => 'Andoas','province_id' => '1607','department_id' => '16'),\n\t\t array('id' => '160801','name' => 'Putumayo','province_id' => '1608','department_id' => '16'),\n\t\t array('id' => '160802','name' => 'Rosa Panduro','province_id' => '1608','department_id' => '16'),\n\t\t array('id' => '160803','name' => 'Teniente Manuel Clavero','province_id' => '1608','department_id' => '16'),\n\t\t array('id' => '160804','name' => 'Yaguas','province_id' => '1608','department_id' => '16'),\n\t\t array('id' => '170101','name' => 'Tambopata','province_id' => '1701','department_id' => '17'),\n\t\t array('id' => '170102','name' => 'Inambari','province_id' => '1701','department_id' => '17'),\n\t\t array('id' => '170103','name' => 'Las Piedras','province_id' => '1701','department_id' => '17'),\n\t\t array('id' => '170104','name' => 'Laberinto','province_id' => '1701','department_id' => '17'),\n\t\t array('id' => '170201','name' => 'Manu','province_id' => '1702','department_id' => '17'),\n\t\t array('id' => '170202','name' => 'Fitzcarrald','province_id' => '1702','department_id' => '17'),\n\t\t array('id' => '170203','name' => 'Madre de Dios','province_id' => '1702','department_id' => '17'),\n\t\t array('id' => '170204','name' => 'Huepetuhe','province_id' => '1702','department_id' => '17'),\n\t\t array('id' => '170301','name' => 'Iñapari','province_id' => '1703','department_id' => '17'),\n\t\t array('id' => '170302','name' => 'Iberia','province_id' => '1703','department_id' => '17'),\n\t\t array('id' => '170303','name' => 'Tahuamanu','province_id' => '1703','department_id' => '17'),\n\t\t array('id' => '180101','name' => 'Moquegua','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180102','name' => 'Carumas','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180103','name' => 'Cuchumbaya','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180104','name' => 'Samegua','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180105','name' => 'San Cristóbal','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180106','name' => 'Torata','province_id' => '1801','department_id' => '18'),\n\t\t array('id' => '180201','name' => 'Omate','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180202','name' => 'Chojata','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180203','name' => 'Coalaque','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180204','name' => 'Ichuña','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180205','name' => 'La Capilla','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180206','name' => 'Lloque','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180207','name' => 'Matalaque','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180208','name' => 'Puquina','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180209','name' => 'Quinistaquillas','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180210','name' => 'Ubinas','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180211','name' => 'Yunga','province_id' => '1802','department_id' => '18'),\n\t\t array('id' => '180301','name' => 'Ilo','province_id' => '1803','department_id' => '18'),\n\t\t array('id' => '180302','name' => 'El Algarrobal','province_id' => '1803','department_id' => '18'),\n\t\t array('id' => '180303','name' => 'Pacocha','province_id' => '1803','department_id' => '18'),\n\t\t array('id' => '190101','name' => 'Chaupimarca','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190102','name' => 'Huachon','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190103','name' => 'Huariaca','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190104','name' => 'Huayllay','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190105','name' => 'Ninacaca','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190106','name' => 'Pallanchacra','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190107','name' => 'Paucartambo','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190108','name' => 'San Francisco de Asís de Yarusyacan','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190109','name' => 'Simon Bolívar','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190110','name' => 'Ticlacayan','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190111','name' => 'Tinyahuarco','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190112','name' => 'Vicco','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190113','name' => 'Yanacancha','province_id' => '1901','department_id' => '19'),\n\t\t array('id' => '190201','name' => 'Yanahuanca','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190202','name' => 'Chacayan','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190203','name' => 'Goyllarisquizga','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190204','name' => 'Paucar','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190205','name' => 'San Pedro de Pillao','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190206','name' => 'Santa Ana de Tusi','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190207','name' => 'Tapuc','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190208','name' => 'Vilcabamba','province_id' => '1902','department_id' => '19'),\n\t\t array('id' => '190301','name' => 'Oxapampa','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190302','name' => 'Chontabamba','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190303','name' => 'Huancabamba','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190304','name' => 'Palcazu','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190305','name' => 'Pozuzo','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190306','name' => 'Puerto Bermúdez','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190307','name' => 'Villa Rica','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '190308','name' => 'Constitución','province_id' => '1903','department_id' => '19'),\n\t\t array('id' => '200101','name' => 'Piura','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200104','name' => 'Castilla','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200105','name' => 'Catacaos','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200107','name' => 'Cura Mori','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200108','name' => 'El Tallan','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200109','name' => 'La Arena','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200110','name' => 'La Unión','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200111','name' => 'Las Lomas','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200114','name' => 'Tambo Grande','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200115','name' => 'Veintiseis de Octubre','province_id' => '2001','department_id' => '20'),\n\t\t array('id' => '200201','name' => 'Ayabaca','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200202','name' => 'Frias','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200203','name' => 'Jilili','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200204','name' => 'Lagunas','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200205','name' => 'Montero','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200206','name' => 'Pacaipampa','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200207','name' => 'Paimas','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200208','name' => 'Sapillica','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200209','name' => 'Sicchez','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200210','name' => 'Suyo','province_id' => '2002','department_id' => '20'),\n\t\t array('id' => '200301','name' => 'Huancabamba','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200302','name' => 'Canchaque','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200303','name' => 'El Carmen de la Frontera','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200304','name' => 'Huarmaca','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200305','name' => 'Lalaquiz','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200306','name' => 'San Miguel de El Faique','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200307','name' => 'Sondor','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200308','name' => 'Sondorillo','province_id' => '2003','department_id' => '20'),\n\t\t array('id' => '200401','name' => 'Chulucanas','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200402','name' => 'Buenos Aires','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200403','name' => 'Chalaco','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200404','name' => 'La Matanza','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200405','name' => 'Morropon','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200406','name' => 'Salitral','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200407','name' => 'San Juan de Bigote','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200408','name' => 'Santa Catalina de Mossa','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200409','name' => 'Santo Domingo','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200410','name' => 'Yamango','province_id' => '2004','department_id' => '20'),\n\t\t array('id' => '200501','name' => 'Paita','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200502','name' => 'Amotape','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200503','name' => 'Arenal','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200504','name' => 'Colan','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200505','name' => 'La Huaca','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200506','name' => 'Tamarindo','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200507','name' => 'Vichayal','province_id' => '2005','department_id' => '20'),\n\t\t array('id' => '200601','name' => 'Sullana','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200602','name' => 'Bellavista','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200603','name' => 'Ignacio Escudero','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200604','name' => 'Lancones','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200605','name' => 'Marcavelica','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200606','name' => 'Miguel Checa','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200607','name' => 'Querecotillo','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200608','name' => 'Salitral','province_id' => '2006','department_id' => '20'),\n\t\t array('id' => '200701','name' => 'Pariñas','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200702','name' => 'El Alto','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200703','name' => 'La Brea','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200704','name' => 'Lobitos','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200705','name' => 'Los Organos','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200706','name' => 'Mancora','province_id' => '2007','department_id' => '20'),\n\t\t array('id' => '200801','name' => 'Sechura','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '200802','name' => 'Bellavista de la Unión','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '200803','name' => 'Bernal','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '200804','name' => 'Cristo Nos Valga','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '200805','name' => 'Vice','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '200806','name' => 'Rinconada Llicuar','province_id' => '2008','department_id' => '20'),\n\t\t array('id' => '210101','name' => 'Puno','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210102','name' => 'Acora','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210103','name' => 'Amantani','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210104','name' => 'Atuncolla','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210105','name' => 'Capachica','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210106','name' => 'Chucuito','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210107','name' => 'Coata','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210108','name' => 'Huata','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210109','name' => 'Mañazo','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210110','name' => 'Paucarcolla','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210111','name' => 'Pichacani','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210112','name' => 'Plateria','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210113','name' => 'San Antonio','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210114','name' => 'Tiquillaca','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210115','name' => 'Vilque','province_id' => '2101','department_id' => '21'),\n\t\t array('id' => '210201','name' => 'Azángaro','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210202','name' => 'Achaya','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210203','name' => 'Arapa','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210204','name' => 'Asillo','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210205','name' => 'Caminaca','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210206','name' => 'Chupa','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210207','name' => 'José Domingo Choquehuanca','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210208','name' => 'Muñani','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210209','name' => 'Potoni','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210210','name' => 'Saman','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210211','name' => 'San Anton','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210212','name' => 'San José','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210213','name' => 'San Juan de Salinas','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210214','name' => 'Santiago de Pupuja','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210215','name' => 'Tirapata','province_id' => '2102','department_id' => '21'),\n\t\t array('id' => '210301','name' => 'Macusani','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210302','name' => 'Ajoyani','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210303','name' => 'Ayapata','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210304','name' => 'Coasa','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210305','name' => 'Corani','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210306','name' => 'Crucero','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210307','name' => 'Ituata','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210308','name' => 'Ollachea','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210309','name' => 'San Gaban','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210310','name' => 'Usicayos','province_id' => '2103','department_id' => '21'),\n\t\t array('id' => '210401','name' => 'Juli','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210402','name' => 'Desaguadero','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210403','name' => 'Huacullani','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210404','name' => 'Kelluyo','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210405','name' => 'Pisacoma','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210406','name' => 'Pomata','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210407','name' => 'Zepita','province_id' => '2104','department_id' => '21'),\n\t\t array('id' => '210501','name' => 'Ilave','province_id' => '2105','department_id' => '21'),\n\t\t array('id' => '210502','name' => 'Capazo','province_id' => '2105','department_id' => '21'),\n\t\t array('id' => '210503','name' => 'Pilcuyo','province_id' => '2105','department_id' => '21'),\n\t\t array('id' => '210504','name' => 'Santa Rosa','province_id' => '2105','department_id' => '21'),\n\t\t array('id' => '210505','name' => 'Conduriri','province_id' => '2105','department_id' => '21'),\n\t\t array('id' => '210601','name' => 'Huancane','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210602','name' => 'Cojata','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210603','name' => 'Huatasani','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210604','name' => 'Inchupalla','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210605','name' => 'Pusi','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210606','name' => 'Rosaspata','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210607','name' => 'Taraco','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210608','name' => 'Vilque Chico','province_id' => '2106','department_id' => '21'),\n\t\t array('id' => '210701','name' => 'Lampa','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210702','name' => 'Cabanilla','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210703','name' => 'Calapuja','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210704','name' => 'Nicasio','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210705','name' => 'Ocuviri','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210706','name' => 'Palca','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210707','name' => 'Paratia','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210708','name' => 'Pucara','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210709','name' => 'Santa Lucia','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210710','name' => 'Vilavila','province_id' => '2107','department_id' => '21'),\n\t\t array('id' => '210801','name' => 'Ayaviri','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210802','name' => 'Antauta','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210803','name' => 'Cupi','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210804','name' => 'Llalli','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210805','name' => 'Macari','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210806','name' => 'Nuñoa','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210807','name' => 'Orurillo','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210808','name' => 'Santa Rosa','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210809','name' => 'Umachiri','province_id' => '2108','department_id' => '21'),\n\t\t array('id' => '210901','name' => 'Moho','province_id' => '2109','department_id' => '21'),\n\t\t array('id' => '210902','name' => 'Conima','province_id' => '2109','department_id' => '21'),\n\t\t array('id' => '210903','name' => 'Huayrapata','province_id' => '2109','department_id' => '21'),\n\t\t array('id' => '210904','name' => 'Tilali','province_id' => '2109','department_id' => '21'),\n\t\t array('id' => '211001','name' => 'Putina','province_id' => '2110','department_id' => '21'),\n\t\t array('id' => '211002','name' => 'Ananea','province_id' => '2110','department_id' => '21'),\n\t\t array('id' => '211003','name' => 'Pedro Vilca Apaza','province_id' => '2110','department_id' => '21'),\n\t\t array('id' => '211004','name' => 'Quilcapuncu','province_id' => '2110','department_id' => '21'),\n\t\t array('id' => '211005','name' => 'Sina','province_id' => '2110','department_id' => '21'),\n\t\t array('id' => '211101','name' => 'Juliaca','province_id' => '2111','department_id' => '21'),\n\t\t array('id' => '211102','name' => 'Cabana','province_id' => '2111','department_id' => '21'),\n\t\t array('id' => '211103','name' => 'Cabanillas','province_id' => '2111','department_id' => '21'),\n\t\t array('id' => '211104','name' => 'Caracoto','province_id' => '2111','department_id' => '21'),\n\t\t array('id' => '211105','name' => 'San Miguel','province_id' => '2111','department_id' => '21'),\n\t\t array('id' => '211201','name' => 'Sandia','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211202','name' => 'Cuyocuyo','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211203','name' => 'Limbani','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211204','name' => 'Patambuco','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211205','name' => 'Phara','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211206','name' => 'Quiaca','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211207','name' => 'San Juan del Oro','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211208','name' => 'Yanahuaya','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211209','name' => 'Alto Inambari','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211210','name' => 'San Pedro de Putina Punco','province_id' => '2112','department_id' => '21'),\n\t\t array('id' => '211301','name' => 'Yunguyo','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211302','name' => 'Anapia','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211303','name' => 'Copani','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211304','name' => 'Cuturapi','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211305','name' => 'Ollaraya','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211306','name' => 'Tinicachi','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '211307','name' => 'Unicachi','province_id' => '2113','department_id' => '21'),\n\t\t array('id' => '220101','name' => 'Moyobamba','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220102','name' => 'Calzada','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220103','name' => 'Habana','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220104','name' => 'Jepelacio','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220105','name' => 'Soritor','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220106','name' => 'Yantalo','province_id' => '2201','department_id' => '22'),\n\t\t array('id' => '220201','name' => 'Bellavista','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220202','name' => 'Alto Biavo','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220203','name' => 'Bajo Biavo','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220204','name' => 'Huallaga','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220205','name' => 'San Pablo','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220206','name' => 'San Rafael','province_id' => '2202','department_id' => '22'),\n\t\t array('id' => '220301','name' => 'San José de Sisa','province_id' => '2203','department_id' => '22'),\n\t\t array('id' => '220302','name' => 'Agua Blanca','province_id' => '2203','department_id' => '22'),\n\t\t array('id' => '220303','name' => 'San Martín','province_id' => '2203','department_id' => '22'),\n\t\t array('id' => '220304','name' => 'Santa Rosa','province_id' => '2203','department_id' => '22'),\n\t\t array('id' => '220305','name' => 'Shatoja','province_id' => '2203','department_id' => '22'),\n\t\t array('id' => '220401','name' => 'Saposoa','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220402','name' => 'Alto Saposoa','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220403','name' => 'El Eslabón','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220404','name' => 'Piscoyacu','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220405','name' => 'Sacanche','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220406','name' => 'Tingo de Saposoa','province_id' => '2204','department_id' => '22'),\n\t\t array('id' => '220501','name' => 'Lamas','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220502','name' => 'Alonso de Alvarado','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220503','name' => 'Barranquita','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220504','name' => 'Caynarachi','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220505','name' => 'Cuñumbuqui','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220506','name' => 'Pinto Recodo','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220507','name' => 'Rumisapa','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220508','name' => 'San Roque de Cumbaza','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220509','name' => 'Shanao','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220510','name' => 'Tabalosos','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220511','name' => 'Zapatero','province_id' => '2205','department_id' => '22'),\n\t\t array('id' => '220601','name' => 'Juanjuí','province_id' => '2206','department_id' => '22'),\n\t\t array('id' => '220602','name' => 'Campanilla','province_id' => '2206','department_id' => '22'),\n\t\t array('id' => '220603','name' => 'Huicungo','province_id' => '2206','department_id' => '22'),\n\t\t array('id' => '220604','name' => 'Pachiza','province_id' => '2206','department_id' => '22'),\n\t\t array('id' => '220605','name' => 'Pajarillo','province_id' => '2206','department_id' => '22'),\n\t\t array('id' => '220701','name' => 'Picota','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220702','name' => 'Buenos Aires','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220703','name' => 'Caspisapa','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220704','name' => 'Pilluana','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220705','name' => 'Pucacaca','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220706','name' => 'San Cristóbal','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220707','name' => 'San Hilarión','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220708','name' => 'Shamboyacu','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220709','name' => 'Tingo de Ponasa','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220710','name' => 'Tres Unidos','province_id' => '2207','department_id' => '22'),\n\t\t array('id' => '220801','name' => 'Rioja','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220802','name' => 'Awajun','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220803','name' => 'Elías Soplin Vargas','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220804','name' => 'Nueva Cajamarca','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220805','name' => 'Pardo Miguel','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220806','name' => 'Posic','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220807','name' => 'San Fernando','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220808','name' => 'Yorongos','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220809','name' => 'Yuracyacu','province_id' => '2208','department_id' => '22'),\n\t\t array('id' => '220901','name' => 'Tarapoto','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220902','name' => 'Alberto Leveau','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220903','name' => 'Cacatachi','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220904','name' => 'Chazuta','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220905','name' => 'Chipurana','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220906','name' => 'El Porvenir','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220907','name' => 'Huimbayoc','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220908','name' => 'Juan Guerra','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220909','name' => 'La Banda de Shilcayo','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220910','name' => 'Morales','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220911','name' => 'Papaplaya','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220912','name' => 'San Antonio','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220913','name' => 'Sauce','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '220914','name' => 'Shapaja','province_id' => '2209','department_id' => '22'),\n\t\t array('id' => '221001','name' => 'Tocache','province_id' => '2210','department_id' => '22'),\n\t\t array('id' => '221002','name' => 'Nuevo Progreso','province_id' => '2210','department_id' => '22'),\n\t\t array('id' => '221003','name' => 'Polvora','province_id' => '2210','department_id' => '22'),\n\t\t array('id' => '221004','name' => 'Shunte','province_id' => '2210','department_id' => '22'),\n\t\t array('id' => '221005','name' => 'Uchiza','province_id' => '2210','department_id' => '22'),\n\t\t array('id' => '230101','name' => 'Tacna','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230102','name' => 'Alto de la Alianza','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230103','name' => 'Calana','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230104','name' => 'Ciudad Nueva','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230105','name' => 'Inclan','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230106','name' => 'Pachia','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230107','name' => 'Palca','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230108','name' => 'Pocollay','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230109','name' => 'Sama','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230110','name' => 'Coronel Gregorio Albarracín Lanchipa','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230111','name' => 'La Yarada los Palos','province_id' => '2301','department_id' => '23'),\n\t\t array('id' => '230201','name' => 'Candarave','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230202','name' => 'Cairani','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230203','name' => 'Camilaca','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230204','name' => 'Curibaya','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230205','name' => 'Huanuara','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230206','name' => 'Quilahuani','province_id' => '2302','department_id' => '23'),\n\t\t array('id' => '230301','name' => 'Locumba','province_id' => '2303','department_id' => '23'),\n\t\t array('id' => '230302','name' => 'Ilabaya','province_id' => '2303','department_id' => '23'),\n\t\t array('id' => '230303','name' => 'Ite','province_id' => '2303','department_id' => '23'),\n\t\t array('id' => '230401','name' => 'Tarata','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230402','name' => 'Héroes Albarracín','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230403','name' => 'Estique','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230404','name' => 'Estique-Pampa','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230405','name' => 'Sitajara','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230406','name' => 'Susapaya','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230407','name' => 'Tarucachi','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '230408','name' => 'Ticaco','province_id' => '2304','department_id' => '23'),\n\t\t array('id' => '240101','name' => 'Tumbes','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240102','name' => 'Corrales','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240103','name' => 'La Cruz','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240104','name' => 'Pampas de Hospital','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240105','name' => 'San Jacinto','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240106','name' => 'San Juan de la Virgen','province_id' => '2401','department_id' => '24'),\n\t\t array('id' => '240201','name' => 'Zorritos','province_id' => '2402','department_id' => '24'),\n\t\t array('id' => '240202','name' => 'Casitas','province_id' => '2402','department_id' => '24'),\n\t\t array('id' => '240203','name' => 'Canoas de Punta Sal','province_id' => '2402','department_id' => '24'),\n\t\t array('id' => '240301','name' => 'Zarumilla','province_id' => '2403','department_id' => '24'),\n\t\t array('id' => '240302','name' => 'Aguas Verdes','province_id' => '2403','department_id' => '24'),\n\t\t array('id' => '240303','name' => 'Matapalo','province_id' => '2403','department_id' => '24'),\n\t\t array('id' => '240304','name' => 'Papayal','province_id' => '2403','department_id' => '24'),\n\t\t array('id' => '250101','name' => 'Calleria','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250102','name' => 'Campoverde','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250103','name' => 'Iparia','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250104','name' => 'Masisea','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250105','name' => 'Yarinacocha','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250106','name' => 'Nueva Requena','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250107','name' => 'Manantay','province_id' => '2501','department_id' => '25'),\n\t\t array('id' => '250201','name' => 'Raymondi','province_id' => '2502','department_id' => '25'),\n\t\t array('id' => '250202','name' => 'Sepahua','province_id' => '2502','department_id' => '25'),\n\t\t array('id' => '250203','name' => 'Tahuania','province_id' => '2502','department_id' => '25'),\n\t\t array('id' => '250204','name' => 'Yurua','province_id' => '2502','department_id' => '25'),\n\t\t array('id' => '250301','name' => 'Padre Abad','province_id' => '2503','department_id' => '25'),\n\t\t array('id' => '250302','name' => 'Irazola','province_id' => '2503','department_id' => '25'),\n\t\t array('id' => '250303','name' => 'Curimana','province_id' => '2503','department_id' => '25'),\n\t\t array('id' => '250304','name' => 'Neshuya','province_id' => '2503','department_id' => '25'),\n\t\t array('id' => '250305','name' => 'Alexander Von Humboldt','province_id' => '2503','department_id' => '25'),\n\t\t array('id' => '250401','name' => 'Purus','province_id' => '2504','department_id' => '25')\n\t\t);\n\t\t\n\n\n\t\t$ubigeo=[$departments,$provinces,$districts];\n\n\t\tfor($i=0; $i<count($ubigeo); $i++){ // Walk types\n\t\t\tforeach($ubigeo[$i] as $t){ // Walk each type fields\n\t\t\t\t$temp = new Ubigeo; // New register\n\t\t\t\t$temp->id = $t['id'];\n\t\t\t\t$temp->type = $i+1; // Set type\n\t\t\t\t$temp->descripcion = $t['name']; // Set descripcion\n\t\t\t\tif($i!=0){\n\t\t\t\t\t$temp->dep_id = $t['department_id'];\n\t\t\t\t}\n\t\t\t\tif($i==2){\n\t\t\t\t\t$temp->prov_id = $t['province_id'];\n\t\t\t\t}\n\t\t\t\t$temp->save();\n\t\t\t\tunset($temp); // Unset variable $temp\n\t\t\t}\n\t\t}\n\t\t\n }",
"public function Get_List_Provincia(string $p_Cod_Departamento):array\n {\n $l_ADGenerico = new ADGenerico();\n\n return [ \"List_Resultado\" => $l_ADGenerico->Get_List_Provincia($p_Cod_Departamento) ];\n }",
"function get_desglose_partidas_presupuesto($ejercicio)\n {\n $sqltext = \"\n SELECT *\n FROM `vtab_presupuesto_desglose`\n \";\n\n if(!empty($ejercicio))\n {\n $sqltext .= \" where ejercicio = '\" . $ejercicio . \"'\"; \n }\n\n $query = $this->db->query( $sqltext );\n\n if($query->num_rows() > 0)\n {\n $this->load->model('tpoadminv1/Generales_model');\n\n $array_items = [];\n $cont = 0;\n foreach ($query->result_array() as $row) \n {\n $array_items[$cont]['id'] = $cont + 1;\n $array_items[$cont]['ejercicio'] = $row['ejercicio'];\n $array_items[$cont]['partida'] = $row['partida'];\n $array_items[$cont]['descripcion'] = $row['descripcion'];\n $array_items[$cont]['original'] = $this->Generales_model->money_format(\"%.2n\",$row['original']);\n $array_items[$cont]['modificaciones'] = $this->Generales_model->money_format(\"%.2n\",$row['modificaciones']);\n $array_items[$cont]['presupuesto'] = $this->Generales_model->money_format(\"%.2n\",$row['presupuesto']);\n $array_items[$cont]['ejercido'] = $this->Generales_model->money_format(\"%.2n\",$row['ejercido']);\n $cont++;\n }\n return $array_items;\n }\n }",
"public function run()\n {\n $ListadoPuertos = array ( \n array('AAE', 'DZ', 'Les Salines Arpt', 0),\n array('AAG', 'BR', 'Arapoti Arpt', 0),\n array('AAH', 'DE', 'Aachen Merzbruck Arpt', 0),\n array('AAL', 'DK', 'Aalborg Arpt', 0),\n array('AAN', 'AE', 'Al Ain Arpt', 0),\n array('AAQ', 'RU', 'Anapa Arpt', 0),\n array('AAR', 'DK', 'Tirstrup Arpt', 0),\n array('ABE', 'US', 'Lehigh Valley Intl Arpt', 0),\n array('ABI', 'US', 'Abilene Municipal Arpt', 0),\n array('ABJ', 'CI', 'Felix Houphouet Boigny Arpt', 0),\n array('ABM', 'AU', 'Bamaga Arpt', 0),\n array('ABQ', 'US', 'Albuquerque Intl Arpt', 0),\n array('ABR', 'US', 'Aberdeen Arpt', 0),\n array('ABS', 'EG', 'Abu Simbel Arpt', 0),\n array('ABT', 'SA', 'Al Aqiq', 0),\n array('ABV', 'NG', 'Abuja Intl', 0),\n array('ABX', 'AU', 'Albury Airport', 0),\n array('ABY', 'US', 'Dougherty Cty Arpt', 0),\n array('ABZ', 'GB', 'Dyce Airport', 0),\n array('ACA', 'MX', 'Alvarez Intl Arpt', 0),\n array('ACC', 'GH', 'Kotoka Airport', 0),\n array('ACE', 'ES', 'Lanzarote Airport', 0),\n array('ACH', 'CH', 'Altenrhein Arpt', 0),\n array('ACI', 'GB', 'The Blaye Arpt', 0),\n array('ACK', 'US', 'Nantucket Memorial', 0),\n array('ACT', 'US', 'Madison Cooper Arpt', 0),\n array('ACV', 'US', 'Arcata Eureka Arpt', 0),\n array('ACY', 'US', 'Pomona Field', 0),\n array('ADA', 'TR', 'Adana Airport', 0),\n array('ADB', 'TR', 'Adnan Menderes Airport', 0),\n array('ADD', 'ET', 'Bole Airport', 0),\n array('ADE', 'YE', 'Yemen Intl Arpt', 0),\n array('ADG', 'US', 'Lenawee County Arpt', 0),\n array('ADK', 'US', 'Adak Island Ns', 0),\n array('ADL', 'AU', 'Adelaide Arpt', 0),\n array('ADM', 'US', 'Ardmore Municipal Arpt', 0),\n array('ADQ', 'US', 'Kodiak Arpt', 0),\n array('ADT', 'US', 'Ada Municipal Arpt', 0),\n array('ADW', 'US', 'Andrews Air Force Base', 0),\n array('ADZ', 'CO', 'San Andres Island Arpt', 0),\n array('AEABU', 'AE', 'abu al bukhoosh', 1),\n array('AEAJM', 'AE', 'ajman', 1),\n array('AEAUH', 'AE', 'abu dhabi', 1),\n array('AEDAS', 'AE', 'das island', 1),\n array('AEDXB', 'AE', 'dubai', 1),\n array('AEFAT', 'AE', 'fateh terminal', 1),\n array('AEFJR', 'AE', 'fujairah (al-fujairah)', 1),\n array('AEJEA', 'AE', 'jebel ali', 1),\n array('AEJED', 'AE', 'jebel dhanna', 1),\n array('AEKLF', 'AE', 'khor al fakkan', 1),\n array('AEL', 'US', 'Albert Lea Arpt', 0),\n array('AEMBS', 'AE', 'mubarras island', 1),\n array('AEMSA', 'AE', 'mina saqr', 1),\n array('AEMUB', 'AE', 'mubarek terminal', 1),\n array('AEMZD', 'AE', 'mina zayed', 1),\n array('AEP', 'AR', 'Jorge Newbery', 0),\n array('AEPRA', 'AE', 'port rashid', 1),\n array('AEQIW', 'AE', 'umm al qaiwain', 1),\n array('AER', 'RU', 'Alder Sochi Arpt', 0),\n array('AERKT', 'AE', 'ras al khaimah', 1),\n array('AERUW', 'AE', 'ruwais', 1),\n array('AES', 'NO', 'Vigra Airport', 0),\n array('AESHJ', 'AE', 'sharjah', 1),\n array('AEX', 'US', 'Alexandria Intl Arpt', 0),\n array('AEY', 'IS', 'Akureyri', 0),\n array('AEZUR', 'AE', 'zurku island', 1),\n array('AFA', 'AR', 'San Rafael Arpt', 0),\n array('AFL', 'BR', 'Alta Floresta Arpt', 0),\n array('AGA', 'MA', 'Agadir Almassira Arpt', 0),\n array('AGANU', 'AG', 'antigua', 1),\n array('AGB', 'DE', 'Muehlhausen', 0),\n array('AGBBQ', 'AG', 'barbuda', 1),\n array('AGC', 'US', 'Allegheny Cty Arpt', 0),\n array('AGE', 'DE', 'Flugplatz Arpt', 0),\n array('AGF', 'FR', 'La Garenne Arpt', 0),\n array('AGH', 'SE', 'Angelholm Helsingborg Arpt', 0),\n array('AGO', 'US', 'Magnolia Municipal', 0),\n array('AGP', 'ES', 'Malaga Arpt', 0),\n array('AGR', 'IN', 'Kheria Arpt', 0),\n array('AGS', 'US', 'Bush Field', 0),\n array('AGSJO', 'AG', 'st john\\'s (code dupl.)', 1),\n array('AGT', 'PY', 'Alejo Garcia Arpt', 0),\n array('AGU', 'MX', 'Aguascalientes Municipal Arpt', 0),\n array('AHB', 'SA', 'Abha Airport', 0),\n array('AHI', 'ID', 'Amahai Airport', 0),\n array('AHN', 'US', 'Athens Municipal', 0),\n array('AHO', 'IT', 'Fertilia Arpt', 0),\n array('AHU', 'MA', 'Charif Al Idrissi Arpt', 0),\n array('AIA', 'US', 'Alliance Municipal', 0),\n array('AIBLP', 'AI', 'blowing point', 1),\n array('AID', 'US', 'Anderson Municipal Arpt', 0),\n array('AIFOR', 'AI', 'the forest', 1),\n array('AIK', 'US', 'Aiken Municipal Arpt', 0),\n array('AIROA', 'AI', 'the road', 1),\n array('AIT', 'CK', 'Aitutaki Arpt', 0),\n array('AIY', 'US', 'Bader Field', 0),\n array('AIZ', 'US', 'Lee C Fine Memorial', 0),\n array('AJA', 'FR', 'Campo Dell Oro Arpt', 0),\n array('AJR', 'SE', 'Arvidsjaur Arpt', 0),\n array('AJU', 'BR', 'Santa Maria Arpt', 0),\n array('AKJ', 'JP', 'Asahikawa Arpt', 0),\n array('AKL', 'NZ', 'Auckland Intl Arpt', 0),\n array('AKN', 'US', 'King Salmon Arpt', 0),\n array('ALB', 'US', 'Albany Cty Arpt', 0),\n array('ALC', 'ES', 'Alicante Arpt', 0),\n array('ALDRZ', 'AL', 'durrës', 1),\n array('ALE', 'US', 'Alpine Aprt', 0),\n array('ALF', 'NO', 'Elvebakken Arpt', 0),\n array('ALG', 'DZ', 'Houari Boumedienne Arpt', 0),\n array('ALH', 'AU', 'Albany Airport', 0),\n array('ALJ', 'ZA', 'Kortdoorn Arpt', 0),\n array('ALL', 'IT', 'Albenga Arpt', 0),\n array('ALM', 'US', 'Alamogordo Municipal', 0),\n array('ALO', 'US', 'Livingston Betsworth Fld', 0),\n array('ALP', 'SY', 'Nejrab Arpt', 0),\n array('ALS', 'US', 'Alamosa Municipal', 0),\n array('ALSAR', 'AL', 'saranda', 1),\n array('ALSHG', 'AL', 'shengjin', 1),\n array('ALV', 'AD', 'Andorra La Vella Hlpt', 0),\n array('ALVOA', 'AL', 'vlora', 1),\n array('ALW', 'US', 'Walla Walla City County', 0),\n array('ALX', 'US', 'Thomas C Russell Field', 0),\n array('ALY', 'EG', 'El Nouzha Arpt', 0),\n array('AMA', 'US', 'Amarillo Intl Arpt', 0),\n array('AMD', 'IN', 'Ahmedabad Arpt', 0),\n array('AMI', 'ID', 'Selaparang Airport', 0),\n array('AMM', 'JO', 'Queen Alia Intl Arpt', 0),\n array('AMS', 'NL', 'Schiphol Arpt', 0),\n array('AMW', 'US', 'Ames Minicipal Arpt', 0),\n array('ANB', 'US', 'Anniston Municipal Arpt', 0),\n array('ANBAE', 'AN', 'bonaire n.a.', 1),\n array('ANBAR', 'AN', 'barcadera', 1),\n array('ANBUB', 'AN', 'bullen bay', 1),\n array('ANBUS', 'AN', 'bushiribana', 1),\n array('ANC', 'US', 'Anchorage Intl Arpt', 0),\n array('ANCRB', 'AN', 'caracasbaii curacao', 1),\n array('ANCUR', 'AN', 'curacao', 1),\n array('AND', 'US', 'Anderson Arpt', 0),\n array('ANE', 'FR', 'Marce Arpt', 0),\n array('ANEUX', 'AN', 'NETHERLANDS ANTILLES', 1),\n array('ANF', 'CL', 'Cerro Moreno Arpt', 0),\n array('ANFUI', 'AN', 'fuikbaai curacao', 1),\n array('ANG', 'FR', 'Brie Champniers', 0),\n array('ANI', 'US', 'Aniak Arpt', 0),\n array('ANK', 'TR', 'Etimesgut Arpt', 0),\n array('ANKRA', 'AN', 'kralendijk bonaire', 1),\n array('ANMAR', 'AN', 'marigot', 1),\n array('ANP', 'US', 'Lee Annapolis Arpt', 0),\n array('ANPHI', 'AN', 'philipsburg', 1),\n array('ANR', 'BE', 'Deurne Airport', 0),\n array('ANRIN', 'AN', 'rincon bonaire', 1),\n array('ANSMB', 'AN', 'st michiels bay', 1),\n array('ANSXM', 'AN', 'st maarten', 1),\n array('ANU', 'AG', 'V C Bird Intl Arpt', 0),\n array('ANW', 'US', 'Ainsworth Minicipal Arpt', 0),\n array('ANWIL', 'AN', 'willemstad curacao', 1),\n array('ANX', 'NO', 'Andenes Arpt', 0),\n array('AOAZZ', 'AO', 'ambriz', 1),\n array('AOBDD', 'AO', 'barra do dance', 1),\n array('AOBDT', 'AO', 'baia dos tigres', 1),\n array('AOBUG', 'AO', 'benguela', 1),\n array('AOC', 'DE', 'Altenburg Nobitz Arpt', 0),\n array('AOCAB', 'AO', 'cabinda', 1),\n array('AODGR', 'AO', 'dombe grande', 1),\n array('AOH', 'US', 'Allen County Arpt', 0),\n array('AOI', 'IT', 'Falconara Arpt', 0),\n array('AOJ', 'JP', 'Aomori Arpt', 0),\n array('AOK', 'GR', 'Karpathos Arpt', 0),\n array('AOL', 'AR', 'Paso De Los Libres Arpt', 0),\n array('AOLAA', 'AO', 'landana', 1),\n array('AOLAD', 'AO', 'luanda', 1),\n array('AOLIE', 'AO', 'lieura', 1),\n array('AOLOB', 'AO', 'lobito', 1),\n array('AOLUC', 'AO', 'lucira', 1),\n array('AOMSZ', 'AO', 'namibe', 1),\n array('AONDD', 'AO', 'sumbe', 1),\n array('AONOE', 'AO', 'novo redondo', 1),\n array('AOO', 'US', 'Blair Cty Arpt', 0),\n array('AOPAT', 'AO', 'palanca terminal', 1),\n array('AOPBN', 'AO', 'porto amboim', 1),\n array('AOPLE', 'AO', 'porto alexandre', 1),\n array('AOR', 'MY', 'Sultan Abdul Hamlin Arpt', 0),\n array('AOSAZ', 'AO', 'san antonio do zaire', 1),\n array('AOSOQ', 'AO', 'soyo-quinfuquena terminal', 1),\n array('AOTAK', 'AO', 'takula terminal', 1),\n array('APA', 'US', 'Centennial Arpt', 0),\n array('APC', 'US', 'Napa Cty Arpt', 0),\n array('APF', 'US', 'Naples Municipal', 0),\n array('APG', 'US', 'Phillips Army Air Field', 0),\n array('APL', 'MZ', 'Nampula Arpt', 0),\n array('APN', 'US', 'Phelps Collins Arpt', 0),\n array('APO', 'CO', 'Apartado Arpt', 0),\n array('APS', 'BR', 'Anapolis Arpt', 0),\n array('APW', 'WS', 'Apia Airport', 0),\n array('AQI', 'SA', 'Qaisumah Arpt', 0),\n array('AQJ', 'JO', 'Aqaba Airport', 0),\n array('AQP', 'PE', 'Rodriguez Ballon Arpt', 0),\n array('AQTNB', 'AQ', 'terra nova', 1),\n array('ARB', 'US', 'Ann Arbor Municipal', 0),\n array('ARBHI', 'AR', 'bahia blanca', 1),\n array('ARBQS', 'AR', 'barranqueras', 1),\n array('ARBUE', 'AR', 'buenos aires', 1),\n array('ARCLC', 'AR', 'caleta cordoba', 1),\n array('ARCMP', 'AR', 'campana', 1),\n array('ARCNQ', 'AR', 'corrientes', 1),\n array('ARCOL', 'AR', 'colon', 1),\n array('ARCOU', 'AR', 'concepcion del uruguay', 1),\n array('ARCRD', 'AR', 'comodoro rivadavia', 1),\n array('ARCUA', 'AR', 'cuatreros/bahia blanca', 1),\n array('ARCVI', 'AR', 'caleta olivia', 1),\n array('ARDME', 'AR', 'diamante', 1),\n array('ARFMA', 'AR', 'formosa', 1),\n array('ARGHU', 'AR', 'gualeguaychu', 1),\n array('ARH', 'RU', 'Arkhangelsk Arpt', 0),\n array('ARI', 'CL', 'Chacalluta Arpt', 0),\n array('ARIBY', 'AR', 'ibicuy', 1),\n array('ARINW', 'AR', 'bahia blanca-ingeniero white', 1),\n array('ARLPG', 'AR', 'la plata', 1),\n array('ARM', 'AU', 'Armidale Arpt', 0),\n array('ARMDQ', 'AR', 'mar del plata', 1),\n array('ARN', 'SE', 'Arlanda Arpt', 0),\n array('ARNEC', 'AR', 'necochea', 1),\n array('AROYA', 'AR', 'goya', 1),\n array('AROYO', 'AR', 'tres arroyos', 1),\n array('ARPBG', 'AR', 'puerto belgrano/bahia blanca', 1),\n array('ARPCO', 'AR', 'punta colorada', 1),\n array('ARPCY', 'AR', 'pilcomayo', 1),\n array('ARPGV', 'AR', 'bahia blanca-puerto galvan', 1),\n array('ARPLO', 'AR', 'punta loyola', 1),\n array('ARPMY', 'AR', 'puerto madryn', 1),\n array('ARPNL', 'AR', 'bahia blanca-puerto nacional', 1),\n array('ARPQU', 'AR', 'punta quilla', 1),\n array('ARPRA', 'AR', 'parana', 1),\n array('ARPRS', 'AR', 'bahia blanca-puerto rosales', 1),\n array('ARPSS', 'AR', 'posadas', 1),\n array('ARPUB', 'AR', 'puerto borghi', 1),\n array('ARPUD', 'AR', 'puerto deseado', 1),\n array('ARQQN', 'AR', 'quequén', 1),\n array('ARRAM', 'AR', 'ramallo', 1),\n array('ARRGA', 'AR', 'rio grande', 1),\n array('ARRGL', 'AR', 'rio gallegos', 1),\n array('ARROS', 'AR', 'rosario', 1),\n array('ARRZA', 'AR', 'santa cruz', 1),\n array('ARSAE', 'AR', 'san antonio este', 1),\n array('ARSFE', 'AR', 'san fernando', 1),\n array('ARSFN', 'AR', 'santa fe', 1),\n array('ARSLO', 'AR', 'san lorenzo', 1),\n array('ARSNS', 'AR', 'san nicolas de los los arroyos', 1),\n array('ARSSN', 'AR', 'san sebastian', 1),\n array('ART', 'US', 'Watertown Arpt', 0),\n array('ARTUC', 'AR', 'tucuman', 1),\n array('ARU', 'BR', 'Aracatuba Arpt', 0),\n array('ARULA', 'AR', 'san julian', 1),\n array('ARUSH', 'AR', 'ushuaia', 1),\n array('ARV', 'US', 'Noble F Lee Memorial Field', 0),\n array('ARVCN', 'AR', 'villa constitucion', 1),\n array('ARW', 'RO', 'Arad Arpt', 0),\n array('ARXPD', 'AR', 'san pedro', 1),\n array('ARZAE', 'AR', 'zarate', 1),\n array('ASB', 'TM', 'Ashgabat Arpt', 0),\n array('ASE', 'US', 'Pitkin Cty Arptt Sardy Fld', 0),\n array('ASF', 'RU', 'Astrakhan Arpt', 0),\n array('ASH', 'US', 'Boire Field Arpt', 0),\n array('ASJ', 'JP', 'Amami O Shima Arpt', 0),\n array('ASK', 'CI', 'Yamoussoukro Arpt', 0),\n array('ASL', 'US', 'Harrison County Arpt', 0),\n array('ASM', 'ER', 'Asmara Intl Arpt', 0),\n array('ASP', 'AU', 'Alice Springs Arpt', 0),\n array('ASPPG', 'AS', 'pago pago', 1),\n array('ASR', 'TR', 'Kayseri Arpt', 0),\n array('ASU', 'PY', 'Salvio Pettirosse Arpt', 0),\n array('ASW', 'EG', 'Daraw Arpt', 0),\n array('ATC', 'BS', 'Arthurs Town Arpt', 0),\n array('ATH', 'GR', 'Eleftherios Venizielos Intl Arpt', 0),\n array('ATL', 'US', 'Hartsfield Intl Arpt', 0),\n array('ATM', 'BR', 'Altamira Arpt', 0),\n array('ATO', 'US', 'Ohio University Arpt', 0),\n array('ATW', 'US', 'Outagamie Cty Arpt', 0),\n array('ATXXX', 'AT', 'puerto basura', 1),\n array('ATY', 'US', 'Watertown Municipal', 0),\n array('AUA', 'AW', 'Reina Beatrix Arpt', 0),\n array('AUABP', 'AU', 'abbot point', 1),\n array('AUALH', 'AU', 'albany', 1),\n array('AUARD', 'AU', 'ardrossan', 1),\n array('AUBAH', 'AU', 'ballast head', 1),\n array('AUBCH', 'AU', 'beachport', 1),\n array('AUBDB', 'AU', 'bundaberg', 1),\n array('AUBEL', 'AU', 'bell bay', 1),\n array('AUBME', 'AU', 'broome', 1),\n array('AUBMW', 'AU', 'broadmeadows', 1),\n array('AUBNE', 'AU', 'brisbane', 1),\n array('AUBNK', 'AU', 'ballina', 1),\n array('AUBRT', 'AU', 'bathurst island', 1),\n array('AUBTB', 'AU', 'botany bay', 1),\n array('AUBUS', 'AU', 'busselton', 1),\n array('AUBUY', 'AU', 'bunbury', 1),\n array('AUBWB', 'AU', 'barrow island', 1),\n array('AUBWT', 'AU', 'burnie', 1),\n array('AUBYP', 'AU', 'beauty point', 1),\n array('AUCAL', 'AU', 'caloundra head', 1),\n array('AUCBR', 'AU', 'canberra', 1),\n array('AUCCU', 'AU', 'cape cuvier', 1),\n array('AUCFS', 'AU', 'coffs harbour', 1),\n array('AUCHB', 'AU', 'catherine hill bay', 1),\n array('AUCHV', 'AU', 'challis venture (oil terminal)', 1),\n array('AUCLL', 'AU', 'collan islands', 1),\n array('AUCLN', 'AU', 'cape leeuwin', 1),\n array('AUCLR', 'AU', 'clarence river', 1),\n array('AUCLT', 'AU', 'cape lambert', 1),\n array('AUCNS', 'AU', 'cairns', 1),\n array('AUCOB', 'AU', 'corio bay', 1),\n array('AUCOP', 'AU', 'cossack pioneer (oil terminal)', 1),\n array('AUCPN', 'AU', 'cape preston', 1),\n array('AUCQP', 'AU', 'cape flattery', 1),\n array('AUCTN', 'AU', 'cooktown', 1),\n array('AUCVQ', 'AU', 'carnarvon', 1),\n array('AUDAA', 'AU', 'darra', 1),\n array('AUDAM', 'AU', 'dampier', 1),\n array('AUDPO', 'AU', 'devonport', 1),\n array('AUDRB', 'AU', 'derby', 1),\n array('AUDRW', 'AU', 'darwin', 1),\n array('AUEDB', 'AU', 'edithburgh', 1),\n array('AUELE', 'AU', 'electrona', 1),\n array('AUEPR', 'AU', 'esperance', 1),\n array('AUEXM', 'AU', 'exmouth gulf', 1),\n array('AUFIS', 'AU', 'fisherman islands', 1),\n array('AUFRE', 'AU', 'fremantle', 1),\n array('AUG', 'US', 'Maine State Arpt', 0),\n array('AUGEE', 'AU', 'george town', 1),\n array('AUGET', 'AU', 'geraldton', 1),\n array('AUGEX', 'AU', 'geelong', 1),\n array('AUGLL', 'AU', 'glebe island', 1),\n array('AUGLT', 'AU', 'gladstone', 1),\n array('AUGOI', 'AU', 'goode is', 1),\n array('AUGOV', 'AU', 'gove', 1),\n array('AUGRH', 'AU', 'greenhead', 1),\n array('AUGRV', 'AU', 'griffin venture (oil terminal)', 1),\n array('AUGTE', 'AU', 'groote eylandt', 1),\n array('AUH', 'AE', 'Dhabi Intl Arpt', 0),\n array('AUHBA', 'AU', 'hobart', 1),\n array('AUHNK', 'AU', 'hinchinbrooke island', 1),\n array('AUHOT', 'AU', 'hope tun', 1),\n array('AUHPT', 'AU', 'haypoint', 1),\n array('AUHYI', 'AU', 'hardy island', 1),\n array('AUIPS', 'AU', 'ipswich', 1),\n array('AUJOV', 'AU', 'jabiru venture (oil terminal) ', 1),\n array('AUKGC', 'AU', 'kingscote', 1),\n array('AUKIB', 'AU', 'king bay', 1),\n array('AUKIT', 'AU', 'kingston', 1),\n array('AUKLP', 'AU', 'klein point', 1),\n array('AUKOI', 'AU', 'koolan island', 1),\n array('AUKTR', 'AU', 'katherine', 1),\n array('AUKUR', 'AU', 'kurnell', 1),\n array('AUKWI', 'AU', 'kwinana', 1),\n array('AULAB', 'AU', 'lady barron', 1),\n array('AULDH', 'AU', 'lord howe is', 1),\n array('AULST', 'AU', 'launceston', 1),\n array('AULUC', 'AU', 'lucinda', 1),\n array('AUMBH', 'AU', 'maryborough', 1),\n array('AUMEL', 'AU', 'melbourne', 1),\n array('AUMIB', 'AU', 'milner bay', 1),\n array('AUMKY', 'AU', 'mackay', 1),\n array('AUMOU', 'AU', 'mourilyan', 1),\n array('AUMRS', 'AU', 'melrose', 1),\n array('AUNTL', 'AU', 'newcastle', 1),\n array('AUO', 'US', 'Auburn Opelika', 0),\n array('AUOSB', 'AU', 'osborne island', 1),\n array('AUPAE', 'AU', 'port adelaide', 1),\n array('AUPAU', 'AU', 'port arthur', 1),\n array('AUPBT', 'AU', 'port botany', 1),\n array('AUPBY', 'AU', 'port bonython', 1),\n array('AUPCT', 'AU', 'port curtis', 1),\n array('AUPEL', 'AU', 'pelican point', 1),\n array('AUPER', 'AU', 'perth', 1),\n array('AUPEX', 'AU', 'exmouth', 1),\n array('AUPGI', 'AU', 'port giles', 1),\n array('AUPHE', 'AU', 'port hedland', 1),\n array('AUPHU', 'AU', 'port huon', 1),\n array('AUPJK', 'AU', 'port jackson', 1),\n array('AUPKL', 'AU', 'port kembla', 1),\n array('AUPLA', 'AU', 'port latta', 1),\n array('AUPLO', 'AU', 'port lincoln', 1),\n array('AUPMK', 'AU', 'palm island', 1),\n array('AUPPI', 'AU', 'port pirie', 1),\n array('AUPQQ', 'AU', 'port macquarie', 1),\n array('AUPRB', 'AU', 'proper bay', 1),\n array('AUPRC', 'AU', 'price', 1),\n array('AUPSM', 'AU', 'point samson', 1),\n array('AUPST', 'AU', 'port stanvac', 1),\n array('AUPSY', 'AU', 'port stanley', 1),\n array('AUPTD', 'AU', 'port dalrymple', 1),\n array('AUPTI', 'AU', 'port douglas', 1),\n array('AUPTJ', 'AU', 'portland', 1),\n array('AUPTL', 'AU', 'port alma', 1),\n array('AUPUG', 'AU', 'port augusta', 1),\n array('AUPWI', 'AU', 'point wilson', 1),\n array('AUPWL', 'AU', 'port walcott', 1),\n array('AUPWR', 'AU', 'port warrender', 1),\n array('AUQ', 'PF', 'Atuona Arpt', 0),\n array('AUQDN', 'AU', 'eden', 1),\n array('AUR', 'FR', 'Tronquieres Arpt', 0),\n array('AURAB', 'AU', 'rapid bay', 1),\n array('AURBU', 'AU', 'roebourne', 1),\n array('AURCM', 'AU', 'richmond', 1),\n array('AURDN', 'AU', 'risdon', 1),\n array('AUROK', 'AU', 'rockhampton', 1),\n array('AURTS', 'AU', 'rottnest island', 1),\n array('AUS', 'US', 'Bergstrom Intl Arpt', 0),\n array('AUSHB', 'AU', 'shark bay', 1),\n array('AUSKV', 'AU', 'skua venture (oil terminal)', 1),\n array('AUSMT', 'AU', 'saladin marine terminal', 1),\n array('AUSPB', 'AU', 'spring bay', 1),\n array('AUSRN', 'AU', 'strahan', 1),\n array('AUSTA', 'AU', 'stanley', 1),\n array('AUSWR', 'AU', 'south west rocks', 1),\n array('AUSYD', 'AU', 'sydney', 1),\n array('AUTHE', 'AU', 'thevenard', 1),\n array('AUTIS', 'AU', 'thursday island', 1),\n array('AUTOB', 'AU', 'towford bay', 1),\n array('AUTRB', 'AU', 'trial bay', 1),\n array('AUTSV', 'AU', 'townsville', 1),\n array('AUURN', 'AU', 'urangan', 1),\n array('AUUSL', 'AU', 'useless loop', 1),\n array('AUVAR', 'AU', 'varanus island', 1),\n array('AUW', 'US', 'Wausau Municipal Arpt', 0),\n array('AUWAL', 'AU', 'wallaroo', 1),\n array('AUWAZ', 'AU', 'warwick', 1),\n array('AUWEI', 'AU', 'weipa', 1),\n array('AUWEP', 'AU', 'westernport', 1),\n array('AUWMB', 'AU', 'warrnambool', 1),\n array('AUWOT', 'AU', 'wonthaggi', 1),\n array('AUWYA', 'AU', 'whyalla', 1),\n array('AUWYN', 'AU', 'wyndham', 1),\n array('AUX', 'BR', 'Araguaina Arpt', 0),\n array('AUYAM', 'AU', 'yampi', 1),\n array('AUYBA', 'AU', 'yamba', 1),\n array('AUZ', 'US', 'Aurora Municipal Arpt', 0),\n array('AUZBO', 'AU', 'bowen', 1),\n array('AVI', 'CU', 'Maximo Gomez Arpt', 0),\n array('AVL', 'US', 'Asheville Municipal Arpt', 0),\n array('AVN', 'FR', 'Avignon Caumont Arpt', 0),\n array('AVP', 'US', 'Wilkes Barre Scranton Intl Arpt', 0),\n array('AVV', 'AU', 'Avalon Arpt', 0),\n array('AWAUA', 'AW', 'aruba', 1),\n array('AWBAR', 'AW', 'barcadera', 1),\n array('AWDEU', 'AW', 'druif', 1),\n array('AWORJ', 'AW', 'oranjestad', 1),\n array('AWSNL', 'AW', 'sint nicolaas', 1),\n array('AXA', 'AI', 'Wallblake Municipal', 0),\n array('AXD', 'GR', 'Dhmokritos Arpt', 0),\n array('AXN', 'US', 'Alexandria Airport', 0),\n array('AXS', 'US', 'Altus Municipal Arpt', 0),\n array('AXT', 'JP', 'Akita Airport', 0),\n array('AXV', 'US', 'Neil Armstrong Arpt', 0),\n array('AYQ', 'AU', 'Connellan Arpt', 0),\n array('AYR', 'AU', 'Ayr Arpt', 0),\n array('AYS', 'US', 'Ware County Arpt', 0),\n array('AYT', 'TR', 'Antalya Airport', 0),\n array('AZBAK', 'AZ', 'baku', 1),\n array('AZD', 'IR', 'Yazd Arpt', 0),\n array('AZG', 'MX', 'Apatzingan Arpt', 0),\n array('AZMHL', 'AZ', 'makhachkala', 1),\n array('AZO', 'US', 'Kalamazoo Cty Arpt', 0),\n array('BAG', 'PH', 'Loakan Arpt', 0),\n array('BAH', 'BH', 'Muharraq Arpt', 0),\n array('BAK', 'AZ', 'Baku Arpt', 0),\n array('BAQ', 'CO', 'E Cortissoz Arpt', 0),\n array('BAU', 'BR', 'Bauru Arpt', 0),\n array('BBA', 'CL', 'Teniente Vidal Airport', 0),\n array('BBBGI', 'BB', 'bridgetown', 1),\n array('BBH', 'DE', 'Barth Arpt', 0),\n array('BBI', 'IN', 'Bhubaneswar Arpt', 0),\n array('BBJ', 'DE', 'Bitburg Air Base', 0),\n array('BBK', 'BW', 'Kasane Arpt', 0),\n array('BBR', 'GP', 'Baillif Arpt', 0),\n array('BBU', 'RO', 'Baneasa Airport', 0),\n array('BBW', 'US', 'Broken Bow Municipal', 0),\n array('BCB', 'US', 'Virginia Tech Arpt', 0),\n array('BCE', 'US', 'Bryce Arpt', 0),\n array('BCH', 'TP', 'English Madeira Arpt', 0),\n array('BCN', 'ES', 'Barcelona Arpt', 0),\n array('BCT', 'US', 'Boca Raton Public', 0),\n array('BDA', 'BM', 'Bermuda International', 0),\n array('BDB', 'AU', 'Bundaberg Arpt', 0),\n array('BDBZL', 'BD', 'barisal', 1),\n array('BDCGP', 'BD', 'chittagong', 1),\n array('BDCHL', 'BD', 'chalna', 1),\n array('BDKHL', 'BD', 'khulna', 1),\n array('BDL', 'US', 'Bradley Intl Arpt', 0),\n array('BDMGL', 'BD', 'mongla', 1),\n array('BDNAR', 'BD', 'narayanganj', 1),\n array('BDO', 'ID', 'Husein Sastranegara Arpt', 0),\n array('BDQ', 'IN', 'Vadodara Arpt', 0),\n array('BDR', 'US', 'Sikorsky Memorial Arpt', 0),\n array('BDS', 'IT', 'Apaola Casale Arpt', 0),\n array('BDU', 'NO', 'Bardufoss Arpt', 0),\n array('BEANR', 'BE', 'antwerpen', 1),\n array('BEB', 'GB', 'Benbecula Arpt', 0),\n array('BEBGS', 'BE', 'bruges', 1),\n array('BEBRU', 'BE', 'brussel (bruxelles)', 1),\n array('BED', 'US', 'Bedford Arpt', 0),\n array('BEDEL', 'BE', 'doel', 1),\n array('BEG', 'YU', 'Belgrade Beograd Arpt', 0),\n array('BEGNE', 'BE', 'ghent', 1),\n array('BEH', 'US', 'Ross Field', 0),\n array('BEL', 'BR', 'Val De Cans Arpt', 0),\n array('BELGG', 'BE', 'liege', 1),\n array('BEN', 'LY', 'Benina Intl Arpt', 0),\n array('BENIE', 'BE', 'nieuwpoort', 1),\n array('BEO', 'AU', 'Belmont Airport', 0),\n array('BEOST', 'BE', 'oostende', 1),\n array('BEQ', 'GB', 'Honington Arpt', 0),\n array('BERUP', 'BE', 'rupel', 1),\n array('BES', 'FR', 'Guipavas Arpt', 0),\n array('BET', 'US', 'Bethel Airport', 0),\n array('BEW', 'MZ', 'Beira Arpt', 0),\n array('BEY', 'LB', 'Beirut Intl Arpt', 0),\n array('BEZEE', 'BE', 'zeebrugge', 1),\n array('BEZEL', 'BE', 'zelzate', 1),\n array('BFD', 'US', 'Bradford Regional Arpt', 0),\n array('BFE', 'DE', 'Bielefeld Arpt', 0),\n array('BFF', 'US', 'Scottsbluff Municipal', 0),\n array('BFG', 'US', 'Bullfrog Basin Arpt', 0),\n array('BFI', 'US', 'Seattle Boeing Field', 0),\n array('BFJ', 'FJ', 'Ba Arpt', 0),\n array('BFL', 'US', 'Meadows Field', 0),\n array('BFN', 'ZA', 'Bloemfontein International', 0),\n array('BFP', 'US', 'Beaver Falls Arpt', 0),\n array('BFR', 'US', 'Virgil I Grissom Municipal', 0),\n array('BFS', 'GB', 'Belfast Intl Arpt', 0),\n array('BFT', 'US', 'Beaufort County Arpt', 0),\n array('BFV', 'TH', 'Buri Ram Arpt', 0),\n array('BGA', 'CO', 'Palo Negro Arpt', 0),\n array('BGBOJ', 'BG', 'burgas', 1),\n array('BGF', 'CF', 'Bangui Airport', 0),\n array('BGI', 'BB', 'Grantley Adams Intl Arpt', 0),\n array('BGLOM', 'BG', 'lom', 1),\n array('BGM', 'US', 'Edwin A Link Field', 0),\n array('BGMIC', 'BG', 'michurin', 1),\n array('BGO', 'NO', 'Flesland Airport', 0),\n array('BGR', 'US', 'Bangor Intl Arpt', 0),\n array('BGRDU', 'BG', 'ruse', 1),\n array('BGSLS', 'BG', 'silistra', 1),\n array('BGSVI', 'BG', 'svistov', 1),\n array('BGV', 'BR', 'Bento Goncalves Arpt', 0),\n array('BGVAR', 'BG', 'varna', 1),\n array('BGVID', 'BG', 'vidin', 1),\n array('BGW', 'IQ', 'Al Muthana Arpt', 0),\n array('BGY', 'IT', 'Orio Al Serio Arpt', 0),\n array('BHB', 'US', 'Hancock County', 0),\n array('BHBAH', 'BH', 'bahrain', 1),\n array('BHD', 'GB', 'Belfast City Arpt', 0),\n array('BHE', 'NZ', 'Woodbourne Arpt', 0),\n array('BHI', 'AR', 'Commandante Airport', 0),\n array('BHJ', 'IN', 'Rudra Mata Arpt', 0),\n array('BHK', 'UZ', 'Bukhara Arpt', 0),\n array('BHL', 'MX', 'Bahia De Los Angeles Arpt', 0),\n array('BHM', 'US', 'Seibels Bryan Arpt', 0),\n array('BHMAN', 'BH', 'manama', 1),\n array('BHMIN', 'BH', 'mina sulman', 1),\n array('BHO', 'IN', 'Bhopal Arpt', 0),\n array('BHQ', 'AU', 'Broken Hill Arpt', 0),\n array('BHRAS', 'BH', 'al mutae', 1),\n array('BHS', 'AU', 'Raglan Airport', 0),\n array('BHSIT', 'BH', 'sitra', 1),\n array('BHX', 'GB', 'Birmingham Intl Arpt', 0),\n array('BHY', 'CN', 'Beihai Airport', 0),\n array('BIA', 'FR', 'Poretta Airport', 0),\n array('BID', 'US', 'Block Island Municipal', 0),\n array('BIF', 'US', 'Biggs Army Air Field', 0),\n array('BIH', 'US', 'Bishop Airport', 0),\n array('BII', 'MH', 'Enyu Airfield', 0),\n array('BIK', 'ID', 'Mokmer Arpt', 0),\n array('BIL', 'US', 'Logan Field', 0),\n array('BIM', 'BS', 'Bimini Airport', 0),\n array('BIO', 'ES', 'Sondica Arpt', 0),\n array('BIQ', 'FR', 'Bayonne Anglet Arpt', 0),\n array('BIS', 'US', 'Bismarck Municipal Arpt', 0),\n array('BIY', 'ZA', 'Bisho Arpt', 0),\n array('BJC', 'US', 'Jeffco Arpt', 0),\n array('BJCOO', 'BJ', 'cotonou', 1),\n array('BJI', 'US', 'Bemidji Municipal Arpt', 0),\n array('BJL', 'GM', 'Yundum Intl Arpt', 0),\n array('BJM', 'BI', 'Bujumbura Intl Arpt', 0),\n array('BJPTN', 'BJ', 'port novo', 1),\n array('BJSEM', 'BJ', 'seme terminal', 1),\n array('BJV', 'TR', 'Milas Arpt', 0),\n array('BJX', 'MX', 'Del Bajio Arpt', 0),\n array('BJZ', 'ES', 'Talaveral La Real Arpt', 0),\n array('BKA', 'RU', 'Bykovo Arpt', 0),\n array('BKI', 'MY', 'Kota Kinabalu Arpt', 0),\n array('BKK', 'TH', 'Bangkok Intl Arpt', 0),\n array('BKL', 'US', 'Burke Lakefront Arpt', 0),\n array('BKO', 'ML', 'Senou Airport', 0),\n array('BKW', 'US', 'Raleigh Cty Memorial', 0),\n array('BKX', 'US', 'Brookings Municipal', 0),\n array('BLA', 'VE', 'Gen J A Anzoategui Arpt', 0),\n array('BLE', 'SE', 'Dala Airport', 0),\n array('BLF', 'US', 'Mercer County', 0),\n array('BLH', 'US', 'Blythe Airport', 0),\n array('BLI', 'US', 'Bellingham Intl Arpt', 0),\n array('BLK', 'GB', 'Blackpool Airport', 0),\n array('BLL', 'DK', 'Billund Airport', 0),\n array('BLQ', 'IT', 'Guglielmo Marconi', 0),\n array('BLR', 'IN', 'Hindustan Arpt', 0),\n array('BLT', 'AU', 'Blackwater Arpt', 0),\n array('BLV', 'US', 'Scott AFB Mid America', 0),\n array('BLZ', 'MW', 'Chileka Airport', 0),\n array('BMA', 'SE', 'Bromma Airport', 0),\n array('BMBDA', 'BM', 'hamilton', 1),\n array('BME', 'AU', 'Broome Airport', 0),\n array('BMFPT', 'BM', 'freeport', 1),\n array('BMG', 'US', 'Monroe Cty Arpt Indiana', 0),\n array('BMHBI', 'BM', 'harbor island', 1),\n array('BMI', 'US', 'Normal Airport', 0),\n array('BMSGE', 'BM', 'st georges', 1),\n array('BNA', 'US', 'Nashville Metro Arpt', 0),\n array('BNBTN', 'BN', 'brunei town', 1),\n array('BNBWN', 'BN', 'bandar seri begawan', 1),\n array('BNE', 'AU', 'Brisbane Arpt', 0),\n array('BNJ', 'DE', 'Bonn Railroad Station', 0),\n array('BNK', 'AU', 'Ballina Arpt', 0),\n array('BNKUB', 'BN', 'kuala belait', 1),\n array('BNLUM', 'BN', 'lumut', 1),\n array('BNMUA', 'BN', 'muara', 1),\n array('BNN', 'NO', 'Bronnoy Arpt', 0),\n array('BNSER', 'BN', 'seria', 1),\n array('BNTAS', 'BN', 'tanjong salirong', 1),\n array('BNU', 'BR', 'Blumenau Arpt', 0),\n array('BNX', 'BA', 'Banja Luka Arpt', 0),\n array('BOB', 'PF', 'Motu Mute Arpt', 0),\n array('BOC', 'PA', 'Bocas Del Toro Arpt', 0),\n array('BOD', 'FR', 'Bordeaux Arpt', 0),\n array('BOG', 'CO', 'Eldorado Airport', 0),\n array('BOGUQ', 'BO', 'guaqui', 1),\n array('BOH', 'GB', 'Bournemouth Intl Arpt', 0),\n array('BOI', 'US', 'Boise Municipal Arpt Gowen Field', 0),\n array('BOJ', 'BG', 'Bourgas Arpt', 0),\n array('BOM', 'IN', 'Chhatrapati Shivaji Intl', 0),\n array('BON', 'AN', 'Flamingo Field', 0),\n array('BOO', 'NO', 'Bodo Arpt', 0),\n array('BOPBU', 'BO', 'puerto busch', 1),\n array('BOPSZ', 'BO', 'puerto suarez', 1),\n array('BORBQ', 'BO', 'rurrenabaque', 1),\n array('BORIB', 'BO', 'riberalta', 1),\n array('BOS', 'US', 'Logan Intl Arpt', 0),\n array('BOTDD', 'BO', 'trinidad', 1),\n array('BOX', 'AU', 'Borroloola Arpt', 0),\n array('BPN', 'ID', 'Sepingan Arpt', 0),\n array('BPS', 'BR', 'Porto Seguro Arpt', 0),\n array('BPT', 'US', 'Jefferson Cty Arpt', 0),\n array('BQB', 'AU', 'Busselton Arpt', 0),\n array('BQK', 'US', 'Gylnco Jet Port', 0),\n array('BQN', 'US', 'Borinquen Municipal Arpt', 0),\n array('BQS', 'RU', 'Blagoveshchensk Arpt', 0),\n array('BQT', 'BY', 'Brest Arpt', 0),\n array('BRA', 'BR', 'Barreiras Arpt', 0),\n array('BRADR', 'BR', 'angra dos reis', 1),\n array('BRAJU', 'BR', 'aracaju', 1),\n array('BRANT', 'BR', 'antonina', 1),\n array('BRARB', 'BR', 'aratu', 1),\n array('BRARE', 'BR', 'areia branca', 1),\n array('BRBEL', 'BR', 'belem', 1),\n array('BRBNU', 'BR', 'blumenau', 1),\n array('BRBVM', 'BR', 'belmonte', 1),\n array('BRC', 'AR', 'San Carlos De Bariloche Intl Arpt', 0),\n array('BRCDO', 'BR', 'cabedelo', 1),\n array('BRCMC', 'BR', 'camocim', 1),\n array('BRCMG', 'BR', 'corumba', 1),\n array('BRD', 'US', 'Crowwing Cty Arpt', 0),\n array('BRE', 'DE', 'Bremen Airport', 0),\n array('BRF', 'GB', 'Bradford Rail Station', 0),\n array('BRFLN', 'BR', 'florianopolis', 1),\n array('BRFOR', 'BR', 'fortaleza', 1),\n array('BRGEB', 'BR', 'gebig', 1),\n array('BRI', 'IT', 'Bari Airport', 0),\n array('BRIBB', 'BR', 'imbituba', 1),\n array('BRIOS', 'BR', 'ilheus', 1),\n array('BRITJ', 'BR', 'itajai', 1),\n array('BRITQ', 'BR', 'itaqui', 1),\n array('BRJPA', 'BR', 'joao pessoa', 1),\n array('BRK', 'AU', 'Bourke Airport', 0),\n array('BRL', 'US', 'Burlington Municipal Arpt', 0),\n array('BRM', 'VE', 'Airport Barquisimeto', 0),\n array('BRMAO', 'BR', 'manaus', 1),\n array('BRMCP', 'BR', 'macapa', 1),\n array('BRMCU', 'BR', 'macau', 1),\n array('BRMCZ', 'BR', 'maceio', 1),\n array('BRMGU', 'BR', 'munguba', 1),\n array('BRN', 'CH', 'Belp Airport', 0),\n array('BRNAT', 'BR', 'natal', 1),\n array('BRNTR', 'BR', 'niteroi', 1),\n array('BRO', 'US', 'South Padre Island Intl Arpt', 0),\n array('BRPCL', 'BR', 'portocel', 1),\n array('BRPET', 'BR', 'pelotas', 1),\n array('BRPHB', 'BR', 'parnaiba', 1),\n array('BRPNG', 'BR', 'paranagua', 1),\n array('BRPOA', 'BR', 'pôrto alegre', 1),\n array('BRPOU', 'BR', 'ponta do ubu', 1),\n array('BRPVH', 'BR', 'pôrto velho', 1),\n array('BRQ', 'CZ', 'Turnay Arpt', 0),\n array('BRR', 'GB', 'North Bay Arpt', 0),\n array('BRREC', 'BR', 'recife', 1),\n array('BRRIG', 'BR', 'rio grande', 1),\n array('BRRIO', 'BR', 'rio de janeiro', 1),\n array('BRS', 'GB', 'Bristol Intl Arpt', 0),\n array('BRSAN', 'BR', 'santana', 1),\n array('BRSFS', 'BR', 'são francisco do sul', 1),\n array('BRSLZ', 'BR', 'saã luiz', 1),\n array('BRSPB', 'BR', 'sepetiba bahia de', 1),\n array('BRSSA', 'BR', 'salvador', 1),\n array('BRSSO', 'BR', 'são sebastião', 1),\n array('BRSSZ', 'BR', 'santos', 1),\n array('BRSUA', 'BR', 'suape', 1),\n array('BRT', 'AU', 'Bathurst Island Arpt', 0),\n array('BRTRM', 'BR', 'tramandai', 1),\n array('BRTUB', 'BR', 'tubarão', 1),\n array('BRTUT', 'BR', 'tutoia', 1),\n array('BRU', 'BE', 'Brussels National Arpt', 0),\n array('BRV', 'DE', 'Bremerhaven Arpt', 0),\n array('BRVDC', 'BR', 'vila de conde', 1),\n array('BRVIX', 'BR', 'vitoria', 1),\n array('BRW', 'US', 'Barrow WBAS', 0),\n array('BRX', 'DO', 'Barahona Arpt', 0),\n array('BSASD', 'BS', 'andros town andros island', 1),\n array('BSB', 'BR', 'Brasilia Intl Arpt', 0),\n array('BSCCZ', 'BS', 'chub cay berry islands', 1),\n array('BSCEL', 'BS', 'cape eleuthera eleuthera', 1),\n array('BSCLP', 'BS', 'clifton point', 1),\n array('BSCOX', 'BS', 'congo town andros island', 1),\n array('BSCRI', 'BS', 'crooked island', 1),\n array('BSELE', 'BS', 'eleuthera island', 1),\n array('BSEXU', 'BS', 'exuma island', 1),\n array('BSFPO', 'BS', 'freeport grand bahama', 1),\n array('BSGGT', 'BS', 'george town great exuma i.', 1),\n array('BSGHB', 'BS', 'governors harbour eleuthera', 1),\n array('BSGHC', 'BS', 'great harbour cay berry is.', 1),\n array('BSGTC', 'BS', 'green turtle cay gr.abaco i.', 1),\n array('BSH', 'GB', 'Brighton Rail Station', 0),\n array('BSHBI', 'BS', 'harbour island eleuthera', 1),\n array('BSI', 'US', 'Blairsville Arpt', 0),\n array('BSIGA', 'BS', 'inagua', 1),\n array('BSJ', 'AU', 'Bairnsdale Airport', 0),\n array('BSL', 'CH', 'Basel Mulhouse Arpt', 0),\n array('BSMAT', 'BS', 'matthew town', 1),\n array('BSMHH', 'BS', 'marsh harbour great abaco i.', 1),\n array('BSMYG', 'BS', 'mayaguana island', 1),\n array('BSNAS', 'BS', 'nassau new providence i.', 1),\n array('BSOCE', 'BS', 'ocean cay', 1),\n array('BSQ', 'US', 'Bisbee Municipal Arpt', 0),\n array('BSR', 'IQ', 'Basra Intl Arpt', 0),\n array('BSRSD', 'BS', 'rock sound eleuthera', 1),\n array('BSSAQ', 'BS', 'san andros andros island', 1),\n array('BSSML', 'BS', 'stella maris long island', 1),\n array('BSSRP', 'BS', 'south riding point', 1),\n array('BSTBI', 'BS', 'the bight cat island', 1),\n array('BSTCB', 'BS', 'treasure cay great abaco i.', 1),\n array('BSWKR', 'BS', 'walker\\'s cay', 1),\n array('BSWTD', 'BS', 'west end grand bahama', 1),\n array('BSZSA', 'BS', 'san salvador island', 1),\n array('BTH', 'ID', 'Hang Nadim Arpt', 0),\n array('BTJ', 'ID', 'Blang Bintang Arpt', 0),\n array('BTL', 'US', 'WK Kellogg Regional', 0),\n array('BTM ', 'ID', 'batam', 1),\n array('BTR', 'US', 'Ryan Airport', 0),\n array('BTS', 'SK', 'Ivanka Arpt', 0),\n array('BTV', 'US', 'Burlington Intl Arpt', 0),\n array('BTZ', 'TR', 'Bursa Arpt', 0),\n array('BUD', 'HU', 'Ferihegy Arpt', 0),\n array('BUF', 'US', 'Greater Buffalo Intl Arpt', 0),\n array('BUQ', 'ZW', 'Bulawayo Arpt', 0),\n array('BUR', 'US', 'Burbank Glendale Pasadena Arpt', 0),\n array('BUS', 'GE', 'Batumi Arpt', 0),\n array('BUY', 'AU', 'Bunbury Arpt', 0),\n array('BVA', 'FR', 'Beauvais Tille Arpt', 0),\n array('BVB', 'BR', 'Boa Vista Arpt', 0),\n array('BVC', 'CV', 'Rabil Arpt', 0),\n array('BVE', 'FR', 'Laroche Airport', 0),\n array('BVH', 'BR', 'Vilhena Arpt', 0),\n array('BVO', 'US', 'Bartlesville Municipal Arpt', 0),\n array('BVR', 'CV', 'Esperadinha', 0),\n array('BVX', 'US', 'Batesville Municipal', 0),\n array('BWC', 'US', 'Brawley Arpt', 0),\n array('BWD', 'US', 'Brownwood Municipal Arpt', 0),\n array('BWE', 'DE', 'Braunschweig Arpt', 0),\n array('BWF', 'GB', 'Walney Island', 0),\n array('BWG', 'US', 'Warren Cty Arpt', 0),\n array('BWI', 'US', 'Baltimore Washington Intl Arpt', 0),\n array('BWN', 'BN', 'Brunei Intl Arpt', 0),\n array('BWQ', 'AU', 'Brewarrina Arpt', 0),\n array('BWT', 'AU', 'Burnie Wynyard Arpt', 0),\n array('BWU', 'AU', 'Bankstown Aerodrome', 0),\n array('BXN', 'TR', 'Imsik Arpt', 0),\n array('BXS', 'US', 'Borrego Valley Arpt', 0),\n array('BYI', 'US', 'Burley Arpt', 0),\n array('BYU', 'DE', 'Bindlacher Berg Arpt', 0),\n array('BYW', 'US', 'Blakely Is Municipal', 0),\n array('BZBZE', 'BZ', 'belize city', 1),\n array('BZC', 'BR', 'Buzios Arpt', 0),\n array('BZCOL', 'BZ', 'colinto', 1),\n array('BZE', 'BZ', 'Belize Intl Arpt', 0),\n array('BZG', 'PL', 'Bydgoszcz Arpt', 0),\n array('BZH', 'ZW', 'Bumi Hills Arpt', 0),\n array('BZN', 'US', 'Gallatin Field', 0),\n array('BZO', 'IT', 'Bolzano Arpt', 0),\n array('BZR', 'FR', 'Beziers Vias Arpt', 0),\n array('BZT', 'US', 'Brazoria County Arpt', 0),\n array('BZV', 'CG', 'Maya Maya Arpt', 0),\n array('BZZ', 'GB', 'Brize Norton Raf Station', 0),\n array('CAAAL', 'CA', 'alert bay', 1),\n array('CAAMH', 'CA', 'amherstburg', 1),\n array('CAARI', 'CA', 'arichat', 1),\n array('CAAVO', 'CA', 'avondale', 1),\n array('CABAD', 'CA', 'baddeck', 1),\n array('CABAM', 'CA', 'bamberton', 1),\n array('CABAT', 'CA', 'bathurst', 1),\n array('CABAY', 'CA', 'bayside', 1),\n array('CABCK', 'CA', 'brockville', 1),\n array('CABCO', 'CA', 'baie comeau', 1),\n array('CABEA', 'CA', 'beaver cover', 1),\n array('CABEC', 'CA', 'becancour', 1),\n array('CABEH', 'CA', 'beaver harbour', 1),\n array('CABEL', 'CA', 'belledune', 1),\n array('CABGT', 'CA', 'bagotville', 1),\n array('CABKN', 'CA', 'brooklyn', 1),\n array('CABLC', 'CA', 'bella coola', 1),\n array('CABLR', 'CA', 'blind river', 1),\n array('CABLV', 'CA', 'belleville', 1),\n array('CABRI', 'CA', 'britannia beach', 1),\n array('CABRW', 'CA', 'bridgewater', 1),\n array('CABUI', 'CA', 'burin', 1),\n array('CABUO', 'CA', 'burgeo', 1),\n array('CABUS', 'CA', 'burnside', 1),\n array('CABVE', 'CA', 'baie verte', 1),\n array('CABWD', 'CA', 'botwood', 1),\n array('CABWV', 'CA', 'bowmanville', 1),\n array('CABYR', 'CA', 'bay roberts', 1),\n array('CAC', 'BR', 'Cascavel Arpt', 0),\n array('CACAH', 'CA', 'canso harbour', 1),\n array('CACAL', 'CA', 'calgary', 1),\n array('CACAM', 'CA', 'campbell river', 1),\n array('CACAQ', 'CA', 'caraquet', 1),\n array('CACAT', 'CA', 'catalina', 1),\n array('CACBK', 'CA', 'corner brook', 1),\n array('CACCB', 'CA', 'cowichan bay', 1),\n array('CACHA', 'CA', 'charlottetown', 1),\n array('CACHI', 'CA', 'chicoutimi', 1),\n array('CACHM', 'CA', 'chemainus', 1),\n array('CACHR', 'CA', 'chandler', 1),\n array('CACHT', 'CA', 'cheticamp', 1),\n array('CACHV', 'CA', 'churchill', 1),\n array('CACLC', 'CA', 'clark city', 1),\n array('CACLE', 'CA', 'clarenville', 1),\n array('CACLT', 'CA', 'carleton', 1),\n array('CACMV', 'CA', 'carmanville', 1),\n array('CACOC', 'CA', 'contrecoeur', 1),\n array('CACOH', 'CA', 'country harbour', 1),\n array('CACOL', 'CA', 'collingwood', 1),\n array('CACOM', 'CA', 'campbellton', 1),\n array('CACOP', 'CA', 'coppermine', 1),\n array('CACOU', 'CA', 'courtenay', 1),\n array('CACOX', 'CA', 'comox', 1),\n array('CACPT', 'CA', 'canaport', 1),\n array('CACRB', 'CA', 'carbonear', 1),\n array('CACRE', 'CA', 'cape race', 1),\n array('CACRO', 'CA', 'crofton', 1),\n array('CACRT', 'CA', 'cartier', 1),\n array('CACSN', 'CA', 'clarkson', 1),\n array('CACST', 'CA', 'chester', 1),\n array('CACTM', 'CA', 'chatham', 1),\n array('CACWL', 'CA', 'cornwall', 1),\n array('CAD', 'US', 'Wexford County Arpt', 0),\n array('CADCN', 'CA', 'duncan bay', 1),\n array('CADEB', 'CA', 'deception bay', 1),\n array('CADHS', 'CA', 'dalhousie', 1),\n array('CADIG', 'CA', 'digby', 1),\n array('CADWL', 'CA', 'dingwall', 1),\n array('CAE', 'US', 'Columbia Metro Arpt', 0),\n array('CAENG', 'CA', 'engelwood', 1),\n array('CAFAL', 'CA', 'fort albany', 1),\n array('CAFAP', 'CA', 'father point', 1),\n array('CAFBB', 'CA', 'frobisher bay', 1),\n array('CAFCM', 'CA', 'fort chimo', 1),\n array('CAFFS', 'CA', 'fort frances', 1),\n array('CAFRE', 'CA', 'fredericton', 1),\n array('CAFRM', 'CA', 'fraser mills', 1),\n array('CAFSI', 'CA', 'fort simpson', 1),\n array('CAFSJ', 'CA', 'fort st john', 1),\n array('CAFSM', 'CA', 'fort smith', 1),\n array('CAG', 'IT', 'Elmas Airport', 0),\n array('CAGAL', 'CA', 'cambridge (ex galt)', 1),\n array('CAGAN', 'CA', 'gander', 1),\n array('CAGDE', 'CA', 'grandemere', 1),\n array('CAGGW', 'CA', 'georgetown', 1),\n array('CAGLB', 'CA', 'glace bay', 1),\n array('CAGOH', 'CA', 'goderich', 1),\n array('CAGOL', 'CA', 'gold river', 1),\n array('CAGOO', 'CA', 'goose bay', 1),\n array('CAGPE', 'CA', 'gaspe', 1),\n array('CAHAL', 'CA', 'halifax', 1),\n array('CAHAM', 'CA', 'hamilton', 1),\n array('CAHAR', 'CA', 'harriet', 1),\n array('CAHAT', 'CA', 'hatch point', 1),\n array('CAHBR', 'CA', 'harbour breton', 1),\n array('CAHMC', 'CA', 'harmac', 1),\n array('CAHOP', 'CA', 'hopedale', 1),\n array('CAHRE', 'CA', 'harbour grace', 1),\n array('CAHSG', 'CA', 'haut-saguenay', 1),\n array('CAHSP', 'CA', 'havre st pierre', 1),\n array('CAI', 'EG', 'Cairo Intl Arpt', 0),\n array('CAJED', 'CA', 'jedway', 1),\n array('CAK', 'US', 'Akron Canton Regional Arpt', 0),\n array('CAKIN', 'CA', 'kingston', 1),\n array('CAKOV', 'CA', 'kovik bay', 1),\n array('CAKTC', 'CA', 'kitchener', 1),\n array('CAKTM', 'CA', 'kitimat', 1),\n array('CAL', 'GB', 'Machrihanish Arpt', 0),\n array('CALAD', 'CA', 'ladysmith', 1),\n array('CALEV', 'CA', 'levis', 1),\n array('CALIV', 'CA', 'liverpool', 1),\n array('CALMD', 'CA', 'lomond', 1),\n array('CALOU', 'CA', 'louisbourg', 1),\n array('CALTW', 'CA', 'listowel', 1),\n array('CALUN', 'CA', 'lunenburg', 1),\n array('CAM', 'BO', 'Choreti Arpt', 0),\n array('CAMID', 'CA', 'midland', 1),\n array('CAMIH', 'CA', 'michipicoten harbour', 1),\n array('CAMIR', 'CA', 'miramichi bay', 1),\n array('CAMNT', 'CA', 'moncton', 1),\n array('CAMOU', 'CA', 'moosonee', 1),\n array('CAMTR', 'CA', 'montreal', 1),\n array('CAN', 'CN', 'Baiyun Airport', 0),\n array('CANAI', 'CA', 'nain', 1),\n array('CANCT', 'CA', 'newcastle', 1),\n array('CANEP', 'CA', 'neptune', 1),\n array('CANIM', 'CA', 'nimpkish', 1),\n array('CANNE', 'CA', 'nanoose', 1),\n array('CANNO', 'CA', 'nanaimo', 1),\n array('CANOR', 'CA', 'north bay', 1),\n array('CANWE', 'CA', 'new westminster', 1),\n array('CANWP', 'CA', 'argentia', 1),\n array('CAOAK', 'CA', 'oakville', 1),\n array('CAOFA', 'CA', 'ocean falls', 1),\n array('CAOTT', 'CA', 'ottawa', 1),\n array('CAOWS', 'CA', 'owen sound', 1),\n array('CAP', 'HT', 'Cap Haitien Numicipal', 0),\n array('CAPAB', 'CA', 'port alberni', 1),\n array('CAPAC', 'CA', 'port alice', 1),\n array('CAPAF', 'CA', 'port alfred', 1),\n array('CAPAP', 'CA', 'aguathuna (port au port)', 1),\n array('CAPAR', 'CA', 'parrsboro', 1),\n array('CAPBH', 'CA', 'peterborough', 1),\n array('CAPBQ', 'CA', 'port aux basques', 1),\n array('CAPCA', 'CA', 'port cartier', 1),\n array('CAPCO', 'CA', 'port colborne', 1),\n array('CAPCR', 'CA', 'port credit', 1),\n array('CAPDV', 'CA', 'port dover', 1),\n array('CAPER', 'CA', 'perth', 1),\n array('CAPHW', 'CA', 'port hawkesbury', 1),\n array('CAPHY', 'CA', 'port hardy', 1),\n array('CAPIC', 'CA', 'picton', 1),\n array('CAPMA', 'CA', 'port mcneill', 1),\n array('CAPME', 'CA', 'port menier', 1),\n array('CAPML', 'CA', 'port mellon', 1),\n array('CAPMO', 'CA', 'port moody', 1),\n array('CAPNE', 'CA', 'port nelson', 1),\n array('CAPOI', 'CA', 'pointe claire', 1),\n array('CAPOW', 'CA', 'powell river', 1),\n array('CAPRE', 'CA', 'prescott', 1),\n array('CAPRR', 'CA', 'prince rupert', 1),\n array('CAPRS', 'CA', 'parry sound', 1),\n array('CAPSI', 'CA', 'port simpson', 1),\n array('CAPST', 'CA', 'port stanley', 1),\n array('CAPTA', 'CA', 'tahsis', 1),\n array('CAPWE', 'CA', 'port weller', 1),\n array('CAQUE', 'CA', 'quebec', 1),\n array('CAQWA', 'CA', 'oshawa', 1),\n array('CARDL', 'CA', 'riviere du loup', 1),\n array('CARIM', 'CA', 'rimouski', 1),\n array('CAS', 'MA', 'Anfa Airport', 0),\n array('CASAD', 'CA', 'st andrews', 1),\n array('CASAT', 'CA', 'st anthony', 1),\n array('CASAU', 'CA', 'st augustin', 1),\n array('CASBR', 'CA', 'sherbrooke', 1),\n array('CASBU', 'CA', 'shelburne', 1),\n array('CASEI', 'CA', 'sept iles (seven is.)', 1),\n array('CASIC', 'CA', 'simcoe', 1),\n array('CASJB', 'CA', 'st john', 1),\n array('CASJF', 'CA', 'st johns', 1),\n array('CASNI', 'CA', 'sarnia', 1),\n array('CASOR', 'CA', 'sorel', 1),\n array('CASOU', 'CA', 'souris', 1),\n array('CASSM', 'CA', 'sault ste marie', 1),\n array('CASTW', 'CA', 'stewart', 1),\n array('CASUM', 'CA', 'summerside', 1),\n array('CASYD', 'CA', 'sydney', 1),\n array('CATAS', 'CA', 'tasu', 1),\n array('CATEX', 'CA', 'texada island', 1),\n array('CATHD', 'CA', 'thorold', 1),\n array('CATHU', 'CA', 'thunder bay', 1),\n array('CATOQ', 'CA', 'toquart bay', 1),\n array('CATOR', 'CA', 'toronto', 1),\n array('CATRR', 'CA', 'trois-rivieres (three rivers) ', 1),\n array('CATUK', 'CA', 'tuktoyaktuk', 1),\n array('CATWI', 'CA', 'twillinggate', 1),\n array('CAU', 'BR', 'Caruaru Arpt', 0),\n array('CAVAN', 'CA', 'vancouver', 1),\n array('CAVER', 'CA', 'vaner b.c.', 1),\n array('CAVIC', 'CA', 'victoria', 1),\n array('CAVLF', 'CA', 'valleyfield', 1),\n array('CAW', 'BR', 'Bartolomeu Lisandro Arpt', 0),\n array('CAWAT', 'CA', 'watson lake', 1),\n array('CAWEL', 'CA', 'welland', 1),\n array('CAWHI', 'CA', 'whitby', 1),\n array('CAWND', 'CA', 'windsor', 1),\n array('CAWNP', 'CA', 'winnipeg', 1),\n array('CAWOO', 'CA', 'woodfibre', 1),\n array('CAWTN', 'CA', 'walton', 1),\n array('CAX', 'GB', 'Carlisle Arpt', 0),\n array('CAY', 'GF', 'Rochambeau Airport', 0),\n array('CAYJT', 'CA', 'stephenville', 1),\n array('CAYME', 'CA', 'matane', 1),\n array('CAYQI', 'CA', 'yarmouth', 1),\n array('CAZ', 'AU', 'Cobar Arpt', 0),\n array('CAZEB', 'CA', 'zeballos', 1),\n array('CAZMT', 'CA', 'masset', 1),\n array('CBB', 'BO', 'J Wilsterman Arpt', 0),\n array('CBE', 'US', 'Cumberland Municipal Arpt', 0),\n array('CBF', 'US', 'Council Bluffs Municipal Arpt', 0),\n array('CBG', 'GB', 'Cambridge Arpt', 0),\n array('CBK', 'US', 'Colby Municipal Arpt', 0),\n array('CBL', 'VE', 'Ciudad Bolivar Arpt', 0),\n array('CBN', 'ID', 'Penggung Arpt', 0),\n array('CBP', 'PT', 'Coimbra Arpt', 0),\n array('CBR', 'AU', 'Canberra Arpt', 0),\n array('CBS', 'VE', 'Oro Negro Arpt', 0),\n array('CCE', 'GP', 'Grand Chase Arpt', 0),\n array('CCF', 'FR', 'Salvaza', 0),\n array('CCJ', 'IN', 'Kozhikode Arpt', 0),\n array('CCM', 'BR', 'Criciuma Arpt', 0),\n array('CCP', 'CL', 'Carriel Sur Arpt', 0),\n array('CCR', 'US', 'Buchanan Field', 0),\n array('CCS', 'VE', 'Simon Bolivar Arpt', 0),\n array('CCU', 'IN', 'Netaji Subhas Chandra Bose Intl', 0),\n array('CDA', 'AU', 'Cooinda Airport', 0),\n array('CDC', 'US', 'Cedar City Municipal', 0),\n array('CDD', 'HN', 'Cauquira Arpt', 0),\n array('CDG', 'FR', 'Charles De Gaulle Intl Arpt', 0),\n array('CDH', 'US', 'Harrell Fieldsandro Arpt', 0),\n array('CDI', 'BR', 'Cachoeiro De Itapemirim Arpt', 0),\n array('CDR', 'US', 'Chadron Arpt', 0),\n array('CDV', 'US', 'Mudhole Smith Arpt', 0),\n array('CDW', 'US', 'Caldwell Wright Arpt', 0),\n array('CEB', 'PH', 'Cebu Intl', 0),\n array('CEC', 'US', 'Crescent City Municipal Arpt', 0),\n array('CED', 'AU', 'Ceduna Arpt', 0),\n array('CEF', 'US', 'Westover Metro', 0),\n array('CEG', 'GB', 'Chester Arpt', 0),\n array('CEH', 'MW', 'Chelinda Arpt', 0),\n array('CEI', 'TH', 'Chaing Rai Arpt', 0),\n array('CEK', 'RU', 'Chelyabinsk Arpt', 0),\n array('CEN', 'MX', 'Ciudad Obregon Arpt', 0),\n array('CEQ', 'FR', 'Mandelieu Arpt', 0),\n array('CER', 'FR', 'Maupertius Arpt', 0),\n array('CES', 'AU', 'Cessnock Arpt', 0),\n array('CET', 'FR', 'Le Pontreau Arpt', 0),\n array('CEU', 'US', 'Clemson Oconee Cty Arpt', 0),\n array('CEY', 'US', 'Calloway Cty Arpt', 0),\n array('CEZ', 'US', 'Montezuma County', 0),\n array('CFB', 'BR', 'Cabo Frio Arpt', 0),\n array('CFE', 'FR', 'Aulnat Arpt', 0),\n array('CFG', 'CU', 'Cienfuegos Arpt', 0),\n array('CFN', 'IE', 'Donegal Arpt', 0),\n array('CFQ', 'CA', 'Creston Arpt', 0),\n array('CFR', 'FR', 'Carpiquet Arpt', 0),\n array('CFS', 'AU', 'Coffs Harbour Arpt', 0),\n array('CFU', 'GR', 'I Kapodistrias Arpt', 0),\n array('CGA', 'US', 'Craig Seaplane Base', 0),\n array('CGB', 'BR', 'Marechal Rondon Arpt', 0),\n array('CGDJE', 'CG', 'djeno terminal', 1),\n array('CGF', 'US', 'Cuyahoga County Airport', 0),\n array('CGH', 'BR', 'Congonhas Arpt', 0),\n array('CGI', 'US', 'Cape Girardeau Municipal Arpt', 0),\n array('CGK', 'ID', 'Soekarno Hatta Intl', 0),\n array('CGMOS', 'CG', 'mossaka', 1),\n array('CGN', 'DE', 'Koeln Bonn Arpt', 0),\n array('CGO', 'CN', 'Zhengzhou Arpt', 0),\n array('CGOUE', 'CG', 'ouesso', 1),\n array('CGOYO', 'CG', 'oyo', 1),\n array('CGP', 'BD', 'Patenga Arpt', 0),\n array('CGPNR', 'CG', 'pointe noire', 1),\n array('CGQ', 'CN', 'Changchun Arpt', 0),\n array('CGR', 'BR', 'Internacional', 0),\n array('CGX', 'US', 'Meigs Field', 0),\n array('CGY', 'PH', 'Lumbia Arpt', 0),\n array('CHA', 'US', 'Chattanooga Lovell Fld', 0),\n array('CHBSL', 'CH', 'basel', 1),\n array('CHC', 'NZ', 'Christchurch Intl Arpt', 0),\n array('CHD', 'US', 'Williams Airforce Base', 0),\n array('CHKRZ', 'CH', 'kreuzlingen', 1),\n array('CHO', 'US', 'Charlottesville Albemarle Arpt', 0),\n array('CHQ', 'GR', 'Souda Arpt', 0),\n array('CHR', 'FR', 'Chateauroux Arpt', 0),\n array('CHS', 'US', 'Charleston Intl Arpt', 0),\n array('CHX', 'PA', 'Changuinola Arpt', 0),\n array('CIA', 'IT', 'Ciampino Arpt', 0),\n array('CIABJ', 'CI', 'abidjan', 1),\n array('CIASS', 'CI', 'assinie', 1),\n array('CIBBE', 'CI', 'boubele', 1),\n array('CIC', 'US', 'Chico Municipal Arpt', 0),\n array('CID', 'US', 'Cedar Rapids Municipal Arpt', 0),\n array('CIFRE', 'CI', 'fresco', 1),\n array('CIG', 'US', 'Craig Moffat', 0),\n array('CIGBA', 'CI', 'grand basam', 1),\n array('CIGLU', 'CI', 'grand lahou', 1),\n array('CIJAB', 'CI', 'jabou', 1),\n array('CIJAC', 'CI', 'jacquiville', 1),\n array('CIKOS', 'CI', 'kosao', 1),\n array('CIO', 'PY', 'Mcal Lopez Arpt', 0),\n array('CIPBT', 'CI', 'port bouet', 1),\n array('CISPY', 'CI', 'san pedro', 1),\n array('CIU', 'US', 'Chippewa Cnty Intl', 0),\n array('CIW', 'DM', 'Canouan Island Minicipal', 0),\n array('CIX', 'PE', 'Cornel Ruiz Arpt', 0),\n array('CIZSS', 'CI', 'sassandra', 1),\n array('CJB', 'IN', 'Peelamedu Airport', 0),\n array('CJC', 'CL', 'El Loa Arpt', 0),\n array('CJJ', 'KR', 'Cheongju Arpt', 0),\n array('CJM', 'TH', 'Chumphon Arpt', 0),\n array('CJN', 'US', 'El Cajon Arpt', 0),\n array('CJS', 'MX', 'Intl Abraham Gonzalez', 0),\n array('CJU', 'KR', 'Jeju Intl Arpt', 0),\n array('CKAIT', 'CK', 'aitutaki', 1),\n array('CKAIU', 'CK', 'atiu', 1),\n array('CKARU', 'CK', 'arutunga', 1),\n array('CKB', 'US', 'Clarksburg Benedum Arpt', 0),\n array('CKG', 'CN', 'Chongqing Arpt', 0),\n array('CKM', 'US', 'Fletcher Field', 0),\n array('CKMGS', 'CK', 'mangaia', 1),\n array('CKMOI', 'CK', 'mitiaro island', 1),\n array('CKRAR', 'CK', 'rarotonga', 1),\n array('CKS', 'BR', 'Carajas Arpt', 0),\n array('CKV', 'US', 'Outlaw Field', 0),\n array('CKY', 'GN', 'Conakry Airport', 0),\n array('CLANF', 'CL', 'antofagasta', 1),\n array('CLARI', 'CL', 'arica', 1),\n array('CLBAG', 'CL', 'bahia gregorio', 1),\n array('CLBAR', 'CL', 'barquito', 1),\n array('CLC', 'US', 'Metroport', 0),\n array('CLCAL', 'CL', 'caleta parillos', 1),\n array('CLCCP', 'CL', 'concepcion', 1),\n array('CLCHB', 'CL', 'chacabuco', 1),\n array('CLCLD', 'CL', 'caldera', 1),\n array('CLCLR', 'CL', 'clarencia', 1),\n array('CLCNL', 'CL', 'coronel', 1),\n array('CLCNR', 'CL', 'chanaral', 1),\n array('CLCNX', 'CL', 'cabo negro', 1),\n array('CLCPO', 'CL', 'copiapo', 1),\n array('CLCQQ', 'CL', 'coquimbo', 1),\n array('CLCRR', 'CL', 'corral', 1),\n array('CLD', 'US', 'Carlsbad Arpt', 0),\n array('CLE', 'US', 'Hopkins Intl Arpt', 0),\n array('CLGUR', 'CL', 'guarello', 1),\n array('CLGYC', 'CL', 'guayacan', 1),\n array('CLHSO', 'CL', 'huasco', 1),\n array('CLIPC', 'CL', 'isla de pascua', 1),\n array('CLIQQ', 'CL', 'iquique', 1),\n array('CLISG', 'CL', 'isla guarello', 1),\n array('CLK', 'US', 'Clinton Municipal Arpt', 0),\n array('CLKNA', 'CL', 'vina del mar', 1),\n array('CLL', 'US', 'Easterwood Field', 0),\n array('CLLEB', 'CL', 'lebu', 1),\n array('CLLOS', 'CL', 'los vilos', 1),\n array('CLLQN', 'CL', 'lirquén', 1),\n array('CLLSC', 'CL', 'la serena', 1),\n array('CLLTA', 'CL', 'lota', 1),\n array('CLLVS', 'CL', 'las ventanos', 1),\n array('CLLVT', 'CL', 'los vientos', 1),\n array('CLM', 'US', 'William Fairchild Intl Arpt', 0),\n array('CLMJS', 'CL', 'mejillones', 1),\n array('CLO', 'CO', 'Alfonso Bonella Aragon Arpt', 0),\n array('CLOVL', 'CL', 'ovalle', 1),\n array('CLPEO', 'CL', 'penco', 1),\n array('CLPIS', 'CL', 'pisagua', 1),\n array('CLPMC', 'CL', 'puerto montt', 1),\n array('CLPNT', 'CL', 'puerto natales', 1),\n array('CLPPY', 'CL', 'puerto percy', 1),\n array('CLPTI', 'CL', 'patillos', 1),\n array('CLPUQ', 'CL', 'punta arenas', 1),\n array('CLQ', 'MX', 'Colima Arpt', 0),\n array('CLQMC', 'CL', 'quemchi', 1),\n array('CLQRC', 'CL', 'rancagua', 1),\n array('CLQTV', 'CL', 'quintero', 1),\n array('CLSAI', 'CL', 'san antonio', 1),\n array('CLSVE', 'CL', 'san vicente', 1),\n array('CLT', 'US', 'Charlotte Douglas Intl Arpt', 0),\n array('CLTAL', 'CL', 'talcahuano', 1),\n array('CLTLX', 'CL', 'talca', 1),\n array('CLTOM', 'CL', 'tomé', 1),\n array('CLTOQ', 'CL', 'tocopilla', 1),\n array('CLTTC', 'CL', 'taltal', 1),\n array('CLU', 'US', 'Columbus Municipal Arpt', 0),\n array('CLVAP', 'CL', 'valparaiso', 1),\n array('CLVPS', 'CL', 'valparaiso', 1),\n array('CLWCA', 'CL', 'castro', 1),\n array('CLWPA', 'CL', 'puerto aisen', 1),\n array('CLWPU', 'CL', 'puerto williams', 1),\n array('CLY', 'FR', 'Ste Catherine Arpt', 0),\n array('CLZAL', 'CL', 'valdivia', 1),\n array('CLZCO', 'CL', 'temuco', 1),\n array('CLZIC', 'CL', 'victoria', 1),\n array('CLZOS', 'CL', 'osorno', 1),\n array('CLZUD', 'CL', 'ancud', 1),\n array('CMB', 'LK', 'Bandaranaike Intl Arpt', 0),\n array('CMDLA', 'CM', 'douala', 1),\n array('CME', 'MX', 'Ciudad Del Carmen Arpt', 0),\n array('CMF', 'FR', 'Chambery Aix Les Bains Arpt', 0),\n array('CMG', 'BR', 'Internacional Corumba', 0),\n array('CMGOU', 'CM', 'garoua', 1),\n array('CMH', 'US', 'Port Columbus Intl Arpt', 0),\n array('CMI', 'US', 'Univ Of Illinois Willard Arpt', 0),\n array('CMKBI', 'CM', 'kribi', 1),\n array('CMKOL', 'CM', 'kole terminal', 1),\n array('CMLIT', 'CM', 'limboh terminal', 1),\n array('CMMOU', 'CM', 'moudi terminal', 1),\n array('CMN', 'MA', 'Mohamed V Arpt', 0),\n array('CMQ', 'AU', 'Clermont Arpt', 0),\n array('CMR', 'FR', 'Colmar Houssen Arpt', 0),\n array('CMTKC', 'CM', 'tiko', 1),\n array('CMV', 'NZ', 'Coromandel Arpt', 0),\n array('CMVCC', 'CM', 'victoria', 1),\n array('CMW', 'CU', 'Ign Agramonte Intl Arpt', 0),\n array('CMX', 'US', 'Houghton Cty Memorial Arpt', 0),\n array('CMY', 'US', 'Camp Mccoy Aaf', 0),\n array('CNAQG', 'CN', 'anqing', 1),\n array('CNB', 'AU', 'Coonamble Arpt', 0),\n array('CNBAO', 'CN', 'baoshanmatou', 1),\n array('CNBAS', 'CN', 'basuo', 1),\n array('CNBAY', 'CN', 'bayuquan', 1),\n array('CNBHY', 'CN', 'beihai', 1),\n array('CNCAN', 'CN', 'guangzhou', 1),\n array('CNCHE', 'CN', 'chengao', 1),\n array('CNCKG', 'CN', 'chongqing', 1),\n array('CNCLJ', 'CN', 'chenglingji', 1),\n array('CNCOZ', 'CN', 'chaozhou', 1),\n array('CNCWN', 'CN', 'chiwan', 1),\n array('CND', 'RO', 'Kogalniceanu Arpt', 0),\n array('CNDAN', 'CN', 'daan', 1),\n array('CNDDG', 'CN', 'dandong', 1),\n array('CNDJT', 'CN', 'dongjiaotou', 1),\n array('CNDLC', 'CN', 'dalian', 1),\n array('CNDOU', 'CN', 'doumen', 1),\n array('CNDSN', 'CN', 'dongshan', 1),\n array('CNDXG', 'CN', 'dalianxingang', 1),\n array('CNF', 'BR', 'Tancredo Neves Intl Arpt', 0),\n array('CNFAN', 'CN', 'fangcheng', 1),\n array('CNFOC', 'CN', 'fuzhou', 1),\n array('CNFOS', 'CN', 'foshan', 1),\n array('CNFUJ', 'CN', 'fujin', 1),\n array('CNFUY', 'CN', 'fuyuan', 1),\n array('CNG', 'FR', 'Parvaud Arpt', 0),\n array('CNGAO', 'CN', 'gaogang', 1),\n array('CNGHI', 'CN', 'guanghai', 1),\n array('CNGOM', 'CN', 'gaoming', 1),\n array('CNGUG', 'CN', 'guigang', 1),\n array('CNH', 'US', 'Claremont Municipal', 0),\n array('CNHAI', 'CN', 'haian', 1),\n array('CNHAK', 'CN', 'haikou', 1),\n array('CNHCN', 'CN', 'huachuan', 1),\n array('CNHEK', 'CN', 'heihe', 1),\n array('CNHKN', 'CN', 'hsinkan', 1),\n array('CNHME', 'CN', 'haimen', 1),\n array('CNHRB', 'CN', 'harbin', 1),\n array('CNHSI', 'CN', 'huangshi', 1),\n array('CNHSN', 'CN', 'heshan', 1),\n array('CNHST', 'CN', 'heishantou', 1),\n array('CNHUA', 'CN', 'huangpu', 1),\n array('CNHUI', 'CN', 'huizhou', 1),\n array('CNHUL', 'CN', 'hulin', 1),\n array('CNHUM', 'CN', 'huma', 1),\n array('CNJ', 'AU', 'Cloncurry Arpt', 0),\n array('CNJAY', 'CN', 'jiayin', 1),\n array('CNJHG', 'CN', 'jinghong', 1),\n array('CNJIA', 'CN', 'jiangyin', 1),\n array('CNJIS', 'CN', 'jiangshan', 1),\n array('CNJIU', 'CN', 'jiujiang', 1),\n array('CNJMN', 'CN', 'Jiangnen', 1),\n array('CNJMU', 'CN', 'jiamusi', 1),\n array('CNJNZ', 'CN', 'jinzhou', 1),\n array('CNJZU', 'CN', 'jiuzhou', 1),\n array('CNKWE', 'CN', 'guiyang', 1),\n array('CNLIH', 'CN', 'lianhuashan', 1),\n array('CNLKU', 'CN', 'longkou', 1),\n array('CNLSH', 'CN', 'lushun', 1),\n array('CNLSN', 'CN', 'lanshan', 1),\n array('CNLUB', 'CN', 'luobei', 1),\n array('CNLYG', 'CN', 'lianyungang', 1),\n array('CNLZH', 'CN', 'liuzhou', 1),\n array('CNM', 'US', 'Carlsbad Airport', 0),\n array('CNMAA', 'CN', 'maanshan', 1),\n array('CNMAW', 'CN', 'mawei', 1),\n array('CNMOH', 'CN', 'mohe', 1),\n array('CNMWN', 'CN', 'mawan', 1),\n array('CNNAH', 'CN', 'nanhai', 1),\n array('CNNAN', 'CN', 'nanao', 1),\n array('CNNGB', 'CN', 'ningbo', 1),\n array('CNNKG', 'CN', 'nanjing', 1),\n array('CNNSA', 'CN', 'nansha', 1),\n array('CNNTG', 'CN', 'nantong', 1),\n array('CNQ', 'AR', 'Camba Punta Arpt', 0),\n array('CNQLN', 'CN', 'qinglan', 1),\n array('CNQSA', 'CN', 'qisha', 1),\n array('CNQZH', 'CN', 'qinzhou', 1),\n array('CNQZJ', 'CN', 'quanzhou', 1),\n array('CNROH', 'CN', 'raohe', 1),\n array('CNROQ', 'CN', 'rongqi', 1),\n array('CNRZH', 'CN', 'rizhao', 1),\n array('CNS', 'AU', 'Cairns Airport', 0),\n array('CNSBU', 'CN', 'sanbu', 1),\n array('CNSDG', 'CN', 'shuidong', 1),\n array('CNSHA', 'CN', 'shanghai', 1),\n array('CNSHD', 'CN', 'shidao', 1),\n array('CNSHK', 'CN', 'shekou', 1),\n array('CNSHP', 'CN', 'qinhuangdao', 1),\n array('CNSON', 'CN', 'songxia', 1),\n array('CNSTB', 'CN', 'shitoubu', 1),\n array('CNSUD', 'CN', 'shunde', 1),\n array('CNSUW', 'CN', 'sunwu', 1),\n array('CNSWA', 'CN', 'shantou', 1),\n array('CNSWE', 'CN', 'shanwei', 1),\n array('CNSWI', 'CN', 'shiwei', 1),\n array('CNSYM', 'CN', 'simao', 1),\n array('CNSYX', 'CN', 'sanya', 1),\n array('CNSZX', 'CN', 'shenzhen', 1),\n array('CNTAO', 'CN', 'qingdao', 1),\n array('CNTAP', 'CN', 'taiping', 1),\n array('CNTAS', 'CN', 'tangshan', 1),\n array('CNTGU', 'CN', 'tanggu', 1),\n array('CNTOJ', 'CN', 'tongjiang', 1),\n array('CNTOL', 'CN', 'tongling', 1),\n array('CNTPI', 'CN', 'taipei', 1),\n array('CNTSN', 'CN', 'tianjin', 1),\n array('CNTSO', 'CN', 'tsiangtao', 1),\n array('CNTXG', 'CN', 'tianjinxingang', 1),\n array('CNWAZ', 'CN', 'wanzai', 1),\n array('CNWEI', 'CN', 'weihai', 1),\n array('CNWHI', 'CN', 'wuhu', 1),\n array('CNWNZ', 'CN', 'wenzhou', 1),\n array('CNWUH', 'CN', 'wuhan', 1),\n array('CNWUS', 'CN', 'wusong', 1),\n array('CNWUZ', 'CN', 'wuzhou', 1),\n array('CNX', 'TH', 'Chiang Mai Intl Arpt', 0),\n array('CNXIA', 'CN', 'xiamen', 1),\n array('CNXIN', 'CN', 'xinhui', 1),\n array('CNXNG', 'CN', 'xingang', 1),\n array('CNXUK', 'CN', 'xunke', 1),\n array('CNY', 'US', 'Moab Municipal', 0),\n array('CNYIK', 'CN', 'yingkou', 1),\n array('CNYJI', 'CN', 'yangjiang', 1),\n array('CNYNJ', 'CN', 'yanji', 1),\n array('CNYNT', 'CN', 'yantai', 1),\n array('CNYPG', 'CN', 'yangpu', 1),\n array('CNYTN', 'CN', 'yantian', 1),\n array('CNYZH', 'CN', 'yangzhou', 1),\n array('CNZHA', 'CN', 'zhanjiang', 1),\n array('CNZHE', 'CN', 'zhenjiang', 1),\n array('CNZJG', 'CN', 'zhangjiagang', 1),\n array('CNZOS', 'CN', 'zhoushan', 1),\n array('CNZQG', 'CN', 'zhaoqing', 1),\n array('CNZSN', 'CN', 'zhongshan', 1),\n array('CNZZU', 'CN', 'zhangzhou', 1),\n array('COBAQ', 'CO', 'barranquilla', 1),\n array('COBUN', 'CO', 'buenaventura', 1),\n array('COC', 'AR', 'Concordia Arpt', 0),\n array('COCRC', 'CO', 'cartago', 1),\n array('COCTG', 'CO', 'cartagena', 1),\n array('COD', 'US', 'Yellowstone Regional Arpt', 0),\n array('Codi', 'is', 'go Descripcion P', 0),\n array('COE', 'US', 'Coeur d Alene Municipal Arpt', 0),\n array('COEJA', 'CO', 'barrancabermeja', 1),\n array('COF', 'US', 'Patrick AFB', 0),\n array('COI', 'US', 'Merrit Island Arpt', 0),\n array('COJ', 'AU', 'Coonabarabran Arpt', 0),\n array('COK', 'IN', 'Kochi Intl Arpt', 0),\n array('COLET', 'CO', 'leticia', 1),\n array('COO', 'BJ', 'Cotonou Airport', 0),\n array('COPBE', 'CO', 'puerto berrio', 1),\n array('COPBO', 'CO', 'puerto bolivar', 1),\n array('COPOC', 'CO', 'pozos colorados', 1),\n array('COPUC', 'CO', 'puerto colombia', 1),\n array('COR', 'AR', 'Pajas Blanco Arpt', 0),\n array('CORCH', 'CO', 'riohacha', 1),\n array('COS', 'US', 'Colorado Springs Municipal Arpt', 0),\n array('COSMR', 'CO', 'santa marta', 1),\n array('COTCO', 'CO', 'tumaco', 1),\n array('COTLU', 'CO', 'tolu', 1),\n array('COTRB', 'CO', 'turbo', 1),\n array('COU', 'US', 'Columbia Regional', 0),\n array('CPC', 'AR', 'Chapelco Arpt', 0),\n array('CPD', 'AU', 'Coober Pedy Arpt', 0),\n array('CPE', 'MX', 'Campeche Intl Arpt', 0),\n array('CPH', 'DK', 'Copenhagen Arpt', 0),\n array('CPO', 'CL', 'Chamonate Arpt', 0),\n array('CPQ', 'BR', 'International Campinas', 0),\n array('CPR', 'US', 'Natrona Cty Intl Arpt', 0),\n array('CPS', 'US', 'East St Louis', 0),\n array('CPT', 'ZA', 'Cape Town International', 0),\n array('CPV', 'BR', 'Joao Suassuana Arpt', 0),\n array('CQD', 'IR', 'Shahre Kord Arpt', 0),\n array('CRCAL', 'CR', 'caldera', 1),\n array('CRD', 'AR', 'Comodoro Rivadavia Arpt', 0),\n array('CRE', 'US', 'Grand Strand Arpt', 0),\n array('CRG', 'US', 'Craig Municipal Arpt', 0),\n array('CRGLF', 'CR', 'golfito', 1),\n array('CRL', 'BE', 'Brussles South Charleroi Arpt', 0),\n array('CRLIO', 'CR', 'puerto limon', 1),\n array('CRP', 'US', 'Corpus Christi Intl Arpt', 0),\n array('CRPAS', 'CR', 'puntarenas', 1),\n array('CRPUM', 'CR', 'puntamorales', 1),\n array('CRSJO', 'CR', 'san jose', 1),\n array('CRV', 'IT', 'Crotone Arpt', 0),\n array('CRW', 'US', 'Yeager Arpt', 0),\n array('CRX', 'US', 'Roscoe Turner Arpt', 0),\n array('CRXQP', 'CR', 'quepos (puerto quepos)', 1),\n array('CRZ', 'TM', 'Turkmenabad Arpt', 0),\n array('CSF', 'FR', 'Creil Arpt', 0),\n array('CSG', 'US', 'Columbus Metro Ft Benning Arpt', 0),\n array('CSI', 'AU', 'Casino Arpt', 0),\n array('CSL', 'US', 'O Sullivan Army Air Field', 0),\n array('CSM', 'US', 'Sherman Arpt', 0),\n array('CSN', 'US', 'Carson Arpt', 0),\n array('CSX', 'CN', 'Changsha Arpt', 0),\n array('CTA', 'IT', 'Fontanarossa Arpt', 0),\n array('CTC', 'AR', 'Choya Arpt', 0),\n array('CTG', 'CO', 'Rafael Nunez Arpt', 0),\n array('CTL', 'AU', 'Charleville Arpt', 0),\n array('CTM', 'MX', 'Chetumal International', 0),\n array('CTS', 'JP', 'Chitose Arpt', 0),\n array('CTU', 'CN', 'Chengdu Arpt', 0),\n array('CTW', 'US', 'Cottonwood Airport', 0),\n array('CUA', 'MX', 'Ciudad Constitucion Arpt', 0),\n array('CUANT', 'CU', 'antilla', 1),\n array('CUBAN', 'CU', 'banes', 1),\n array('CUBCA', 'CU', 'baracoa', 1),\n array('CUBHO', 'CU', 'bahia honda', 1),\n array('CUBOG', 'CU', 'boca grande', 1),\n array('CUBOQ', 'CU', 'boqueron', 1),\n array('CUBUF', 'CU', 'bufadero', 1),\n array('CUC', 'CO', 'Camilo Dazo Arpt', 0),\n array('CUCAB', 'CU', 'cabanas', 1),\n array('CUCAI', 'CU', 'caibarien', 1),\n array('CUCAR', 'CU', 'cardenas', 1),\n array('CUCAS', 'CU', 'casilda', 1),\n array('CUCEI', 'CU', 'ceiba hueca', 1),\n array('CUCFG', 'CU', 'cienfuegos', 1),\n array('CUCMW', 'CU', 'camaguey', 1),\n array('CUE', 'EC', 'Cuenca Arpt', 0),\n array('CUF', 'IT', 'Levaldigi Arpt', 0),\n array('CUG', 'AU', 'Cudal Arpt', 0),\n array('CUGER', 'CU', 'nueva gerona', 1),\n array('CUGUB', 'CU', 'guantanamo bay', 1),\n array('CUGYB', 'CU', 'guayabal', 1),\n array('CUHAV', 'CU', 'habana', 1),\n array('CUICR', 'CU', 'nicaro', 1),\n array('CUIDS', 'CU', 'isabela de sagua', 1),\n array('CUJUC', 'CU', 'jucaro', 1),\n array('CUL', 'MX', 'Fedl De Bachigualato Arpt', 0),\n array('CUMAR', 'CU', 'mariel', 1),\n array('CUMEL', 'CU', 'media luna', 1),\n array('CUMNT', 'CU', 'manati', 1),\n array('CUMZO', 'CU', 'manzanillo', 1),\n array('CUN', 'MX', 'Cancun Aeropuerto Internacional', 0),\n array('CUNIQ', 'CU', 'niquero', 1),\n array('CUNVT', 'CU', 'nuevitas', 1),\n array('CUPAS', 'CU', 'pastelillo', 1),\n array('CUPIL', 'CU', 'pilon', 1),\n array('CUPPA', 'CU', 'puerto padre', 1),\n array('CUPTA', 'CU', 'puerto tarafa', 1),\n array('CUQMA', 'CU', 'matanzas', 1),\n array('CUR', 'AN', 'Areopuerto Hato Arpt', 0),\n array('CUS', 'US', 'Columbus Municipal', 0),\n array('CUSCS', 'CU', 'santa cruz del sur', 1),\n array('CUSCU', 'CU', 'santiago de cuba', 1),\n array('CUSDT', 'CU', 'sagua de tanamo', 1),\n array('CUSNU', 'CU', 'santa clara', 1),\n array('CUU', 'MX', 'Chihuahua Airport', 0),\n array('CUZ', 'PE', 'Tte Velazco Astete Arpt', 0),\n array('CVF', 'FR', 'Courchevel Arpt', 0),\n array('CVG', 'US', 'Cincinnati No Kentucky Intl Arpt', 0),\n array('CVM', 'MX', 'Ciudad Victoria Arpt', 0),\n array('CVMIN', 'CV', 'mindelo', 1),\n array('CVN', 'US', 'Clovis Airport', 0),\n array('CVO', 'US', 'Corvallis Municipal Arpt', 0),\n array('CVPGR', 'CV', 'porto grande', 1),\n array('CVQ', 'AU', 'Carnarvon Arpt', 0),\n array('CVRAI', 'CV', 'praia', 1),\n array('CVT', 'GB', 'Baginton Arpt', 0),\n array('CVU', 'PT', 'Corvo Arpt', 0),\n array('CVVXE', 'CV', 'sao vicente', 1),\n array('CWA', 'US', 'Central Wisconsin Arpt', 0),\n array('CWB', 'BR', 'Afonso Pena Arpt', 0),\n array('CWI', 'US', 'Clinton Municipal', 0),\n array('CWL', 'GB', 'Cardiff Wales Arpt', 0),\n array('CWT', 'AU', 'Cowra Arpt', 0),\n array('CXH', 'CA', 'Coal Harbor Sea Plane Arpt', 0),\n array('CXJ', 'BR', 'Campo Dos Bugres Arpt', 0),\n array('CXL', 'US', 'Calexico Intl Arpt', 0),\n array('CXO', 'US', 'Montgomery Co Arpt', 0),\n array('CXP', 'ID', 'Tunggul Wulung Arpt', 0),\n array('CYAKT', 'CY', 'akrotiri', 1),\n array('CYB', 'KY', 'Gerrard Smith Arpt', 0),\n array('CYFMG', 'CY', 'famagusta', 1),\n array('CYKAR', 'CY', 'karavostassi', 1),\n array('CYKYR', 'CY', 'kyrenia', 1),\n array('CYLAT', 'CY', 'latchi', 1),\n array('CYLCA', 'CY', 'larnaca', 1),\n array('CYLMS', 'CY', 'limassol', 1),\n array('CYMPB', 'CY', 'morphou bay', 1),\n array('CYNIC', 'CY', 'nicosia', 1),\n array('CYO', 'CU', 'Cayo Largo Del Sur Arpt', 0),\n array('CYPFO', 'CY', 'paphos', 1),\n array('CYR', 'UY', 'Colonia Arpt', 0),\n array('CYS', 'US', 'Cheyenne Arpt', 0),\n array('CYVAS', 'CY', 'vassiliko', 1),\n array('CYZER', 'CY', 'zeros', 1),\n array('CYZYY', 'CY', 'zyyi', 1),\n array('CZA', 'MX', 'Chichen Itza Arpt', 0),\n array('CZDCB', 'CZ', 'decin', 1),\n array('CZE', 'VE', 'Coro Arpt', 0),\n array('CZL', 'DZ', 'Ain El Bey Arpt', 0),\n array('CZM', 'MX', 'Aeropuerto Intl De Cozumel', 0),\n array('CZS', 'BR', 'Campo Intl Arpt', 0),\n array('CZULN', 'CZ', 'usti nad labem', 1),\n array('DAB', 'US', 'Daytona Beach Regional Arpt', 0),\n array('DAC', 'BD', 'Zia Intl Airport', 0),\n array('DAD', 'VN', 'Da Nang Arpt', 0),\n array('DAK', 'EG', 'Dakhla Arpt', 0),\n array('DAL', 'US', 'Love Field', 0),\n array('DAM', 'SY', 'Damascus Intl', 0),\n array('DAN', 'US', 'Danville Municipal', 0),\n array('DAR', 'TZ', 'Es Salaam Intl', 0),\n array('DAV', 'PA', 'Enrique Malek Arpt', 0),\n array('DAY', 'US', 'Dayton International Airport', 0),\n array('DBN', 'US', 'Dublin Municipal Arpt', 0),\n array('DBO', 'AU', 'Dubbo Arpt', 0),\n array('DBQ', 'US', 'Dubuque Municipal Arpt', 0),\n array('DBV', 'HR', 'Dubrovnik Arpt', 0),\n array('DBY', 'AU', 'Dalby', 0),\n array('DCA', 'US', 'Ronald Reagan National Arpt', 0),\n array('DCF', 'DM', 'Canefield Arpt', 0),\n array('DCM', 'FR', 'Mazamet Arpt', 0),\n array('DCS', 'GB', 'Finningley', 0),\n array('DCU', 'US', 'Pyor Arpt', 0),\n array('DDC', 'US', 'Dodge City Municipal Arpt', 0),\n array('DDI', 'AU', 'Daydream Island Arpt', 0),\n array('DEAGB', 'DE', 'augsburg', 1),\n array('DEAGE', 'DE', 'wangerooge', 1),\n array('DEALF', 'DE', 'alfeld/leine', 1),\n array('DEALT', 'DE', 'altena', 1),\n array('DEAMB', 'DE', 'amberg', 1),\n array('DEAMR', 'DE', 'amrum i.', 1),\n array('DEAND', 'DE', 'andernach', 1),\n array('DEANK', 'DE', 'anklam', 1),\n array('DEAPE', 'DE', 'apen', 1),\n array('DEARN', 'DE', 'arnsberg', 1),\n array('DEASC', 'DE', 'aschaffenburg', 1),\n array('DEASS', 'DE', 'assel', 1),\n array('DEAUG', 'DE', 'augustfehn', 1),\n array('DEAUL', 'DE', 'aulendorf', 1),\n array('DEAUR', 'DE', 'aurich', 1),\n array('DEAWR', 'DE', 'achterwehr ringkanal', 1),\n array('DEBAM', 'DE', 'bamberg', 1),\n array('DEBAS', 'DE', 'basbeck', 1),\n array('DEBBG', 'DE', 'brandenburg', 1),\n array('DEBBI', 'DE', 'bietigheim-bissingen', 1),\n array('DEBBV', 'DE', 'bad bevensen', 1),\n array('DEBDS', 'DE', 'bad schandau', 1),\n array('DEBEI', 'DE', 'beidenfleth', 1),\n array('DEBEK', 'DE', 'bernkastel-kues', 1),\n array('DEBEN', 'DE', 'bensersiel', 1),\n array('DEBER', 'DE', 'berlin', 1),\n array('DEBES', 'DE', 'bad essen', 1),\n array('DEBEV', 'DE', 'beverungen', 1),\n array('DEBFH', 'DE', 'bad friedrichshall', 1),\n array('DEBFL', 'DE', 'borsfleth', 1),\n array('DEBGL', 'DE', 'bergisch-gladbach', 1),\n array('DEBGO', 'DE', 'bad godesburg', 1),\n array('DEBHE', 'DE', 'bad hersfeld', 1),\n array('DEBIN', 'DE', 'bingen', 1),\n array('DEBKE', 'DE', 'brake', 1),\n array('DEBKF', 'DE', 'biedenkopf', 1),\n array('DEBLM', 'DE', 'bremen-blumenthal', 1),\n array('DEBMK', 'DE', 'borkum', 1),\n array('DEBMR', 'DE', 'baltrum insel', 1),\n array('DEBMV', 'DE', 'bremervoerde', 1),\n array('DEBOC', 'DE', 'bockhorst', 1),\n array('DEBOE', 'DE', 'boeblingen', 1),\n array('DEBOK', 'DE', 'bokel', 1),\n array('DEBON', 'DE', 'bonn', 1),\n array('DEBOT', 'DE', 'bottrop', 1),\n array('DEBOY', 'DE', 'bad oeynhausen', 1),\n array('DEBRA', 'DE', 'bramel', 1),\n array('DEBRB', 'DE', 'brunsbuettel', 1),\n array('DEBRE', 'DE', 'bremen', 1),\n array('DEBRG', 'DE', 'burg/dithmarschen', 1),\n array('DEBRI', 'DE', 'brilon', 1),\n array('DEBRK', 'DE', 'barnkrug', 1),\n array('DEBRM', 'DE', 'bramsche', 1),\n array('DEBRN', 'DE', 'boernsen', 1),\n array('DEBRO', 'DE', 'brohl-luetzing', 1),\n array('DEBRT', 'DE', 'breitenberg', 1),\n array('DEBRV', 'DE', 'bremerhaven', 1),\n array('DEBSA', 'DE', 'bad säckingen', 1),\n array('DEBSH', 'DE', 'breisach', 1),\n array('DEBSK', 'DE', 'burgstaaken/fehmarn', 1),\n array('DEBST', 'DE', 'borstel', 1),\n array('DEBUL', 'DE', 'buehl', 1),\n array('DEBUM', 'DE', 'buesum', 1),\n array('DEBUT', 'DE', 'butjadgen', 1),\n array('DEBUX', 'DE', 'buxtehude', 1),\n array('DEBUZ', 'DE', 'buetzfleth', 1),\n array('DEC', 'US', 'Decatur Municipal', 0),\n array('DECAR', 'DE', 'carolinensiel', 1),\n array('DECGN', 'DE', 'koeln', 1),\n array('DECHI', 'DE', 'chiemsee', 1),\n array('DECOC', 'DE', 'cochem', 1),\n array('DECUX', 'DE', 'cuxhaven', 1),\n array('DEDAG', 'DE', 'dagebuell', 1),\n array('DEDAN', 'DE', 'dangast', 1),\n array('DEDAP', 'DE', 'damp', 1),\n array('DEDAT', 'DE', 'datteln', 1),\n array('DEDEG', 'DE', 'deggendorf', 1),\n array('DEDIN', 'DE', 'dinslaken', 1),\n array('DEDIT', 'DE', 'ditzum', 1),\n array('DEDMG', 'DE', 'dormagen', 1),\n array('DEDOB', 'DE', 'dornbusch', 1),\n array('DEDOW', 'DE', 'donauwoerth', 1),\n array('DEDRA', 'DE', 'dranske', 1),\n array('DEDRO', 'DE', 'drochtersen', 1),\n array('DEDRP', 'DE', 'doerpen', 1),\n array('DEDRS', 'DE', 'dresden', 1),\n array('DEDTM', 'DE', 'dortmund', 1),\n array('DEDUI', 'DE', 'duisburg', 1),\n array('DEDUS', 'DE', 'duesseldorf', 1),\n array('DEDYK', 'DE', 'dyckhausen', 1),\n array('DEEBB', 'DE', 'eberbach', 1),\n array('DEECK', 'DE', 'eckernfoerde', 1),\n array('DEEGL', 'DE', 'eggenstein-leopoldshafen', 1),\n array('DEEHI', 'DE', 'ehingen', 1),\n array('DEEHS', 'DE', 'eisenhuettenstadt', 1),\n array('DEELM', 'DE', 'elmshorn', 1),\n array('DEELS', 'DE', 'elsfleth', 1),\n array('DEEME', 'DE', 'emden', 1),\n array('DEEMM', 'DE', 'emmerich', 1),\n array('DEESF', 'DE', 'estorf/weser', 1),\n array('DEESS', 'DE', 'essen', 1),\n array('DEEUT', 'DE', 'eutin', 1),\n array('DEEWS', 'DE', 'eckwardersiel', 1),\n array('DEFDH', 'DE', 'friedrichshafen', 1),\n array('DEFEH', 'DE', 'fehmarn', 1),\n array('DEFFO', 'DE', 'frankfurt/oder', 1),\n array('DEFIS', 'DE', 'fischerhuette sued', 1),\n array('DEFLF', 'DE', 'flensburg', 1),\n array('DEFRA', 'DE', 'frankfurt/main', 1),\n array('DEFRE', 'DE', 'fresenburg', 1),\n array('DEFRI', 'DE', 'friedrichstadt', 1),\n array('DEFYE', 'DE', 'friesoythe', 1),\n array('DEGEL', 'DE', 'gelting', 1),\n array('DEGEM', 'DE', 'gemuenden', 1),\n array('DEGER', 'DE', 'germersheim', 1),\n array('DEGEV', 'DE', 'geversdorf', 1),\n array('DEGHM', 'DE', 'gernsheim', 1),\n array('DEGIG', 'DE', 'ginsheim-gustavsburg', 1),\n array('DEGIT', 'DE', 'gittelde', 1),\n array('DEGLU', 'DE', 'glueckstadt', 1),\n array('DEGRD', 'DE', 'greifswald', 1),\n array('DEGRE', 'DE', 'greetsiel', 1),\n array('DEGRO', 'DE', 'grossenbrode', 1),\n array('DEGST', 'DE', 'geeste', 1),\n array('DEGUG', 'DE', 'guenzburg', 1),\n array('DEH', 'US', 'Decorah Municipal', 0),\n array('DEHAF', 'DE', 'hafenlohr', 1),\n array('DEHAJ', 'DE', 'hannover', 1),\n array('DEHAM', 'DE', 'hamburg', 1),\n array('DEHAN', 'DE', 'hameln', 1),\n array('DEHAS', 'DE', 'hassfurt', 1),\n array('DEHAU', 'DE', 'hanau', 1),\n array('DEHBR', 'DE', 'herbrum', 1),\n array('DEHBU', 'DE', 'hamburg-harburg', 1),\n array('DEHED', 'DE', 'heikendorf', 1),\n array('DEHEE', 'DE', 'herne', 1),\n array('DEHEI', 'DE', 'heidelberg', 1),\n array('DEHEN', 'DE', 'heilbronn', 1),\n array('DEHGE', 'DE', 'hallig-hooge', 1),\n array('DEHGL', 'DE', 'helgoland i.', 1),\n array('DEHHF', 'DE', 'heiligenhafen', 1),\n array('DEHHS', 'DE', 'hohenhorn', 1),\n array('DEHIE', 'DE', 'hille', 1),\n array('DEHLH', 'DE', 'haldensleben', 1),\n array('DEHMM', 'DE', 'hamm', 1),\n array('DEHMO', 'DE', 'hemmoor', 1),\n array('DEHOB', 'DE', 'horb', 1),\n array('DEHOD', 'DE', 'hochdonn', 1),\n array('DEHOO', 'DE', 'hooksiel', 1),\n array('DEHOS', 'DE', 'horumersiel', 1),\n array('DEHOX', 'DE', 'hoexter', 1),\n array('DEHRB', 'DE', 'horneburg', 1),\n array('DEHRM', 'DE', 'hoernum/sylt', 1),\n array('DEHRN', 'DE', 'haren/ems', 1),\n array('DEHSA', 'DE', 'hohensaaten', 1),\n array('DEHSI', 'DE', 'heidesheim', 1),\n array('DEHUS', 'DE', 'husum', 1),\n array('DEHZN', 'DE', 'holzminden', 1),\n array('DEING', 'DE', 'ingolstadt', 1),\n array('DEINM', 'DE', 'ingelheim', 1),\n array('DEITZ', 'DE', 'itzehoe', 1),\n array('DEJEM', 'DE', 'jemgum', 1),\n array('DEJUI', 'DE', 'juist', 1),\n array('DEKAE', 'DE', 'karlsruhe', 1),\n array('DEKAI', 'DE', 'kaisermuehle/eifel', 1),\n array('DEKAM', 'DE', 'kahl am main', 1),\n array('DEKAP', 'DE', 'kappeln', 1),\n array('DEKAR', 'DE', 'karnin', 1),\n array('DEKBN', 'DE', 'karben', 1),\n array('DEKBR', 'DE', 'kinderboern', 1),\n array('DEKEB', 'DE', 'kelsterbach', 1),\n array('DEKEH', 'DE', 'kehl', 1),\n array('DEKEL', 'DE', 'kiel', 1),\n array('DEKEM', 'DE', 'kelheim', 1),\n array('DEKEZ', 'DE', 'kellmuenz', 1),\n array('DEKHN', 'DE', 'kellinghusen', 1),\n array('DEKIE', 'DE', 'kietz', 1),\n array('DEKIT', 'DE', 'kitzingen', 1),\n array('DEKOB', 'DE', 'koblenz', 1),\n array('DEKOL', 'DE', 'kollmar', 1),\n array('DEKON', 'DE', 'konstanz', 1),\n array('DEKOW', 'DE', 'koenigswinter', 1),\n array('DEKPE', 'DE', 'kampe', 1),\n array('DEKRA', 'DE', 'krautsand', 1),\n array('DEKRV', 'DE', 'kroev', 1),\n array('DEKWH', 'DE', 'koenigs wusterhausen', 1),\n array('DEL', 'IN', 'Delhi Indira Gandhi Intl', 0),\n array('DELAB', 'DE', 'laboe', 1),\n array('DELAD', 'DE', 'landau/pfalz', 1),\n array('DELAE', 'DE', 'laegerdorf', 1),\n array('DELAM', 'DE', 'lampertheim', 1),\n array('DELAT', 'DE', 'lathen', 1),\n array('DELBC', 'DE', 'luebeck', 1),\n array('DELDH', 'DE', 'landshut', 1),\n array('DELEE', 'DE', 'leer', 1),\n array('DELEV', 'DE', 'leverkusen', 1),\n array('DELEW', 'DE', 'lemwerder', 1),\n array('DELGO', 'DE', 'langeroog', 1),\n array('DELHH', 'DE', 'lonesch', 1),\n array('DELIG', 'DE', 'lingen', 1),\n array('DELIM', 'DE', 'limburg', 1),\n array('DELIN', 'DE', 'lintelermarsch', 1),\n array('DELIS', 'DE', 'list/sylt', 1),\n array('DELIU', 'DE', 'lindau', 1),\n array('DELNU', 'DE', 'lauenburg/elbe', 1),\n array('DELON', 'DE', 'longuich', 1),\n array('DELRN', 'DE', 'linz/rhein', 1),\n array('DELUH', 'DE', 'ludwigshafen', 1),\n array('DEMAG', 'DE', 'magdeburg', 1),\n array('DEMAI', 'DE', 'mainz', 1),\n array('DEMEI', 'DE', 'meissen', 1),\n array('DEMEL', 'DE', 'meldorf', 1),\n array('DEMEM', 'DE', 'memmert i.', 1),\n array('DEMHG', 'DE', 'mannheim', 1),\n array('DEMHM', 'DE', 'monheim', 1),\n array('DEMID', 'DE', 'minden', 1),\n array('DEMIL', 'DE', 'miltenberg', 1),\n array('DEMIN', 'DE', 'minsen', 1),\n array('DEMOE', 'DE', 'moelln', 1),\n array('DEMRM', 'DE', 'marcardsmoor', 1),\n array('DEMRS', 'DE', 'mariensiel', 1),\n array('DEMSH', 'DE', 'mescherin', 1),\n array('DEMSR', 'DE', 'muenster', 1),\n array('DEMUH', 'DE', 'muelheim an der ruhr', 1),\n array('DEMUK', 'DE', 'mukran', 1),\n array('DEMUN', 'DE', 'munster', 1),\n array('DEN', 'US', 'Denver Intl Arpt', 0),\n array('DENED', 'DE', 'neuwied', 1),\n array('DENEF', 'DE', 'neufeld', 1),\n array('DENEH', 'DE', 'neuhaus/oste', 1),\n array('DENEL', 'DE', 'neuland/elbe', 1),\n array('DENES', 'DE', 'nessmersiel', 1),\n array('DENHA', 'DE', 'nordenham', 1),\n array('DENHN', 'DE', 'nordhorn', 1),\n array('DENHO', 'DE', 'neustadt/holstein', 1),\n array('DENHS', 'DE', 'neuharlingersiel', 1),\n array('DENIE', 'DE', 'nienburg', 1),\n array('DENOD', 'DE', 'norden', 1),\n array('DENOE', 'DE', 'norddeich', 1),\n array('DENOR', 'DE', 'nordstrand i.', 1),\n array('DENRD', 'DE', 'norderney', 1),\n array('DENSC', 'DE', 'neuenschleuse', 1),\n array('DENSS', 'DE', 'neuss', 1),\n array('DENST', 'DE', 'neckarsteinach', 1),\n array('DENUE', 'DE', 'nuernberg', 1),\n array('DEOBE', 'DE', 'oberhausen', 1),\n array('DEOFF', 'DE', 'offenbach', 1),\n array('DEOLB', 'DE', 'oldenbuettel', 1),\n array('DEOLO', 'DE', 'oldenburg/oldenburg', 1),\n array('DEOLP', 'DE', 'olpenitz', 1),\n array('DEOPP', 'DE', 'oppenheim', 1),\n array('DEORT', 'DE', 'orth/fehmarn', 1),\n array('DEOSN', 'DE', 'osnabrueck', 1),\n array('DEOSR', 'DE', 'ostermoor', 1),\n array('DEOTT', 'DE', 'otterndorf', 1),\n array('DEPAH', 'DE', 'pahlhude', 1),\n array('DEPAP', 'DE', 'papenburg', 1),\n array('DEPAS', 'DE', 'passau', 1),\n array('DEPEI', 'DE', 'peine', 1),\n array('DEPEL', 'DE', 'pellworm i.', 1),\n array('DEPEN', 'DE', 'pente', 1),\n array('DEPIN', 'DE', 'pinneberg', 1),\n array('DEPOT', 'DE', 'potsdam', 1),\n array('DEPRA', 'DE', 'pirna', 1),\n array('DEPRW', 'DE', 'prerow', 1),\n array('DEPSH', 'DE', 'st peter', 1),\n array('DEPSW', 'DE', 'petershagen/weser', 1),\n array('DEPUT', 'DE', 'puttgarden', 1),\n array('DERAD', 'DE', 'radolfzell', 1),\n array('DEREE', 'DE', 'reepsholt', 1),\n array('DEREG', 'DE', 'regensburg', 1),\n array('DEREM', 'DE', 'remagen', 1),\n array('DEREN', 'DE', 'rendsburg', 1),\n array('DERHB', 'DE', 'rheinberg', 1),\n array('DERHE', 'DE', 'rheine', 1),\n array('DERHL', 'DE', 'rheinbrohl', 1),\n array('DEROS', 'DE', 'rosenheim', 1),\n array('DERSK', 'DE', 'rostock', 1),\n array('DERUE', 'DE', 'ruedesheim', 1),\n array('DERUM', 'DE', 'ruesselsheim', 1),\n array('DESAA', 'DE', 'saarlouis', 1),\n array('DESAG', 'DE', 'saarburg', 1),\n array('DESAR', 'DE', 'salzgitter', 1),\n array('DESAS', 'DE', 'sassnitz', 1),\n array('DESAU', 'DE', 'schacht audorf', 1),\n array('DESCN', 'DE', 'saarbruecken', 1),\n array('DESCW', 'DE', 'schweinfurt', 1),\n array('DESDE', 'DE', 'sande friesland', 1),\n array('DESDT', 'DE', 'schwedt', 1),\n array('DESEH', 'DE', 'sehestadt/eider', 1),\n array('DESLS', 'DE', 'schleswig', 1),\n array('DESMA', 'DE', 'st margarethen', 1),\n array('DESPE', 'DE', 'speyer', 1),\n array('DESPI', 'DE', 'spieckeroog i.', 1),\n array('DESPS', 'DE', 'schuelpersiel', 1),\n array('DESRI', 'DE', 'schweringen', 1),\n array('DESTA', 'DE', 'stade', 1),\n array('DESTB', 'DE', 'straubing', 1),\n array('DESTD', 'DE', 'strande', 1),\n array('DESTL', 'DE', 'stralsund', 1),\n array('DESTS', 'DE', 'stadersand', 1),\n array('DESUD', 'DE', 'suederstapel', 1),\n array('DET', 'US', 'Detroit City Apt', 0),\n array('DETAE', 'DE', 'tangermuende', 1),\n array('DETMH', 'DE', 'torfmoorholm', 1),\n array('DETOE', 'DE', 'toenning', 1),\n array('DETOS', 'DE', 'tossens', 1),\n array('DETRI', 'DE', 'trier', 1),\n array('DETRT', 'DE', 'traben-trarbach', 1),\n array('DETRV', 'DE', 'travemuende', 1),\n array('DEUCK', 'DE', 'ueckermuende', 1),\n array('DEUEB', 'DE', 'ueberlingen', 1),\n array('DEUEL', 'DE', 'uelzen', 1),\n array('DEUET', 'DE', 'uetersen', 1),\n array('DEULM', 'DE', 'ulm', 1),\n array('DEVAR', 'DE', 'varel', 1),\n array('DEVEN', 'DE', 'venne', 1),\n array('DEVOE', 'DE', 'voelklingen', 1),\n array('DEVRD', 'DE', 'voerde', 1),\n array('DEWAC', 'DE', 'westeraccumersiel', 1),\n array('DEWAR', 'DE', 'warnemuende', 1),\n array('DEWED', 'DE', 'wedel', 1),\n array('DEWEE', 'DE', 'weener', 1),\n array('DEWES', 'DE', 'wesel', 1),\n array('DEWET', 'DE', 'west', 1),\n array('DEWEW', 'DE', 'wewelsfleth', 1),\n array('DEWGT', 'DE', 'west german', 1),\n array('DEWIB', 'DE', 'wiesbaden', 1),\n array('DEWIE', 'DE', 'wiesens', 1),\n array('DEWIF', 'DE', 'wischhafen', 1),\n array('DEWIH', 'DE', 'wisch', 1),\n array('DEWIK', 'DE', 'wiek', 1),\n array('DEWIL', 'DE', 'wilster', 1),\n array('DEWIM', 'DE', 'wimmer', 1),\n array('DEWIS', 'DE', 'wismar', 1),\n array('DEWIT', 'DE', 'wittlage', 1),\n array('DEWNG', 'DE', 'wangen (?)', 1),\n array('DEWOB', 'DE', 'wolfsburg', 1),\n array('DEWOE', 'DE', 'woerth', 1),\n array('DEWOL', 'DE', 'wolgast', 1),\n array('DEWOR', 'DE', 'worms', 1),\n array('DEWTG', 'DE', 'wittenberg', 1),\n array('DEWTM', 'DE', 'wertheim', 1),\n array('DEWUE', 'DE', 'wuerzburg', 1),\n array('DEWVN', 'DE', 'wilhelmshaven', 1),\n array('DEWYK', 'DE', 'wyk auf foehr', 1),\n array('DEXFW', 'DE', 'finkenwerder', 1),\n array('DEZLT', 'DE', 'zeltingen-rachtig', 1),\n array('DFI', 'US', 'Defiance Memorial Arpt', 0),\n array('DFW', 'US', 'Dallas Ft Worth Intl', 0),\n array('DGE', 'AU', 'Mudgee Arpt', 0),\n array('DGM', 'CN', 'Dongguan Arpt', 0),\n array('DGO', 'MX', 'Guadalupe Victoria Arpt', 0),\n array('DGP', 'LV', 'Daugavpils Arpt', 0),\n array('DHA', 'SA', 'Dhahran Intl', 0),\n array('DHN', 'US', 'Dothan Municipal', 0),\n array('DIG', 'CN', 'Diging Arpt', 0),\n array('DIJ', 'FR', 'Longvic Airport', 0),\n array('DIK', 'US', 'Dickinson Municipal', 0),\n array('DIL', 'TP', 'Comoro Arpt', 0),\n array('DIR', 'ET', 'Aba Tenna D Yilma Arpt', 0),\n array('DIU', 'IN', 'Diu Arpt', 0),\n array('DIY', 'TR', 'Diyarbakirarpt', 0),\n array('DJB', 'ID', 'Sultan Taha Syarifudin Arpt', 0),\n array('DJE', 'TN', 'Melita Airport', 0),\n array('DJJIB', 'DJ', 'djibouti', 1),\n array('DKAAB', 'DK', 'aabenraa', 1),\n array('DKAAL', 'DK', 'aalborg', 1),\n array('DKAAR', 'DK', 'århus', 1),\n array('DKAGE', 'DK', 'allinge', 1),\n array('DKAGH', 'DK', 'agger havn', 1),\n array('DKANH', 'DK', 'anholt', 1),\n array('DKARD', 'DK', 'aaroesund', 1),\n array('DKARK', 'DK', 'aeroeskoebing (name ch.)', 1),\n array('DKASH', 'DK', 'aggersund (name change)', 1),\n array('DKASN', 'DK', 'assens', 1),\n array('DKASV', 'DK', 'asnaesvaerkets havn', 1),\n array('DKAUB', 'DK', 'augustenborg (name ch.)', 1),\n array('DKAVE', 'DK', 'avedoerevaerkets havn', 1),\n array('DKAVK', 'DK', 'avernako', 1),\n array('DKBAG', 'DK', 'bagenkop', 1),\n array('DKBDX', 'DK', 'bandholm', 1),\n array('DKBGZ', 'DK', 'bogense', 1),\n array('DKBOG', 'DK', 'bogoe', 1),\n array('DKBOS', 'DK', 'boejden', 1),\n array('DKBRB', 'DK', 'brabrand', 1),\n array('DKBRH', 'DK', 'branden havn', 1),\n array('DKCPH', 'DK', 'koebenhavn', 1),\n array('DKDAN', 'DK', 'cementfabriken dania', 1),\n array('DKDAS', 'DK', 'dansk salts havn', 1),\n array('DKDRA', 'DK', 'dragoer', 1),\n array('DKEBJ', 'DK', 'esbjerg', 1),\n array('DKEBT', 'DK', 'ebeltoft', 1),\n array('DKEDL', 'DK', 'endelave', 1),\n array('DKEND', 'DK', 'egernsund', 1),\n array('DKENS', 'DK', 'enstedvaerkets havn', 1),\n array('DKFAA', 'DK', 'faaborg', 1),\n array('DKFAK', 'DK', 'fakse ladeplads havn', 1),\n array('DKFDH', 'DK', 'frederikshavn', 1),\n array('DKFDS', 'DK', 'frederiksund', 1),\n array('DKFDV', 'DK', 'frederiksvaerk', 1),\n array('DKFEJ', 'DK', 'fejoe', 1),\n array('DKFRC', 'DK', 'fredericia', 1),\n array('DKFUH', 'DK', 'fur', 1),\n array('DKFYH', 'DK', 'fynshavn', 1),\n array('DKGDM', 'DK', 'gudhjem', 1),\n array('DKGED', 'DK', 'gedser', 1),\n array('DKGFH', 'DK', 'gulfhavn', 1),\n array('DKGLY', 'DK', 'glyngoere', 1),\n array('DKGRA', 'DK', 'grasten', 1),\n array('DKGRE', 'DK', 'grenaa', 1),\n array('DKHAD', 'DK', 'haderslev', 1),\n array('DKHAN', 'DK', 'hanstholm', 1),\n array('DKHBK', 'DK', 'holbaek', 1),\n array('DKHBO', 'DK', 'hobro', 1),\n array('DKHER', 'DK', 'herning', 1),\n array('DKHIR', 'DK', 'hirtshals', 1),\n array('DKHLS', 'DK', 'helsingoer', 1),\n array('DKHNB', 'DK', 'havneby havn', 1),\n array('DKHOH', 'DK', 'hou havn', 1),\n array('DKHOR', 'DK', 'horsens', 1),\n array('DKHSB', 'DK', 'holstebro', 1),\n array('DKHSL', 'DK', 'hasle', 1),\n array('DKHSU', 'DK', 'hadsund', 1),\n array('DKHUN', 'DK', 'hundested', 1),\n array('DKHVA', 'DK', 'hvalpsund', 1),\n array('DKHVN', 'DK', 'havnsoe', 1),\n array('DKI', 'AU', 'Dunk Island Arpt', 0),\n array('DKJUE', 'DK', 'juelsminde havn', 1),\n array('DKKAL', 'DK', 'kalundborg', 1),\n array('DKKBY', 'DK', 'kyndby/krostrup/', 1),\n array('DKKOG', 'DK', 'koege', 1),\n array('DKKOK', 'DK', 'kolby kas havn', 1),\n array('DKKOL', 'DK', 'kolding', 1),\n array('DKKON', 'DK', 'cementfabrikken kongs', 1),\n array('DKKRA', 'DK', 'kragenaes', 1),\n array('DKKRR', 'DK', 'korsoer', 1),\n array('DKKTD', 'DK', 'kerteminde', 1),\n array('DKKTP', 'DK', 'kastrup', 1),\n array('DKKVR', 'DK', 'kvaerndrup', 1),\n array('DKLGR', 'DK', 'loegstoer', 1),\n array('DKLIN', 'DK', 'lindoe havn', 1),\n array('DKLOH', 'DK', 'lohals', 1),\n array('DKLVG', 'DK', 'lemvig', 1),\n array('DKLYO', 'DK', 'lyngs odde havn', 1),\n array('DKMAS', 'DK', 'masnedoe', 1),\n array('DKMID', 'DK', 'middelfart', 1),\n array('DKMNS', 'DK', 'masnedsund', 1),\n array('DKMOM', 'DK', 'mommark', 1),\n array('DKMRB', 'DK', 'marbaek havn', 1),\n array('DKMRR', 'DK', 'mariager', 1),\n array('DKMRS', 'DK', 'marstal (name change)', 1),\n array('DKNAK', 'DK', 'nakskov', 1),\n array('DKNBG', 'DK', 'nyborg', 1),\n array('DKNBR', 'DK', 'nordborg', 1),\n array('DKNDB', 'DK', 'nordby havn fanoe', 1),\n array('DKNEX', 'DK', 'neksoe', 1),\n array('DKNRE', 'DK', 'noerre aaby', 1),\n array('DKNRS', 'DK', 'noerresundby', 1),\n array('DKNSD', 'DK', 'noerre snede', 1),\n array('DKNTD', 'DK', 'nysted', 1),\n array('DKNVD', 'DK', 'naestved', 1),\n array('DKNYF', 'DK', 'nykoebing falster', 1),\n array('DKNYM', 'DK', 'nykoebing mors', 1),\n array('DKNYS', 'DK', 'nykoebing sjaelland', 1),\n array('DKODE', 'DK', 'odense', 1),\n array('DKORE', 'DK', 'orehoved falster', 1),\n array('DKR', 'SN', 'Leopold Sedar Senghor Arpt', 0),\n array('DKRAN', 'DK', 'randers', 1),\n array('DKRKB', 'DK', 'rudkoebing', 1),\n array('DKRKE', 'DK', 'roskilde', 1),\n array('DKRNN', 'DK', 'roenne', 1),\n array('DKROD', 'DK', 'roedbyhavn', 1),\n array('DKROR', 'DK', 'cementfabrikken roerdal', 1),\n array('DKRRV', 'DK', 'roervig (name change)', 1),\n array('DKSAE', 'DK', 'saeby', 1),\n array('DKSAX', 'DK', 'sakskoebing', 1),\n array('DKSBK', 'DK', 'stubbekoebing havn', 1),\n array('DKSGD', 'DK', 'soenderborg', 1),\n array('DKSJO', 'DK', 'sejeroe', 1),\n array('DKSKA', 'DK', 'skagen', 1),\n array('DKSKV', 'DK', 'skive', 1),\n array('DKSLB', 'DK', 'silkeborg', 1),\n array('DKSLV', 'DK', 'saelvig havn', 1),\n array('DKSNE', 'DK', 'snekkersten', 1),\n array('DKSOB', 'DK', 'soeby havn', 1),\n array('DKSPB', 'DK', 'spodsbjerg havn', 1),\n array('DKSSK', 'DK', 'skaelskoer (name change)', 1),\n array('DKSSV', 'DK', 'studstrupvaerkets havn', 1),\n array('DKSTB', 'DK', 'strib havn', 1),\n array('DKSTE', 'DK', 'stege', 1),\n array('DKSTG', 'DK', 'stignaesvaerkets havn', 1),\n array('DKSTR', 'DK', 'struer', 1),\n array('DKSTT', 'DK', 'statoil-havnen', 1),\n array('DKSVA', 'DK', 'svaneke', 1),\n array('DKSVE', 'DK', 'svendborg', 1),\n array('DKSVG', 'DK', 'sandvig', 1),\n array('DKSVV', 'DK', 'stalvalsevaerket (name ch)', 1),\n array('DKTED', 'DK', 'thisted', 1),\n array('DKTRS', 'DK', 'tars (name change)', 1),\n array('DKTUB', 'DK', 'tuborg (name change)', 1),\n array('DKTYB', 'DK', 'tyboroen', 1),\n array('DKUNX', 'DK', 'uno-x havn', 1),\n array('DKVEJ', 'DK', 'vejle', 1),\n array('DKVEN', 'DK', 'venoe havn', 1),\n array('DKVES', 'DK', 'vesteroe havn laesoe', 1),\n array('DKVNG', 'DK', 'vang havn', 1),\n array('DKVOR', 'DK', 'vordingborg', 1),\n array('DKVSV', 'DK', 'vendsysselvaerkets havn', 1),\n array('DLA', 'CM', 'Douala Arpt', 0),\n array('DLC', 'CN', 'Dalian Airport', 0),\n array('DLD', 'NO', 'Dagali Arpt', 0),\n array('DLE', 'FR', 'Tavaux Arpt', 0),\n array('DLG', 'US', 'Dillingham Municipal Arpt', 0),\n array('DLH', 'US', 'Duluth Intl', 0),\n array('DLI', 'VN', 'Lienkhang', 0),\n array('DLL', 'US', 'Dillon Arpt', 0),\n array('DLM', 'TR', 'Dalman Airport', 0),\n array('DLP', 'FR', 'Disneyland Paris Heliport', 0),\n array('DLS', 'US', 'The Dalles Municipal Arpt', 0),\n array('DMADM', 'DM', 'anse de mai', 1),\n array('DME', 'RU', 'Domodedovo Arpt', 0),\n array('DMM', 'SA', 'King Fahad Arpt', 0),\n array('DMO', 'US', 'Sedalia Memorial Arpt', 0),\n array('DMPOR', 'DM', 'portsmouth', 1),\n array('DMRSU', 'DM', 'roseau', 1),\n array('DND', 'GB', 'Riverside Park Arpt', 0),\n array('DNK', 'UA', 'Dnepropetrovsk Arpt', 0),\n array('DNL', 'US', 'Daniel Airport', 0),\n array('DNQ', 'AU', 'Denilinquin Arpt', 0),\n array('DNR', 'FR', 'Pleurtuit Arpt', 0),\n array('DNV', 'US', 'Vermillion Cty', 0),\n array('DNZ', 'TR', 'Cardak Arpt', 0),\n array('DOBAN', 'DO', 'bani', 1),\n array('DOBCC', 'DO', 'boca chica', 1),\n array('DOBRX', 'DO', 'barahona', 1),\n array('DOC', 'GB', 'Dornoch Arpt', 0),\n array('DOCBJ', 'DO', 'cabo rojo', 1),\n array('DOCIU', 'DO', 'ciudad trujillo', 1),\n array('DOH', 'QA', 'Doha International Arpt', 0),\n array('DOHAI', 'DO', 'rio haina', 1),\n array('DOK', 'UA', 'Donetsk Arpt', 0),\n array('DOL', 'FR', 'Saint Gatien Arpt', 0),\n array('DOLRM', 'DO', 'la romana', 1),\n array('DOM', 'DM', 'Melville Hall Arpt', 0),\n array('DOMAN', 'DO', 'manzanillo', 1),\n array('DOPAL', 'DO', 'palenque', 1),\n array('DOPDR', 'DO', 'pedernales', 1),\n array('DOPOP', 'DO', 'puerto plata', 1),\n array('DOPUO', 'DO', 'puerto libertador', 1),\n array('DOPVA', 'DO', 'puerto viejo de azua', 1),\n array('DOSDQ', 'DO', 'santo domingo', 1),\n array('DOSFN', 'DO', 'si francisco macoros', 1),\n array('DOSNX', 'DO', 'sabana de mar', 1),\n array('DOSNZ', 'DO', 'sanchez', 1),\n array('DOSPM', 'DO', 'san pedro de macoris', 1),\n array('DOV', 'US', 'Dover AFB', 0),\n array('DOX', 'AU', 'Dongara', 0),\n array('DPA', 'US', 'Dupage County Arpt', 0),\n array('DPE', 'FR', 'Dieppe Arpt', 0),\n array('DPO', 'AU', 'Devonport Arpt', 0),\n array('DPS', 'ID', 'Ngurah Rai Arpt', 0),\n array('DRB', 'AU', 'Derby Airport', 0),\n array('DRO', 'US', 'Durango La Plata Cty Arpt', 0),\n array('DRS', 'DE', 'Dresden Arpt', 0),\n array('DRT', 'US', 'International Del Rio', 0),\n array('DRW', 'AU', 'Darwin Airport', 0),\n array('DSD', 'GP', 'La Desirade Arpt', 0),\n array('DSI', 'US', 'Destin Arpt', 0),\n array('DSM', 'US', 'Des Moines Municipal Airport', 0),\n array('DTM', 'DE', 'Wickede Dortmund Arpt', 0),\n array('DTW', 'US', 'Detroit Wayne County Arpt', 0),\n array('DUB', 'IE', 'Dublin Arpt', 0),\n array('DUD', 'NZ', 'Momona Airport', 0),\n array('DUG', 'US', 'Bisbee Douglas Intl', 0),\n array('DUJ', 'US', 'Dubois Jefferson Cty Arpt', 0),\n array('DUQ', 'CA', 'Duncan/Quam Rail Station', 0),\n array('DUR', 'ZA', 'Durban International', 0),\n array('DUS', 'DE', 'Dusseldorf Arpt', 0),\n array('DUT', 'US', 'Emergency Field', 0),\n array('DVL', 'US', 'Devils Lake Arpt', 0),\n array('DVN', 'US', 'Davenport Airport', 0),\n array('DVO', 'PH', 'Mati Airport', 0),\n array('DVX', 'US', 'Delaware Airpark', 0),\n array('DWH', 'US', 'David Wayne Hooks Arpt', 0),\n array('DWN', 'US', 'Downtown Airpark', 0),\n array('DXB', 'AE', 'Dubai Intl Arpt', 0),\n array('DXR', 'US', 'Danbury Municipal Arpt', 0),\n array('DYG', 'CN', 'Dayong Arpt', 0),\n array('DYL', 'US', 'Doylestown Arpt', 0),\n array('DYU', 'TJ', 'Dushanbe Arpt', 0),\n array('DZA', 'YT', 'Dzaoudzi Arpt', 0),\n array('DZAAE', 'DZ', 'annaba (ex bone)', 1),\n array('DZALG', 'DZ', 'alger', 1),\n array('DZAZW', 'DZ', 'arzew', 1),\n array('DZBJA', 'DZ', 'bejaia (ex bougie)', 1),\n array('DZBSF', 'DZ', 'benisaf', 1),\n array('DZCHE', 'DZ', 'cherchell', 1),\n array('DZCOL', 'DZ', 'collo', 1),\n array('DZDEL', 'DZ', 'dellys', 1),\n array('DZDJI', 'DZ', 'djidjelli', 1),\n array('DZGHA', 'DZ', 'ghazaouet', 1),\n array('DZMOS', 'DZ', 'mostaganem', 1),\n array('DZORN', 'DZ', 'oran', 1),\n array('DZSKI', 'DZ', 'skikda (ex philippeville)', 1),\n array('DZTEN', 'DZ', 'tenes', 1),\n array('EAA', 'US', 'Eagle Airport', 0),\n array('EAM', 'SA', 'Nejran Arpt', 0),\n array('EAR', 'US', 'Kearney Municipal Arrpt', 0),\n array('EAS', 'ES', 'Fuenterrabia Arpt', 0),\n array('EAT', 'US', 'Pangborn Memorial Fld', 0),\n array('EAU', 'US', 'Claire Municipal Airport', 0),\n array('EBA', 'IT', 'Marina Di Campo Arpt', 0),\n array('EBB', 'UG', 'Entebbe Airport', 0),\n array('EBJ', 'DK', 'Esbjerg Arpt', 0),\n array('EBR', 'US', 'Baton Rouge Downtown Arpt', 0),\n array('EBU', 'FR', 'Boutheon Arpt', 0),\n array('ECAYO', 'EC', 'puerto ayora isla santa cruz', 1),\n array('ECBAQ', 'EC', 'puerto baquerizo moreno snc', 1),\n array('ECBHA', 'EC', 'bahia de caraques', 1),\n array('ECCAT', 'EC', 'caleta tagus', 1),\n array('ECCUE', 'EC', 'cuenca', 1),\n array('ECDUN', 'EC', 'duran', 1),\n array('ECEBL', 'EC', 'balao', 1),\n array('ECESM', 'EC', 'esmeraldas', 1),\n array('ECG', 'US', 'Elizabeth Municipal Cgas', 0),\n array('ECGYE', 'EC', 'guayaquil', 1),\n array('ECH', 'AU', 'Echuca Arpt', 0),\n array('ECLLD', 'EC', 'la libertad', 1),\n array('ECMEC', 'EC', 'manta', 1),\n array('ECN', 'CY', 'Ercan Airport', 0),\n array('ECPBO', 'EC', 'puerto bolivar', 1),\n array('ECPUN', 'EC', 'puna', 1),\n array('ECPVO', 'EC', 'portoviejo', 1),\n array('ECSLR', 'EC', 'san lorenzo', 1),\n array('ECSNC', 'EC', 'salinas', 1),\n array('ECTEP', 'EC', 'tepre', 1),\n array('ECVIL', 'EC', 'puerto villamil isla isabela', 1),\n array('EDI', 'GB', 'Turnhouse Arpt', 0),\n array('EDL', 'KE', 'Eldoret Arpt', 0),\n array('EDM', 'FR', 'Les Ajoncs Arpt', 0),\n array('EED', 'US', 'Needles Arpt', 0),\n array('EEN', 'US', 'Dilliant Hopkins Arpt', 0),\n array('EEPAR', 'EE', 'paernu (spelling & code ch)', 1),\n array('EETLL', 'EE', 'tallinn', 1),\n array('EEURE', 'EE', 'kuresaaare', 1),\n array('EFD', 'US', 'Ellington Field', 0),\n array('EFL', 'GR', 'Argostoli Arpt', 0),\n array('EGADA', 'EG', 'adabiya', 1),\n array('EGAIS', 'EG', 'ain sukhna', 1),\n array('EGAKI', 'EG', 'abu kir', 1),\n array('EGALY', 'EG', 'el iskandariya (= alexandria) ', 1),\n array('EGAQU', 'EG', 'al qusayr', 1),\n array('EGASW', 'EG', 'aswan', 1),\n array('EGAUE', 'EG', 'abu rudeis', 1),\n array('EGAZA', 'EG', 'abu zenima', 1),\n array('EGC', 'FR', 'Roumaniere Arpt', 0),\n array('EGCAI', 'EG', 'el qahira (= cairo)', 1),\n array('EGDAM', 'EG', 'damietta', 1),\n array('EGE', 'US', 'Eagle County Arpt', 0),\n array('EGEDK', 'EG', 'el dekheila', 1),\n array('EGFAD', 'EG', 'fayid', 1),\n array('EGFAN', 'EG', 'fanara', 1),\n array('EGGEI', 'EG', 'geisum terminal', 1),\n array('EGHAL', 'EG', 'halaib', 1),\n array('EGHAM', 'EG', 'hamrawein', 1),\n array('EGHRG', 'EG', 'hurghada', 1),\n array('EGISM', 'EG', 'ismailia', 1),\n array('EGKOS', 'EG', 'kosseir', 1),\n array('EGMAH', 'EG', 'mersa el hamra', 1),\n array('EGO', 'RU', 'Belgorod Arpt', 0),\n array('EGPIB', 'EG', 'port ibrahim', 1),\n array('EGPRA', 'EG', 'rashid', 1),\n array('EGPSD', 'EG', 'port said', 1),\n array('EGPTK', 'EG', 'port tewfik', 1),\n array('EGRAG', 'EG', 'ras gharib', 1),\n array('EGRSH', 'EG', 'ras shukheir', 1),\n array('EGS', 'IS', 'Egilsstadir Arpt', 0),\n array('EGSBA', 'EG', 'sidi barrani', 1),\n array('EGSGA', 'EG', 'safaga', 1),\n array('EGSSH', 'EG', 'sharm el sheikh', 1),\n array('EGSUZ', 'EG', 'el suweis (= suez)', 1),\n array('EGV', 'US', 'Eagle River Union Arpt', 0),\n array('EGWAF', 'EG', 'wadi feiran', 1),\n array('EHEAI', 'EH', 'el aiun', 1),\n array('EHT', 'US', 'Rentschler Arpt', 0),\n array('EIB', 'DE', 'Eisenach Arpt', 0),\n array('EIN', 'NL', 'Welschap Arpt', 0),\n array('EIS', 'VG', 'Beef Island Arpt', 0),\n array('EJA', 'CO', 'Variguies Arpt', 0),\n array('EKI', 'US', 'Elkhart Municipal Arpt', 0),\n array('EKN', 'US', 'Randolph County Arpt', 0),\n array('EKO', 'US', 'J C Harris Field', 0),\n array('EKX', 'US', 'Addington Field', 0),\n array('ELD', 'US', 'Goodwin Field', 0),\n array('ELH', 'BS', 'North Eleuthera Intl', 0),\n array('ELK', 'US', 'Elk City Municipal', 0),\n array('ELM', 'US', 'Elmira Corning Regional Arpt', 0),\n array('ELP', 'US', 'El Paso Intl Arpt', 0),\n array('ELQ', 'SA', 'Gassim Arpt', 0),\n array('ELS', 'ZA', 'East London Arpt', 0),\n array('ELY', 'US', 'Yelland Field', 0),\n array('EMA', 'GB', 'East Midlands Arpt', 0),\n array('EMD', 'AU', 'Emerald Arpt', 0),\n array('EMT', 'US', 'El Monte Arpt', 0),\n array('ENA', 'US', 'Kenai Municipal Arpt', 0),\n array('ENC', 'FR', 'Essey Airport', 0),\n array('ENK', 'IE', 'St Angelo Arpt', 0),\n array('ENL', 'US', 'Centralia Municipal Arpt', 0),\n array('ENS', 'NL', 'Twente Airport', 0),\n array('ENW', 'US', 'Kenosha Municipal Arpt', 0),\n array('EOH', 'CO', 'Enrique Olaya Herrara', 0),\n array('EOI', 'GB', 'Eday Arpt', 0),\n array('EOK', 'US', 'Keokuk Arpt', 0),\n array('EPL', 'FR', 'Mirecourt Arpt', 0),\n array('EPR', 'AU', 'Esperance Arpt', 0),\n array('EQS', 'AR', 'Esquel Airport', 0),\n array('ERASA', 'ER', 'assab', 1),\n array('ERF', 'DE', 'Erfurt Arpt', 0),\n array('ERI', 'US', 'Erie Intl', 0),\n array('ERMSW', 'ER', 'massawa', 1),\n array('ERS', 'NA', 'Eros Arpt', 0),\n array('ERZ', 'TR', 'Erzurum Arpt', 0),\n array('ESACE', 'ES', 'arrecife de lanzarote', 1),\n array('ESADR', 'ES', 'adra', 1),\n array('ESAGA', 'ES', 'agaete', 1),\n array('ESAGP', 'ES', 'malaga', 1),\n array('ESAGU', 'ES', 'aguilas', 1),\n array('ESALC', 'ES', 'alicante', 1),\n array('ESALD', 'ES', 'alcudia', 1),\n array('ESALG', 'ES', 'algeciras', 1),\n array('ESARI', 'ES', 'arguineguin', 1),\n array('ESARN', 'ES', 'arenys de mar', 1),\n array('ESAVS', 'ES', 'aviles', 1),\n array('ESAYA', 'ES', 'ayamonte', 1),\n array('ESB', 'TR', 'Esenboga Arpt', 0),\n array('ESBCN', 'ES', 'barcelona', 1),\n array('ESBIO', 'ES', 'bilbao', 1),\n array('ESBLA', 'ES', 'blanes', 1),\n array('ESBRX', 'ES', 'burriana', 1),\n array('ESC', 'US', 'Delta County', 0),\n array('ESCAD', 'ES', 'cadiz', 1),\n array('ESCAR', 'ES', 'cartagena', 1),\n array('ESCAS', 'ES', 'castellon de la plana', 1),\n array('ESCBD', 'ES', 'cambados', 1),\n array('ESCBS', 'ES', 'cala sabina', 1),\n array('ESCBZ', 'ES', 'cabezuela', 1),\n array('ESCCN', 'ES', 'corcubion', 1),\n array('ESCEL', 'ES', 'celeiro', 1),\n array('ESCEU', 'ES', 'ceuta', 1),\n array('ESCNO', 'ES', 'carino', 1),\n array('ESD', 'US', 'Eastsound Orcas Is Arpt', 0),\n array('ESDNA', 'ES', 'denia', 1),\n array('ESDRI', 'ES', 'derio', 1),\n array('ESE', 'MX', 'Ensenada Arpt', 0),\n array('ESEAS', 'ES', 'san sebastian', 1),\n array('ESESC', 'ES', 'escombreras', 1),\n array('ESF', 'US', 'Esler Field', 0),\n array('ESFER', 'ES', 'el ferrol', 1),\n array('ESFUE', 'ES', 'puerto del rosario-fuerteventu', 1),\n array('ESGAN', 'ES', 'gandia', 1),\n array('ESGAR', 'ES', 'garrucha', 1),\n array('ESGIJ', 'ES', 'gijon', 1),\n array('ESGRY', 'ES', 'grao', 1),\n array('ESHIE', 'ES', 'hierro', 1),\n array('ESHUV', 'ES', 'huelva', 1),\n array('ESIBZ', 'ES', 'ibiza', 1),\n array('ESJAV', 'ES', 'javea', 1),\n array('ESL', 'RU', 'Elista Arpt', 0),\n array('ESLEI', 'ES', 'almeria', 1),\n array('ESLEK', 'ES', 'lekeitio', 1),\n array('ESLES', 'ES', 'la estaca', 1),\n array('ESLJO', 'ES', 'la llagosta', 1),\n array('ESLPA', 'ES', 'las palmas', 1),\n array('ESLPC', 'ES', 'la puebla del caramiñal', 1),\n array('ESMIX', 'ES', 'miranda de ebro', 1),\n array('ESMLN', 'ES', 'melilla', 1),\n array('ESMOA', 'ES', 'moana', 1),\n array('ESMOT', 'ES', 'motril', 1),\n array('ESMPG', 'ES', 'marin pontevedra', 1),\n array('ESMRS', 'ES', 'muros', 1),\n array('ESMSN', 'ES', 'el masnou', 1),\n array('ESMUS', 'ES', 'musel', 1),\n array('ESN', 'US', 'Easton Municipal Arpt', 0),\n array('ESOND', 'ES', 'ondarroa', 1),\n array('ESP', 'US', 'Birchwood Pocono Arpt', 0),\n array('ESPAL', 'ES', 'palamos', 1),\n array('ESPAS', 'ES', 'pasajes', 1),\n array('ESPCO', 'ES', 'puerto colom', 1),\n array('ESPCR', 'ES', 'puebla caramiñal', 1),\n array('ESPMI', 'ES', 'palma mallorca', 1),\n array('ESPOR', 'ES', 'portugalete', 1),\n array('ESPSM', 'ES', 'puerto de santa maria', 1),\n array('ESQFU', 'ES', 'corralejo', 1),\n array('ESQIU', 'ES', 'ciudadela', 1),\n array('ESQLY', 'ES', 'playa blanca', 1),\n array('ESR', 'CL', 'El Salvador Arpt', 0),\n array('ESRBS', 'ES', 'ribadesella', 1),\n array('ESRIB', 'ES', 'ribadeo', 1),\n array('ESROS', 'ES', 'rosas', 1),\n array('ESROT', 'ES', 'rota', 1),\n array('ESS', 'DE', 'Essen Arpt', 0),\n array('ESSAA', 'ES', 'san antonio', 1),\n array('ESSAD', 'ES', 'sada', 1),\n array('ESSAG', 'ES', 'sagunto', 1),\n array('ESSAT', 'ES', 'salinetas', 1),\n array('ESSCI', 'ES', 'san ciprian', 1),\n array('ESSCR', 'ES', 'san carlos de la rapita', 1),\n array('ESSCT', 'ES', 'santa cruz de tenerife', 1),\n array('ESSDR', 'ES', 'santander', 1),\n array('ESSEO', 'ES', 'san esteban de pravia', 1),\n array('ESSFO', 'ES', 'san fernando', 1),\n array('ESSFU', 'ES', 'san feliu de guixols', 1),\n array('ESSJN', 'ES', 'san juan de nivea', 1),\n array('ESSNR', 'ES', 'santurce', 1),\n array('ESSPC', 'ES', 'santa cruz de la palma', 1),\n array('ESSPO', 'ES', 'santa pola', 1),\n array('ESSPP', 'ES', 'san pedro del pinatar', 1),\n array('ESSSG', 'ES', 'san sebastian de la gomera', 1),\n array('ESSTE', 'ES', 'santa eulalia (ibiza)', 1),\n array('ESSVQ', 'ES', 'sevilla', 1),\n array('ESTAR', 'ES', 'tarragona', 1),\n array('ESTJI', 'ES', 'la tejita', 1),\n array('ESTOR', 'ES', 'torrevieja', 1),\n array('ESTOT', 'ES', 'tortosa', 1),\n array('ESTRF', 'ES', 'tarifa', 1),\n array('ESU', 'MA', 'Essaouira Arpt', 0),\n array('ESVGO', 'ES', 'vigo', 1),\n array('ESVGR', 'ES', 'valle gran rey', 1),\n array('ESVIL', 'ES', 'villagarcia (de arosa)', 1),\n array('ESVIT', 'ES', 'vitoria', 1),\n array('ESVIV', 'ES', 'vivero', 1),\n array('ESVLC', 'ES', 'valencia', 1),\n array('ESVLG', 'ES', 'vilanova y la galtru', 1),\n array('ESVZR', 'ES', 'vinaroz', 1),\n array('ESZAZ', 'ES', 'zaragoza', 1),\n array('ETB', 'US', 'West Bend Arpt', 0),\n array('ETH', 'IL', 'Elat Airport', 0),\n array('ETS', 'US', 'Enterprise Municipal', 0),\n array('ETZ', 'FR', 'Metz Nancy Lorraine', 0),\n array('EUF', 'US', 'Weedon Field', 0),\n array('EUG', 'US', 'Eugene Arpt', 0),\n array('EUN', 'MA', 'Hassan I Arpt', 0),\n array('EUX', 'AN', 'Roosevelt Field', 0),\n array('EVE', 'NO', 'Evenes Arpt', 0),\n array('EVG', 'SE', 'Sveg Arpt', 0),\n array('EVM', 'US', 'Eveleth Virginia Municipal Arpt', 0),\n array('EVN', 'AM', 'Yerevan Arpt', 0),\n array('EVV', 'US', 'Evansville Regional Arpt', 0),\n array('EVX', 'FR', 'Evreux Arpt', 0),\n array('EWB', 'US', 'New Bedford Municipal', 0),\n array('EWK', 'US', 'Newton City County Arpt', 0),\n array('EWN', 'US', 'Simmons Nott Arpt', 0),\n array('EWR', 'US', 'Newark Intl Arpt', 0),\n array('EXI', 'US', 'Excursion Inlet Municipal', 0),\n array('EXM', 'AU', 'Exmouth Gulf', 0),\n array('EXT', 'GB', 'Exeter Arpt', 0),\n array('EYW', 'US', 'Key West Intl', 0),\n array('EZE', 'AR', 'Ministro Pistarini', 0),\n array('EZS', 'TR', 'Elazig Arpt', 0),\n array('FAE', 'DK', 'Faeroe Airport', 0),\n array('FAI', 'US', 'Fairbanks Intl Arpt', 0),\n array('FAJ', 'US', 'Fajardo Arpt', 0),\n array('FAO', 'PT', 'Faro Airport', 0),\n array('FAR', 'US', 'Hector Airport', 0),\n array('FAT', 'US', 'Fresno Air Terminal', 0),\n array('FAY', 'US', 'Fayetteville Municipal', 0),\n array('FCA', 'US', 'Glacier Park Intl', 0),\n array('FCB', 'ZA', 'Ficksburg Sentra Oes', 0),\n array('FCO', 'IT', 'Leonardo Da Vinci', 0),\n array('FCY', 'US', 'Forrest City Municipal Arpt', 0),\n array('FDE', 'NO', 'Bringeland Arpt', 0),\n array('FDF', 'MQ', 'Lamentin Arpt', 0),\n array('FDH', 'DE', 'Friedrichshafen Lowenthal', 0),\n array('FDK', 'US', 'Frederick Municipal', 0),\n array('FEN', 'BR', 'Fernando De Noronha Arpt', 0),\n array('FEZ', 'MA', 'Fez Airport', 0),\n array('FFM', 'US', 'Fergus Falls Municipal', 0),\n array('FGI', 'WS', 'Fagali Arpt', 0),\n array('FHU', 'US', 'Sierra Vista Municipal', 0),\n array('FIBRA', 'FI', 'braendoe', 1),\n array('FIDLS', 'FI', 'taalintehdas', 1),\n array('FIDRA', 'FI', 'dragsfjaerd', 1),\n array('FIE', 'GB', 'Fair Isle Arpt', 0),\n array('FIECK', 'FI', 'eckeroe', 1),\n array('FIEJO', 'FI', 'eurajoki', 1),\n array('FIENK', 'FI', 'enonkoski', 1),\n array('FIESP', 'FI', 'espoo', 1),\n array('FIFAR', 'FI', 'faerjsund', 1),\n array('FIFOG', 'FI', 'foegloe', 1),\n array('FIFOR', 'FI', 'foerby', 1),\n array('FIGDB', 'FI', 'godby', 1),\n array('FIHAU', 'FI', 'haukipudas', 1),\n array('FIHEL', 'FI', 'helsinki', 1),\n array('FIHKO', 'FI', 'hanko', 1),\n array('FIHMN', 'FI', 'hamina', 1),\n array('FIHOU', 'FI', 'houtskari', 1),\n array('FIIIS', 'FI', 'iisalmi', 1),\n array('FIIMA', 'FI', 'imatra', 1),\n array('FIINI', 'FI', 'inioe', 1),\n array('FIINK', 'FI', 'inkoo', 1),\n array('FIISN', 'FI', 'isnaes', 1),\n array('FIJOU', 'FI', 'joutseno', 1),\n array('FIJYV', 'FI', 'jyvaeskylae', 1),\n array('FIKAS', 'FI', 'kaskinen', 1),\n array('FIKEM', 'FI', 'kemi', 1),\n array('FIKIM', 'FI', 'kemioe', 1),\n array('FIKJO', 'FI', 'kalajoki', 1),\n array('FIKKR', 'FI', 'koekar', 1),\n array('FIKNT', 'FI', 'kantvik', 1),\n array('FIKOK', 'FI', 'kokkola', 1),\n array('FIKOR', 'FI', 'korppoo', 1),\n array('FIKRO', 'FI', 'kronvik', 1),\n array('FIKRS', 'FI', 'kristiinankaupunki', 1),\n array('FIKTK', 'FI', 'kotka', 1),\n array('FIKTQ', 'FI', 'kitee', 1),\n array('FIKUM', 'FI', 'kumlinge', 1),\n array('FIKUO', 'FI', 'kuopio', 1),\n array('FIKUS', 'FI', 'kustavi', 1),\n array('FIKVH', 'FI', 'koverhar', 1),\n array('FILAN', 'FI', 'langnaes', 1),\n array('FILAP', 'FI', 'lappohja', 1),\n array('FILOV', 'FI', 'loviisa', 1),\n array('FILPP', 'FI', 'lappeenranta', 1),\n array('FILUV', 'FI', 'luvia', 1),\n array('FIMAA', 'FI', 'maaninka', 1),\n array('FIMER', 'FI', 'merikarvia', 1),\n array('FIMHQ', 'FI', 'mariehamn', 1),\n array('FIMIK', 'FI', 'mikkeli', 1),\n array('FINAU', 'FI', 'nauvo', 1),\n array('FINLI', 'FI', 'naantali', 1),\n array('FINUR', 'FI', 'nurmes', 1),\n array('FIOUL', 'FI', 'oulu', 1),\n array('FIPAR', 'FI', 'parainen', 1),\n array('FIPER', 'FI', 'pernaja', 1),\n array('FIPOH', 'FI', 'pohjankuru', 1),\n array('FIPOR', 'FI', 'pori', 1),\n array('FIPRS', 'FI', 'pietarsaari', 1),\n array('FIPRV', 'FI', 'porvoo', 1),\n array('FIPUU', 'FI', 'puumala', 1),\n array('FIRAA', 'FI', 'raahe', 1),\n array('FIRAU', 'FI', 'rauma', 1),\n array('FIRIS', 'FI', 'ristiina', 1),\n array('FIRTR', 'FI', 'rautaruukki/raahe', 1),\n array('FIRUO', 'FI', 'ruotsinpyhtaeae', 1),\n array('FIRYM', 'FI', 'rymaettylae', 1),\n array('FISAL', 'FI', 'salo', 1),\n array('FISII', 'FI', 'siilinjaervi', 1),\n array('FISIP', 'FI', 'sipoonlahti', 1),\n array('FISKB', 'FI', 'skogby', 1),\n array('FISKV', 'FI', 'skoeldvik', 1),\n array('FISTR', 'FI', 'stroemma', 1),\n array('FISVL', 'FI', 'savonlinna', 1),\n array('FITAI', 'FI', 'tammisaari', 1),\n array('FITEI', 'FI', 'teijo', 1),\n array('FITKU', 'FI', 'turku', 1),\n array('FITOK', 'FI', 'tolkkinen', 1),\n array('FITOR', 'FI', 'tornio', 1),\n array('FITVS', 'FI', 'taivassalo', 1),\n array('FIUIM', 'FI', 'uimaharju', 1),\n array('FIUKI', 'FI', 'uusikaupunki', 1),\n array('FIUKP', 'FI', 'uusikaarlepyy', 1),\n array('FIVAA', 'FI', 'vaasa', 1),\n array('FIVEL', 'FI', 'velkua', 1),\n array('FIVRK', 'FI', 'varkaus', 1),\n array('FJELL', 'FJ', 'ellington', 1),\n array('FJLBS', 'FJ', 'labasa', 1),\n array('FJLEV', 'FJ', 'levuka', 1),\n array('FJLTK', 'FJ', 'lautoka', 1),\n array('FJMAL', 'FJ', 'malau (labasa)', 1),\n array('FJMOM', 'FJ', 'momi', 1),\n array('FJNAM', 'FJ', 'nambouwalu', 1),\n array('FJR', 'AE', 'Fujairah Intl Arpt', 0),\n array('FJRTA', 'FJ', 'rotuma', 1),\n array('FJSIN', 'FJ', 'singatoka', 1),\n array('FJSUV', 'FJ', 'suva', 1),\n array('FJSVU', 'FJ', 'savusavu', 1),\n array('FJVAT', 'FJ', 'vatia', 1),\n array('FJVUD', 'FJ', 'vuda', 1),\n array('FKB', 'DE', 'Soellingen Arpt', 0),\n array('FKL', 'US', 'Chess Lamberton Arpt', 0),\n array('FKPSY', 'FK', 'port stanley', 1),\n array('FKS', 'JP', 'Fukushima Arpt', 0),\n array('FLB', 'BR', 'Cangapara Arpt', 0),\n array('FLF', 'DE', 'Schaferhaus Arpt', 0),\n array('FLG', 'US', 'Flagstaff Arpt', 0),\n array('FLL', 'US', 'Ft Lauderdale Hollywood Intl Arpt', 0),\n array('FLN', 'BR', 'Hercilio Luz Arpt', 0),\n array('FLO', 'US', 'Gilbert Field', 0),\n array('FLR', 'IT', 'Peretola Arpt', 0),\n array('FLW', 'PT', 'Aerodromo Das Flores', 0),\n array('FLX', 'US', 'Fallon Municipal Arpt', 0),\n array('FMA', 'AR', 'El Pucu Arpt', 0),\n array('FMFSI', 'FM', 'faisi', 1),\n array('FMH', 'US', 'Otis AFB', 0),\n array('FMKSA', 'FM', 'kosrae (ex kusaie)', 1),\n array('FMN', 'US', 'Four Corners Regional Arpt', 0),\n array('FMO', 'DE', 'Muenster Airport', 0),\n array('FMPNI', 'FM', 'pohnpei (ex ponape)', 1),\n array('FMS', 'US', 'Fort Madison Municipal', 0),\n array('FMTKK', 'FM', 'chuuk (ex truk)', 1),\n array('FMY', 'US', 'Page Field', 0),\n array('FMYAP', 'FM', 'yap', 1),\n array('FNA', 'SL', 'Lungi Intl Arpt', 0),\n array('FNC', 'PT', 'Funchal Airport', 0),\n array('FNI', 'FR', 'Nimes Airport', 0),\n array('FNL', 'US', 'Municipal Airport', 0),\n array('FNT', 'US', 'Bishop Intl Arpt', 0),\n array('FOC', 'CN', 'Fuzhou Arpt', 0),\n array('FOD', 'US', 'Ft Dodge Municipal', 0),\n array('FOE', 'US', 'Forbes Field', 0),\n array('FOFUG', 'FO', 'fuglafirdi (fuglefjord)', 1),\n array('FOG', 'IT', 'Gino Lisa Arpt', 0),\n array('FOHUS', 'FO', 'husevig', 1),\n array('FOKVI', 'FO', 'klaksvik', 1),\n array('FOLOP', 'FO', 'lopra', 1),\n array('FOR', 'BR', 'Pinto Martines Arpt', 0),\n array('FOSMJ', 'FO', 'solmundefjord', 1),\n array('FOSRV', 'FO', 'sorvagur', 1),\n array('FOT', 'AU', 'Forster', 0),\n array('FOTHO', 'FO', 'thorshavn', 1),\n array('FOTVO', 'FO', 'tvoroeyri', 1),\n array('FOVES', 'FO', 'vestmanhavn', 1),\n array('FOVID', 'FO', 'vadair', 1),\n array('FPO', 'BS', 'Freeport Intl Arpt', 0),\n array('FPR', 'US', 'St Lucie County Arpt', 0),\n array('FRA', 'DE', 'Frankfurt Intl', 0),\n array('FRABB', 'FR', 'abbeville', 1),\n array('FRAGF', 'FR', 'agen', 1),\n array('FRAJA', 'FR', 'ajaccio', 1),\n array('FRAMI', 'FR', 'amiens', 1),\n array('FRANT', 'FR', 'antibes', 1),\n array('FRARC', 'FR', 'arcachon', 1),\n array('FRARR', 'FR', 'arras', 1),\n array('FRAUD', 'FR', 'audierne', 1),\n array('FRAUF', 'FR', 'auxerre', 1),\n array('FRAVN', 'FR', 'avignon', 1),\n array('FRBAS', 'FR', 'bassens', 1),\n array('FRBAY', 'FR', 'bayonne', 1),\n array('FRBEC', 'FR', 'bec d\\'ambès', 1),\n array('FRBEE', 'FR', 'berre', 1),\n array('FRBES', 'FR', 'brest', 1),\n array('FRBET', 'FR', 'béthune', 1),\n array('FRBEV', 'FR', 'berville', 1),\n array('FRBIA', 'FR', 'bastia', 1),\n array('FRBIQ', 'FR', 'biarritz', 1),\n array('FRBLD', 'FR', 'bar le duc', 1),\n array('FRBOD', 'FR', 'bordeaux', 1),\n array('FRBOL', 'FR', 'boulogne sur mer', 1),\n array('FRBON', 'FR', 'bonifacio', 1),\n array('FRBSN', 'FR', 'besancon', 1),\n array('FRBYE', 'FR', 'blaye', 1),\n array('FRCAM', 'FR', 'camaret-sur-mer', 1),\n array('FRCEP', 'FR', 'cergy pontoise', 1),\n array('FRCEQ', 'FR', 'cannes', 1),\n array('FRCER', 'FR', 'cherbourg', 1),\n array('FRCFR', 'FR', 'caen', 1),\n array('FRCHM', 'FR', 'charleville mézières', 1),\n array('FRCLY', 'FR', 'calvi', 1),\n array('FRCMP', 'FR', 'compiègne', 1),\n array('FRCMR', 'FR', 'colmar', 1),\n array('FRCMT', 'FR', 'chaumont', 1),\n array('FRCNG', 'FR', 'cognac', 1),\n array('FRCOC', 'FR', 'concarneau', 1),\n array('FRCRL', 'FR', 'creil', 1),\n array('FRCRT', 'FR', 'carteret', 1),\n array('FRCSM', 'FR', 'châlons sur marne', 1),\n array('FRCSS', 'FR', 'chalon sur saône', 1),\n array('FRD', 'US', 'Friday Harbor Airport', 0),\n array('FRDIJ', 'FR', 'dijon', 1),\n array('FRDKK', 'FR', 'dunkerque', 1),\n array('FRDOL', 'FR', 'deauville', 1),\n array('FRDON', 'FR', 'donges', 1),\n array('FRDPE', 'FR', 'dieppe', 1),\n array('FRDRZ', 'FR', 'douarnenez', 1),\n array('FRETB', 'FR', 'etang de berre', 1),\n array('FREVR', 'FR', 'evry', 1),\n array('FRFEC', 'FR', 'fécamp', 1),\n array('FRFEY', 'FR', 'feyzin', 1),\n array('FRFOS', 'FR', 'fos sur mer', 1),\n array('FRG', 'US', 'Republic Arpt', 0),\n array('FRGFR', 'FR', 'granville', 1),\n array('FRGLO', 'FR', 'gonfreville l\\'orcher', 1),\n array('FRGRN', 'FR', 'gravenchon', 1),\n array('FRGRV', 'FR', 'gravelines', 1),\n array('FRGVL', 'FR', 'gennevilliers', 1),\n array('FRHET', 'FR', 'hennebont', 1),\n array('FRHRF', 'FR', 'harfleur', 1),\n array('FRHUN', 'FR', 'huninghe', 1),\n array('FRILR', 'FR', 'l\\'ile rousse', 1),\n array('FRIZO', 'FR', 'izon', 1),\n array('FRJ', 'FR', 'Frejus Arpt', 0),\n array('FRL', 'IT', 'Luigi Ridolfi Arpt', 0),\n array('FRLAI', 'FR', 'lannion', 1),\n array('FRLAO', 'FR', 'laon', 1),\n array('FRLAV', 'FR', 'lavera', 1),\n array('FRLBQ', 'FR', 'le boucau', 1),\n array('FRLCR', 'FR', 'le creusot', 1),\n array('FRLCT', 'FR', 'la ciotat', 1),\n array('FRLDN', 'FR', 'landerneau', 1),\n array('FRLEH', 'FR', 'le havre', 1),\n array('FRLEZ', 'FR', 'lézardrieux', 1),\n array('FRLFR', 'FR', 'le fret', 1),\n array('FRLGU', 'FR', 'créhen-le guildo', 1),\n array('FRLIA', 'FR', 'l\\'isle d\\'abeau', 1),\n array('FRLIB', 'FR', 'libourne', 1),\n array('FRLIO', 'FR', 'lyon', 1),\n array('FRLLE', 'FR', 'lille', 1),\n array('FRLLS', 'FR', 'lons le saunier', 1),\n array('FRLMD', 'FR', 'la mède', 1),\n array('FRLOC', 'FR', 'loctudy', 1),\n array('FRLPE', 'FR', 'la pallice', 1),\n array('FRLRH', 'FR', 'la rochelle', 1),\n array('FRLRT', 'FR', 'lorient', 1),\n array('FRLSO', 'FR', 'les sables d\\'olonne', 1),\n array('FRLTR', 'FR', 'le tréport', 1),\n array('FRM', 'US', 'Fairmont Municipal', 0),\n array('FRMAC', 'FR', 'mâcon', 1),\n array('FRMAU', 'FR', 'maubeuge', 1),\n array('FRMEA', 'FR', 'meaux', 1),\n array('FRMEL', 'FR', 'melun', 1),\n array('FRMLV', 'FR', 'marne la vallée', 1),\n array('FRMOS', 'FR', 'montargis', 1),\n array('FRMRN', 'FR', 'marans', 1),\n array('FRMSG', 'FR', 'mortagne sur gironde', 1),\n array('FRMTD', 'FR', 'montbéliard', 1),\n array('FRMTX', 'FR', 'montoir de bretagne', 1),\n array('FRMXN', 'FR', 'morlaix', 1),\n array('FRMZM', 'FR', 'metz', 1),\n array('FRNMS', 'FR', 'nemours', 1),\n array('FRNOI', 'FR', 'noirmoutier en l\\'ile', 1),\n array('FRNOU', 'FR', 'port la nouvelle', 1),\n array('FRNTE', 'FR', 'nantes', 1),\n array('FRNVS', 'FR', 'nevers', 1),\n array('FRO', 'NO', 'Flora Arpt', 0),\n array('FROTM', 'FR', 'ottmarsheim', 1),\n array('FROUI', 'FR', 'ouistreham', 1),\n array('FRPAB', 'FR', 'pont l\\'abbé', 1),\n array('FRPAI', 'FR', 'paimpol', 1),\n array('FRPAP', 'FR', 'pauillac', 1),\n array('FRPAR', 'FR', 'paris', 1),\n array('FRPBA', 'FR', 'port bail', 1),\n array('FRPBF', 'FR', 'paimboeuf', 1),\n array('FRPDB', 'FR', 'port de bouc', 1),\n array('FRPET', 'FR', 'petit couronne', 1),\n array('FRPIR', 'FR', 'piriac', 1),\n array('FRPJE', 'FR', 'port jérôme', 1),\n array('FRPOV', 'FR', 'port vendres', 1),\n array('FRPOX', 'FR', 'pontrieux', 1),\n array('FRPRC', 'FR', 'pornic', 1),\n array('FRPRJ', 'FR', 'port joinville', 1),\n array('FRPRP', 'FR', 'propriano', 1),\n array('FRPSL', 'FR', 'port st louis du rhone', 1),\n array('FRPVO', 'FR', 'porto vecchio', 1),\n array('FRQUI', 'FR', 'quiberon', 1),\n array('FRQYR', 'FR', 'troyes', 1),\n array('FRR', 'US', 'Warren County Arpt', 0),\n array('FRRAD', 'FR', 'radicatel', 1),\n array('FRRCO', 'FR', 'rochefort', 1),\n array('FRRDN', 'FR', 'redon', 1),\n array('FRREI', 'FR', 'reichstett', 1),\n array('FRRHE', 'FR', 'reims', 1),\n array('FRRON', 'FR', 'roncq', 1),\n array('FRROS', 'FR', 'roscoff', 1),\n array('FRROU', 'FR', 'roubaix', 1),\n array('FRRUN', 'FR', 'rungis', 1),\n array('FRRYN', 'FR', 'royan', 1),\n array('FRS', 'GT', 'Flores Airport', 0),\n array('FRSBK', 'FR', 'st brieuc', 1),\n array('FRSET', 'FR', 'sète', 1),\n array('FRSML', 'FR', 'st malo', 1),\n array('FRSNR', 'FR', 'st nazaire', 1),\n array('FRSOZ', 'FR', 'solenzara', 1),\n array('FRSRL', 'FR', 'st raphaël', 1),\n array('FRSTA', 'FR', 'st avold', 1),\n array('FRSTP', 'FR', 'st tropez', 1),\n array('FRSTQ', 'FR', 'st quentin', 1),\n array('FRSVS', 'FR', 'st valery sur somme', 1),\n array('FRSXB', 'FR', 'strasbourg', 1),\n array('FRTIN', 'FR', 'pantin', 1),\n array('FRTJE', 'FR', 'trouville', 1),\n array('FRTLN', 'FR', 'toulon', 1),\n array('FRTON', 'FR', 'tonnay charente', 1),\n array('FRTRE', 'FR', 'tréguier', 1),\n array('FRTVL', 'FR', 'thionville', 1),\n array('FRU', 'KG', 'Bishkek Arpt', 0),\n array('FRUIP', 'FR', 'quimper', 1),\n array('FRURO', 'FR', 'rouen', 1),\n array('FRVAL', 'FR', 'valenciennes', 1),\n array('FRVLL', 'FR', 'villefranche de rouergue', 1),\n array('FRVNE', 'FR', 'vannes', 1),\n array('FRVRD', 'FR', 'verdun', 1),\n array('FRVSS', 'FR', 'villefranche sur saone', 1),\n array('FRW', 'BW', 'Francistown Arpt', 0),\n array('FRZ', 'DE', 'Fritzlar Airbase', 0),\n array('FSC', 'FR', 'Sud Corse Arpt', 0),\n array('FSD', 'US', 'Joe Foss Field', 0),\n array('FSM', 'US', 'Ft Smith Municipal', 0),\n array('FSP', 'CA', 'St Pierre Arpt', 0),\n array('FST', 'US', 'Pecos County Arpt', 0),\n array('FTE', 'AR', 'El Calafate Arpt', 0),\n array('FTW', 'US', 'Meacham Field', 0),\n array('FTY', 'US', 'Fulton Cty Arpt', 0),\n array('FUE', 'ES', 'Fuerteventura Arpt', 0),\n array('FUJ', 'JP', 'Fukue Arpt', 0),\n array('FUK', 'JP', 'Itazuke Arpt', 0),\n array('FUL', 'US', 'Fullerton Municipal Arpt', 0),\n array('FUN', 'TV', 'Funafuti Intl Arpt', 0),\n array('FWA', 'US', 'Baer Field', 0),\n array('FWM', 'GB', 'Fort William Arpt', 0),\n array('FXE', 'US', 'Ft Lauderdale Excutive', 0),\n array('FYV', 'US', 'Fayetteville Municipal Arpt', 0),\n array('GACLZ', 'GA', 'cap lopez', 1),\n array('GAD', 'US', 'Gadsden Municipal', 0),\n array('GAEKU', 'GA', 'ekuata', 1),\n array('GAGAX', 'GA', 'gamba', 1),\n array('GAI', 'US', 'Montgomery Cty Arpt', 0),\n array('GAJ', 'JP', 'Yamagata Airport', 0),\n array('GAL', 'US', 'Galena Arpt', 0),\n array('GALBV', 'GA', 'libreville', 1),\n array('GALUC', 'GA', 'lucina', 1),\n array('GAMBY', 'GA', 'm\\'bya terminal', 1),\n array('GANYA', 'GA', 'nyanga', 1),\n array('GAOWE', 'GA', 'owendo', 1),\n array('GAPOG', 'GA', 'port gentil', 1),\n array('GAT', 'FR', 'Tallard Arpt', 0),\n array('GBABD', 'GB', 'aberdeen', 1),\n array('GBAMB', 'GB', 'amble', 1),\n array('GBAPP', 'GB', 'appledore', 1),\n array('GBARB', 'GB', 'arbroath', 1),\n array('GBARD', 'GB', 'ardrossan', 1),\n array('GBARR', 'GB', 'arrington', 1),\n array('GBASG', 'GB', 'ardrishaig', 1),\n array('GBASW', 'GB', 'ashwell', 1),\n array('GBAVL', 'GB', 'alveley', 1),\n array('GBAVO', 'GB', 'avonmouth', 1),\n array('GBAYF', 'GB', 'aycliffe', 1),\n array('GBAYR', 'GB', 'ayr', 1),\n array('GBBAB', 'GB', 'banbury', 1),\n array('GBBAD', 'GB', 'barry dock', 1),\n array('GBBAT', 'GB', 'battlesbridge', 1),\n array('GBBAW', 'GB', 'baltic wharf', 1),\n array('GBBEC', 'GB', 'beckingham', 1),\n array('GBBEL', 'GB', 'belfast', 1),\n array('GBBFB', 'GB', 'braefoot bay', 1),\n array('GBBFY', 'GB', 'briton ferry', 1),\n array('GBBGY', 'GB', 'bingley', 1),\n array('GBBHK', 'GB', 'bromborough', 1),\n array('GBBHR', 'GB', 'barrow-upon-humber', 1),\n array('GBBHW', 'GB', 'billingham', 1),\n array('GBBID', 'GB', 'bideford', 1),\n array('GBBIF', 'GB', 'barrow in furness', 1),\n array('GBBIP', 'GB', 'bishop auckland', 1),\n array('GBBKD', 'GB', 'buckden', 1),\n array('GBBKG', 'GB', 'barking', 1),\n array('GBBLB', 'GB', 'blackburn', 1),\n array('GBBLK', 'GB', 'blackpool', 1),\n array('GBBLS', 'GB', 'brightlingsea', 1),\n array('GBBLT', 'GB', 'bolton', 1),\n array('GBBLY', 'GB', 'blyth', 1),\n array('GBBMR', 'GB', 'beaumaris', 1),\n array('GBBNG', 'GB', 'bangor', 1),\n array('GBBNH', 'GB', 'barton on humber', 1),\n array('GBBNM', 'GB', 'barton', 1),\n array('GBBOC', 'GB', 'burnham on crouch', 1),\n array('GBBOE', 'GB', 'bootle', 1),\n array('GBBOL', 'GB', 'botley', 1),\n array('GBBON', 'GB', 'bo\\'ness', 1),\n array('GBBOS', 'GB', 'boston', 1),\n array('GBBOW', 'GB', 'bowling', 1),\n array('GBBRF', 'GB', 'bradford', 1),\n array('GBBRK', 'GB', 'birkenhead', 1),\n array('GBBRN', 'GB', 'burnley', 1),\n array('GBBRP', 'GB', 'bridport', 1),\n array('GBBRS', 'GB', 'bristol', 1),\n array('GBBRT', 'GB', 'bridlington', 1),\n array('GBBRW', 'GB', 'bridgwater', 1),\n array('GBBRX', 'GB', 'brixham', 1),\n array('GBBSH', 'GB', 'brighton', 1),\n array('GBBSL', 'GB', 'bosley', 1),\n array('GBBSY', 'GB', 'barnsley', 1),\n array('GBBTL', 'GB', 'burntisland', 1),\n array('GBBUC', 'GB', 'buckie', 1),\n array('GBBUH', 'GB', 'burghead', 1),\n array('GBBUS', 'GB', 'burton upon stather', 1),\n array('GBBUY', 'GB', 'bury', 1),\n array('GBBWK', 'GB', 'berwick upon tweed', 1),\n array('GBBWR', 'GB', 'burrow', 1),\n array('GBCAN', 'GB', 'canvey island', 1),\n array('GBCAX', 'GB', 'carlisle', 1),\n array('GBCBA', 'GB', 'castlebay', 1),\n array('GBCBT', 'GB', 'campbeltown', 1),\n array('GBCDF', 'GB', 'cardiff', 1),\n array('GBCEG', 'GB', 'chester', 1),\n array('GBCFG', 'GB', 'carrickfergus', 1),\n array('GBCHD', 'GB', 'charleston', 1),\n array('GBCHE', 'GB', 'mostyn', 1),\n array('GBCHF', 'GB', 'charlestown', 1),\n array('GBCHR', 'GB', 'chorley', 1),\n array('GBCHT', 'GB', 'chepstow', 1),\n array('GBCKM', 'GB', 'cockermouth', 1),\n array('GBCLF', 'GB', 'cliffe', 1),\n array('GBCLR', 'GB', 'coleraine', 1),\n array('GBCNU', 'GB', 'craignure', 1),\n array('GBCNV', 'GB', 'caernarvon', 1),\n array('GBCNZ', 'GB', 'cockenzie', 1),\n array('GBCOL', 'GB', 'colchester', 1),\n array('GBCOR', 'GB', 'corpach', 1),\n array('GBCOW', 'GB', 'cowes', 1),\n array('GBCOY', 'GB', 'coryton', 1),\n array('GBCRN', 'GB', 'cromarty', 1),\n array('GBCRT', 'GB', 'carrington', 1),\n array('GBCSN', 'GB', 'carston', 1),\n array('GBCTF', 'GB', 'castleford', 1),\n array('GBCTM', 'GB', 'chatham', 1),\n array('GBCVT', 'GB', 'coventry', 1),\n array('GBCYN', 'GB', 'cairnryan', 1),\n array('GBCYP', 'GB', 'clydeport', 1),\n array('GBD', 'US', 'Greate Bend Municipal', 0),\n array('GBDAG', 'GB', 'dagenham', 1),\n array('GBDEX', 'GB', 'deal', 1),\n array('GBDGS', 'GB', 'douglas', 1),\n array('GBDIN', 'GB', 'dingle', 1),\n array('GBDNQ', 'GB', 'dean quarry', 1),\n array('GBDRH', 'GB', 'durham', 1),\n array('GBDRL', 'GB', 'darlington', 1),\n array('GBDTE', 'GB', 'dunstable', 1),\n array('GBDTM', 'GB', 'dartmouth', 1),\n array('GBDTN', 'GB', 'dunston', 1),\n array('GBDUM', 'GB', 'dumfries', 1),\n array('GBDUN', 'GB', 'dundee', 1),\n array('GBDVP', 'GB', 'devonport', 1),\n array('GBDVR', 'GB', 'dover', 1),\n array('GBDWY', 'GB', 'dewsbury', 1),\n array('GBDXY', 'GB', 'derby', 1),\n array('GBE', 'BW', 'Gaborone Arpt', 0),\n array('GBEAM', 'GB', 'eastham', 1),\n array('GBECS', 'GB', 'eccles', 1),\n array('GBEDI', 'GB', 'edinburgh', 1),\n array('GBELL', 'GB', 'ellesmere port', 1),\n array('GBESW', 'GB', 'east wellow', 1),\n array('GBEXE', 'GB', 'exeter', 1),\n array('GBEXM', 'GB', 'exmouth', 1),\n array('GBFAL', 'GB', 'falmouth', 1),\n array('GBFAS', 'GB', 'faslane', 1),\n array('GBFAV', 'GB', 'faversham', 1),\n array('GBFAW', 'GB', 'fawley', 1),\n array('GBFDK', 'GB', 'fosdyke', 1),\n array('GBFIS', 'GB', 'fishguard', 1),\n array('GBFLE', 'GB', 'fleetwood', 1),\n array('GBFLH', 'GB', 'flotta', 1),\n array('GBFLW', 'GB', 'flixborough', 1),\n array('GBFNT', 'GB', 'finnart', 1),\n array('GBFOL', 'GB', 'folkestone', 1),\n array('GBFOR', 'GB', 'forth', 1),\n array('GBFOW', 'GB', 'frisby on the wreake', 1),\n array('GBFOY', 'GB', 'fowey', 1),\n array('GBFRB', 'GB', 'fraserburgh', 1),\n array('GBFRD', 'GB', 'ferndale', 1),\n array('GBFRH', 'GB', 'fingringhoe', 1),\n array('GBFXT', 'GB', 'felixstowe', 1),\n array('GBG', 'US', 'Galesburg Arpt', 0),\n array('GBGAI', 'GB', 'gainsborough', 1),\n array('GBGAT', 'GB', 'gateshead', 1),\n array('GBGAW', 'GB', 'gaerwen', 1),\n array('GBGCI', 'GB', 'guernsey', 1),\n array('GBGIR', 'GB', 'girvan', 1),\n array('GBGIS', 'GB', 'garieston', 1),\n array('GBGLD', 'GB', 'glasson dock', 1),\n array('GBGLO', 'GB', 'gloucester', 1),\n array('GBGLW', 'GB', 'glasgow', 1),\n array('GBGOO', 'GB', 'goole', 1),\n array('GBGOS', 'GB', 'gosport', 1),\n array('GBGRG', 'GB', 'grangemouth', 1),\n array('GBGRH', 'GB', 'great harwood', 1),\n array('GBGRK', 'GB', 'greenock', 1),\n array('GBGRN', 'GB', 'granton', 1),\n array('GBGRW', 'GB', 'grove wharves', 1),\n array('GBGSA', 'GB', 'glensanda', 1),\n array('GBGSY', 'GB', 'grimsby', 1),\n array('GBGTN', 'GB', 'garston', 1),\n array('GBGTY', 'GB', 'great yarmouth', 1),\n array('GBGUR', 'GB', 'gourock', 1),\n array('GBGUW', 'GB', 'gunness wharf', 1),\n array('GBGVS', 'GB', 'gravesend', 1),\n array('GBGYS', 'GB', 'grays', 1),\n array('GBHAM', 'GB', 'hamble', 1),\n array('GBHAY', 'GB', 'hayle', 1),\n array('GBHDD', 'GB', 'howdendyke', 1),\n array('GBHDF', 'GB', 'huddersfield', 1),\n array('GBHDN', 'GB', 'haslingden', 1),\n array('GBHEB', 'GB', 'hebburn', 1),\n array('GBHHN', 'GB', 'holehaven', 1),\n array('GBHLY', 'GB', 'holyhead', 1),\n array('GBHNT', 'GB', 'hunstanton', 1),\n array('GBHNU', 'GB', 'hainault', 1),\n array('GBHPT', 'GB', 'hound point', 1),\n array('GBHRF', 'GB', 'harefield', 1),\n array('GBHRL', 'GB', 'harlow', 1),\n array('GBHRW', 'GB', 'harwich', 1),\n array('GBHST', 'GB', 'hunterston', 1),\n array('GBHTG', 'GB', 'hastings', 1),\n array('GBHTP', 'GB', 'hartlepool', 1),\n array('GBHTT', 'GB', 'hetton', 1),\n array('GBHUL', 'GB', 'hull', 1),\n array('GBHYM', 'GB', 'heysham', 1),\n array('GBIMM', 'GB', 'immingham', 1),\n array('GBINK', 'GB', 'inverkeithing', 1),\n array('GBINV', 'GB', 'inverness', 1),\n array('GBIOG', 'GB', 'isle of grain', 1),\n array('GBIOM', 'GB', 'isle of man', 1),\n array('GBIPS', 'GB', 'ipswich', 1),\n array('GBIRV', 'GB', 'irvine', 1),\n array('GBITC', 'GB', 'itchenor', 1),\n array('GBIVG', 'GB', 'invergordon', 1),\n array('GBIYP', 'GB', 'islay', 1),\n array('GBJAR', 'GB', 'jarrow', 1),\n array('GBJER', 'GB', 'jersey', 1),\n array('GBK', 'SL', 'Gbangbatok Arpt', 0),\n array('GBKCG', 'GB', 'kennacraig', 1),\n array('GBKEA', 'GB', 'keadby', 1),\n array('GBKEI', 'GB', 'keighley', 1),\n array('GBKGH', 'GB', 'killingholme', 1),\n array('GBKIH', 'GB', 'kirkham', 1),\n array('GBKKD', 'GB', 'kirkcaldy', 1),\n array('GBKKL', 'GB', 'kirkby lonsdale', 1),\n array('GBKLN', 'GB', 'king\\'s lynn', 1),\n array('GBKLR', 'GB', 'kilroot', 1),\n array('GBKNK', 'GB', 'kingsnorth', 1),\n array('GBKOA', 'GB', 'kilchoan', 1),\n array('GBKSF', 'GB', 'knutsford', 1),\n array('GBKWL', 'GB', 'kirkwall', 1),\n array('GBLAH', 'GB', 'lamlash', 1),\n array('GBLAN', 'GB', 'lancaster', 1),\n array('GBLAR', 'GB', 'larne', 1),\n array('GBLAX', 'GB', 'laxo', 1),\n array('GBLCN', 'GB', 'lincoln', 1),\n array('GBLCS', 'GB', 'leicester', 1),\n array('GBLDY', 'GB', 'londonderry', 1),\n array('GBLEA', 'GB', 'long eaton', 1),\n array('GBLEI', 'GB', 'leith', 1),\n array('GBLEQ', 'GB', 'lands end', 1),\n array('GBLER', 'GB', 'lerwick', 1),\n array('GBLGS', 'GB', 'largs', 1),\n array('GBLHE', 'GB', 'loch ewe', 1),\n array('GBLHP', 'GB', 'longhope', 1),\n array('GBLHS', 'GB', 'loch striven', 1),\n array('GBLIT', 'GB', 'littlehampton', 1),\n array('GBLIV', 'GB', 'liverpool', 1),\n array('GBLLD', 'GB', 'llanddulas', 1),\n array('GBLLN', 'GB', 'llanelli', 1),\n array('GBLMA', 'GB', 'lochmaddy', 1),\n array('GBLOL', 'GB', 'lochaline', 1),\n array('GBLON', 'GB', 'london', 1),\n array('GBLOS', 'GB', 'leigh-on-sea', 1),\n array('GBLOU', 'GB', 'loughborough', 1),\n array('GBLOW', 'GB', 'lowestoft', 1),\n array('GBLSS', 'GB', 'lossiemouth', 1),\n array('GBLTL', 'GB', 'littlebrook', 1),\n array('GBLYL', 'GB', 'leyland', 1),\n array('GBLYM', 'GB', 'lymington', 1),\n array('GBLYS', 'GB', 'lyness', 1),\n array('GBMAL', 'GB', 'maldon', 1),\n array('GBMCD', 'GB', 'macduff', 1),\n array('GBMCL', 'GB', 'macclesfield', 1),\n array('GBMDW', 'GB', 'middlewich', 1),\n array('GBMEB', 'GB', 'menai bridge', 1),\n array('GBMGT', 'GB', 'margate', 1),\n array('GBMID', 'GB', 'middlesborough', 1),\n array('GBMIS', 'GB', 'mistley', 1),\n array('GBMLF', 'GB', 'milford haven', 1),\n array('GBMLG', 'GB', 'mallaig', 1),\n array('GBMLM', 'GB', 'millom', 1),\n array('GBMNC', 'GB', 'manchester', 1),\n array('GBMON', 'GB', 'montrose', 1),\n array('GBMTH', 'GB', 'methil', 1),\n array('GBN', 'IT', 'San Giovanni Rotondo Arpt', 0),\n array('GBNBU', 'GB', 'newburgh', 1),\n array('GBNCL', 'GB', 'newcastle upon tyne', 1),\n array('GBNDY', 'GB', 'sanday', 1),\n array('GBNEA', 'GB', 'neath abbey', 1),\n array('GBNEH', 'GB', 'neap house', 1),\n array('GBNFT', 'GB', 'northfleet', 1),\n array('GBNHO', 'GB', 'new holland', 1),\n array('GBNHV', 'GB', 'newhaven', 1),\n array('GBNLN', 'GB', 'nelson', 1),\n array('GBNPT', 'GB', 'newport', 1),\n array('GBNRF', 'GB', 'north ferriby', 1),\n array('GBNRM', 'GB', 'north walsam', 1),\n array('GBNRW', 'GB', 'norwich', 1),\n array('GBNRY', 'GB', 'newry', 1),\n array('GBNSH', 'GB', 'north shields', 1),\n array('GBNTG', 'GB', 'nottingham', 1),\n array('GBNTH', 'GB', 'northwich', 1),\n array('GBNTW', 'GB', 'nantwich', 1),\n array('GBNWK', 'GB', 'newark', 1),\n array('GBNWP', 'GB', 'newport pagnell', 1),\n array('GBNYL', 'GB', 'newlyn', 1),\n array('GBOAK', 'GB', 'oakhamness', 1),\n array('GBOBA', 'GB', 'oban', 1),\n array('GBODH', 'GB', 'oldham', 1),\n array('GBOKK', 'GB', 'old kilpatrick', 1),\n array('GBPAD', 'GB', 'padstow', 1),\n array('GBPAK', 'GB', 'port askaig', 1),\n array('GBPAL', 'GB', 'palnackie', 1),\n array('GBPAR', 'GB', 'par', 1),\n array('GBPDI', 'GB', 'port dinorwic', 1),\n array('GBPED', 'GB', 'pembroke dock', 1),\n array('GBPEL', 'GB', 'peel', 1),\n array('GBPEM', 'GB', 'pembroke', 1),\n array('GBPEN', 'GB', 'penzance', 1),\n array('GBPER', 'GB', 'perth', 1),\n array('GBPFT', 'GB', 'purfleet', 1),\n array('GBPHD', 'GB', 'peterhead', 1),\n array('GBPKL', 'GB', 'pocklington', 1),\n array('GBPLN', 'GB', 'port ellen', 1),\n array('GBPLY', 'GB', 'plymouth', 1),\n array('GBPMD', 'GB', 'portmadoc', 1),\n array('GBPME', 'GB', 'portsmouth', 1),\n array('GBPMM', 'GB', 'penmaenmawr', 1),\n array('GBPOO', 'GB', 'poole', 1),\n array('GBPPE', 'GB', 'port penrhyn', 1),\n array('GBPRE', 'GB', 'preston', 1),\n array('GBPRT', 'GB', 'portree', 1),\n array('GBPRU', 'GB', 'portbury', 1),\n array('GBPRY', 'GB', 'penryn', 1),\n array('GBPSB', 'GB', 'port sutton bridge', 1),\n array('GBPST', 'GB', 'parkeston quay', 1),\n array('GBPSU', 'GB', 'port sunlight', 1),\n array('GBPTA', 'GB', 'point of ayre', 1),\n array('GBPTB', 'GB', 'port talbot', 1),\n array('GBPTH', 'GB', 'portishead', 1),\n array('GBPTL', 'GB', 'portland', 1),\n array('GBPTR', 'GB', 'portrush', 1),\n array('GBPTS', 'GB', 'portslade', 1),\n array('GBPTT', 'GB', 'partington', 1),\n array('GBQUB', 'GB', 'queenborough', 1),\n array('GBRAY', 'GB', 'rothesay', 1),\n array('GBRCS', 'GB', 'rochester', 1),\n array('GBRDN', 'GB', 'reading', 1),\n array('GBREB', 'GB', 'redcliff bay', 1),\n array('GBRER', 'GB', 'redcar', 1),\n array('GBRFD', 'GB', 'rochford', 1),\n array('GBRHY', 'GB', 'rhyl', 1),\n array('GBRID', 'GB', 'ridham dock', 1),\n array('GBRMB', 'GB', 'ramsbottom', 1),\n array('GBRMG', 'GB', 'ramsgate', 1),\n array('GBROW', 'GB', 'rowhedge', 1),\n array('GBROY', 'GB', 'rosyth', 1),\n array('GBRSY', 'GB', 'ramsey', 1),\n array('GBRTH', 'GB', 'rotherham', 1),\n array('GBRUN', 'GB', 'runcorn', 1),\n array('GBRYE', 'GB', 'rye', 1),\n array('GBSCA', 'GB', 'scarborough', 1),\n array('GBSCP', 'GB', 'scunthorpe', 1),\n array('GBSCR', 'GB', 'scrabster', 1),\n array('GBSCT', 'GB', 'stockton', 1),\n array('GBSEA', 'GB', 'seaham', 1),\n array('GBSED', 'GB', 'salt end', 1),\n array('GBSEF', 'GB', 'seaforth', 1),\n array('GBSFW', 'GB', 'scapa flow', 1),\n array('GBSFY', 'GB', 'salford', 1),\n array('GBSHE', 'GB', 'sheffield', 1),\n array('GBSHO', 'GB', 'shoreham', 1),\n array('GBSHS', 'GB', 'sheerness', 1),\n array('GBSHT', 'GB', 'shotton', 1),\n array('GBSHV', 'GB', 'shell haven', 1),\n array('GBSHY', 'GB', 'st helens', 1),\n array('GBSIL', 'GB', 'silloth', 1),\n array('GBSMW', 'GB', 'simonswood', 1),\n array('GBSND', 'GB', 'southend', 1),\n array('GBSNS', 'GB', 'stromness', 1),\n array('GBSOT', 'GB', 'stoke on trent', 1),\n array('GBSOU', 'GB', 'southampton', 1),\n array('GBSOW', 'GB', 'stanlow', 1),\n array('GBSPT', 'GB', 'st peter port', 1),\n array('GBSSH', 'GB', 'south shields', 1),\n array('GBSSS', 'GB', 'sharpness', 1),\n array('GBSTH', 'GB', 'st helier', 1),\n array('GBSTO', 'GB', 'stornoway', 1),\n array('GBSTR', 'GB', 'stranraer', 1),\n array('GBSUL', 'GB', 'sullom voe', 1),\n array('GBSUN', 'GB', 'sunderland', 1),\n array('GBSVT', 'GB', 'silvertown', 1),\n array('GBSWA', 'GB', 'swansea', 1),\n array('GBSWD', 'GB', 'southwold', 1),\n array('GBSWN', 'GB', 'swinton', 1),\n array('GBSWY', 'GB', 'scalloway', 1),\n array('GBSYM', 'GB', 'symbister', 1),\n array('GBTAB', 'GB', 'tarbert', 1),\n array('GBTAY', 'GB', 'tayport', 1),\n array('GBTEE', 'GB', 'teesport', 1),\n array('GBTHM', 'GB', 'topsham', 1),\n array('GBTHP', 'GB', 'thamesport', 1),\n array('GBTHS', 'GB', 'thames haven', 1),\n array('GBTIL', 'GB', 'tilbury', 1),\n array('GBTNM', 'GB', 'teignmouth', 1),\n array('GBTOB', 'GB', 'tobermory', 1),\n array('GBTOL', 'GB', 'tollesbury', 1),\n array('GBTOR', 'GB', 'torquay', 1),\n array('GBTRA', 'GB', 'tranmere', 1),\n array('GBTRU', 'GB', 'truro', 1),\n array('GBTSO', 'GB', 'tresco', 1),\n array('GBTTL', 'GB', 'tetney terminal', 1),\n array('GBTWL', 'GB', 'tingwall', 1),\n array('GBTYM', 'GB', 'tynemouth', 1),\n array('GBTYN', 'GB', 'tyne', 1),\n array('GBUIG', 'GB', 'uig', 1),\n array('GBULL', 'GB', 'ullapool', 1),\n array('GBWAF', 'GB', 'watford', 1),\n array('GBWAT', 'GB', 'watchet', 1),\n array('GBWBY', 'GB', 'wembley', 1),\n array('GBWDN', 'GB', 'widnes', 1),\n array('GBWEY', 'GB', 'weymouth', 1),\n array('GBWFD', 'GB', 'wakefield', 1),\n array('GBWGN', 'GB', 'wigan', 1),\n array('GBWHB', 'GB', 'whitebooth roads', 1),\n array('GBWHL', 'GB', 'west hartlepool', 1),\n array('GBWHV', 'GB', 'whitehaven', 1),\n array('GBWIC', 'GB', 'wick', 1),\n array('GBWIG', 'GB', 'wigtown', 1),\n array('GBWIS', 'GB', 'wisbech', 1),\n array('GBWIV', 'GB', 'wivenhoe', 1),\n array('GBWLA', 'GB', 'wallasea', 1),\n array('GBWLS', 'GB', 'wells', 1),\n array('GBWMB', 'GB', 'wemyss bay', 1),\n array('GBWOL', 'GB', 'north woolwich', 1),\n array('GBWOR', 'GB', 'workington', 1),\n array('GBWPT', 'GB', 'warrenpoint', 1),\n array('GBWRN', 'GB', 'warrington', 1),\n array('GBWRY', 'GB', 'westray', 1),\n array('GBWSM', 'GB', 'weston-super-mare', 1),\n array('GBWTB', 'GB', 'whitby', 1),\n array('GBWTS', 'GB', 'whitstable', 1),\n array('GBYLL', 'GB', 'yelland', 1),\n array('GBYRK', 'GB', 'york', 1),\n array('GBYVZ', 'GB', 'stonehouse', 1),\n array('GBZ', 'NZ', 'Great Barrier Island Arpt', 0),\n array('GCC', 'US', 'Campbell Cty Arpt', 0),\n array('GCI', 'GB', 'Guernsey Arpt', 0),\n array('GCJ', 'ZA', 'Grand Central Arpt', 0),\n array('GCK', 'US', 'Garden City Municipal', 0),\n array('GCM', 'KY', 'Owen Roberts Arpt', 0),\n array('GCN', 'US', 'Grand Canyon Natl Park Arpt', 0),\n array('GCV', 'BR', 'Gravatai Arpt', 0),\n array('GCY', 'US', 'Municipal Greenville', 0),\n array('GDGRE', 'GD', 'grenville', 1),\n array('GDHIL', 'GD', 'hillsborough carriacou is', 1),\n array('GDL', 'MX', 'Miguel Hidalgo Arpt', 0),\n array('GDN', 'PL', 'Rebiechowo', 0),\n array('GDSTG', 'GD', 'saint george\\'s', 1),\n array('GDT', 'TC', 'Grand Turk Is Arpt', 0),\n array('GDX', 'RU', 'Magadan Arpt', 0),\n array('GEA', 'NC', 'Magenta Arpt', 0),\n array('GEBUS', 'GE', 'batumi', 1),\n array('GED', 'US', 'Sussex County Arpt', 0),\n array('GEG', 'US', 'Spokane Intl Arpt', 0),\n array('GEO', 'GY', 'Cheddi Jagan Intl', 0),\n array('GEPTI', 'GE', 'poti', 1),\n array('GER', 'CU', 'Rafael Cabrera Arpt', 0),\n array('GET', 'AU', 'Geraldton Arpt', 0),\n array('GEV', 'SE', 'Gallivare Arpt', 0),\n array('GEX', 'AU', 'Geelong Arpt', 0),\n array('GFCAY', 'GF', 'cayenne', 1),\n array('GFD', 'US', 'Pope Field Arpt', 0),\n array('GFDDC', 'GF', 'degrad des cannes', 1),\n array('GFF', 'AU', 'Griffith Arpt', 0),\n array('GFK', 'US', 'Grand Forks Mark Andrews Intl', 0),\n array('GFL', 'US', 'Warren County', 0),\n array('GFN', 'AU', 'Grafton Arpt', 0),\n array('GFQKR', 'GF', 'kourou', 1),\n array('GGE', 'US', 'George Town Arpt', 0),\n array('GGG', 'US', 'Greg County Arpt', 0),\n array('GGT', 'BS', 'George Town Airport', 0),\n array('GGW', 'US', 'International Glasgow', 0),\n array('GHA', 'DZ', 'Noumerate Arpt', 0),\n array('GHADA', 'GH', 'ada', 1),\n array('GHAUR', 'GH', 'aura', 1),\n array('GHAXI', 'GH', 'axim', 1),\n array('GHB', 'BS', 'Governors Harbour Municipal Arpt', 0),\n array('GHCCT', 'GH', 'cape coast', 1),\n array('GHKIT', 'GH', 'keta', 1),\n array('GHSEK', 'GH', 'sekondi', 1),\n array('GHSHA', 'GH', 'shama', 1),\n array('GHSPD', 'GH', 'saltpond', 1),\n array('GHTEM', 'GH', 'tema', 1),\n array('GHTKD', 'GH', 'takoradi', 1),\n array('GHWEA', 'GH', 'winneba', 1),\n array('GIB', 'GI', 'North Front Arpt', 0),\n array('GIF', 'US', 'Gilbert Fld', 0),\n array('GIG', 'BR', 'Rio Internacional', 0),\n array('GIGIB', 'GI', 'gibraltar', 1),\n array('GIL', 'PK', 'Gilgit Arpt', 0),\n array('GIS', 'NZ', 'Gisborne Arpt', 0),\n array('GIZ', 'SA', 'Gizan Aprt', 0),\n array('GJT', 'US', 'Walker Field Arpt', 0),\n array('GKA', 'PG', 'Goroka Arpt', 0),\n array('GKT', 'US', 'Gatlinburg Arpt', 0),\n array('GLA', 'GB', 'Glasgow Intl', 0),\n array('GLAGM', 'GL', 'angmagssalik', 1),\n array('GLD', 'US', 'Goodland Municipal', 0),\n array('GLDAN', 'GL', 'daneborg', 1),\n array('GLE', 'US', 'Gainesville Municipal Arpt', 0),\n array('GLFHN', 'GL', 'kangerdluarssoruseg (faeringeh', 1),\n array('GLGOH', 'GL', 'nuuk (godthaab)', 1),\n array('GLH', 'US', 'Greenville Municipal', 0),\n array('GLI', 'AU', 'Glen Innes Arpt', 0),\n array('GLIUT', 'GL', 'ivigtut', 1),\n array('GLJAV', 'GL', 'ilulissat (jakobshavn)', 1),\n array('GLJCH', 'GL', 'qasigiannguit (christianshaab)', 1),\n array('GLJEG', 'GL', 'aasiaat (egedesminde)', 1),\n array('GLJFR', 'GL', 'paamiut (fredrikshaab)', 1),\n array('GLJGO', 'GL', 'qeqertarsuaq (godhavn)', 1),\n array('GLJGR', 'GL', 'kangilinguit (gronnedal)', 1),\n array('GLJHS', 'GL', 'sisimiut (holsteinsborg)', 1),\n array('GLJJU', 'GL', 'qaqortoq (julianehaab)', 1),\n array('GLJNN', 'GL', 'nanortalik', 1),\n array('GLJSU', 'GL', 'maniitsoq (sukkertoppen)', 1),\n array('GLKUS', 'GL', 'kulusuk is', 1),\n array('GLL', 'NO', 'Klanten Arpt', 0),\n array('GLMRG', 'GL', 'mesters vig', 1),\n array('GLNAQ', 'GL', 'qaanaaq', 1),\n array('GLO', 'GB', 'Staverton Arpt', 0),\n array('GLOBY', 'GL', 'illorqortoormiut (scoresbysund', 1),\n array('GLR', 'US', 'Otsego Arpt', 0),\n array('GLS', 'US', 'Scholes Field', 0),\n array('GLT', 'AU', 'Gladstone Airport', 0),\n array('GLTHU', 'GL', 'pituffik', 1),\n array('GLTOV', 'GL', 'tovkusoak', 1),\n array('GLUAK', 'GL', 'narsarsuaq', 1),\n array('GLUMD', 'GL', 'uummannaq', 1),\n array('GMBJL', 'GM', 'banjul', 1),\n array('GME', 'BY', 'Gomel Arpt', 0),\n array('GMP', 'KR', 'Gimpo Intl Arpt', 0),\n array('GMU', 'US', 'Greenville Downtown Arpt', 0),\n array('GMZ', 'ES', 'La Gomera Arpt', 0),\n array('GNA', 'BY', 'Grodna Arpt', 0),\n array('GNB', 'FR', 'Saint Geoirs Arpt', 0),\n array('GNBTY', 'GN', 'benty', 1),\n array('GNCKY', 'GN', 'conakry', 1),\n array('GND', 'DM', 'Port Saline Intl', 0),\n array('GNKMR', 'GN', 'port kamsar', 1),\n array('GNS', 'ID', 'Gunungsitoli Arpt', 0),\n array('GNV', 'US', 'Gainesville Regional', 0),\n array('GOA', 'IT', 'Christoforo Colombo', 0),\n array('GOH', 'GL', 'Nuuk Arpt', 0),\n array('GOI', 'IN', 'Dabolim Arpt', 0),\n array('GOJ', 'RU', 'Nizhniy Novgorod Arpt', 0),\n array('GON', 'US', 'Groton New London Arpt', 0),\n array('GOO', 'AU', 'Goondiwindi Arpt', 0),\n array('GOT', 'SE', 'Landvetter Arpt', 0),\n array('GOV', 'AU', 'Nhulunbuy Arpt', 0),\n array('GPA', 'GR', 'Araxos Arpt', 0),\n array('GPBBR', 'GP', 'basse terre', 1),\n array('GPGRB', 'GP', 'grand bourg', 1),\n array('GPGUS', 'GP', 'gustavia', 1),\n array('GPPTP', 'GP', 'pointe-à-pitre', 1),\n array('GPS', 'EC', 'Baltra Arpt', 0),\n array('GPSBH', 'GP', 'st barthelemy', 1),\n array('GPT', 'US', 'Biloxi Regional Arpt', 0),\n array('GPZ', 'US', 'Itasca County', 0),\n array('GQBSG', 'GQ', 'bata', 1),\n array('GQBUL', 'GQ', 'butuku-luba', 1),\n array('GQCOG', 'GQ', 'cogo', 1),\n array('GQLUB', 'GQ', 'luba', 1),\n array('GQQ', 'US', 'Galion Municipal Arpt', 0),\n array('GRACL', 'GR', 'achladi', 1),\n array('GRAGM', 'GR', 'agia marina', 1),\n array('GRALO', 'GR', 'alonissos', 1),\n array('GRAMF', 'GR', 'amfiloxia', 1),\n array('GRATH', 'GR', 'athinai', 1),\n array('GRATK', 'GR', 'antikyra', 1),\n array('GRB', 'US', 'Austin Straubel Fld', 0),\n array('GRCFU', 'GR', 'kerkyra (corfu)', 1),\n array('GRCRG', 'GR', 'corinth', 1),\n array('GRDOS', 'GR', 'delos', 1),\n array('GRDPA', 'GR', 'drapetzona', 1),\n array('GREEU', 'GR', 'eleusis', 1),\n array('GREPI', 'GR', 'epidauro', 1),\n array('GRERM', 'GR', 'ermioni', 1),\n array('GRGAV', 'GR', 'gavrion', 1),\n array('GRGPA', 'GR', 'patras', 1),\n array('GRGYT', 'GR', 'gythion', 1),\n array('GRHER', 'GR', 'heraklion (iraklion)', 1),\n array('GRHYD', 'GR', 'hydra (idhra)', 1),\n array('GRI', 'US', 'Hall Cty Regional', 0),\n array('GRIGO', 'GR', 'igoumenitsa', 1),\n array('GRIOA', 'GR', 'ioannina', 1),\n array('GRITA', 'GR', 'itea', 1),\n array('GRITH', 'GR', 'ithaki (ithaca)', 1),\n array('GRITM', 'GR', 'isthmia', 1),\n array('GRJ', 'ZA', 'George Arpt', 0),\n array('GRJKH', 'GR', 'chios', 1),\n array('GRJMK', 'GR', 'mikonos', 1),\n array('GRJNX', 'GR', 'naxos', 1),\n array('GRJSH', 'GR', 'sitia', 1),\n array('GRJSI', 'GR', 'skiathos', 1),\n array('GRJSY', 'GR', 'syra (syros)', 1),\n array('GRJTR', 'GR', 'thira', 1),\n array('GRJTY', 'GR', 'astypalea', 1),\n array('GRKAB', 'GR', 'kabalia', 1),\n array('GRKAK', 'GR', 'katakolon', 1),\n array('GRKAR', 'GR', 'karlovassi', 1),\n array('GRKAT', 'GR', 'katohi (katokhi)', 1),\n array('GRKEA', 'GR', 'kea island', 1),\n array('GRKER', 'GR', 'keramoti', 1),\n array('GRKGS', 'GR', 'kos', 1),\n array('GRKIM', 'GR', 'kymi (kimi)', 1),\n array('GRKIT', 'GR', 'kithira', 1),\n array('GRKLL', 'GR', 'kalilimenes', 1),\n array('GRKLM', 'GR', 'kalamaki', 1),\n array('GRKLX', 'GR', 'kalamata', 1),\n array('GRKLY', 'GR', 'kalyvia', 1),\n array('GRKMI', 'GR', 'kalimnos island', 1),\n array('GRKMS', 'GR', 'kimolos', 1),\n array('GRKSJ', 'GR', 'kassos', 1),\n array('GRKST', 'GR', 'karystos', 1),\n array('GRKVA', 'GR', 'kavala', 1),\n array('GRKYL', 'GR', 'kylini', 1),\n array('GRKYM', 'GR', 'kymassi', 1),\n array('GRKYT', 'GR', 'kythnos', 1),\n array('GRKZI', 'GR', 'kozani', 1),\n array('GRLAV', 'GR', 'laurium (lavrion)', 1),\n array('GRLEV', 'GR', 'levkas', 1),\n array('GRLII', 'GR', 'limni', 1),\n array('GRLIX', 'GR', 'lixuri', 1),\n array('GRLRA', 'GR', 'larisa', 1),\n array('GRLRM', 'GR', 'larmes', 1),\n array('GRLRS', 'GR', 'leros', 1),\n array('GRLRY', 'GR', 'larymna', 1),\n array('GRMAL', 'GR', 'malaoi', 1),\n array('GRMEG', 'GR', 'megalivadi', 1),\n array('GRMEL', 'GR', 'messolongion', 1),\n array('GRMES', 'GR', 'messogia', 1),\n array('GRMET', 'GR', 'methoni', 1),\n array('GRMGR', 'GR', 'megara', 1),\n array('GRMIS', 'GR', 'missimi', 1),\n array('GRMJT', 'GR', 'mytilene', 1),\n array('GRMLO', 'GR', 'milos', 1),\n array('GRMON', 'GR', 'monemvassia', 1),\n array('GRMOU', 'GR', 'moutsonna', 1),\n array('GRNAF', 'GR', 'nafplion', 1),\n array('GRNEA', 'GR', 'neapolis', 1),\n array('GRNIS', 'GR', 'nissyros', 1),\n array('GRNKV', 'GR', 'nea karvali', 1),\n array('GRNMA', 'GR', 'nea moudania', 1),\n array('GRNPK', 'GR', 'navpaktos', 1),\n array('GRNPL', 'GR', 'nauplia', 1),\n array('GRNPY', 'GR', 'nea playa', 1),\n array('GRO', 'ES', 'Costa Brava Arpt', 0),\n array('GRORO', 'GR', 'oropos', 1),\n array('GRPAN', 'GR', 'panoi', 1),\n array('GRPAR', 'GR', 'parga', 1),\n array('GRPAS', 'GR', 'paros', 1),\n array('GRPER', 'GR', 'perama', 1),\n array('GRPIL', 'GR', 'pilos', 1),\n array('GRPIR', 'GR', 'piraeus', 1),\n array('GRPLI', 'GR', 'pyli', 1),\n array('GRPMS', 'GR', 'patmos', 1),\n array('GRPTL', 'GR', 'porto lagos', 1),\n array('GRPVK', 'GR', 'preveza/lefkas', 1),\n array('GRPYL', 'GR', 'pylos', 1),\n array('GRPYR', 'GR', 'pyrgos', 1),\n array('GRPYT', 'GR', 'pythagario', 1),\n array('GRQ', 'NL', 'Eelde Arpt', 0),\n array('GRR', 'US', 'Kent County Intl', 0),\n array('GRRAF', 'GR', 'rafina', 1),\n array('GRRET', 'GR', 'rethymnon', 1),\n array('GRRHO', 'GR', 'rhodes', 1),\n array('GRS', 'IT', 'Baccarini Arpt', 0),\n array('GRSAL', 'GR', 'salamis', 1),\n array('GRSAM', 'GR', 'samothraki', 1),\n array('GRSER', 'GR', 'seriphos island', 1),\n array('GRSGB', 'GR', 'st george', 1),\n array('GRSIF', 'GR', 'sifnos', 1),\n array('GRSIK', 'GR', 'sikionia', 1),\n array('GRSKA', 'GR', 'skaramanga', 1),\n array('GRSKG', 'GR', 'thessaloniki', 1),\n array('GRSKO', 'GR', 'skopelos', 1),\n array('GRSKU', 'GR', 'skiros', 1),\n array('GRSMI', 'GR', 'samos', 1),\n array('GRSTI', 'GR', 'stratoni', 1),\n array('GRSUD', 'GR', 'suda bay', 1),\n array('GRSYM', 'GR', 'symi', 1),\n array('GRSYS', 'GR', 'stylis', 1),\n array('GRTIN', 'GR', 'tinos', 1),\n array('GRTSO', 'GR', 'thasos', 1),\n array('GRU', 'BR', 'Guarulhos Arpt', 0),\n array('GRVOL', 'GR', 'volos', 1),\n array('GRVTH', 'GR', 'port vathy', 1),\n array('GRW', 'PT', 'Graciosa Arpt', 0),\n array('GRX', 'ES', 'Granada Arpt', 0),\n array('GRYER', 'GR', 'yerakini', 1),\n array('GRYLI', 'GR', 'yali island', 1),\n array('GRZ', 'AT', 'Thalerhof Arpt', 0),\n array('GRZAN', 'GR', 'zante', 1),\n array('GRZTH', 'GR', 'zakinthos is', 1),\n array('GSB', 'US', 'Seymour Johnson AFB', 0),\n array('GSE', 'SE', 'Saeve Arpt', 0),\n array('GSLEH', 'GS', 'leith harbour', 1),\n array('GSO', 'US', 'Piedmont Triad Intl', 0),\n array('GSP', 'US', 'Greenville Spartanburg Arpt', 0),\n array('GST', 'US', 'Gustavus Arpt', 0),\n array('GSY', 'GB', 'Binbrook Arpt', 0),\n array('GTF', 'US', 'Great Falls Intl Arpt', 0),\n array('GTI', 'DE', 'Guettin Arpt', 0),\n array('GTLAE', 'GT', 'puerto iztapa', 1),\n array('GTLIV', 'GT', 'livingston', 1),\n array('GTPBR', 'GT', 'puerto barrios', 1),\n array('GTPRQ', 'GT', 'puerto quetzal', 1),\n array('GTR', 'US', 'Golden Arpt', 0),\n array('GTSTC', 'GT', 'STO.TOMAS DE CASTILLA', 1),\n array('GTY', 'US', 'Gettysburg Arpt', 0),\n array('GUA', 'GT', 'Guatemala', 0),\n array('GUAPR', 'GU', 'apra (agana)', 1),\n array('GUC', 'US', 'Gunnison Cty', 0),\n array('GUF', 'US', 'Edwards Arpt', 0),\n array('GUGUM', 'GU', 'guam', 1),\n array('GUH', 'AU', 'Gunnedah Airport', 0),\n array('GUM', 'GU', 'Antonio B Won Pat Intl', 0),\n array('GUP', 'US', 'Gallup Municipal', 0),\n array('GUR', 'PG', 'Gurney Arpt', 0),\n array('GUT', 'DE', 'Guetersloh Arpt', 0),\n array('GVA', 'CH', 'Geneve Cointrin', 0),\n array('GVR', 'BR', 'Governador Valadares Arpt', 0),\n array('GVX', 'SE', 'Sandviken Arpt', 0),\n array('GWBOL', 'GW', 'bolama', 1),\n array('GWCAC', 'GW', 'cacheu', 1),\n array('GWE', 'ZW', 'Gweru Airport', 0),\n array('GWO', 'US', 'Leflore Arpt', 0),\n array('GWOXB', 'GW', 'bissau', 1),\n array('GWS', 'US', 'Glenwood Springs Arpt', 0),\n array('GWT', 'DE', 'Westerland Airport', 0),\n array('GWY', 'IE', 'Carnmore Arpt', 0),\n array('GXQ', 'CL', 'Teniente Vidal Arpt', 0),\n array('GYE', 'EC', 'Simon Bolivar Airport', 0),\n array('GYGEO', 'GY', 'georgetown', 1),\n array('GYGFO', 'GY', 'bartica', 1),\n array('GYM', 'MX', 'Gen Jose M Yanez Arpt', 0),\n array('GYN', 'BR', 'Santa Genoveva', 0),\n array('GYP', 'AU', 'Gympie Arpt', 0),\n array('GYQSK', 'GY', 'new amsterdam', 1),\n array('GYR', 'US', 'Litchfield Goodyear Arpt', 0),\n array('GYS', 'CN', 'Guang Yuan Arpt', 0),\n array('GYY', 'US', 'Gary Regional Arpt', 0),\n array('GZM', 'MT', 'Gozo Arpt', 0),\n array('GZT', 'TR', 'Gaziantep Arpt', 0),\n array('HAC', 'JP', 'Hachijo Jima Arpt', 0),\n array('HAD', 'SE', 'Halmstad Arpt', 0),\n array('HAH', 'KM', 'Prince Said Ibrahim In', 0),\n array('HAJ', 'DE', 'Hanover Arpt', 0),\n array('HAK', 'CN', 'Haikou Arpt', 0),\n array('HAM', 'DE', 'Fuhlsbuettel Arpt', 0),\n array('HAN', 'VN', 'Noibai Arpt', 0),\n array('HAP', 'AU', 'Long Island Arpt', 0),\n array('HAS', 'SA', 'Hail Arpt', 0),\n array('HAU', 'NO', 'Karmoy Arpt', 0),\n array('HAV', 'CU', 'Jose Marti Intl Arpt', 0),\n array('HBA', 'AU', 'Hobart International Arpt', 0),\n array('HBE', 'EG', 'Borg El Arab Arpt', 0),\n array('HBG', 'US', 'Bobby L Chain Municipal', 0),\n array('HBI', 'BS', 'Harbour Island Arpt', 0),\n array('HBT', 'SA', 'Hafr Albatin Arpt', 0),\n array('HCN', 'TW', 'Hengchun Arpt', 0),\n array('HDB', 'DE', 'Heidelberg Arpt', 0),\n array('HDD', 'PK', 'Hyderabad', 0),\n array('HDF', 'DE', 'Heringsdorf Arpt', 0),\n array('HDN', 'US', 'Hayden Arpt', 0),\n array('HDS', 'ZA', 'Hoedspruit Arpt', 0),\n array('HDY', 'TH', 'Hat Yai Arpt', 0),\n array('HEH', 'MM', 'Heho Arpt', 0),\n array('HEI', 'DE', 'Heide Arpt', 0),\n array('HEL', 'FI', 'Helsinki Arpt', 0),\n array('HER', 'GR', 'N Kazantzakis Arpt', 0),\n array('HET', 'CN', 'Hohhot Arpt', 0),\n array('HEW', 'GR', 'Athens Hellinikon Arpt', 0),\n array('HEZ', 'US', 'Natchez Adams Cty', 0),\n array('HFA', 'IL', 'Haifa Arpt', 0),\n array('HFD', 'US', 'Brainard Arpt', 0),\n array('HFE', 'CN', 'Hefei Arpt', 0),\n array('HFT', 'NO', 'Hammerfest Arpt', 0),\n array('HGH', 'CN', 'Hangzhou Arpt', 0),\n array('HGL', 'DE', 'Helgoland Arpt', 0),\n array('HGN', 'TH', 'Mae Hong Son Arpt', 0),\n array('HGR', 'US', 'Washington Cty Regional', 0),\n array('HGU', 'PG', 'Kagamuga Arpt', 0),\n array('HHA', 'CN', 'Changsha Huanghua Arpt', 0),\n array('HHH', 'US', 'Hilton Head Municipal', 0),\n array('HHN', 'DE', 'Hahn Arpt', 0),\n array('HHQ', 'TH', 'Hua Hin Arpt', 0),\n array('HHR', 'US', 'Hawthorne Arpt', 0),\n array('HIB', 'US', 'Hibbing Chisolm Arpt', 0),\n array('HID', 'AU', 'Horn Island Arpt', 0),\n array('HII', 'US', 'Lake Havasu City Municipal Airport', 0),\n array('HIJ', 'JP', 'Hiroshima Airport', 0),\n array('HIK', 'US', 'Hickam Air Force Base', 0),\n array('HIN', 'KR', 'Sacheon Arpt', 0),\n array('HIO', 'US', 'Portland Hillsboro Arpt', 0),\n array('HIR', 'SB', 'Henderson Intl Arpt', 0),\n array('HIS', 'AU', 'Hayman Island Arpt', 0),\n array('HJR', 'IN', 'Khajuraho Arpt', 0),\n array('HKA', 'US', 'Blytheville Municipal Arpt', 0),\n array('HKB', 'US', 'Healy Lake Arpt', 0),\n array('HKD', 'JP', 'Kakodate Arpt', 0),\n array('HKG', 'HK', 'Hong Kong Intl', 0),\n array('HKHKG', 'HK', 'hong kong', 1),\n array('HKK', 'NZ', 'Hokitika Airport', 0),\n array('HKKWN', 'HK', 'kowloon', 1),\n array('HKN', 'PG', 'Hoskins Arpt', 0),\n array('HKS', 'US', 'Hawkins Field', 0),\n array('HKT', 'TH', 'Phuket Intl Airport', 0),\n array('HKTOL', 'HK', 'tolo harbour', 1),\n array('HKVIC', 'HK', 'victoria', 1),\n array('HKY', 'US', 'Hickory Municipal', 0),\n array('HLA', 'ZA', 'Lanseria Arpt', 0),\n array('HLB', 'US', 'Hillenbrand', 0),\n array('HLF', 'SE', 'Hultsfred Arpt', 0),\n array('HLM', 'US', 'Park Township', 0),\n array('HLN', 'US', 'Helena Municipal', 0),\n array('HLP', 'ID', 'Halim Perdana Kusuma Arpt', 0),\n array('HLS', 'AU', 'St Helens Arpt', 0),\n array('HLW', 'ZA', 'Hluhluwe Arpt', 0),\n array('HLY', 'GB', 'Holyhead Rail Station', 0),\n array('HLZ', 'NZ', 'Hamilton Arpt', 0),\n array('HMA', 'SE', 'Malmo City Hvc Arpt', 0),\n array('HMO', 'MX', 'Gen Ignacio Pesqueira Garcia Arpt', 0),\n array('HMR', 'NO', 'Hamar Arpt', 0),\n array('HNA', 'JP', 'Hanamaki Arpt', 0),\n array('HNAMP', 'HN', 'amapala', 1),\n array('HNB', 'US', 'Huntingburg Municipal', 0),\n array('HND', 'JP', 'Haneda Arpt', 0),\n array('HNGJA', 'HN', 'guanaja', 1),\n array('HNH', 'US', 'Hoonah Municipal Arpt', 0),\n array('HNHNN', 'HN', 'henecan', 1),\n array('HNL', 'US', 'Honolulu Intl', 0),\n array('HNLCE', 'HN', 'la ceiba', 1),\n array('HNM', 'US', 'Hana Municipal', 0),\n array('HNPCA', 'HN', 'puerto castilla', 1),\n array('HNPCR', 'HN', 'puerto cortés', 1),\n array('HNRTB', 'HN', 'roatan', 1),\n array('HNS', 'US', 'Haines Municipal Arpt', 0),\n array('HNSAP', 'HN', 'san pedro sula', 1),\n array('HNSLO', 'HN', 'san lorenzo', 1),\n array('HNTEA', 'HN', 'tela', 1),\n array('HNTGU', 'HN', 'tegucigalpa', 1),\n array('HNTJI', 'HN', 'trujillo', 1),\n array('HNY', 'CN', 'Hengyang Arpt', 0),\n array('HOB', 'US', 'Lea County Arpt', 0),\n array('HOG', 'CU', 'Frank Pias Arpt', 0),\n array('HOM', 'US', 'Homer Municipal Arpt', 0),\n array('HON', 'US', 'Huron Municipal', 0),\n array('HOQ', 'DE', 'Hof Pirk Arpt', 0),\n array('HOR', 'PT', 'Horta Arpt', 0),\n array('HOT', 'US', 'Memorial Field', 0),\n array('HOU', 'US', 'Houston Hobby Arpt', 0),\n array('HOV', 'NO', 'Hovden Arpt', 0),\n array('HPA', 'TO', 'Salote Pilolevu Arpt', 0),\n array('HPH', 'VN', 'Catbi Arpt', 0),\n array('HPN', 'US', 'Westchester Cty Arpt', 0),\n array('HPV', 'US', 'Princeville Arpt', 0),\n array('HRB', 'CN', 'Harbin Arpt', 0),\n array('HRBAK', 'HR', 'bakar', 1),\n array('HRDBV', 'HR', 'dubrovnik', 1),\n array('HRDUR', 'HR', 'dugi rat', 1),\n array('HRE', 'ZW', 'Harare Arpt', 0),\n array('HRG', 'EG', 'Hurghada Airport', 0),\n array('HRHVA', 'HR', 'hvar', 1),\n array('HRK', 'UA', 'Kharkov Arpt', 0),\n array('HRKOR', 'HR', 'korcula', 1),\n array('HRL', 'US', 'Rio Grande Valley Intl Arpt', 0),\n array('HRMAS', 'HR', 'maslenica', 1),\n array('HRO', 'US', 'Boone County Arpt', 0),\n array('HROMI', 'HR', 'omisalj', 1),\n array('HRPLE', 'HR', 'ploce', 1),\n array('HRPUY', 'HR', 'pula', 1),\n array('HRRAS', 'HR', 'rasa', 1),\n array('HRRJK', 'HR', 'rijeka bakar', 1),\n array('HRROV', 'HR', 'rovinj', 1),\n array('HRS', 'ZA', 'Harrismith Arpt', 0),\n array('HRSEN', 'HR', 'senj', 1),\n array('HRSIB', 'HR', 'sibenik', 1),\n array('HRSPU', 'HR', 'split', 1),\n array('HRSUC', 'HR', 'sucurac', 1),\n array('HRSUS', 'HR', 'rijeka susak', 1),\n array('HRSVK', 'HR', 'sveti kajo', 1),\n array('HRT', 'GB', 'Linton On Ouse', 0),\n array('HRVRA', 'HR', 'vranjic', 1),\n array('HRZ', 'BR', 'Horizontina Arpt', 0),\n array('HRZAD', 'HR', 'zadar', 1),\n array('HSG', 'JP', 'Saga Arpt', 0),\n array('HSH', 'US', 'Henderson Sky Harbor Arpt', 0),\n array('HSI', 'US', 'Hastings Municipal', 0),\n array('HSP', 'US', 'Ingalls Field', 0),\n array('HST', 'US', 'Homestead Municipal', 0),\n array('HSV', 'US', 'Huntsville Intl Arpt', 0),\n array('HSZ', 'TW', 'Hsinchun Arpt', 0),\n array('HTA', 'RU', 'Chita Arpt', 0),\n array('HTACA', 'HT', 'les cayes', 1),\n array('HTCAP', 'HT', 'cap-haitien', 1),\n array('HTF', 'GB', 'Hatfield Arpt', 0),\n array('HTFLI', 'HT', 'fort liberte', 1),\n array('HTFOM', 'HT', 'fond mombin', 1),\n array('HTGVS', 'HT', 'gonaïves', 1),\n array('HTI', 'AU', 'Hamilton Island Arpt', 0),\n array('HTJAK', 'HT', 'jacmel', 1),\n array('HTJEE', 'HT', 'jérémie', 1),\n array('HTLFF', 'HT', 'laffiteau', 1),\n array('HTMIR', 'HT', 'miragoane', 1),\n array('HTO', 'US', 'East Hampton Arpt', 0),\n array('HTPAP', 'HT', 'port-au-prince', 1),\n array('HTPEG', 'HT', 'petit goave', 1),\n array('HTS', 'US', 'Tri State Milton Arpt', 0),\n array('HTSMC', 'HT', 'st marc', 1),\n array('HTV', 'US', 'Huntsville Arpt', 0),\n array('HUBUD', 'HU', 'budapest', 1),\n array('HUC', 'US', 'Humacao Arpt', 0),\n array('HUDEB', 'HU', 'debrecen', 1),\n array('HUEST', 'HU', 'esztergom', 1),\n array('HUF', 'US', 'Hulman Field', 0),\n array('HUGYO', 'HU', 'gyoer', 1),\n array('HUH', 'PF', 'Huahine Arpt', 0),\n array('HUI', 'VN', 'Phu Bai Arpt', 0),\n array('HUKOM', 'HU', 'komarom', 1),\n array('HUM', 'US', 'Terrebonne Arpt', 0),\n array('HUMCQ', 'HU', 'miskolc', 1),\n array('HUMOH', 'HU', 'mohacs', 1),\n array('HUN', 'TW', 'Hualien Arpt', 0),\n array('HUSZE', 'HU', 'szeged', 1),\n array('HUT', 'US', 'Hutchinson Municipal', 0),\n array('HUU', 'PE', 'Huanuco Arpt', 0),\n array('HUV', 'SE', 'Hudiksvall Arpt', 0),\n array('HUX', 'MX', 'Bahia De Huatulco Arpt', 0),\n array('HUY', 'GB', 'Humberside Arpt', 0),\n array('HVB', 'AU', 'Hervey Bay', 0),\n array('HVG', 'NO', 'Valan Arpt', 0),\n array('HVN', 'US', 'Tweed New Haven Arpt', 0),\n array('HVR', 'US', 'City County', 0),\n array('HWD', 'US', 'Hayward Air Terminal', 0),\n array('HWN', 'ZW', 'Hwange Arpt', 0),\n array('HYA', 'US', 'Barnstable Cty Arpt', 0),\n array('HYD', 'IN', 'Begumpet Arpt', 0),\n array('HYN', 'CN', 'Huangyan Arpt', 0),\n array('HYR', 'US', 'Hayward Municipal', 0),\n array('HYS', 'US', 'Hays Municipal', 0),\n array('IAD', 'US', 'Washington Dulles Intl', 0),\n array('IAG', 'US', 'Niagara Falls Intl Arpt', 0),\n array('IAH', 'US', 'George Bush Intercontinental', 0),\n array('IAR', 'RU', 'Yaroslavl Arpt', 0),\n array('IBZ', 'ES', 'Ibiza Airport', 0),\n array('ICN', 'KR', 'Incheon Intl Arpt', 0),\n array('ICT', 'US', 'Mid Continent Arpt', 0),\n array('IDA', 'US', 'Fanning Field', 0),\n array('IDADB', 'ID', 'adang bay', 1),\n array('IDAJN', 'ID', 'arjuna java', 1),\n array('IDAMA', 'ID', 'amamapare ij', 1),\n array('IDAMP', 'ID', 'ampenan bali', 1),\n array('IDAMQ', 'ID', 'ambon molucas', 1),\n array('IDARB', 'ID', 'aroe bay', 1),\n array('IDAUN', 'ID', 'arun', 1),\n array('IDBAK', 'ID', 'batu kilat', 1),\n array('IDBAL', 'ID', 'balongan terminal', 1),\n array('IDBDJ', 'ID', 'banjarmasin', 1),\n array('IDBEK', 'ID', 'bekapai terminal', 1),\n array('IDBGG', 'ID', 'banggai', 1),\n array('IDBIK', 'ID', 'biak irian jaya', 1),\n array('IDBIT', 'ID', 'bitung sulawesi', 1),\n array('IDBJU', 'ID', 'banjuwangi java', 1),\n array('IDBKS', 'ID', 'bengkulu sumatra', 1),\n array('IDBLI', 'ID', 'blinju banka', 1),\n array('IDBLL', 'ID', 'blang lancang st', 1),\n array('IDBLV', 'ID', 'beliling', 1),\n array('IDBLW', 'ID', 'belawan sumatra', 1),\n array('IDBMT', 'ID', 'bima terminal jv', 1),\n array('IDBMU', 'ID', 'bima sb', 1),\n array('IDBNG', 'ID', 'bonggala', 1),\n array('IDBOA', 'ID', 'benoa bali', 1),\n array('IDBPN', 'ID', 'balikpapan kalimantan', 1),\n array('IDBTH', 'ID', 'batu besar', 1),\n array('IDBUA', 'ID', 'bula', 1),\n array('IDBUG', 'ID', 'buleleng bali', 1),\n array('IDBXT', 'ID', 'bontang kl', 1),\n array('IDCBN', 'ID', 'cirebon java', 1),\n array('IDCEB', 'ID', 'celukan bawang bl', 1),\n array('IDCIG', 'ID', 'cigading jv', 1),\n array('IDCIN', 'ID', 'cinta java', 1),\n array('IDCSA', 'ID', 'cape sago', 1),\n array('IDCXP', 'ID', 'cilacap java', 1),\n array('IDDAS', 'ID', 'dabo singkep', 1),\n array('IDDIV', 'ID', 'diviematra', 1),\n array('IDDJA', 'ID', 'djankar', 1),\n array('IDDJB', 'ID', 'jambi sumatra', 1),\n array('IDDJJ', 'ID', 'jayapura irian jaya', 1),\n array('IDDUM', 'ID', 'dumai sumatra', 1),\n array('IDFKQ', 'ID', 'fak fak irian jaya', 1),\n array('IDGIL', 'ID', 'gilimanuk bali', 1),\n array('IDGNS', 'ID', 'gunung sitoli st', 1),\n array('IDGRE', 'ID', 'gresik java', 1),\n array('IDGTO', 'ID', 'gorontalo sulawesi', 1),\n array('IDHLA', 'ID', 'sukarnapura (western irian)', 1),\n array('IDI', 'US', 'Indiana County Arpt', 0),\n array('IDJKT', 'ID', 'jakarta java', 1),\n array('IDKAH', 'ID', 'kahayan bay', 1),\n array('IDKAM', 'ID', 'kambunong celebes', 1),\n array('IDKAR', 'ID', 'karosa sulawesi', 1),\n array('IDKAS', 'ID', 'kasim ij', 1),\n array('IDKDI', 'ID', 'kendari sulawesi', 1),\n array('IDKEM', 'ID', 'kempo sb', 1),\n array('IDKID', 'ID', 'kidjang bintan', 1),\n array('IDKKA', 'ID', 'kuala kapuas kl', 1),\n array('IDKKB', 'ID', 'kunak borneo', 1),\n array('IDKLT', 'ID', 'kaltim', 1),\n array('IDKMA', 'ID', 'kuala mandah sumatra', 1),\n array('IDKOE', 'ID', 'kupang timor', 1),\n array('IDKPN', 'ID', 'kotapinang baru', 1),\n array('IDKTG', 'ID', 'ketapang kl', 1),\n array('IDLAH', 'ID', 'labuha java', 1),\n array('IDLAS', 'ID', 'langsa sumatra', 1),\n array('IDLAT', 'ID', 'lalang terminal st', 1),\n array('IDLIF', 'ID', 'lifamatola', 1),\n array('IDLKS', 'ID', 'lhokseumawe st', 1),\n array('IDLLA', 'ID', 'lawe-lawe kl', 1),\n array('IDLSW', 'ID', 'lhoksumawe sumatra', 1),\n array('IDLUW', 'ID', 'luwuk', 1),\n array('IDMAJ', 'ID', 'majene sv', 1),\n array('IDMAL', 'ID', 'mangole', 1),\n array('IDMDC', 'ID', 'manado', 1),\n array('IDMEQ', 'ID', 'meulaboh sumatra', 1),\n array('IDMES', 'ID', 'medan sumatra', 1),\n array('IDMJU', 'ID', 'mamuju', 1),\n array('IDMKQ', 'ID', 'merauke irian jaya', 1),\n array('IDMKW', 'ID', 'manokwari irian jaya', 1),\n array('IDMLI', 'ID', 'malili sulawesi', 1),\n array('IDMNT', 'ID', 'mantang riau', 1),\n array('IDMOF', 'ID', 'maumere flores', 1),\n array('IDMRB', 'ID', 'merantibunting sumatra', 1),\n array('IDMRI', 'ID', 'musi river sumatra', 1),\n array('IDMRK', 'ID', 'merak java', 1),\n array('IDMTU', 'ID', 'muturi', 1),\n array('IDMUB', 'ID', 'muara berau', 1),\n array('IDMUD', 'ID', 'muara djawa', 1),\n array('IDMUO', 'ID', 'muntok banka', 1),\n array('IDMUP', 'ID', 'muara pegah', 1),\n array('IDNNX', 'ID', 'nunukan', 1),\n array('IDOBI', 'ID', 'obi island', 1),\n array('IDOLO', 'ID', 'olee lheue', 1),\n array('IDPAG', 'ID', 'pagatan kalimantan', 1),\n array('IDPAS', 'ID', 'pasir panjang', 1),\n array('IDPAZ', 'ID', 'pasaruan java', 1),\n array('IDPBJ', 'ID', 'pulo bunju borneo', 1),\n array('IDPDG', 'ID', 'padang (teluk bajur) sumatra', 1),\n array('IDPDJ', 'ID', 'tandjang', 1),\n array('IDPEX', 'ID', 'pekalongan java', 1),\n array('IDPGK', 'ID', 'pangkalpinang banka', 1),\n array('IDPGX', 'ID', 'pangkal balam banka', 1),\n array('IDPJM', 'ID', 'pandjung mani', 1),\n array('IDPKN', 'ID', 'pangkalanbuun', 1),\n array('IDPKR', 'ID', 'pangkalan brandan sumatra', 1),\n array('IDPKS', 'ID', 'pangkalan susu sumatra', 1),\n array('IDPLA', 'ID', 'pladju sumatra', 1),\n array('IDPLM', 'ID', 'palembang sumatra', 1),\n array('IDPMG', 'ID', 'port meneng', 1),\n array('IDPNG', 'ID', 'penuba', 1),\n array('IDPNJ', 'ID', 'panjang', 1),\n array('IDPNK', 'ID', 'pontianak kalimantan', 1),\n array('IDPNN', 'ID', 'pamanukan java', 1),\n array('IDPNT', 'ID', 'prointal jv', 1),\n array('IDPPO', 'ID', 'palapo sulawesi', 1),\n array('IDPPS', 'ID', 'pulangpisau', 1),\n array('IDPRN', 'ID', 'panarukan java', 1),\n array('IDPRO', 'ID', 'probolinggo java', 1),\n array('IDPSJ', 'ID', 'poso sulawesi', 1),\n array('IDPSS', 'ID', 'pulau sambu riau', 1),\n array('IDPTL', 'ID', 'pantoloan sv', 1),\n array('IDPUM', 'ID', 'pomala sulawesi', 1),\n array('IDPWG', 'ID', 'perawang sumatra', 1),\n array('IDRGT', 'ID', 'rengat sumatra', 1),\n array('IDSAD', 'ID', 'sadau borneo', 1),\n array('IDSAN', 'ID', 'sanang celebes', 1),\n array('IDSAS', 'ID', 'sasayap', 1),\n array('IDSAT', 'ID', 'santan terminal kl', 1),\n array('IDSBG', 'ID', 'sabang sumatra', 1),\n array('IDSBS', 'ID', 'sambas kalimantan', 1),\n array('IDSEB', 'ID', 'sebangan bay kalimantan', 1),\n array('IDSEG', 'ID', 'segama borneo', 1),\n array('IDSEQ', 'ID', 'sungai pakning sumatra', 1),\n array('IDSIA', 'ID', 'siak yechil riau', 1),\n array('IDSKI', 'ID', 'sangkulirang kalimantan', 1),\n array('IDSKK', 'ID', 'soengei kolak', 1),\n array('IDSKW', 'ID', 'singkawang kalimantan', 1),\n array('IDSLG', 'ID', 'sibolga sumatra', 1),\n array('IDSMB', 'ID', 'semangka bay st', 1),\n array('IDSMQ', 'ID', 'sampit kalimantan', 1),\n array('IDSOQ', 'ID', 'sorong', 1),\n array('IDSPA', 'ID', 'selat pandjang sumatra', 1),\n array('IDSPH', 'ID', 'senipah terminal', 1),\n array('IDSRG', 'ID', 'semarang java', 1),\n array('IDSRI', 'ID', 'samarinda kalimantan', 1),\n array('IDSSO', 'ID', 'susu', 1),\n array('IDSUB', 'ID', 'surabaya-tanjung perak java', 1),\n array('IDSUG', 'ID', 'sungai gerong sumatra', 1),\n array('IDSUP', 'ID', 'sumenep madura', 1),\n array('IDSUQ', 'ID', 'sungai guntung sumatra', 1),\n array('IDSUS', 'ID', 'susoh sumatra', 1),\n array('IDSWQ', 'ID', 'sumbawa', 1),\n array('IDTAN', 'ID', 'tanjung uban riau', 1),\n array('IDTAX', 'ID', 'taliabu celebes', 1),\n array('IDTBG', 'ID', 'teluk betung sumatra', 1),\n array('IDTBN', 'ID', 'tuban jv', 1),\n array('IDTBT', 'ID', 'tandjung batu riau', 1),\n array('IDTEG', 'ID', 'tegal java', 1),\n array('IDTHB', 'ID', 'tjeribon java', 1),\n array('IDTJB', 'ID', 'tanjung balai', 1),\n array('IDTJI', 'ID', 'tjilatjap java', 1),\n array('IDTJQ', 'ID', 'tanjung pandan belitung', 1),\n array('IDTKA', 'ID', 'telok ayer kalimantan', 1),\n array('IDTLI', 'ID', 'tolitoli', 1),\n array('IDTMO', 'ID', 'telok melano', 1),\n array('IDTNJ', 'ID', 'tanjung pinang riau', 1),\n array('IDTPP', 'ID', 'tanjung priok', 1),\n array('IDTRK', 'ID', 'tarakan kalimantan', 1),\n array('IDTSE', 'ID', 'tanjung sekong jv', 1),\n array('IDTTE', 'ID', 'ternate halmahera', 1),\n array('IDUPG', 'ID', 'ujung pandang sulawesi', 1),\n array('IDWGP', 'ID', 'waingapu sumba', 1),\n array('IEALQ', 'IE', 'alexandra quay', 1),\n array('IEARK', 'IE', 'arklow', 1),\n array('IEARO', 'IE', 'alexandra road oil', 1),\n array('IEAUG', 'IE', 'aughinish island', 1),\n array('IEBIF', 'IE', 'b & i ferryport', 1),\n array('IEBIT', 'IE', 'b & i terminal', 1),\n array('IEBTM', 'IE', 'baltimore', 1),\n array('IEBUC', 'IE', 'buncrana', 1),\n array('IEBYT', 'IE', 'bantry', 1),\n array('IECCT', 'IE', 'coastal control terminal', 1),\n array('IECHE', 'IE', 'caherciveen', 1),\n array('IECOB', 'IE', 'cobh', 1),\n array('IECRO', 'IE', 'crookhaven', 1),\n array('IECTB', 'IE', 'castletown bere', 1),\n array('IEDDK', 'IE', 'dundalk', 1),\n array('IEDGV', 'IE', 'dungarvan', 1),\n array('IEDIN', 'IE', 'dingle', 1),\n array('IEDLG', 'IE', 'dun laoghaire', 1),\n array('IEDNM', 'IE', 'dunmore east', 1),\n array('IEDRO', 'IE', 'drogheda', 1),\n array('IEFCW', 'IE', 'frank cassin wharf', 1),\n array('IEFEN', 'IE', 'fenit', 1),\n array('IEFID', 'IE', 'fiddown', 1),\n array('IEFOV', 'IE', 'foynes', 1),\n array('IEG', 'PL', 'Babimost Arpt', 0),\n array('IEGRN', 'IE', 'greenore', 1),\n array('IEGWY', 'IE', 'galway', 1),\n array('IEHAU', 'IE', 'haulbowline', 1),\n array('IEHOW', 'IE', 'howth', 1),\n array('IEKBS', 'IE', 'killybegs', 1),\n array('IEKKA', 'IE', 'kilmokea', 1),\n array('IEKLN', 'IE', 'kinsale', 1),\n array('IEKLR', 'IE', 'kilrush', 1),\n array('IELMK', 'IE', 'limerick', 1),\n array('IEMAP', 'IE', 'marino point', 1),\n array('IEMOT', 'IE', 'moneypoint', 1),\n array('IENRS', 'IE', 'new ross', 1),\n array('IEORK', 'IE', 'cork', 1),\n array('IEPAP', 'IE', 'parnell place', 1),\n array('IEPAT', 'IE', 'pandoro terminal', 1),\n array('IERAV', 'IE', 'rossaveel', 1),\n array('IERIN', 'IE', 'ringaskiddy', 1),\n array('IEROE', 'IE', 'rosslare', 1),\n array('IEROS', 'IE', 'rosslare harbour', 1),\n array('IERUS', 'IE', 'rushbrook', 1),\n array('IERVM', 'IE', 'river moy', 1),\n array('IESLI', 'IE', 'sligo', 1),\n array('IETAR', 'IE', 'tarbert', 1),\n array('IETIV', 'IE', 'tivoli', 1),\n array('IETRA', 'IE', 'tralee', 1),\n array('IEV', 'UA', 'Zhulhany Arpt', 0),\n array('IEWAT', 'IE', 'waterford', 1),\n array('IEWES', 'IE', 'westport', 1),\n array('IEWEX', 'IE', 'wexford', 1),\n array('IEWHI', 'IE', 'whitegate', 1),\n array('IEWIC', 'IE', 'wicklow', 1),\n array('IEYOU', 'IE', 'youghal', 1),\n array('IFJ', 'IS', 'Isafjordur Arpt', 0),\n array('IFN', 'IR', 'Isfahan Arpt', 0),\n array('IFO', 'UA', 'Ivano Frankovsk Arpt', 0),\n array('IFP', 'US', 'Laughlin Bullhead Intl Arpt', 0),\n array('IGL', 'TR', 'Izmir Cigli Military', 0),\n array('IGM', 'US', 'Mohave County', 0),\n array('IGR', 'AR', 'Iguazu Intl', 0),\n array('IGU', 'BR', 'Cataratas Arpt', 0),\n array('IJX', 'US', 'Jacksonville Municipal Arpt', 0),\n array('IKK', 'US', 'Greater Kankakee Arpt', 0),\n array('IKT', 'RU', 'Irkutsk Airport', 0),\n array('ILACR', 'IL', 'acre', 1),\n array('ILAKL', 'IL', 'ashkelon', 1),\n array('ILASH', 'IL', 'ashdod', 1),\n array('ILE', 'US', 'Killeen Municipal', 0),\n array('ILETH', 'IL', 'elat (eilath)', 1),\n array('ILF', 'CA', 'Ilford Rail Station', 0),\n array('ILG', 'US', 'Greater Wilmington New Castle', 0),\n array('ILHAD', 'IL', 'hadera', 1),\n array('ILHFA', 'IL', 'haifa', 1),\n array('ILJFA', 'IL', 'jaffa', 1),\n array('ILM', 'US', 'New Hanover Cty Arpt', 0),\n array('ILNAT', 'IL', 'natanya', 1),\n array('ILO', 'PH', 'Mandurriao Arpt', 0),\n array('ILP', 'NC', 'Ile Des Pins Arpt', 0),\n array('ILRAH', 'IL', 'rafah', 1),\n array('ILY', 'GB', 'Islay Arpt', 0),\n array('IMP', 'BR', 'Imperatriz Arpt', 0),\n array('IMT', 'US', 'Ford Arpt', 0),\n array('INALF', 'IN', 'alleppey', 1),\n array('INBDQ', 'IN', 'vadodara (baroda)', 1),\n array('INBED', 'IN', 'bedi', 1),\n array('INBET', 'IN', 'betul', 1),\n array('INBEY', 'IN', 'beypore', 1),\n array('INBHU', 'IN', 'bhavnagar', 1),\n array('INBLK', 'IN', 'belekeri', 1),\n array('INBND', 'IN', 'banddar', 1),\n array('INBOM', 'IN', 'bombay (mumbai)', 1),\n array('INBUD', 'IN', 'budge-budge', 1),\n array('INCAM', 'IN', 'cambay', 1),\n array('INCAP', 'IN', 'calingapatnam', 1),\n array('INCAR', 'IN', 'carijam', 1),\n array('INCBL', 'IN', 'chandbali', 1),\n array('INCCJ', 'IN', 'calicut', 1),\n array('INCCU', 'IN', 'calcutta', 1),\n array('INCDL', 'IN', 'cuddalore', 1),\n array('INCNI', 'IN', 'chennai', 1),\n array('INCNN', 'IN', 'cannanore', 1),\n array('INCOK', 'IN', 'cochin', 1),\n array('INCOL', 'IN', 'colochel', 1),\n array('INCOO', 'IN', 'coondapur', 1),\n array('INCUM', 'IN', 'cutch mandvi', 1),\n array('IND', 'US', 'Indianapolis Intl Arpt', 0),\n array('INDAH', 'IN', 'dahej', 1),\n array('INDAM', 'IN', 'daman', 1),\n array('INDIU', 'IN', 'diu', 1),\n array('INDRL', 'IN', 'darolim goa', 1),\n array('INDWA', 'IN', 'dwarkar', 1),\n array('INGAU', 'IN', 'gauhati (panidi)', 1),\n array('INGPR', 'IN', 'gopalpur', 1),\n array('INHAL', 'IN', 'haldia', 1),\n array('INHON', 'IN', 'honavar', 1),\n array('INI', 'YU', 'Nis Arpt', 0),\n array('INIXE', 'IN', 'mangalore', 1),\n array('INIXY', 'IN', 'kandla', 1),\n array('INJAK', 'IN', 'jakhau', 1),\n array('INKAK', 'IN', 'kakinada', 1),\n array('INKAT', 'IN', 'kathiawar', 1),\n array('INKBT', 'IN', 'khambhat', 1),\n array('INKNA', 'IN', 'kanola', 1),\n array('INKOD', 'IN', 'kodinar', 1),\n array('INKOI', 'IN', 'koiltholtam', 1),\n array('INKOK', 'IN', 'koka', 1),\n array('INKON', 'IN', 'konarak', 1),\n array('INKRI', 'IN', 'krishnapatam', 1),\n array('INKRK', 'IN', 'karikal', 1),\n array('INKRW', 'IN', 'karwar', 1),\n array('INL', 'US', 'Intl Falls Arpt', 0),\n array('INMAA', 'IN', 'madras', 1),\n array('INMAL', 'IN', 'malpe', 1),\n array('INMAP', 'IN', 'masulipatnam', 1),\n array('INMDP', 'IN', 'mandapam', 1),\n array('INMDV', 'IN', 'mandvi', 1),\n array('INMGR', 'IN', 'mangrol', 1),\n array('INMLI', 'IN', 'maroli', 1),\n array('INMRM', 'IN', 'mormugao', 1),\n array('INMUN', 'IN', 'mundra', 1),\n array('INMUR', 'IN', 'murad', 1),\n array('INN', 'AT', 'Kranebitten Airport', 0),\n array('INNAN', 'IN', 'nancowrie', 1),\n array('INNAV', 'IN', 'navalakhi', 1),\n array('INNEE', 'IN', 'neendhakara', 1),\n array('INNEL', 'IN', 'nellore', 1),\n array('INNML', 'IN', 'new mangalore', 1),\n array('INNPT', 'IN', 'nagapattinam', 1),\n array('INNSA', 'IN', 'jawaharlal nehru (nhava sheva)', 1),\n array('INNSH', 'IN', 'nava sheva', 1),\n array('INOKH', 'IN', 'okha', 1),\n array('INPAN', 'IN', 'panaji goa', 1),\n array('INPAV', 'IN', 'pipavav (albert victor)', 1),\n array('INPBD', 'IN', 'porbandar', 1),\n array('INPID', 'IN', 'port indai', 1),\n array('INPIN', 'IN', 'pindhara', 1),\n array('INPNM', 'IN', 'panambur va mangalore', 1),\n array('INPNY', 'IN', 'pondicherry', 1),\n array('INPRT', 'IN', 'paradip', 1),\n array('INPUL', 'IN', 'pulicat', 1),\n array('INPUR', 'IN', 'puri', 1),\n array('INQUI', 'IN', 'quilon', 1),\n array('INRAM', 'IN', 'rameshwaram', 1),\n array('INRED', 'IN', 'redi', 1),\n array('INRRI', 'IN', 'rairi', 1),\n array('INRTC', 'IN', 'ratnagiri', 1),\n array('INSAL', 'IN', 'salaya', 1),\n array('INSHI', 'IN', 'shiroda', 1),\n array('INSIK', 'IN', 'sika', 1),\n array('INSTV', 'IN', 'surat', 1),\n array('INT', 'US', 'Smith Reynolds Arpt', 0),\n array('INTAD', 'IN', 'tadrip', 1),\n array('INTEL', 'IN', 'tellicherry', 1),\n array('INTIV', 'IN', 'tiviri', 1),\n array('INTRA', 'IN', 'tranquebar', 1),\n array('INTUT', 'IN', 'tuticorin (new tuticorin)', 1),\n array('INU', 'NR', 'Nauru Intl Arpt', 0),\n array('INUMB', 'IN', 'umbergaon (gujarat)', 1),\n array('INV', 'GB', 'Inverness Arpt', 0),\n array('INVAD', 'IN', 'vadinar', 1),\n array('INVEN', 'IN', 'vengurla', 1),\n array('INVEP', 'IN', 'veppalodai', 1),\n array('INVTZ', 'IN', 'vishakhapatnam', 1),\n array('INVVA', 'IN', 'veraval', 1),\n array('INW', 'US', 'Winslow Municipal', 0),\n array('IOA', 'GR', 'Ioannina Arpt', 0),\n array('IOM', 'GB', 'Ronaldsway Arpt', 0),\n array('IOS', 'BR', 'Eduardo Gomes Airport', 0),\n array('IPC', 'CL', 'Mataveri Intl Arpt', 0),\n array('IPH', 'MY', 'Ipoh Arpt', 0),\n array('IPI', 'CO', 'San Luis Arpt', 0),\n array('IPL', 'US', 'Imperial County', 0),\n array('IPN', 'BR', 'Usiminas Arpt', 0),\n array('IPT', 'US', 'Williamsport Lycoming Municipal', 0),\n array('IPW', 'GB', 'Ipswitch Rail Station', 0),\n array('IQBGW', 'IQ', 'baghdad', 1),\n array('IQBSR', 'IQ', 'basra', 1),\n array('IQFAO', 'IQ', 'fao', 1),\n array('IQHIL', 'IQ', 'hillah', 1),\n array('IQIKD', 'IQ', 'iskandariyha', 1),\n array('IQKAR', 'IQ', 'karbala', 1),\n array('IQKAZ', 'IQ', 'khor al zubair', 1),\n array('IQKHA', 'IQ', 'khor al amaya', 1),\n array('IQKIK', 'IQ', 'kirkuk', 1),\n array('IQMAB', 'IQ', 'mina al bakir', 1),\n array('IQMAN', 'IQ', 'mandali', 1),\n array('IQMAW', 'IQ', 'mawsil', 1),\n array('IQNAS', 'IQ', 'najat', 1),\n array('IQOSM', 'IQ', 'mosul', 1),\n array('IQQ', 'CL', 'Cavancha Chucumata Arpt', 0),\n array('IQSAM', 'IQ', 'samara', 1),\n array('IQT', 'PE', 'C F Secada Arpt', 0),\n array('IQUQR', 'IQ', 'umm qasr', 1),\n array('IRABD', 'IR', 'abadan', 1),\n array('IRAZD', 'IR', 'yazd', 1),\n array('IRBAZ', 'IR', 'bandar anzali', 1),\n array('IRBKM', 'IR', 'bandar khomeini', 1),\n array('IRBMR', 'IR', 'bandar mashur', 1),\n array('IRBND', 'IR', 'bandar abbas', 1),\n array('IRBSR', 'IR', 'bandar shahid rejaie', 1),\n array('IRBUZ', 'IR', 'bushehr', 1),\n array('IRCYT', 'IR', 'cyrus terminal', 1),\n array('IRHTP', 'IR', 'harta point', 1),\n array('IRIFN', 'IR', 'isfahan', 1),\n array('IRIMH', 'IR', 'imam hasan', 1),\n array('IRJ', 'AR', 'La Rioja Arpt', 0),\n array('IRK', 'US', 'Kirksville Municipal', 0),\n array('IRKAS', 'IR', 'kashan', 1),\n array('IRKHK', 'IR', 'khark island', 1),\n array('IRKHO', 'IR', 'khorramshahr', 1),\n array('IRKSH', 'IR', 'kermanshah (baktharan)', 1),\n array('IRLIN', 'IR', 'lingah', 1),\n array('IRLVP', 'IR', 'lavan', 1),\n array('IRMRX', 'IR', 'bandar mahshahr', 1),\n array('IRNSH', 'IR', 'now shahr', 1),\n array('IRRBA', 'IR', 'ras bahrgan', 1),\n array('IRS', 'US', 'Kirsch Municipal', 0),\n array('IRSHB', 'IR', 'shyah bander', 1),\n array('IRSIX', 'IR', 'sari', 1),\n array('IRSXI', 'IR', 'sirri island', 1),\n array('IRSYZ', 'IR', 'shiraz', 1),\n array('IRTBZ', 'IR', 'tabriz', 1),\n array('IRZBR', 'IR', 'chah-bahar', 1),\n array('ISA', 'AU', 'Mount Isa Arpt', 0),\n array('ISAKR', 'IS', 'akranes', 1),\n array('ISAKU', 'IS', 'akureyri', 1),\n array('ISB', 'PK', 'Islamabad Intl', 0),\n array('ISBAK', 'IS', 'bakkafjoerdur', 1),\n array('ISBGJ', 'IS', 'borgarfjoerdur eystri', 1),\n array('ISBIL', 'IS', 'bildudalur - hoefn', 1),\n array('ISBLO', 'IS', 'blonduos', 1),\n array('ISBOI', 'IS', 'bordeyri', 1),\n array('ISBOL', 'IS', 'bolungavik', 1),\n array('ISBOR', 'IS', 'borgarnes', 1),\n array('ISBRE', 'IS', 'breiddalsvik', 1),\n array('ISBUD', 'IS', 'budardalur', 1),\n array('ISC', 'GB', 'St Marys Arpt', 0),\n array('ISDAL', 'IS', 'dalvik', 1),\n array('ISDJU', 'IS', 'djupivogur', 1),\n array('ISDPV', 'IS', 'djupavik', 1),\n array('ISDRA', 'IS', 'drangsnes', 1),\n array('ISESK', 'IS', 'eskifjoerdur - hoefn', 1),\n array('ISFAS', 'IS', 'faskrudsfjoerdur', 1),\n array('ISFLA', 'IS', 'flateyri', 1),\n array('ISG', 'JP', 'Ishigaki Airport', 0),\n array('ISGRE', 'IS', 'grenivik', 1),\n array('ISGRF', 'IS', 'grundarfjoerdur', 1),\n array('ISGRI', 'IS', 'grindavik', 1),\n array('ISGRT', 'IS', 'grundartangi', 1),\n array('ISGUF', 'IS', 'reykjavik - gufunes', 1),\n array('ISH', 'IT', 'Ischia Arpt', 0),\n array('ISHAF', 'IS', 'hafnarfjoerdur', 1),\n array('ISHFN', 'IS', 'hofn hornafjoerdur', 1),\n array('ISHJA', 'IS', 'hjalteyri', 1),\n array('ISHOF', 'IS', 'hofsos', 1),\n array('ISHRI', 'IS', 'hrisey', 1),\n array('ISHUS', 'IS', 'husavik - hoefn', 1),\n array('ISHVM', 'IS', 'hvammstangi', 1),\n array('ISHVR', 'IS', 'hvalfjoerdur', 1),\n array('ISISA', 'IS', 'isafjoerdur - hoefn', 1),\n array('ISJ', 'MX', 'Isla Mujeres Arpt', 0),\n array('ISKEV', 'IS', 'keflavikurkaupstadur', 1),\n array('ISKJF', 'IS', 'skerjafjoerdur', 1),\n array('ISKOP', 'IS', 'kopasker - hoefn', 1),\n array('ISKOV', 'IS', 'kopavogur', 1),\n array('ISKRO', 'IS', 'krokfjardarnes', 1),\n array('ISM', 'US', 'Kissimmee Municipal Arpt', 0),\n array('ISMJO', 'IS', 'mjofjoerdur', 1),\n array('ISN', 'US', 'Sloulin Field Intl Arpt', 0),\n array('ISNES', 'IS', 'neskaupstadur', 1),\n array('ISNJA', 'IS', 'njardvik', 1),\n array('ISNOU', 'IS', 'nordurfjoerdur', 1),\n array('ISO', 'US', 'East Reg Jetport Stallings', 0),\n array('ISOLF', 'IS', 'olafsfjoerdur', 1),\n array('ISOLV', 'IS', 'olafsvik', 1),\n array('ISOSP', 'IS', 'ospakseyri', 1),\n array('ISP', 'US', 'Long Island Macarthur Arpt', 0),\n array('ISPAT', 'IS', 'patreksfjoerdur - hoefn', 1),\n array('ISQ', 'US', 'Schoolcraft County Arpt', 0),\n array('ISRAU', 'IS', 'raufarhoefn', 1),\n array('ISREY', 'IS', 'reykjavik', 1),\n array('ISRFJ', 'IS', 'reydarfjoerdur', 1),\n array('ISRHA', 'IS', 'reykholar', 1),\n array('ISRIF', 'IS', 'rif-hellisandur', 1),\n array('ISS', 'US', 'Wiscasset Arpt', 0),\n array('ISSAN', 'IS', 'sandgerdi', 1),\n array('ISSAU', 'IS', 'saudarkrokur - hoefn', 1),\n array('ISSEY', 'IS', 'seydisfjoerdur', 1),\n array('ISSIG', 'IS', 'siglufjoerdur - hoefn', 1),\n array('ISSKA', 'IS', 'skagastrond', 1),\n array('ISSTD', 'IS', 'stodhvarfjoerdur', 1),\n array('ISSTR', 'IS', 'straumsvik', 1),\n array('ISSTY', 'IS', 'stykkisholmur - hoefn', 1),\n array('ISSUD', 'IS', 'sudureyri/sugandafjord', 1),\n array('ISSUV', 'IS', 'sudavik', 1),\n array('ISSVA', 'IS', 'svalbardseyri', 1),\n array('IST', 'TR', 'Ataturk Arpt', 0),\n array('ISTAL', 'IS', 'talknafjoerdur/sveinseyri', 1),\n array('ISTEY', 'IS', 'thingeyri', 1),\n array('ISTHH', 'IS', 'thorlakshofn', 1),\n array('ISTHO', 'IS', 'thorshofn', 1),\n array('ISVES', 'IS', 'vestmannaeyjar - hoefn', 1),\n array('ISVPN', 'IS', 'vopnafjoerdur', 1),\n array('ITAGR', 'IT', 'agrigento', 1),\n array('ITAHO', 'IT', 'alghero', 1),\n array('ITALE', 'IT', 'alessandria', 1),\n array('ITALI', 'IT', 'alicudi', 1),\n array('ITAMA', 'IT', 'amalfi', 1),\n array('ITANZ', 'IT', 'anzio', 1),\n array('ITAOI', 'IT', 'ancona', 1),\n array('ITATX', 'IT', 'arbatax', 1),\n array('ITAUG', 'IT', 'augusta', 1),\n array('ITAVO', 'IT', 'avola', 1),\n array('ITBAI', 'IT', 'baia', 1),\n array('ITBDS', 'IT', 'brindisi', 1),\n array('ITBLI', 'IT', 'bardolino', 1),\n array('ITBLN', 'IT', 'bagnoli', 1),\n array('ITBLQ', 'IT', 'bologna', 1),\n array('ITBLT', 'IT', 'barletta', 1),\n array('ITBRI', 'IT', 'bari', 1),\n array('ITCAG', 'IT', 'cagliari', 1),\n array('ITCAS', 'IT', 'castellammare di stabia', 1),\n array('ITCEC', 'IT', 'cecina', 1),\n array('ITCHI', 'IT', 'chioggia', 1),\n array('ITCLF', 'IT', 'carloforte', 1),\n array('ITCLS', 'IT', 'calasetta', 1),\n array('ITCML', 'IT', 'casamicciola', 1),\n array('ITCNT', 'IT', 'canetto', 1),\n array('ITCPA', 'IT', 'capraia', 1),\n array('ITCRV', 'IT', 'crotone', 1),\n array('ITCTA', 'IT', 'catania', 1),\n array('ITCTR', 'IT', 'castellammare del golfo', 1),\n array('ITCVV', 'IT', 'civitavecchia', 1),\n array('ITFAL', 'IT', 'falconara', 1),\n array('ITFAV', 'IT', 'favignana', 1),\n array('ITFCO', 'IT', 'fiumicino', 1),\n array('ITFER', 'IT', 'fermo', 1),\n array('ITFOL', 'IT', 'follonica', 1),\n array('ITGAE', 'IT', 'gaeta', 1),\n array('ITGAI', 'IT', 'golfo aranci', 1),\n array('ITGAL', 'IT', 'gallipoli', 1),\n array('ITGEA', 'IT', 'gela', 1),\n array('ITGIA', 'IT', 'giardini', 1),\n array('ITGIT', 'IT', 'gioia tauro', 1),\n array('ITGOA', 'IT', 'genoa', 1),\n array('ITGRD', 'IT', 'grado', 1),\n array('ITH', 'US', 'Tomkins County', 0),\n array('ITIMP', 'IT', 'imperia', 1),\n array('ITLIC', 'IT', 'licata', 1),\n array('ITLIP', 'IT', 'lipari', 1),\n array('ITLIU', 'IT', 'linosa', 1),\n array('ITLIV', 'IT', 'livorno', 1),\n array('ITM', 'JP', 'Itami Arpt', 0),\n array('ITMAZ', 'IT', 'mazara del vallo', 1),\n array('ITMDA', 'IT', 'maddalena', 1),\n array('ITMDC', 'IT', 'marina di carrara', 1),\n array('ITMEL', 'IT', 'melilli', 1),\n array('ITMFR', 'IT', 'manfredonia', 1),\n array('ITMIL', 'IT', 'milano', 1),\n array('ITMLZ', 'IT', 'milazzo', 1),\n array('ITMNF', 'IT', 'monfalcone', 1),\n array('ITMNP', 'IT', 'monopoli', 1),\n array('ITMOL', 'IT', 'molfetta', 1),\n array('ITMRA', 'IT', 'marsala', 1),\n array('ITMSA', 'IT', 'massa', 1),\n array('ITMSN', 'IT', 'messina', 1),\n array('ITNAP', 'IT', 'napoli', 1),\n array('ITO', 'US', 'Hilo Hawaii Intl', 0),\n array('ITOLB', 'IT', 'olbia (terranova)', 1),\n array('ITONE', 'IT', 'oneglia', 1),\n array('ITOTN', 'IT', 'ortona', 1),\n array('ITOTO', 'IT', 'otranto', 1),\n array('ITP', 'BR', 'Itaperuna Arpt', 0),\n array('ITPAN', 'IT', 'panarea', 1),\n array('ITPAZ', 'IT', 'porto azzurro', 1),\n array('ITPCE', 'IT', 'porto cervo', 1),\n array('ITPDI', 'IT', 'porto d\\'ischia', 1),\n array('ITPEM', 'IT', 'porto empedocle', 1),\n array('ITPES', 'IT', 'pesaro', 1),\n array('ITPFE', 'IT', 'portoferraio', 1),\n array('ITPFO', 'IT', 'ponte fornaci', 1),\n array('ITPFX', 'IT', 'porto foxi (sarroch)', 1),\n array('ITPGA', 'IT', 'porto garibaldi', 1),\n array('ITPGL', 'IT', 'portiglioni', 1),\n array('ITPIO', 'IT', 'piombino', 1),\n array('ITPMA', 'IT', 'porto marghera', 1),\n array('ITPMO', 'IT', 'palermo', 1),\n array('ITPMZ', 'IT', 'porto maurizio', 1),\n array('ITPNG', 'IT', 'porto nogaro', 1),\n array('ITPNL', 'IT', 'pantelleria', 1),\n array('ITPOK', 'IT', 'poke', 1),\n array('ITPOM', 'IT', 'pomezia', 1),\n array('ITPOZ', 'IT', 'pozzuoli', 1),\n array('ITPRE', 'IT', 'pressuro', 1),\n array('ITPRJ', 'IT', 'capri', 1),\n array('ITPRO', 'IT', 'procida', 1),\n array('ITPSS', 'IT', 'porto santo stefano', 1),\n array('ITPTF', 'IT', 'portofino', 1),\n array('ITPTO', 'IT', 'porto torres', 1),\n array('ITPVE', 'IT', 'porto vesme (portoscuso)', 1),\n array('ITPZL', 'IT', 'pozzallo', 1),\n array('ITQCZ', 'IT', 'catanzaro', 1),\n array('ITRAN', 'IT', 'ravenna', 1),\n array('ITREG', 'IT', 'reggio calabria', 1),\n array('ITRMA', 'IT', 'rio marina', 1),\n array('ITROM', 'IT', 'roma', 1),\n array('ITRRO', 'IT', 'sorrento', 1),\n array('ITSAL', 'IT', 'salerno', 1),\n array('ITSAT', 'IT', 'sant\\' antioco', 1),\n array('ITSIR', 'IT', 'siracusa', 1),\n array('ITSLA', 'IT', 'salina', 1),\n array('ITSMA', 'IT', 'santa maria', 1),\n array('ITSNP', 'IT', 'san pietro', 1),\n array('ITSPA', 'IT', 'santa panagia', 1),\n array('ITSPE', 'IT', 'la spezia', 1),\n array('ITSPM', 'IT', 'san pietro mussolini', 1),\n array('ITSRE', 'IT', 'san remo', 1),\n array('ITSTR', 'IT', 'stromboli', 1),\n array('ITSVC', 'IT', 'san vito lo capo', 1),\n array('ITSVN', 'IT', 'savona', 1),\n array('ITTAL', 'IT', 'talamone', 1),\n array('ITTAR', 'IT', 'taranto', 1),\n array('ITTGR', 'IT', 'torregrande', 1),\n array('ITTMI', 'IT', 'termoli', 1),\n array('ITTMT', 'IT', 'tremiti', 1),\n array('ITTNI', 'IT', 'trani', 1),\n array('ITTOA', 'IT', 'torre annunziata', 1),\n array('ITTPS', 'IT', 'trapani', 1),\n array('ITTRC', 'IT', 'terracina', 1),\n array('ITTRI', 'IT', 'termini imereses', 1),\n array('ITTRS', 'IT', 'trieste', 1),\n array('ITTRV', 'IT', 'treviso', 1),\n array('ITTVC', 'IT', 'torviscosa', 1),\n array('ITUST', 'IT', 'ustica', 1),\n array('ITVAD', 'IT', 'vado/bologna', 1),\n array('ITVCE', 'IT', 'venezia', 1),\n array('ITVDA', 'IT', 'vada', 1),\n array('ITVDL', 'IT', 'Vado Ligure', 1),\n array('ITVDO', 'IT', 'vado/lucca', 1),\n array('ITVGN', 'IT', 'vigliano (dupl.entry)', 1),\n array('ITVIA', 'IT', 'viareggio', 1),\n array('ITVIE', 'IT', 'vieste', 1),\n array('ITVIG', 'IT', 'vigliano', 1),\n array('ITVIL', 'IT', 'villa d\\'ogna', 1),\n array('ITVSO', 'IT', 'vasto', 1),\n array('ITVTI', 'IT', 'voltri', 1),\n array('ITVTT', 'IT', 'ventotene', 1),\n array('ITVUL', 'IT', 'vulcano porto', 1),\n array('ITVVA', 'IT', 'vibo valentia', 1),\n array('ITVVO', 'IT', 'vinovo', 1),\n array('ITZIN', 'IT', 'zingonia', 1),\n array('IUE', 'NU', 'Hanan Arpt', 0),\n array('IVC', 'NZ', 'Invercargill Arpt', 0),\n array('IVL', 'FI', 'Ivalo Arpt', 0),\n array('IVR', 'AU', 'Inverell Arpt', 0),\n array('IWA', 'RU', 'Ivanovo Arpt', 0),\n array('IWD', 'US', 'Ironwood Arpt', 0),\n array('IWJ', 'JP', 'Iwami Arpt', 0),\n array('IWS', 'US', 'West Houston', 0),\n array('IXB', 'IN', 'Bagdogra Arpt', 0),\n array('IXE', 'IN', 'Bajpe Arpt', 0),\n array('IXJ', 'IN', 'Satwari Arpt', 0),\n array('IXM', 'IN', 'Madurai Airport', 0),\n array('IXU', 'IN', 'Chikkalthana Arpt', 0),\n array('IXZ', 'IN', 'Port Blair Arpt', 0),\n array('IYK', 'US', 'Kern Cty Airport', 0),\n array('IZO', 'JP', 'Izumo Arpt', 0),\n array('IZT', 'MX', 'Ixtepec Arpt', 0),\n array('JAB', 'AU', 'Jabiru Arpt', 0),\n array('JAC', 'US', 'Jackson Arpt', 0),\n array('JAI', 'IN', 'Sanganeer Arpt', 0),\n array('JAJ', 'US', 'Perimeter Hlpt', 0),\n array('JAL', 'MX', 'Jalapa Arpt', 0),\n array('JAN', 'US', 'Jackson Airport', 0),\n array('JAO', 'US', 'Beaver Ruin Helpt', 0),\n array('JAP', 'CR', 'Punta Renes Arpt', 0),\n array('JAV', 'GL', 'Ilulissat Arpt', 0),\n array('JAX', 'US', 'Jacksonville Intl Arpt', 0),\n array('JBP', 'US', 'Commerce Business Plaza Heliport', 0),\n array('JBR', 'US', 'Jonesboro Municipal', 0),\n array('JBS', 'US', 'Hacienda Business Park Hlpt', 0),\n array('JCA', 'FR', 'Croisette Heliport', 0),\n array('JCC', 'US', 'China Basin Hlpt', 0),\n array('JCE', 'US', 'Oakland Conv Ctr Hlpt', 0),\n array('JCJ', 'KR', 'Chuja Heliport', 0),\n array('JDF', 'BR', 'Francisco De Assis Arpt', 0),\n array('JDH', 'IN', 'Jodhpur Arpt', 0),\n array('JDO', 'BR', 'Regional Do Cariri Arpt', 0),\n array('JDP', 'FR', 'Issy Les Moulineaux Arpt', 0),\n array('JED', 'SA', 'Jeddah Intl', 0),\n array('JEF', 'US', 'Jefferson City Memorial', 0),\n array('JEG', 'GL', 'Aasiaat Arpt', 0),\n array('JER', 'GB', 'States Airport', 0),\n array('JFK', 'US', 'John F Kennedy Intl', 0),\n array('JFM', 'AU', 'Fremantle Heliport', 0),\n array('JGA', 'IN', 'Govardhanpur Arpt', 0),\n array('JGR', 'GL', 'Groennedal Heliport', 0),\n array('JGX', 'US', 'Heliport', 0),\n array('JHB', 'MY', 'Sultan Ismail Intl Arpt', 0),\n array('JHE', 'SE', 'Helsingborg Heliport', 0),\n array('JHG', 'CN', 'Jinghong Arpt', 0),\n array('JHM', 'US', 'Kapalua Arpt', 0),\n array('JHQ', 'AU', 'Shute Harbour Heliport', 0),\n array('JHS', 'GL', 'Sisimiut Arpt', 0),\n array('JHW', 'US', 'Chautauqua Cty Arpt', 0),\n array('JIB', 'DJ', 'Ambouli Airport', 0),\n array('JIK', 'GR', 'Ikaria Arpt', 0),\n array('JIM', 'ET', 'Jimma Arpt', 0),\n array('JIU', 'CN', 'Jiujiang Airport', 0),\n array('JJU', 'GL', 'Qaqortoq Arpt', 0),\n array('JKG', 'SE', 'Axamo Airport', 0),\n array('JKH', 'GR', 'Chios Arpt', 0),\n array('JKV', 'US', 'Cherokee County Arpt', 0),\n array('JLD', 'SE', 'Landskrona Heliport', 0),\n array('JLN', 'US', 'Joplin Municipal Arpt', 0),\n array('JMALP', 'JM', 'alligator pond', 1),\n array('JMBLR', 'JM', 'black river', 1),\n array('JMBWN', 'JM', 'bowden', 1),\n array('JMC', 'US', 'Marin County Arpt', 0),\n array('JMFMH', 'JM', 'falmouth', 1),\n array('JMGGT', 'JM', 'georgetown', 1),\n array('JMH', 'US', 'Marriott Heliport', 0),\n array('JMK', 'GR', 'Mykonos Greece Arpt', 0),\n array('JMKIN', 'JM', 'kingston', 1),\n array('JMM', 'SE', 'Malmo Harbour Heliport', 0),\n array('JMMBJ', 'JM', 'montego bay', 1),\n array('JMOCJ', 'JM', 'ocho rios', 1),\n array('JMORC', 'JM', 'oraca-bessa', 1),\n array('JMPEV', 'JM', 'port esquivel', 1),\n array('JMPKS', 'JM', 'port kaiser', 1),\n array('JMPMO', 'JM', 'port morant', 1),\n array('JMPOT', 'JM', 'port antonio', 1),\n array('JMPRH', 'JM', 'port rhoades', 1),\n array('JMPRO', 'JM', 'port royal', 1),\n array('JMRIB', 'JM', 'rio bueno', 1),\n array('JMROP', 'JM', 'rocky point', 1),\n array('JMS', 'US', 'Jamestown Arpt', 0),\n array('JMSAW', 'JM', 'st anns bay', 1),\n array('JMSLM', 'JM', 'savanna la mar', 1),\n array('JMSRI', 'JM', 'salt river', 1),\n array('JNB', 'ZA', 'Johannesburg International', 0),\n array('JNP', 'US', 'Newport Beach Heliport', 0),\n array('JNS', 'GL', 'Narsaq Heleport', 0),\n array('JNU', 'US', 'Juneau Arpt', 0),\n array('JNX', 'GR', 'Naxos Arpt', 0),\n array('JNZ', 'CN', 'Jinzhou Arpt', 0),\n array('JOAQB', 'JO', 'aqaba free zone', 1),\n array('JOAQJ', 'JO', 'aqaba (el akaba)', 1),\n array('JOE', 'FI', 'Joensuu Arpt', 0),\n array('JOG', 'ID', 'Adisutjipto Arpt', 0),\n array('JOI', 'BR', 'Cubatao Arpt', 0),\n array('JOR', 'US', 'Santa Ana Heliport', 0),\n array('JPA', 'BR', 'Castro Pinto Arpt', 0),\n array('JPABA', 'JP', 'abashiri', 1),\n array('JPABO', 'JP', 'aboshi hyogo', 1),\n array('JPABU', 'JP', 'aburatsu', 1),\n array('JPACH', 'JP', 'achisu', 1),\n array('JPAIK', 'JP', 'aikawa', 1),\n array('JPAIN', 'JP', 'ainoura', 1),\n array('JPAIO', 'JP', 'aioi', 1),\n array('JPAJX', 'JP', 'aja', 1),\n array('JPAKA', 'JP', 'akashi', 1),\n array('JPAKE', 'JP', 'akkeshi', 1),\n array('JPAKT', 'JP', 'akitsu', 1),\n array('JPAMA', 'JP', 'amagasaki', 1),\n array('JPANA', 'JP', 'anan', 1),\n array('JPANE', 'JP', 'anegasaki', 1),\n array('JPAOJ', 'JP', 'aomori', 1),\n array('JPAON', 'JP', 'aonae', 1),\n array('JPARA', 'JP', 'arari', 1),\n array('JPASJ', 'JP', 'amamioshima', 1),\n array('JPATM', 'JP', 'atsumi', 1),\n array('JPAXT', 'JP', 'akita', 1),\n array('JPBFS', 'JP', 'beppu-shinko', 1),\n array('JPBPU', 'JP', 'beppu', 1),\n array('JPCHB', 'JP', 'chiba', 1),\n array('JPCHI', 'JP', 'china', 1),\n array('JPCHO', 'JP', 'choshi', 1),\n array('JPCTA', 'JP', 'chita', 1),\n array('JPD', 'US', 'Burbank Heliport', 0),\n array('JPEMU', 'JP', 'emukai', 1),\n array('JPENO', 'JP', 'enoura', 1),\n array('JPESI', 'JP', 'esashi', 1),\n array('JPETA', 'JP', 'etajima', 1),\n array('JPFHR', 'JP', 'furuhira', 1),\n array('JPFKJ', 'JP', 'fukui', 1),\n array('JPFKM', 'JP', 'fukushima', 1),\n array('JPFKS', 'JP', 'fukushima', 1),\n array('JPFKY', 'JP', 'fukuyama', 1),\n array('JPFNB', 'JP', 'funabashi', 1),\n array('JPFNK', 'JP', 'funakawa', 1),\n array('JPFSK', 'JP', 'fushiki', 1),\n array('JPFUJ', 'JP', 'fukue', 1),\n array('JPFUT', 'JP', 'futajima', 1),\n array('JPGAM', 'JP', 'gamagori', 1),\n array('JPGOI', 'JP', 'goi', 1),\n array('JPGON', 'JP', 'gonoura', 1),\n array('JPHAB', 'JP', 'habu', 1),\n array('JPHAG', 'JP', 'hagi', 1),\n array('JPHAN', 'JP', 'hannan (kishiwada)', 1),\n array('JPHAS', 'JP', 'hashihama', 1),\n array('JPHBK', 'JP', 'hibikinada', 1),\n array('JPHDA', 'JP', 'handa', 1),\n array('JPHED', 'JP', 'hedono', 1),\n array('JPHEI', 'JP', 'heianza', 1),\n array('JPHHE', 'JP', 'hachinohe', 1),\n array('JPHHR', 'JP', 'higashiharima', 1),\n array('JPHIA', 'JP', 'hiagari', 1),\n array('JPHIB', 'JP', 'hibi', 1),\n array('JPHIJ', 'JP', 'hiroshima', 1),\n array('JPHIK', 'JP', 'hiki', 1),\n array('JPHIM', 'JP', 'himeji', 1),\n array('JPHIN', 'JP', 'hinase', 1),\n array('JPHIR', 'JP', 'hiroo', 1),\n array('JPHIS', 'JP', 'hikoshima', 1),\n array('JPHKD', 'JP', 'hakodate', 1),\n array('JPHKN', 'JP', 'hekinan', 1),\n array('JPHKR', 'JP', 'hikari', 1),\n array('JPHKS', 'JP', 'hakatashima', 1),\n array('JPHKT', 'JP', 'hakata', 1),\n array('JPHMD', 'JP', 'hamada', 1),\n array('JPHMM', 'JP', 'hamamatsu', 1),\n array('JPHRA', 'JP', 'hirao', 1),\n array('JPHRH', 'JP', 'hirohata', 1),\n array('JPHRO', 'JP', 'hiro', 1),\n array('JPHRR', 'JP', 'hirara', 1),\n array('JPHSM', 'JP', 'hosojima', 1),\n array('JPHTC', 'JP', 'hitachi', 1),\n array('JPICH', 'JP', 'ichihara', 1),\n array('JPICK', 'JP', 'ichikawa', 1),\n array('JPIEJ', 'JP', 'iejima', 1),\n array('JPIHA', 'JP', 'niihama', 1),\n array('JPIIN', 'JP', 'nishinoomote', 1),\n array('JPIKE', 'JP', 'ikejima', 1),\n array('JPIMB', 'JP', 'imabari', 1),\n array('JPIMI', 'JP', 'imari', 1),\n array('JPINO', 'JP', 'inobe', 1),\n array('JPINS', 'JP', 'innoshima', 1),\n array('JPISE', 'JP', 'ise', 1),\n array('JPISG', 'JP', 'ishigakijima', 1),\n array('JPISI', 'JP', 'ishikari', 1),\n array('JPISM', 'JP', 'ishinomaki', 1),\n array('JPISS', 'JP', 'ishikariwan-shinko', 1),\n array('JPISZ', 'JP', 'isezaki', 1),\n array('JPITO', 'JP', 'itozaki', 1),\n array('JPIWK', 'JP', 'iwakuni', 1),\n array('JPIWN', 'JP', 'iwanai', 1),\n array('JPIWO', 'JP', 'iwojima', 1),\n array('JPIYM', 'JP', 'iyomishima', 1),\n array('JPIZH', 'JP', 'izuhara', 1),\n array('JPIZO', 'JP', 'izumo', 1),\n array('JPIZS', 'JP', 'izumisano', 1),\n array('JPKAD', 'JP', 'kaida', 1),\n array('JPKAI', 'JP', 'kainan', 1),\n array('JPKAM', 'JP', 'kametoku', 1),\n array('JPKAR', 'JP', 'karatsu', 1),\n array('JPKAS', 'JP', 'kase', 1),\n array('JPKAT', 'JP', 'katsuura', 1),\n array('JPKAW', 'JP', 'kawauchi', 1),\n array('JPKBI', 'JP', 'kobui', 1),\n array('JPKCZ', 'JP', 'kochi', 1),\n array('JPKGA', 'JP', 'kakogawa', 1),\n array('JPKHR', 'JP', 'kihara', 1),\n array('JPKII', 'JP', 'kiire', 1),\n array('JPKIJ', 'JP', 'niigata', 1),\n array('JPKIK', 'JP', 'kikuma', 1),\n array('JPKIN', 'JP', 'kinwan', 1),\n array('JPKIS', 'JP', 'kamaishi', 1),\n array('JPKJI', 'JP', 'kuji', 1),\n array('JPKJO', 'JP', 'kinjo', 1),\n array('JPKKJ', 'JP', 'kitakyushu', 1),\n array('JPKKM', 'JP', 'katakami', 1),\n array('JPKKW', 'JP', 'kanokawa', 1),\n array('JPKMA', 'JP', 'kama', 1),\n array('JPKMG', 'JP', 'kumagaya', 1),\n array('JPKMI', 'JP', 'miyazaki', 1),\n array('JPKMJ', 'JP', 'kumamoto', 1),\n array('JPKMS', 'JP', 'kumeshima', 1),\n array('JPKMT', 'JP', 'kimitsu', 1),\n array('JPKND', 'JP', 'kanda', 1),\n array('JPKNU', 'JP', 'kinuura', 1),\n array('JPKNY', 'JP', 'koniya', 1),\n array('JPKNZ', 'JP', 'kanazawa', 1),\n array('JPKOJ', 'JP', 'kagoshima', 1),\n array('JPKOK', 'JP', 'kokura', 1),\n array('JPKOM', 'JP', 'komatsujima', 1),\n array('JPKON', 'JP', 'konoshima', 1),\n array('JPKRE', 'JP', 'kure', 1),\n array('JPKRH', 'JP', 'kurihama', 1),\n array('JPKRS', 'JP', 'kurushima', 1),\n array('JPKSA', 'JP', 'kasaoka', 1),\n array('JPKSD', 'JP', 'kasado', 1),\n array('JPKSK', 'JP', 'kurosaki', 1),\n array('JPKSM', 'JP', 'kashima', 1),\n array('JPKSN', 'JP', 'kesennuma', 1),\n array('JPKTI', 'JP', 'kataichi', 1),\n array('JPKUC', 'JP', 'kuchinotsu', 1),\n array('JPKUD', 'JP', 'kudamatsu', 1),\n array('JPKUH', 'JP', 'kushiro', 1),\n array('JPKUR', 'JP', 'katsuura', 1),\n array('JPKUS', 'JP', 'kusudomari', 1),\n array('JPKWN', 'JP', 'kawanoe', 1),\n array('JPKWS', 'JP', 'kawasaki', 1),\n array('JPKWZ', 'JP', 'kashiwazaki', 1),\n array('JPKZU', 'JP', 'kisarazu', 1),\n array('JPMAE', 'JP', 'maebashi', 1),\n array('JPMAG', 'JP', 'mategata', 1),\n array('JPMAI', 'JP', 'maizuru', 1),\n array('JPMAK', 'JP', 'makiyama', 1),\n array('JPMAR', 'JP', 'marugame', 1),\n array('JPMAT', 'JP', 'matsushima', 1),\n array('JPMAW', 'JP', 'nishimaizuru', 1),\n array('JPMBE', 'JP', 'monbetsu', 1),\n array('JPMEI', 'JP', 'meihama', 1),\n array('JPMHR', 'JP', 'mihara', 1),\n array('JPMIH', 'JP', 'mihonoseki', 1),\n array('JPMII', 'JP', 'miike', 1),\n array('JPMIN', 'JP', 'minamata', 1),\n array('JPMIS', 'JP', 'misumi', 1),\n array('JPMIY', 'JP', 'miyazu', 1),\n array('JPMIZ', 'JP', 'mizushima', 1),\n array('JPMJR', 'JP', 'mitajiri', 1),\n array('JPMKS', 'JP', 'mitsukoshima', 1),\n array('JPMKW', 'JP', 'mikawa', 1),\n array('JPMMD', 'JP', 'minamidaitojima', 1),\n array('JPMMY', 'JP', 'miyakojima', 1),\n array('JPMNG', 'JP', 'matsunaga', 1),\n array('JPMOJ', 'JP', 'moji', 1),\n array('JPMOR', 'JP', 'mori', 1),\n array('JPMRT', 'JP', 'murotsu', 1),\n array('JPMSK', 'JP', 'mashike', 1),\n array('JPMTH', 'JP', 'mitsuhama', 1),\n array('JPMTM', 'JP', 'matsumae', 1),\n array('JPMTR', 'JP', 'mutsure', 1),\n array('JPMUK', 'JP', 'mukaishima', 1),\n array('JPMUR', 'JP', 'muroran', 1),\n array('JPMYJ', 'JP', 'matsuyama', 1),\n array('JPMYK', 'JP', 'miyako', 1),\n array('JPNAA', 'JP', 'nagaura', 1),\n array('JPNAD', 'JP', 'nadahama', 1),\n array('JPNAG', 'JP', 'nagahama shimane', 1),\n array('JPNAH', 'JP', 'naha', 1),\n array('JPNAK', 'JP', 'nakagusuku', 1),\n array('JPNAN', 'JP', 'nakanoseki (spelling)', 1),\n array('JPNAO', 'JP', 'naoetsu', 1),\n array('JPNAS', 'JP', 'naoshima', 1),\n array('JPNAZ', 'JP', 'naze', 1),\n array('JPNEM', 'JP', 'nemuro', 1),\n array('JPNGH', 'JP', 'nagahama ehime', 1),\n array('JPNGK', 'JP', 'nagakushi', 1),\n array('JPNGO', 'JP', 'nagoya', 1),\n array('JPNGS', 'JP', 'nagasaki', 1),\n array('JPNHJ', 'JP', 'noheji', 1),\n array('JPNHR', 'JP', 'nishihara', 1),\n array('JPNIC', 'JP', 'nichinan', 1),\n array('JPNNG', 'JP', 'nagano', 1),\n array('JPNNO', 'JP', 'nanao', 1),\n array('JPNOB', 'JP', 'nobeoka', 1),\n array('JPNRU', 'JP', 'naruto', 1),\n array('JPNSR', 'JP', 'noshiro', 1),\n array('JPNSU', 'JP', 'nagasu', 1),\n array('JPNUM', 'JP', 'numazu', 1),\n array('JPNYA', 'JP', 'nishinomiya', 1),\n array('JPNYO', 'JP', 'nanyo', 1),\n array('JPOBM', 'JP', 'obama', 1),\n array('JPOFT', 'JP', 'ofunato', 1),\n array('JPOGA', 'JP', 'ogasawara', 1),\n array('JPOGF', 'JP', 'ogifushi', 1),\n array('JPOGS', 'JP', 'ohgishima', 1),\n array('JPOIG', 'JP', 'ohigawa', 1),\n array('JPOIT', 'JP', 'oita', 1),\n array('JPOKI', 'JP', 'oki', 1),\n array('JPOKJ', 'JP', 'okayama', 1),\n array('JPOKT', 'JP', 'okitsu', 1),\n array('JPOMS', 'JP', 'omishima', 1),\n array('JPOMT', 'JP', 'ominato', 1),\n array('JPOMU', 'JP', 'omuta', 1),\n array('JPOMZ', 'JP', 'omaezaki', 1),\n array('JPONA', 'JP', 'iwaki (onahama)', 1),\n array('JPONB', 'JP', 'onnebetsu', 1),\n array('JPOND', 'JP', 'onoda', 1),\n array('JPONG', 'JP', 'onagawa', 1),\n array('JPONI', 'JP', 'onishi', 1),\n array('JPONO', 'JP', 'onomichi', 1),\n array('JPONU', 'JP', 'onuki', 1),\n array('JPOSA', 'JP', 'osaka', 1),\n array('JPOSM', 'JP', 'oshima', 1),\n array('JPOTK', 'JP', 'otake', 1),\n array('JPOTM', 'JP', 'otomi', 1),\n array('JPOTR', 'JP', 'otaru', 1),\n array('JPOTU', 'JP', 'otsu', 1),\n array('JPOWA', 'JP', 'owase', 1),\n array('JPPQT', 'JP', 'puerto quetzal', 1),\n array('JPR', 'BR', 'Ji Parana Arpt', 0),\n array('JPRMI', 'JP', 'rumoi', 1),\n array('JPSAE', 'JP', 'saeki', 1),\n array('JPSAG', 'JP', 'saganoseki', 1),\n array('JPSAI', 'JP', 'saigo', 1),\n array('JPSAJ', 'JP', 'saijo', 1),\n array('JPSAK', 'JP', 'sakai', 1),\n array('JPSAM', 'JP', 'samani', 1),\n array('JPSBK', 'JP', 'sakaisenboku (senboku)', 1),\n array('JPSBS', 'JP', 'shibushi', 1),\n array('JPSBU', 'JP', 'shibaura', 1),\n array('JPSDJ', 'JP', 'sendai', 1),\n array('JPSDO', 'JP', 'ryotsu (sado)', 1),\n array('JPSDS', 'JP', 'sendai-shinko', 1),\n array('JPSDU', 'JP', 'sodegaura', 1),\n array('JPSEN', 'JP', 'sendai', 1),\n array('JPSGI', 'JP', 'shigetomi', 1),\n array('JPSGM', 'JP', 'shiogama', 1),\n array('JPSHG', 'JP', 'shinagawa', 1),\n array('JPSHN', 'JP', 'shingu', 1),\n array('JPSHR', 'JP', 'shari', 1),\n array('JPSHS', 'JP', 'shimonoseki', 1),\n array('JPSKA', 'JP', 'shimokita', 1),\n array('JPSKD', 'JP', 'sakaide', 1),\n array('JPSKM', 'JP', 'shikama', 1),\n array('JPSKT', 'JP', 'sakata', 1),\n array('JPSKW', 'JP', 'shinkawa', 1),\n array('JPSMA', 'JP', 'souma', 1),\n array('JPSMB', 'JP', 'shimabara', 1),\n array('JPSMD', 'JP', 'shimoda', 1),\n array('JPSME', 'JP', 'same', 1),\n array('JPSMK', 'JP', 'samukawa', 1),\n array('JPSMM', 'JP', 'shimamaki', 1),\n array('JPSMN', 'JP', 'sakaiminato', 1),\n array('JPSMT', 'JP', 'shimotsu', 1),\n array('JPSMZ', 'JP', 'shimizu', 1),\n array('JPSPK', 'JP', 'sapporo', 1),\n array('JPSRK', 'JP', 'shirosaki', 1),\n array('JPSSB', 'JP', 'sasebo', 1),\n array('JPSSJ', 'JP', 'shisakajima', 1),\n array('JPSSK', 'JP', 'saisaki', 1),\n array('JPSTD', 'JP', 'setoda', 1),\n array('JPSTN', 'JP', 'setana', 1),\n array('JPSTO', 'JP', 'sakito', 1),\n array('JPSTU', 'JP', 'sutsu', 1),\n array('JPSTZ', 'JP', 'saitozaki', 1),\n array('JPSUK', 'JP', 'sukumo', 1),\n array('JPSUM', 'JP', 'suminoe', 1),\n array('JPSUZ', 'JP', 'suzaki', 1),\n array('JPSYZ', 'JP', 'shiriyazaki', 1),\n array('JPSZK', 'JP', 'senzaki', 1),\n array('JPSZU', 'JP', 'shizuura', 1),\n array('JPTAD', 'JP', 'tadotsu', 1),\n array('JPTAE', 'JP', 'tanabe', 1),\n array('JPTAH', 'JP', 'takahama', 1),\n array('JPTAK', 'JP', 'takamatsu', 1),\n array('JPTAM', 'JP', 'tamano', 1),\n array('JPTAN', 'JP', 'tanagawa', 1),\n array('JPTAU', 'JP', 'taura', 1),\n array('JPTBN', 'JP', 'tachibana', 1),\n array('JPTBT', 'JP', 'tobata', 1),\n array('JPTGM', 'JP', 'taguma', 1),\n array('JPTGO', 'JP', 'tagonoura', 1),\n array('JPTHM', 'JP', 'tanohama', 1),\n array('JPTHR', 'JP', 'takehara', 1),\n array('JPTHS', 'JP', 'toyohashi', 1),\n array('JPTKA', 'JP', 'tokai', 1),\n array('JPTKK', 'JP', 'takaoka', 1),\n array('JPTKM', 'JP', 'takuma', 1),\n array('JPTKR', 'JP', 'tokoro', 1),\n array('JPTKS', 'JP', 'tokushima', 1),\n array('JPTKT', 'JP', 'taketoyo', 1),\n array('JPTKY', 'JP', 'tokuyama', 1),\n array('JPTMI', 'JP', 'tsukumi', 1),\n array('JPTMK', 'JP', 'tomakomai', 1),\n array('JPTMR', 'JP', 'tomari', 1),\n array('JPTND', 'JP', 'tonda', 1),\n array('JPTNI', 'JP', 'tsuneishi', 1),\n array('JPTNU', 'JP', 'tanoura', 1),\n array('JPTOB', 'JP', 'toba', 1),\n array('JPTOG', 'JP', 'toki (togi)', 1),\n array('JPTOK', 'JP', 'tokachi', 1),\n array('JPTOM', 'JP', 'tomioka', 1),\n array('JPTON', 'JP', 'tonoura', 1),\n array('JPTOS', 'JP', 'toyamashinko', 1),\n array('JPTOT', 'JP', 'totoro', 1),\n array('JPTOU', 'JP', 'touyo', 1),\n array('JPTOY', 'JP', 'toyama', 1),\n array('JPTRG', 'JP', 'tsuruga', 1),\n array('JPTRK', 'JP', 'tsurikake', 1),\n array('JPTRM', 'JP', 'tsurumi', 1),\n array('JPTSG', 'JP', 'takasago', 1),\n array('JPTSK', 'JP', 'tsurusaki', 1),\n array('JPTSM', 'JP', 'takashima', 1),\n array('JPTSO', 'JP', 'teshio', 1),\n array('JPTSU', 'JP', 'tsu', 1),\n array('JPTSZ', 'JP', 'tosashimizu', 1),\n array('JPTTJ', 'JP', 'tottori', 1),\n array('JPTTY', 'JP', 'tateyama', 1),\n array('JPTYM', 'JP', 'tsuiyama', 1),\n array('JPTYO', 'JP', 'tokyo', 1),\n array('JPTZK', 'JP', 'tsuchizaki', 1),\n array('JPUBJ', 'JP', 'ube', 1),\n array('JPUCH', 'JP', 'uchiumi', 1),\n array('JPUCR', 'JP', 'uchiura', 1),\n array('JPUCU', 'JP', 'uchinoura', 1),\n array('JPUGU', 'JP', 'ugusu', 1),\n array('JPUJI', 'JP', 'ujina', 1),\n array('JPUKB', 'JP', 'kobe', 1),\n array('JPUNO', 'JP', 'uno', 1),\n array('JPUNT', 'JP', 'unten', 1),\n array('JPUOZ', 'JP', 'uozu', 1),\n array('JPURG', 'JP', 'uraga', 1),\n array('JPURK', 'JP', 'urakawa', 1),\n array('JPUSH', 'JP', 'ushimado', 1),\n array('JPUSJ', 'JP', 'usujiri', 1),\n array('JPUSK', 'JP', 'usuki', 1),\n array('JPUSU', 'JP', 'usunoura', 1),\n array('JPUWA', 'JP', 'uwajima', 1),\n array('JPWAD', 'JP', 'wadomari', 1),\n array('JPWAK', 'JP', 'wakayama', 1),\n array('JPWAM', 'JP', 'wakamatsu', 1),\n array('JPWJM', 'JP', 'wajima', 1),\n array('JPYAE', 'JP', 'yaeyama', 1),\n array('JPYAM', 'JP', 'yamakawa', 1),\n array('JPYAN', 'JP', 'yanai', 1),\n array('JPYAT', 'JP', 'yatsushiro', 1),\n array('JPYBT', 'JP', 'yubetsu', 1),\n array('JPYKK', 'JP', 'yokkaichi', 1),\n array('JPYKS', 'JP', 'yokoshima', 1),\n array('JPYMG', 'JP', 'yamaguchi', 1),\n array('JPYOK', 'JP', 'yokohama', 1),\n array('JPYOS', 'JP', 'yokosuka (nagaura)', 1),\n array('JPYOU', 'JP', 'youra', 1),\n array('JPYSU', 'JP', 'yoshiura', 1),\n array('JPYUR', 'JP', 'yura', 1),\n array('JPYWH', 'JP', 'yawatahama', 1),\n array('JPYWT', 'JP', 'yawata', 1),\n array('JPYZU', 'JP', 'yaizu', 1),\n array('JRE', 'US', 'East 60th St Hlpt', 0),\n array('JRO', 'TZ', 'Kilimanjaro Arpt', 0),\n array('JRS', 'IL', 'Atarot Airport', 0),\n array('JSI', 'GR', 'Skiathos Arpt', 0),\n array('JSP', 'KR', 'Seogwipo Heliport', 0),\n array('JST', 'US', 'Johnstown Cambria Arpt', 0),\n array('JSU', 'GL', 'Maniitsoq Heleport', 0),\n array('JSY', 'GR', 'Syros Island Arpt', 0),\n array('JSZ', 'FR', 'St Tropez Hlpt', 0),\n array('JTO', 'US', 'Thousand Oaks Hlpt', 0),\n array('JTR', 'GR', 'Santorini Arpt', 0),\n array('JUJ', 'AR', 'El Cadillal Airport', 0),\n array('JUL', 'PE', 'Juliaca Arpt', 0),\n array('JUO', 'CO', 'Jurado Arpt', 0),\n array('JVL', 'US', 'Rock County Arpt', 0),\n array('JWN', 'IR', 'Zanjan Arpt', 0),\n array('JXN', 'US', 'Jackson Reynolds Municipal', 0),\n array('JYV', 'FI', 'Jyvaskyla Arpt', 0),\n array('KAB', 'ZW', 'Kariba Arpt', 0),\n array('KAE', 'US', 'Kake Arpt', 0),\n array('KAJ', 'FI', 'Kajaani Airport', 0),\n array('KAN', 'NG', 'Aminu Kano Intl Arpt', 0),\n array('KAO', 'FI', 'Kuusamo', 0),\n array('KAT', 'NZ', 'Kaitaia Arpt', 0),\n array('KBJ', 'AU', 'Kings Canyon Arpt', 0),\n array('KBP', 'UA', 'Borispol Arpt', 0),\n array('KBR', 'MY', 'Pengkalan Chepa', 0),\n array('KBV', 'TH', 'Krabi Arpt', 0),\n array('KCE', 'AU', 'Collinsville Arpt', 0),\n array('KCH', 'MY', 'Kuching Airport', 0),\n array('KCK', 'US', 'Fairfax Municipal Arpt', 0),\n array('KCZ', 'JP', 'Kochi Airport', 0),\n array('KDK', 'US', 'Kodiak Municipal', 0),\n array('KEF', 'IS', 'Keflavik Intl Arpt', 0),\n array('KEH', 'US', 'Kenmore Air Harbor', 0),\n array('KEKIL', 'KE', 'kilindini', 1),\n array('KEKIS', 'KE', 'kisumu', 1),\n array('KEL', 'DE', 'Holtenau Arpt', 0),\n array('KELAU', 'KE', 'lamu', 1),\n array('KEM', 'FI', 'Kemi Tornio Arpt', 0),\n array('KEMBA', 'KE', 'mombasa', 1),\n array('KEMYD', 'KE', 'malindi', 1),\n array('KER', 'IR', 'Kerman Arpt', 0),\n array('KGC', 'AU', 'Kingscote Arpt', 0),\n array('KGD', 'RU', 'Kaliningrad Arpt', 0),\n array('KGI', 'AU', 'Kalgoorlie Arpt', 0),\n array('KGL', 'RW', 'Kayibanda Arpt', 0),\n array('KGS', 'GR', 'Kos Arpt', 0),\n array('KHCHE', 'KH', 'cheko', 1),\n array('KHD', 'IR', 'Khorramabad Arpt', 0),\n array('KHH', 'TW', 'Kaohsiung Intl', 0),\n array('KHI', 'PK', 'Quaid E Azam International', 0),\n array('KHKKO', 'KH', 'kas kong', 1),\n array('KHKOS', 'KH', 'kompongsom', 1),\n array('KHN', 'CN', 'Nanchang Airport', 0),\n array('KHPNH', 'KH', 'phnom penh', 1),\n array('KHSIH', 'KH', 'sihanoukville', 1),\n array('KHV', 'RU', 'Novyy Arpt', 0),\n array('KID', 'SE', 'Kristianstad Arpt', 0),\n array('KIFIS', 'KI', 'fanning islands', 1),\n array('KIJ', 'JP', 'Niigata Arpt', 0),\n array('KIM', 'ZA', 'Kimberley Arpt', 0),\n array('KIN', 'JM', 'Norman Manly Arpt', 0),\n array('KIPHO', 'KI', 'phoenix islands', 1),\n array('KIR', 'IE', 'Kerry County Arpt', 0),\n array('KIS', 'KE', 'Kisumu Arpt', 0),\n array('KITRW', 'KI', 'tarawa', 1),\n array('KIV', 'MD', 'Chisinau Arpt', 0),\n array('KIWNI', 'KI', 'washington islands', 1),\n array('KIX', 'JP', 'Kansai International Arpt', 0),\n array('KJA', 'RU', 'Krasnojarsk Arpt', 0),\n array('KJK', 'BE', 'Kortrijk Arpt', 0),\n array('KKC', 'TH', 'Khon Kaen Arpt', 0),\n array('KKE', 'NZ', 'Kerikeri Arpt', 0),\n array('KKJ', 'JP', 'Kokura Arpt', 0),\n array('KKN', 'NO', 'Hoeybuktmoen Arpt', 0),\n array('KKT', 'US', 'Kentland Arpt', 0),\n array('KLG', 'US', 'Kalskag Municipal Arpt', 0),\n array('KLJ', 'LT', 'Klaipeda Arpt', 0),\n array('KLO', 'PH', 'Kalibo Arpt', 0),\n array('KLR', 'SE', 'Kalmar Arpt', 0),\n array('KLT', 'DE', 'Kaiserslautern Arpt', 0),\n array('KLU', 'AT', 'Klagenfurt Arpt', 0),\n array('KLV', 'CZ', 'Karlovy Vary Arpt', 0),\n array('KLW', 'US', 'Klawock Arpt', 0),\n array('KLX', 'GR', 'Kalamata Airport', 0),\n array('KMC', 'SA', 'King Khalid Military Airport', 0),\n array('KMDZA', 'KM', 'dzaoudzi', 1),\n array('KMFOU', 'KM', 'foumbouni', 1),\n array('KMG', 'CN', 'Kunming Airport', 0),\n array('KMI', 'JP', 'Miyazaki Arpt', 0),\n array('KMJ', 'JP', 'Kumamoto Airport', 0),\n array('KMMMO', 'KM', 'mamoutsou', 1),\n array('KMMUT', 'KM', 'mutsamudu', 1),\n array('KMQ', 'JP', 'Komatsu Airport', 0),\n array('KMW', 'RU', 'Kostroma Arpt', 0),\n array('KMX', 'SA', 'Khamis Mushait Arpt', 0),\n array('KMYVA', 'KM', 'moroni', 1),\n array('KNA', 'CL', 'Vina Del Mar Arpt', 0),\n array('KNBAS', 'KN', 'basseterre st kitts', 1),\n array('KNF', 'GB', 'Marham Raf', 0),\n array('KNH', 'TW', 'Shang Yi Arpt', 0),\n array('KNNEV', 'KN', 'charlestown nevis', 1),\n array('KNS', 'AU', 'King Island Arpt', 0),\n array('KNT', 'US', 'Kennett Municipal Arpt', 0),\n array('KNX', 'AU', 'Kununurra Airport', 0),\n array('KOA', 'US', 'Keahole Arpt', 0),\n array('KOB', 'CM', 'Koutaba Arpt', 0),\n array('KOC', 'NC', 'Koumac Arpt', 0),\n array('KOI', 'GB', 'Kirkwall Arpt', 0),\n array('KOJ', 'JP', 'Kagoshima Arpt', 0),\n array('KOK', 'FI', 'Kokkola Arpt', 0),\n array('KOP', 'TH', 'Nakhon Phanom Arpt', 0),\n array('KOR', 'PG', 'Kokoro Arpt', 0),\n array('KPCHO', 'KP', 'chongjin', 1),\n array('KPD', 'US', 'King Of Prussia Arpt', 0),\n array('KPGEN', 'KP', 'gensan', 1),\n array('KPHAE', 'KP', 'haeju', 1),\n array('KPHGM', 'KP', 'hungnam', 1),\n array('KPNAM', 'KP', 'nampo', 1),\n array('KPO', 'KR', 'Pohang Arpt', 0),\n array('KPS', 'AU', 'Kempsey Arpt', 0),\n array('KPSON', 'KP', 'songjin', 1),\n array('KPWON', 'KP', 'wonsan', 1),\n array('KRBSN', 'KR', 'busan', 1),\n array('KRCHA', 'KR', 'cheju', 1),\n array('KRCHG', 'KR', 'changhang', 1),\n array('KRF', 'SE', 'Kramfors Arpt', 0),\n array('KRINC', 'KR', 'inchon', 1),\n array('KRK', 'PL', 'John Paul 11 Balice Intl', 0),\n array('KRKAN', 'KR', 'kwangyang', 1),\n array('KRKEA', 'KR', 'korea', 1),\n array('KRKHN', 'KR', 'kohyon', 1),\n array('KRKJE', 'KR', 'koje', 1),\n array('KRKOJ', 'KR', 'kojong', 1),\n array('KRKPO', 'KR', 'pohang', 1),\n array('KRKUV', 'KR', 'kunsan', 1),\n array('KRMAS', 'KR', 'masan', 1),\n array('KRMIP', 'KR', 'mipo', 1),\n array('KRMOK', 'KR', 'mokpo', 1),\n array('KRMUK', 'KR', 'mukho', 1),\n array('KRN', 'SE', 'Kiruna Airport', 0),\n array('KROKK', 'KR', 'okkye', 1),\n array('KROKP', 'KR', 'okpo', 1),\n array('KRONS', 'KR', 'onsan', 1),\n array('KRP', 'DK', 'Karup Arpt', 0),\n array('KRPTK', 'KR', 'pyongtaek', 1),\n array('KRPUS', 'KR', 'pusan', 1),\n array('KRR', 'RU', 'Krasnodar Arpt', 0),\n array('KRS', 'NO', 'Kjevik Airport', 0),\n array('KRSCP', 'KR', 'samchonpo', 1),\n array('KRSHO', 'KR', 'sokcho', 1),\n array('KRSOL', 'KR', 'seoul', 1),\n array('KRSPO', 'KR', 'sogwipo', 1),\n array('KRSUK', 'KR', 'samchok', 1),\n array('KRT', 'SD', 'Civil Arpt', 0),\n array('KRTGH', 'KR', 'tonghae', 1),\n array('KRTSN', 'KR', 'taesan', 1),\n array('KRTYG', 'KR', 'tongyoung', 1),\n array('KRUSN', 'KR', 'ulsan', 1),\n array('KRW', 'TM', 'Turkmanbashi Arpt', 0),\n array('KRWND', 'KR', 'wando', 1),\n array('KRYOS', 'KR', 'yosu', 1),\n array('KSC', 'SK', 'Barca Arpt', 0),\n array('KSD', 'SE', 'Karlstad Arpt', 0),\n array('KSF', 'DE', 'Kassel Calden Arpt', 0),\n array('KSH', 'IR', 'Kermanshah Arpt', 0),\n array('KSO', 'GR', 'Aristoteles Arpt', 0),\n array('KSU', 'NO', 'Kvernberget Arpt', 0),\n array('KSW', 'IL', 'Kiryat Shmona Arpt', 0),\n array('KTA', 'AU', 'Karratha Airport', 0),\n array('KTE', 'MY', 'Kertech Arpt', 0),\n array('KTM', 'NP', 'Tribuvan Arpt', 0),\n array('KTN', 'US', 'Ketchikan Intl Arpt', 0),\n array('KTP', 'JM', 'Tinson Arpt', 0),\n array('KTR', 'AU', 'Tindal Airport', 0),\n array('KTS', 'US', 'Brevig Mission Arpt', 0),\n array('KTT', 'FI', 'Kittila Arpt', 0),\n array('KTW', 'PL', 'Pyrzowice', 0),\n array('KUA', 'MY', 'Kuantan Arpt', 0),\n array('KUB', 'BN', 'Kuala Belait Arpt', 0),\n array('KUF', 'RU', 'Samara Arpt', 0),\n array('KUH', 'JP', 'Kushiro Arpt', 0),\n array('KUL', 'MY', 'Kuala Lumpur International Arpt', 0),\n array('KUN', 'LT', 'Kaunas Arpt', 0),\n array('KUO', 'FI', 'Kuopio Arpt', 0),\n array('KUU', 'IN', 'Bhuntar Arpt', 0),\n array('KUV', 'KR', 'Kunsan Arpt', 0),\n array('KVA', 'GR', 'Megas Alexandros', 0),\n array('KVB', 'SE', 'Skovde Arpt', 0),\n array('KVG', 'PG', 'Kavieng Arpt', 0),\n array('KWA', 'MH', 'Kwajalein Arpt', 0),\n array('KWE', 'CN', 'Guiyang Arpt', 0),\n array('KWI', 'KW', 'Kuwait Intl', 0),\n array('KWJ', 'KR', 'Kwangju Arpt', 0),\n array('KWJAH', 'KW', 'jahran', 1),\n array('KWJBD', 'KW', 'jebel dhana', 1),\n array('KWJUA', 'KW', 'juaymah', 1),\n array('KWKWI', 'KW', 'kuwait', 1),\n array('KWKWM', 'KW', 'khor al mufatta', 1),\n array('KWL', 'CN', 'Guilin Airport', 0),\n array('KWMEA', 'KW', 'mina al ahmadi', 1),\n array('KWMIB', 'KW', 'mina abd allah', 1),\n array('KWMIS', 'KW', 'mina saud', 1),\n array('KWRAK', 'KW', 'ras al-khafji', 1),\n array('KWSAA', 'KW', 'shuaiba', 1),\n array('KWSWK', 'KW', 'shuwaikh', 1),\n array('KYA', 'TR', 'Konya Arpt', 0),\n array('KYGEC', 'KY', 'georgetown grand cayman', 1),\n array('KYL', 'US', 'Port Largo Arpt', 0),\n array('KYN', 'GB', 'Milton Keynes Rail Station', 0),\n array('KZN', 'RU', 'Kazan Arpt', 0),\n array('LAA', 'US', 'Lamar Arpt', 0),\n array('LAD', 'AO', 'Four De Fevereiro Arpt', 0),\n array('LAE', 'PG', 'Nadzab Arpt', 0),\n array('LAF', 'US', 'Lafayette Arpt', 0),\n array('LAI', 'FR', 'Servel Airport', 0),\n array('LAJ', 'BR', 'Lages Arpt', 0),\n array('LAL', 'US', 'Lakeland Arpt', 0),\n array('LAM', 'US', 'Los Alamos Municipal', 0),\n array('LAN', 'US', 'Lansing Arpt', 0),\n array('LAP', 'MX', 'Aeropuerto Gen Marquez De Leon', 0),\n array('LAR', 'US', 'General Brees Fld', 0),\n array('LAS', 'US', 'McCarran Intl', 0),\n array('LAW', 'US', 'Lawton Municipal', 0),\n array('LAX', 'US', 'Los Angeles', 0),\n array('LAY', 'ZA', 'Ladysmith Arpt', 0),\n array('LBA', 'GB', 'Leeds Bradford Arpt', 0),\n array('LBB', 'US', 'Lubbock Intl', 0),\n array('LBBEY', 'LB', 'beirut', 1),\n array('LBC', 'DE', 'Blankensee Arpt', 0),\n array('LBCHK', 'LB', 'chekka', 1),\n array('LBE', 'US', 'Westmorland County', 0),\n array('LBF', 'US', 'Lee Bird Field', 0),\n array('LBG', 'FR', 'Le Bourget Arpt', 0),\n array('LBH', 'AU', 'Palm Beach Arpt', 0),\n array('LBI', 'FR', 'Le Sequestre Arpt', 0),\n array('LBJIE', 'LB', 'jieh', 1),\n array('LBKHA', 'LB', 'khalde', 1),\n array('LBKYE', 'LB', 'tripoli', 1),\n array('LBL', 'US', 'Liberal Municipal', 0),\n array('LBOUZ', 'LB', 'ouzai', 1),\n array('LBS', 'FJ', 'Labasa Arpt', 0),\n array('LBSAY', 'LB', 'sayda', 1),\n array('LBSDN', 'LB', 'sidon', 1),\n array('LBSEL', 'LB', 'selaata', 1),\n array('LBSUR', 'LB', 'sur (tyre)', 1),\n array('LBT', 'US', 'Lumberton Arpt', 0),\n array('LBU', 'MY', 'Labuan Arpt', 0),\n array('LBV', 'GA', 'Libreville Arpt', 0),\n array('LBY', 'FR', 'Montoir Arpt', 0),\n array('LBZHR', 'LB', 'zahrani terminal', 1),\n array('LCA', 'CY', 'Larnaca Intl', 0),\n array('LCC', 'IT', 'Galatina Arpt', 0),\n array('LCCDS', 'LC', 'cul de sac', 1),\n array('LCE', 'HN', 'Goloson Intl Arpt', 0),\n array('LCF', 'GT', 'Las Vegas Airport', 0),\n array('LCG', 'ES', 'La Coruna Arpt', 0),\n array('LCH', 'US', 'Lake Charles Municipal', 0),\n array('LCI', 'US', 'Laconia Municipal Arpt', 0),\n array('LCJ', 'PL', 'Lodz Lublinek Arpt', 0),\n array('LCK', 'US', 'Rickenbacker Intl Arpt', 0),\n array('LCSLU', 'LC', 'castries (st lucia)', 1),\n array('LCVIF', 'LC', 'vieux fort', 1),\n array('LCY', 'GB', 'London City Arpt', 0),\n array('LDB', 'BR', 'Londrina Arpt', 0),\n array('LDE', 'FR', 'Tarbes Intl Arpt', 0),\n array('LDH', 'AU', 'Lord Howe Island Arpt', 0),\n array('LDJ', 'US', 'Linden Municipal', 0),\n array('LDK', 'SE', 'Hovby Airport', 0),\n array('LDU', 'MY', 'Lahad Datu Arpt', 0),\n array('LDY', 'GB', 'Eglinton Arpt', 0),\n array('LEA', 'AU', 'Learmonth Arpt', 0),\n array('LEB', 'US', 'Lebanon Regional', 0),\n array('LEC', 'BR', 'Chapada Diamantina Arpt', 0),\n array('LED', 'RU', 'Pulkovo Airport', 0),\n array('LEE', 'US', 'Leesburg Municipal Arpt', 0),\n array('LEH', 'FR', 'Octeville Arpt', 0),\n array('LEI', 'ES', 'Almeria Arpt', 0),\n array('LEJ', 'DE', 'Leipzig Arpt', 0),\n array('LEN', 'ES', 'Leon Arpt', 0),\n array('LEQ', 'GB', 'St Just Arpt', 0),\n array('LER', 'AU', 'Leinster Arpt', 0),\n array('LES', 'LS', 'Lesobeng Arpt', 0),\n array('LET', 'CO', 'General A V Cobo Arpt', 0),\n array('LEW', 'US', 'Auburn Lewiston Arpt', 0),\n array('LEX', 'US', 'Blue Grass Field', 0),\n array('LEY', 'NL', 'Lelystad Arpt', 0),\n array('LFK', 'US', 'Angelina Cty Arpt', 0),\n array('LFT', 'US', 'Lafayette Municipal', 0),\n array('LFW', 'TG', 'Lome Airport', 0),\n array('LGA', 'US', 'La Guardia', 0),\n array('LGB', 'US', 'Long Beach Municipal', 0),\n array('LGG', 'BE', 'Bierset Airport', 0),\n array('LGK', 'MY', 'Langkawi Arpt', 0),\n array('LGU', 'US', 'Logan Arpt', 0),\n array('LGW', 'GB', 'Gatwick Arpt', 0),\n array('LHA', 'DE', 'Lahr Arpt', 0),\n array('LHE', 'PK', 'Lahore Arpt', 0),\n array('LHG', 'AU', 'Lightning Ridge Arpt', 0),\n array('LHR', 'GB', 'Heathrow', 0),\n array('LIA', 'CN', 'Lianping Arpt', 0),\n array('LIF', 'NC', 'Lifou Arpt', 0),\n array('LIG', 'FR', 'Bellegarde Arpt', 0),\n array('LIH', 'US', 'Lihue Municipal', 0),\n array('LIL', 'FR', 'Lesquin Arpt', 0),\n array('LIM', 'PE', 'Jorge Chavez International Arpt', 0),\n array('LIN', 'IT', 'Linate Arpt', 0),\n array('LIO', 'CR', 'Limon Arpt', 0),\n array('LIR', 'CR', 'Liberia Arpt', 0),\n array('LIS', 'PT', 'Lisboa', 0),\n array('LIT', 'US', 'Little Rock Regional', 0),\n array('LJG', 'CN', 'Lijiang Arpt', 0),\n array('LJN', 'US', 'Lake Jackson Arpt', 0),\n array('LJU', 'SI', 'Brnik Airport', 0),\n array('LKBRW', 'LK', 'beruwala', 1),\n array('LKBTC', 'LK', 'batticoloa', 1),\n array('LKCMB', 'LK', 'colombo', 1),\n array('LKE', 'US', 'Lake Union Seaplane Base', 0),\n array('LKG', 'KE', 'Lokichoggio Arpt', 0),\n array('LKGAL', 'LK', 'galle', 1),\n array('LKH', 'MY', 'Long Akah Arpt', 0),\n array('LKHBA', 'LK', 'hambantota', 1),\n array('LKJAF', 'LK', 'jaffna', 1),\n array('LKKAL', 'LK', 'kalpitiya', 1),\n array('LKKAY', 'LK', 'kayts', 1),\n array('LKKNK', 'LK', 'kankesanturai', 1),\n array('LKL', 'NO', 'Banak Airport', 0),\n array('LKMAN', 'LK', 'mannar', 1),\n array('LKMUL', 'LK', 'mulativu', 1),\n array('LKN', 'NO', 'Leknes Arpt', 0),\n array('LKO', 'IN', 'Amausi Arpt', 0),\n array('LKPPE', 'LK', 'point pedro', 1),\n array('LKTAL', 'LK', 'talaimannar', 1),\n array('LKTRR', 'LK', 'trincomalee', 1),\n array('LLA', 'SE', 'Kallax Airport', 0),\n array('LLE', 'ZA', 'Municipal Arpt', 0),\n array('LLF', 'CN', 'Ling Ling Arpt', 0),\n array('LLU', 'GL', 'Alluitsup Paa Arpt', 0),\n array('LLW', 'MW', 'Lilongwe Intl Arpt', 0),\n array('LLY', 'US', 'Burlington Country Arpt', 0),\n array('LME', 'FR', 'Arnage Arpt', 0),\n array('LMM', 'MX', 'Federal Los Mochis Arpt', 0),\n array('LMN', 'MY', 'Limbang Arpt', 0),\n array('LMT', 'US', 'Kingsley Field', 0),\n array('LNA', 'US', 'Palm Beach County Arpt', 0),\n array('LNK', 'US', 'Lincoln Municipal', 0),\n array('LNO', 'AU', 'Leonora Arpt', 0),\n array('LNS', 'US', 'Lancaster Arpt', 0),\n array('LNV', 'PG', 'Lihir Island Arpt', 0),\n array('LNY', 'US', 'Lanai Airport', 0),\n array('LNZ', 'AT', 'Hoersching Arpt', 0),\n array('LOM', 'MX', 'Francisco P V Y R', 0),\n array('LOS', 'NG', 'Murtala Muhammed Arpt', 0),\n array('LOV', 'MX', 'Monclova Arpt', 0),\n array('LOZ', 'US', 'Corbin London Arpt', 0),\n array('LPA', 'ES', 'Aeropuerto De Gran Canaria', 0),\n array('LPB', 'BO', 'El Alto Arpt', 0),\n array('LPC', 'US', 'Lompoc Arpt', 0),\n array('LPG', 'AR', 'La Plata Arpt', 0),\n array('LPI', 'SE', 'Saab Airport', 0),\n array('LPL', 'GB', 'Liverpool Arpt', 0),\n array('LPO', 'US', 'La Porte Arpt', 0),\n array('LPP', 'FI', 'Lappeenranta Arpt', 0),\n array('LPS', 'US', 'Lopez Island Arpt', 0),\n array('LPT', 'TH', 'Lampang Arpt', 0),\n array('LPX', 'LV', 'Liepaya Arpt', 0),\n array('LPY', 'FR', 'Loudes Airport', 0),\n array('LRCMT', 'LR', 'cape mount', 1),\n array('LRCPA', 'LR', 'cape palmas', 1),\n array('LRD', 'US', 'Laredo Intl', 0),\n array('LRE', 'AU', 'Longreach Arpt', 0),\n array('LRFIM', 'LR', 'fimibo', 1),\n array('LRGBS', 'LR', 'grand bassa', 1),\n array('LRGRE', 'LR', 'greenville', 1),\n array('LRH', 'FR', 'Laleu Airport', 0),\n array('LRHAR', 'LR', 'harper', 1),\n array('LRHBL', 'LR', 'harbel', 1),\n array('LRLOB', 'LR', 'lower buchanan', 1),\n array('LRM', 'DO', 'La Romana Arpt', 0),\n array('LRMAR', 'LR', 'marshall', 1),\n array('LRMLW', 'LR', 'monrovia', 1),\n array('LRROX', 'LR', 'robertsport', 1),\n array('LRRVC', 'LR', 'rivercess', 1),\n array('LRS', 'GR', 'Leros Arpt', 0),\n array('LRSAB', 'LR', 'sarioe bay', 1),\n array('LRSAZ', 'LR', 'sasstown', 1),\n array('LRSNI', 'LR', 'sinoe', 1),\n array('LRT', 'FR', 'Lann Bihoue Arpt', 0),\n array('LRTRT', 'LR', 'trade town', 1),\n array('LRU', 'US', 'Las Cruces Crawford Arpt', 0),\n array('LRUCN', 'LR', 'buchanan', 1),\n array('LSC', 'CL', 'La Florida', 0),\n array('LSE', 'US', 'La Crosse Municipal', 0),\n array('LSI', 'GB', 'Sumburgh Airport', 0),\n array('LSO', 'FR', 'Talmont Arpt', 0),\n array('LSP', 'VE', 'Josefa Camejo Arpt', 0),\n array('LSQ', 'CL', 'Maria Dolores Arpt', 0),\n array('LST', 'AU', 'Launceston Arpt', 0),\n array('LSY', 'AU', 'Lismore Airport', 0),\n array('LTA', 'ZA', 'Letaba Aprt', 0),\n array('LTK', 'SY', 'Hmelmin Airport', 0),\n array('LTKLJ', 'LT', 'klaipeda', 1),\n array('LTN', 'GB', 'Luton Arpt', 0),\n array('LTO', 'MX', 'Loreto Intl Arpt', 0),\n array('LTQ', 'FR', 'Le Touquet Arpt', 0),\n array('LTT', 'FR', 'La Mole Arpt', 0),\n array('LUG', 'CH', 'Agno Airport', 0),\n array('LUK', 'US', 'Cincinnati Municipal Arpt', 0),\n array('LUL', 'US', 'Hesler Noble Field', 0),\n array('LULUX', 'LU', 'luxembourg', 1),\n array('LUN', 'ZM', 'Lusaka Airport', 0),\n array('LUP', 'US', 'Kalaupapa Municipal', 0),\n array('LUQ', 'AR', 'San Luis Cty Arpt', 0),\n array('LUROD', 'LU', 'rodange', 1),\n array('LUX', 'LU', 'Luxembourg Arpt', 0),\n array('LVI', 'ZM', 'Livingstone Arpt', 0),\n array('LVK', 'US', 'Bron Airport', 0),\n array('LVLPX', 'LV', 'liepaya', 1),\n array('LVM', 'US', 'Mission Field', 0),\n array('LVO', 'AU', 'Laverton Airport', 0),\n array('LVRIX', 'LV', 'riga', 1),\n array('LVS', 'US', 'Las Vegas Arpt', 0),\n array('LVVNT', 'LV', 'ventspils', 1),\n array('LWB', 'US', 'Greenbrier Valley Arpt', 0),\n array('LWC', 'US', 'Lawrence Municipal', 0),\n array('LWK', 'GB', 'Tingwall Arpt', 0),\n array('LWM', 'US', 'Lawrence Arpt', 0),\n array('LWO', 'UA', 'Snilow Arpt', 0),\n array('LWS', 'US', 'Lewiston Nez Pierce Arpt', 0),\n array('LWT', 'US', 'Lewistown Municipal', 0),\n array('LWY', 'MY', 'Lawas Arpt', 0),\n array('LXN', 'US', 'Jim Kelley Field', 0),\n array('LXR', 'EG', 'Luxor Airport', 0),\n array('LXS', 'GR', 'Limnos Airport', 0),\n array('LYABA', 'LY', 'al bayda', 1),\n array('LYABK', 'LY', 'abu kammash', 1),\n array('LYAPO', 'LY', 'apollonia', 1),\n array('LYB', 'KY', 'Little Cayman Arpt', 0),\n array('LYBAR', 'LY', 'el bardia', 1),\n array('LYBEN', 'LY', 'bingazi (benghazi)', 1),\n array('LYBUA', 'LY', 'buert el hsun', 1),\n array('LYC', 'SE', 'Hedlunda Arpt', 0),\n array('LYDNF', 'LY', 'derna', 1),\n array('LYDRX', 'LY', 'darnah', 1),\n array('LYESI', 'LY', 'es sider', 1),\n array('LYH', 'US', 'Lynchburg Municipal', 0),\n array('LYKHO', 'LY', 'khoms', 1),\n array('LYLMQ', 'LY', 'marsa brega', 1),\n array('LYMEH', 'LY', 'marsa el hania', 1),\n array('LYMHR', 'LY', 'marsa el hariga', 1),\n array('LYMRA', 'LY', 'misurata', 1),\n array('LYN', 'FR', 'Bron Arpt', 0),\n array('LYR', 'NO', 'Svalbard Arpt', 0),\n array('LYRLA', 'LY', 'ras lanuf', 1),\n array('LYS', 'FR', 'Lyon Saint Exupery Arpt', 0),\n array('LYSOU', 'LY', 'soussah', 1),\n array('LYSRT', 'LY', 'sirte (surt)', 1),\n array('LYTAG', 'LY', 'tagiura', 1),\n array('LYTIP', 'LY', 'tripoli', 1),\n array('LYTOA', 'LY', 'toulmeitha', 1),\n array('LYTOB', 'LY', 'tobruk', 1),\n array('LYTUK', 'LY', 'tukrah', 1),\n array('LYU', 'US', 'Ely Municipal Arpt', 0),\n array('LYX', 'GB', 'Lydd Intl Arpt', 0),\n array('LYZAW', 'LY', 'zawia terminal (azzawiya)', 1),\n array('LYZLI', 'LY', 'zliten', 1),\n array('LYZUA', 'LY', 'zuara', 1),\n array('LZC', 'MX', 'Lazaro Cardenas Arpt', 0),\n array('LZH', 'CN', 'Liuzhou Airport', 0),\n array('MAA', 'IN', 'Chennai Arpt', 0),\n array('MAAGA', 'MA', 'agadir', 1),\n array('MAAHU', 'MA', 'al hoceima', 1),\n array('MAASI', 'MA', 'asilah', 1),\n array('MAAZE', 'MA', 'azemmour', 1),\n array('MAB', 'BR', 'Maraba Arpt', 0),\n array('MACAS', 'MA', 'casablanca', 1),\n array('MAD', 'ES', 'Barajas Arpt', 0),\n array('MAE', 'US', 'Madera Municipal Arpt', 0),\n array('MAELJ', 'MA', 'el jadida', 1),\n array('MAESS', 'MA', 'essaouira', 1),\n array('MAEUN', 'MA', 'laayoune (el aaiun)', 1),\n array('MAF', 'US', 'Midland Intl Arpt', 0),\n array('MAG', 'PG', 'Madang Arpt', 0),\n array('MAH', 'ES', 'Aerop De Menorca', 0),\n array('MAJ', 'MH', 'Amata Kabua Intl Arpt', 0),\n array('MALAR', 'MA', 'larache', 1),\n array('MAM', 'MX', 'Servando Canales Arpt', 0),\n array('MAMAZ', 'MA', 'mazagan', 1),\n array('MAMOG', 'MA', 'mogador', 1),\n array('MAMOH', 'MA', 'mohammedia', 1),\n array('MAN', 'GB', 'Manchester Intl', 0),\n array('MANDR', 'MA', 'nador', 1),\n array('MANNA', 'MA', 'kenitra (ex port lyautey)', 1),\n array('MAO', 'BR', 'Intl Arpt Eduardo Gomes', 0),\n array('MAQ', 'TH', 'Mae Sot Arpt', 0),\n array('MAR', 'VE', 'La Chinita Arpt', 0),\n array('MARBA', 'MA', 'rabat', 1),\n array('MAS', 'PG', 'Momote Arpt', 0),\n array('MASAL', 'MA', 'sale', 1),\n array('MASFI', 'MA', 'safi', 1),\n array('MATNG', 'MA', 'tangier', 1),\n array('MATTU', 'MA', 'tetuan', 1),\n array('MAVIL', 'MA', 'dakhla', 1),\n array('MAZ', 'US', 'Eugenio M De Hostos Arpt', 0),\n array('MBA', 'KE', 'Moi Intl', 0),\n array('MBD', 'ZA', 'Mmabatho International Arpt', 0),\n array('MBH', 'AU', 'Maryborough Arpt', 0),\n array('MBJ', 'JM', 'Sangster Arpt', 0),\n array('MBL', 'US', 'Manistee Arpt', 0),\n array('MBS', 'US', 'Saginaw Arpt', 0),\n array('MBW', 'AU', 'Moorabbin Arpt', 0),\n array('MBX', 'SI', 'Maribor Arpt', 0),\n array('MCE', 'US', 'Merced Municipal Arpt', 0),\n array('MCI', 'US', 'Kansas City Intl', 0),\n array('MCK', 'US', 'McCook Municipal', 0),\n array('MCM', 'MC', 'Hel De Monte Carlo Airport', 0),\n array('MCMCM', 'MC', 'monte carlo', 1),\n array('MCMON', 'MC', 'monaco', 1),\n array('MCN', 'US', 'Lewis B Wilson', 0),\n array('MCO', 'US', 'Orlando Intl Arpt', 0),\n array('MCP', 'BR', 'Macapa Intl Arpt', 0),\n array('MCT', 'OM', 'Seeb Intl', 0),\n array('MCU', 'FR', 'Gueret Arpt', 0),\n array('MCW', 'US', 'Mason City Municipal', 0),\n array('MCY', 'AU', 'Maroochydore Arpt', 0),\n array('MCZ', 'BR', 'Palmeres Airport', 0),\n array('MDC', 'ID', 'Samratulang Arpt', 0),\n array('MDE', 'CO', 'Jose Marie Cordova', 0),\n array('MDG', 'CN', 'Mudanjiang Arpt', 0),\n array('MDH', 'US', 'Southern Illinois Arpt', 0),\n array('MDL', 'MM', 'Annisaton Arpt', 0),\n array('MDQ', 'AR', 'Mar Del Plata Arpt', 0),\n array('MDT', 'US', 'Harrisburg Intl', 0),\n array('MDU', 'PG', 'Mendi Arpt', 0),\n array('MDW', 'US', 'Midway', 0),\n array('MDY', 'UM', 'Sand Island Field', 0),\n array('MDZ', 'AR', 'El Plumerillo Airport', 0),\n array('MEA', 'BR', 'Macae Airport', 0),\n array('MEB', 'AU', 'Essendon Arpt', 0),\n array('MEC', 'EC', 'Manta Arpt', 0),\n array('MED', 'SA', 'Prince Mohammad Bin Abdulaziz Arpt', 0),\n array('MEH', 'NO', 'Mehamn Arpt', 0),\n array('MEI', 'US', 'Key Field', 0),\n array('MEL', 'AU', 'Tullamarine Arpt', 0),\n array('MEM', 'US', 'Memphis Intl', 0),\n array('MES', 'ID', 'Polonia Airport', 0),\n array('MEU', 'BR', 'Monte Dourado Arpt', 0),\n array('MEV', 'US', 'Douglas County Arpt', 0),\n array('MEX', 'MX', 'Ciudad de México', 0),\n array('MFD', 'US', 'Mansfield Municipal', 0),\n array('MFE', 'US', 'Miller Intl', 0),\n array('MFH', 'US', 'Mesquite Arpt', 0),\n array('MFI', 'US', 'Marshfield Municipal Arpt', 0),\n array('MFK', 'TW', 'Matsu Arpt', 0),\n array('MFM', 'MO', 'Macau Arpt', 0),\n array('MFN', 'NZ', 'Milford Sound Arpt', 0),\n array('MFR', 'US', 'Medford Jackson Cty', 0),\n array('MGA', 'NI', 'Augusto C Sandino', 0),\n array('MGADK', 'MG', 'androka', 1),\n array('MGANM', 'MG', 'antalaha', 1),\n array('MGB', 'AU', 'Mount Gambier Arpt', 0),\n array('MGBIK', 'MG', 'brickaville', 1),\n array('MGBMD', 'MG', 'belo', 1),\n array('MGBPY', 'MG', 'besalampy', 1),\n array('MGBRR', 'MG', 'barren islands', 1),\n array('MGC', 'US', 'Michigan City Arpt', 0),\n array('MGDIE', 'MG', 'antsiranana', 1),\n array('MGDWB', 'MG', 'soalala', 1),\n array('MGE', 'US', 'Dobbins Air Force Base', 0),\n array('MGF', 'BR', 'Maringa Arpt', 0),\n array('MGFTU', 'MG', 'fort dauphin (toalagnaro)', 1),\n array('MGH', 'ZA', 'Margate Arpt', 0),\n array('MGHLV', 'MG', 'hell-ville', 1),\n array('MGIVA', 'MG', 'ambanja', 1),\n array('MGL', 'DE', 'Moenchen Gi Dus Exp', 0),\n array('MGM', 'US', 'Dannelly Field', 0),\n array('MGMJN', 'MG', 'majunga (mahajanga)', 1),\n array('MGMNJ', 'MG', 'mananjary', 1),\n array('MGMOB', 'MG', 'manombo', 1),\n array('MGMOQ', 'MG', 'morondava', 1),\n array('MGMXM', 'MG', 'morombe', 1),\n array('MGMXT', 'MG', 'maintirano', 1),\n array('MGNOS', 'MG', 'nossi-be', 1),\n array('MGNOV', 'MG', 'nosy-varika', 1),\n array('MGPSL', 'MG', 'port saint louis', 1),\n array('MGR', 'US', 'Moultrie Arpt', 0),\n array('MGRVA', 'MG', 'farafangana', 1),\n array('MGSVB', 'MG', 'sambava', 1),\n array('MGTLE', 'MG', 'tulear (toliara)', 1),\n array('MGTMM', 'MG', 'tamatave (toamasina)', 1),\n array('MGTOA', 'MG', 'toamasina', 1),\n array('MGV', 'AU', 'Margaret River Station Arpt', 0),\n array('MGVAT', 'MG', 'vatomandry', 1),\n array('MGVEH', 'MG', 'vehiperro', 1),\n array('MGVVB', 'MG', 'mahanoro', 1),\n array('MGW', 'US', 'Morgantown Municipal', 0),\n array('MGWMN', 'MG', 'maroantsetra', 1),\n array('MGWMR', 'MG', 'mananara', 1),\n array('MGWVK', 'MG', 'manakara', 1),\n array('MHD', 'IR', 'Mashad Arpt', 0),\n array('MHE', 'US', 'Mitchell Municipal', 0),\n array('MHG', 'DE', 'Mannheim Neuostheim', 0),\n array('MHH', 'BS', 'Marsh Harbour Intl Arpt', 0),\n array('MHK', 'US', 'Manhattan Municipal Arpt', 0),\n array('MHP', 'BY', 'Minsk Intl 2', 0),\n array('MHQ', 'FI', 'Mariehamn Arpt', 0),\n array('MHR', 'US', 'Mather Air Force Base', 0),\n array('MHT', 'US', 'Manchester Arpt', 0),\n array('MHTAR', 'MH', 'taroa', 1),\n array('MHU', 'AU', 'Mount Hotham Arpt', 0),\n array('MHV', 'US', 'Kern County Arpt', 0),\n array('MHZ', 'GB', 'Mildenhall Arpt', 0),\n array('MIA', 'US', 'Miami', 0),\n array('MID', 'MX', 'Merida Intl', 0),\n array('MIE', 'US', 'Johnson Field', 0),\n array('MIG', 'CN', 'Mian Yang Arpt', 0),\n array('MII', 'BR', 'Dr Gastao Vidigal', 0),\n array('MIK', 'FI', 'Mikkeli Aprt', 0),\n array('MIM', 'AU', 'Merimbula Arpt', 0),\n array('MIQ', 'US', 'Millard Airport', 0),\n array('MIR', 'TN', 'Habib Bourguiba Intl', 0),\n array('MIV', 'US', 'Millville Arpt', 0),\n array('MIW', 'US', 'Marshalltown Municipal', 0),\n array('MJD', 'PK', 'Mohenjodaro Arpt', 0),\n array('MJF', 'NO', 'Kjaerstad Arpt', 0),\n array('MJN', 'MG', 'Amborovy Arpt', 0),\n array('MJT', 'GR', 'Mytilene Arpt', 0),\n array('MJV', 'ES', 'San Javier Airport', 0),\n array('MJW', 'ZW', 'Mahenye Airfield', 0),\n array('MKA', 'CZ', 'Marianske Lazne Arpt', 0),\n array('MKC', 'US', 'Kansas City Municipal Arpt', 0),\n array('MKE', 'US', 'General Mitchell Intl Arpt', 0),\n array('MKG', 'US', 'Muskegon Cty Intl', 0),\n array('MKK', 'US', 'Hoolehua Municipal', 0),\n array('MKL', 'US', 'McKellar Fld', 0),\n array('MKM', 'MY', 'Mukah Arpt', 0),\n array('MKO', 'US', 'Davis Field', 0),\n array('MKR', 'AU', 'Meekatharra Arpt', 0),\n array('MKT', 'US', 'Mankato Municipal Arpt', 0),\n array('MKY', 'AU', 'Mackay Arpt', 0),\n array('MKZ', 'MY', 'Batu Berendum Arpt', 0),\n array('MLA', 'MT', 'Luqa Airport', 0),\n array('MLB', 'US', 'Melbourne Regional', 0),\n array('MLC', 'US', 'McAlester Municipal Arpt', 0),\n array('MLE', 'MV', 'Male Intl Arpt', 0),\n array('MLH', 'FR', 'Euroairport French', 0),\n array('MLI', 'US', 'Quad City Arpt', 0),\n array('MLM', 'MX', 'Michoacan Municipal Arpt', 0),\n array('MLN', 'ES', 'Melilla Arpt', 0),\n array('MLS', 'US', 'Miles City Municipal Arpt', 0),\n array('MLU', 'US', 'Monroe Regional', 0),\n array('MLW', 'LR', 'Sprigg Payne Arpt', 0),\n array('MMA', 'SE', 'Malmo Metropolitan Area Arpt', 0),\n array('MMAKY', 'MM', 'akyab (sittwe)', 1),\n array('MMB', 'JP', 'Memanbetsu Arpt', 0),\n array('MMBIL', 'MM', 'bilin', 1),\n array('MMBOG', 'MM', 'bogale', 1),\n array('MMBSX', 'MM', 'bassein', 1),\n array('MMC', 'MX', 'Ciudad Mante Arpt', 0),\n array('MME', 'GB', 'Teesside Arpt', 0),\n array('MMG', 'AU', 'Mount Magnet Arpt', 0),\n array('MMH', 'US', 'Mammoth Lakes Municipal', 0),\n array('MMHEB', 'MM', 'henzada', 1),\n array('MMINS', 'MM', 'insein', 1),\n array('MMJ', 'JP', 'Matsumoto Arpt', 0),\n array('MMK', 'RU', 'Murmansk Arpt', 0),\n array('MMKYA', 'MM', 'kyaikiat', 1),\n array('MMKYP', 'MM', 'kyaukpyu', 1),\n array('MML', 'US', 'Marshall Municipal', 0),\n array('MMM', 'AU', 'Middlemount Arpt', 0),\n array('MMMAR', 'MM', 'martaban', 1),\n array('MMMER', 'MM', 'mergui', 1),\n array('MMMNU', 'MM', 'mawlamyine (moulmein)', 1),\n array('MMMUR', 'MM', 'murdon', 1),\n array('MMO', 'CV', 'Vila Do Maio Arpt', 0),\n array('MMPEG', 'MM', 'pegu', 1),\n array('MMRGN', 'MM', 'yangon', 1),\n array('MMSNW', 'MM', 'thandwe (ex sandoway)', 1),\n array('MMTAS', 'MM', 'tah sala', 1),\n array('MMTAV', 'MM', 'tavoy', 1),\n array('MMTEN', 'MM', 'tenassesim', 1),\n array('MMTER', 'MM', 'terutao island', 1),\n array('MMTHA', 'MM', 'thaton', 1),\n array('MMU', 'US', 'Morristown Arpt', 0),\n array('MMVIC', 'MM', 'victoria point', 1),\n array('MMX', 'SE', 'Sturup Arpt', 0),\n array('MMXYE', 'MM', 'ye', 1),\n array('MMY', 'JP', 'Hirara Arpt', 0),\n array('MNI', 'DM', 'Bramble Arpt', 0),\n array('MNK', 'KI', 'Maiana Airport', 0),\n array('MNL', 'PH', 'Ninoy Aquino Intl', 0),\n array('MNM', 'US', 'Menominee County', 0),\n array('MNQ', 'AU', 'Monto Arpt', 0),\n array('MOB', 'US', 'Mobile Municipal', 0),\n array('MOC', 'BR', 'Montes Claros Arpt', 0),\n array('MOD', 'US', 'Harry Sham Fld', 0),\n array('MOL', 'NO', 'Aro Arpt', 0),\n array('MOMFM', 'MO', 'macau', 1),\n array('MON', 'NZ', 'Mount Cook Arpt', 0),\n array('MOP', 'US', 'Mt Pleasant Municipal', 0),\n array('MOQ', 'MG', 'Morondava Arpt', 0),\n array('MOT', 'US', 'Minot Intl', 0),\n array('MOU', 'US', 'Mountain Village Arpt', 0),\n array('MOZ', 'PF', 'Temae Airport', 0),\n array('MPB', 'US', 'Mpb Seaplane Base', 0),\n array('MPL', 'FR', 'Frejorgues Arpt', 0),\n array('MPM', 'MZ', 'Maputo Intl', 0),\n array('MPN', 'FK', 'Mount Pleasant Arpt', 0),\n array('MPQ', 'JO', 'Maan Arpt', 0),\n array('MPR', 'US', 'McPherson Arpt', 0),\n array('MPSPN', 'MP', 'saipan', 1),\n array('MPV', 'US', 'E F Knapp Arpt', 0),\n array('MQFDF', 'MQ', 'fort-de-france', 1),\n array('MQJ', 'TR', 'Merkez Arpt', 0),\n array('MQK', 'BO', 'San Matias Arpt', 0),\n array('MQL', 'AU', 'Mildura Arpt', 0),\n array('MQN', 'NO', 'Rossvoll', 0),\n array('MQSPI', 'MQ', 'st pierre', 1),\n array('MQT', 'US', 'Sawyer Intl Airport', 0),\n array('MQY', 'US', 'Smyrna Arpt', 0),\n array('MQZ', 'AU', 'Margaret River Arpt', 0),\n array('MRB', 'US', 'Martinsburgh Regional Arpt', 0),\n array('MRC', 'US', 'Maury Country Arpt', 0),\n array('MRD', 'VE', 'Alberto Carnevalli Arpt', 0),\n array('MRE', 'KE', 'Mara Lodges Arpt', 0),\n array('MRNDB', 'MR', 'nouadhibou', 1),\n array('MRNKC', 'MR', 'nouakchott', 1),\n array('MRO', 'NZ', 'Masterton Arpt', 0),\n array('MRPCE', 'MR', 'point central', 1),\n array('MRS', 'FR', 'Marseille Provence Arpt', 0),\n array('MRU', 'MU', 'Plaisance Arptt', 0),\n array('MRV', 'RU', 'Mineralnye Vody Arpt', 0),\n array('MRY', 'US', 'Monterey Peninsula', 0),\n array('MRZ', 'AU', 'Moree Arpt', 0),\n array('MSC', 'US', 'Falcon Field', 0),\n array('MSE', 'GB', 'Kent International Arpt', 0),\n array('MSJ', 'JP', 'Misawa Arpt', 0),\n array('MSL', 'US', 'Muscle Shoals Arpt', 0),\n array('MSN', 'US', 'Dane County Regional', 0),\n array('MSO', 'US', 'Missoula Intl', 0),\n array('MSP', 'US', 'Minneapolis St Paul Intl', 0),\n array('MSPLY', 'MS', 'plymouth', 1),\n array('MSQ', 'BY', 'Minsk Intl 1', 0),\n array('MSR', 'TR', 'Mus Arpt', 0),\n array('MSS', 'US', 'Richards Field', 0),\n array('MST', 'NL', 'Maastricht Aachen Arpt', 0),\n array('MSU', 'LS', 'Moshoeshoe Intl Arpt', 0),\n array('MSV', 'US', 'Catskills Sulivan', 0),\n array('MSY', 'US', 'Louis Armstrong Intl Arpt', 0),\n array('MTC', 'US', 'Selfridge Air Natl Guard', 0),\n array('MTH', 'US', 'Marathon Arpt', 0),\n array('MTJ', 'US', 'Montrose County', 0),\n array('MTL', 'AU', 'Maitland Airport', 0),\n array('MTMLA', 'MT', 'malta (valetta)', 1),\n array('MTO', 'US', 'Coles County', 0),\n array('MTP', 'US', 'Sky Portal Arpt', 0),\n array('MTR', 'CO', 'S Jeronimo Arpt', 0),\n array('MTS', 'SZ', 'Matsapha Intl Arpt', 0),\n array('MTT', 'MX', 'Minatitlan Municipal Arpt', 0),\n array('MTW', 'US', 'Manitowoc Municipal Arpt', 0),\n array('MTY', 'MX', 'Escobedo Arpt', 0),\n array('MUB', 'BW', 'Maun Arpt', 0),\n array('MUC', 'DE', 'Munich Intl Arpt', 0),\n array('MUE', 'US', 'Waimea Arpt', 0),\n array('MUN', 'VE', 'Quiriquire Arpt', 0),\n array('MUPLU', 'MU', 'port louis', 1),\n array('MUR', 'MY', 'Marudi Arpt', 0),\n array('MVB', 'GA', 'Franceville Mvengue Arpt', 0),\n array('MVC', 'US', 'Monroe County Arpt', 0),\n array('MVD', 'UY', 'Carrasco Arpt', 0),\n array('MVF', 'BR', 'Dixsept Rosado Arpt', 0),\n array('MVKEL', 'MV', 'kelai', 1),\n array('MVN', 'US', 'Mt Vernon Outland Arpt', 0),\n array('MVQ', 'BY', 'Mogilev Arpt', 0),\n array('MVR', 'CM', 'Salam Arpt', 0),\n array('MVY', 'US', 'Dukes County', 0),\n array('MVZ', 'ZW', 'Ft Victoria Arpt', 0),\n array('MWA', 'US', 'Williamson County', 0),\n array('MWH', 'US', 'Grant County', 0),\n array('MWO', 'US', 'Hook Field', 0),\n array('MWZ', 'TZ', 'Mwanza Arpt', 0),\n array('MXACA', 'MX', 'acapulco', 1),\n array('MXAOB', 'MX', 'alvaro obregon', 1),\n array('MXATM', 'MX', 'Altamira', 1),\n array('MXAVD', 'MX', 'alvarado', 1),\n array('MXCID', 'MX', 'cedros island', 1),\n array('MXCME', 'MX', 'ciudad del carmen', 1),\n array('MXCOA', 'MX', 'coatzacoalcos', 1),\n array('MXCPE', 'MX', 'campeche', 1),\n array('MXCTM', 'MX', 'chetumal', 1),\n array('MXCZM', 'MX', 'cozumel', 1),\n array('MXELD', 'MX', 'eldorado', 1),\n array('MXESE', 'MX', 'ensenada', 1),\n array('MXFRN', 'MX', 'frontera', 1),\n array('MXGYM', 'MX', 'guaymas', 1),\n array('MXISJ', 'MX', 'isla mujeres', 1),\n array('MXL', 'MX', 'Rodolfg Sachez Taboada', 0),\n array('MXLAP', 'MX', 'la paz', 1),\n array('MXLZC', 'MX', 'lazaro cardenas', 1),\n array('MXMID', 'MX', 'merida', 1),\n array('MXMRE', 'MX', 'morro redondo', 1),\n array('MXMTT', 'MX', 'minatitlan', 1),\n array('MXMZT', 'MX', 'mazatlan', 1),\n array('MXN', 'FR', 'Morlaix Arpt', 0),\n array('MXNAN', 'MX', 'nanchital', 1),\n array('MXNAU', 'MX', 'nautla', 1),\n array('MXP', 'IT', 'Malpensa Arpt', 0),\n array('MXPGO', 'MX', 'progreso', 1),\n array('MXPIB', 'MX', 'port isabel', 1),\n array('MXPMD', 'MX', 'puerto madero', 1),\n array('MXPMX', 'MX', 'puérto mexico', 1),\n array('MXPPE', 'MX', 'puerto penasco', 1),\n array('MXPVR', 'MX', 'puerto vallarta', 1),\n array('MXQRT', 'MX', 'queretaro', 1),\n array('MXRST', 'MX', 'rosarito terminal', 1),\n array('MXS', 'WS', 'Maota Arpt', 0),\n array('MXSBS', 'MX', 'san blas', 1),\n array('MXSCR', 'MX', 'san carlos', 1),\n array('MXSCX', 'MX', 'salina cruz', 1),\n array('MXSJC', 'MX', 'san juan de la costa', 1),\n array('MXSLO', 'MX', 'san lorenzo', 1),\n array('MXSMI', 'MX', 'isla san marcos', 1),\n array('MXSRL', 'MX', 'santa rosalia', 1),\n array('MXTAM', 'MX', 'tampico', 1),\n array('MXTCU', 'MX', 'tecuala', 1),\n array('MXTEN', 'MX', 'tenabo', 1),\n array('MXTIJ', 'MX', 'tijuana', 1),\n array('MXTPB', 'MX', 'topolobampo', 1),\n array('MXTUX', 'MX', 'tuxpan', 1),\n array('MXVER', 'MX', 'veracruz', 1),\n array('MXX', 'SE', 'Mora Arpt', 0),\n array('MXYUK', 'MX', 'yukalpeten', 1),\n array('MXZ', 'CN', 'Meixian Arpt', 0),\n array('MXZLO', 'MX', 'manzanillo', 1),\n array('MYA', 'AU', 'Moruya Arpt', 0),\n array('MYBAG', 'MY', 'bagan datok', 1),\n array('MYBAT', 'MY', 'batu pahat', 1),\n array('MYBAU', 'MY', 'bau sarawak', 1),\n array('MYBBA', 'MY', 'batu batu sabah', 1),\n array('MYBDV', 'MY', 'bandau sabah', 1),\n array('MYBEL', 'MY', 'beluran sabah', 1),\n array('MYBGG', 'MY', 'bunan gega sarawak', 1),\n array('MYBGU', 'MY', 'banggau sabah', 1),\n array('MYBIA', 'MY', 'biawak sarawak', 1),\n array('MYBKI', 'MY', 'kota kinabalu sabah', 1),\n array('MYBKP', 'MY', 'bakapit', 1),\n array('MYBLG', 'MY', 'belaga sarawak', 1),\n array('MYBLI', 'MY', 'batu lingtan sarawak', 1),\n array('MYBMA', 'MY', 'bandar maharani', 1),\n array('MYBNG', 'MY', 'binatang sarawak', 1),\n array('MYBNT', 'MY', 'benut johor', 1),\n array('MYBSE', 'MY', 'sematan sarawak', 1),\n array('MYBST', 'MY', 'besut (kuala besut)', 1),\n array('MYBTG', 'MY', 'betong sarawak', 1),\n array('MYBTN', 'MY', 'bintangor', 1),\n array('MYBTU', 'MY', 'bintulu sarawak', 1),\n array('MYBWH', 'MY', 'bagan luar (butterworth)', 1),\n array('MYC', 'VE', 'Maracay Arpt', 0),\n array('MYD', 'KE', 'Malindi Arpt', 0),\n array('MYDDW', 'MY', 'danjindawai', 1),\n array('MYDGN', 'MY', 'dungun (kuala dungun)', 1),\n array('MYDRO', 'MY', 'daro sarawak', 1),\n array('MYEND', 'MY', 'endau', 1),\n array('MYF', 'US', 'Montgomery Field', 0),\n array('MYHUM', 'MY', 'hutan melingtang', 1),\n array('MYJ', 'JP', 'Matsuyama Airport', 0),\n array('MYJAM', 'MY', 'jambongan sabah', 1),\n array('MYJHB', 'MY', 'johor bahru', 1),\n array('MYKAB', 'MY', 'kabong sarawak', 1),\n array('MYKBA', 'MY', 'kuala baram', 1),\n array('MYKBD', 'MY', 'kota belud sabah', 1),\n array('MYKBE', 'MY', 'kuala belud sabah', 1),\n array('MYKBR', 'MY', 'kota bharu', 1),\n array('MYKBS', 'MY', 'kuala besar', 1),\n array('MYKCH', 'MY', 'kuching sarawak', 1),\n array('MYKEM', 'MY', 'kemaman', 1),\n array('MYKES', 'MY', 'kejit', 1),\n array('MYKET', 'MY', 'kerteh terminal', 1),\n array('MYKIJ', 'MY', 'kijal', 1),\n array('MYKIM', 'MY', 'kimanis sabah', 1),\n array('MYKKH', 'MY', 'kuala kedah', 1),\n array('MYKKP', 'MY', 'kukup', 1),\n array('MYKPS', 'MY', 'kuala perlis', 1),\n array('MYKPU', 'MY', 'kuala penyu sabah', 1),\n array('MYKRE', 'MY', 'krety', 1),\n array('MYKSD', 'MY', 'kuala sedili', 1),\n array('MYKSG', 'MY', 'kuala segama sabah', 1),\n array('MYKSL', 'MY', 'kuala selangor', 1),\n array('MYKTI', 'MY', 'kota tinggi', 1),\n array('MYKUA', 'MY', 'kuantan (tanjong gelang)', 1),\n array('MYKUD', 'MY', 'kudat sabah', 1),\n array('MYKUG', 'MY', 'kuala gula', 1),\n array('MYKUN', 'MY', 'kunak sabah', 1),\n array('MYL', 'US', 'Mccall Arpt', 0),\n array('MYLBH', 'MY', 'labuan hadji sabah', 1),\n array('MYLBU', 'MY', 'labuan sabah', 1),\n array('MYLDU', 'MY', 'lahad datu sabah', 1),\n array('MYLGG', 'MY', 'lingga sarawak', 1),\n array('MYLGK', 'MY', 'langkawi', 1),\n array('MYLMN', 'MY', 'limbang sarawak', 1),\n array('MYLUM', 'MY', 'lumut', 1),\n array('MYLUN', 'MY', 'lundu sarawak', 1),\n array('MYLUT', 'MY', 'lutong sarawak', 1),\n array('MYLWY', 'MY', 'lawas sarawak', 1),\n array('MYMEM', 'MY', 'mempakul sabah', 1),\n array('MYMEN', 'MY', 'menasi', 1),\n array('MYMEP', 'MY', 'mersing', 1),\n array('MYMKM', 'MY', 'mukah sarawak', 1),\n array('MYMKZ', 'MY', 'malacca', 1),\n array('MYMUA', 'MY', 'muar', 1),\n array('MYMUR', 'MY', 'marudi sarawak', 1),\n array('MYMYY', 'MY', 'miri sarawak', 1),\n array('MYP', 'TM', 'Mary Arpt', 0),\n array('MYPAL', 'MY', 'paloh sarawak', 1),\n array('MYPAN', 'MY', 'panchang', 1),\n array('MYPAS', 'MY', 'pasir gogok', 1),\n array('MYPBA', 'MY', 'pulau batik sabah', 1),\n array('MYPDI', 'MY', 'port dickson', 1),\n array('MYPED', 'MY', 'pedena', 1),\n array('MYPEN', 'MY', 'penang (georgetown)', 1),\n array('MYPGG', 'MY', 'penggarang/tanj.pengileh', 1),\n array('MYPGU', 'MY', 'pasir gudang johor', 1),\n array('MYPHI', 'MY', 'pasir hitam', 1),\n array('MYPKG', 'MY', 'port kelang (port swettenham) ', 1),\n array('MYPKK', 'MY', 'pengkalan kubor', 1),\n array('MYPOW', 'MY', 'pontian', 1),\n array('MYPPI', 'MY', 'pulau pisang', 1),\n array('MYPRA', 'MY', 'prai', 1),\n array('MYPRN', 'MY', 'kuala rompin', 1),\n array('MYPTB', 'MY', 'pulau tambisan sabah', 1),\n array('MYPUN', 'MY', 'punang sarawak', 1),\n array('MYQ', 'IN', 'Mysore Airport', 0),\n array('MYR', 'US', 'Myrtle Beach Jetway', 0),\n array('MYREJ', 'MY', 'rejang sarawak', 1),\n array('MYSAM', 'MY', 'sambu sarawak', 1),\n array('MYSAR', 'MY', 'sarikai sarawak', 1),\n array('MYSBW', 'MY', 'sibu sarawak', 1),\n array('MYSDK', 'MY', 'sandakan sabah', 1),\n array('MYSDM', 'MY', 'sindumin', 1),\n array('MYSDR', 'MY', 'sundar sarawak', 1),\n array('MYSEJ', 'MY', 'sejingkat sarawak', 1),\n array('MYSEL', 'MY', 'selalang sarawak', 1),\n array('MYSEP', 'MY', 'sepangar', 1),\n array('MYSHA', 'MY', 'shah alam', 1),\n array('MYSIJ', 'MY', 'sijingkat', 1),\n array('MYSIL', 'MY', 'silay', 1),\n array('MYSIR', 'MY', 'siran', 1),\n array('MYSME', 'MY', 'sri medan', 1),\n array('MYSMG', 'MY', 'simanggang sarawak', 1),\n array('MYSMJ', 'MY', 'simunjan sarawak', 1),\n array('MYSMM', 'MY', 'semporna sabah', 1),\n array('MYSPE', 'MY', 'sungai papan estate', 1),\n array('MYSPG', 'MY', 'simpangan sabah', 1),\n array('MYSPT', 'MY', 'sipitang sabah', 1),\n array('MYSRE', 'MY', 'sungai rengit', 1),\n array('MYSRK', 'MY', 'sirikin sarawak', 1),\n array('MYTAS', 'MY', 'telok intan', 1),\n array('MYTAT', 'MY', 'tapis terminal', 1),\n array('MYTBA', 'MY', 'tanjong baran', 1),\n array('MYTBE', 'MY', 'tanjong berhala', 1),\n array('MYTDA', 'MY', 'tanjong dawai', 1),\n array('MYTEN', 'MY', 'tengku sabah', 1),\n array('MYTGG', 'MY', 'kuala terengganu', 1),\n array('MYTKI', 'MY', 'tanjong kidurong', 1),\n array('MYTKP', 'MY', 'tanjong kupang', 1),\n array('MYTMB', 'MY', 'tumbum', 1),\n array('MYTMG', 'MY', 'tomanggong', 1),\n array('MYTMI', 'MY', 'tanjong mani sarawak', 1),\n array('MYTOD', 'MY', 'tioman', 1),\n array('MYTPP', 'MY', 'tanjong pelepas', 1),\n array('MYTRM', 'MY', 'telok ramunia', 1),\n array('MYTSR', 'MY', 'tanjong surat', 1),\n array('MYTTE', 'MY', 'tandjung tengelili', 1),\n array('MYTUM', 'MY', 'tumpat', 1),\n array('MYTUN', 'MY', 'tungku', 1),\n array('MYTWU', 'MY', 'tawau sabah', 1),\n array('MYV', 'US', 'Yuba County Arpt', 0),\n array('MYW', 'TZ', 'Mtwara Arpt', 0),\n array('MYWAL', 'MY', 'wallace bay sabah', 1),\n array('MYWES', 'MY', 'weston sabah', 1),\n array('MYY', 'MY', 'Miri Arpt', 0),\n array('MZANO', 'MZ', 'angoche', 1),\n array('MZBEL', 'MZ', 'bela vista', 1),\n array('MZBEW', 'MZ', 'beira', 1),\n array('MZG', 'TW', 'Makung Arpt', 0),\n array('MZI', 'ML', 'Mopti Airport', 0),\n array('MZIBO', 'MZ', 'ibo', 1),\n array('MZINE', 'MZ', 'chinde', 1),\n array('MZINH', 'MZ', 'inhambane', 1),\n array('MZM', 'FR', 'Frescaty Airport', 0),\n array('MZMAT', 'MZ', 'matola', 1),\n array('MZMCU', 'MZ', 'macuse', 1),\n array('MZMEM', 'MZ', 'memba', 1),\n array('MZMMW', 'MZ', 'moma', 1),\n array('MZMNC', 'MZ', 'nacala', 1),\n array('MZMOR', 'MZ', 'morrumbene', 1),\n array('MZMPM', 'MZ', 'maputo', 1),\n array('MZMSG', 'MZ', 'massinga', 1),\n array('MZMZB', 'MZ', 'mocimboa praia', 1),\n array('MZMZQ', 'MZ', 'mocambique', 1),\n array('MZNSO', 'MZ', 'nova sofala', 1),\n array('MZO', 'CU', 'Sierra Maestra Arpt', 0),\n array('MZPBE', 'MZ', 'porto belo', 1),\n array('MZPEB', 'MZ', 'pebane', 1),\n array('MZPOL', 'MZ', 'pemba', 1),\n array('MZT', 'MX', 'Buelina Arpt', 0),\n array('MZUEL', 'MZ', 'quelimane', 1),\n array('NAA', 'AU', 'Narrabri Arpt', 0),\n array('NAG', 'IN', 'Sonegaon Arpt', 0),\n array('NAK', 'TH', 'Nakhon Ratchasima Arpt', 0),\n array('NALUD', 'NA', 'luderitz', 1),\n array('NAN', 'FJ', 'Nadi Intl', 0),\n array('NAP', 'IT', 'Capodichino Arpt', 0),\n array('NAS', 'BS', 'Nassau Intl', 0),\n array('NAT', 'BR', 'Augusto Severo Intl Arpt', 0),\n array('NAV', 'TR', 'Nevsehir Arpt', 0),\n array('NAW', 'TH', 'Narathiwat Arpt', 0),\n array('NAWVB', 'NA', 'walvis bay', 1),\n array('NBC', 'RU', 'Nijnekamsk Arpt', 0),\n array('NBO', 'KE', 'Jomo Kenyatta Intl', 0),\n array('NCA', 'TC', 'North Caicos Municipal Arpt', 0),\n array('NCBUG', 'NC', 'baie ugue', 1),\n array('NCDUS', 'NC', 'ducos', 1),\n array('NCE', 'FR', 'Cote D Azur Arpt', 0),\n array('NCKOU', 'NC', 'kouaoua', 1),\n array('NCL', 'GB', 'Newcastle Arpt', 0),\n array('NCNAK', 'NC', 'nakety', 1),\n array('NCNEP', 'NC', 'nepoui', 1),\n array('NCNOU', 'NC', 'noumea', 1),\n array('NCPOR', 'NC', 'poro', 1),\n array('NCS', 'ZA', 'Newcastle Intl Arpt', 0),\n array('NCTHI', 'NC', 'thio', 1),\n array('NCTON', 'NC', 'tontouta', 1),\n array('NCY', 'FR', 'Annecy Meythet Arpt', 0),\n array('NDB', 'MR', 'Nouadhibou Arpt', 0),\n array('NDG', 'CN', 'Qiqihar Arpt', 0),\n array('NDJ', 'TD', 'N Djamena Arpt', 0),\n array('NDR', 'MA', 'Nador Arpt', 0),\n array('NDY', 'GB', 'Sanday Arpt', 0),\n array('NEV', 'KN', 'Nevis Airport', 0),\n array('NEW', 'US', 'New Lakefront Arpt', 0),\n array('NGA', 'AU', 'Young Arpt', 0),\n array('NGABO', 'NG', 'abonnema', 1),\n array('NGADO', 'NG', 'ado', 1),\n array('NGANT', 'NG', 'antan terminal', 1),\n array('NGAPP', 'NG', 'apapa', 1),\n array('NGB', 'CN', 'Ningbo Arpt', 0),\n array('NGBAD', 'NG', 'badagri', 1),\n array('NGBON', 'NG', 'bonny', 1),\n array('NGBRA', 'NG', 'brass', 1),\n array('NGBUR', 'NG', 'burutu', 1),\n array('NGCBQ', 'NG', 'calabar', 1),\n array('NGDEN', 'NG', 'denema', 1),\n array('NGE', 'CM', 'N Gaoundere Arpt', 0),\n array('NGEKE', 'NG', 'eket', 1),\n array('NGESC', 'NG', 'escravos', 1),\n array('NGFOR', 'NG', 'forcados', 1),\n array('NGGRP', 'NG', 'greek port', 1),\n array('NGKOK', 'NG', 'koko', 1),\n array('NGKUL', 'NG', 'kula', 1),\n array('NGLOS', 'NG', 'lagos', 1),\n array('NGO', 'JP', 'Komaki Arpt', 0),\n array('NGOBO', 'NG', 'que oboe terminal/eket', 1),\n array('NGOKR', 'NG', 'okrika', 1),\n array('NGONN', 'NG', 'onne', 1),\n array('NGORO', 'NG', 'oron', 1),\n array('NGPHC', 'NG', 'port harcourt', 1),\n array('NGS', 'JP', 'Nagasaki Airport', 0),\n array('NGSPL', 'NG', 'sapele', 1),\n array('NGTIN', 'NG', 'tincan/lagos', 1),\n array('NGWAR', 'NG', 'warri', 1),\n array('NHA', 'VN', 'Nha Trang Arpt', 0),\n array('NHZ', 'US', 'Naval Air Station', 0),\n array('NIBEF', 'NI', 'bluefields', 1),\n array('NICIO', 'NI', 'corinto', 1),\n array('NIELB', 'NI', 'el bluff', 1),\n array('NIM', 'NE', 'Niamey Airport', 0),\n array('NIP', 'US', 'Jacksonville Nas', 0),\n array('NIPRI', 'NI', 'prinzapolca', 1),\n array('NIPSN', 'NI', 'puerto sandino', 1),\n array('NIPUZ', 'NI', 'puerto cabezas', 1),\n array('NISJS', 'NI', 'san juan del sur', 1),\n array('NJC', 'RU', 'Nizhnevartovsk Arpt', 0),\n array('NKC', 'MR', 'Nouakchott Arpt', 0),\n array('NKG', 'CN', 'Nanjing Airport', 0),\n array('NLA', 'ZM', 'Ndola Arpt', 0),\n array('NLAAM', 'NL', 'aalsmeer', 1),\n array('NLABL', 'NL', 'alblasserdam', 1),\n array('NLAKL', 'NL', 'akersloot', 1),\n array('NLAMS', 'NL', 'amsterdam', 1),\n array('NLBEV', 'NL', 'beverwijk', 1),\n array('NLBRO', 'NL', 'brouwershaven', 1),\n array('NLBRS', 'NL', 'breskens', 1),\n array('NLCPI', 'NL', 'capelle aan den ijssel', 1),\n array('NLD', 'MX', 'Quetzalcoatl Intl', 0),\n array('NLDEV', 'NL', 'deventer', 1),\n array('NLDHR', 'NL', 'den helder', 1),\n array('NLDOK', 'NL', 'dokkum', 1),\n array('NLDOR', 'NL', 'dordrecht', 1),\n array('NLDZL', 'NL', 'delfzijl', 1),\n array('NLECD', 'NL', 'echteld', 1),\n array('NLEEM', 'NL', 'eemshaven', 1),\n array('NLGDR', 'NL', 'goedereede', 1),\n array('NLGRA', 'NL', 's-gravendeel', 1),\n array('NLGRQ', 'NL', 'groningen', 1),\n array('NLGRZ', 'NL', 's-gravenzande', 1),\n array('NLHAN', 'NL', 'hansweert', 1),\n array('NLHAR', 'NL', 'harlingen', 1),\n array('NLHGL', 'NL', 'hengelo', 1),\n array('NLHSL', 'NL', 'hellevoetsluis', 1),\n array('NLHTB', 'NL', 's-hertogenbosch', 1),\n array('NLHVH', 'NL', 'hoek van holland', 1),\n array('NLIJM', 'NL', 'ijmuiden', 1),\n array('NLK', 'AU', 'Norfolk Intl Airport', 0),\n array('NLLAN', 'NL', 'lauwersoog', 1),\n array('NLLIE', 'NL', 'lienden', 1),\n array('NLLIT', 'NL', 'lith', 1),\n array('NLLWR', 'NL', 'leeuwarden', 1),\n array('NLMEP', 'NL', 'meppel', 1),\n array('NLMID', 'NL', 'middelburg', 1),\n array('NLMIE', 'NL', 'mierlo', 1),\n array('NLMOE', 'NL', 'moerdijk', 1),\n array('NLMSB', 'NL', 'maasbracht', 1),\n array('NLMSL', 'NL', 'maassluis', 1),\n array('NLMST', 'NL', 'maastricht', 1),\n array('NLNDL', 'NL', 'noordwijk-aan-zee', 1),\n array('NLOOS', 'NL', 'oosterhout', 1),\n array('NLOSS', 'NL', 'oss', 1),\n array('NLP', 'ZA', 'Nelspruit Airport', 0),\n array('NLPER', 'NL', 'pernis', 1),\n array('NLROZ', 'NL', 'rozenburg', 1),\n array('NLRTM', 'NL', 'rotterdam', 1),\n array('NLSCE', 'NL', 'scheveningen', 1),\n array('NLSCI', 'NL', 'schiedam', 1),\n array('NLSKL', 'NL', 'sluiskil', 1),\n array('NLSPI', 'NL', 'spijkenisse', 1),\n array('NLSVG', 'NL', 'sas van gent', 1),\n array('NLTEX', 'NL', 'texel', 1),\n array('NLTNZ', 'NL', 'terneuzen', 1),\n array('NLULR', 'NL', 'ulrum', 1),\n array('NLVDN', 'NL', 'vredenduin', 1),\n array('NLVEL', 'NL', 'velsen', 1),\n array('NLVIE', 'NL', 'vierlingsbeek', 1),\n array('NLVLA', 'NL', 'vlaardingen', 1),\n array('NLVLI', 'NL', 'vlissingen', 1),\n array('NLWAA', 'NL', 'waalre', 1),\n array('NLWKD', 'NL', 'werkendam', 1),\n array('NLWTE', 'NL', 'west-terschelling', 1),\n array('NLWTZ', 'NL', 'westzaan', 1),\n array('NLZAA', 'NL', 'zaandam', 1),\n array('NLZIE', 'NL', 'zierikzee', 1),\n array('NLZWI', 'NL', 'zwijndrecht', 1),\n array('NNG', 'CN', 'Nanning Airport', 0),\n array('NNR', 'IE', 'Connemara Arpt', 0),\n array('NNT', 'TH', 'Nan Arpt', 0),\n array('NOA', 'AU', 'Nowra Arpt', 0),\n array('NOAAN', 'NO', 'årdal', 1),\n array('NOAAV', 'NO', 'alvik', 1),\n array('NOADN', 'NO', 'andenes', 1),\n array('NOAES', 'NO', 'ålesund', 1),\n array('NOAGO', 'NO', 'ågotnes', 1),\n array('NOALF', 'NO', 'alta', 1),\n array('NOAND', 'NO', 'åndalsnes', 1),\n array('NOARD', 'NO', 'årdalstangen', 1),\n array('NOARE', 'NO', 'arendal', 1),\n array('NOAVA', 'NO', 'åvaldnes', 1),\n array('NOBAR', 'NO', 'baerum', 1),\n array('NOBGO', 'NO', 'bergen', 1),\n array('NOBJF', 'NO', 'batsfjord', 1),\n array('NOBJX', 'NO', 'bjoerkas', 1),\n array('NOBKD', 'NO', 'brekstad', 1),\n array('NOBNN', 'NO', 'broennoeysund', 1),\n array('NOBOO', 'NO', 'bodoe', 1),\n array('NOBRV', 'NO', 'brattvag', 1),\n array('NOBUV', 'NO', 'buviken', 1),\n array('NOBVG', 'NO', 'berlevag', 1),\n array('NOBVK', 'NO', 'brevik', 1),\n array('NOC', 'IE', 'Knock International', 0),\n array('NODRK', 'NO', 'droebak', 1),\n array('NODRM', 'NO', 'drammen', 1),\n array('NOEGD', 'NO', 'egersund', 1),\n array('NOEYD', 'NO', 'eydehavn', 1),\n array('NOFAN', 'NO', 'farsund', 1),\n array('NOFAU', 'NO', 'fauske', 1),\n array('NOFAX', 'NO', 'fagerstrand', 1),\n array('NOFDE', 'NO', 'foerde', 1),\n array('NOFFD', 'NO', 'flekkefjord', 1),\n array('NOFJL', 'NO', 'fjelldal', 1),\n array('NOFNE', 'NO', 'finnsnes', 1),\n array('NOFOL', 'NO', 'follafoss', 1),\n array('NOFOS', 'NO', 'fosnavag', 1),\n array('NOFRK', 'NO', 'fredrikstad', 1),\n array('NOFRO', 'NO', 'floroe', 1),\n array('NOFRS', 'NO', 'forus', 1),\n array('NOG', 'MX', 'Nogales Arpt', 0),\n array('NOGLO', 'NO', 'glomfjord', 1),\n array('NOGRE', 'NO', 'greaker', 1),\n array('NOGTD', 'NO', 'grimstad', 1),\n array('NOHAL', 'NO', 'halden', 1),\n array('NOHAN', 'NO', 'halvorshavn', 1),\n array('NOHAU', 'NO', 'haugesund', 1),\n array('NOHFT', 'NO', 'hammerfest', 1),\n array('NOHOK', 'NO', 'hommelvik', 1),\n array('NOHOL', 'NO', 'holmestrand', 1),\n array('NOHOR', 'NO', 'horten', 1),\n array('NOHRD', 'NO', 'harstad', 1),\n array('NOHRI', 'NO', 'hareid', 1),\n array('NOHRY', 'NO', 'heroeya', 1),\n array('NOHUS', 'NO', 'husnes', 1),\n array('NOHVG', 'NO', 'honningsvag', 1),\n array('NOHVI', 'NO', 'havik', 1),\n array('NOHYR', 'NO', 'hoeyanger', 1),\n array('NOIKR', 'NO', 'ikornnes', 1),\n array('NOJLD', 'NO', 'joerpeland', 1),\n array('NOJSS', 'NO', 'joessinghamn', 1),\n array('NOKIV', 'NO', 'kinsarvik', 1),\n array('NOKJK', 'NO', 'kjoepsvik', 1),\n array('NOKKN', 'NO', 'kirkenes', 1),\n array('NOKMO', 'NO', 'kambo', 1),\n array('NOKMY', 'NO', 'karmoey', 1),\n array('NOKOP', 'NO', 'kopervik', 1),\n array('NOKPG', 'NO', 'kaupanger', 1),\n array('NOKRA', 'NO', 'krageroe', 1),\n array('NOKRS', 'NO', 'kristiansand', 1),\n array('NOKSU', 'NO', 'kristiansund', 1),\n array('NOKYR', 'NO', 'kyrksaeterora', 1),\n array('NOLAD', 'NO', 'langesund', 1),\n array('NOLAR', 'NO', 'larvik', 1),\n array('NOLDS', 'NO', 'lindesnes', 1),\n array('NOLER', 'NO', 'lervik', 1),\n array('NOLEV', 'NO', 'levanger', 1),\n array('NOLIL', 'NO', 'lillesand', 1),\n array('NOLOD', 'NO', 'lodingen', 1),\n array('NOLRI', 'NO', 'leirvik', 1),\n array('NOLRK', 'NO', 'larkollen', 1),\n array('NOLYR', 'NO', 'longyearbyen (cf sj lyr)', 1),\n array('NOLYS', 'NO', 'lysaker', 1),\n array('NOMAN', 'NO', 'mandal', 1),\n array('NOMAY', 'NO', 'maloey', 1),\n array('NOMEH', 'NO', 'mehamn', 1),\n array('NOMEL', 'NO', 'melbu', 1),\n array('NOMJF', 'NO', 'mosjoeen', 1),\n array('NOMLM', 'NO', 'malm', 1),\n array('NOMOL', 'NO', 'molde', 1),\n array('NOMON', 'NO', 'mongstad', 1),\n array('NOMQN', 'NO', 'mo i rana', 1),\n array('NOMRV', 'NO', 'murvik', 1),\n array('NOMSS', 'NO', 'moss', 1),\n array('NOMYO', 'NO', 'myre-oksnes', 1),\n array('NONFD', 'NO', 'nordfjordeid', 1),\n array('NONHS', 'NO', 'norheimsund', 1),\n array('NONKB', 'NO', 'nordkjosbotn', 1),\n array('NONVK', 'NO', 'narvik', 1),\n array('NOODD', 'NO', 'odda', 1),\n array('NOOLA', 'NO', 'orland', 1),\n array('NOORK', 'NO', 'orkanger', 1),\n array('NOOSL', 'NO', 'oslo', 1),\n array('NOOSY', 'NO', 'namsos', 1),\n array('NOOYE', 'NO', 'øye', 1),\n array('NOPOR', 'NO', 'porsgrunn', 1),\n array('NORAM', 'NO', 'ramsund', 1),\n array('NOREK', 'NO', 'rekefjord', 1),\n array('NORET', 'NO', 'rost', 1),\n array('NORIS', 'NO', 'risoer', 1),\n array('NORMJ', 'NO', 'ramfjordnes', 1),\n array('NORVK', 'NO', 'roervik', 1),\n array('NOS', 'MG', 'Fascene Arpt', 0),\n array('NOSAD', 'NO', 'sandefjord', 1),\n array('NOSAS', 'NO', 'sandnes', 1),\n array('NOSAU', 'NO', 'sauda', 1),\n array('NOSDZ', 'NO', 'stordal', 1),\n array('NOSGJ', 'NO', 'straumgjerde', 1),\n array('NOSJA', 'NO', 'senja', 1),\n array('NOSJO', 'NO', 'sjoeholt', 1),\n array('NOSKB', 'NO', 'skibotn', 1),\n array('NOSKE', 'NO', 'skien', 1),\n array('NOSKN', 'NO', 'stokmarknes', 1),\n array('NOSKU', 'NO', 'skudeneshavn', 1),\n array('NOSKX', 'NO', 'skogn', 1),\n array('NOSLG', 'NO', 'slagenstangen', 1),\n array('NOSLM', 'NO', 'slemmestad', 1),\n array('NOSLX', 'NO', 'sortland', 1),\n array('NOSOG', 'NO', 'sogndal', 1),\n array('NOSPG', 'NO', 'sarpsborg', 1),\n array('NOSPV', 'NO', 'spjelkavik', 1),\n array('NOSRN', 'NO', 'stranda', 1),\n array('NOSRP', 'NO', 'stord', 1),\n array('NOSRX', 'NO', 'sotra', 1),\n array('NOSSJ', 'NO', 'sandnessjoeen', 1),\n array('NOSTA', 'NO', 'stathelle', 1),\n array('NOSTE', 'NO', 'steinkjaer', 1),\n array('NOSTJ', 'NO', 'stjordal', 1),\n array('NOSTR', 'NO', 'stryn', 1),\n array('NOSTV', 'NO', 'stavern', 1),\n array('NOSUN', 'NO', 'sunndalsoera', 1),\n array('NOSUR', 'NO', 'surnadal', 1),\n array('NOSUZ', 'NO', 'stamsund', 1),\n array('NOSVE', 'NO', 'svelgen', 1),\n array('NOSVG', 'NO', 'stavanger', 1),\n array('NOSVJ', 'NO', 'svolvaer', 1),\n array('NOSVV', 'NO', 'svelvik', 1),\n array('NOSYK', 'NO', 'sykkylven', 1),\n array('NOTAE', 'NO', 'tananger', 1),\n array('NOTAU', 'NO', 'tau', 1),\n array('NOTHA', 'NO', 'thamshamn', 1),\n array('NOTJR', 'NO', 'tjoervag', 1),\n array('NOTOF', 'NO', 'tofte i hurum', 1),\n array('NOTOM', 'NO', 'toemrefjord', 1),\n array('NOTON', 'NO', 'toensberg', 1),\n array('NOTOS', 'NO', 'tromsoe', 1),\n array('NOTRD', 'NO', 'trondheim', 1),\n array('NOTSX', 'NO', 'tyssedal', 1),\n array('NOTVE', 'NO', 'tvedestrand', 1),\n array('NOU', 'NC', 'Tontouta Arpt', 0),\n array('NOULS', 'NO', 'ulsteinvik', 1),\n array('NOVAB', 'NO', 'varangerbotn', 1),\n array('NOVAK', 'NO', 'vaksdal', 1),\n array('NOVAN', 'NO', 'vanvikan-leksvik', 1),\n array('NOVAO', 'NO', 'vardoe', 1),\n array('NOVDA', 'NO', 'volda', 1),\n array('NOVDS', 'NO', 'vadsoe', 1),\n array('NOVER', 'NO', 'verdal', 1),\n array('NOVIS', 'NO', 'vik i sogn', 1),\n array('NOVST', 'NO', 'vestnes', 1),\n array('NPE', 'NZ', 'Hawkes Bay Arpt', 0),\n array('NPL', 'NZ', 'New Plymouth Arpt', 0),\n array('NPT', 'US', 'Newport State Arpt', 0),\n array('NQA', 'US', 'Memphis Naval Air Station', 0),\n array('NQI', 'US', 'Naval Air Station Arpt', 0),\n array('NQN', 'AR', 'Neuquen Airport', 0),\n array('NQT', 'GB', 'Nottingham Arpt', 0),\n array('NQY', 'GB', 'Newquay Civil Arpt', 0),\n array('NRA', 'AU', 'Narrandera Arpt', 0),\n array('NRINU', 'NR', 'nauru island', 1),\n array('NRK', 'SE', 'Kungsangen Arpt', 0),\n array('NRL', 'GB', 'North Ronaldsay Arpt', 0),\n array('NRT', 'JP', 'Narita', 0),\n array('NSA', 'AU', 'Noosa Airport', 0),\n array('NSB', 'BS', 'North Seaplane Base', 0),\n array('NSE', 'US', 'Whiting Field Nas', 0),\n array('NSI', 'CM', 'Nsimalen Arpt', 0),\n array('NSM', 'AU', 'Norseman Arpt', 0),\n array('NSN', 'NZ', 'Nelson Arpt', 0),\n array('NSO', 'AU', 'Scone Airport', 0),\n array('NST', 'TH', 'Nakhon Si Thammarat Arpt', 0),\n array('NTB', 'NO', 'Notodden Arpt', 0),\n array('NTE', 'FR', 'Nantes Atlantique', 0),\n array('NTL', 'AU', 'Williamtown Arpt', 0),\n array('NTO', 'CV', 'Santo Antao Arpt', 0),\n array('NTY', 'ZA', 'Pilansberg Arpt', 0),\n array('NUE', 'DE', 'Nuremberg Arpt', 0),\n array('NUIUE', 'NU', 'niue island', 1),\n array('NUL', 'US', 'Nulato Arpt', 0),\n array('NUQ', 'US', 'Moffett Field', 0),\n array('NUR', 'AU', 'Nullarbor Arpt', 0),\n array('NVK', 'NO', 'Framnes Arpt', 0),\n array('NVT', 'BR', 'Navegantes Arpt', 0),\n array('NWI', 'GB', 'Norwich Airport', 0),\n array('NYE', 'KE', 'Nyeri Arpt', 0),\n array('NYK', 'KE', 'Nanyuki Arpt', 0),\n array('NYN', 'AU', 'Nyngan Arpt', 0),\n array('NYO', 'SE', 'Skavsta Airport', 0),\n array('NYP', 'US', 'New York Pennsylvania Station', 0),\n array('NYU', 'MM', 'Nyaung U Arpt', 0),\n array('NZAKA', 'NZ', 'akaroa', 1),\n array('NZAKL', 'NZ', 'auckland', 1),\n array('NZASG', 'NZ', 'ashburton', 1),\n array('NZBHE', 'NZ', 'blenheim', 1),\n array('NZBLU', 'NZ', 'bluff', 1),\n array('NZC', 'US', 'Cecil Field Nas', 0),\n array('NZCHC', 'NZ', 'christchurch', 1),\n array('NZCHE', 'NZ', 'cheviot', 1),\n array('NZDEV', 'NZ', 'devonport', 1),\n array('NZDGO', 'NZ', 'doubtful sound', 1),\n array('NZDGR', 'NZ', 'dargaville', 1),\n array('NZDPC', 'NZ', 'deep cove', 1),\n array('NZDUD', 'NZ', 'dunedin', 1),\n array('NZFOR', 'NZ', 'fortrose', 1),\n array('NZFOX', 'NZ', 'foxton', 1),\n array('NZGIS', 'NZ', 'gisborne', 1),\n array('NZGMN', 'NZ', 'greymouth', 1),\n array('NZGOB', 'NZ', 'golden bay', 1),\n array('NZIVC', 'NZ', 'invercargill', 1),\n array('NZKAP', 'NZ', 'kaiapoi', 1),\n array('NZKBZ', 'NZ', 'kaikoura', 1),\n array('NZKTF', 'NZ', 'takaka', 1),\n array('NZKTG', 'NZ', 'kaitangata', 1),\n array('NZLYT', 'NZ', 'lyttelton', 1),\n array('NZMAP', 'NZ', 'marsden point', 1),\n array('NZMMU', 'NZ', 'mount maunganui', 1),\n array('NZMZP', 'NZ', 'motueka', 1),\n array('NZNPE', 'NZ', 'napier', 1),\n array('NZNPL', 'NZ', 'port taranaki/new plymouth', 1),\n array('NZNSN', 'NZ', 'nelson', 1),\n array('NZOAM', 'NZ', 'oamaru', 1),\n array('NZONE', 'NZ', 'onehunga (manukau harbour)', 1),\n array('NZOPX', 'NZ', 'opua (bay of island)', 1),\n array('NZORR', 'NZ', 'otago harbour', 1),\n array('NZPCN', 'NZ', 'picton', 1),\n array('NZPEO', 'NZ', 'penrose', 1),\n array('NZPOE', 'NZ', 'port chalmers (dunedin harbour', 1),\n array('NZTIU', 'NZ', 'timaru', 1),\n array('NZTKH', 'NZ', 'tarakohe', 1),\n array('NZTMZ', 'NZ', 'thames', 1),\n array('NZTRG', 'NZ', 'tauranga', 1),\n array('NZWAG', 'NZ', 'wanganui', 1),\n array('NZWAR', 'NZ', 'wairau', 1),\n array('NZWAT', 'NZ', 'waharoa', 1),\n array('NZWAV', 'NZ', 'waverley harbour', 1),\n array('NZWHE', 'NZ', 'whekenui', 1),\n array('NZWHN', 'NZ', 'whangaparapara', 1),\n array('NZWIR', 'NZ', 'wairoa', 1),\n array('NZWKI', 'NZ', 'waikari', 1),\n array('NZWKW', 'NZ', 'waikawa', 1),\n array('NZWLG', 'NZ', 'wellington', 1),\n array('NZWRE', 'NZ', 'whangarei', 1),\n array('NZWSZ', 'NZ', 'westport', 1),\n array('NZWTG', 'NZ', 'waitangi', 1),\n array('NZWTI', 'NZ', 'waitaki', 1),\n array('NZWWA', 'NZ', 'warkworth', 1),\n array('OAG', 'AU', 'Springhill Arpt', 0),\n array('OAJ', 'US', 'Albert J Ellis', 0),\n array('OAK', 'US', 'Metro Oakland Intl Arpt', 0),\n array('OAL', 'BR', 'Cacoal Arpt', 0),\n array('OAM', 'NZ', 'Oamaru Airport', 0),\n array('OAX', 'MX', 'Xoxocotlan Arpt', 0),\n array('OBE', 'US', 'Okeechobee County Arpt', 0),\n array('OBO', 'JP', 'Obihiro Arpt', 0),\n array('OCA', 'US', 'Ocean Reef Arpt', 0),\n array('OCE', 'US', 'Ocean City Airport', 0),\n array('OCF', 'US', 'Taylor Field Arpt', 0),\n array('OCJ', 'JM', 'Boscobel Arpt', 0),\n array('OCN', 'US', 'Oceanside Municipal Arpt', 0),\n array('ODB', 'ES', 'Cordoba Airport', 0),\n array('ODE', 'DK', 'Odense Airport', 0),\n array('ODS', 'UA', 'Central Arpt', 0),\n array('ODW', 'US', 'Oak Harbour Municipal', 0),\n array('OEA', 'US', 'Oneal Arpt', 0),\n array('OER', 'SE', 'Ornskoldsvik Arpt', 0),\n array('OFK', 'US', 'Karl Stefan Fld', 0),\n array('OGA', 'US', 'Searle Field', 0),\n array('OGB', 'US', 'Orangeburg Municpal', 0),\n array('OGD', 'US', 'Ogden Municipal', 0),\n array('OGG', 'US', 'Kahului Airport', 0),\n array('OGS', 'US', 'Ogdensburg Municipal', 0),\n array('OHD', 'MK', 'Ohrid Arpt', 0),\n array('OIA', 'BR', 'Ourilandia Arpt', 0),\n array('OIM', 'JP', 'Oshima Arpt', 0),\n array('OIT', 'JP', 'Oita Arpt', 0),\n array('OJC', 'US', 'Johnson Executive Arpt', 0),\n array('OKA', 'JP', 'Naha Field', 0),\n array('OKC', 'US', 'Will Rogers World Arpt', 0),\n array('OKD', 'JP', 'Okadama Arpt', 0),\n array('OKE', 'JP', 'Okino Erabu Arpt', 0),\n array('OKJ', 'JP', 'Okayama Arpt', 0),\n array('OKK', 'US', 'Kokomo Municipal', 0),\n array('OLB', 'IT', 'Costa Smeralda Arpt', 0),\n array('OLK', 'PY', 'Fuerte Olimpo Arpt', 0),\n array('OLM', 'US', 'Olympia Arpt', 0),\n array('OLP', 'AU', 'Olympic Dam Arpt', 0),\n array('OLS', 'US', 'International Arpt', 0),\n array('OLU', 'US', 'Columbus Arpt', 0),\n array('OMA', 'US', 'Eppley Airfield', 0),\n array('OME', 'US', 'Nome Arpt', 0),\n array('OMFAH', 'OM', 'fahal', 1),\n array('OMMCT', 'OM', 'muscat', 1),\n array('OMMFH', 'OM', 'min-al-fahal', 1),\n array('OMMUT', 'OM', 'muthra', 1),\n array('OMO', 'BA', 'Mostar Arpt', 0),\n array('OMOPQ', 'OM', 'port qaboos', 1),\n array('OMRAY', 'OM', 'raysut', 1),\n array('OMS', 'RU', 'Omsk Arpt', 0),\n array('OMSLL', 'OM', 'salalah', 1),\n array('OMSOH', 'OM', 'sohar', 1),\n array('ONH', 'US', 'Oneonta Municpal', 0),\n array('ONJ', 'JP', 'Odate Noshiro Arpt', 0),\n array('ONP', 'US', 'Newport Municipal Arpt', 0),\n array('ONT', 'US', 'Ontario Intl', 0),\n array('OOL', 'AU', 'Gold Coast Arpt', 0),\n array('OOM', 'AU', 'Cooma Airport', 0),\n array('OPA', 'IS', 'Kopasker Arpt', 0),\n array('OPF', 'US', 'Opa Locka Arpt', 0),\n array('OPO', 'PT', 'Porto Airport', 0),\n array('ORB', 'SE', 'Orebro Bofors Arpt', 0),\n array('ORD', 'US', 'O\\'Hare Intl Arpt', 0),\n array('ORF', 'US', 'Norfolk Intl Arpt', 0),\n array('ORG', 'SR', 'Zorg En Hoop Arpt', 0),\n array('ORH', 'US', 'Worcester Arpt', 0),\n array('ORK', 'IE', 'Cork International Arpt', 0),\n array('ORL', 'US', 'Herndon Arpt', 0),\n array('ORM', 'GB', 'Northampton Rail Station', 0),\n array('ORN', 'DZ', 'Es Senia', 0),\n array('ORQ', 'US', 'Norwalk Heliport', 0),\n array('ORS', 'AU', 'Waterport Arpt', 0),\n array('ORY', 'FR', 'Orly Arpt', 0),\n array('OSD', 'SE', 'Froesoe Airport', 0),\n array('OSH', 'US', 'Wittman Field', 0),\n array('OSK', 'SE', 'Oskarshamn', 0),\n array('OSL', 'NO', 'Oslo Arpt', 0),\n array('OSR', 'CZ', 'Mosnov Arpt', 0),\n array('OST', 'BE', 'Ostend Airport', 0),\n array('OSU', 'US', 'Ohio State Univ Arpt', 0),\n array('OSY', 'NO', 'Namsos Arpt', 0),\n array('OTG', 'US', 'Worthington Arpt', 0),\n array('OTH', 'US', 'North Bend Municipal', 0),\n array('OTM', 'US', 'Industrial Arpt', 0),\n array('OTP', 'RO', 'Otopeni International', 0),\n array('OTS', 'US', 'Ancortes Arpt', 0),\n array('OTZ', 'US', 'Ralph Wien Memorial', 0),\n array('OUA', 'BF', 'Ouagadougou Arpt', 0),\n array('OUD', 'MA', 'Les Angades Arpt', 0),\n array('OUH', 'ZA', 'Oudtshoorn Arpt', 0),\n array('OUL', 'FI', 'Oulu Airport', 0),\n array('OVB', 'RU', 'Tolmachevo Arpt', 0),\n array('OVD', 'ES', 'Asturias Airport', 0),\n array('OWA', 'US', 'Owatonna Arpt', 0),\n array('OWB', 'US', 'Daviess County Arpt', 0),\n array('OWD', 'US', 'Norwood Ma Arpt', 0),\n array('OXB', 'GW', 'Airport Osvaldo Viera', 0),\n array('OXF', 'GB', 'Kidlington Arpt', 0),\n array('OXR', 'US', 'Oxnard Ventura Arpt', 0),\n array('OYO', 'AR', 'Tres Arroyos Arpt', 0),\n array('OZH', 'UA', 'Zaporozhye Arpt', 0),\n array('OZZ', 'MA', 'Ourzazate', 0),\n array('PAAGD', 'PA', 'aguadulce', 1),\n array('PAAML', 'PA', 'puerto armuelles', 1),\n array('PAARS', 'PA', 'armuelles', 1),\n array('PABLB', 'PA', 'balboa', 1),\n array('PAC', 'PA', 'Paitilla Arpt', 0),\n array('PACHA', 'PA', 'charco azul', 1),\n array('PACHG', 'PA', 'chiriqui grande', 1),\n array('PACTB', 'PA', 'cristobal', 1),\n array('PACTD', 'PA', 'chitre', 1),\n array('PAD', 'DE', 'Paderborn Airport', 0),\n array('PAE', 'US', 'Snohomish Cty Arpt', 0),\n array('PAELE', 'PA', 'el real', 1),\n array('PAGTN', 'PA', 'gatun', 1),\n array('PAH', 'US', 'Barkley Regional', 0),\n array('PAMFS', 'PA', 'miraflores', 1),\n array('PAMIT', 'PA', 'manzanillo', 1),\n array('PAMNP', 'PA', 'las minas', 1),\n array('PAO', 'US', 'Palo Alto Arpt', 0),\n array('PAONX', 'PA', 'colon', 1),\n array('PAP', 'HT', 'Mais Gate Arpt', 0),\n array('PAPAI', 'PA', 'paraiso', 1),\n array('PAPAM', 'PA', 'almirante', 1),\n array('PAPAY', 'PA', 'payardi', 1),\n array('PAPBE', 'PA', 'pto bello', 1),\n array('PAPBM', 'PA', 'bahia de las minas', 1),\n array('PAPED', 'PA', 'pedregal', 1),\n array('PAPLP', 'PA', 'la palma', 1),\n array('PAPTY', 'PA', 'panama city', 1),\n array('PAS', 'GR', 'Paros Community Arpt', 0),\n array('PAT', 'IN', 'Patna Arpt', 0),\n array('PAVAC', 'PA', 'vacamonte', 1),\n array('PAZ', 'MX', 'Tajin Arpt', 0),\n array('PBC', 'MX', 'Huejostingo Arpt', 0),\n array('PBD', 'IN', 'Porbandar Arpt', 0),\n array('PBF', 'US', 'Pine Bluff Arpt', 0),\n array('PBI', 'US', 'Palm Beach Intl Arpt', 0),\n array('PBM', 'SR', 'Zanderij Intl Arpt', 0),\n array('PBO', 'AU', 'Paraburdoo Arpt', 0),\n array('PBR', 'GT', 'Puerto Barrios Arpt', 0),\n array('PBZ', 'ZA', 'Plettenberg Bay Arpt', 0),\n array('PCJ', 'PY', 'Puerto La Victoria Arpt', 0),\n array('PCL', 'PE', 'Capitan Rolden Arpt', 0),\n array('PCN', 'NZ', 'Koromiko', 0),\n array('PDG', 'ID', 'Tabing Arpt', 0),\n array('PDK', 'US', 'Dekalb Peachtree', 0),\n array('PDL', 'PT', 'Nordela Arpt', 0),\n array('PDP', 'UY', 'Cap Curbelo Arpt', 0),\n array('PDS', 'MX', 'Piedras Negras Intl Arpt', 0),\n array('PDT', 'US', 'Pendleton Municipal', 0),\n array('PDX', 'US', 'Portland Intl Arpt', 0),\n array('PEANC', 'PE', 'ancon', 1),\n array('PEATI', 'PE', 'atico', 1),\n array('PECAB', 'PE', 'cabo blanco', 1),\n array('PECHM', 'PE', 'chimbote', 1),\n array('PECHY', 'PE', 'chancay', 1),\n array('PECLL', 'PE', 'callao', 1),\n array('PED', 'CZ', 'Pardubice Arpt', 0),\n array('PEE', 'RU', 'Perm Arpt', 0),\n array('PEEEN', 'PE', 'etén', 1),\n array('PEF', 'DE', 'Peenemuende Arpt', 0),\n array('PEG', 'IT', 'Sant Egidio Arpt', 0),\n array('PEGSM', 'PE', 'general san martin', 1),\n array('PEHCO', 'PE', 'huacho', 1),\n array('PEHUY', 'PE', 'huarmey', 1),\n array('PEI', 'CO', 'Matecana Arpt', 0),\n array('PEILQ', 'PE', 'ilo', 1),\n array('PEIQT', 'PE', 'iquitos', 1),\n array('PEJ', 'IT', 'Peschiei Arpt', 0),\n array('PEK', 'CN', 'Beijing Capital Arpt', 0),\n array('PELIM', 'PE', 'lima', 1),\n array('PELOB', 'PE', 'lobitos', 1),\n array('PELOO', 'PE', 'los organos', 1),\n array('PELPP', 'PE', 'la pampilla', 1),\n array('PEM', 'PE', 'Puerto Maldonado Arpt', 0),\n array('PEMLQ', 'PE', 'mollendo', 1),\n array('PEMRI', 'PE', 'matarani', 1),\n array('PEN', 'MY', 'Penang Intl Arpt', 0),\n array('PENGS', 'PE', 'negritos', 1),\n array('PEPAC', 'PE', 'pacasmayo', 1),\n array('PEPAI', 'PE', 'paita', 1),\n array('PEPAM', 'PE', 'paramonga', 1),\n array('PEPCH', 'PE', 'puerto chicama', 1),\n array('PEPCL', 'PE', 'pucallpa', 1),\n array('PEPEM', 'PE', 'puerto maldonado', 1),\n array('PEPIO', 'PE', 'pisco', 1),\n array('PEPMT', 'PE', 'pimentel', 1),\n array('PEPUB', 'PE', 'pto bayovar', 1),\n array('PEPUN', 'PE', 'puno', 1),\n array('PER', 'AU', 'Perth Arpt', 0),\n array('PESJA', 'PE', 'san juan', 1),\n array('PESNX', 'PE', 'san nicolas', 1),\n array('PESUP', 'PE', 'supe', 1),\n array('PESVY', 'PE', 'salaverry', 1),\n array('PET', 'BR', 'Pelotas Federal Arpt', 0),\n array('PETDM', 'PE', 'tambo de mora', 1),\n array('PETRU', 'PE', 'trujillo', 1),\n array('PETYL', 'PE', 'talara', 1),\n array('PEW', 'PK', 'Peshawar Arpt', 0),\n array('PEYMS', 'PE', 'yurimaguas', 1),\n array('PEZ', 'RU', 'Penza Arpt', 0),\n array('PFB', 'BR', 'Passo Fundo Arpt', 0),\n array('PFBOB', 'PF', 'bora bora', 1),\n array('PFN', 'US', 'Bay County Arpt', 0),\n array('PFO', 'CY', 'Paphos Intl Airport', 0),\n array('PFPPT', 'PF', 'papeete', 1),\n array('PFTAI', 'PF', 'taiohae', 1),\n array('PFUTU', 'PF', 'uturoa', 1),\n array('PFVAI', 'PF', 'vaitape', 1),\n array('PGA', 'US', 'Page Airport', 0),\n array('PGABW', 'PG', 'abau', 1),\n array('PGAKI', 'PG', 'akinum', 1),\n array('PGANB', 'PG', 'aneway bay', 1),\n array('PGATN', 'PG', 'namatanai', 1),\n array('PGBNA', 'PG', 'buna', 1),\n array('PGBOR', 'PG', 'boroko (dupl. code pom)', 1),\n array('PGBUA', 'PG', 'buka', 1),\n array('PGD', 'US', 'Charlotte County', 0),\n array('PGDAU', 'PG', 'daru', 1),\n array('PGF', 'FR', 'Llabanere Arpt', 0),\n array('PGFIN', 'PG', 'finschhafen', 1),\n array('PGFUB', 'PG', 'fulleborn', 1),\n array('PGGEI', 'PG', 'green islands', 1),\n array('PGGIL', 'PG', 'gilau', 1),\n array('PGGMI', 'PG', 'gasmata island', 1),\n array('PGGUR', 'PG', 'alotau', 1),\n array('PGHKN', 'PG', 'hoskins', 1),\n array('PGKIE', 'PG', 'kieta', 1),\n array('PGKIM', 'PG', 'kimbe', 1),\n array('PGKLO', 'PG', 'kalo', 1),\n array('PGKMA', 'PG', 'kerema', 1),\n array('PGKPP', 'PG', 'kakapo', 1),\n array('PGKRK', 'PG', 'kairuka', 1),\n array('PGKRX', 'PG', 'kar kar', 1),\n array('PGKVG', 'PG', 'kavieng', 1),\n array('PGL', 'US', 'Jackson Cnty', 0),\n array('PGLAE', 'PG', 'lae', 1),\n array('PGLNV', 'PG', 'lihir island', 1),\n array('PGLOL', 'PG', 'loloho', 1),\n array('PGLOR', 'PG', 'lorengau manus island', 1),\n array('PGMAG', 'PG', 'madang', 1),\n array('PGMAM', 'PG', 'manam island', 1),\n array('PGMIE', 'PG', 'mielelek', 1),\n array('PGMIS', 'PG', 'misima island', 1),\n array('PGO', 'US', 'Stevens Field Arpt', 0),\n array('PGPOM', 'PG', 'port moresby', 1),\n array('PGRAB', 'PG', 'rabaul', 1),\n array('PGRAM', 'PG', 'rambutyo island', 1),\n array('PGRKU', 'PG', 'yule island', 1),\n array('PGRNR', 'PG', 'robinson river', 1),\n array('PGROR', 'PG', 'orobay', 1),\n array('PGRVI', 'PG', 'russel island', 1),\n array('PGSCH', 'PG', 'schauten', 1),\n array('PGSMU', 'PG', 'salamaua', 1),\n array('PGSOI', 'PG', 'sokar island', 1),\n array('PGSPL', 'PG', 'sipul', 1),\n array('PGSQT', 'PG', 'samarai', 1),\n array('PGTAI', 'PG', 'tambutyo island', 1),\n array('PGTAU', 'PG', 'taugu island', 1),\n array('PGTFI', 'PG', 'tufi', 1),\n array('PGTGL', 'PG', 'tagula', 1),\n array('PGTLW', 'PG', 'talasea', 1),\n array('PGTOI', 'PG', 'tolokiwa island', 1),\n array('PGUNG', 'PG', 'kiunga', 1),\n array('PGV', 'US', 'Pitt Greenville Arpt', 0),\n array('PGVAI', 'PG', 'vanimo', 1),\n array('PGWOK', 'PG', 'woodlark', 1),\n array('PGWWK', 'PG', 'wewak', 1),\n array('PGX', 'FR', 'Perigueux Arpt', 0),\n array('PHABU', 'PH', 'abulog/aparri', 1),\n array('PHADL', 'PH', 'adlay/bislig', 1),\n array('PHAHE', 'PH', 'aheron/ozamis', 1),\n array('PHALA', 'PH', 'alasang/siain', 1),\n array('PHALE', 'PH', 'aleran/ozamis', 1),\n array('PHAMU', 'PH', 'amunitan/aparri', 1),\n array('PHANA', 'PH', 'anakan/masao', 1),\n array('PHAPR', 'PH', 'aparri luzon', 1),\n array('PHARA', 'PH', 'aras asan/bislig', 1),\n array('PHATI', 'PH', 'atimonan/siain', 1),\n array('PHB', 'BR', 'Santos Dumont Airport', 0),\n array('PHBAB', 'PH', 'babato/dadiangas', 1),\n array('PHBAG', 'PH', 'baguio', 1),\n array('PHBAI', 'PH', 'bais/dumaguete', 1),\n array('PHBAL', 'PH', 'balaboe', 1),\n array('PHBAS', 'PH', 'basiauang/dadiangas', 1),\n array('PHBAU', 'PH', 'bauan/batangas', 1),\n array('PHBCD', 'PH', 'bacolod negros', 1),\n array('PHBCO', 'PH', 'bacon/legaspi', 1),\n array('PHBCT', 'PH', 'basilan city basilan', 1),\n array('PHBCU', 'PH', 'baculin/mati', 1),\n array('PHBGC', 'PH', 'bagac', 1),\n array('PHBGI', 'PH', 'bagui bay/san fernando', 1),\n array('PHBGR', 'PH', 'bucar grande/suriagao', 1),\n array('PHBGS', 'PH', 'balingasag/cagay apt de oro', 1),\n array('PHBGV', 'PH', 'borongan', 1),\n array('PHBIY', 'PH', 'biyawa/davao', 1),\n array('PHBLA', 'PH', 'balanga/batan', 1),\n array('PHBLC', 'PH', 'balabac/iligan', 1),\n array('PHBLG', 'PH', 'balogo/batangas', 1),\n array('PHBLN', 'PH', 'balengan/siain', 1),\n array('PHBLP', 'PH', 'bolos point/aparri', 1),\n array('PHBLT', 'PH', 'balintang/puerto princesa', 1),\n array('PHBLU', 'PH', 'balumo/zamboanga', 1),\n array('PHBNQ', 'PH', 'baganga/mati', 1),\n array('PHBNW', 'PH', 'banawan/dadiangas', 1),\n array('PHBOA', 'PH', 'boac marinduque', 1),\n array('PHBOG', 'PH', 'bogo/cagayan de oro', 1),\n array('PHBOS', 'PH', 'boston/davao', 1),\n array('PHBPH', 'PH', 'bislig mindanao', 1),\n array('PHBQA', 'PH', 'baler/siain', 1),\n array('PHBRB', 'PH', 'barobo/bislig', 1),\n array('PHBRP', 'PH', 'brooks point/siain', 1),\n array('PHBRT', 'PH', 'barton/puerto princesa', 1),\n array('PHBSY', 'PH', 'basey/catbalogan', 1),\n array('PHBTG', 'PH', 'batangas luzon', 1),\n array('PHBTN', 'PH', 'bataan mariveles', 1),\n array('PHBTS', 'PH', 'batarasa/puerto princesa', 1),\n array('PHBTY', 'PH', 'bantayon/san jose', 1),\n array('PHBUD', 'PH', 'budbud/davao', 1),\n array('PHBUG', 'PH', 'bugo', 1),\n array('PHBUL', 'PH', 'bulan luzon', 1),\n array('PHBUR', 'PH', 'burdees/siain', 1),\n array('PHBXU', 'PH', 'butuan bay/masao', 1),\n array('PHBYB', 'PH', 'baybay/tacloban', 1),\n array('PHBYP', 'PH', 'bayang point', 1),\n array('PHBYS', 'PH', 'bayabas/bislig', 1),\n array('PHBYW', 'PH', 'bayawan/dumaguete', 1),\n array('PHC', 'NG', 'Port Harcourt Arpt', 0),\n array('PHCAB', 'PH', 'cabugao bay/legaspi', 1),\n array('PHCAJ', 'PH', 'cajodiocan/siain', 1),\n array('PHCAM', 'PH', 'camarines norte/jose panganiba', 1),\n array('PHCBO', 'PH', 'cotabato mindanao', 1),\n array('PHCBY', 'PH', 'calbayong/catbalogan', 1),\n array('PHCCG', 'PH', 'calag-calag/dumaguete', 1),\n array('PHCDB', 'PH', 'caldera bay/zamboanga', 1),\n array('PHCEB', 'PH', 'cebu', 1),\n array('PHCGG', 'PH', 'casiguran/siain', 1),\n array('PHCGM', 'PH', 'camiguin island/aparri', 1),\n array('PHCGP', 'PH', 'calug point/zamboanga', 1),\n array('PHCGT', 'PH', 'calaguitan/tacloban', 1),\n array('PHCGY', 'PH', 'cagayan de oro mindanao', 1),\n array('PHCLP', 'PH', 'calapan/batangas', 1),\n array('PHCLV', 'PH', 'claveria/aparri', 1),\n array('PHCML', 'PH', 'camalagawan/aparri', 1),\n array('PHCMO', 'PH', 'currimao', 1),\n array('PHCNT', 'PH', 'cantilan/surigao', 1),\n array('PHCNY', 'PH', 'canaybon/catbalogan', 1),\n array('PHCPL', 'PH', 'capalonga/siain', 1),\n array('PHCRG', 'PH', 'caraga/mati', 1),\n array('PHCRT', 'PH', 'cartagena/iloilo', 1),\n array('PHCSB', 'PH', 'casul bay/ozamis', 1),\n array('PHCST', 'PH', 'castanas', 1),\n array('PHCTB', 'PH', 'catamon bay/iloilo', 1),\n array('PHCTS', 'PH', 'catbalogan samar', 1),\n array('PHCUG', 'PH', 'calugian/tacloban', 1),\n array('PHCUJ', 'PH', 'culion', 1),\n array('PHCUN', 'PH', 'catanauan', 1),\n array('PHCUR', 'PH', 'curuan/zamboanga', 1),\n array('PHCVE', 'PH', 'cavite luzon', 1),\n array('PHCWY', 'PH', 'calowayan/catabalogan', 1),\n array('PHDAD', 'PH', 'dadiangas mindanao', 1),\n array('PHDCB', 'PH', 'dahikan bay', 1),\n array('PHDDW', 'PH', 'dinadiawan/aparri', 1),\n array('PHDGL', 'PH', 'dingalan/siain', 1),\n array('PHDGT', 'PH', 'dumaguete', 1),\n array('PHDIC', 'PH', 'diculum/zamboanga', 1),\n array('PHDID', 'PH', 'didadongan/aparri', 1),\n array('PHDIO', 'PH', 'diotorin/siain', 1),\n array('PHDIR', 'PH', 'dirgalan', 1),\n array('PHDIV', 'PH', 'divilacan/aparri', 1),\n array('PHDNG', 'PH', 'dinagat island/surigao', 1),\n array('PHDNL', 'PH', 'dinalongan/siain', 1),\n array('PHDPL', 'PH', 'dipolog/ozamis', 1),\n array('PHDPT', 'PH', 'diapitan/siain', 1),\n array('PHDRB', 'PH', 'diaraboan/siain', 1),\n array('PHDVO', 'PH', 'davao mindanao', 1),\n array('PHE', 'AU', 'Port Hedland Arpt', 0),\n array('PHENI', 'PH', 'el nido/puerto princesa', 1),\n array('PHF', 'US', 'Williamsburg Intl Arpt', 0),\n array('PHGAC', 'PH', 'gachitorena/jose panganiban', 1),\n array('PHGAS', 'PH', 'gasan', 1),\n array('PHGES', 'PH', 'general santos/dadiangas', 1),\n array('PHGGG', 'PH', 'gigaguit/surigao', 1),\n array('PHGGM', 'PH', 'gigmote/legaspi', 1),\n array('PHGIN', 'PH', 'gingoog/masao', 1),\n array('PHGMS', 'PH', 'guimaras/iloilo', 1),\n array('PHGNI', 'PH', 'general island/bislig', 1),\n array('PHH', 'VN', 'Phan Thiet Arpt', 0),\n array('PHHIJ', 'PH', 'hijo wharf/davao', 1),\n array('PHHIM', 'PH', 'himamayalan/iloilo', 1),\n array('PHHNB', 'PH', 'hinobaan/iloilo', 1),\n array('PHHNG', 'PH', 'hinigaran/iloilo', 1),\n array('PHHNT', 'PH', 'hinatuan/bislig', 1),\n array('PHHON', 'PH', 'hondagua/siain', 1),\n array('PHHOO', 'PH', 'hook bay/siain', 1),\n array('PHHYB', 'PH', 'hagnava bay', 1),\n array('PHIGN', 'PH', 'iligan mindanao', 1),\n array('PHILO', 'PH', 'iloilo panay', 1),\n array('PHINP', 'PH', 'inampulugan island', 1),\n array('PHIPE', 'PH', 'ipil/zamboanga', 1),\n array('PHISB', 'PH', 'isabela de basilan/basilan', 1),\n array('PHISL', 'PH', 'isabel', 1),\n array('PHJAG', 'PH', 'jagna', 1),\n array('PHJAS', 'PH', 'jasaan/cagayan de oro', 1),\n array('PHJNZ', 'PH', 'jimenez/ozamis', 1),\n array('PHJOL', 'PH', 'jolo', 1),\n array('PHJPM', 'PH', 'jose panganiban luzon', 1),\n array('PHKAR', 'PH', 'karomatan/iligan', 1),\n array('PHKAS', 'PH', 'kabasalan/zamboanga', 1),\n array('PHKAT', 'PH', 'katipunan/ozamis', 1),\n array('PHKIA', 'PH', 'kiamba/dadiangas', 1),\n array('PHKIL', 'PH', 'kilbay point/jose panganiban', 1),\n array('PHKIN', 'PH', 'kinogitan/iligan', 1),\n array('PHKIP', 'PH', 'kipit/ozamis', 1),\n array('PHKIW', 'PH', 'kiwalan/iligan', 1),\n array('PHKOL', 'PH', 'kolambugan/iligan', 1),\n array('PHKUM', 'PH', 'kumalarang/zamboanga', 1),\n array('PHL', 'US', 'Philadelphia Intl Arpt', 0),\n array('PHLAB', 'PH', 'labason/zamboanga', 1),\n array('PHLAG', 'PH', 'lagonoy/jose panganiban', 1),\n array('PHLAM', 'PH', 'lamit bay/jose panganiban', 1),\n array('PHLAN', 'PH', 'lanuza/bislig', 1),\n array('PHLAO', 'PH', 'laoag luzon', 1),\n array('PHLAY', 'PH', 'lagondy river', 1),\n array('PHLBK', 'PH', 'lebak/parang', 1),\n array('PHLEY', 'PH', 'leyte', 1),\n array('PHLGG', 'PH', 'lingig/bislig', 1),\n array('PHLGP', 'PH', 'legaspi davao', 1),\n array('PHLIA', 'PH', 'lianga/bislig', 1),\n array('PHLIB', 'PH', 'libjo/surigao', 1),\n array('PHLIM', 'PH', 'limay/bataan', 1),\n array('PHLIN', 'PH', 'lingayen luzon', 1),\n array('PHLNK', 'PH', 'linik/dadiangas', 1),\n array('PHLNO', 'PH', 'lunao/cagayan de oro', 1),\n array('PHLOM', 'PH', 'lomuyon/dadiangas', 1),\n array('PHLOO', 'PH', 'looc bay/san jose', 1),\n array('PHLOP', 'PH', 'long point/puerto princesa', 1),\n array('PHLPA', 'PH', 'lipa', 1),\n array('PHLPZ', 'PH', 'la paz/iloilo', 1),\n array('PHLRP', 'PH', 'la rap/jose panganiban', 1),\n array('PHLUG', 'PH', 'lugait/cagayan de oro', 1),\n array('PHLUM', 'PH', 'lumasal/dadiangas', 1),\n array('PHMAB', 'PH', 'maibini/davao', 1),\n array('PHMAC', 'PH', 'matho cortez/bislig', 1),\n array('PHMAD', 'PH', 'madaum/davao', 1),\n array('PHMAI', 'PH', 'maitum/dadiangas', 1),\n array('PHMAK', 'PH', 'makar/dadiangas', 1),\n array('PHMAS', 'PH', 'masao', 1),\n array('PHMBT', 'PH', 'masbate', 1),\n array('PHMCD', 'PH', 'mercedes/jose panganiban', 1),\n array('PHMCJ', 'PH', 'macojalan/ozamis', 1),\n array('PHMCO', 'PH', 'maco/davao', 1),\n array('PHMDN', 'PH', 'medina/cagayan de oro', 1),\n array('PHMGA', 'PH', 'magalona/iloilo', 1),\n array('PHMGB', 'PH', 'magueda bay/catbalogan', 1),\n array('PHMGD', 'PH', 'mabaguid', 1),\n array('PHMGG', 'PH', 'mangogoy/bislig', 1),\n array('PHMGI', 'PH', 'mambagid', 1),\n array('PHMHT', 'PH', 'marinhatag/bislig', 1),\n array('PHMIC', 'PH', 'misamis or./cagayan de oro', 1),\n array('PHMIL', 'PH', 'milbuk/dadiangas', 1),\n array('PHMIO', 'PH', 'misamis occ./ozamis', 1),\n array('PHMLB', 'PH', 'malusobay', 1),\n array('PHMLL', 'PH', 'malalag/davao', 1),\n array('PHMLS', 'PH', 'magellanes/masao', 1),\n array('PHMNL', 'PH', 'manila', 1),\n array('PHMNY', 'PH', 'manay/mati', 1),\n array('PHMON', 'PH', 'monserrat/mati', 1),\n array('PHMOR', 'PH', 'morong/mariveles', 1),\n array('PHMSB', 'PH', 'malasugat bay/zamboanga', 1),\n array('PHMSC', 'PH', 'masinloc/sual', 1),\n array('PHMSS', 'PH', 'mission/aparri', 1),\n array('PHMSY', 'PH', 'manansalay/batangas', 1),\n array('PHMTA', 'PH', 'matina aplaya/davao', 1),\n array('PHMUL', 'PH', 'mulanay/siain', 1),\n array('PHMUR', 'PH', 'murcilagus/ozamis', 1),\n array('PHMVS', 'PH', 'mariveles luzon', 1),\n array('PHMXI', 'PH', 'mati mindanao', 1),\n array('PHN', 'US', 'St Clair County Intl Arpt', 0),\n array('PHNAB', 'PH', 'nabulao bay/iloilo', 1),\n array('PHNAL', 'PH', 'nalungga/iloilo', 1),\n array('PHNAP', 'PH', 'napsan/puerto princesa', 1),\n array('PHNAR', 'PH', 'naris point/puerto princesa', 1),\n array('PHNAS', 'PH', 'nasipit/masao', 1),\n array('PHNGH', 'PH', 'nagh', 1),\n array('PHNON', 'PH', 'nonoc/surigao del norte', 1),\n array('PHNOP', 'PH', 'mactan island', 1),\n array('PHNTO', 'PH', 'nato', 1),\n array('PHNUG', 'PH', 'nasugbu luzon', 1),\n array('PHOLO', 'PH', 'olongapo', 1),\n array('PHOPO', 'PH', 'opol/cagayan de oro', 1),\n array('PHORA', 'PH', 'orayuita', 1),\n array('PHORC', 'PH', 'ormoc/tacloban', 1),\n array('PHORS', 'PH', 'oras/catbalogan', 1),\n array('PHOTE', 'PH', 'oteiza/bislig', 1),\n array('PHOZC', 'PH', 'ozamis mindanao', 1),\n array('PHPAG', 'PH', 'pagadian/zamboanga', 1),\n array('PHPAS', 'PH', 'pasay luzon', 1),\n array('PHPBA', 'PH', 'port barton/palawan', 1),\n array('PHPCA', 'PH', 'panacosa/puerto princesa', 1),\n array('PHPCN', 'PH', 'panacan/davao', 1),\n array('PHPDC', 'PH', 'polandoc/ozamis', 1),\n array('PHPDR', 'PH', 'pacio de rozas/batangas', 1),\n array('PHPGT', 'PH', 'pangutaran/jolo', 1),\n array('PHPHD', 'PH', 'port holland', 1),\n array('PHPIN', 'PH', 'pinamalayan/batangas', 1),\n array('PHPLA', 'PH', 'plaridel/ozamis', 1),\n array('PHPLB', 'PH', 'palamit bay/san jose', 1),\n array('PHPLC', 'PH', 'polloc', 1),\n array('PHPLL', 'PH', 'pollilio/siain', 1),\n array('PHPLP', 'PH', 'palapag/san jose', 1),\n array('PHPLW', 'PH', 'palawan/ozamis', 1),\n array('PHPMT', 'PH', 'pamintayan/zamboanga', 1),\n array('PHPNB', 'PH', 'panabutan/zamboanga', 1),\n array('PHPNN', 'PH', 'paninirongan/sanjose', 1),\n array('PHPNT', 'PH', 'punti/aparri', 1),\n array('PHPPL', 'PH', 'pamplona/aparri', 1),\n array('PHPPP', 'PH', 'paselang pagudpud/s fernando', 1),\n array('PHPPS', 'PH', 'puerto princesa palawan', 1),\n array('PHPRA', 'PH', 'parang', 1),\n array('PHPRO', 'PH', 'poro/san fernando', 1),\n array('PHPSL', 'PH', 'pasalang bay/aparri', 1),\n array('PHPTL', 'PH', 'puntalinao/mati', 1),\n array('PHPUG', 'PH', 'pugad/bislig', 1),\n array('PHPUL', 'PH', 'pulupandan', 1),\n array('PHQBI', 'PH', 'quinabigan', 1),\n array('PHQBL', 'PH', 'quinablagan/mati', 1),\n array('PHQPT', 'PH', 'quipit bay/ozamis', 1),\n array('PHQUE', 'PH', 'queson/siain', 1),\n array('PHQUI', 'PH', 'quiddiao/aparri', 1),\n array('PHREA', 'PH', 'real/siain', 1),\n array('PHRLN', 'PH', 'romblon', 1),\n array('PHRXS', 'PH', 'roxas/puerto princesa', 1),\n array('PHS', 'TH', 'Phitsanulok Arpt', 0),\n array('PHSAG', 'PH', 'sagay/iloilo', 1),\n array('PHSAN', 'PH', 'santa anna/aparri', 1),\n array('PHSAS', 'PH', 'sasa/davao', 1),\n array('PHSAY', 'PH', 'sayao/batangas', 1),\n array('PHSBB', 'PH', 'sabbot/siain', 1),\n array('PHSBG', 'PH', 'sabang', 1),\n array('PHSBY', 'PH', 'sablayan/batangas', 1),\n array('PHSCA', 'PH', 'san carlos/dumaguete', 1),\n array('PHSCR', 'PH', 'santa cruz/sual', 1),\n array('PHSCT', 'PH', 'santa catalina/dumaguete', 1),\n array('PHSDG', 'PH', 'sindangan/ozamis', 1),\n array('PHSFE', 'PH', 'san fernando luzon', 1),\n array('PHSFS', 'PH', 'subic bay', 1),\n array('PHSGD', 'PH', 'sogod/tacloban', 1),\n array('PHSIG', 'PH', 'sigayan/parang', 1),\n array('PHSIN', 'PH', 'siain luzon', 1),\n array('PHSIO', 'PH', 'san ignacio/mati', 1),\n array('PHSIR', 'PH', 'siari/ozamis', 1),\n array('PHSIS', 'PH', 'san isidro/sanjose', 1),\n array('PHSIY', 'PH', 'siay/zamboanga', 1),\n array('PHSJI', 'PH', 'san jose samar', 1),\n array('PHSKU', 'PH', 'sultan kudarat/dadiangas', 1),\n array('PHSLU', 'PH', 'santa lucia/puerto princesa', 1),\n array('PHSMA', 'PH', 'santa maria/zamboanga', 1),\n array('PHSNG', 'PH', 'sangi/cebu', 1),\n array('PHSNI', 'PH', 'santa nino', 1),\n array('PHSOR', 'PH', 'sorsogon/legaspi', 1),\n array('PHSPQ', 'PH', 'san pio quinto/aparri', 1),\n array('PHSTE', 'PH', 'san teodoro/batangas', 1),\n array('PHSUA', 'PH', 'sual', 1),\n array('PHSUG', 'PH', 'surigao mindanao', 1),\n array('PHT', 'US', 'Henry County Arpt', 0),\n array('PHTAC', 'PH', 'tacloban leyte', 1),\n array('PHTAG', 'PH', 'tagbilaran bohol', 1),\n array('PHTAY', 'PH', 'taytay/puerto princesa', 1),\n array('PHTBC', 'PH', 'tabaco/legaspi', 1),\n array('PHTBG', 'PH', 'tabangoa', 1),\n array('PHTBU', 'PH', 'tagabuli/davao', 1),\n array('PHTDC', 'PH', 'tandoc', 1),\n array('PHTDG', 'PH', 'tandag/bislig', 1),\n array('PHTGD', 'PH', 'tagudin/san fernando', 1),\n array('PHTGI', 'PH', 'tuguis/dadiangas', 1),\n array('PHTGL', 'PH', 'taguilon/ozamis', 1),\n array('PHTGN', 'PH', 'tambungon/davao', 1),\n array('PHTGO', 'PH', 'tagoloan mis. or/cagayan de or', 1),\n array('PHTGT', 'PH', 'taguite bay/zamboanga', 1),\n array('PHTGW', 'PH', 'tungawan bay/zamboanga', 1),\n array('PHTIB', 'PH', 'tibungco/davao', 1),\n array('PHTKW', 'PH', 'tagkawayan/siain', 1),\n array('PHTLD', 'PH', 'toledo/cebu', 1),\n array('PHTLG', 'PH', 'tolong/dumaguete', 1),\n array('PHTLM', 'PH', 'talomo/davao', 1),\n array('PHTLP', 'PH', 'tolopo', 1),\n array('PHTLS', 'PH', 'tolosa/tacloban', 1),\n array('PHTNU', 'PH', 'tanauan/tacloban', 1),\n array('PHTOB', 'PH', 'toboso/dumaguete', 1),\n array('PHULY', 'PH', 'ulugan bay', 1),\n array('PHURR', 'PH', 'umrur', 1),\n array('PHVCS', 'PH', 'victorias negros', 1),\n array('PHVNV', 'PH', 'villanueva', 1),\n array('PHVTL', 'PH', 'vitali/zamoanga', 1),\n array('PHVTO', 'PH', 'vito/iloilo', 1),\n array('PHW', 'ZA', 'Phalaborwa Airport', 0),\n array('PHWAS', 'PH', 'wasag/dadiangas', 1),\n array('PHWAW', 'PH', 'wawa/batangas', 1),\n array('PHWNP', 'PH', 'naga/zamboanga', 1),\n array('PHX', 'US', 'Sky Harbor Intl Arpt', 0),\n array('PHXSO', 'PH', 'siocon/zamboanga', 1),\n array('PHZAM', 'PH', 'zamboanga mindanao', 1),\n array('PIA', 'US', 'Greater Peoria Arpt', 0),\n array('PIB', 'US', 'Hattiesburg Laurel Regional Arpt', 0),\n array('PID', 'BS', 'Paradise Island Arpt', 0),\n array('PIE', 'US', 'St Petersburg Clearwater Arpt', 0),\n array('PIH', 'US', 'Pocatello Municipal Arpt', 0),\n array('PIK', 'GB', 'Prestwick Arpt', 0),\n array('PIR', 'US', 'Pierre Municipal', 0),\n array('PIS', 'FR', 'Biard Airport', 0),\n array('PIT', 'US', 'Pittsburgh Intl Arpt', 0),\n array('PIU', 'PE', 'Piura Arpt', 0),\n array('PIW', 'CA', 'Pikwitonei Rail Station', 0),\n array('PIX', 'PT', 'Pico Arpt', 0),\n array('PJB', 'US', 'Payson Arpt', 0),\n array('PKB', 'US', 'Wood County', 0),\n array('PKBQM', 'PK', 'muhammad bin qasim/karachi', 1),\n array('PKE', 'AU', 'Parkes Arpt', 0),\n array('PKG', 'MY', 'Pangkor Arpt', 0),\n array('PKGWD', 'PK', 'gwadar', 1),\n array('PKJ', 'GT', 'Playa Grand Arpt', 0),\n array('PKJIW', 'PK', 'jiwani', 1),\n array('PKKBU', 'PK', 'keti bunder', 1),\n array('PKKHI', 'PK', 'karachi', 1),\n array('PKORW', 'PK', 'ormara', 1),\n array('PKPQA', 'PK', 'port qasim', 1),\n array('PKPSI', 'PK', 'pasni', 1),\n array('PKR', 'NP', 'Pokhara Arpt', 0),\n array('PKU', 'ID', 'Simpang Tiga Arpt', 0),\n array('PKV', 'RU', 'Pskov Arpt', 0),\n array('PKW', 'BW', 'Selebi Phikwe Arpt', 0),\n array('PLB', 'US', 'Clinton Cty Municipal', 0),\n array('PLDAR', 'PL', 'darlowo', 1),\n array('PLGDN', 'PL', 'gdansk', 1),\n array('PLGDY', 'PL', 'gdynia', 1),\n array('PLH', 'GB', 'Roborough Arpt', 0),\n array('PLHEL', 'PL', 'hel', 1),\n array('PLJ', 'BZ', 'Placencia Arpt', 0),\n array('PLK', 'US', 'M Graham Clark Arpt', 0),\n array('PLKOL', 'PL', 'kolobrzeg', 1),\n array('PLM', 'ID', 'Mahmud Badaruddin Li Arpt', 0),\n array('PLN', 'US', 'Emmet Cty Arpt', 0),\n array('PLNFW', 'PL', 'neufahrwasser', 1),\n array('PLNOW', 'PL', 'nowy port', 1),\n array('PLO', 'AU', 'Port Lincoln Arpt', 0),\n array('PLPLC', 'PL', 'police', 1),\n array('PLQ', 'LT', 'Palanga Arpt', 0),\n array('PLS', 'TC', 'Providenciales Intl', 0),\n array('PLSOP', 'PL', 'sopot', 1),\n array('PLSWI', 'PL', 'swinoujscie', 1),\n array('PLSZZ', 'PL', 'szczecin', 1),\n array('PLU', 'BR', 'Pampulha Arpt', 0),\n array('PLUST', 'PL', 'ustka', 1),\n array('PLWLA', 'PL', 'wladyslawowo', 1),\n array('PLY', 'US', 'Plymouth Municipal Arpt', 0),\n array('PLZ', 'ZA', 'Port Elizabeth Airport', 0),\n array('PMC', 'CL', 'Tepual Airport', 0),\n array('PMD', 'US', 'Airforce 42', 0),\n array('PME', 'GB', 'Portsmouth Arpt', 0),\n array('PMF', 'IT', 'Parma Arpt', 0),\n array('PMFSP', 'PM', 'st pierre', 1),\n array('PMG', 'BR', 'International', 0),\n array('PMH', 'US', 'Portsmith Regional', 0),\n array('PMI', 'ES', 'Palma Mallorca Arpt', 0),\n array('PMO', 'IT', 'Punta Raisi Arpt', 0),\n array('PMR', 'NZ', 'Palmerstown North Arpt', 0),\n array('PMV', 'VE', 'Delcaribe Gen S Marino Arpt', 0),\n array('PMW', 'BR', 'Palmas Arpt', 0),\n array('PMY', 'AR', 'El Tehuelche Arpt', 0),\n array('PNA', 'ES', 'Pamplona Noain Arpt', 0),\n array('PNC', 'US', 'Ponca City Municipal Arpt', 0),\n array('PNE', 'US', 'N Philadelphia', 0),\n array('PNG', 'BR', 'Paranagua Municipal', 0),\n array('PNH', 'KH', 'Pochentong Arpt', 0),\n array('PNI', 'FM', 'Pohnpei Arpt', 0),\n array('PNO', 'MX', 'Pinotepa Nacional Arpt', 0),\n array('PNPCN', 'PN', 'pitcairn is', 1),\n array('PNQ', 'IN', 'Lohegaon Arpt', 0),\n array('PNR', 'CG', 'Pointe Noire Arpt', 0),\n array('PNS', 'US', 'Pensacola Regional Municipal', 0),\n array('PNT', 'CL', 'Teniente Julio Gallardo Arpt', 0),\n array('PNX', 'US', 'Grayson County Arpt', 0),\n array('PNZ', 'BR', 'Petrolina Internacional Arpt', 0),\n array('POA', 'BR', 'Porto Alegre Airport', 0),\n array('POC', 'US', 'Brackett Field', 0),\n array('POE', 'US', 'Fort Polk Arpt', 0),\n array('POF', 'US', 'Earl Fields Memorial', 0),\n array('POG', 'GA', 'Port Gentil Arpt', 0),\n array('POM', 'PG', 'Jackson Field', 0),\n array('POP', 'DO', 'La Union Arpt', 0),\n array('POR', 'FI', 'Pori Airport', 0),\n array('POS', 'TT', 'Piarco Arpt', 0),\n array('POU', 'US', 'Dutchess County', 0),\n array('POW', 'SI', 'Portoroz Airport', 0),\n array('POX', 'FR', 'Cormeille En Vexin', 0),\n array('POZ', 'PL', 'Lawica Arpt', 0),\n array('PPB', 'BR', 'A De Barros', 0),\n array('PPE', 'MX', 'Puerto Penasco Municipal', 0),\n array('PPG', 'AS', 'Pago Pago Arpt', 0),\n array('PPI', 'AU', 'Port Porie Arpt', 0),\n array('PPL', 'NP', 'Phaplu Airport', 0),\n array('PPM', 'US', 'Pompano Beach Arpt', 0),\n array('PPN', 'CO', 'Machangara Arpt', 0),\n array('PPP', 'AU', 'Whitsunday Coast Arpt', 0),\n array('PPQ', 'NZ', 'Paraparaumu Arpt', 0),\n array('PPS', 'PH', 'Puerto Princesa Arpt', 0),\n array('PPT', 'PF', 'Intl Tahiti Faaa', 0),\n array('PPW', 'GB', 'Papa Westray Arpt', 0),\n array('PQI', 'US', 'Northern Maine Regional', 0),\n array('PQM', 'MX', 'Palenque Arpt', 0),\n array('PQQ', 'AU', 'Port Mac Quarie Airport', 0),\n array('PRA', 'AR', 'Parana Arpt', 0),\n array('PRARE', 'PR', 'arecibo', 1),\n array('PRARR', 'PR', 'arroyo/guayama', 1),\n array('PRB', 'US', 'Paso Robles Cty', 0),\n array('PRBQN', 'PR', 'aguadilla', 1),\n array('PRC', 'US', 'Prescott Municipal', 0),\n array('PRG', 'CZ', 'Ruzyne Arpt', 0),\n array('PRGUX', 'PR', 'guanica harbour', 1),\n array('PRGUY', 'PR', 'guayanilla', 1),\n array('PRH', 'TH', 'Phrae Arpt', 0),\n array('PRI', 'SC', 'Praslin Island Arpt', 0),\n array('PRLAM', 'PR', 'las mareas (guayama)', 1),\n array('PRM ', 'BR', 'praia mole', 1),\n array('PRMAZ', 'PR', 'mayagueez', 1),\n array('PRN', 'YU', 'Pristina Arpt', 0),\n array('PRP', 'FR', 'Propriano Arpt', 0),\n array('PRPJO', 'PR', 'puerto jobos', 1),\n array('PRPSE', 'PR', 'ponce', 1),\n array('PRPYA', 'PR', 'port yabucoa', 1),\n array('PRSJU', 'PR', 'san juan', 1),\n array('PRX', 'US', 'Paris Cox Field Arpt', 0),\n array('PRY', 'ZA', 'Wonderboom Arpt', 0),\n array('PSA', 'IT', 'Gal Galilei Arpt', 0),\n array('PSB', 'US', 'Midstate Arpt', 0),\n array('PSC', 'US', 'Tri Cities Arpt', 0),\n array('PSE', 'US', 'Mercedita Arpt', 0),\n array('PSF', 'US', 'Pittsfield Municipal', 0),\n array('PSG', 'US', 'Petersburg Municipal', 0),\n array('PSK', 'US', 'New River Valley Arpt', 0),\n array('PSM', 'US', 'Pease AFB', 0),\n array('PSP', 'US', 'Palm Springs Municipal', 0),\n array('PSR', 'IT', 'Liberi Airport', 0),\n array('PSS', 'AR', 'Posadas Arpt', 0),\n array('PTADH', 'PT', 'angra do heroismo', 1),\n array('PTAVE', 'PT', 'aveiro', 1),\n array('PTB', 'US', 'Petersburg Municipal Arpt', 0),\n array('PTBAN', 'PT', 'banatica/lisboa', 1),\n array('PTCAC', 'PT', 'cacem', 1),\n array('PTCAL', 'PT', 'calheta', 1),\n array('PTCAS', 'PT', 'cascais', 1),\n array('PTCDP', 'PT', 'cais do pico', 1),\n array('PTFAO', 'PT', 'faro', 1),\n array('PTFDF', 'PT', 'figueira da foz', 1),\n array('PTFNC', 'PT', 'funchal madeira', 1),\n array('PTG', 'ZA', 'Pietersburg Arpt', 0),\n array('PTHOR', 'PT', 'horta', 1),\n array('PTI', 'AU', 'Port Douglas Arpt', 0),\n array('PTJ', 'AU', 'Portland Arpt', 0),\n array('PTK', 'US', 'Oakland Pontiac Arpt', 0),\n array('PTLEI', 'PT', 'leixoes', 1),\n array('PTLIS', 'PT', 'lisboa', 1),\n array('PTLOS', 'PT', 'lagos', 1),\n array('PTMAD', 'PT', 'madalena', 1),\n array('PTO', 'BR', 'Pato Branco Municipal', 0),\n array('PTOLH', 'PT', 'olhao', 1),\n array('PTOPO', 'PT', 'porto', 1),\n array('PTP', 'GP', 'Le Raizet Arpt', 0),\n array('PTPDL', 'PT', 'ponta delgada', 1),\n array('PTPOM', 'PT', 'pomaron', 1),\n array('PTPRG', 'PT', 'praia do graziosa', 1),\n array('PTPRM', 'PT', 'portimao', 1),\n array('PTPRV', 'PT', 'praia da vitoria', 1),\n array('PTS', 'US', 'Atkinson Municipal Arpt', 0),\n array('PTSCF', 'PT', 'santa cruz de flores', 1),\n array('PTSCG', 'PT', 'santa cruz de graciosa', 1),\n array('PTSET', 'PT', 'setubal', 1),\n array('PTSIE', 'PT', 'sines', 1),\n array('PTSMI', 'PT', 'sao miguel', 1),\n array('PTSMT', 'PT', 'sâo mateus', 1),\n array('PTTER', 'PT', 'terceira island', 1),\n array('PTVDC', 'PT', 'viana do castelo', 1),\n array('PTVDP', 'PT', 'vila do porto', 1),\n array('PTVEL', 'PT', 'velas', 1),\n array('PTVRL', 'PT', 'vila real de santo antonio', 1),\n array('PTW', 'US', 'Pottstown Limerick', 0),\n array('PTY', 'PA', 'Tocumen Intl Arpt', 0),\n array('PUB', 'US', 'Pueblo Arpt', 0),\n array('PUC', 'US', 'Carbon Cty Municipal Arpt', 0),\n array('PUF', 'FR', 'Uzein Airport', 0),\n array('PUG', 'AU', 'Port Augusta Arpt', 0),\n array('PUJ', 'DO', 'Punta Cana Arpt', 0),\n array('PUQ', 'CL', 'Presidente Ibanez Arpt', 0),\n array('PUS', 'KR', 'Kimhae Arpt', 0),\n array('PUW', 'US', 'Pullman Moscow Arpt', 0),\n array('PUY', 'HR', 'Pula Arpt', 0),\n array('PVC', 'US', 'Provincetown Municipal', 0),\n array('PVD', 'US', 'T F Green St Arpt', 0),\n array('PVG', 'CN', 'Pu Dong Arpt', 0),\n array('PVH', 'BR', 'Belmonte Arpt', 0),\n array('PVK', 'GR', 'Aktion Arpt', 0),\n array('PVR', 'MX', 'Ordaz Arpt', 0),\n array('PVU', 'US', 'Provo Arpt', 0),\n array('PVW', 'US', 'Hale County Arpt', 0),\n array('PVZ', 'US', 'Casement Arpt', 0),\n array('PWA', 'US', 'Wiley Post Arpt', 0),\n array('PWANG', 'PW', 'angaur', 1),\n array('PWK', 'US', 'Pal Waukee Arpt', 0),\n array('PWM', 'US', 'Portland Intl Jetport', 0),\n array('PWROR', 'PW', 'koror', 1),\n array('PWT', 'US', 'Bremerton Municipal', 0),\n array('PXM', 'MX', 'Puerto Escondido Municipal', 0),\n array('PXO', 'PT', 'Porto Santo Arpt', 0),\n array('PYAGT', 'PY', 'ciudad del este', 1),\n array('PYASU', 'PY', 'asuncion', 1),\n array('PYCNP', 'PY', 'concepcion', 1),\n array('PYENO', 'PY', 'encarnacion', 1),\n array('PYITE', 'PY', 'ita enramada', 1),\n array('PYSAN', 'PY', 'san antonio', 1),\n array('PYVLL', 'PY', 'villeta', 1),\n array('PYX', 'TH', 'Pattaya Arpt', 0),\n array('PZB', 'ZA', 'Pietermaritzburg Arpt', 0),\n array('PZE', 'GB', 'Penzance Arpt', 0),\n array('PZO', 'VE', 'Puerto Ordaz Arpt', 0),\n array('PZY', 'SK', 'Piestany Arpt', 0),\n array('QADOH', 'QA', 'doha', 1),\n array('QAHAL', 'QA', 'halul', 1),\n array('QAHNA', 'QA', 'hanna', 1),\n array('QAUMS', 'QA', 'umm said', 1),\n array('QBC', 'CA', 'Bella Colla Municipal', 0),\n array('QBF', 'US', 'Vail Van Service', 0),\n array('QCE', 'US', 'Copper Mountain Van Service', 0),\n array('QDU', 'DE', 'Dusseldorf Rail Station', 0),\n array('QFQ', 'NO', 'Harbour Arpt', 0),\n array('QFZ', 'DE', 'Saarbruecken Rail Station', 0),\n array('QGV', 'DE', 'Neu Isenburg Arpt', 0),\n array('QHV', 'BR', 'Novo Hamburgo Arpt', 0),\n array('QIG', 'BR', 'Iguatu Arpt', 0),\n array('QJZ', 'FR', 'Nantes Rail Station', 0),\n array('QKB', 'US', 'Breckenridge Van Service', 0),\n array('QKL', 'DE', 'Cologne Railroad Station', 0),\n array('QKS', 'US', 'Keystone Van Service', 0),\n array('QLE', 'AU', 'Leeton Arpt', 0),\n array('QNT', 'BR', 'Niteroi Arpt', 0),\n array('QQH', 'GB', 'Harwich Rail Station', 0),\n array('QQK', 'GB', 'London - Kings Cross Rail Service', 0),\n array('QQP', 'GB', 'London - Paddington Rail Service', 0),\n array('QQU', 'GB', 'London - Euston Rail Service', 0),\n array('QQW', 'GB', 'London - Waterloo Rail Service', 0),\n array('QQX', 'GB', 'Bath Rail Service', 0),\n array('QQY', 'GB', 'York Rail Station', 0),\n array('QRA', 'ZA', 'Randgermiston Arpt', 0),\n array('QRO', 'MX', 'Queretaro Arpt', 0),\n array('QRV', 'FR', 'Arras Arpt', 0),\n array('QWF', 'US', 'Fort Collins Bus Service', 0),\n array('QWH', 'US', 'Loveland Bus Service', 0),\n array('QWM', 'US', 'Longmont Bus Service', 0),\n array('QWY', 'US', 'Albany Bus Service', 0),\n array('QYO', 'PL', 'Olsztyn Arpt', 0),\n array('QYU', 'SE', 'Gavle Rail Station', 0),\n array('RAB', 'PG', 'Lakunai Arpt', 0),\n array('RAC', 'US', 'Horlick Arpt', 0),\n array('RAD', 'VG', 'Road Town Arpt', 0),\n array('RAI', 'CV', 'Francisco Mendes', 0),\n array('RAK', 'MA', 'Menara Airport', 0),\n array('RAL', 'US', 'Riverside Municipal', 0),\n array('RAO', 'BR', 'Leite Lopes', 0),\n array('RAP', 'US', 'Rapid City Regional Arpt', 0),\n array('RAR', 'CK', 'Rarotonga Arpt', 0),\n array('RBA', 'MA', 'Sale Airport', 0),\n array('RBF', 'US', 'Big Bear City Arpt', 0),\n array('RBG', 'US', 'Roseburg Municipal', 0),\n array('RBL', 'US', 'Flight Service Station', 0),\n array('RBM', 'DE', 'Wallmuhle', 0),\n array('RBR', 'BR', 'Pres Medici Arpt', 0),\n array('RBW', 'US', 'Walterboro Municipal Arpt', 0),\n array('RCB', 'ZA', 'Richards Bay Arpt', 0),\n array('RCE', 'US', 'Roche Harbor Arpt', 0),\n array('RCO', 'FR', 'St Agnant Arpt', 0),\n array('RCU', 'AR', 'Rio Cuarto Arpt', 0),\n array('RDD', 'US', 'Redding Municipal Arpt', 0),\n array('RDG', 'US', 'Reading Municipal', 0),\n array('RDM', 'US', 'Roberts Field', 0),\n array('RDU', 'US', 'Raleigh Durham Intl Arpt', 0),\n array('RDZ', 'FR', 'Marcillac', 0),\n array('REC', 'BR', 'Recife Airport', 0),\n array('REG', 'IT', 'Tito Menniti Arpt', 0),\n array('REL', 'AR', 'Trelew Arpt', 0),\n array('RELPT', 'RE', 'le port', 1),\n array('REP', 'KH', 'Siem Reap Arpt', 0),\n array('REPDG', 'RE', 'pointe des galets', 1),\n array('RER', 'GT', 'Base Aerea Del Sur Arpt', 0),\n array('RES', 'AR', 'Resistencia Arpt', 0),\n array('REU', 'ES', 'Reus Arpt', 0),\n array('REX', 'MX', 'General Lucio Blanco Arpt', 0),\n array('RFD', 'US', 'Rockford Arpt', 0),\n array('RFP', 'PF', 'Raiatea Arpt', 0),\n array('RGA', 'AR', 'Rio Grande Arpt', 0),\n array('RGI', 'PF', 'Rangiroa Arpt', 0),\n array('RGL', 'AR', 'Rio Gallegos Internacional Arpt', 0),\n array('RGN', 'MM', 'Mingaladon', 0),\n array('RGR', 'US', 'Ranger Municipal Arpt', 0),\n array('RHE', 'FR', 'Champagne Arpt', 0),\n array('RHI', 'US', 'Oneida County', 0),\n array('RHN', 'NA', 'Rosh Pina Airport', 0),\n array('RHO', 'GR', 'Diagoras Arpt', 0),\n array('RIA', 'BR', 'Base Aerea Arpt', 0),\n array('RIC', 'US', 'Byrd Intl', 0),\n array('RIF', 'US', 'Reynolds Municipal Arpt', 0),\n array('RIG', 'BR', 'Rio Grande Airport', 0),\n array('RIL', 'US', 'Garfield Cty Arpt', 0),\n array('RIW', 'US', 'Riverton Municipal', 0),\n array('RIX', 'LV', 'Riga Arpt', 0),\n array('RJK', 'HR', 'Rijeka Arpt', 0),\n array('RKD', 'US', 'Rockland Arpt', 0),\n array('RKE', 'DK', 'Roskilde Arpt', 0),\n array('RKP', 'US', 'Aransas County Arpt', 0),\n array('RKS', 'US', 'Rock Springs Municipal', 0),\n array('RKT', 'AE', 'Ras Al Khaimah Arpt', 0),\n array('RKV', 'IS', 'Reykjavik Domestic Arpt', 0),\n array('RLG', 'DE', 'Laage Arpt', 0),\n array('RMA', 'AU', 'Roma Arpt', 0),\n array('RMG', 'US', 'Richard B Russell Arpt', 0),\n array('RMI', 'IT', 'Miramare Airport', 0),\n array('RMK', 'AU', 'Renmark Airport', 0),\n array('RMS', 'DE', 'Ramsteim Arpt', 0),\n array('RNB', 'SE', 'Kallinge Arpt', 0),\n array('RNE', 'FR', 'Renaison Arpt', 0),\n array('RNH', 'US', 'New Richmond Municipal', 0),\n array('RNN', 'DK', 'Bornholm Arpt', 0),\n array('RNO', 'US', 'Reno Tahoe Intl Arpt', 0),\n array('RNS', 'FR', 'Saint Jacques Arpt', 0),\n array('ROA', 'US', 'Roanoke Regional Arpt', 0),\n array('ROAGI', 'RO', 'agigea', 1),\n array('ROB', 'LR', 'Roberts Intl', 0),\n array('ROBAB', 'RO', 'basarabi', 1),\n array('ROBRA', 'RO', 'braila', 1),\n array('ROC', 'US', 'Monroe Cty Arpt New York', 0),\n array('ROCND', 'RO', 'constanta', 1),\n array('ROCON', 'RO', 'constanza', 1),\n array('ROK', 'AU', 'Rockhampton Arpt', 0),\n array('ROMAG', 'RO', 'mangalia', 1),\n array('ROMED', 'RO', 'medgidia', 1),\n array('ROMID', 'RO', 'midia', 1),\n array('ROO', 'BR', 'Rondonopolis Arpt', 0),\n array('ROP', 'MP', 'Rota Arpt', 0),\n array('ROR', 'PW', 'Airai Airport', 0),\n array('ROS', 'AR', 'Fisherton Airport', 0),\n array('ROSUL', 'RO', 'sulina (port et zone franche) ', 1),\n array('ROT', 'NZ', 'Rotorua Arpt', 0),\n array('ROV', 'RU', 'Rostov Arpt', 0),\n array('ROW', 'US', 'Industrial Aircenter', 0),\n array('RPN', 'IL', 'Rosh Pina Arpt', 0),\n array('RRG', 'MU', 'Rodrigues Island Arpt', 0),\n array('RRO', 'IT', 'Sorrento Arpt', 0),\n array('RRS', 'NO', 'Roros Arpt', 0),\n array('RSD', 'BS', 'S Eleuthera Arpt', 0),\n array('RSE', 'AU', 'Au Rose Bay Arpt', 0),\n array('RSN', 'US', 'Ruston Regional Arpt', 0),\n array('RST', 'US', 'Rochester Municipal', 0),\n array('RSU', 'KR', 'Yeosu Arpt', 0),\n array('RSW', 'US', 'Regional Southwest Arpt', 0),\n array('RTB', 'HN', 'Roatan Arpt', 0),\n array('RTM', 'NL', 'Rotterdam Arpt', 0),\n array('RTN', 'US', 'Crews Fld', 0),\n array('RTS', 'AU', 'Rottnest Island Arpt', 0),\n array('RTW', 'RU', 'Saratov Arpt', 0),\n array('RUARH', 'RU', 'arkhangelsk', 1),\n array('RUARM', 'RU', 'arman (magadan)', 1),\n array('RUASF', 'RU', 'astrakhan', 1),\n array('RUAZO', 'RU', 'azov', 1),\n array('RUBEL', 'RU', 'belushye', 1),\n array('RUBEM', 'RU', 'belomorsk', 1),\n array('RUBER', 'RU', 'beringovskiy port', 1),\n array('RUBKH', 'RU', 'bektyashka', 1),\n array('RUBLT', 'RU', 'baltiysk', 1),\n array('RUCEE', 'RU', 'cherepovets', 1),\n array('RUCIH', 'RU', 'chikacheva', 1),\n array('RUDKA', 'RU', 'de-kastri', 1),\n array('RUDUD', 'RU', 'dudinka', 1),\n array('RUDYR', 'RU', 'anadyr', 1),\n array('RUEGV', 'RU', 'egvekinot', 1),\n array('RUGOJ', 'RU', 'nizhniy novgorod (ex gorkiy)', 1),\n array('RUGRH', 'RU', 'gremikha', 1),\n array('RUH', 'SA', 'King Khaled Intl', 0),\n array('RUI', 'US', 'Ruidoso Municipal Arpt', 0),\n array('RUIAA', 'RU', 'igarka', 1),\n array('RUIAR', 'RU', 'yaroslavl', 1),\n array('RUIKS', 'RU', 'tiksi', 1),\n array('RUILK', 'RU', 'illichivsk', 1),\n array('RUIOK', 'RU', 'iokanka', 1),\n array('RUKAN', 'RU', 'kandalaksha', 1),\n array('RUKDN', 'RU', 'kildin', 1),\n array('RUKDT', 'RU', 'kronshtadt', 1),\n array('RUKEM', 'RU', 'kem', 1),\n array('RUKER', 'RU', 'keret', 1),\n array('RUKGD', 'RU', 'kaliningrad', 1),\n array('RUKHO', 'RU', 'kholmsk', 1),\n array('RUKHV', 'RU', 'khabarovsk', 1),\n array('RUKIN', 'RU', 'kineshma', 1),\n array('RUKJA', 'RU', 'krasnojarsk', 1),\n array('RUKMM', 'RU', 'malaya kheta', 1),\n array('RUKMU', 'RU', 'kamskoye ustye', 1),\n array('RUKMV', 'RU', 'velikaya kema', 1),\n array('RUKNV', 'RU', 'krasnovodsk', 1),\n array('RUKOR', 'RU', 'korsakov', 1),\n array('RUKRF', 'RU', 'korf', 1),\n array('RUKRR', 'RU', 'krasnodar', 1),\n array('RUKSL', 'RU', 'kislaya guba', 1),\n array('RUKUF', 'RU', 'samara (ex kuibyshev)', 1),\n array('RULAZ', 'RU', 'lazarev', 1),\n array('RULED', 'RU', 'st petersburg (ex leningrad)', 1),\n array('RULNR', 'RU', 'linakhamari', 1),\n array('RUMAG', 'RU', 'magadansky port', 1),\n array('RUMEG', 'RU', 'medvezhyegorsk', 1),\n array('RUMEZ', 'RU', 'mezen', 1),\n array('RUMGO', 'RU', 'mago', 1),\n array('RUMMK', 'RU', 'murmansk', 1),\n array('RUMOW', 'RU', 'moskva', 1),\n array('RUMUG', 'RU', 'muuga', 1),\n array('RUMVO', 'RU', 'moskalvo', 1),\n array('RUN', 'RE', 'Gillot Airport', 0),\n array('RUNAC', 'RU', 'naberzhniye chelny', 1),\n array('RUNEV', 'RU', 'nevelsk', 1),\n array('RUNIA', 'RU', 'nikolayevsk-na-amure', 1),\n array('RUNJK', 'RU', 'nakhodka', 1),\n array('RUNNM', 'RU', 'naryan mar', 1),\n array('RUNOZ', 'RU', 'novaya zemlya o.', 1),\n array('RUNVS', 'RU', 'novorossiysk', 1),\n array('RUOHO', 'RU', 'okhotsk', 1),\n array('RUOKT', 'RU', 'oktiabrskij', 1),\n array('RUOLB', 'RU', 'bukhta olga', 1),\n array('RUOLG', 'RU', 'olenya guba', 1),\n array('RUOLO', 'RU', 'oleniy o.', 1),\n array('RUONG', 'RU', 'onega', 1),\n array('RUOZK', 'RU', 'ozerko bukhta', 1),\n array('RUPCE', 'RU', 'pechenga', 1),\n array('RUPEK', 'RU', 'petrokrepost', 1),\n array('RUPES', 'RU', 'petrozavodsk', 1),\n array('RUPEX', 'RU', 'pechora', 1),\n array('RUPKC', 'RU', 'petropavlovsk-kamchatskiy', 1),\n array('RUPRI', 'RU', 'primorsk (koivisto)', 1),\n array('RUPRN', 'RU', 'poronaisk', 1),\n array('RUPSE', 'RU', 'posyet', 1),\n array('RUPTN', 'RU', 'plastun', 1),\n array('RUPUD', 'RU', 'pudozh', 1),\n array('RUPVS', 'RU', 'provideniya bukhta', 1),\n array('RUPWE', 'RU', 'pevek', 1),\n array('RURDP', 'RU', 'rudnaya pristan', 1),\n array('RUROV', 'RU', 'rostov', 1),\n array('RURTW', 'RU', 'saratov', 1),\n array('RURYB', 'RU', 'rybinsk', 1),\n array('RUSEG', 'RU', 'segezha', 1),\n array('RUSEW', 'RU', 'severodvinsk', 1),\n array('RUSHA', 'RU', 'shakhtersk', 1),\n array('RUSKA', 'RU', 'slavyanka', 1),\n array('RUSOC', 'RU', 'sochi', 1),\n array('RUSOG', 'RU', 'sovetskaya gavan', 1),\n array('RUSPA', 'RU', 'spafaryeva o', 1),\n array('RUSRM', 'RU', 'severomorsk', 1),\n array('RUSVE', 'RU', 'svetlaya', 1),\n array('RUSVK', 'RU', 'severo-kurilsk', 1),\n array('RUSYZ', 'RU', 'syzran', 1),\n array('RUT', 'US', 'Rutland Arpt', 0),\n array('RUTAG', 'RU', 'taganrog', 1),\n array('RUTAU', 'RU', 'tauisk', 1),\n array('RUTRR', 'RU', 'trifonov ruchey', 1),\n array('RUTTI', 'RU', 'tolyatti', 1),\n array('RUTUA', 'RU', 'tuapse', 1),\n array('RUUGL', 'RU', 'uglegorsk', 1),\n array('RUUMB', 'RU', 'umba', 1),\n array('RUURA', 'RU', 'ura guba', 1),\n array('RUUSK', 'RU', 'ust-kamchatsk', 1),\n array('RUVNN', 'RU', 'vanino', 1),\n array('RUVVO', 'RU', 'vladivostok', 1),\n array('RUVYG', 'RU', 'vyborg', 1),\n array('RUVYP', 'RU', 'vostochniy port', 1),\n array('RUVZB', 'RU', 'vozrozhdeniya bukhta', 1),\n array('RUYAB', 'RU', 'yagelnaya bukhta', 1),\n array('RUYEY', 'RU', 'yeysk', 1),\n array('RUZAO', 'RU', 'zavyalova o', 1),\n array('RUZEM', 'RU', 'zeleniy mys', 1),\n array('RUZHD', 'RU', 'mariupol (ex zhdanov)', 1),\n array('RVH', 'RU', 'Rzhevka Arpt', 0),\n array('RVK', 'NO', 'Ryumsjoen Arpt', 0),\n array('RVN', 'FI', 'Rovaniemi Arpt', 0),\n array('RVR', 'US', 'Green River Arpt', 0),\n array('RWI', 'US', 'Wilson Arpt', 0),\n array('RWL', 'US', 'Rawlins Municipal', 0),\n array('RWS', 'BR', 'Sumare Arpt', 0),\n array('RZE', 'PL', 'Jasionka Arpt', 0),\n array('RZZ', 'US', 'Halifax Cty Arpt', 0),\n array('SAA', 'US', 'Lar Shively Arpt', 0),\n array('SAAAK', 'SA', 'abu al khoosh', 1),\n array('SAAHA', 'SA', 'al hada', 1),\n array('SAALK', 'SA', 'al khobar', 1),\n array('SAB', 'AN', 'Juancho Yraus Quinl', 0),\n array('SAC', 'US', 'Sacramento Executive Arpt', 0),\n array('SADAS', 'SA', 'das island', 1),\n array('SADHA', 'SA', 'dhahran', 1),\n array('SADHU', 'SA', 'dhuba', 1),\n array('SADMN', 'SA', 'damman', 1),\n array('SAEJH', 'SA', 'wedjh', 1),\n array('SAF', 'US', 'Santa Fe Municipal', 0),\n array('SAGIZ', 'SA', 'gizan', 1),\n array('SAH', 'YE', 'Sanaa Intl Airport', 0),\n array('SAHDY', 'SA', 'al hudaydah (hodeida)', 1),\n array('SAIEB', 'SA', 'ienbo', 1),\n array('SAJED', 'SA', 'jeddah', 1),\n array('SAJUB', 'SA', 'jubail', 1),\n array('SAJUT', 'SA', 'juaymah terminal', 1),\n array('SAL', 'SV', 'Comalapa Intl Arpt', 0),\n array('SALIT', 'SA', 'lith', 1),\n array('SAMAK', 'SA', 'makkah', 1),\n array('SAMAN', 'SA', 'manailih', 1),\n array('SAMUF', 'SA', 'manfouha', 1),\n array('SAN', 'US', 'Lindbergh Intl Arpt', 0),\n array('SAP', 'HN', 'Ramon Villeda Morales Arpt', 0),\n array('SAQAL', 'SA', 'qalsn', 1),\n array('SAQUR', 'SA', 'qurayyah', 1),\n array('SAR', 'US', 'Sparta Community Airport', 0),\n array('SARAB', 'SA', 'rabigh', 1),\n array('SARAM', 'SA', 'ras al mishab', 1),\n array('SARAR', 'SA', 'ras al khafji', 1),\n array('SARTA', 'SA', 'ras tanura', 1),\n array('SASUH', 'SA', 'salboukh', 1),\n array('SAT', 'US', 'San Antonio Intl', 0),\n array('SAV', 'US', 'Savannah Intl Arpt', 0),\n array('SAVLA', 'SA', 'umm laji', 1),\n array('SAW', 'TR', 'Sabiha Gokcen Arpt', 0),\n array('SAY', 'IT', 'Siena Arpt', 0),\n array('SAYNB', 'SA', 'yanbo', 1),\n array('SAZUY', 'SA', 'zulayfayn', 1),\n array('SBA', 'US', 'Santa Barbara Arpt', 0),\n array('SBAKS', 'SB', 'auki malaita is', 1),\n array('SBALB', 'SB', 'allardyce harbour sta isabel i', 1),\n array('SBAOB', 'SB', 'aola bay', 1),\n array('SBCHY', 'SB', 'choiseul bay choiseul is', 1),\n array('SBGZO', 'SB', 'gizo is', 1),\n array('SBH', 'GP', 'St Jean Arpt', 0),\n array('SBHIR', 'SB', 'honiara guadalcanal is', 1),\n array('SBIRA', 'SB', 'kirakira san cristobal is', 1),\n array('SBK', 'FR', 'Tremuson Armor Arpt', 0),\n array('SBLEV', 'SB', 'lever harbour new georgia', 1),\n array('SBLOF', 'SB', 'lofung', 1),\n array('SBM', 'US', 'Sheboygan Arpt', 0),\n array('SBN', 'US', 'Michiana Regional Arpt', 0),\n array('SBNOR', 'SB', 'noro new georgia', 1),\n array('SBP', 'US', 'San Luis Obispo Cty Arpt', 0),\n array('SBRIN', 'SB', 'ringi cove kolombangara', 1),\n array('SBRUS', 'SB', 'marau sound guadalcanal is', 1),\n array('SBS', 'US', 'Steamboat Arpt', 0),\n array('SBSCZ', 'SB', 'santa cruz is', 1),\n array('SBSHH', 'SB', 'shortland harbour shortland is', 1),\n array('SBTLG', 'SB', 'tulagi ngella', 1),\n array('SBU', 'ZA', 'Springbok Arpt', 0),\n array('SBVIU', 'SB', 'viru harbour', 1),\n array('SBW', 'MY', 'Sibu Arpt', 0),\n array('SBXYA', 'SB', 'yandina pavuvu island', 1),\n array('SBY', 'US', 'Wicomico Regional Arpt', 0),\n array('SCC', 'US', 'Prudhoe Bay Deadhorse Arpt', 0),\n array('SCE', 'US', 'University Park Arpt', 0),\n array('SCF', 'US', 'Scottsdale Municipal Arpt', 0),\n array('SCH', 'US', 'Schenectady County Arpt', 0),\n array('SCI', 'VE', 'Aeropuerto Santo Domingo', 0),\n array('SCK', 'US', 'Stockton Metro Arpt', 0),\n array('SCL', 'CL', 'Arturo Merino Benitez', 0),\n array('SCMAW', 'SC', 'mahe', 1),\n array('SCN', 'DE', 'Ensheim Arpt', 0),\n array('SCPOV', 'SC', 'port victoria', 1),\n array('SCQ', 'ES', 'Santiago Airport', 0),\n array('SCS', 'GB', 'Scatsta Arpt', 0),\n array('SCU', 'CU', 'Antonio Maceo Arpt', 0),\n array('SCW', 'RU', 'Syktyvkar Arpt', 0),\n array('SCX', 'MX', 'Salina Cruz Arpt', 0),\n array('SCY', 'EC', 'San Cristobal Airport', 0),\n array('SDA', 'IQ', 'Saddam Intl', 0),\n array('SDB', 'ZA', 'Langebaanweg Arpt', 0),\n array('SDE', 'AR', 'Santiago Des Estero Arpt', 0),\n array('SDF', 'US', 'Standiford Fld', 0),\n array('SDJ', 'JP', 'Sendai Arpt', 0),\n array('SDK', 'MY', 'Sandakan Arpt', 0),\n array('SDL', 'SE', 'Sundsvall Arpt', 0),\n array('SDM', 'US', 'Brown Field Municipal', 0),\n array('SDN', 'NO', 'Anda Airport', 0),\n array('SDPZU', 'SD', 'port sudan', 1),\n array('SDQ', 'DO', 'Las Americas Arpt', 0),\n array('SDR', 'ES', 'Santander Airport', 0),\n array('SDSWA', 'SD', 'swakin', 1),\n array('SDU', 'BR', 'Santos Dumont Arpt', 0),\n array('SDV', 'IL', 'Dov Airport', 0),\n array('SDX', 'US', 'Sedona Arpt', 0),\n array('SDY', 'US', 'Sindey Richland Municipal Arpt', 0),\n array('SEA', 'US', 'Seattle Tacoma Intl Arpt', 0),\n array('SEAAR', 'SE', 'ar', 1),\n array('SEAHU', 'SE', 'ahus', 1),\n array('SEALA', 'SE', 'ala', 1),\n array('SEALF', 'SE', 'alfredshem', 1),\n array('SEALN', 'SE', 'ãlvenäs', 1),\n array('SEAMA', 'SE', 'åmal', 1),\n array('SEANK', 'SE', 'ankarsvik', 1),\n array('SEARB', 'SE', 'arbra', 1),\n array('SEARK', 'SE', 'arnoeviken', 1),\n array('SEARV', 'SE', 'arvika', 1),\n array('SEBAC', 'SE', 'bäckviken', 1),\n array('SEBAS', 'SE', 'bastad', 1),\n array('SEBAT', 'SE', 'batskärsnäs', 1),\n array('SEBDQ', 'SE', 'boeda', 1),\n array('SEBEA', 'SE', 'bergkvara', 1),\n array('SEBER', 'SE', 'bergs oljehamn', 1),\n array('SEBLA', 'SE', 'blankaholm', 1),\n array('SEBLV', 'SE', 'bällstaviken', 1),\n array('SEBOL', 'SE', 'bollstabruk', 1),\n array('SEBOM', 'SE', 'borgholm', 1),\n array('SEBRE', 'SE', 'bredviken', 1),\n array('SEBRO', 'SE', 'brofjorden', 1),\n array('SEBRT', 'SE', 'brottby', 1),\n array('SEBUR', 'SE', 'burea', 1),\n array('SEBUV', 'SE', 'burgsvik', 1),\n array('SEBYX', 'SE', 'byxelkrok', 1),\n array('SEDEG', 'SE', 'degerhamn', 1),\n array('SEDJN', 'SE', 'djuroen', 1),\n array('SEDJU', 'SE', 'djurmo', 1),\n array('SEDOM', 'SE', 'domsjoe', 1),\n array('SEDON', 'SE', 'donsoe', 1),\n array('SEDYN', 'SE', 'dynäs', 1),\n array('SEE', 'US', 'Gillespie Field', 0),\n array('SEENK', 'SE', 'enkoeping', 1),\n array('SEESS', 'SE', 'essvik', 1),\n array('SEF', 'US', 'Air Terminal Arpt', 0),\n array('SEFAG', 'SE', 'falkenberg', 1),\n array('SEFAK', 'SE', 'fagervik', 1),\n array('SEFIG', 'SE', 'figeholm', 1),\n array('SEFIS', 'SE', 'fiskebäck', 1),\n array('SEFJA', 'SE', 'fjällbacka', 1),\n array('SEFOR', 'SE', 'forsmark', 1),\n array('SEFRA', 'SE', 'franoe', 1),\n array('SEFSD', 'SE', 'faroesund', 1),\n array('SEGAM', 'SE', 'gamleby', 1),\n array('SEGKS', 'SE', 'gustafsvik/stockholm', 1),\n array('SEGKV', 'SE', 'grankullaviken', 1),\n array('SEGOA', 'SE', 'goeta', 1),\n array('SEGOT', 'SE', 'goeteborg', 1),\n array('SEGRD', 'SE', 'grundsund', 1),\n array('SEGRE', 'SE', 'grebbestad', 1),\n array('SEGRH', 'SE', 'grisslehamn', 1),\n array('SEGRU', 'SE', 'gruvoen', 1),\n array('SEGUB', 'SE', 'gustavsberg', 1),\n array('SEGUN', 'SE', 'gunnebo', 1),\n array('SEGUS', 'SE', 'gustafsvik', 1),\n array('SEGVX', 'SE', 'gävle', 1),\n array('SEHAA', 'SE', 'haparanda', 1),\n array('SEHAD', 'SE', 'halmstad', 1),\n array('SEHAH', 'SE', 'haraholmen', 1),\n array('SEHAK', 'SE', 'hallstavik', 1),\n array('SEHAN', 'SE', 'hargshamn', 1),\n array('SEHAS', 'SE', 'hallstanäs', 1),\n array('SEHBV', 'SE', 'hässelbyverket/stockholm', 1),\n array('SEHER', 'SE', 'herräng', 1),\n array('SEHGS', 'SE', 'hoegsjoe', 1),\n array('SEHLD', 'SE', 'holmsund', 1),\n array('SEHLS', 'SE', 'hällekis', 1),\n array('SEHNB', 'SE', 'hoerneborg', 1),\n array('SEHND', 'SE', 'härnoesand', 1),\n array('SEHNF', 'SE', 'hoernefors', 1),\n array('SEHOG', 'SE', 'hoeganäs', 1),\n array('SEHON', 'SE', 'hoensäter', 1),\n array('SEHUN', 'SE', 'hunnebostrand', 1),\n array('SEHUS', 'SE', 'husum', 1),\n array('SEHUV', 'SE', 'hudiksvall', 1),\n array('SEHYP', 'SE', 'hyppeln', 1),\n array('SEIGG', 'SE', 'iggesund', 1),\n array('SEJAR', 'SE', 'järfälla', 1),\n array('SEJAT', 'SE', 'jättersoen', 1),\n array('SEJKG', 'SE', 'joenkoeping', 1),\n array('SEJOH', 'SE', 'johannedal', 1),\n array('SEKAA', 'SE', 'karlskrona', 1),\n array('SEKAG', 'SE', 'kage', 1),\n array('SEKAK', 'SE', 'karlsvik', 1),\n array('SEKAN', 'SE', 'karlshamn', 1),\n array('SEKAS', 'SE', 'karskär', 1),\n array('SEKAT', 'SE', 'katthammarsvik', 1),\n array('SEKAX', 'SE', 'kalix', 1),\n array('SEKBK', 'SE', 'karlsholmsbruk', 1),\n array('SEKGR', 'SE', 'kungsoer', 1),\n array('SEKHN', 'SE', 'kristinehamn', 1),\n array('SEKID', 'SE', 'kristianstad', 1),\n array('SEKLI', 'SE', 'klintehamn', 1),\n array('SEKLR', 'SE', 'kalmar', 1),\n array('SEKMH', 'SE', 'koepmanholmen', 1),\n array('SEKPH', 'SE', 'kappelshamn', 1),\n array('SEKPS', 'SE', 'kapellskär', 1),\n array('SEKRF', 'SE', 'kramfors', 1),\n array('SEKRH', 'SE', 'karehamn', 1),\n array('SEKSD', 'SE', 'karlstad', 1),\n array('SEKUB', 'SE', 'kubikenborg', 1),\n array('SEKUN', 'SE', 'kungshamn', 1),\n array('SEKVA', 'SE', 'kvarnholmen', 1),\n array('SEKVH', 'SE', 'kopparverkshamnen', 1),\n array('SEKXV', 'SE', 'karlsborg axelvik', 1),\n array('SEKYR', 'SE', 'kyrkebyn', 1),\n array('SEL', 'KR', 'Gimpo Intl', 0),\n array('SELAA', 'SE', 'landskrona', 1),\n array('SELDK', 'SE', 'lidkoeping', 1),\n array('SELED', 'SE', 'lilla edet', 1),\n array('SELIM', 'SE', 'limhamn', 1),\n array('SELIO', 'SE', 'lidingoe', 1),\n array('SELIS', 'SE', 'linanäs', 1),\n array('SELJU', 'SE', 'ljusne', 1),\n array('SELLA', 'SE', 'lulea', 1),\n array('SELOM', 'SE', 'lomma', 1),\n array('SELOU', 'SE', 'loudden/stockholm', 1),\n array('SELUG', 'SE', 'lugnvik', 1),\n array('SELUN', 'SE', 'loevholmen', 1),\n array('SELVR', 'SE', 'loevanger', 1),\n array('SELYS', 'SE', 'lysekil', 1),\n array('SEMAD', 'SE', 'mariestad', 1),\n array('SEMAN', 'SE', 'marsviken', 1),\n array('SEMAR', 'SE', 'marieberg', 1),\n array('SEMMA', 'SE', 'malmoe', 1),\n array('SEMON', 'SE', 'moensteras', 1),\n array('SEMOO', 'SE', 'mo', 1),\n array('SEMOR', 'SE', 'moerbylanga', 1),\n array('SEMSD', 'SE', 'marstrand', 1),\n array('SEMUN', 'SE', 'munksund', 1),\n array('SEN', 'GB', 'Southend Municipal Arpt', 0),\n array('SENAS', 'SE', 'näs', 1),\n array('SENAV', 'SE', 'nävekvarn', 1),\n array('SENHN', 'SE', 'nyhamn', 1),\n array('SENJA', 'SE', 'norrbottens järnverk-ssab', 1),\n array('SENOE', 'SE', 'norrtälje', 1),\n array('SENOG', 'SE', 'nordmaling', 1),\n array('SENOL', 'SE', 'nol (ports)', 1),\n array('SENOR', 'SE', 'norrbyskär', 1),\n array('SENOT', 'SE', 'norrsundet', 1),\n array('SENRK', 'SE', 'norrkoeping', 1),\n array('SENYN', 'SE', 'nynäshamn', 1),\n array('SENYO', 'SE', 'nykoeping', 1),\n array('SEOAX', 'SE', 'oaxen', 1),\n array('SEOBB', 'SE', 'obbola', 1),\n array('SEOCO', 'SE', 'ockeroe', 1),\n array('SEOER', 'SE', 'oernskoeldsvik', 1),\n array('SEOGR', 'SE', 'oregrund', 1),\n array('SEORT', 'SE', 'ortviken', 1),\n array('SEORV', 'SE', 'orviken', 1),\n array('SEOSK', 'SE', 'oskarshamn', 1),\n array('SEOST', 'SE', 'oestrand', 1),\n array('SEOTT', 'SE', 'otterbäcken', 1),\n array('SEOXE', 'SE', 'oxeloesund', 1),\n array('SEP', 'US', 'Clark Field', 0),\n array('SEPAS', 'SE', 'paskallavik', 1),\n array('SEPIT', 'SE', 'pitea', 1),\n array('SERAA', 'SE', 'raa', 1),\n array('SERAM', 'SE', 'ramvik', 1),\n array('SERNB', 'SE', 'ronneby', 1),\n array('SERNH', 'SE', 'ronehamn', 1),\n array('SEROR', 'SE', 'roennskär', 1),\n array('SEROV', 'SE', 'roennskärsverken', 1),\n array('SERUV', 'SE', 'rundvik', 1),\n array('SESAE', 'SE', 'sandarne', 1),\n array('SESAK', 'SE', 'sandvik', 1),\n array('SESBB', 'SE', 'saltsjoe-boo', 1),\n array('SESBN', 'SE', 'saltsjoebaden', 1),\n array('SESDL', 'SE', 'sundsvall', 1),\n array('SESES', 'SE', 'seskaroe', 1),\n array('SESFT', 'SE', 'skelleftea', 1),\n array('SESIK', 'SE', 'sikea', 1),\n array('SESIM', 'SE', 'simrishamn', 1),\n array('SESKB', 'SE', 'skärblacka', 1),\n array('SESKE', 'SE', 'skelleftehamn', 1),\n array('SESKL', 'SE', 'skalhamn', 1),\n array('SESKN', 'SE', 'skuthamn', 1),\n array('SESKO', 'SE', 'skoghall', 1),\n array('SESKT', 'SE', 'skattkärr', 1),\n array('SESLI', 'SE', 'slite', 1),\n array('SESMD', 'SE', 'stroemstad', 1),\n array('SESOE', 'SE', 'soedertälje', 1),\n array('SESOG', 'SE', 'soederkoeping', 1),\n array('SESOL', 'SE', 'soelvesborg', 1),\n array('SESOO', 'SE', 'soederhamn', 1),\n array('SESOR', 'SE', 'soeraker', 1),\n array('SESPR', 'SE', 'sprangsviken', 1),\n array('SESSR', 'SE', 'skutskär', 1),\n array('SESTA', 'SE', 'stocka', 1),\n array('SESTE', 'SE', 'stenungsund', 1),\n array('SESTK', 'SE', 'stockvik', 1),\n array('SESTO', 'SE', 'stockholm', 1),\n array('SESTQ', 'SE', 'strängnäs', 1),\n array('SESTS', 'SE', 'stroemnäs', 1),\n array('SESTU', 'SE', 'stugsund', 1),\n array('SESTV', 'SE', 'stora vika', 1),\n array('SESUD', 'SE', 'stocksund', 1),\n array('SESUG', 'SE', 'sundbyberg', 1),\n array('SESUN', 'SE', 'sund', 1),\n array('SESVK', 'SE', 'svartvik', 1),\n array('SESVX', 'SE', 'svanoe', 1),\n array('SETHN', 'SE', 'trollhättan', 1),\n array('SETOE', 'SE', 'toere', 1),\n array('SETOV', 'SE', 'torekov', 1),\n array('SETRG', 'SE', 'trelleborg', 1),\n array('SETUN', 'SE', 'tunadal', 1),\n array('SEUDD', 'SE', 'uddevalla', 1),\n array('SEULF', 'SE', 'ulfvik', 1),\n array('SEUME', 'SE', 'umea', 1),\n array('SEURS', 'SE', 'ursviken', 1),\n array('SEUTA', 'SE', 'utansjoe', 1),\n array('SEVAG', 'SE', 'varberg', 1),\n array('SEVAJ', 'SE', 'väja', 1),\n array('SEVAK', 'SE', 'valdemarsvik', 1),\n array('SEVAL', 'SE', 'vallvik', 1),\n array('SEVAN', 'SE', 'vänersborg', 1),\n array('SEVBY', 'SE', 'visby', 1),\n array('SEVER', 'SE', 'verkebäck', 1),\n array('SEVGN', 'SE', 'vargoen', 1),\n array('SEVIV', 'SE', 'vivstavarv', 1),\n array('SEVST', 'SE', 'västeras', 1),\n array('SEVVK', 'SE', 'västervik', 1),\n array('SEWAL', 'SE', 'wallhamn', 1),\n array('SEYST', 'SE', 'ystad', 1),\n array('SEZ', 'SC', 'Seychelles Intl Arpt', 0),\n array('SFA', 'TN', 'El Maou Airport', 0),\n array('SFB', 'US', 'Orlando Sanford Arpt', 0),\n array('SFD', 'VE', 'Las Flecheras', 0),\n array('SFE', 'PH', 'San Fernando Arpt', 0),\n array('SFF', 'US', 'Felts Field', 0),\n array('SFG', 'AN', 'Esperance Airport', 0),\n array('SFH', 'MX', 'San Felipe Arpt', 0),\n array('SFJ', 'GL', 'Sondre Stromfjord Arpt', 0),\n array('SFL', 'CV', 'Sao Filipe Arpt', 0),\n array('SFN', 'AR', 'Santa Fe Arpt', 0),\n array('SFO', 'US', 'San Francisco Intl Arpt', 0),\n array('SFS', 'PH', 'Subic Bay Intl Arpt', 0),\n array('SFT', 'SE', 'Skelleftea Arpt', 0),\n array('SFX', 'VE', 'San Felix Arpt', 0),\n array('SFZ', 'US', 'Smithfield Arpt', 0),\n array('SGAYC', 'SG', 'pulan ayer chawan', 1),\n array('SGD', 'DK', 'Sonderborg Arpt', 0),\n array('SGE', 'DE', 'Siegerland Arpt', 0),\n array('SGF', 'US', 'Springfield Branson Regional Arpt', 0),\n array('SGJUR', 'SG', 'jurong', 1),\n array('SGKEP', 'SG', 'keppel wharves', 1),\n array('SGN', 'VN', 'Tan Son Nhut Arpt', 0),\n array('SGO', 'AU', 'St George Arpt', 0),\n array('SGPAP', 'SG', 'pasir panjan wharves', 1),\n array('SGPUB', 'SG', 'pulau bukom', 1),\n array('SGR', 'US', 'Hull Field Arpt', 0),\n array('SGSCT', 'SG', 'singapore container terminal', 1),\n array('SGSEB', 'SG', 'pulau sebarok', 1),\n array('SGSEM', 'SG', 'sembawang port', 1),\n array('SGSIN', 'SG', 'singapore', 1),\n array('SGSLT', 'SG', 'seletar', 1),\n array('SGT', 'US', 'Stuttgart Municipal', 0),\n array('SGTAY', 'SG', 'telok ayer basin', 1),\n array('SGTPG', 'SG', 'tanjong pagar', 1),\n array('SGTPN', 'SG', 'tanjong penjuru', 1),\n array('SGU', 'US', 'Saint George Municipal Arpt', 0),\n array('SGY', 'US', 'Skagway Minicipal Arpt', 0),\n array('SHA', 'CN', 'Hongqiao Arpt', 0),\n array('SHASC', 'SH', 'ascencion', 1),\n array('SHASI', 'SH', 'georgetown', 1),\n array('SHB', 'JP', 'Nakashibetsu Arpt', 0),\n array('SHD', 'US', 'Shenandoah Valley Arpt', 0),\n array('SHE', 'CN', 'Shenyang Arpt', 0),\n array('SHJ', 'AE', 'Sharjah Airport', 0),\n array('SHO', 'KR', 'Seolak Arpt', 0),\n array('SHP', 'CN', 'Qinhuangdao Arpt', 0),\n array('SHR', 'US', 'Sheridan Cty Arpt', 0),\n array('SHSHN', 'SH', 'jamestown', 1),\n array('SHT', 'AU', 'Shepparton', 0),\n array('SHV', 'US', 'Shreveport Regional Arpt', 0),\n array('SHW', 'SA', 'Sharurah Arpt', 0),\n array('SIA', 'CN', 'Xiguan Airport', 0),\n array('SID', 'CV', 'Amilcar Cabral Intl Arpt', 0),\n array('SIIZO', 'SI', 'izola', 1),\n array('SIKOP', 'SI', 'koper', 1),\n array('SIN', 'SG', 'Changi Intl Arpt', 0),\n array('SIP', 'UA', 'Simferopol Arpt', 0),\n array('SIPIR', 'SI', 'piran', 1),\n array('SIPOW', 'SI', 'portoroz', 1),\n array('SIR', 'CH', 'Sion Arpt', 0),\n array('SIT', 'US', 'Sitka Airport', 0),\n array('SIX', 'AU', 'Singleton Arpt', 0),\n array('SJBAR', 'SJ', 'barentsburg', 1),\n array('SJC', 'US', 'San Jose Intl Arpt', 0),\n array('SJD', 'MX', 'Los Cabos Arpt', 0),\n array('SJJ', 'BA', 'Butmir Arpt', 0),\n array('SJK', 'BR', 'Sao Jose Dos Campos Arpt', 0),\n array('SJLYR', 'SJ', 'longyearbyen', 1),\n array('SJNYA', 'SJ', 'ny ålesund', 1),\n array('SJO', 'CR', 'Juan Santa Maria Intl', 0),\n array('SJP', 'BR', 'Sao Jose Do Rio Preto', 0),\n array('SJSVE', 'SJ', 'sveagruva', 1),\n array('SJT', 'US', 'Mathis Field', 0),\n array('SJU', 'US', 'Luiz Munoz Marin Intl', 0),\n array('SJY', 'FI', 'Ilmajoki Arpt', 0),\n array('SJZ', 'PT', 'Sao Jorge Arpt', 0),\n array('SKB', 'KN', 'Robert L Bradshaw Arpt', 0),\n array('SKBAB', 'SK', 'bratislava port', 1),\n array('SKD', 'UZ', 'Samarkand Arpt', 0),\n array('SKE', 'NO', 'Skien Arpt', 0),\n array('SKG', 'GR', 'Makedonia Arpt', 0),\n array('SKKNP', 'SK', 'komarno port', 1),\n array('SKL', 'GB', 'Broadford Arpt', 0),\n array('SKN', 'NO', 'Skagen Arpt', 0),\n array('SKP', 'MK', 'Skopje Arpt', 0),\n array('SKS', 'DK', 'Skrydstrup Airport', 0),\n array('SKT', 'PK', 'Sialkot Arpt', 0),\n array('SKY', 'US', 'Griffing Sandusky Arpt', 0),\n array('SLA', 'AR', 'General Belgrano Intl Arpt', 0),\n array('SLBTE', 'SL', 'bonthe', 1),\n array('SLC', 'US', 'Salt Lake City Intl Arpt', 0),\n array('SLE', 'US', 'McNary Field', 0),\n array('SLFNA', 'SL', 'freetown', 1),\n array('SLK', 'US', 'Adirondack Arpt', 0),\n array('SLL', 'OM', 'Salalah Arpt', 0),\n array('SLN', 'US', 'Salina Municipal', 0),\n array('SLNIT', 'SL', 'nitti', 1),\n array('SLP', 'MX', 'San Luis Potosi Municipal Arpt', 0),\n array('SLPEP', 'SL', 'pepel', 1),\n array('SLSBO', 'SL', 'sherbro', 1),\n array('SLU', 'DM', 'Vigie Field Arpt', 0),\n array('SLV', 'IN', 'Simla Arpt', 0),\n array('SLW', 'MX', 'Saltillo Arpt', 0),\n array('SLZ', 'BR', 'Mal Cunha Machado', 0),\n array('SMA', 'PT', 'Vilo Do Porto Arpt', 0),\n array('SME', 'US', 'Pulaski County Arpt', 0),\n array('SMF', 'US', 'Sacramento International', 0),\n array('SMI', 'GR', 'Samos Arpt', 0),\n array('SMO', 'US', 'Santa Monica Municipal Arpt', 0),\n array('SMR', 'CO', 'Simon Bolivar', 0),\n array('SMS', 'MG', 'St Marie Arpt', 0),\n array('SMV', 'CH', 'Samedan Arpt', 0),\n array('SMX', 'US', 'Santa Maria Public Arpt', 0),\n array('SNA', 'US', 'John Wayne Arpt', 0),\n array('SNDKR', 'SN', 'dakar', 1),\n array('SNE', 'CV', 'Preguica Arpt', 0),\n array('SNF', 'VE', 'San Felipe Airport', 0),\n array('SNFOU', 'SN', 'foundiougne', 1),\n array('SNH', 'AU', 'Stanthorpe', 0),\n array('SNI', 'LR', 'R E Murray Arpt', 0),\n array('SNKLC', 'SN', 'kaolack', 1),\n array('SNL', 'US', 'Shawnee Airport', 0),\n array('SNLYN', 'SN', 'lyndiane', 1),\n array('SNMBA', 'SN', 'm\\'bao terminal', 1),\n array('SNN', 'IE', 'Shannon Arpt', 0),\n array('SNO', 'TH', 'Sakon Nakhon Arpt', 0),\n array('SNQ', 'MX', 'San Quintin Arpt', 0),\n array('SNR', 'FR', 'Montoir Airport', 0),\n array('SNS', 'US', 'Salinas Arpt', 0),\n array('SNU', 'CU', 'Santa Clara Arpt', 0),\n array('SNXLS', 'SN', 'st louis', 1),\n array('SNY', 'US', 'Sidney Municipal', 0),\n array('SNZIG', 'SN', 'ziguinchor', 1),\n array('SOB', 'HU', 'Saarmelleek Balaton Arpt', 0),\n array('SOBBO', 'SO', 'berbera', 1),\n array('SOC', 'ID', 'Adi Sumarno Arpt', 0),\n array('SOD', 'BR', 'Sorocaba Arpt', 0),\n array('SOF', 'BG', 'Sofia Vrazhdebna Arpt', 0),\n array('SOG', 'NO', 'Haukasen Arpt', 0),\n array('SOI', 'AU', 'South Molle Island Arpt', 0),\n array('SOKMU', 'SO', 'kismayu', 1),\n array('SOM', 'VE', 'El Tigre Arpt', 0),\n array('SOMER', 'SO', 'merca', 1),\n array('SOMGQ', 'SO', 'mogadishu', 1),\n array('SON', 'VU', 'Pekoa Arpt', 0),\n array('SOO', 'SE', 'Soderhamn Arpt', 0),\n array('SOP', 'US', 'Pinehurst Arpt', 0),\n array('SOQ', 'ID', 'Jefman Arpt', 0),\n array('SOU', 'GB', 'Southampton Intl Arpt', 0),\n array('SOV', 'US', 'Seldovia Arpt', 0),\n array('SOW', 'US', 'Show Low Arpt', 0),\n array('SOY', 'GB', 'Stronsay Arpt', 0),\n array('SPA', 'US', 'Downtown Memorial', 0),\n array('SPC', 'ES', 'La Palma Arpt', 0),\n array('SPF', 'US', 'Black Hills Clyde Ice Field', 0),\n array('SPG', 'US', 'Whitted Airport', 0),\n array('SPI', 'US', 'Capital Airport', 0),\n array('SPN', 'MP', 'Saipan Intl', 0),\n array('SPR', 'BZ', 'San Pedro Arpt', 0),\n array('SPS', 'US', 'Wichita Falls Municipal Arpt', 0),\n array('SPU', 'HR', 'Split Arpt', 0),\n array('SPW', 'US', 'Spencer Municipal', 0),\n array('SPZ', 'US', 'Springdale Municipal Arpt', 0),\n array('SQA', 'US', 'Santa Ynez Arpt', 0),\n array('SQI', 'US', 'Whiteside Cty Municipal', 0),\n array('SQO', 'SE', 'Gunnarn Arpt', 0),\n array('SRABN', 'SR', 'albina', 1),\n array('SRAGI', 'SR', 'wageningen', 1),\n array('SRE', 'BO', 'Sucre Arpt', 0),\n array('SRG', 'ID', 'Achmad Uani Arpt', 0),\n array('SRICK', 'SR', 'nieuw nickerie', 1),\n array('SRL', 'MX', 'Santa Rosalia Arpt', 0),\n array('SRMOJ', 'SR', 'moengo', 1),\n array('SRN', 'AU', 'Strahan Arpt', 0),\n array('SRP', 'NO', 'Stord Arpt', 0),\n array('SRPBM', 'SR', 'paramaribo', 1),\n array('SRPRM', 'SR', 'paranam', 1),\n array('SRQ', 'US', 'Sarasota Bradenton Arpt', 0),\n array('SRSMA', 'SR', 'smalkalden', 1),\n array('SRU', 'US', 'Skypark Arpt', 0),\n array('SRZ', 'BO', 'El Trompillo Arpt', 0),\n array('SSA', 'BR', 'Luis E Magalhaes Arpt', 0),\n array('SSG', 'GQ', 'Santa Isabel Arpt', 0),\n array('SSH', 'EG', 'Ophira Arpt', 0),\n array('SSI', 'US', 'McKinnon Arpt', 0),\n array('SSJ', 'NO', 'Stokka Arpt', 0),\n array('SSQ', 'CA', 'La Sarre Rail Station', 0),\n array('STB', 'VE', 'Las Delicias Arpt', 0),\n array('STBOZ', 'ST', 'bolama', 1),\n array('STBSO', 'ST', 'bissao', 1),\n array('STC', 'US', 'Saint Cloud Municipal', 0),\n array('STD', 'VE', 'Mayor Humberto Vivas Guerrero Arpt', 0),\n array('STE', 'US', 'Stevens Point Municipal', 0),\n array('STI', 'DO', 'Santiago Municipal', 0),\n array('STL', 'US', 'Lambert St Louis Intl', 0),\n array('STM', 'BR', 'Eduardo Gomes Arpt', 0),\n array('STN', 'GB', 'Stansted', 0),\n array('STP', 'US', 'Downtown St Paul Arpt', 0),\n array('STPCP', 'ST', 'principe', 1),\n array('STR', 'DE', 'Echterdingen Arpt', 0),\n array('STS', 'US', 'Sonoma Cty Arpt', 0),\n array('STSAA', 'ST', 'santo antonio', 1),\n array('STT', 'US', 'Cyril E King Arpt', 0),\n array('STTMS', 'ST', 'sao tome island', 1),\n array('STW', 'RU', 'Stavropol Arpt', 0),\n array('STX', 'US', 'Alexander Hamilton Arpt', 0),\n array('STY', 'UY', 'Salto Arpt', 0),\n array('SUA', 'US', 'Witham Field', 0),\n array('SUB', 'ID', 'Juanda Arpt', 0),\n array('SUE', 'US', 'Door Country Arpt', 0),\n array('SUF', 'IT', 'S Eufemia Arpt', 0),\n array('SUH', 'OM', 'Sur Arpt', 0),\n array('SUM', 'US', 'Sumter Municipal Arpt', 0),\n array('SUN', 'US', 'Friedman Memorial', 0),\n array('SUS', 'US', 'Spirit Of St Louis Arpt', 0),\n array('SUU', 'US', 'Travis AFB', 0),\n array('SUV', 'FJ', 'Nausori Airport', 0),\n array('SUW', 'US', 'Richard I Bong Arpt', 0),\n array('SUX', 'US', 'Sioux Gateway Arpt', 0),\n array('SVAQJ', 'SV', 'acajutla', 1),\n array('SVBAN', 'SV', 'bani', 1),\n array('SVBAR', 'SV', 'barahona', 1),\n array('SVBCH', 'SV', 'boca chica', 1),\n array('SVC', 'US', 'Grant County Airport', 0),\n array('SVCJO', 'SV', 'cabo jojo', 1),\n array('SVD', 'VC', 'Arnos Vale Arpt', 0),\n array('SVG', 'NO', 'Sola Airport', 0),\n array('SVH', 'US', 'Statesville Municipal Arpt', 0),\n array('SVHAI', 'SV', 'haina', 1),\n array('SVJ', 'NO', 'Helle', 0),\n array('SVL', 'FI', 'Savonlinna Arpt', 0),\n array('SVLLD', 'SV', 'la libertad', 1),\n array('SVLRO', 'SV', 'la romana', 1),\n array('SVLUN', 'SV', 'la union', 1),\n array('SVMAN', 'SV', 'manzanillo', 1),\n array('SVO', 'RU', 'Sheremetyevo Arpt', 0),\n array('SVPAL', 'SV', 'palenque', 1),\n array('SVPVA', 'SV', 'puerto viejo de azua', 1),\n array('SVQ', 'ES', 'San Pablo Arpt', 0),\n array('SVSAB', 'SV', 'sabana', 1),\n array('SVSAL', 'SV', 'san salvador', 1),\n array('SVSCH', 'SV', 'sanchez', 1),\n array('SVSCI', 'SV', 'santo tomas de castilla', 1),\n array('SVSDO', 'SV', 'santo domingo', 1),\n array('SVSFM', 'SV', 'si francisco macoros', 1),\n array('SVSPM', 'SV', 'san pedro de marcoris', 1),\n array('SVU', 'FJ', 'Savusavu Airport', 0),\n array('SVX', 'RU', 'Sverdolovsk Arpt', 0),\n array('SVZ', 'VE', 'San Antonio Arpt', 0),\n array('SWA', 'CN', 'Shantou Airport', 0),\n array('SWD', 'US', 'Seward Airport', 0),\n array('SWF', 'US', 'Stewart Airport', 0),\n array('SWH', 'AU', 'Swan Hill Arpt', 0),\n array('SWI', 'GB', 'Swindon Rail Station', 0),\n array('SWK', 'IT', 'Segrate Arpt', 0),\n array('SWO', 'US', 'Searcy Fld', 0),\n array('SWS', 'GB', 'Fairwood Comm', 0),\n array('SXB', 'FR', 'Enzheim Arpt', 0),\n array('SXC', 'US', 'Catalina Arpt', 0),\n array('SXD', 'FR', 'Sophia Antipolis Hlpt', 0),\n array('SXE', 'AU', 'Sale Arpt', 0),\n array('SXF', 'DE', 'Schoenefeld Arpt', 0),\n array('SXL', 'IE', 'Collooney', 0),\n array('SXM', 'AN', 'Princ Juliana Arpt', 0),\n array('SXR', 'IN', 'Srinagar Arpt', 0),\n array('SYBAN', 'SY', 'baniyas', 1),\n array('SYD', 'AU', 'Sydney Kingsford Smith Arpt', 0),\n array('SYDAM', 'SY', 'damascus (damas)', 1),\n array('SYLTK', 'SY', 'latakia', 1),\n array('SYO', 'JP', 'Shonai Arpt', 0),\n array('SYQ', 'CR', 'Tobias Bolanos Intl', 0),\n array('SYR', 'US', 'Hancock Intl', 0),\n array('SYTTS', 'SY', 'tartous', 1),\n array('SYX', 'CN', 'Sanya Arpt', 0),\n array('SYY', 'GB', 'Stornoway Arpt', 0),\n array('SYZ', 'IR', 'Shiraz Arpt', 0),\n array('SZB', 'MY', 'Sultan Abdul Aziz Shah Arpt', 0),\n array('SZD', 'GB', 'Sheffield City Arpt', 0),\n array('SZF', 'TR', 'Carsamba Arpt', 0),\n array('SZG', 'AT', 'W A Mozart Arpt', 0),\n array('SZJ', 'CU', 'Siguanea Arpt', 0),\n array('SZK', 'ZA', 'Skukuza Arpt', 0),\n array('SZO', 'CN', 'Shanzhou Arpt', 0),\n array('SZT', 'MX', 'San Cristobal Arpt', 0),\n array('SZW', 'DE', 'Parchim Arpt', 0),\n array('SZX', 'CN', 'Shenzhen Arpt', 0),\n array('SZZ', 'PL', 'Goleniow Arpt', 0),\n array('TAB', 'TT', 'Crown Point Arpt', 0),\n array('TAC', 'PH', 'D Z Romualdez Arpt', 0),\n array('TAD', 'US', 'Las Animas Arpt', 0),\n array('TAE', 'KR', 'Daegu Arpt', 0),\n array('TAK', 'JP', 'Takamatsu Arpt', 0),\n array('TAL', 'US', 'Ralph Calhoun Arpt', 0),\n array('TAM', 'MX', 'General F Javier Mina', 0),\n array('TAO', 'CN', 'Liuting Arpt', 0),\n array('TAP', 'MX', 'Tapachula Arpt', 0),\n array('TAR', 'IT', 'M A Grottag Arpt', 0),\n array('TAS', 'UZ', 'Vostochny Arpt', 0),\n array('TAT', 'SK', 'Tatry Poprad', 0),\n array('TAY', 'EE', 'Tartu Arpt', 0),\n array('TAZ', 'TM', 'Dashoguz Arpt', 0),\n array('TBG', 'PG', 'Tabubil Arpt', 0),\n array('TBJ', 'TN', 'Tabarka Arpt', 0),\n array('TBN', 'US', 'Forney Field', 0),\n array('TBP', 'PE', 'Tumbes Arpt', 0),\n array('TBS', 'GE', 'Novo Alexeyevka Arpt', 0),\n array('TBT', 'BR', 'Tabatinga Intl Arpt', 0),\n array('TBU', 'TO', 'Tongatapu Intl', 0),\n array('TCA', 'AU', 'Tennant Creek Arpt', 0),\n array('TCB', 'BS', 'Treasure Cay Arpt', 0),\n array('TCC', 'US', 'Tucumcari Arpt', 0),\n array('TCGDT', 'TC', 'grand turk island', 1),\n array('TCL', 'US', 'Van De Graff Arpt', 0),\n array('TCN', 'MX', 'Tehuacan Arpt', 0),\n array('TCNCA', 'TC', 'north caicos', 1),\n array('TCP', 'EG', 'Ras An Naqb Arpt', 0),\n array('TCPLS', 'TC', 'providenciales', 1),\n array('TCSLX', 'TC', 'salt cay', 1),\n array('TCU', 'ZA', 'Thaba Nchu Arpt', 0),\n array('TCW', 'AU', 'Tocumwal Arpt', 0),\n array('TCXSC', 'TC', 'south caicos', 1),\n array('TDD', 'BO', 'Trinidad Arpt', 0),\n array('TDL', 'AR', 'Tandil Arpt', 0),\n array('TDW', 'US', 'Tradewind Airport', 0),\n array('TEA', 'HN', 'Tela Arpt', 0),\n array('TEC', 'BR', 'Telemaco Borba Arpt', 0),\n array('TED', 'DK', 'Thisted Arpt', 0),\n array('TER', 'PT', 'Lajes Arpt', 0),\n array('TET', 'MZ', 'Matunda Arpt', 0),\n array('TEU', 'NZ', 'Manapouri Airport', 0),\n array('TEX', 'US', 'Telluride Municipal Arpt', 0),\n array('TFF', 'BR', 'Tefe Arpt', 0),\n array('TFN', 'ES', 'Tenerife Norte Los Rodeos Arpt', 0),\n array('TFS', 'ES', 'Reina Sofia Arpt', 0),\n array('TGANE', 'TG', 'anecho', 1),\n array('TGD', 'YU', 'Golubovci Arpt', 0),\n array('TGG', 'MY', 'Sultan Mahmood Arpt', 0),\n array('TGKPE', 'TG', 'kpeme', 1),\n array('TGLFW', 'TG', 'lome', 1),\n array('TGM', 'RO', 'Tirgu Mures Arpt', 0),\n array('TGN', 'AU', 'La Trobe Traralgon Arpt', 0),\n array('TGT', 'TZ', 'Tanga Arpt', 0),\n array('TGU', 'HN', 'Toncontin Arpt', 0),\n array('TGZ', 'MX', 'Llano San Juan Arpt', 0),\n array('THBKK', 'TH', 'bangkok', 1),\n array('THBND', 'TH', 'bandon', 1),\n array('THBNG', 'TH', 'bangnara', 1),\n array('THBNL', 'TH', 'banlaem', 1),\n array('THBTP', 'TH', 'ban tajua pa', 1),\n array('THCHA', 'TH', 'chanthaburi', 1),\n array('THCHU', 'TH', 'chumporn', 1),\n array('THE', 'BR', 'Teresina Arpt', 0),\n array('THF', 'DE', 'Tempelhof Arpt', 0),\n array('THG', 'AU', 'Thangool Arpt', 0),\n array('THHDY', 'TH', 'hat yai', 1),\n array('THHKT', 'TH', 'phuket', 1),\n array('THKAN', 'TH', 'kanjang', 1),\n array('THKBV', 'TH', 'krabi', 1),\n array('THKLA', 'TH', 'koh lanta', 1),\n array('THKLY', 'TH', 'klong yai', 1),\n array('THKNO', 'TH', 'koh nok', 1),\n array('THKSI', 'TH', 'koh sichang', 1),\n array('THKYO', 'TH', 'koh yao', 1),\n array('THLAS', 'TH', 'lang suan', 1),\n array('THLCH', 'TH', 'laem chabang', 1),\n array('THMAT', 'TH', 'mab tapud', 1),\n array('THMEK', 'TH', 'meklong', 1),\n array('THN', 'SE', 'Trollhattan Arpt', 0),\n array('THNAW', 'TH', 'narathiwat', 1),\n array('THNST', 'TH', 'nakhon si thamamrat', 1),\n array('THP', 'US', 'Hot Springs', 0),\n array('THPAN', 'TH', 'pattani', 1),\n array('THPHA', 'TH', 'phangnga', 1),\n array('THPKB', 'TH', 'pakbara', 1),\n array('THPKN', 'TH', 'paknam', 1),\n array('THPKP', 'TH', 'pakpanang', 1),\n array('THR', 'IR', 'Mehrabad Arpt', 0),\n array('THS', 'TH', 'Sukhothai Arpt', 0),\n array('THSAT', 'TH', 'sattahip', 1),\n array('THSGZ', 'TH', 'songkhla', 1),\n array('THSIC', 'TH', 'sichol', 1),\n array('THSIN', 'TH', 'singora', 1),\n array('THSRI', 'TH', 'sriracha', 1),\n array('THTAC', 'TH', 'ta-chalaeb', 1),\n array('THTHA', 'TH', 'tha sala', 1),\n array('THTST', 'TH', 'trang', 1),\n array('THUNN', 'TH', 'ranong', 1),\n array('THUSM', 'TH', 'koh samui', 1),\n array('THV', 'US', 'York Arpt', 0),\n array('TIA', 'AL', 'Rinas Arpt', 0),\n array('TIF', 'SA', 'Taif Airport', 0),\n array('TIH', 'PF', 'Tikehau Arpt', 0),\n array('TIJ', 'MX', 'Gen Abelardo Rodriguez', 0),\n array('TIM', 'ID', 'Timika Arpt', 0),\n array('TIP', 'LY', 'Tripoli Intl Arpt', 0),\n array('TIQ', 'MP', 'Tinian Arpt', 0),\n array('TIR', 'IN', 'Tirupati Arpt', 0),\n array('TIS', 'AU', 'Thursday Island Arpt', 0),\n array('TIU', 'NZ', 'Timaru Arpt', 0),\n array('TIV', 'YU', 'Tivat Arpt', 0),\n array('TIW', 'US', 'Tacoma Industrial Arpt', 0),\n array('TIX', 'US', 'Space Center Executive Arpt', 0),\n array('TIZ', 'PG', 'Tari Arpt', 0),\n array('TJA', 'BO', 'Tarija Arpt', 0),\n array('TJM', 'RU', 'Tyumen Arpt', 0),\n array('TJQ', 'ID', 'Bulutumbang Arpt', 0),\n array('TKF', 'US', 'Truckee Airport', 0),\n array('TKG', 'ID', 'Bandar Lampung Arpt', 0),\n array('TKJ', 'US', 'Tok Arpt', 0),\n array('TKK', 'FM', 'Truk Arpt', 0),\n array('TKM', 'GT', 'El Peten Arpt', 0),\n array('TKN', 'JP', 'Tokunoshima Arpt', 0),\n array('TKS', 'JP', 'Tokushima Arpt', 0),\n array('TKU', 'FI', 'Turku Arpt', 0),\n array('TLC', 'MX', 'Morelos Arpt', 0),\n array('TLE', 'MG', 'Tulear Arpt', 0),\n array('TLH', 'US', 'Tallahassee Municipal', 0),\n array('TLL', 'EE', 'Ulemiste Arpt', 0),\n array('TLN', 'FR', 'Le Palyvestre Arpt', 0),\n array('TLR', 'US', 'Mefford Field', 0),\n array('TLS', 'FR', 'Blagnac Arpt', 0),\n array('TLV', 'IL', 'Ben Gurion Intl Arpt', 0),\n array('TMA', 'US', 'Henry Tift Myers Arpt', 0),\n array('TMB', 'US', 'Tamiami Airport', 0),\n array('TMM', 'MG', 'Tamatave Arpt', 0),\n array('TMP', 'FI', 'Tampere Pirkkala Arpt', 0),\n array('TMT', 'BR', 'Trombetas Arpt', 0),\n array('TMTMZ', 'TM', 'termez', 1),\n array('TMU', 'CR', 'Tambor Arpt', 0),\n array('TMW', 'AU', 'Tamworth Arpt', 0),\n array('TMZ', 'NZ', 'Thames Arpt', 0),\n array('TNA', 'CN', 'Jinan Arpt', 0),\n array('TNASH', 'TN', 'ashtart terminal', 1),\n array('TNBIZ', 'TN', 'bizerte', 1),\n array('TNDJE', 'TN', 'djerba', 1),\n array('TNE', 'JP', 'Tanega Shima Arpt', 0),\n array('TNG', 'MA', 'Boukhalef Arpt', 0),\n array('TNGAE', 'TN', 'gabes', 1),\n array('TNLGN', 'TN', 'la goulette nord (halqueloued)', 1),\n array('TNLSK', 'TN', 'la skhirra', 1),\n array('TNMBA', 'TN', 'menzel bourguiba', 1),\n array('TNN', 'TW', 'Tainan Arpt', 0),\n array('TNO', 'CR', 'Tamarindo Arpt', 0),\n array('TNR', 'MG', 'Ivato Arpt', 0),\n array('TNRDS', 'TN', 'rades/tunis', 1),\n array('TNSFA', 'TN', 'sfax', 1),\n array('TNSUS', 'TN', 'sousse', 1),\n array('TNTUN', 'TN', 'tunis', 1),\n array('TOB', 'LY', 'Tobruk Arpt', 0),\n array('TOD', 'MY', 'Tioman Arpt', 0),\n array('TOE', 'TN', 'Tozeur Arpt', 0),\n array('TOF', 'RU', 'Tomsk Arpt', 0),\n array('TOHPA', 'TO', 'ha\\'apai', 1),\n array('TOL', 'US', 'Toledo Express Arpt', 0),\n array('TONEI', 'TO', 'neiafu', 1),\n array('TOP', 'US', 'Phillip Billard Arpt', 0),\n array('TOPAN', 'TO', 'pangai', 1),\n array('TOR', 'US', 'Torrington Minicipal Arpt', 0),\n array('TOS', 'NO', 'Tromso Langnes Arpt', 0),\n array('TOTBU', 'TO', 'nuku\\'alofa-tongatapu', 1),\n array('TOW', 'BR', 'Toledo Arpt', 0),\n array('TOX', 'RU', 'Tobolsk Arpt', 0),\n array('TOY', 'JP', 'Toyama Arpt', 0),\n array('TPA', 'US', 'Tampa Intl', 0),\n array('TPDIL', 'TP', 'dili', 1),\n array('TPE', 'TW', 'Chiang Kai Shek Arpt', 0),\n array('TPF', 'US', 'Peter O Knight Arpt', 0),\n array('TPL', 'US', 'Temple Arpt', 0),\n array('TPQ', 'MX', 'Tepic Arpt', 0),\n array('TPR', 'AU', 'Tom Price', 0),\n array('TPS', 'IT', 'Birgi Arpt', 0),\n array('TQR', 'IT', 'San Domino Island Arpt', 0),\n array('TRADA', 'TR', 'adana', 1),\n array('TRAKB', 'TR', 'akcaabat', 1),\n array('TRAKY', 'TR', 'akcay', 1),\n array('TRALA', 'TR', 'alanya', 1),\n array('TRALI', 'TR', 'aliaga', 1),\n array('TRAMA', 'TR', 'amasra', 1),\n array('TRANA', 'TR', 'anamur', 1),\n array('TRAYA', 'TR', 'ayancik', 1),\n array('TRAYD', 'TR', 'altinkum (name change)', 1),\n array('TRAYT', 'TR', 'antalya', 1),\n array('TRAYV', 'TR', 'ayvalik', 1),\n array('TRBDM', 'TR', 'bandirmar', 1),\n array('TRBEY', 'TR', 'beykoz', 1),\n array('TRBHN', 'TR', 'burhaniye', 1),\n array('TRBOG', 'TR', 'bogazagzi', 1),\n array('TRBOL', 'TR', 'bolu', 1),\n array('TRBUY', 'TR', 'buyukcukur', 1),\n array('TRBXN', 'TR', 'bodrum', 1),\n array('TRBZB', 'TR', 'bozburun', 1),\n array('TRBZC', 'TR', 'bozcaada', 1),\n array('TRBZI', 'TR', 'balikesir', 1),\n array('TRC', 'MX', 'Francisco Sarabia Arpt', 0),\n array('TRCAM', 'TR', 'camalti', 1),\n array('TRCES', 'TR', 'cesme', 1),\n array('TRCID', 'TR', 'cide', 1),\n array('TRCKZ', 'TR', 'canakkale', 1),\n array('TRCUB', 'TR', 'cubuklu', 1),\n array('TRD', 'NO', 'Trondheim Vaernes Arpt', 0),\n array('TRDAR', 'TR', 'darica', 1),\n array('TRDAT', 'TR', 'datca', 1),\n array('TRDIK', 'TR', 'dikili', 1),\n array('TRDIL', 'TR', 'diliskelesi', 1),\n array('TRDRC', 'TR', 'derince', 1),\n array('TRDYL', 'TR', 'dortyol', 1),\n array('TRE', 'GB', 'Tiree Arpt', 0),\n array('TREDI', 'TR', 'edirne', 1),\n array('TRELI', 'TR', 'eregli', 1),\n array('TRENE', 'TR', 'enez', 1),\n array('TRERE', 'TR', 'eregli', 1),\n array('TRERK', 'TR', 'erdek', 1),\n array('TRF', 'NO', 'Sandefjord Arpt', 0),\n array('TRFAS', 'TR', 'fatsa', 1),\n array('TRFET', 'TR', 'fethiye', 1),\n array('TRFIN', 'TR', 'finike', 1),\n array('TRFOC', 'TR', 'foca', 1),\n array('TRG', 'NZ', 'Tauranga Arpt', 0),\n array('TRGCA', 'TR', 'gokceada', 1),\n array('TRGCK', 'TR', 'gocek', 1),\n array('TRGEL', 'TR', 'gelibolu', 1),\n array('TRGEM', 'TR', 'gemlik', 1),\n array('TRGIR', 'TR', 'giresun', 1),\n array('TRGKV', 'TR', 'gokova', 1),\n array('TRGOR', 'TR', 'gorele', 1),\n array('TRGTA', 'TR', 'galata', 1),\n array('TRGUL', 'TR', 'gulluk', 1),\n array('TRHAR', 'TR', 'haramidere', 1),\n array('TRHAS', 'TR', 'haskoy', 1),\n array('TRHAY', 'TR', 'haydarpasa', 1),\n array('TRHER', 'TR', 'hereke', 1),\n array('TRHOP', 'TR', 'hopa', 1),\n array('TRI', 'US', 'Tri City Regional Arpt', 0),\n array('TRIGN', 'TR', 'igneada', 1),\n array('TRIMR', 'TR', 'isemir', 1),\n array('TRINE', 'TR', 'inebolu', 1),\n array('TRISK', 'TR', 'iskenderun', 1),\n array('TRIST', 'TR', 'istanbul', 1),\n array('TRIZM', 'TR', 'izmir (smyrna)', 1),\n array('TRIZT', 'TR', 'izmit', 1),\n array('TRKAR', 'TR', 'kartal', 1),\n array('TRKAS', 'TR', 'kas', 1),\n array('TRKBY', 'TR', 'karacabey', 1),\n array('TRKOC', 'TR', 'kusukkuyu', 1),\n array('TRKRB', 'TR', 'karabiga', 1),\n array('TRKUS', 'TR', 'kusadasi', 1),\n array('TRL', 'US', 'Terrell Field Arpt', 0),\n array('TRMAL', 'TR', 'maltepe', 1),\n array('TRMER', 'TR', 'mersin', 1),\n array('TRMRA', 'TR', 'marmara adasi', 1),\n array('TRMRM', 'TR', 'marmaris', 1),\n array('TRMUD', 'TR', 'mudanya', 1),\n array('TRN', 'IT', 'Citta Di Torino Arpt', 0),\n array('TRNEM', 'TR', 'nemrut bay', 1),\n array('TRO', 'AU', 'Taree Arpt', 0),\n array('TRODU', 'TR', 'odunluk', 1),\n array('TRORD', 'TR', 'ordu', 1),\n array('TRPEN', 'TR', 'pendik', 1),\n array('TRRIZ', 'TR', 'rize', 1),\n array('TRS', 'IT', 'Ronchi Dei Legionari Arpt', 0),\n array('TRSER', 'TR', 'serviburun', 1),\n array('TRSIC', 'TR', 'sinop', 1),\n array('TRSSX', 'TR', 'samsun', 1),\n array('TRSUR', 'TR', 'surmene', 1),\n array('TRSUT', 'TR', 'sutluce', 1),\n array('TRTAS', 'TR', 'tasucu', 1),\n array('TRTEK', 'TR', 'tekirdag', 1),\n array('TRTIR', 'TR', 'tirebolu', 1),\n array('TRTUR', 'TR', 'turan', 1),\n array('TRTUT', 'TR', 'tutunciftlik', 1),\n array('TRTUZ', 'TR', 'tuzla', 1),\n array('TRTZX', 'TR', 'trabzon', 1),\n array('TRU', 'PE', 'Trujillo Arpt', 0),\n array('TRUNY', 'TR', 'unye', 1),\n array('TRURL', 'TR', 'urla', 1),\n array('TRUSK', 'TR', 'uskudar', 1),\n array('TRV', 'IN', 'Thiruvananthapuram Arpt', 0),\n array('TRW', 'KI', 'Bonriki Arpt', 0),\n array('TRYAR', 'TR', 'yarimca', 1),\n array('TRZEY', 'TR', 'zeytinburnu', 1),\n array('TRZON', 'TR', 'zonguldak', 1),\n array('TSA', 'TW', 'Sung Shan Arpt', 0),\n array('TSF', 'IT', 'Treviso Arpt', 0),\n array('TSJ', 'JP', 'Tsushima Arpt', 0),\n array('TSM', 'US', 'Taos Airport', 0),\n array('TSN', 'CN', 'Tianjin Airport', 0),\n array('TSO', 'GB', 'Tresco Arpt', 0),\n array('TSR', 'RO', 'Timisoara Arpt', 0),\n array('TSS', 'US', 'East 34th St Hlpt', 0),\n array('TST', 'TH', 'Trang Arpt', 0),\n array('TSV', 'AU', 'Townsville Arpt', 0),\n array('TTB', 'IT', 'Arbatax Arpt', 0),\n array('TTCHA', 'TT', 'chaguaramas', 1),\n array('TTD', 'US', 'Troutdale Arpt', 0),\n array('TTJ', 'JP', 'Tottori Arpt', 0),\n array('TTLAB', 'TT', 'la brea (brighton)', 1),\n array('TTN', 'US', 'Trenton Mercer Arpt', 0),\n array('TTPLY', 'TT', 'plymouth', 1),\n array('TTPOS', 'TT', 'port of spain', 1),\n array('TTPTF', 'TT', 'point fortin', 1),\n array('TTPTG', 'TT', 'point galeota', 1),\n array('TTPTP', 'TT', 'pointe a pierre', 1),\n array('TTPTS', 'TT', 'point lisas', 1),\n array('TTQ', 'CR', 'Tortuquero Arpt', 0),\n array('TTSCA', 'TT', 'scarborough/tobago', 1),\n array('TTSFE', 'TT', 'san fernando', 1),\n array('TTT', 'TW', 'Taitung Arpt', 0),\n array('TTTEM', 'TT', 'tembladora', 1),\n array('TUC', 'AR', 'Benjamin Matienzo Airport', 0),\n array('TUF', 'FR', 'Saint Symphorien Arpt', 0),\n array('TUI', 'SA', 'Turaif Arpt', 0),\n array('TUK', 'PK', 'Turbat Arpt', 0),\n array('TUL', 'US', 'Tulsa Intl', 0),\n array('TUN', 'TN', 'Carthage Arpt', 0),\n array('TUO', 'NZ', 'Taupo Arpt', 0),\n array('TUP', 'US', 'C D Lemons Municipal', 0),\n array('TUR', 'BR', 'Tucurui Arpt', 0),\n array('TUS', 'US', 'Tucson Intl Arpt', 0),\n array('TUU', 'SA', 'Tabuk Arpt', 0),\n array('TUY', 'MX', 'Tulum Arpt', 0),\n array('TVC', 'US', 'Cherry Capital Arpt', 0),\n array('TVF', 'US', 'Thief River Falls Numicipal', 0),\n array('TVFUN', 'TV', 'funafuti', 1),\n array('TVL', 'US', 'Lake Tahoe Arpt', 0),\n array('TVU', 'FJ', 'Matei Arpt', 0),\n array('TWB', 'AU', 'Toowoomba Arpt', 0),\n array('TWF', 'US', 'Sun Valley Regional', 0),\n array('TWHUN', 'TW', 'hualien', 1),\n array('TWKEL', 'TW', 'keelung (chilung)', 1),\n array('TWKHH', 'TW', 'kaohsiung', 1),\n array('TWSUO', 'TW', 'suao', 1),\n array('TWTAO', 'TW', 'tao yuan hsien', 1),\n array('TWTNN', 'TW', 'tainan', 1),\n array('TWTTT', 'TW', 'taitung', 1),\n array('TWTXG', 'TW', 'taichung', 1),\n array('TWU', 'MY', 'Tawau Arpt', 0),\n array('TXG', 'TW', 'Taichung Arpt', 0),\n array('TXK', 'US', 'Texarkana Municipal', 0),\n array('TXL', 'DE', 'Tegel Airport', 0),\n array('TYR', 'US', 'Pounds Field', 0),\n array('TYS', 'US', 'McGhee Tyson Arpt', 0),\n array('TZA', 'BZ', 'Belize City Municipal', 0),\n array('TZDAR', 'TZ', 'dar es salaam', 1),\n array('TZKIK', 'TZ', 'kilwa kivinje', 1),\n array('TZKIM', 'TZ', 'kilwa masoko', 1),\n array('TZL', 'BA', 'Tuzla Intl Arpt', 0),\n array('TZLDI', 'TZ', 'lindi', 1),\n array('TZMIC', 'TZ', 'michiuja', 1),\n array('TZMIK', 'TZ', 'mikindani', 1),\n array('TZMKO', 'TZ', 'mkokotoni zanzibar', 1),\n array('TZMOH', 'TZ', 'mohoro', 1),\n array('TZMTS', 'TZ', 'mtsora', 1),\n array('TZMWZ', 'TZ', 'mwanza', 1),\n array('TZMYW', 'TZ', 'mtwara', 1),\n array('TZN', 'BS', 'South Andros Arpt', 0),\n array('TZPAN', 'TZ', 'pangani', 1),\n array('TZPMA', 'TZ', 'pemba', 1),\n array('TZRIJ', 'TZ', 'rijiju', 1),\n array('TZSAM', 'TZ', 'samanga', 1),\n array('TZTGT', 'TZ', 'tanga', 1),\n array('TZTKQ', 'TZ', 'kigoma', 1),\n array('TZX', 'TR', 'Trabzon Arpt', 0),\n array('TZZNZ', 'TZ', 'zanzibar', 1),\n array('UABGD', 'UA', 'belgorod-dnestrovskiy', 1),\n array('UAC', 'MX', 'San Luis Rio Colorado Municipal', 0),\n array('UAERD', 'UA', 'berdyansk', 1),\n array('UAFEO', 'UA', 'feodosiya', 1),\n array('UAIEV', 'UA', 'kiev', 1),\n array('UAILK', 'UA', 'ilyichevsk', 1),\n array('UAIZM', 'UA', 'izmail', 1),\n array('UAK', 'GL', 'Narsarsuaq Arpt', 0),\n array('UAKEH', 'UA', 'kerch', 1),\n array('UAKHE', 'UA', 'kherson', 1),\n array('UAKIA', 'UA', 'kiliya', 1),\n array('UANIK', 'UA', 'nikolayev', 1),\n array('UAODS', 'UA', 'odessa', 1),\n array('UAQ', 'AR', 'San Juan Arpt', 0),\n array('UARNI', 'UA', 'reni', 1),\n array('UAS', 'KE', 'Samburu Airstrip', 0),\n array('UASHA', 'UA', 'shakhtersk', 1),\n array('UASVP', 'UA', 'sevastopol', 1),\n array('UAUDY', 'UA', 'ust dunaysk', 1),\n array('UAUGL', 'UA', 'uglegorsk', 1),\n array('UAUSD', 'UA', 'ust donetskiy', 1),\n array('UAYAL', 'UA', 'yalta', 1),\n array('UAYUZ', 'UA', 'yuzhnyy', 1),\n array('UBA', 'BR', 'Uberaba Airport', 0),\n array('UBJ', 'JP', 'Ube Airport', 0),\n array('UBP', 'TH', 'Muang Ubon Arpt', 0),\n array('UBS', 'US', 'Lowndes Cty Arpt', 0),\n array('UCA', 'US', 'Oneida County Arpt', 0),\n array('UCK', 'UA', 'Lutsk Arpt', 0),\n array('UDD', 'US', 'Bermuda Dunes Arpt', 0),\n array('UDE', 'NL', 'Volkel Arpt', 0),\n array('UDI', 'BR', 'Eduardo Gomes Airprt', 0),\n array('UDN', 'IT', 'Campoformido Arpt', 0),\n array('UDR', 'IN', 'Dabok Airport', 0),\n array('UEE', 'AU', 'Queenstown Arpt', 0),\n array('UEO', 'JP', 'Kumejima Arpt', 0),\n array('UGC', 'UZ', 'Urgench Arpt', 0),\n array('UGJIN', 'UG', 'jinja', 1),\n array('UGN', 'US', 'Memorial Arpt', 0),\n array('UIN', 'US', 'Baldwin Field', 0),\n array('UIO', 'EC', 'Mariscal Arpt', 0),\n array('UIP', 'FR', 'Pluguffan Arpt', 0),\n array('UIR', 'AU', 'Quirindi Arpt', 0),\n array('UIZ', 'US', 'Berz Macomb Arpt', 0),\n array('UKI', 'US', 'Ukiah Arpt', 0),\n array('UKT', 'US', 'Upper Bucks Arpt', 0),\n array('UKY', 'JP', 'Kyoto Arpt', 0),\n array('ULC', 'CL', 'Los Cerrillos', 0),\n array('ULM', 'US', 'New Ulm Arpt', 0),\n array('ULN', 'MN', 'Buyant Uhaa Airport', 0),\n array('ULP', 'AU', 'Quilpie Arpt', 0),\n array('UMAWK', 'UM', 'wake island', 1),\n array('UME', 'SE', 'Umea Airport', 0),\n array('UMJON', 'UM', 'johnston atoll', 1),\n array('UMMDY', 'UM', 'midway islands', 1),\n array('UMU', 'BR', 'Ernesto Geisel Arpt', 0),\n array('UMY', 'UA', 'Sumy Arpt', 0),\n array('UNA', 'BR', 'Una Airport', 0),\n array('UNI', 'VC', 'Union Island Arpt', 0),\n array('UNK', 'US', 'Unalakleet Arpt', 0),\n array('UNN', 'TH', 'Ranong Arpt', 0),\n array('UNT', 'GB', 'Baltasound Arpt', 0),\n array('UOX', 'US', 'University Oxford', 0),\n array('UPG', 'ID', 'Hasanudin Arpt', 0),\n array('UPN', 'MX', 'Uruapan Arpt', 0),\n array('URC', 'CN', 'Urumqi Arpt', 0),\n array('URG', 'BR', 'Ruben Berta Arpt', 0),\n array('URO', 'FR', 'Boos Airport', 0),\n array('URS', 'RU', 'Kursk Arpt', 0),\n array('URT', 'TH', 'Surat Thani Arpt', 0),\n array('USAAF', 'US', 'apalachicola', 1),\n array('USAAY', 'US', 'kenmore air harbor', 1),\n array('USABC', 'US', 'port hadlock', 1),\n array('USABX', 'US', 'du pont', 1),\n array('USACC', 'US', 'raymond', 1),\n array('USACF', 'US', 'sumas', 1),\n array('USACJ', 'US', 'south bend', 1),\n array('USACQ', 'US', 'willapa harbour', 1),\n array('USALB', 'US', 'albany', 1),\n array('USALC', 'US', 'alcan', 1),\n array('USALG', 'US', 'algonac', 1),\n array('USAMA', 'US', 'ama', 1),\n array('USAMB', 'US', 'ambrose', 1),\n array('USANC', 'US', 'anchorage', 1),\n array('USANP', 'US', 'annapolis', 1),\n array('USANT', 'US', 'antler', 1),\n array('USANU', 'US', 'andrade', 1),\n array('USARB', 'US', 'ann arbor', 1),\n array('USASF', 'US', 'ashtabula', 1),\n array('USAST', 'US', 'astoria', 1),\n array('USASX', 'US', 'ashland', 1),\n array('USATR', 'US', 'atreco', 1),\n array('USATW', 'US', 'appleton', 1),\n array('USAVD', 'US', 'avondale', 1),\n array('USAVP', 'US', 'scranton-wilkes-barre', 1),\n array('USAXB', 'US', 'alexandria bay', 1),\n array('USBAL', 'US', 'baltimore', 1),\n array('USBAY', 'US', 'bayonne', 1),\n array('USBCC', 'US', 'vancouver', 1),\n array('USBCG', 'US', 'bocagrande', 1),\n array('USBDE', 'US', 'baudette', 1),\n array('USBDR', 'US', 'bridgeport', 1),\n array('USBDT', 'US', 'bridgewater', 1),\n array('USBEF', 'US', 'beecher falls', 1),\n array('USBEL', 'US', 'belfast', 1),\n array('USBEO', 'US', 'bernalillo', 1),\n array('USBFO', 'US', 'beaufort-morehead city', 1),\n array('USBGR', 'US', 'bangor', 1),\n array('USBHB', 'US', 'bar harbor', 1),\n array('USBLA', 'US', 'blaine', 1),\n array('USBLI', 'US', 'bellingham', 1),\n array('USBNC', 'US', 'benicia', 1),\n array('USBOS', 'US', 'boston', 1),\n array('USBOY', 'US', 'brooklyn', 1),\n array('USBPT', 'US', 'beaumont', 1),\n array('USBRA', 'US', 'bradwood', 1),\n array('USBRO', 'US', 'brownsville', 1),\n array('USBRR', 'US', 'brewster', 1),\n array('USBTH', 'US', 'bath', 1),\n array('USBTM', 'US', 'butte', 1),\n array('USBTR', 'US', 'baton rouge', 1),\n array('USBTV', 'US', 'burlington', 1),\n array('USBUF', 'US', 'buffalo', 1),\n array('USBUP', 'US', 'bucksport', 1),\n array('USCAI', 'US', 'castle island', 1),\n array('USCAL', 'US', 'calais', 1),\n array('USCAP', 'US', 'capitan', 1),\n array('USCAR', 'US', 'carquinez strait', 1),\n array('USCBY', 'US', 'carbury', 1),\n array('USCCC', 'US', 'cape charles city', 1),\n array('USCCT', 'US', 'calvert city', 1),\n array('USCDE', 'US', 'camden', 1),\n array('USCDV', 'US', 'cordova', 1),\n array('USCDY', 'US', 'conneaut', 1),\n array('USCEC', 'US', 'crescent city', 1),\n array('USCGE', 'US', 'cambridge', 1),\n array('USCHI', 'US', 'chicago', 1),\n array('USCHS', 'US', 'charleston', 1),\n array('USCHT', 'US', 'chester', 1),\n array('USCID', 'US', 'cedar rapids', 1),\n array('USCLA', 'US', 'claymont', 1),\n array('USCLE', 'US', 'cleveland', 1),\n array('USCLM', 'US', 'port angeles', 1),\n array('USCLQ', 'US', 'chalmette', 1),\n array('USCLY', 'US', 'clayton', 1),\n array('USCOB', 'US', 'coos bay', 1),\n array('USCPT', 'US', 'carpinteria', 1),\n array('USCPX', 'US', 'champlain-rouses pt.', 1),\n array('USCRB', 'US', 'carrabelle', 1),\n array('USCRI', 'US', 'crisfield', 1),\n array('USCRM', 'US', 'crockett', 1),\n array('USCRP', 'US', 'corpus christi', 1),\n array('USCSF', 'US', 'carteret', 1),\n array('USCSR', 'US', 'chester', 1),\n array('USCTY', 'US', 'chateaugay', 1),\n array('USCUS', 'US', 'columbus', 1),\n array('USCUU', 'US', 'cut shoot', 1),\n array('USCVG', 'US', 'cincinnati', 1),\n array('USCVI', 'US', 'cape vincent', 1),\n array('USCVT', 'US', 'convent', 1),\n array('USCXL', 'US', 'calexico', 1),\n array('USCYL', 'US', 'chantilly', 1),\n array('USDAV', 'US', 'davenport', 1),\n array('USDAW', 'US', 'darrow,luoisiana', 1),\n array('USDBA', 'US', 'del bonita', 1),\n array('USDBY', 'US', 'derby line', 1),\n array('USDEC', 'US', 'decatur', 1),\n array('USDET', 'US', 'detroit city', 1),\n array('USDFW', 'US', 'dallas-fort worth reg apt', 1),\n array('USDLC', 'US', 'dalton cacha', 1),\n array('USDLH', 'US', 'duluth', 1),\n array('USDSM', 'US', 'des moines', 1),\n array('USDTO', 'US', 'detour', 1),\n array('USDUN', 'US', 'dunseith', 1),\n array('USDUT', 'US', 'dutch harbor', 1),\n array('USDVT', 'US', 'davant', 1),\n array('USDVV', 'US', 'davisville', 1),\n array('USEAM', 'US', 'earle', 1),\n array('USECH', 'US', 'east chicago', 1),\n array('USEGP', 'US', 'eagle pass', 1),\n array('USEKA', 'US', 'eureka', 1),\n array('USEKI', 'US', 'elkhart', 1),\n array('USELS', 'US', 'el segundo', 1),\n array('USENW', 'US', 'kenosha', 1),\n array('USEPI', 'US', 'eastport', 1),\n array('USEPM', 'US', 'eastport', 1),\n array('USERI', 'US', 'erie', 1),\n array('USESC', 'US', 'escanaba', 1),\n array('USEWB', 'US', 'new bedford', 1),\n array('USEWR', 'US', 'newark', 1),\n array('USEYW', 'US', 'key west', 1),\n array('USFAB', 'US', 'fabens', 1),\n array('USFAI', 'US', 'fairbanks', 1),\n array('USFAL', 'US', 'roma', 1),\n array('USFCO', 'US', 'fort covington', 1),\n array('USFDT', 'US', 'ferndale', 1),\n array('USFEB', 'US', 'fernandina beach', 1),\n array('USFER', 'US', 'ferrysburg', 1),\n array('USFFA', 'US', 'fort fairfield', 1),\n array('USFKT', 'US', 'fort kent', 1),\n array('USFOB', 'US', 'fort bragg', 1),\n array('USFPR', 'US', 'fort pierce', 1),\n array('USFPT', 'US', 'fairport', 1),\n array('USFRO', 'US', 'frontier', 1),\n array('USFRP', 'US', 'freeport', 1),\n array('USFRT', 'US', 'fortuna', 1),\n array('USFRY', 'US', 'ferry', 1),\n array('USFWA', 'US', 'fort wayne', 1),\n array('USGDH', 'US', 'good hope', 1),\n array('USGDR', 'US', 'gardiner', 1),\n array('USGED', 'US', 'georgetown', 1),\n array('USGGE', 'US', 'georgetown', 1),\n array('USGHN', 'US', 'grand haven', 1),\n array('USGLC', 'US', 'gloucester city', 1),\n array('USGLH', 'US', 'greenville', 1),\n array('USGLO', 'US', 'gloucester', 1),\n array('USGLS', 'US', 'galveston', 1),\n array('USGON', 'US', 'new london-groton apt', 1),\n array('USGPT', 'US', 'gulfport', 1),\n array('USGRA', 'US', 'grand portage', 1),\n array('USGRB', 'US', 'green bay', 1),\n array('USGRR', 'US', 'grand rapids', 1),\n array('USGRV', 'US', 'grays river', 1),\n array('USGRW', 'US', 'greenwich', 1),\n array('USGRY', 'US', 'gramercy', 1),\n array('USGYY', 'US', 'gary', 1),\n array('USH', 'AR', 'Islas Malvinas Arpt', 0),\n array('USHAH', 'US', 'hahnville', 1),\n array('USHBO', 'US', 'hansboro', 1),\n array('USHBY', 'US', 'humboldt bay', 1),\n array('USHID', 'US', 'hidalgo', 1),\n array('USHIS', 'US', 'highgate springs', 1),\n array('USHNA', 'US', 'hannah (dupl.code hnn)', 1),\n array('USHNL', 'US', 'honolulu', 1),\n array('USHNS', 'US', 'haines', 1),\n array('USHNT', 'US', 'hunting', 1),\n array('USHOB', 'US', 'hoboken', 1),\n array('USHOI', 'US', 'homer', 1),\n array('USHOU', 'US', 'houston', 1),\n array('USHPW', 'US', 'hopewell', 1),\n array('USHPY', 'US', 'baytown', 1),\n array('USHQM', 'US', 'aberdeen-hoquiam apt', 1),\n array('USHUB', 'US', 'huron', 1),\n array('USHUL', 'US', 'houlton', 1),\n array('USHVN', 'US', 'new haven', 1),\n array('USIFR', 'US', 'ranier', 1),\n array('USILG', 'US', 'wilmington', 1),\n array('USILM', 'US', 'wilmington', 1),\n array('USINL', 'US', 'international falls', 1),\n array('USITO', 'US', 'hilo', 1),\n array('USJAM', 'US', 'jackman', 1),\n array('USJAX', 'US', 'jacksonville', 1),\n array('USJBK', 'US', 'berkeley', 1),\n array('USJEC', 'US', 'jersey city', 1),\n array('USJMC', 'US', 'sausalito', 1),\n array('USJNP', 'US', 'newport beach', 1),\n array('USJNU', 'US', 'juneau', 1),\n array('USJOB', 'US', 'jobos', 1),\n array('USJON', 'US', 'jonesport', 1),\n array('USKAL', 'US', 'kalama', 1),\n array('USKAS', 'US', 'kasitna bay', 1),\n array('USKBA', 'US', 'kings bay', 1),\n array('USKCK', 'US', 'kansas city', 1),\n array('USKEN', 'US', 'kenai', 1),\n array('USKLS', 'US', 'kelso', 1),\n array('USKLZ', 'US', 'kalamazoo', 1),\n array('USKTN', 'US', 'ketchikan', 1),\n array('USL', 'AU', 'Useless Loop Arpt', 0),\n array('USLAT', 'US', 'los alamitos', 1),\n array('USLAU', 'US', 'laurier', 1),\n array('USLAX', 'US', 'los angeles', 1),\n array('USLCH', 'US', 'lake charles', 1),\n array('USLEM', 'US', 'leominster', 1),\n array('USLGB', 'US', 'long beach', 1),\n array('USLGV', 'US', 'longview', 1),\n array('USLGZ', 'US', 'logan airport', 1),\n array('USLIA', 'US', 'louisiana', 1),\n array('USLIZ', 'US', 'limestone', 1),\n array('USLOG', 'US', 'longview', 1),\n array('USLOR', 'US', 'lorain', 1),\n array('USLUD', 'US', 'lukeville', 1),\n array('USLUI', 'US', 'louisville', 1),\n array('USLUS', 'US', 'laurens', 1),\n array('USLVU', 'US', 'lawrenceburg', 1),\n array('USLWE', 'US', 'lawrence', 1),\n array('USLYN', 'US', 'lynden', 1),\n array('USM', 'TH', 'Koh Samui Arpt', 0),\n array('USMAD', 'US', 'madawaska', 1),\n array('USMAH', 'US', 'marcus hook', 1),\n array('USMAI', 'US', 'maida', 1),\n array('USMBS', 'US', 'bay city-midland-saginaw', 1),\n array('USMCD', 'US', 'mackinac island', 1),\n array('USMCR', 'US', 'manchester', 1),\n array('USMEE', 'US', 'Manatee', 1),\n array('USMIA', 'US', 'miami', 1),\n array('USMKC', 'US', 'kansas city', 1),\n array('USMKE', 'US', 'milwaukee', 1),\n array('USMKG', 'US', 'muskegon', 1),\n array('USMLG', 'US', 'moss landing', 1),\n array('USMOB', 'US', 'mobile', 1),\n array('USMOY', 'US', 'marinette', 1),\n array('USMPI', 'US', 'mountplier', 1),\n array('USMQI', 'US', 'quincy', 1),\n array('USMRG', 'US', 'morgan', 1),\n array('USMRH', 'US', 'morehead city', 1),\n array('USMRO', 'US', 'moreo', 1),\n array('USMRT', 'US', 'morriston', 1),\n array('USMRZ', 'US', 'martinez', 1),\n array('USMSS', 'US', 'massena', 1),\n array('USMST', 'US', 'muskegon-manistee', 1),\n array('USMSY', 'US', 'new orleans', 1),\n array('USMTE', 'US', 'myrtle grove,louisiana', 1),\n array('USMTF', 'US', 'metaline falls', 1),\n array('USMTM', 'US', 'metlakatla', 1),\n array('USMTW', 'US', 'manitowoc', 1),\n array('USMVI', 'US', 'mellville', 1),\n array('USMVN', 'US', 'mount vernon', 1),\n array('USMYG', 'US', 'myrtle grove', 1),\n array('USMZZ', 'US', 'marion', 1),\n array('USN', 'KR', 'Ulsan Arpt', 0),\n array('USNAC', 'US', 'naco', 1),\n array('USNCM', 'US', 'norco', 1),\n array('USNEB', 'US', 'neah bay', 1),\n array('USNEC', 'US', 'neche', 1),\n array('USNEE', 'US', 'needham', 1),\n array('USNEN', 'US', 'norfolk-newport news', 1),\n array('USNEV', 'US', 'st rose', 1),\n array('USNEW', 'US', 'destrehan', 1),\n array('USNGT', 'US', 'northgate', 1),\n array('USNGZ', 'US', 'alameda', 1),\n array('USNIH', 'US', 'nighthawk', 1),\n array('USNOO', 'US', 'noonan', 1),\n array('USNOY', 'US', 'noyes', 1),\n array('USNPO', 'US', 'newport', 1),\n array('USNPT', 'US', 'newport', 1),\n array('USNRT', 'US', 'norton', 1),\n array('USNTD', 'US', 'port hueneme', 1),\n array('USNTY', 'US', 'north troy', 1),\n array('USNWL', 'US', 'nawiliwili', 1),\n array('USNYC', 'US', 'new york', 1),\n array('USOAK', 'US', 'oakland', 1),\n array('USOBO', 'US', 'obispo', 1),\n array('USODC', 'US', 'oildale', 1),\n array('USOGS', 'US', 'ogdensburg', 1),\n array('USOKC', 'US', 'oklahoma city', 1),\n array('USOLM', 'US', 'olympia', 1),\n array('USOLS', 'US', 'nogales', 1),\n array('USOME', 'US', 'nome', 1),\n array('USOPH', 'US', 'opheim', 1),\n array('USORF', 'US', 'norfolk', 1),\n array('USORG', 'US', 'orange', 1),\n array('USORH', 'US', 'worcester', 1),\n array('USOSW', 'US', 'oswego', 1),\n array('USOTH', 'US', 'north bend', 1),\n array('USOWB', 'US', 'owensboro', 1),\n array('USOXR', 'US', 'ventura-oxnard', 1),\n array('USPAB', 'US', 'palm beach', 1),\n array('USPAT', 'US', 'paterson', 1),\n array('USPAU', 'US', 'paulsboro', 1),\n array('USPAY', 'US', 'perth amboy', 1),\n array('USPBG', 'US', 'pittsburg', 1),\n array('USPBI', 'US', 'west palm beach', 1),\n array('USPBR', 'US', 'pitsburg', 1),\n array('USPCA', 'US', 'port canaveral', 1),\n array('USPCR', 'US', 'point comfort', 1),\n array('USPDX', 'US', 'portland', 1),\n array('USPEA', 'US', 'pearl harbor', 1),\n array('USPEC', 'US', 'pelican', 1),\n array('USPEF', 'US', 'port everglades', 1),\n array('USPFN', 'US', 'panama city', 1),\n array('USPGH', 'US', 'port gamble', 1),\n array('USPGL', 'US', 'pascagoula', 1),\n array('USPGN', 'US', 'piegan', 1),\n array('USPHF', 'US', 'hampton-newport news-williamsb', 1),\n array('USPHL', 'US', 'philadelphia', 1),\n array('USPHN', 'US', 'port huron', 1),\n array('USPIE', 'US', 'st petersburg', 1),\n array('USPIN', 'US', 'pinecreek', 1),\n array('USPIS', 'US', 'port isabel-brownsville', 1),\n array('USPKN', 'US', 'por klang', 1),\n array('USPLL', 'US', 'port allen', 1),\n array('USPLU', 'US', 'port ludlow', 1),\n array('USPLV', 'US', 'port lavaca', 1),\n array('USPMB', 'US', 'pembina', 1),\n array('USPNS', 'US', 'pensacola', 1),\n array('USPOA', 'US', 'port arthur', 1),\n array('USPON', 'US', 'port neches', 1),\n array('USPRE', 'US', 'presidio', 1),\n array('USPRG', 'US', 'progresso', 1),\n array('USPRL', 'US', 'port royal', 1),\n array('USPRS', 'US', 'point roberts', 1),\n array('USPRY', 'US', 'port blakely', 1),\n array('USPSD', 'US', 'pasadena', 1),\n array('USPSJ', 'US', 'port st joe', 1),\n array('USPSL', 'US', 'port san luis', 1),\n array('USPSM', 'US', 'portsmouth', 1),\n array('USPTD', 'US', 'partland', 1),\n array('USPTG', 'US', 'st. petersburg', 1),\n array('USPTH', 'US', 'porthill', 1),\n array('USPTL', 'US', 'portal', 1),\n array('USPTM', 'US', 'portsmouth', 1),\n array('USPTO', 'US', 'Port Cherry', 1),\n array('USPUA', 'US', 'paulina', 1),\n array('USPUG', 'US', 'puget sound', 1),\n array('USPVC', 'US', 'provincetown', 1),\n array('USPVD', 'US', 'providence', 1),\n array('USPWM', 'US', 'portland', 1),\n array('USPWR', 'US', 'powell-river', 1),\n array('USPWT', 'US', 'bremerton', 1),\n array('USPYM', 'US', 'plymouth', 1),\n array('USQAD', 'US', 'st albans-quincy', 1),\n array('USRAC', 'US', 'racine', 1),\n array('USRAI', 'US', 'rainier', 1),\n array('USRCH', 'US', 'richmond', 1),\n array('USRCY', 'US', 'roger ciry', 1),\n array('USREV', 'US', 'reedville', 1),\n array('USRFR', 'US', 'richford', 1),\n array('USRGC', 'US', 'rio grande city', 1),\n array('USRIC', 'US', 'richmond', 1),\n array('USRIV', 'US', 'reidsville', 1),\n array('USRKD', 'US', 'rockland', 1),\n array('USRND', 'US', 'raymond', 1),\n array('USRNO', 'US', 'reno', 1),\n array('USROC', 'US', 'rochester', 1),\n array('USROO', 'US', 'roosville', 1),\n array('USROX', 'US', 'roseau', 1),\n array('USRRS', 'US', 'roosevelt roads', 1),\n array('USRRT', 'US', 'warroad (entry & code error)', 1),\n array('USRSV', 'US', 'reserve l.a.', 1),\n array('USRWC', 'US', 'redwood city', 1),\n array('USS', 'CU', 'Sancti Spiritus Arpt', 0),\n array('USSAB', 'US', 'sabine', 1),\n array('USSAC', 'US', 'sacramento', 1),\n array('USSAN', 'US', 'san diego', 1),\n array('USSAO', 'US', 'sarles', 1),\n array('USSAS', 'US', 'sasabe', 1),\n array('USSAT', 'US', 'san antonio', 1),\n array('USSAV', 'US', 'savannah', 1),\n array('USSBA', 'US', 'santa barbara', 1),\n array('USSBR', 'US', 'south bond-raymond', 1),\n array('USSBZ', 'US', 'sheboygan', 1),\n array('USSCK', 'US', 'stockton', 1),\n array('USSCO', 'US', 'scobey', 1),\n array('USSCV', 'US', 'scottsville', 1),\n array('USSDY', 'US', 'sandusky', 1),\n array('USSEA', 'US', 'seattle', 1),\n array('USSEL', 'US', 'selby', 1),\n array('USSEW', 'US', 'seward', 1),\n array('USSFN', 'US', 'woonsocket', 1),\n array('USSFO', 'US', 'san francisco', 1),\n array('USSFY', 'US', 'springfield', 1),\n array('USSGY', 'US', 'skagway', 1),\n array('USSHW', 'US', 'sherwood', 1),\n array('USSIB', 'US', 'silver bay', 1),\n array('USSJC', 'US', 'san jose', 1),\n array('USSJN', 'US', 'st john', 1),\n array('USSJS', 'US', 'st joseph', 1),\n array('USSLI', 'US', 'san luis', 1),\n array('USSLM', 'US', 'salem', 1),\n array('USSMK', 'US', 'san mateo', 1),\n array('USSML', 'US', 'smith\\'s bluff', 1),\n array('USSNP', 'US', 'sidney', 1),\n array('USSOD', 'US', 'sodus point', 1),\n array('USSOH', 'US', 'south haven', 1),\n array('USSPB', 'US', 'san pablo bay', 1),\n array('USSPQ', 'US', 'san pedro', 1),\n array('USSRP', 'US', 'searsport', 1),\n array('USSRT', 'US', 'sparrows point', 1),\n array('USSRU', 'US', 'santa cruz', 1),\n array('USSSI', 'US', 'brunswick', 1),\n array('USSSM', 'US', 'sault ste marie', 1),\n array('USSTA', 'US', 'st albans', 1),\n array('USSTG', 'US', 'st george island', 1),\n array('USSTH', 'US', 'st helens', 1),\n array('USSTL', 'US', 'st louis', 1),\n array('USSTP', 'US', 'st paul', 1),\n array('USSUB', 'US', 'suisun bay', 1),\n array('USSUL', 'US', 'port sulphur', 1),\n array('USSUT', 'US', 'sunny point', 1),\n array('USSUW', 'US', 'superior', 1),\n array('USSWG', 'US', 'sweetgrass', 1),\n array('USSYO', 'US', 'san ysidro', 1),\n array('USSYP', 'US', 'sandy point', 1),\n array('USSYR', 'US', 'syracuse', 1),\n array('UST', 'US', 'St Augustine Arpt', 0),\n array('USTCT', 'US', 'taconite-silver bay', 1),\n array('USTEC', 'US', 'tecate', 1),\n array('USTEO', 'US', 'theodore', 1),\n array('USTMA', 'US', 'tacoma', 1),\n array('USTOL', 'US', 'toledo', 1),\n array('USTPA', 'US', 'tampa', 1),\n array('USTRR', 'US', 'trout river', 1),\n array('USTUR', 'US', 'turner', 1),\n array('USTWD', 'US', 'port townsend', 1),\n array('USTXT', 'US', 'texas city', 1),\n array('USUFG', 'US', 'chesapeake', 1),\n array('USVBN', 'US', 'van buren', 1),\n array('USVBO', 'US', 'vanceboro', 1),\n array('USVDZ', 'US', 'valdez', 1),\n array('USVKS', 'US', 'vicksburg', 1),\n array('USVLO', 'US', 'vallejo', 1),\n array('USWAL', 'US', 'walhalla', 1),\n array('USWHL', 'US', 'whitlash', 1),\n array('USWHP', 'US', 'westhope', 1),\n array('USWHS', 'US', 'whitetail', 1),\n array('USWIP', 'US', 'wills point', 1),\n array('USWIR', 'US', 'williamette river', 1),\n array('USWPT', 'US', 'westport', 1),\n array('USWRD', 'US', 'west redding', 1),\n array('USWRG', 'US', 'wrangell', 1),\n array('USWRN', 'US', 'warren', 1),\n array('USWTN', 'US', 'wilmington', 1),\n array('USWTO', 'US', 'warrenton', 1),\n array('USWWO', 'US', 'westwego', 1),\n array('USWXD', 'US', 'wexford', 1),\n array('USYAK', 'US', 'yakutat', 1),\n array('USYON', 'US', 'yonkers', 1),\n array('UTA', 'ZW', 'Mutare Arpt', 0),\n array('UTH', 'TH', 'Udon Thani Arpt', 0),\n array('UTN', 'ZA', 'Upington Airport', 0),\n array('UTP', 'TH', 'U Tapao Arpt', 0),\n array('UTT', 'ZA', 'K D Matamzima Arpt', 0),\n array('UTW', 'ZA', 'Queenstown Airport', 0),\n array('UUD', 'RU', 'Ulan Ude Arpt', 0),\n array('UUS', 'RU', 'Yuzhno Sakhalinsk Arpt', 0),\n array('UVF', 'DM', 'Hewanorra', 0),\n array('UVL', 'EG', 'Kharga Arpt', 0),\n array('UYCAR', 'UY', 'carmelo', 1),\n array('UYCYR', 'UY', 'colonia', 1),\n array('UYDZO', 'UY', 'durazno', 1),\n array('UYFZB', 'UY', 'fray bentos', 1),\n array('UYJIT', 'UY', 'jose ignacio terminal', 1),\n array('UYLAP', 'UY', 'la paloma/rocha', 1),\n array('UYMER', 'UY', 'mercedes', 1),\n array('UYMVD', 'UY', 'montevideo', 1),\n array('UYNVP', 'UY', 'nueva palmira', 1),\n array('UYPDP', 'UY', 'punta del este', 1),\n array('UYPDU', 'UY', 'paysandu', 1),\n array('UYSTY', 'UY', 'salto', 1),\n array('VAA', 'FI', 'Vaasa Arpt', 0),\n array('VAF', 'FR', 'Chabeuil Airport', 0),\n array('VAG', 'BR', 'Maj Brig Trompowsky Arpt', 0),\n array('VAI', 'PG', 'Vanimo Arpt', 0),\n array('VAR', 'BG', 'Varna', 0),\n array('VAV', 'TO', 'Lupepau U Arpt', 0),\n array('VAW', 'NO', 'Vardoe Luftan', 0),\n array('VBS', 'IT', 'Montichiari Arpt', 0),\n array('VBY', 'SE', 'Visby Airport', 0),\n array('VCBQU', 'VC', 'port elisabeth bequia', 1),\n array('VCE', 'IT', 'Marco Polo Arpt', 0),\n array('VCKTN', 'VC', 'kingstown st vincent', 1),\n array('VCMQS', 'VC', 'mustique island', 1),\n array('VCP', 'BR', 'Viracopos Arpt', 0),\n array('VCSVD', 'VC', 'st vincent', 1),\n array('VCT', 'US', 'Victoria Regional Arpt', 0),\n array('VCUNI', 'VC', 'union island', 1),\n array('VCV', 'US', 'George AFB', 0),\n array('VDA', 'IL', 'Ovda Arpt', 0),\n array('VDB', 'NO', 'Valdres Arpt', 0),\n array('VDC', 'BR', 'Vitoria Da Conquista Arpt', 0),\n array('VDE', 'ES', 'Hierro Arpt', 0),\n array('VDI', 'US', 'Vidalia Municipal Arpt', 0),\n array('VDS', 'NO', 'Vadso', 0),\n array('VDZ', 'US', 'Valdez Municipal Arpt', 0),\n array('VEAMY', 'VE', 'amuay', 1),\n array('VEARA', 'VE', 'araya', 1),\n array('VEBAV', 'VE', 'bachaquero/maracaibo l', 1),\n array('VEBJV', 'VE', 'bajo grande/maracaibo l', 1),\n array('VECAR', 'VE', 'caripito', 1),\n array('VECBL', 'VE', 'ciudad bolivar', 1),\n array('VECBS', 'VE', 'cabimas/maracaibo l', 1),\n array('VECGU', 'VE', 'ciudad guayana', 1),\n array('VECHV', 'VE', 'chichiriviche', 1),\n array('VECMR', 'VE', 'cumarebo', 1),\n array('VECUM', 'VE', 'cumana', 1),\n array('VECUP', 'VE', 'carupano', 1),\n array('VECXA', 'VE', 'caicara de orinoco', 1),\n array('VECZE', 'VE', 'coro', 1),\n array('VEEGU', 'VE', 'el guamache', 1),\n array('VEELP', 'VE', 'el palito', 1),\n array('VEETV', 'VE', 'el tablazo/maracaibo l', 1),\n array('VEGUB', 'VE', 'guaranao bay', 1),\n array('VEGUI', 'VE', 'guiria', 1),\n array('VEGUT', 'VE', 'guanta', 1),\n array('VEJ', 'DK', 'Vejle Arpt', 0),\n array('VEJSE', 'VE', 'jose', 1),\n array('VEL', 'US', 'Vernal Municipal', 0),\n array('VELAG', 'VE', 'la guaira', 1),\n array('VELCV', 'VE', 'la ceiba/maracaibo l', 1),\n array('VELEC', 'VE', 'la estacada', 1),\n array('VELGY', 'VE', 'lagunillas', 1),\n array('VELSP', 'VE', 'las piedras', 1),\n array('VELSV', 'VE', 'la salina/maracaibo l', 1),\n array('VELVL', 'VE', 'la vela de coro', 1),\n array('VEMAR', 'VE', 'maracaibo', 1),\n array('VEMIV', 'VE', 'puerto miranda/maracaibo l.', 1),\n array('VEMTV', 'VE', 'matanzas', 1),\n array('VEPAR', 'VE', 'paradero', 1),\n array('VEPBL', 'VE', 'puerto cabello', 1),\n array('VEPCA', 'VE', 'punta camacho', 1),\n array('VEPCN', 'VE', 'punta cardon', 1),\n array('VEPCU', 'VE', 'punta cuchillo', 1),\n array('VEPCZ', 'VE', 'puerto la cruz', 1),\n array('VEPFI', 'VE', 'punto fijo', 1),\n array('VEPHO', 'VE', 'puerto de hierro', 1),\n array('VEPJO', 'VE', 'pto. jose', 1),\n array('VEPLA', 'VE', 'palua', 1),\n array('VEPLV', 'VE', 'punta de palmas', 1),\n array('VEPMP', 'VE', 'pampatar', 1),\n array('VEPMR', 'VE', 'palmarejo/maracaibo l.', 1),\n array('VEPPD', 'VE', 'punta de piedra', 1),\n array('VEPPZ', 'VE', 'puerto paez', 1),\n array('VEPRG', 'VE', 'pertigalete', 1),\n array('VEPSU', 'VE', 'puerto sucre', 1),\n array('VEPYH', 'VE', 'puerto ayacucho', 1),\n array('VEPZO', 'VE', 'puerto ordaz', 1),\n array('VER', 'MX', 'Las Bajadas General Heriberto Jara', 0),\n array('VESFD', 'VE', 'san fernando de apure', 1),\n array('VESFX', 'VE', 'san félix', 1),\n array('VESLV', 'VE', 'san lorenzo/maracaibo l', 1),\n array('VETJV', 'VE', 'tia juana/maracaibo l', 1),\n array('VETUR', 'VE', 'turiamo', 1),\n array('VFA', 'ZW', 'Victoria Falls Arpt', 0),\n array('VGD', 'RU', 'Vologda Arpt', 0),\n array('VGEIS', 'VG', 'beef island tortola', 1),\n array('VGO', 'ES', 'Vigo Airport', 0),\n array('VGRAD', 'VG', 'road town tortola', 1),\n array('VGT', 'US', 'Las Vegas North Air Terminal', 0),\n array('VGTOV', 'VG', 'tortola', 1),\n array('VHM', 'SE', 'Vilhelmina Arpt', 0),\n array('VHN', 'US', 'Culberson Cty Arpt', 0),\n array('VHY', 'FR', 'Charmeil Arpt', 0),\n array('VIB', 'MX', 'Villa Constitucion Arpt', 0),\n array('VIC', 'IT', 'Vicenza Arpt', 0),\n array('VICTD', 'VI', 'christiansted st. croix', 1),\n array('VIE', 'AT', 'Vienna Intl Arpt', 0),\n array('VIF', 'IT', 'Vieste Arpt', 0),\n array('VIFRD', 'VI', 'frederiksted st. croix', 1),\n array('VIG', 'VE', 'El Vigia Arpt', 0),\n array('VIHOC', 'VI', 'hovic', 1),\n array('VIJ', 'VG', 'Virgin Gorda Arpt', 0),\n array('VIL', 'MA', 'Dakhla Airport', 0),\n array('VILIB', 'VI', 'limetree bay', 1),\n array('VIN', 'UA', 'Vinnitsa Arpt', 0),\n array('VIR', 'ZA', 'Virginia Arpt', 0),\n array('VIS', 'US', 'Visalia Municipal', 0),\n array('VISTT', 'VI', 'charlotte amalie st thomas', 1),\n array('VIT', 'ES', 'Vitoria Arpt', 0),\n array('VIX', 'BR', 'Eurico Sales Arpt', 0),\n array('VJI', 'US', 'Virginia Highlands Arpt', 0),\n array('VKO', 'RU', 'Vnukovo Arpt', 0),\n array('VKS', 'US', 'Vicksburg Arpt', 0),\n array('VLC', 'ES', 'Valencia Arpt', 0),\n array('VLD', 'US', 'Valdosta Regional', 0),\n array('VLI', 'VU', 'Bauerfield Arpt', 0),\n array('VLL', 'ES', 'Valladolid Arpt', 0),\n array('VLN', 'VE', 'Valenica Arpt', 0),\n array('VLO', 'US', 'Stolport Arpt', 0),\n array('VLV', 'VE', 'Carvajal Arpt', 0),\n array('VME', 'AR', 'Villa Mercedes Arpt', 0),\n array('VMI', 'PY', 'Inc Arpt', 0),\n array('VNBEN', 'VN', 'benthuy', 1),\n array('VNCPH', 'VN', 'cam pha', 1),\n array('VNCRB', 'VN', 'camranh', 1),\n array('VNDAD', 'VN', 'da nang', 1),\n array('VNDOH', 'VN', 'dong hoi', 1),\n array('VNE', 'FR', 'Muecon Arpt', 0),\n array('VNHAA', 'VN', 'hoai an', 1),\n array('VNHAN', 'VN', 'hanoi', 1),\n array('VNHAT', 'VN', 'ha tinh', 1),\n array('VNHCH', 'VN', 'hon chong', 1),\n array('VNHIA', 'VN', 'hoi an', 1),\n array('VNHNH', 'VN', 'hoai nhon', 1),\n array('VNHON', 'VN', 'hongai', 1),\n array('VNHPH', 'VN', 'haiphong', 1),\n array('VNHUI', 'VN', 'hue', 1),\n array('VNKHU', 'VN', 'khonh hung', 1),\n array('VNMOC', 'VN', 'mong cai', 1),\n array('VNMUT', 'VN', 'my tho', 1),\n array('VNNHA', 'VN', 'nha trang', 1),\n array('VNNMD', 'VN', 'nam dinh', 1),\n array('VNO', 'LT', 'Vilnius Arpt', 0),\n array('VNPHA', 'VN', 'phan rang', 1),\n array('VNPHH', 'VN', 'phan thiet', 1),\n array('VNPHL', 'VN', 'phuoe le', 1),\n array('VNQUL', 'VN', 'quang long', 1),\n array('VNQUT', 'VN', 'quang tri', 1),\n array('VNS', 'IN', 'Babatpur Airport', 0),\n array('VNSGN', 'VN', 'ho chi minh city', 1),\n array('VNTBB', 'VN', 'tuy hoa', 1),\n array('VNTBI', 'VN', 'thang binh', 1),\n array('VNTHO', 'VN', 'thanh hoa', 1),\n array('VNUIH', 'VN', 'qui nhon', 1),\n array('VNVCA', 'VN', 'can tho', 1),\n array('VNVLO', 'VN', 'vinh loi', 1),\n array('VNVNH', 'VN', 'vinh', 1),\n array('VNVUT', 'VN', 'vung tau', 1),\n array('VNX', 'MZ', 'Vilanculos Arpt', 0),\n array('VNXNG', 'VN', 'quang ngai', 1),\n array('VNY', 'US', 'Los Angeles Van Nuys Arpt', 0),\n array('VOG', 'RU', 'Volgograd Arpt', 0),\n array('VOL', 'GR', 'Nea Anchialos Arpt', 0),\n array('VPS', 'US', 'Okaloosa Cty Arpt', 0),\n array('VPZ', 'US', 'Porter County', 0),\n array('VRA', 'CU', 'Juan Gualberto Gomez Arpt', 0),\n array('VRB', 'US', 'Vero Beach Municipal Arpt', 0),\n array('VRK', 'FI', 'Varkaus', 0),\n array('VRL', 'PT', 'Vila Real Arpt', 0),\n array('VRN', 'IT', 'Verona Airport', 0),\n array('VRO', 'CU', 'Kawama Arpt', 0),\n array('VSA', 'MX', 'Capt Carlos Rovirosa Perez', 0),\n array('VSG', 'UA', 'Lugansk Arpt', 0),\n array('VST', 'SE', 'Hasslo Airport', 0),\n array('VTB', 'BY', 'Vitebsk Arpt', 0),\n array('VTE', 'LA', 'Wattay Arpt', 0),\n array('VTZ', 'IN', 'Vishakhapatnam', 0),\n array('VUPSA', 'VU', 'port sandwich', 1),\n array('VUSAN', 'VU', 'santo', 1),\n array('VUVLI', 'VU', 'port vila', 1),\n array('VVI', 'BO', 'Viru Viru Intl Arpt', 0),\n array('VVO', 'RU', 'Vladivostok Arpt', 0),\n array('VXE', 'CV', 'San Pedro Airport', 0),\n array('VXO', 'SE', 'Vaxjo Airport', 0),\n array('VYD', 'ZA', 'Vryheid Arpt', 0),\n array('VYS', 'US', 'Illinois Valley Regional Arpt', 0),\n array('WAG', 'NZ', 'Wanganui Arpt', 0),\n array('WAL', 'US', 'Wallops Arpt', 0),\n array('WAT', 'IE', 'Waterford Arpt', 0),\n array('WAW', 'PL', 'Warsaw Intl Arpt', 0),\n array('WAZ', 'AU', 'Warwick Arpt', 0),\n array('WBU', 'US', 'Boulder Municipal Arpt', 0),\n array('WDG', 'US', 'Woodring Municipal', 0),\n array('WDH', 'NA', 'Hosea Kutako International Arpt', 0),\n array('WEA', 'US', 'Parker County Airport', 0),\n array('WEH', 'CN', 'Weihai Arpu', 0),\n array('WEI', 'AU', 'Weipa Arpt', 0),\n array('WEL', 'ZA', 'Welkom Arpt', 0),\n array('WEW', 'AU', 'Wee Waa Airport', 0),\n array('WEX', 'IE', 'Castlebridge Arpt', 0),\n array('WFMAU', 'WF', 'mata-utu', 1),\n array('WGA', 'AU', 'Forest Hill Arpt', 0),\n array('WGE', 'AU', 'Walgett Arpt', 0),\n array('WGO', 'US', 'Winchester Arpt', 0),\n array('WGT', 'AU', 'Wangaratta', 0),\n array('WHK', 'NZ', 'Whakatane Arpt', 0),\n array('WHL', 'AU', 'Welshpool Arpt', 0),\n array('WIC', 'GB', 'Wick Arpt', 0),\n array('WIL', 'KE', 'Wilson Airport', 0),\n array('WJF', 'US', 'Williams J Fox Arpt', 0),\n array('WKA', 'NZ', 'Wanaka Arpt', 0),\n array('WKJ', 'JP', 'Hokkaido Arpt', 0),\n array('WLD', 'US', 'Arkansas City Arpt', 0),\n array('WLG', 'NZ', 'Wellington Intl', 0),\n array('WLK', 'US', 'Selawik Arpt', 0),\n array('WMB', 'AU', 'Warrnambool Arpt', 0),\n array('WMC', 'US', 'Winnemucca Municipal Arpt', 0),\n array('WMH', 'US', 'Mountain Home Arpt', 0),\n array('WNR', 'AU', 'Windorah Arpt', 0),\n array('WNS', 'PK', 'Nawabshah Arpt', 0),\n array('WNZ', 'CN', 'Wenzhou Arpt', 0),\n array('WOL', 'AU', 'Wollongong Arpt', 0),\n array('WPA', 'CL', 'Puerto Aisen Arpt', 0),\n array('WRE', 'NZ', 'Whangarei Arpt', 0),\n array('WRG', 'US', 'Wrangell Seaplane Base', 0),\n array('WRL', 'US', 'Worland Municipal', 0),\n array('WRO', 'PL', 'Strachowice', 0),\n array('WRY', 'GB', 'Westray Arpt', 0),\n array('WSAAU', 'WS', 'asau', 1),\n array('WSAPW', 'WS', 'apia', 1),\n array('WST', 'US', 'Westerly Municipal', 0),\n array('WSY', 'AU', 'Whitsunday Airstrip', 0),\n array('WSZ', 'NZ', 'Westport Airport', 0),\n array('WUH', 'CN', 'Wuhan Arpt', 0),\n array('WVB', 'NA', 'Rooikop Arpt', 0),\n array('WVI', 'US', 'Watsonville Municipal Arpt', 0),\n array('WVL', 'US', 'Robert La Fleur Arpt', 0),\n array('WVN', 'DE', 'Wilhelmshaven Arpt', 0),\n array('WWD', 'US', 'Cape May Arpt', 0),\n array('WWK', 'PG', 'Boram Arpt', 0),\n array('WXF', 'GB', 'Wether Field RAF', 0),\n array('WYA', 'AU', 'Whyalla Arpt', 0),\n array('WYN', 'AU', 'Wyndham Arpt', 0),\n array('WYS', 'US', 'West Yellowstone Arpt', 0),\n array('WZY', 'BS', 'Seaplane Base Arpt', 0),\n array('XAD', 'CA', 'Churchill Rail Station', 0),\n array('XAL', 'MX', 'Alamos Arpt', 0),\n array('XAP', 'BR', 'Chapeco Arpt', 0),\n array('XAW', 'CA', 'Capreol Rail Station', 0),\n array('XAX', 'CA', 'Dorval Rail Station', 0),\n array('XAZ', 'CA', 'Campbellton Rail Station', 0),\n array('XBR', 'CA', 'Brockville Arpt', 0),\n array('XBW', 'CA', 'Killineq Arpt', 0),\n array('XCI', 'CA', 'Chambord Rail Station', 0),\n array('XCM', 'CA', 'Chatham Airport', 0),\n array('XCO', 'AU', 'Colac Arpt', 0),\n array('XDD', 'CA', 'Gaspe Rail Station', 0),\n array('XDG', 'CA', 'Halifax Rail Station', 0),\n array('XDH', 'CA', 'Jasper Rail Station', 0),\n array('XDK', 'FR', 'Dunkerque Arpt', 0),\n array('XDL', 'CA', 'Chandler Rail Station', 0),\n array('XDM', 'CA', 'Drummondville Rail Station', 0),\n array('XDO', 'CA', 'Grande-Riviere Rail Station', 0),\n array('XDP', 'CA', 'Moncton Rail Station', 0),\n array('XDQ', 'CA', 'London Rail Station', 0),\n array('XDS', 'CA', 'Ottawa Rail Station', 0),\n array('XDU', 'CA', 'Hervey Rail Station', 0),\n array('XDV', 'CA', 'Prince George Rail Station', 0),\n array('XDW', 'CA', 'Prince Rupert Rail Station', 0),\n array('XDX', 'CA', 'Sarina Rail Station', 0),\n array('XDY', 'CA', 'Sudbury Junction Rail Station', 0),\n array('XDZ', 'CA', 'The Pas Rail Station', 0),\n array('XEA', 'CA', 'Vancouver Rail Station', 0),\n array('XEC', 'CA', 'Windsor Rail Station', 0),\n array('XEE', 'CA', 'Lac Edouard Rail Station', 0),\n array('XEF', 'CA', 'Winnipeg Rail Station', 0),\n array('XEG', 'CA', 'Kingston Rail Station', 0),\n array('XEH', 'CA', 'Ladysmith Rail Station', 0),\n array('XEJ', 'CA', 'Langford Rail Station', 0),\n array('XEK', 'CA', 'Melville Rail Station', 0),\n array('XEL', 'CA', 'New Carlisle Rail Station', 0),\n array('XEM', 'CA', 'New Richmond Rail Station', 0),\n array('XER', 'FR', 'Strasbourg Bus Service', 0),\n array('XEV', 'SE', 'Stockholm Rail Station', 0),\n array('XEW', 'SE', 'Flemingsberg Rail Station', 0),\n array('XEY', 'CA', 'Newcastle Rail Station', 0),\n array('XEZ', 'SE', 'Sodertalje S Rail Station', 0),\n array('XFD', 'CA', 'Stratford Rail Station', 0),\n array('XFE', 'CA', 'Parent Rail Station', 0),\n array('XFG', 'CA', 'Perce Rail Station', 0),\n array('XFI', 'CA', 'Port-Daniel Rail Station', 0),\n array('XFJ', 'SE', 'Eskilstuna Rail Station', 0),\n array('XFK', 'CA', 'Senneterre Rail Station', 0),\n array('XFL', 'CA', 'Shawinigan Rail Station', 0),\n array('XFM', 'CA', 'Shawnigan Rail Station', 0),\n array('XFO', 'CA', 'Taschereau Rail Station', 0),\n array('XFP', 'SE', 'Malmo Railway Service', 0),\n array('XFQ', 'CA', 'Weymont Rail Station', 0),\n array('XFR', 'SE', 'Malmo South Railway Service', 0),\n array('XFS', 'CA', 'Alexandria Rail Station', 0),\n array('XFU', 'SE', 'Tierp Rail Station', 0),\n array('XFV', 'CA', 'Brantford Rail Station', 0),\n array('XFY', 'CA', 'Sainte-Foy Rail Station', 0),\n array('XFZ', 'CA', 'Charny Rail Station', 0),\n array('XGC', 'SE', 'Lund C Rail Station', 0),\n array('XGD', 'NO', 'Arendal Rail Station', 0),\n array('XGI', 'NO', 'Andalsnes Rail Station', 0),\n array('XGJ', 'CA', 'Cobourg Rail Station', 0),\n array('XGK', 'CA', 'Coteau Rail Station', 0),\n array('XGM', 'GB', 'Grantham Rail Station', 0),\n array('XGP', 'NO', 'Dombas Rail Station', 0),\n array('XGU', 'NO', 'Asker Rail Station', 0),\n array('XGW', 'CA', 'Gananoque Rail Station', 0),\n array('XGY', 'CA', 'Grimsby Rail Station', 0),\n array('XHF', 'NO', 'Honefoss Rail Station', 0),\n array('XHM', 'CA', 'Georgetown Rail Station', 0),\n array('XHS', 'CA', 'Chemainus Rail Station', 0),\n array('XIA', 'CA', 'Guelph Rail Station', 0),\n array('XIB', 'CA', 'Ingersoll Rail Station', 0),\n array('XID', 'CA', 'Maxville Rail Station', 0),\n array('XIF', 'CA', 'Napanee Rail Station', 0),\n array('XII', 'CA', 'Prescott Rail Station', 0),\n array('XIM', 'CA', 'Saint Hyacinthe Rail Station', 0),\n array('XIO', 'CA', 'St Marys Rail Station', 0),\n array('XIP', 'CA', 'Woodstock Rail Station', 0),\n array('XIY', 'CN', 'Xianyang Arpt', 0),\n array('XJL', 'CA', 'Joliette Rail Station', 0),\n array('XJQ', 'CA', 'Jonquiere Rail Station', 0),\n array('XKB', 'NO', 'Kongsberg Rail Station', 0),\n array('XKC', 'NO', 'Sandnes Rail Station', 0),\n array('XKD', 'NO', 'Halden Rail Station', 0),\n array('XKE', 'NO', 'Rena Rail Station', 0),\n array('XKF', 'NO', 'Fredrikstad Rail Station', 0),\n array('XKG', 'NO', 'Grong Rail Station', 0),\n array('XKI', 'NO', 'Lillestrom Rail Station', 0),\n array('XKJ', 'NO', 'Steinkjer Rail Station', 0),\n array('XKK', 'NO', 'Larvik Rail Station', 0),\n array('XKM', 'NO', 'Moss Rail Station', 0),\n array('XKN', 'NO', 'Finse Rail Station', 0),\n array('XKP', 'NO', 'Porsgrunn Rail Station', 0),\n array('XKQ', 'NO', 'Sarpsborg Rail Station', 0),\n array('XKR', 'NO', 'Kristiansand Rail Station', 0),\n array('XKV', 'CA', 'Sackville Rail Station', 0),\n array('XKZ', 'NO', 'Vinstra Rail Station', 0),\n array('XLJ', 'CA', 'Quebec City Rail Station', 0),\n array('XLK', 'CA', 'Levis Rail Station', 0),\n array('XLM', 'CA', 'Saint Lambert Rail Station', 0),\n array('XLP', 'CA', 'Matapedia Rail Station', 0),\n array('XLQ', 'CA', 'Guildwood Rail Station', 0),\n array('XLV', 'CA', 'Niagara Falls Rail Station', 0),\n array('XLY', 'CA', 'Aldershot Rail Station', 0),\n array('XLZ', 'CA', 'Truro Rail Station', 0),\n array('XMN', 'CN', 'Xiamen Intl Airport', 0),\n array('XNA', 'US', 'Northwest Arkansas Regional Arpt', 0),\n array('XND', 'NO', 'Drammen Rail Station', 0),\n array('XNM', 'GB', 'Nottingham Rail Station', 0),\n array('XNO', 'GB', 'Northallerton Rail Station', 0),\n array('XNV', 'GB', 'Nuneaton Rail Station', 0),\n array('XOD', 'NO', 'Oppdal Rail Station', 0),\n array('XOK', 'CA', 'Oakville Rail Station', 0),\n array('XON', 'CA', 'Carleton Rail Station', 0),\n array('XOP', 'FR', 'Poitiers Rail Station', 0),\n array('XOQ', 'NO', 'Sira Rail Station', 0),\n array('XOR', 'NO', 'Otta Rail Station', 0),\n array('XPB', 'CA', 'Parksville Rail Station', 0),\n array('XPF', 'GB', 'Penrith Rail Station', 0),\n array('XPG', 'FR', 'Gare du Nord Railway Station', 0),\n array('XPH', 'CA', 'Port Hope Rail Station', 0),\n array('XPK', 'CA', 'Pukatawagan Rail Station', 0),\n array('XPL', 'HN', 'Palmerola Air Base', 0),\n array('XPN', 'CA', 'Brampton Rail Station', 0),\n array('XPT', 'GB', 'Preston Rail Station', 0),\n array('XPX', 'CA', 'Pointe-aux-Trembles Rail Station', 0),\n array('XQG', 'GB', 'Berwick Rail Station', 0),\n array('XQL', 'GB', 'Lancaster Rail Station', 0),\n array('XQP', 'CR', 'Quepos Arpt', 0),\n array('XQU', 'CA', 'Qualicum Arpt', 0),\n array('XRC', 'GB', 'Runcorn Rail Station', 0),\n array('XRD', 'NO', 'Egersund Rail Station', 0),\n array('XRF', 'FR', 'Marseille Rail Station', 0),\n array('XRP', 'CA', 'Pine Ridge Rail Station', 0),\n array('XRU', 'GB', 'Rugby Rail Station', 0),\n array('XRY', 'ES', 'La Parra Arpt', 0),\n array('XSC', 'TC', 'South Caicos Intl Arpt', 0),\n array('XSH', 'FR', 'St Pierre des Corps/Tours Rail Stn', 0),\n array('XSR', 'GB', 'Salisbury Rail Station', 0),\n array('XTK', 'GB', 'Thirsk Rail Station', 0),\n array('XTY', 'CA', 'Strathroy Rail Station', 0),\n array('XVA', 'GB', 'Stockport Rail Station', 0),\n array('XVB', 'GB', 'Stafford Rail Station', 0),\n array('XVC', 'GB', 'Crewe Rail Station', 0),\n array('XVG', 'GB', 'Darlington Rail Station', 0),\n array('XVH', 'GB', 'Peterborough Rail Station', 0),\n array('XVJ', 'GB', 'Stevenage Rail Station', 0),\n array('XVK', 'NO', 'Voss Rail Station', 0),\n array('XVU', 'GB', 'Durham Rail Station', 0),\n array('XVV', 'CA', 'Belleville Rail Station', 0),\n array('XVW', 'GB', 'Belleville Rail Station', 0),\n array('XWA', 'CA', 'Watford Rail Station', 0),\n array('XWD', 'GB', 'Wakefield Westgate Rail Station', 0),\n array('XWH', 'GB', 'Stroke on Trent Rail Station', 0),\n array('XWL', 'SE', 'Gothenburg Rail', 0),\n array('XWM', 'SE', 'Hallsberg Rail Station', 0),\n array('XWN', 'GB', 'Warrington B Q Rail Station', 0),\n array('XWP', 'SE', 'Hassleholm Rail Station', 0),\n array('XWR', 'SE', 'Orebro Bofors Railway Service', 0),\n array('XWV', 'SE', 'Varberg Rail Station', 0),\n array('XWY', 'CA', 'Wyoming Rail Station', 0),\n array('XXD', 'SE', 'Degerfors Rail Station', 0),\n array('XXL', 'NO', 'Lillehammer Rail Station', 0),\n array('XXM', 'SE', 'Mjolby Rail Station', 0),\n array('XXO', 'SE', 'Leksand Rail Station', 0),\n array('XXU', 'SE', 'Hedemora Rail Station', 0),\n array('XXY', 'SE', 'Ronneby Railway Service', 0),\n array('XXZ', 'SE', 'Sundsvall Rail Service', 0),\n array('XYC', 'SE', 'Herrljunga Rail Station', 0),\n array('XYD', 'FR', 'Lyon Rail Station', 0),\n array('XYF', 'SE', 'Falkoping Rail Station', 0),\n array('XYK', 'SE', 'Norrkoping Railway Service', 0),\n array('XYM', 'SE', 'Falkenberg Rail Station', 0),\n array('XYN', 'SE', 'Kristinehamn Rail Station', 0),\n array('XYO', 'SE', 'Karlshamn Rail Station', 0),\n array('XYP', 'SE', 'Avesta Krylbo Rail Station', 0),\n array('XYU', 'SE', 'Solvesborg Rail Station', 0),\n array('XYX', 'SE', 'Sala Rail Station', 0),\n array('XYY', 'SE', 'Arvika Rail Station', 0),\n array('XYZ', 'SE', 'Harnosand Rail Station', 0),\n array('XZB', 'CA', 'Casselman Rail Station', 0),\n array('XZC', 'CA', 'Glencoe Rail Station', 0),\n array('XZK', 'CA', 'Amherst Rail Station', 0),\n array('XZL', 'CA', 'Edmonton Rail Station', 0),\n array('XZO', 'NO', 'Oslo Central Station', 0),\n array('XZT', 'NO', 'Trondheim Rail Station', 0),\n array('YAG', 'CA', 'Fort Frances Municipal', 0),\n array('YAK', 'US', 'Yakutat Arpt', 0),\n array('YAM', 'CA', 'Sault Ste Marie Arpt', 0),\n array('YAO', 'CM', 'Yaounde Airport', 0),\n array('YAY', 'CA', 'St Anthony Arpt', 0),\n array('YAZ', 'CA', 'Tofino Arpt', 0),\n array('YBA', 'CA', 'Banff Arpt', 0),\n array('YBB', 'CA', 'Townsite Arpt', 0),\n array('YBC', 'CA', 'Baie Comeau Arpt', 0),\n array('YBD', 'CA', 'New Westminster Rail Station', 0),\n array('YBG', 'CA', 'Bagotville Arpt', 0),\n array('YBL', 'CA', 'Campbell River Municipal', 0),\n array('YBR', 'CA', 'Brandon Municipal Arpt', 0),\n array('YBX', 'CA', 'Blanc Sablon Arpt', 0),\n array('YBZ', 'CA', 'Toronto Downtown Rail Station', 0),\n array('YCA', 'CA', 'Courtenay Rail Station', 0),\n array('YCB', 'CA', 'Cambridge Bay Arpt', 0),\n array('YCC', 'CA', 'Cornwall Regional Arpt', 0),\n array('YCD', 'CA', 'Nanaimo Arpt', 0),\n array('YCG', 'CA', 'Ralph West Arpt', 0),\n array('YCH', 'CA', 'Miramichi Arpt', 0),\n array('YCK', 'CA', 'Colville Municipal', 0),\n array('YCL', 'CA', 'Charlo Municipal Arpt', 0),\n array('YCM', 'CA', 'St Catharines Rail Station', 0),\n array('YCN', 'CA', 'Cochrane Rail Station', 0),\n array('YCW', 'CA', 'Chilliwack Arpt', 0),\n array('YCY', 'CA', 'Clyde River', 0),\n array('YCZ', 'CA', 'Fairmont Springs Arpt', 0),\n array('YDA', 'CA', 'Dawson City Arpt', 0),\n array('YDF', 'CA', 'Deer Lake Municipal', 0),\n array('YDL', 'CA', 'Dease Lake Arpt', 0),\n array('YDN', 'CA', 'Dauphin Rail Station', 0),\n array('YDQ', 'CA', 'Dawson Creek Arpt', 0),\n array('YEADE', 'YE', 'aden', 1),\n array('YEAHW', 'YE', 'ahwar', 1),\n array('YED', 'CA', 'Namao Field', 0),\n array('YEELK', 'YE', 'el katieb', 1),\n array('YEG', 'CA', 'Edmonton Intl Arpt', 0),\n array('YEHAR', 'YE', 'harad', 1),\n array('YEHAU', 'YE', 'haura', 1),\n array('YEHOD', 'YE', 'hodeidah', 1),\n array('YEI', 'TR', 'Yenisehir Arpt', 0),\n array('YEK', 'CA', 'Arviat Arpt', 0),\n array('YEKHO', 'YE', 'khokha', 1),\n array('YEL', 'CA', 'Elliot Lake Arpt', 0),\n array('YEMKX', 'YE', 'mukalla', 1),\n array('YEMOK', 'YE', 'mokha', 1),\n array('YEMYN', 'YE', 'mareb', 1),\n array('YEN', 'CA', 'Estevan Arpt', 0),\n array('YEPRM', 'YE', 'perim i.', 1),\n array('YERAI', 'YE', 'ras isa terminal', 1),\n array('YERAK', 'YE', 'ras al kalib', 1),\n array('YESAL', 'YE', 'saleef port', 1),\n array('YESCT', 'YE', 'socotra i.', 1),\n array('YESYE', 'YE', 'sadah', 1),\n array('YET', 'CA', 'Edson Arpt', 0),\n array('YEV', 'CA', 'Inuvik Mike Zubko Arpt', 0),\n array('YEY', 'CA', 'Amos Rail Station', 0),\n array('YFB', 'CA', 'Iqaluit Arpt', 0),\n array('YFC', 'CA', 'Fredericton Municipal', 0),\n array('YFO', 'CA', 'Flin Flon Municipal Arpt', 0),\n array('YGJ', 'JP', 'Miho Arpt', 0),\n array('YGK', 'CA', 'Norman Rodgers Arpt', 0),\n array('YGL', 'CA', 'La Grande Municipal Arpt', 0),\n array('YGP', 'CA', 'Gaspe Municipal Arpt', 0),\n array('YGR', 'CA', 'House Harbour Arpt', 0),\n array('YGV', 'CA', 'Havre St Pierre Municipal Arpt', 0),\n array('YGX', 'CA', 'Gillam Rail Station', 0),\n array('YHB', 'CA', 'Hudson Bay Rail Station', 0),\n array('YHD', 'CA', 'Dryden Municipal', 0),\n array('YHE', 'CA', 'Hope Arpt', 0),\n array('YHF', 'CA', 'Hearst Municipal Arpt', 0),\n array('YHG', 'CA', 'Charlottetown Municipal Arpt', 0),\n array('YHH', 'CA', 'Harbor Airport', 0),\n array('YHM', 'CA', 'Civic Airport', 0),\n array('YHN', 'CA', 'Hornepayne Rail Station', 0),\n array('YHR', 'CA', 'Chevery Arpt', 0),\n array('YHS', 'CA', 'Sechelt Arpt', 0),\n array('YHU', 'CA', 'St Hubert Arpt', 0),\n array('YHY', 'CA', 'Hay River Municipal Arpt', 0),\n array('YHZ', 'CA', 'Halifax Intl', 0),\n array('YIB', 'CA', 'Atikokan Municipal Arpt', 0),\n array('YIF', 'CA', 'Pakuashipi Arpt', 0),\n array('YIP', 'US', 'Willow Run Arpt', 0),\n array('YJA', 'CA', 'Jasper Airport', 0),\n array('YJT', 'CA', 'Stephenville Municipal', 0),\n array('YKA', 'CA', 'Davie Fulton Arpt', 0),\n array('YKF', 'CA', 'Kitchener Waterloo Regional', 0),\n array('YKL', 'CA', 'Schefferville Arpt', 0),\n array('YKM', 'US', 'Yakima Terminal Arpt', 0),\n array('YKN', 'US', 'Chan Gurney Municipal', 0),\n array('YKQ', 'CA', 'Waskaganish Arpt', 0),\n array('YKU', 'CA', 'Chisasibi Arpt', 0),\n array('YKX', 'CA', 'Kirkland Lake Municipal Arpt', 0),\n array('YKY', 'CA', 'Kindersley Arpt', 0),\n array('YKZ', 'CA', 'Buttonville Arpt', 0),\n array('YLD', 'CA', 'Chapleau Rail Station', 0),\n array('YLI', 'FI', 'Ylivieska Arpt', 0),\n array('YLJ', 'CA', 'Meadow Lake Arpt', 0),\n array('YLL', 'CA', 'Lloydminster Arpt', 0),\n array('YLQ', 'CA', 'La Tuque Rail Station', 0),\n array('YLW', 'CA', 'Ellison Field', 0),\n array('YMB', 'CA', 'Merritt Arpt', 0),\n array('YME', 'CA', 'Matane Airport', 0),\n array('YMG', 'CA', 'Manitouwadge Municipal Arpt', 0),\n array('YMI', 'CA', 'Minaki Rail Station', 0),\n array('YMJ', 'CA', 'Moose Jaw Arpt', 0),\n array('YMM', 'CA', 'Ft McMurray Municipal Arpt', 0),\n array('YMO', 'CA', 'Moosonee Arpt', 0),\n array('YMT', 'CA', 'Chibougamau Arpt', 0),\n array('YMX', 'CA', 'Mirabel Intl Arpt', 0),\n array('YMY', 'CA', 'Montreal Downtown Rail Station', 0),\n array('YNA', 'CA', 'Natashquan Arpt', 0),\n array('YNB', 'SA', 'Yanbo Arpt', 0),\n array('YND', 'CA', 'Gatineau Hull Municipal Arpt', 0),\n array('YNG', 'US', 'Youngstown Municipal', 0),\n array('YNJ', 'CN', 'Yanji Arpt', 0),\n array('YNN', 'AU', 'Yandi Arpt', 0),\n array('YNT', 'CN', 'Laishan Arpt', 0),\n array('YOD', 'CA', 'Cold Lake Arpt', 0),\n array('YOJ', 'CA', 'Footner Lake Arpt', 0),\n array('YOO', 'CA', 'Oshawa Municipal Arpt', 0),\n array('YOP', 'CA', 'Rainbow Lake Arpt', 0),\n array('YOS', 'CA', 'Billy Bishop Regional Arpt', 0),\n array('YOT', 'IL', 'Yotvata Arpt', 0),\n array('YOW', 'CA', 'Ottawa Intl Arpt', 0),\n array('YPA', 'CA', 'Prince Albert Municipal Arpt', 0),\n array('YPB', 'CA', 'Port Alberni Arpt', 0),\n array('YPD', 'CA', 'Parry Sound Municipal Arpt', 0),\n array('YPE', 'CA', 'Peace River Municipal Arpt', 0),\n array('YPF', 'CA', 'Esquimalt Rail Station', 0),\n array('YPG', 'CA', 'Portage La Prairie Rail Station', 0),\n array('YPL', 'CA', 'Provincial Airport', 0),\n array('YPM', 'CA', 'Pikangikum Arpt', 0),\n array('YPN', 'CA', 'Port Menier Arpt', 0),\n array('YPQ', 'CA', 'Peterborough Arpt', 0),\n array('YPR', 'CA', 'Digby Island Arpt', 0),\n array('YPS', 'CA', 'Port Hawkesbury Arpt', 0),\n array('YPW', 'CA', 'Westview Arpt', 0),\n array('YPZ', 'CA', 'Burns Lake Rail Station', 0),\n array('YQA', 'CA', 'Muskoka Arpt', 0),\n array('YQB', 'CA', 'Quebec Intl', 0),\n array('YQD', 'CA', 'The Pas Municipal Arpt', 0),\n array('YQF', 'CA', 'Red Deer Arpt', 0),\n array('YQG', 'CA', 'Windsor Intl Arpt', 0),\n array('YQH', 'CA', 'Watson Lake Arpt', 0),\n array('YQI', 'CA', 'Yarmouth Municipal Arpt', 0),\n array('YQK', 'CA', 'Kenora Airport', 0),\n array('YQL', 'CA', 'Lethbridge Arpt', 0),\n array('YQM', 'CA', 'Moncton Municipal', 0),\n array('YQN', 'CA', 'Nakina Rail Station', 0),\n array('YQQ', 'CA', 'Royal Canadian Air Force Station', 0),\n array('YQR', 'CA', 'Regina Municipal', 0),\n array('YQS', 'CA', 'Pembroke Area Municipal Arpt', 0),\n array('YQT', 'CA', 'Thunder Bay Arpt', 0),\n array('YQU', 'CA', 'Grande Prairie Arpt', 0),\n array('YQV', 'CA', 'Yorkton Airport', 0),\n array('YQW', 'CA', 'North Battleford Arpt', 0),\n array('YQX', 'CA', 'Gander International', 0),\n array('YQY', 'CA', 'Sydney Airport', 0),\n array('YQZ', 'CA', 'Quesnel Arpt', 0),\n array('YRI', 'CA', 'Riviere Du Loup Arpt', 0),\n array('YRJ', 'CA', 'Roberval Airport', 0),\n array('YRL', 'CA', 'Federal Red Lake', 0),\n array('YRQ', 'CA', 'Three Rivers Arpt', 0),\n array('YRT', 'CA', 'Rankin Inlet Arpt', 0),\n array('YSB', 'CA', 'Sudbury Municipal Arpt', 0),\n array('YSC', 'CA', 'Sherbrooke Airport', 0),\n array('YSH', 'CA', 'Smith Falls Rail Station', 0),\n array('YSJ', 'CA', 'St John Municipal', 0),\n array('YSL', 'CA', 'Edmunston Arpt', 0),\n array('YSM', 'CA', 'Ft Smith Municipal Arpt', 0),\n array('YSN', 'CA', 'Salmon Arm Municipal', 0),\n array('YSP', 'CA', 'Marathon Municipal Arpt', 0),\n array('YST', 'CA', 'St Therese Pt Municipal', 0),\n array('YTA', 'CA', 'Pembroke And Area', 0),\n array('YTD', 'CA', 'Thicket Portage Rail Station', 0),\n array('YTDZA', 'YT', 'dzaoudzi', 1),\n array('YTE', 'CA', 'Cape Dorset Arpt', 0),\n array('YTF', 'CA', 'Alma Municipal Arpt', 0),\n array('YTH', 'CA', 'Thompson Arpt', 0),\n array('YTJ', 'CA', 'Terrace Bay Municipal Arpt', 0),\n array('YTMAM', 'YT', 'mamoudzou', 1),\n array('YTR', 'CA', 'Trenton Municipal Arpt', 0),\n array('YTS', 'CA', 'Timmins Municipal Arpt', 0),\n array('YTZ', 'CA', 'Toronto City Centre Airport', 0),\n array('YUBAR', 'YU', 'bar', 1),\n array('YUKOT', 'YU', 'kotor', 1),\n array('YUL', 'CA', 'Dorval Intl', 0),\n array('YUM', 'US', 'Yuma Intl', 0),\n array('YUVRA', 'YU', 'vranje', 1),\n array('YUY', 'CA', 'Rouyn Noranda Arpt', 0),\n array('YUZEL', 'YU', 'zelenika', 1),\n array('YVA', 'KM', 'Iconi Arpt', 0),\n array('YVB', 'CA', 'Bonaventure Municipal Arpt', 0),\n array('YVE', 'CA', 'Vernon Municipal Arpt', 0),\n array('YVG', 'CA', 'Vermilion Arpt', 0),\n array('YVO', 'CA', 'Val d Or Municipal Arpt', 0),\n array('YVP', 'CA', 'Kuujjuaq Arpt', 0),\n array('YVQ', 'CA', 'Norman Wells Municipal Arpt', 0),\n array('YVR', 'CA', 'Vancouver Intl Arpt', 0),\n array('YVZ', 'CA', 'Deer Lake Arpt', 0),\n array('YWG', 'CA', 'Winnipeg Intl Arpt', 0),\n array('YWH', 'CA', 'Inner Harbor Sea Plane Arpt', 0),\n array('YWK', 'CA', 'Wabush Municipal Arpt', 0),\n array('YWL', 'CA', 'Williams Lake Municipal', 0),\n array('YWR', 'CA', 'White River Rail Station', 0),\n array('YWS', 'CA', 'Whistler Arpt', 0),\n array('YXC', 'CA', 'Cranbrook Municipal', 0),\n array('YXD', 'CA', 'Edmonton Municipal Arpt', 0),\n array('YXE', 'CA', 'Saskatoon Municipal', 0),\n array('YXH', 'CA', 'Medicine Hat Airport', 0),\n array('YXJ', 'CA', 'Ft St John Municipal Arpt', 0),\n array('YXK', 'CA', 'Rimouski Municipal Arpt', 0),\n array('YXL', 'CA', 'Sioux Lookout Municipal Arpt', 0),\n array('YXP', 'CA', 'Pangnirtung Arpt', 0),\n array('YXS', 'CA', 'Prince George Municipal', 0),\n array('YXT', 'CA', 'Terrace Municipal Arpt', 0),\n array('YXU', 'CA', 'London Municipal', 0),\n array('YXX', 'CA', 'Abbotsford Arpt', 0),\n array('YXY', 'CA', 'Whitehorse Arpt', 0),\n array('YXZ', 'CA', 'Wawa Municipal Arpt', 0),\n array('YYB', 'CA', 'North Bay Municipal', 0),\n array('YYC', 'CA', 'Calgary Intl Arpt', 0),\n array('YYD', 'CA', 'Smithers Municipal', 0),\n array('YYE', 'CA', 'Ft Nelson Municipal Arpt', 0),\n array('YYF', 'CA', 'Penticton Municipal Arpt', 0),\n array('YYG', 'CA', 'Charlottetown Municipal', 0),\n array('YYI', 'CA', 'Rivers Rail Station', 0),\n array('YYJ', 'CA', 'Victoria Intl Arpt', 0),\n array('YYL', 'CA', 'Lynn Lake Rail Station', 0),\n array('YYN', 'CA', 'Swift Current Arpt', 0),\n array('YYQ', 'CA', 'Churchill Arpt', 0),\n array('YYR', 'CA', 'Goose Bay Municipal Arpt', 0),\n array('YYT', 'CA', 'St Johns Arpt', 0),\n array('YYU', 'CA', 'Japuskasing Municipal Arpt', 0),\n array('YYW', 'CA', 'Armstrong Rail Station', 0),\n array('YYY', 'CA', 'Mont Joli Arpt', 0),\n array('YYZ', 'CA', 'Lester B Pearson Intl', 0),\n array('YZA', 'CA', 'Ashcroft Rail Station', 0),\n array('YZF', 'CA', 'Yellowknife Arpt', 0),\n array('YZP', 'CA', 'Federal Airport', 0),\n array('YZR', 'CA', 'Sarnia Airport', 0),\n array('YZT', 'CA', 'Port Hardy Municipal', 0),\n array('YZV', 'CA', 'Sept Iles Municipal Arpt', 0),\n array('ZAAOB', 'ZA', 'algoa bay', 1),\n array('ZACPT', 'ZA', 'cape town', 1),\n array('ZAD', 'HR', 'Zadar Arpt', 0),\n array('ZADUR', 'ZA', 'durban', 1),\n array('ZAELS', 'ZA', 'east london', 1),\n array('ZAG', 'HR', 'Zagreb Arpt', 0),\n array('ZAL', 'CL', 'Pichoy', 0),\n array('ZAMZY', 'ZA', 'mossel bay', 1),\n array('ZANOL', 'ZA', 'port nolloth', 1),\n array('ZAO', 'FR', 'Laberandie Arpt', 0),\n array('ZAPLZ', 'ZA', 'port elizabeth', 1),\n array('ZAQ', 'DE', 'Nuremberg Rail Station', 0),\n array('ZARCB', 'ZA', 'richards bay', 1),\n array('ZASDB', 'ZA', 'saldanha bay', 1),\n array('ZASMN', 'ZA', 'simonstown', 1),\n array('ZAZ', 'ES', 'Zaragoza Airport', 0),\n array('ZBA', 'CH', 'Basel/Mullhouse Rail Service', 0),\n array('ZBF', 'CA', 'Bathurst Arpt', 0),\n array('ZBL', 'AU', 'Biloela Arpt', 0),\n array('ZBM', 'CA', 'Bromont Regional Arpt', 0),\n array('ZBQ', 'DK', 'Odense Railroad Station', 0),\n array('ZBV', 'US', 'Beaver Creek Van Service', 0),\n array('ZBW', 'BR', 'Atibaia Arpt', 0),\n array('ZCL', 'MX', 'Zacatecas Airport', 0),\n array('ZCO', 'CL', 'Manquehue Arpt', 0),\n array('ZDH', 'CH', 'Basel/Mullhouse SBB Rail Service', 0),\n array('ZDJ', 'CH', 'Berne Railroad Station', 0),\n array('ZDU', 'GB', 'Dundee ScotRail', 0),\n array('ZEC', 'ZA', 'Secunda Arpt', 0),\n array('ZEP', 'GB', 'London - Victoria Railway Station', 0),\n array('ZFI', 'GB', 'Chesterfield Bus Station', 0),\n array('ZFJ', 'FR', 'Gare de Rennes', 0),\n array('ZFQ', 'FR', 'Gare de Bordeaux', 0),\n array('ZGG', 'GB', 'Glasgow ScotRail', 0),\n array('ZGH', 'DK', 'Copenhagen Rail Station', 0),\n array('ZGS', 'CA', 'Gethsemanie Arpt', 0),\n array('ZHA', 'CN', 'Zhanjiang Airport', 0),\n array('ZHO', 'CA', 'Houston Bus Station', 0),\n array('ZID', 'DK', 'Aarhus Bus Service', 0),\n array('ZIH', 'MX', 'Zihuatanejo Intl', 0),\n array('ZIM', 'DK', 'Odense Bus Service', 0),\n array('ZIV', 'GB', 'Inverness ScotRail Station', 0),\n array('ZJN', 'CA', 'Swan River Municipal Arpt', 0),\n array('ZJO', 'US', 'San Jose Bus Service', 0),\n array('ZKG', 'CA', 'Kegaska Arpt', 0),\n array('ZLO', 'MX', 'Manzanillo Arpt', 0),\n array('ZLS', 'GB', 'Liverpool Street Station', 0),\n array('ZLT', 'CA', 'La Tabatiere Arpt', 0),\n array('ZMB', 'DE', 'Hamburg Railway Service', 0),\n array('ZMU', 'DE', 'Munich HBF Railway Service', 0),\n array('ZNA', 'CA', 'Harbour Seaplane Base', 0),\n array('ZNE', 'AU', 'Newman Airport', 0),\n array('ZNZ', 'TZ', 'Kisauni Arpt', 0),\n array('ZOS', 'CL', 'Canal Balo Arpt', 0),\n array('ZQN', 'NZ', 'Frankton Airport', 0),\n array('ZQS', 'CA', 'Queen Charlotte Island Arpt', 0),\n array('ZRB', 'DE', 'Frankfurt HBF Railway Service', 0),\n array('ZRF', 'US', 'Peoria Rockford Bus Terminal', 0),\n array('ZRG', 'SK', 'Bratislava Bus Station', 0),\n array('ZRH', 'CH', 'Zurich Airport', 0),\n array('ZRK', 'US', 'Van Galder Bus Terminal', 0),\n array('ZSA', 'BS', 'San Salvador Arpt', 0),\n array('ZSE', 'RE', 'St Pierre Dela Reunion Arpt', 0),\n array('ZSJ', 'CA', 'Sandy Lake Arpt', 0),\n array('ZSM', 'US', 'Santa Clara Bus Service', 0),\n array('ZSW', 'CA', 'Seal Cove Arpt', 0),\n array('ZTB', 'CA', 'Tete A La Baleine Arpt', 0),\n array('ZTH', 'GR', 'Zakinthos Arpt', 0),\n array('ZUH', 'CN', 'Zhuhai Arpt', 0),\n array('ZVR', 'DE', 'Hanover HBF Railway Service', 0),\n array('ZWS', 'DE', 'Stuttgart Railway Service', 0),\n array('ZXA', 'GB', 'Aberdeen ScotRail Station', 0),\n array('ZXE', 'GB', 'Edinburgh ScotRail', 0),\n array('ZXM', 'NO', 'Rognan Rail Station', 0),\n array('ZXO', 'NO', 'Fauske Rail Station', 0),\n array('ZYA', 'NL', 'Amsterdam Central Rail Station', 0),\n array('ZYE', 'NL', 'Eindhoven Rail Station', 0),\n array('ZYL', 'BD', 'Sylhet Osmany Arpt', 0),\n array('ZYM', 'NL', 'Arnhem Rail Station', 0),\n array('ZYO', 'NL', 'Roosendaal Rail Station', 0),\n array('ZYR', 'BE', 'Midi Railway Station', 0),\n array('ZYT', 'NL', 'Maastricht Rail Station', 0),\n array('ZYU', 'NL', 'Utrecht Rail Station', 0),\n array('ZYZ', 'BE', 'Antwerp Berchem Rail Station', 0),\n array('ZZV', 'US', 'Zanesville Arpt', 0),\n array('DOCAU', 'DO', 'Caucedo', 1));\n\n\n for ($i = 0; $i < count($ListadoPuertos); $i++) {\n\n $CodigoPuerto = $ListadoPuertos[$i][0];\n $CodigoPais = $ListadoPuertos[$i][1];\n $Puerto = $ListadoPuertos[$i][2];\n $Maritimo = $ListadoPuertos[$i][3];\n\n DB::table('c_puertos')->insert([\n 'CodigoPuerto' => $CodigoPuerto,\n 'CodigoPais' => $CodigoPais,\n 'Puerto' => $Puerto,\n 'Maritimo' => $Maritimo\n ]);\n }\n }",
"public function Departamentos(Request $request){\n $departamentos=Departamento::where('pais_id',$request->id)->get();//buscamos el listado de departamentos perteneciente al pais\n $select='<option value=\"\" selected>Selecciona una opción</option>';//se crea las primera opcion del select\n foreach($departamentos as $depar){\n $select.='<option value=\"'.$depar->id.'\">'.$depar->nombre.'</option>';//se completa las opciones del select\n }\n return $select;\n }"
] | [
"0.64269954",
"0.6252686",
"0.61782336",
"0.61553997",
"0.61140805",
"0.60365623",
"0.5988173",
"0.5950666",
"0.5940666",
"0.5923585",
"0.5911875",
"0.59010196",
"0.5887474",
"0.5885471",
"0.5824183",
"0.57973444",
"0.57781625",
"0.56978685",
"0.566298",
"0.56495905",
"0.56467354",
"0.5633629",
"0.56325394",
"0.5629694",
"0.56294715",
"0.56126386",
"0.56098557",
"0.5607665",
"0.56071836",
"0.5606394"
] | 0.6579465 | 0 |
Devuelve una lista de los tipos de afectacion validas para un producto | public function Get_List_Tipo_Afectacion()
{
$l_LNConfigsistema = new LNConfigsistema();
$l_Tax_Exemption_Reason_Code = 36;
$l_List_Validaciones = [];
$l_List_Parametros = $l_LNConfigsistema->Get_Parametros_Sistema_object($l_Tax_Exemption_Reason_Code,0,"");
// foreach( $l_List_Parametros as $Item )
// {
// $l_ValidacionPerfil = new ENValidacionPerfil();
// $l_ValidacionPerfil->Cod_Validacion = $Item->Cod_ParSis;
// $l_ValidacionPerfil->Des_Mensaje = $Item->Des_ParSis_Tx2;
// array_push($l_List_Validaciones,$l_ValidacionPerfil);
// }
return $l_List_Parametros;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTiposValidos()\n {\n return $this->tiposValidos;\n }",
"private function _formularioProdutos() {\n\n // seta as regras\n $rules = [\n [\n 'field' => 'basiccode',\n 'label' => 'BasicCode',\n 'rules' => 'required'\n ], [\n 'field' => 'nome',\n 'label' => 'Nome',\n 'rules' => 'required|min_length[3]|trim'\n ], [\n 'field' => 'categoria',\n 'label' => 'Categoria',\n 'rules' => 'required'\n ], [\n 'field' => 'pontos',\n 'label' => 'Pontos',\n 'rules' => 'required|is_numeric'\n ]\n ];\n\n // valida o formulário\n $this->form_validation->set_rules( $rules );\n return $this->form_validation->run();\n }",
"public function Get_List_Tipo_Tributo()\n {\n $l_LNConfigsistema = new LNConfigsistema();\n $l_Tax_Type_Code = 35;\n $l_List_Validaciones = [];\n\n $l_List_Parametros = $l_LNConfigsistema->Get_Parametros_Sistema_object($l_Tax_Type_Code,0,\"\");\n\n // foreach( $l_List_Parametros as $Item )\n // {\n // $l_ValidacionPerfil = new ENValidacionPerfil();\n\n // $l_ValidacionPerfil->Cod_Validacion = $Item->Cod_ParSis;\n // $l_ValidacionPerfil->Des_Mensaje = $Item->Des_ParSis_Tx2;\n\n // array_push($l_List_Validaciones,$l_ValidacionPerfil);\n // }\n\n return $l_List_Parametros; \n }",
"public function rules()\n {\n return [\n 'productos' => $this->getReglaProductos(),\n 'productos.*.id' => $this->getReglaCotizacionProductoId(),\n 'productos.*.producto_id' => $this->getReglaProductoId(),\n 'productos.*.cantidad' => $this->getReglaProductoCantidad(),\n 'productos.*.precio' => $this->getReglaProductoPrecio()\n ];\n }",
"public function Get_List_Validaciones_Perfil()\n {\n $l_LNConfigsistema = new LNConfigsistema();\n $l_ValidacionPerfil = new ENValidacionPerfil();\n $l_Key_Validations_User_Profile = 26;\n $l_List_Validaciones = [];\n\n $l_List_Parametros = $l_LNConfigsistema->Get_Parametros_Sistema_object($l_Key_Validations_User_Profile,0,\"\");\n\n foreach( $l_List_Parametros as $Item )\n {\n $l_ValidacionPerfil = new ENValidacionPerfil();\n\n $l_ValidacionPerfil->Cod_Validacion = $Item->Cod_ParSis;\n $l_ValidacionPerfil->Des_Mensaje = $Item->Des_ParSis_Tx2;\n\n array_push($l_List_Validaciones,$l_ValidacionPerfil);\n }\n\n return $l_List_Validaciones; \n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['descrizione'] === null) {\n $invalidProperties[] = \"'descrizione' can't be null\";\n }\n if ($this->container['cap'] === null) {\n $invalidProperties[] = \"'cap' can't be null\";\n }\n if ($this->container['codice_comune'] === null) {\n $invalidProperties[] = \"'codice_comune' can't be null\";\n }\n if ($this->container['descrizione_comune'] === null) {\n $invalidProperties[] = \"'descrizione_comune' can't be null\";\n }\n if ($this->container['codice_comune_istat'] === null) {\n $invalidProperties[] = \"'codice_comune_istat' can't be null\";\n }\n if ($this->container['provincia'] === null) {\n $invalidProperties[] = \"'provincia' can't be null\";\n }\n if ($this->container['descrizione_provincia'] === null) {\n $invalidProperties[] = \"'descrizione_provincia' can't be null\";\n }\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!is_null($this->container['invoice_number']) && (strlen($this->container['invoice_number']) > 15)) {\n $invalid_properties[] = \"invalid value for 'invoice_number', the character length must be smaller than or equal to 15.\";\n }\n\n if ($this->container['type'] === null) {\n $invalid_properties[] = \"'type' can't be null\";\n }\n $allowed_values = [\"Agreement\", \"CreditMemo\", \"DownPayment\", \"Miscellaneous\", \"Progress\", \"Standard\"];\n if (!in_array($this->container['type'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'type', must be one of #{allowed_values}.\";\n }\n\n if ($this->container['company'] === null) {\n $invalid_properties[] = \"'company' can't be null\";\n }\n $allowed_values = [\"All\", \"Agreement\", \"Project\", \"ProjectPhase\", \"SalesOrder\", \"Ticket\"];\n if (!in_array($this->container['apply_to_type'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'apply_to_type', must be one of #{allowed_values}.\";\n }\n\n if (!is_null($this->container['attention']) && (strlen($this->container['attention']) > 60)) {\n $invalid_properties[] = \"invalid value for 'attention', the character length must be smaller than or equal to 60.\";\n }\n\n if (!is_null($this->container['reference']) && (strlen($this->container['reference']) > 50)) {\n $invalid_properties[] = \"invalid value for 'reference', the character length must be smaller than or equal to 50.\";\n }\n\n if (!is_null($this->container['customer_po']) && (strlen($this->container['customer_po']) > 50)) {\n $invalid_properties[] = \"invalid value for 'customer_po', the character length must be smaller than or equal to 50.\";\n }\n\n return $invalid_properties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getProcessModeAllowableValues();\n if (!is_null($this->container['processMode']) && !in_array($this->container['processMode'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'processMode', must be one of '%s'\",\n $this->container['processMode'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['currentPriceType'] === null) {\n $invalidProperties[] = \"'currentPriceType' can't be null\";\n }\n $allowedValues = $this->getCurrentPriceTypeAllowableValues();\n if (!is_null($this->container['currentPriceType']) && !in_array($this->container['currentPriceType'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'currentPriceType', must be one of '%s'\",\n $this->container['currentPriceType'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['currentPrice'] === null) {\n $invalidProperties[] = \"'currentPrice' can't be null\";\n }\n $allowedValues = $this->getComparisonPriceTypeAllowableValues();\n if (!is_null($this->container['comparisonPriceType']) && !in_array($this->container['comparisonPriceType'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'comparisonPriceType', must be one of '%s'\",\n $this->container['comparisonPriceType'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getPriceDisplayCodesAllowableValues();\n if (!is_null($this->container['priceDisplayCodes']) && !in_array($this->container['priceDisplayCodes'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'priceDisplayCodes', must be one of '%s'\",\n $this->container['priceDisplayCodes'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['final_price'] === null) {\n $invalidProperties[] = \"'final_price' can't be null\";\n }\n if ($this->container['max_price'] === null) {\n $invalidProperties[] = \"'max_price' can't be null\";\n }\n if ($this->container['max_regular_price'] === null) {\n $invalidProperties[] = \"'max_regular_price' can't be null\";\n }\n if ($this->container['minimal_regular_price'] === null) {\n $invalidProperties[] = \"'minimal_regular_price' can't be null\";\n }\n if ($this->container['special_price'] === null) {\n $invalidProperties[] = \"'special_price' can't be null\";\n }\n if ($this->container['minimal_price'] === null) {\n $invalidProperties[] = \"'minimal_price' can't be null\";\n }\n if ($this->container['regular_price'] === null) {\n $invalidProperties[] = \"'regular_price' can't be null\";\n }\n if ($this->container['formatted_prices'] === null) {\n $invalidProperties[] = \"'formatted_prices' can't be null\";\n }\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateBarcode())) {\n $invalid_properties[] = $this->validateBarcode();\n }\n if (!empty($this->validateUrl())) {\n $invalid_properties[] = $this->validateUrl();\n }\n return $invalid_properties;\n }",
"public function rules()\n {\n \n $datoDetalleR = count($this->get('respuestaDiagnostico2Detalle'));\n \n $validacion = array('codigoDiagnostico2' => \"required\",\n 'nombreDiagnostico2' => 'required|string|max:80',\n 'fechaElaboracionDiagnostico2' => 'required|date');\n\n for($i = 0; $i < $datoDetalleR; $i++)\n {\n if(trim($this->get('respuestaDiagnostico2Detalle')[$i]) == 'SELECCIONE')\n { \n $validacion['respuestaDiagnostico2Detalle'.$i] = 'required';\n }\n } \n return $validacion;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateEmail())) {\n $invalid_properties[] = $this->validateEmail();\n }\n if (!empty($this->validateAddress1())) {\n $invalid_properties[] = $this->validateAddress1();\n }\n if (!empty($this->validateAddress2())) {\n $invalid_properties[] = $this->validateAddress2();\n }\n if (!empty($this->validateCountry())) {\n $invalid_properties[] = $this->validateCountry();\n }\n if (!empty($this->validateState())) {\n $invalid_properties[] = $this->validateState();\n }\n if (!empty($this->validateCity())) {\n $invalid_properties[] = $this->validateCity();\n }\n if (!empty($this->validateZipcode())) {\n $invalid_properties[] = $this->validateZipcode();\n }\n if (!empty($this->validatePhone())) {\n $invalid_properties[] = $this->validatePhone();\n }\n if (!empty($this->validateFirstname())) {\n $invalid_properties[] = $this->validateFirstname();\n }\n if (!empty($this->validateLastname())) {\n $invalid_properties[] = $this->validateLastname();\n }\n return $invalid_properties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['label'] === null) {\n $invalidProperties[] = \"'label' can't be null\";\n }\n if ((mb_strlen($this->container['label']) > 120)) {\n $invalidProperties[] = \"invalid value for 'label', the character length must be smaller than or equal to 120.\";\n }\n\n if ((mb_strlen($this->container['label']) < 1)) {\n $invalidProperties[] = \"invalid value for 'label', the character length must be bigger than or equal to 1.\";\n }\n\n if (!is_null($this->container['version_description']) && (mb_strlen($this->container['version_description']) > 800)) {\n $invalidProperties[] = \"invalid value for 'version_description', the character length must be smaller than or equal to 800.\";\n }\n\n if (!is_null($this->container['ref']) && (mb_strlen($this->container['ref']) > 50)) {\n $invalidProperties[] = \"invalid value for 'ref', the character length must be smaller than or equal to 50.\";\n }\n\n if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 3000)) {\n $invalidProperties[] = \"invalid value for 'description', the character length must be smaller than or equal to 3000.\";\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getTypeAllowableValues();\n if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['number'] === null) {\n $invalidProperties[] = \"'number' can't be null\";\n }\n if ($this->container['description'] === null) {\n $invalidProperties[] = \"'description' can't be null\";\n }\n $allowedValues = $this->getPriceTypeAllowableValues();\n if (!is_null($this->container['price_type']) && !in_array($this->container['price_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'price_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['sale_price'] === null) {\n $invalidProperties[] = \"'sale_price' can't be null\";\n }\n $allowedValues = $this->getStockAllowableValues();\n if (!is_null($this->container['stock']) && !in_array($this->container['stock'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'stock', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStockLimitNotifyFrequencyAllowableValues();\n if (!is_null($this->container['stock_limit_notify_frequency']) && !in_array($this->container['stock_limit_notify_frequency'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'stock_limit_notify_frequency', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['product_reference'] === null) {\n $invalidProperties[] = \"'product_reference' can't be null\";\n }\n if ($this->container['sku'] === null) {\n $invalidProperties[] = \"'sku' can't be null\";\n }\n if ($this->container['ean'] === null) {\n $invalidProperties[] = \"'ean' can't be null\";\n }\n if ($this->container['delivery'] === null) {\n $invalidProperties[] = \"'delivery' can't be null\";\n }\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['addToCartButton'] === null) {\n $invalidProperties[] = \"'addToCartButton' can't be null\";\n }\n if ($this->container['addToCompareButton'] === null) {\n $invalidProperties[] = \"'addToCompareButton' can't be null\";\n }\n if ($this->container['priceInfo'] === null) {\n $invalidProperties[] = \"'priceInfo' can't be null\";\n }\n if ($this->container['images'] === null) {\n $invalidProperties[] = \"'images' can't be null\";\n }\n if ($this->container['url'] === null) {\n $invalidProperties[] = \"'url' can't be null\";\n }\n if ($this->container['id'] === null) {\n $invalidProperties[] = \"'id' can't be null\";\n }\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['type'] === null) {\n $invalidProperties[] = \"'type' can't be null\";\n }\n if ($this->container['isSalable'] === null) {\n $invalidProperties[] = \"'isSalable' can't be null\";\n }\n if ($this->container['storeId'] === null) {\n $invalidProperties[] = \"'storeId' can't be null\";\n }\n if ($this->container['currencyCode'] === null) {\n $invalidProperties[] = \"'currencyCode' can't be null\";\n }\n if ($this->container['extensionAttributes'] === null) {\n $invalidProperties[] = \"'extensionAttributes' can't be null\";\n }\n return $invalidProperties;\n }",
"function validateData($products, $prodAPI, $prodGrpAPI){\n $valid = false;\n for($i = 2; $i < count($products)+1; $i++){\n $name = $products[$i][\"A\"];\n $description = $products[$i][\"B\"];\n $unit = $products[$i][\"C\"];\n $price = $products[$i][\"D\"];\n $amount = $products[$i][\"E\"];\n $categories = $products[$i][\"F\"];\n\n //validate name:\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ ]+$/\", $name);\n if(!$valid){ return \"Das Produkt \".$name.\" enthält nicht nur Buchstaben\";}\n $valid = (strlen($name) < 50 && strlen($name) > 1);\n if(!$valid){ return \"Das Produkt \".$name.\" erfüllt nicht die vorgegebene Zeichenlänge\";}\n $magentoProducts = $prodAPI -> getAllProducts();\n $valid = (!in_array_r($name, $magentoProducts));\n if(!$valid){ return \"Das Produkt \".$name.\" ist bereits vorhanden\";}\n //validate description\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ0-9 .,!?]+$/\", $description);\n if(!$valid){ return \"Die Beschreibung \".$description.\" enthält nicht nur Buchstaben und Satzzeichen\";}\n $valid = (strlen($description) < 250);\n if(!$valid){ return \"Die Beschreibung \".$description.\" darf nicht läger wie 250 Zeichen lang sein\";}\n //validate unit\n $valid = preg_match(\"/^[a-zA-Z ]+$/\", $unit);\n if(!$valid){ return \"Die Einheit \".$unit.\" enthält nicht nur Buchstaben\";}\n $valid = (strlen($name) < 20 && strlen($unit) > 0);\n if(!$valid){ return \"Die Einheit \".$unit.\" ist entweder mehr als 20 Zeichen lang oder leer\";}\n //validate price\n $valid = filter_var($price, FILTER_VALIDATE_FLOAT);\n if(!$valid){ return \"Der Preis \".$price.\" entspricht nicht einer Zahl\";}\n $valid = ($price > 0 && $price < 100000000);\n if(!$valid){ return \"Der Preis \".$price.\" ist nicht grösser als 0 oder nicht kleiner wie 100'000'000\";}\n //validate amount\n $valid = filter_var($amount, FILTER_VALIDATE_FLOAT);\n if(!$valid){ return \"Die Menge \".$amount.\" entspricht nicht einer Zahl\";}\n $valid = ($amount > 0 && $amount < 100000000);\n if(!$valid){ return \"Die Menge \".$amount.\" ist nicht grösser als 0 oder nicht kleiner wie 100'000'000\";}\n //validate categories\n $categories = explode(\",\", $categories);\n $magentoCategories = $prodGrpAPI -> getTree();\n foreach ($categories as $categorie){\n $categorie = trim($categorie);\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ ]+$/\", $categorie);\n if(!$valid){ return \"Die Kategorie \".$categorie.\" enthält nicht nur Buchstaben\";}\n $valid = (in_array_r($categorie, $magentoCategories));\n if(!$valid){ return \"Die Kategorie \".$categorie.\" ist nicht vorhanden\";}\n }\n }\n return $valid;\n}",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['item_sequence'] === null) {\n $invalidProperties[] = \"'item_sequence' can't be null\";\n }\n if ($this->container['organization'] === null) {\n $invalidProperties[] = \"'organization' can't be null\";\n }\n if ($this->container['number'] === null) {\n $invalidProperties[] = \"'number' can't be null\";\n }\n if ($this->container['item'] === null) {\n $invalidProperties[] = \"'item' can't be null\";\n }\n if ($this->container['description'] === null) {\n $invalidProperties[] = \"'description' can't be null\";\n }\n if ($this->container['units'] === null) {\n $invalidProperties[] = \"'units' can't be null\";\n }\n if ($this->container['event_job'] === null) {\n $invalidProperties[] = \"'event_job' can't be null\";\n }\n if ($this->container['um'] === null) {\n $invalidProperties[] = \"'um' can't be null\";\n }\n if ($this->container['unit_cost'] === null) {\n $invalidProperties[] = \"'unit_cost' can't be null\";\n }\n if ($this->container['order_sequence'] === null) {\n $invalidProperties[] = \"'order_sequence' can't be null\";\n }\n if ($this->container['extended_cost'] === null) {\n $invalidProperties[] = \"'extended_cost' can't be null\";\n }\n if ($this->container['space'] === null) {\n $invalidProperties[] = \"'space' can't be null\";\n }\n if ($this->container['department'] === null) {\n $invalidProperties[] = \"'department' can't be null\";\n }\n if ($this->container['supplier'] === null) {\n $invalidProperties[] = \"'supplier' can't be null\";\n }\n if ($this->container['bill_to_account'] === null) {\n $invalidProperties[] = \"'bill_to_account' can't be null\";\n }\n if ($this->container['ship_to'] === null) {\n $invalidProperties[] = \"'ship_to' can't be null\";\n }\n if ($this->container['function'] === null) {\n $invalidProperties[] = \"'function' can't be null\";\n }\n if ($this->container['order'] === null) {\n $invalidProperties[] = \"'order' can't be null\";\n }\n if ($this->container['date_in'] === null) {\n $invalidProperties[] = \"'date_in' can't be null\";\n }\n if ($this->container['date_out'] === null) {\n $invalidProperties[] = \"'date_out' can't be null\";\n }\n if ($this->container['order_line'] === null) {\n $invalidProperties[] = \"'order_line' can't be null\";\n }\n if ($this->container['requester'] === null) {\n $invalidProperties[] = \"'requester' can't be null\";\n }\n if ($this->container['taxable'] === null) {\n $invalidProperties[] = \"'taxable' can't be null\";\n }\n if ($this->container['tax'] === null) {\n $invalidProperties[] = \"'tax' can't be null\";\n }\n if ($this->container['freight'] === null) {\n $invalidProperties[] = \"'freight' can't be null\";\n }\n if ($this->container['entered_on'] === null) {\n $invalidProperties[] = \"'entered_on' can't be null\";\n }\n if ($this->container['supplier_item_number'] === null) {\n $invalidProperties[] = \"'supplier_item_number' can't be null\";\n }\n if ($this->container['changed_on'] === null) {\n $invalidProperties[] = \"'changed_on' can't be null\";\n }\n if ($this->container['entered_by_code'] === null) {\n $invalidProperties[] = \"'entered_by_code' can't be null\";\n }\n if ($this->container['changed_by_code'] === null) {\n $invalidProperties[] = \"'changed_by_code' can't be null\";\n }\n if ($this->container['approval_level'] === null) {\n $invalidProperties[] = \"'approval_level' can't be null\";\n }\n if ($this->container['search'] === null) {\n $invalidProperties[] = \"'search' can't be null\";\n }\n if ($this->container['required_on'] === null) {\n $invalidProperties[] = \"'required_on' can't be null\";\n }\n if ($this->container['approved_by'] === null) {\n $invalidProperties[] = \"'approved_by' can't be null\";\n }\n if ($this->container['units_received'] === null) {\n $invalidProperties[] = \"'units_received' can't be null\";\n }\n if ($this->container['units_paid'] === null) {\n $invalidProperties[] = \"'units_paid' can't be null\";\n }\n if ($this->container['amount_paid'] === null) {\n $invalidProperties[] = \"'amount_paid' can't be null\";\n }\n if ($this->container['issued_on'] === null) {\n $invalidProperties[] = \"'issued_on' can't be null\";\n }\n if ($this->container['issued_by_code'] === null) {\n $invalidProperties[] = \"'issued_by_code' can't be null\";\n }\n if ($this->container['amount_received'] === null) {\n $invalidProperties[] = \"'amount_received' can't be null\";\n }\n if ($this->container['units_cancelled'] === null) {\n $invalidProperties[] = \"'units_cancelled' can't be null\";\n }\n if ($this->container['completed_on'] === null) {\n $invalidProperties[] = \"'completed_on' can't be null\";\n }\n if ($this->container['completed_by_code'] === null) {\n $invalidProperties[] = \"'completed_by_code' can't be null\";\n }\n if ($this->container['cancelled_on'] === null) {\n $invalidProperties[] = \"'cancelled_on' can't be null\";\n }\n if ($this->container['cancelled_by_code'] === null) {\n $invalidProperties[] = \"'cancelled_by_code' can't be null\";\n }\n if ($this->container['buyer'] === null) {\n $invalidProperties[] = \"'buyer' can't be null\";\n }\n if ($this->container['ap_status'] === null) {\n $invalidProperties[] = \"'ap_status' can't be null\";\n }\n if ($this->container['user_field1'] === null) {\n $invalidProperties[] = \"'user_field1' can't be null\";\n }\n if ($this->container['user_field2'] === null) {\n $invalidProperties[] = \"'user_field2' can't be null\";\n }\n if ($this->container['non_inventory'] === null) {\n $invalidProperties[] = \"'non_inventory' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n if ($this->container['ap_close_date'] === null) {\n $invalidProperties[] = \"'ap_close_date' can't be null\";\n }\n if ($this->container['ap_closed_by_code'] === null) {\n $invalidProperties[] = \"'ap_closed_by_code' can't be null\";\n }\n if ($this->container['received_on'] === null) {\n $invalidProperties[] = \"'received_on' can't be null\";\n }\n if ($this->container['requisition_number'] === null) {\n $invalidProperties[] = \"'requisition_number' can't be null\";\n }\n if ($this->container['requisition_line'] === null) {\n $invalidProperties[] = \"'requisition_line' can't be null\";\n }\n if ($this->container['phase'] === null) {\n $invalidProperties[] = \"'phase' can't be null\";\n }\n if ($this->container['in_out'] === null) {\n $invalidProperties[] = \"'in_out' can't be null\";\n }\n if ($this->container['taxes_paid'] === null) {\n $invalidProperties[] = \"'taxes_paid' can't be null\";\n }\n if ($this->container['freight_paid'] === null) {\n $invalidProperties[] = \"'freight_paid' can't be null\";\n }\n if ($this->container['currency'] === null) {\n $invalidProperties[] = \"'currency' can't be null\";\n }\n if ($this->container['accrual'] === null) {\n $invalidProperties[] = \"'accrual' can't be null\";\n }\n if ($this->container['asset'] === null) {\n $invalidProperties[] = \"'asset' can't be null\";\n }\n if ($this->container['total'] === null) {\n $invalidProperties[] = \"'total' can't be null\";\n }\n if ($this->container['subtotal'] === null) {\n $invalidProperties[] = \"'subtotal' can't be null\";\n }\n if ($this->container['inclusive_exclusive'] === null) {\n $invalidProperties[] = \"'inclusive_exclusive' can't be null\";\n }\n if ($this->container['major'] === null) {\n $invalidProperties[] = \"'major' can't be null\";\n }\n if ($this->container['minor'] === null) {\n $invalidProperties[] = \"'minor' can't be null\";\n }\n if ($this->container['tax_type'] === null) {\n $invalidProperties[] = \"'tax_type' can't be null\";\n }\n if ($this->container['ut'] === null) {\n $invalidProperties[] = \"'ut' can't be null\";\n }\n if ($this->container['supplier_contact'] === null) {\n $invalidProperties[] = \"'supplier_contact' can't be null\";\n }\n if ($this->container['time_units'] === null) {\n $invalidProperties[] = \"'time_units' can't be null\";\n }\n if ($this->container['unit_cost_including_tax'] === null) {\n $invalidProperties[] = \"'unit_cost_including_tax' can't be null\";\n }\n if ($this->container['division'] === null) {\n $invalidProperties[] = \"'division' can't be null\";\n }\n if ($this->container['management_report_code'] === null) {\n $invalidProperties[] = \"'management_report_code' can't be null\";\n }\n if ($this->container['note'] === null) {\n $invalidProperties[] = \"'note' can't be null\";\n }\n if ($this->container['gl_account'] === null) {\n $invalidProperties[] = \"'gl_account' can't be null\";\n }\n return $invalidProperties;\n }",
"public function rules()\n {\n return [\n 'product_name'=>'required|max:75|min:3',\n 'product_qty'=>'required|integer|max:999|min:1',\n 'product_sku'=>'required|min:1|max:10',\n 'product_price'=>'required|numeric|between:0,9999999999999.99',\n 'product_reduced'=>'max:20||min:1',\n 'categoria'=>'required|not_in:-1',\n 'marca'=>'required|not_in:-1',\n 'product_des'=>'required|max:250|min:10',\n 'product_spec'=>'required|max:250|min:10',\n 'code_mode'=>'max:10',\n 'guaranty'=>'max:10',\n 'weight'=>'required',\n 'length'=>'required',\n 'height'=>'required',\n 'width'=>'required'\n\n\n ];\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (null === $this->container['shipping_service_name']) {\n $invalidProperties[] = \"'shipping_service_name' can't be null\";\n }\n if (null === $this->container['carrier_name']) {\n $invalidProperties[] = \"'carrier_name' can't be null\";\n }\n if (null === $this->container['shipping_service_id']) {\n $invalidProperties[] = \"'shipping_service_id' can't be null\";\n }\n if (null === $this->container['shipping_service_offer_id']) {\n $invalidProperties[] = \"'shipping_service_offer_id' can't be null\";\n }\n if (null === $this->container['ship_date']) {\n $invalidProperties[] = \"'ship_date' can't be null\";\n }\n if (null === $this->container['rate']) {\n $invalidProperties[] = \"'rate' can't be null\";\n }\n if (null === $this->container['shipping_service_options']) {\n $invalidProperties[] = \"'shipping_service_options' can't be null\";\n }\n if (null === $this->container['requires_additional_seller_inputs']) {\n $invalidProperties[] = \"'requires_additional_seller_inputs' can't be null\";\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['timestamp'] === null) {\n $invalidProperties[] = \"'timestamp' can't be null\";\n }\n if ($this->container['productcode'] === null) {\n $invalidProperties[] = \"'productcode' can't be null\";\n }\n if ($this->container['dutchname'] === null) {\n $invalidProperties[] = \"'dutchname' can't be null\";\n }\n if ($this->container['numberperorder'] === null) {\n $invalidProperties[] = \"'numberperorder' can't be null\";\n }\n if ($this->container['purchaseprice'] === null) {\n $invalidProperties[] = \"'purchaseprice' can't be null\";\n }\n if ($this->container['description'] === null) {\n $invalidProperties[] = \"'description' can't be null\";\n }\n if ($this->container['images'] === null) {\n $invalidProperties[] = \"'images' can't be null\";\n }\n if ($this->container['category'] === null) {\n $invalidProperties[] = \"'category' can't be null\";\n }\n return $invalidProperties;\n }",
"public function rules()\r\n {\r\n return [\r\n [['pregunta1', 'pregunta2' , 'pregunta3' , 'respuesta1', 'respuesta2', 'respuesta3'], 'required' ], \r\n [['pregunta1', 'pregunta2', 'respuesta1', 'respuesta2'], 'match', 'pattern' => \"/^.{3,50}$/\", 'message' => Yii::t('frontend', 'Minimum 3 and maximum 50 characters')],//minimo 3 y maximo 50 caracteres\r\n [['pregunta1', 'pregunta2', 'respuesta1', 'respuesta2'], 'match', 'pattern' => \"/^[0-9 a-z]+$/i\", 'message' => Yii::t('frontend', 'Accepted only letters, numbers and spaces')],//Sólo se aceptan letras, números y espacios en blanco\r\n ['usuario', 'match', 'pattern' => \"/^.{5,80}$/\", 'message' => Yii::t('frontend', 'Minimum 5 and maximum 80 characters')],//minimo 5 y maximo 80 caracteres\r\n ['pregunta1' ,'compararPreguntas1'],\r\n ['pregunta2' ,'compararPreguntas2'],\r\n \r\n \r\n \r\n ];\r\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateMode())) {\n $invalid_properties[] = $this->validateMode();\n }\n if (!empty($this->validateCurrency())) {\n $invalid_properties[] = $this->validateCurrency();\n }\n if (!empty($this->validateVersion())) {\n $invalid_properties[] = $this->validateVersion();\n }\n return $invalid_properties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['drop_off_type'] === null) {\n $invalidProperties[] = \"'drop_off_type' can't be null\";\n }\n $allowedValues = $this->getDropOffTypeAllowableValues();\n if (!is_null($this->container['drop_off_type']) && !in_array($this->container['drop_off_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'drop_off_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['service_type'] === null) {\n $invalidProperties[] = \"'service_type' can't be null\";\n }\n if ($this->container['currency'] === null) {\n $invalidProperties[] = \"'currency' can't be null\";\n }\n if ($this->container['unit_of_measurement'] === null) {\n $invalidProperties[] = \"'unit_of_measurement' can't be null\";\n }\n $allowedValues = $this->getUnitOfMeasurementAllowableValues();\n if (!is_null($this->container['unit_of_measurement']) && !in_array($this->container['unit_of_measurement'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'unit_of_measurement', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getLabelTypeAllowableValues();\n if (!is_null($this->container['label_type']) && !in_array($this->container['label_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'label_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getRequestAdditionalInformationAllowableValues();\n if (!is_null($this->container['request_additional_information']) && !in_array($this->container['request_additional_information'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'request_additional_information', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getTaxCalculationModeAllowableValues();\n if (!is_null($this->container['tax_calculation_mode']) && !in_array($this->container['tax_calculation_mode'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'tax_calculation_mode', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getDocumentTypeAllowableValues();\n if (!is_null($this->container['document_type']) && !in_array($this->container['document_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'document_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getApprovalStatusAllowableValues();\n if (!is_null($this->container['approval_status']) && !in_array($this->container['approval_status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'approval_status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function rules()\n {\n return [\n 'date_v' => 'required|date_format:d/m/Y',\n 'etat' => 'required|in:Réalisé hors plan,Plan',\n 'pharma' => 'required|exists:pharmacies,pharmacie_id',\n 'product.*' =>'required_unless:etat,Plan|exists:produits,produit_id',\n 'nbr_b.*' =>'required_unless:etat,Plan|min:0|max:100',\n 'note' => 'nullable|max:250',\n ];\n }",
"public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getPriceTypeAllowableValues();\n if (!is_null($this->container['price_type']) && !in_array($this->container['price_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'price_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }",
"public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateRecipients())) {\n $invalid_properties[] = $this->validateRecipients();\n }\n if (!empty($this->validateResultAction())) {\n $invalid_properties[] = $this->validateResultAction();\n }\n if (!empty($this->validateParameters())) {\n $invalid_properties[] = $this->validateParameters();\n }\n if (!empty($this->validateSchedule())) {\n $invalid_properties[] = $this->validateSchedule();\n }\n if (!empty($this->validateGenerationDate())) {\n $invalid_properties[] = $this->validateGenerationDate();\n }\n return $invalid_properties;\n }",
"private function get_product_fields()\n {\n return\n array(\n array(\n 'label' => 'Price',\n 'desc' => 'Product regular price',\n 'name' => TTC_THEME_PREFIX . 'price',\n 'type' => 'number'\n ),\n array(\n 'label' => 'Sale Price',\n 'desc' => 'Product sale price. ',\n 'name' => TTC_THEME_PREFIX . 'sale-price',\n 'type' => 'number'\n ),\n array(\n 'label' => 'Is On Sale?',\n 'desc' => 'Check this to use sale price instead of regular price. ',\n 'name' => TTC_THEME_PREFIX . 'is-on-sale',\n 'type' => 'checkbox'\n ),\n array(\n 'label' => 'Youtube Video',\n 'desc' => 'Product video url',\n 'name' => TTC_THEME_PREFIX . 'youtube',\n 'type' => 'youtube'\n ),\n array(\n 'label' => 'Gallery Images',\n 'desc' => 'Product gallery images.',\n 'name' => TTC_THEME_PREFIX . 'gallery',\n 'type' => 'gallery'\n ),\n );\n }",
"public function rules()\n {\n return [\n ['name, filterTypeId', 'required'],\n ['name', 'length', 'min'=>1, 'max'=>255],\n ['priceValue', 'numerical', 'min'=>1, 'max'=>99999,\n 'tooSmall'=>'You must order at least 1 piece',\n 'tooBig'=>'You cannot order more than 99999 pieces at once'\n ],\n ['currencyId', 'numerical', 'min'=>1, 'max'=>99],\n ['filterTypeId', 'numerical', 'min'=>1, 'max'=>999],\n ['filterId', 'numerical', 'min'=>1, 'max'=>9999],\n ];\n }"
] | [
"0.65070033",
"0.6080864",
"0.60275817",
"0.5991782",
"0.595955",
"0.59340507",
"0.5875773",
"0.58506304",
"0.5834048",
"0.5819472",
"0.5812577",
"0.5801899",
"0.57940924",
"0.5790263",
"0.5777569",
"0.5770358",
"0.5769294",
"0.57671434",
"0.57603365",
"0.57568926",
"0.57544667",
"0.5744605",
"0.57308125",
"0.5727832",
"0.57067114",
"0.5705144",
"0.57041407",
"0.57001317",
"0.5698554",
"0.5693829"
] | 0.6391168 | 1 |
Devuelve una lista de tipos de tributo para un producto | public function Get_List_Tipo_Tributo()
{
$l_LNConfigsistema = new LNConfigsistema();
$l_Tax_Type_Code = 35;
$l_List_Validaciones = [];
$l_List_Parametros = $l_LNConfigsistema->Get_Parametros_Sistema_object($l_Tax_Type_Code,0,"");
// foreach( $l_List_Parametros as $Item )
// {
// $l_ValidacionPerfil = new ENValidacionPerfil();
// $l_ValidacionPerfil->Cod_Validacion = $Item->Cod_ParSis;
// $l_ValidacionPerfil->Des_Mensaje = $Item->Des_ParSis_Tx2;
// array_push($l_List_Validaciones,$l_ValidacionPerfil);
// }
return $l_List_Parametros;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getTiposDeProducto(){\n return json_encode(TipoProductoModel::all());\n }",
"public function getTiposPreguta()\n {\n $dql = \"SELECT \n tp.id,\n tp.tprTipoPregunta\n FROM \n sgiiBundle:TblTipoPregunta tp\n WHERE tp.tprEstado = 1\";\n \n $query = $this->em->createQuery($dql);\n $result = $query->getResult(); \n return $result;\n }",
"private function _getTiposPermitidos() {\n\t\treturn [\n\t\t\tself::TIPO_ESTADO,\n\t\t\tself::TIPO_MENSAJE_PRIVADO\n\t\t];\n\t}",
"public function getTipos()\n\t{\n \treturn array('Debito' => 'Debito', 'Credito' => 'Credito', 'Efectivo' => 'Efectivo', 'Cheques' => 'Cheques');\n\t}",
"private function obtenerTitulos() {\n $i=0;\n $titulos=array();\n\n while($i< $this->bd->totalField($this->bd->result)){\n if($i==0 and $this->controlFila==TRUE){\n if($this->tipoControl==2){\n\n $titulos[$i]=Selector::crearInput(null,array('data-jvista'=>\"seleccionarTodas\",'name'=>\"obtTotalCol\",\"id\"=>'obtTotalColm','type'=>'checkbox'));\n\n }else{\n if($this->tipoControl==3){\n $titulos[$i]=\"\";\n }else{\n $titulos[$i]=\"\";\n }\n\n }\n }else{\n\n $titulos[$i]=\n $this->bd->obtenerNombreCampo($this->bd->result, $i);\n }//fin if\n $i++;\n }\n return $titulos;\n }",
"function Filtros_Listar_CategoriaProductoTamano()\n {\n $Helper=new htmlhelper; $TipoTxt=new TipoTextBox; $index=0;\n $inputs=array(\n \"Categoria\" => $Helper->combo_categoriaproducto(\"fil_cmbTransportista\",++$index,\"\",\"\",\"\",\"\",\"\"), \n \"Nombre\" => $Helper->textbox(\"fil_txtNombreTamano\",++$index,\"\",128,150,$TipoTxt->texto,\"\",\"\",\"\",\"textoInput\")\n );\n $buttons=array($Helper->button(\"btnBuscarTamano\",\"Buscar\",70,\"Buscar_Grilla('configuracion','Grilla_Listar_CategoriaProductoTamano','tbl_lista','','td_General')\",\"textoInput\"));\n $html = '<fieldset class=\"textoInput\"><legend align= \"left\">Filtros de búsqueda</legend>';\n $html .= $Helper->Crear_Layer(\"tbl_lista\",$inputs,$buttons,3,990,\"\",\"\");\n $html .='</fieldset>';\n return $html;\n }",
"public function getTipos()\n {\n return $this->tipos;\n }",
"public function getAllTipos()\n\t{\n //realizamos la consulta de todos los segmentos\n $consulta = $this->db->prepare(\"\n SELECT \n COD_TIPO, NOM_TIPO\n FROM t_tipo_tienda\n ORDER BY COD_TIPO DESC\");\n\n $consulta->execute();\n\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n\t}",
"static function getTiposContrato() {\n $conn = getConn();\n $sql = \"SELECT * FROM tso_tipos_contrato\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n\n $tiposContratoData = $stmt->fetchAll();\n $tiposContrato = array();\n\n foreach ($tiposContratoData as $tc) {\n if (isset($tc)) {\n $tipoContrato = new stdClass();\n $tipoContrato->id = $tc[\"id\"];\n $tipoContrato->nombre = $tc[\"nombre\"];\n array_push($tiposContrato, $tipoContrato);\n }\n }\n\n return (count($tiposContrato) <= 0 ) ? null : $tiposContrato;\n }",
"public function getProductos(){\n\t\n\treturn $this->productos;\n\t}",
"private function getProductOptions()\n {\n $products = PurchaseOrderProduct::getTransferrables();\n $products = $products->each(function($product){\n // Concatenate the transferable quantity after the name.\n $product->inventory->name = $product->inventory->name . ' ('.$product->quantity_transferrable.')';\n });\n $product_options = isset($products) ? $products->pluck('inventory.name', 'id') : [];\n // dd($products, $product_options);\n return $product_options;\n\n // $product_groups = PurchaseOrderProduct::getGroupsTransferrable();\n // $product_groups_options = isset($product_groups) ? $product_groups->pluck('name', 'product_id') : [];\n // return $product_groups_options;\n }",
"public function getProductos()\r\n {\r\n return $this->productos;\r\n }",
"public function tributos()\n {\n return $this->belongsToMany('App\\Models\\Tributo');\n }",
"public function getTiposInstrumento()\n {\n $dql = \"SELECT \n ti.id,\n ti.theNombreHerramienta\n FROM \n sgiiBundle:TblTipoHerramienta ti\n WHERE ti.theEstado = 1\";\n \n $query = $this->em->createQuery($dql);\n $result = $query->getResult(); \n return $result;\n }",
"private function get_product_fields()\n {\n return\n array(\n array(\n 'label' => 'Price',\n 'desc' => 'Product regular price',\n 'name' => TTC_THEME_PREFIX . 'price',\n 'type' => 'number'\n ),\n array(\n 'label' => 'Sale Price',\n 'desc' => 'Product sale price. ',\n 'name' => TTC_THEME_PREFIX . 'sale-price',\n 'type' => 'number'\n ),\n array(\n 'label' => 'Is On Sale?',\n 'desc' => 'Check this to use sale price instead of regular price. ',\n 'name' => TTC_THEME_PREFIX . 'is-on-sale',\n 'type' => 'checkbox'\n ),\n array(\n 'label' => 'Youtube Video',\n 'desc' => 'Product video url',\n 'name' => TTC_THEME_PREFIX . 'youtube',\n 'type' => 'youtube'\n ),\n array(\n 'label' => 'Gallery Images',\n 'desc' => 'Product gallery images.',\n 'name' => TTC_THEME_PREFIX . 'gallery',\n 'type' => 'gallery'\n ),\n );\n }",
"public function listaCostosCategoriaItem()\n\t{\n\t\tif (!isset($_POST['cve']))\n\t\t{\n\t\t\theader (\"HTTP/1.1 514 An Error\");\n\t\t\treturn;\n\t\t}\n\n\t\t$clave = $_POST['cve'];\n\n\t\t$opciones = \"<option value=''>Seleccione:</option>\";\n\t\t$precios = $this->evt->getCostosCategoriaItem($clave, $this->idEvento);\n\n\t\tforeach ($precios as $key => $value)\n\t\t{\n\t\t\t$opciones .= '<option value=\"' . $key . '\"';\n\t\t\t$opciones .= ($key == 5) ? ' selected' : '';\n\t\t\t$opciones .= '>' . $value['nombre'] . ' - ' . $this->func->moneda2screen($value['costo']) . '</option>';\n\t\t}\n\n\t\techo $opciones;\n\t}",
"public function getTitolareCarta() {\n return $this->titolare_carta;\n }",
"public function ObtenerTiposDeProductos()\n {\n if ($_SERVER['REQUEST_METHOD']) :\n header('Content-Type: application/json');\n echo json_encode($this->model->ObtenerTiposDeProductos(), JSON_PRETTY_PRINT);\n endif;\n }",
"public function getPeritosOptions(){\n $lista=array();\n $lista[null]=\"\";\n foreach ($this->peritos as $perito){\n $lista[$perito->gabinete][$perito->id]=$perito->nombre;\n }\n return $lista; \n //return CHtml::listData($this->peritos,'id','nombre','gabinete');\n }",
"private function produceOptions() {\n \n Loader::model('products/product');\n \n \n $options = productModel::getOptions();\n \n if (!empty($options[0])) {\n \n $this->options = array();\n \n foreach ($options as $option) {\n \n $costs = explode('__', $option['cost']);\n $values = explode('__', $option['value']);\n \n $costsArr = array();\n \n foreach ($costs as $i => $v) {\n \n $costsArr[$values[$i]] = '£ ' . number_format((float)$v, 2);\n \n }\n \n \n $this->options[] = array(\n 'type' => $option['tName'],\n 'name' => $option['pName'],\n 'costOptions' => $costsArr,\n 'p' => $option['pID']\n );\n \n \n }\n \n \n \n }\n \n }",
"public function product()\n {\n return array_product($this->items);\n }",
"function getTriples() {\r\n\t\treturn $this->triples;\r\n\t}",
"private function get_valu_products_data() {\n\t\t$products = array();\n\t\t$product_name = '';\n\t\t$category_name = '';\n\t\t$order_id = $this->aps_order->get_session_order_id();\n\t\t$order = $this->aps_order->get_order_by_id( $order_id );\n\t\t$items = $order->get_items();\n\t\t$currency = $this->get_fort_currency();\n\t\tforeach ( $items as $item ) {\n\t\t\t$product_name = $this->clean_string( $item->get_name() );\n\t\t\t$product_id = $item->get_product_id();\n\t\t\t$product_categories = get_the_terms( $product_id, 'product_cat' );\n\t\t\tforeach ( $product_categories as $product_category ) {\n\t\t\t\t$category_name = $this->clean_string( $product_category->name );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tif ( count( $items ) > 1 ) {\n\t\t\t$product_name = 'MutipleProducts';\n\t\t}\n\t\t$product_price = $this->convert_fort_amount( $order->get_total(), $this->aps_order->get_currency_value(), $currency );\n\t\t$producs_string = '[{product_name=' . $product_name . ', product_price=' . $product_price . ', product_category=' . $category_name . '}]';\n\t\treturn $producs_string;\n\t}",
"function Filtros_Listar_CategoriaProductoModelo()\n {\n $Helper=new htmlhelper; $TipoTxt=new TipoTextBox; $index=0;\n $inputs=array(\n \"Categoria\" => $Helper->combo_categoriaproducto(\"fil_cmbTransportista\",++$index,\"\",\"\",\"\",\"\",\"\"), \n \"Nombre\" => $Helper->textbox(\"fil_txtNombreTamano\",++$index,\"\",128,150,$TipoTxt->texto,\"\",\"\",\"\",\"textoInput\")\n );\n $buttons=array($Helper->button(\"btnBuscarTamano\",\"Buscar\",70,\"Buscar_Grilla('configuracion','Grilla_Listar_CategoriaProductoModelo','tbl_lista','','td_General')\",\"textoInput\"));\n $html = '<fieldset class=\"textoInput\"><legend align= \"left\">Filtros de búsqueda</legend>';\n $html .= $Helper->Crear_Layer(\"tbl_lista\",$inputs,$buttons,3,990,\"\",\"\");\n $html .='</fieldset>';\n return $html;\n }",
"protected function getOpciones() {\n //return $opciones;\n return array();\n }",
"public function tpoaAction()\n {\n $tpoaList = array();\n $contract = Dm_Session::GetConnectedUserContract();\n $limitedCustomizeTpoa = $contract->getParameterValue('limitedCustomizeTpoa');\n if (strlen($limitedCustomizeTpoa) > 0) {\n foreach (explode(',', $limitedCustomizeTpoa) as $tpoa) {\n array_push($tpoaList, $tpoa);\n }\n }\n $this->_helper->json($tpoaList);\n }",
"public function getPropMetodologias(){\n\t\t$query = \"SELECT * FROM prop_metodologia_selected pms\n\t\tINNER JOIN prop_metodologia pme ON pme.id_metodologia = pms.id_metodologia\n\t\tINNER JOIN prop_tipo_metodologia ptm ON ptm.id_tipo_metodologia = pme.id_tipo_metodologia\n\t\tWHERE pms.id_propuesta = {$this->id_propuesta}\n\t\tORDER BY pms.id_row_metodologia\";\n\n\t\treturn $this->adoDbFab->GetAll($query);\n\t}",
"function listarProductosConOpciones() {\n $SALTO = \"\\n\";\n $productos = obtenerTodosProductos();\n\n $cadena_post = \"\";\n $index = 1;\n foreach ($productos as $producto) {\n // echo $producto['categoriaId'] ;\n $class = \"\";\n if ($index % 2 == 0)\n $class = \"par\";\n $categoria = obtenerCategoriaPorId($producto['categoriaId']);\n $cadena_post .=' <tr class=\"' . $class . '\">' . $SALTO;\n $cadena_post .=' <td>' . $producto['productoId'] . '</td>' . $SALTO;\n $cadena_post .=' <td>' . $categoria['nombre'] . '</td>' . $SALTO;\n $cadena_post .=' <td>' . $producto['nombre'] . '</td>' . $SALTO;\n $cadena_post .=' <td>' . $producto['costo'] . '</td>' . $SALTO;\n $cadena_post .=' <td>' . $producto['cantidad'] . '</td>' . $SALTO;\n $cadena_post .=' <td class=\"editar\"><a href=\"adm_producto_modificar.php?productoId=' . $producto['productoId'] . '\"><img src=\"img/utileria/editar.png\" alt=\"Editar\"/></a></td>' . $SALTO;\n //href=\"adm_producto_borrar.php?productoId='.$producto['productoId'].'\"\n $cadena_post .=' \t<td class=\"borrar\"><a onclick = \"confirmarEliminacionProducto(' . $producto['productoId'] . ')\" href=\"#\"><img src=\"img/utileria/borrar.png\" alt=\"Borrar\"/></a></td>' . $SALTO;\n// $cadena_post .=' </td>'.$SALTO;\n $cadena_post .=' </tr>' . $SALTO;\n $index++;\n }\n if ($cadena_post == \"\") {\n $cadena_post .=\"<tr><td colspan='4'>No hay productos</td></tr>\" . $SALTO;\n }\n return $cadena_post;\n}",
"function Filtros_Listar_CategoriaProductoColor()\n {\n $Helper=new htmlhelper; $TipoTxt=new TipoTextBox; $index=0;\n $inputs=array(\n \"Categoria\" => $Helper->combo_categoriaproducto(\"fil_cmbTransportista\",++$index,\"\",\"\",\"\",\"\",\"\"), \n \"Nombre\" => $Helper->textbox(\"fil_txtNombreTamano\",++$index,\"\",128,150,$TipoTxt->texto,\"\",\"\",\"\",\"textoInput\")\n );\n $buttons=array($Helper->button(\"btnBuscarTamano\",\"Buscar\",70,\"Buscar_Grilla('configuracion','Grilla_Listar_CategoriaProductoColor','tbl_lista','','td_General')\",\"textoInput\"));\n $html = '<fieldset class=\"textoInput\"><legend align= \"left\">Filtros de búsqueda</legend>';\n $html .= $Helper->Crear_Layer(\"tbl_lista\",$inputs,$buttons,3,990,\"\",\"\");\n $html .='</fieldset>';\n return $html;\n }",
"public function getTrips()\n {\n return $this->hasMany(Trip::className(), ['train_id' => 'id']);\n }"
] | [
"0.6339583",
"0.60422814",
"0.59979546",
"0.59540135",
"0.59106386",
"0.5887077",
"0.58706874",
"0.576073",
"0.5711125",
"0.5679197",
"0.5674993",
"0.5671318",
"0.55636114",
"0.555374",
"0.5539041",
"0.5500698",
"0.5480961",
"0.5468596",
"0.54499644",
"0.54094553",
"0.5381948",
"0.5370476",
"0.5370175",
"0.5362818",
"0.53597015",
"0.53206426",
"0.5312916",
"0.52836573",
"0.5281261",
"0.52675784"
] | 0.6794676 | 0 |
Check highest bid validation | public function _checkHighestBid() {
if (!empty($this->data['AuctionBid']['auction_id'])) {
$highestBid = $this->field('amount', array('AuctionBid.auction_id' => $this->data['AuctionBid']['auction_id']), 'AuctionBid.amount DESC');
if ($highestBid >= $this->data['AuctionBid']['amount']) {
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMaximumBid()\n {\n return $this->maximum_bid;\n }",
"public function check_highest_price() {\n $max = $this->input->post('highest_price');\n $min = $this->input->post('lowest_price');\n if ($max !== \"\") {\n if ($max < $min) {\n return false;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }",
"public function UserMaxValue(){\n\t\t\tglobal $DB;\n\t\t\t//neu la sinh vien -> max = 3\n\t\t\t//neu la giang vien -> max = unlimited\n\t\t\tif($_SESSION['member_svgv'] == 'sinhvien'){\n\t\t\t\t//kiem tra sach da muon\n\t\t\t\tif($data = $DB->query(\"SELECT sum(status) FROM borrow WHERE member_id='{$_SESSION['member_id']}' \")){\n\t\t\t\t\t//echo $data[0]['sum(status)'];\n\t\t\t\t\tif($data[0]['sum(status)'] < 3){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}elseif($_SESSION['member_svgv'] == 'giangvien'){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\t//admin, smod, khong dc thue\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}",
"public function _checkStartBid() {\n\t\tif (!empty($this->data['AuctionBid']['auction_id'])) {\n\t\t\t$minimumBid = $this->Auction->field('start', array('Auction.id' => $this->data['AuctionBid']['auction_id']));\n\t\t\tif ($this->data['AuctionBid']['amount'] < $minimumBid) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function isMaximumTotalOrderExceeded(): bool\n {\n return $this->item_total > Configuration::getMaximumTotalOrderValue();\n }",
"public function isBest()\n {\n return $this->id === $this->question->best_answer_id;\n }",
"public function message()\n {\n return \"The bid must be greater than $this->currentMaxBid\";\n }",
"public function passes($attribute, $value)\n {\n $this->currentMaxBid = $this->lot->bids()->max('price') ?? $this->lot->start_price - 1;\n return (int)$value > $this->currentMaxBid;\n }",
"public function checkTotalLimit()\r\n {\r\n if ($this->total_limit === $this::ON) {\r\n\r\n $startTime = TimeHelper::startTime($this->total_limit_period);\r\n\r\n $submissions = FormSubmission::find()->select('id')->asArray()\r\n ->where(['form_id' => $this->id])\r\n ->andWhere(['between','created_at', $startTime, time()])->count();\r\n\r\n if ($this->total_limit_number <= $submissions) {\r\n /** @var \\yii\\web\\Response $response */\r\n $response = Yii::$app->getResponse();\r\n $response->format = Response::FORMAT_JSON;\r\n $response->data = array(\r\n 'action' => 'submit',\r\n 'success' => false,\r\n 'id' => 0,\r\n 'message' => Yii::t(\"app\", \"Sorry, the form does not accept more submissions per {period}.\", [\r\n 'period' => TimeHelper::getPeriodByCode($this->total_limit_period)]),\r\n );\r\n $response->send();\r\n\r\n exit;\r\n }\r\n }\r\n }",
"function actionCheckmaxnumber($asin_arr=[]){\n $userId=$this->_userId;\n\n $spyTable = Monitor::tableName();\n\n $query = (new \\yii\\db\\Query())\n ->from($spyTable)\n ->where(['is_monitor' => 1, 'user_id' => $userId]);\n if(count($asin_arr)){\n $query->andWhere(['not in', 'asin', $asin_arr]);\n }\n \n $count = $query->count();\n if( $count+count($asin_arr) > $this->maxmonitor ){\n return false;\n }\n return true;\n }",
"public function submitBid(Request $request)\n {\n $this->validate($request, [\n 'auction_item_id' => 'required',\n 'user_id' => 'required',\n 'price' => 'required'\n ]);\n\n //FIND HIGHEST BID\n $highest_bid = Bid::where('auction_item_id', $request->auction_item_id)->orderBy('price', 'desc')->first();\n \n //ENTER BID IF HIGHER THAN PREVIOUS BIDS\n if( !$highest_bid || $highest_bid->price < $request->price){\n $bid = Bid::create([\n 'auction_item_id' => $request->auction_item_id,\n 'user_id' => $request->user_id,\n 'price' => $request->price\n ]);\n\n //ADD HIGHEST BIDDER TO AUCTION ITEMS TABLE\n $auction_item = AuctionItem::findOrFail($request->auction_item_id);\n $auction_item->user_id = $request->user_id;\n $auction_item->save();\n \n return([\n 'submit' => true\n ]);\n }\n\n\n return([\n 'submit' => false\n ]);\n \n }",
"public function isHigher()\n {\n return $this->isValid() && VERSION_IS_HIGHER === version_compare($this->version, self::THRESHOLD);\n }",
"function getBid(){\n\t\tif($this->bid==\"\") {\n\t\t\t$this->obtainBid();\n\t\t}\n\t\treturn $this->bid;\n\t}",
"function isMaxReached() {\n\t\treturn ($this->find('count') >= $this->limit);\n\t}",
"public function validate($max)\n {\n $this->setParams(get_defined_vars());\n $value = $this->getValue();\n if (! is_scalar($value)) {\n return false;\n }\n return $value <= $max;\n }",
"public function getMaxVotesDown()\n {\n return (int) Mage::getStoreConfig('productreviews/settings/max_votes_down');\n }",
"private function _getMinimumPriceForBidding()\r\n {\r\n $results = TransactionTable::getInstance()->getBiddingsForAuction($this->Auction);\r\n \r\n if (count($results) === 0 )\r\n return $this->price;\r\n\r\n $itemsLeft = (int) TransactionTable::getInstance()->getNumberOfItemsLeftForAuctionAndTransactionTypeName($this->Auction);\r\n $itemsCount = 0;\r\n\r\n foreach ($results as $result)\r\n {\r\n if (($itemsCount += $result->number_of_items) === $itemsLeft)\r\n return $result->price;\r\n }\r\n \r\n return $this->price;\r\n }",
"public function hasMaxAlternatives(){\n return $this->_has(4);\n }",
"public function testCanSetMaxBoxesToWeightBalance(): void\n {\n $packer = new Packer();\n $packer->setMaxBoxesToBalanceWeight(3);\n self::assertEquals(3, $packer->getMaxBoxesToBalanceWeight());\n }",
"function players_will_fit ($male, $female,\n\t\t\t $max_male, $max_female, $max_neutral)\n{\n // If we're above total game max, then we're full\n\n if ($male + $female > $max_male + $max_female + $max_neutral)\n return false;\n\n else\n return true;\n}",
"public function valid()\n {\n return $this->current <= $this->maximum ? true : false;\n }",
"public static function isMaximumOrderPerDayExceeded(): bool\n {\n return static::whereDate('created_at', Carbon::today())->count() >= Configuration::getMaximumOrderPerDay();\n }",
"public static function getBid( $auction ) {\n $auction = self::_auction($auction);\n if (!$auction) return FALSE;\n $group = self::getGroup($auction);\n return !empty($auction['mybid'])\n ? $auction['mybid']\n : ( self::$Groups[$group]['t']\n ? self::$Groups[$group]['b']-$auction['shipping']\n : self::$Groups[$group]['b'] );\n }",
"public function getBalanceMaximum()\n {\n return $this->balanceMaximum;\n }",
"public function can_find_maximum_rating()\n {\n factory(ContentRating::class, 5)->create();\n\n $max_order = ContentRating::max('order');\n $max_rating_id = ContentRating::where('order', $max_order)->first()->id;\n\n $this->assertEquals($max_order, ContentRating::maximum()->first()->order);\n $this->assertEquals($max_rating_id, ContentRating::maximum()->first()->id);\n }",
"function validateBid($bid_data, $row, $allStudentInfo, $allCourseInfo, $bidSectionsInfo){\n \n // Retrieve necessary data for validation\n $error = [];\n $message = [];\n $userid = $bid_data[0];\n $bidAmount = $bid_data[1];\n \n $bidCode = $bid_data[2];\n $bidSection = $bid_data[3];\n $studentList = [];\n $bidDAO = new BidDAO();\n $bidInfo = $bidDAO->retrieveStudentBidsWithInfo($userid); // Retrieve INNER JOIN table of bid and section and course\n $bidCodeCompletedDAO = new CourseCompletedDAO();\n // UserID Validation \n $useridList = [];\n foreach($allStudentInfo as $val){\n if ($userid == $val->getUserid()) \n $student = $val; // Retrieve 'student' class for logic validation \n $useridList[] = $val->getUserid(); // store all userid in $useridList\n }\n if (!in_array($userid, $useridList)){ // Check if inputted user id exist in current student database\n $message[] = \"Course: $bidCode Section: $bidSection Error: invalid userid\";\n }\n\n // Bid Amount Validation\n if(!is_numeric($bidAmount) || $bidAmount < 10.0){ // check if edollar is not numerical value or less than e$10\n $message[] = \"Course: $bidCode Section: $bidSection Error: invalid amount\";\n }\n else {\n if ((intval($bidAmount) != $bidAmount) && (strlen($bidAmount) - strrpos($bidAmount, '.') - 1 > 2)) { // check that the edollar is not more than 2 decimal places\n $message[] = \"Course: $bidCode Section: $bidSection Error: invalid amount\";\n }\n }\n\n // Course Validation\n $bidCodeList = [];\n foreach($allCourseInfo as $val){\n if ($bidCode == $val->getCourse())\n $bidCode = $val; // Retrieve 'course' class for logic validation \n $bidCodeList[] = $val->getCourse(); // Store all course in $bidCodeList\n }\n if (!in_array($bidCode, $bidCodeList)){ \n var_dump($bidCode);\n var_dump($bidSection);\n $course = $bidCode->getCourse();\n var_dump($course);\n \n $message[] = \"Course: \" . $course. \" Section: \". $bidSection . \" Error: invalid course\"; \n var_dump($message); \n }\n else { \n // Section Validation // Check ONLY if course validation is valid\n $bidSectionList = [];\n foreach($bidSectionsInfo as $val){\n if ($bidSection == $val->getSection())\n $bidSection = $val; // Retrieve 'section' class for logic validation \n $bidSectionList[] = $val->getSection(); // Store all section filtered by course in $bidSectionList\n }\n if (!in_array($bidSection, $bidSectionList)){ // Check if bidSection is in section list (after filtered with course)\n $message[] = \"Course: $bidCode Section: $bidSection Error: invalid section\"; \n }\n }\n\n\n\n // Logic Validation\n $bidStatusDAO = new BidStatusDAO();\n $bidStatus = $bidStatusDAO->getBidStatus();\n\n // if student bid is not from their own school\n if (isset($student) && isset($bidCode) && $student->getSchool() != $bidCode->getSchool() && $bidStatus->getRound() == 1){ \n $message[] = \"Course: $bidCode Section: $bidSection Error: Can only bid from same school during Round 1\"; \n }\n\n $start_timing = [ // Changed to 08:30:00 instead of 8:30 because it's converted to DATETIME format\n '08:30:00' => 0, // when it's uploaded to the database (PHPmyAdmin)\n '12:00:00' => 1, \n '15:30:00' => 2\n ];\n $end_timing = [\n '11:45:00' => 0, \n '15:15:00' => 1, \n '18:45:00' => 2\n ];\n\n // Check for class timetable clash \n foreach ($bidInfo as $bid) {\n if (isset($bidSection) && ($bid['day'] == $bidSection->getDay()) && ($start_timing[$bid['start']] == $start_timing[$bidSection->getStart()] || $end_timing[$bid['end']] == $end_timing[$bidSection->getEnd()])){\n echo $bid['day'];\n $message[] = \"Course: $bidCode Section: $bidSection Error: You have a class timetable clash\";\n }\n }\n\n // Check for exam timetable clash\n foreach ($bidInfo as $bid) {\n if (($bid['exam date'] == $bidCode->getExamdate()) && ($start_timing[$bid['exam start']] == $start_timing[$bidCode->getExamstart()] || $end_timing[$bid['exam end']] == $end_timing[$bidCode->getExamend()])){\n $message[] = \"Course: $bidCode Section: $bidSection Error: You have a exam timetable clash\";\n }\n }\n\n // Check for incomplete prerequisites \n $bidCodesCompleted = $bidCodeCompletedDAO->retrieveCourseCompletedByUserId($userid);\n $prerequisiteDAO = new PrerequisiteDAO();\n $prerequisites = $prerequisiteDAO -> retrievePrerequisiteByCourse($course);\n if (!empty($prerequisites)){ // If there is prerequisites\n if (array_diff($prerequisites, $bidCodesCompleted)) {\n $message[] = \"Course: $bidCode Section: $bidSection Error: You have incomplete prerequisites\";\n }\n }\n\n // Check for course completed \n if (in_array($bidCode,$bidCodesCompleted)) {\n $message[] = \"Course: $bidCode Section: $bidSection Error: The course is completed already\";\n }\n\n // Check for Section limit (Student can only bid for 5 sections)\n $num = 0;\n foreach($bidInfo as $bid) {\n if ($bid['userid'] == $userid) {\n $num++;\n }\n }\n if ($num >= 5) {\n $message[] = \"Course: $bidCode Section: $bidSection Error: Section limit reached\";\n }\n \n\n return $message;\n}",
"function __checkPartnerLimit($vid) {\n $vendor = $this->Vendors->get($vid, [\n 'contain' => ['SubscriptionPackages', 'Partners']\n ]);\n $max_allowed = $vendor['subscription_package']->no_partners;\n $current_number = count($vendor['partners']);\n if($current_number < $max_allowed) {\n return true;\n }\n \n return false;\n \n }",
"function get_mark_breakdown_max($eid){\n\t$data = array();\n\t$result = mysql_query(\"select user_id, MAX(student_result) from mock_exam_student_summary where exam_id = \" . $eid . \" GROUP BY(user_id);\");\n\twhile ($row = mysql_fetch_assoc($result)) {\n\t $data [] = $row;\n\t}\n\n\t$ttl = get_questions_in_exam($eid) * 10;\n\n\t$data2 = array();\n\n\tforeach($data as $val){\n\n\n\t\t if(floatval($val['MAX(student_result)'])/$ttl < 0.35 && $val['MAX(student_result)'] != \"Pending\"){\n if(isset($data2['Fail'])){\n \t$data2['Fail'] = $data2['Fail'] + 1;\n }else{\n \t$data2['Fail'] = 1;\n }\n }else if(floatval($val['MAX(student_result)'])/$ttl >= 0.35 && floatval($val['MAX(student_result)'])/$ttl <0.40 && $val['MAX(student_result)'] != \"Pending\"){\n if(isset($data2['Pass by Compensation'])){\n \t$data2['Pass by Compensation'] = $data2['Pass by Compensation'] + 1;\n }else{\n \t$data2['Pass by Compensation'] = 1;\n }\n }else if(floatval($val['MAX(student_result)'])/$ttl >= 0.40 && floatval($val['MAX(student_result)'])/$ttl <0.50 && $val['MAX(student_result)'] != \"Pending\"){\n if(isset($data2['Pass'])){\n \t$data2['Pass'] = $data2['Pass'] + 1;\n }else{\n \t$data2['Pass'] = 1;\n }\n }else if(floatval($val['MAX(student_result)'])/$ttl >= 0.50 && floatval($val['MAX(student_result)'])/$ttl <0.60 && $val['MAX(student_result)'] != \"Pending\"){\n if(isset($data2['Second Lower Class'])){\n \t$data2['Second Lower Class'] = $data2['Second Lower Class'] + 1;\n }else{\n \t$data2['Second Lower Class'] = 1;\n }\n }else if(floatval($val['MAX(student_result)'])/$ttl >= 0.60 && floatval($val['MAX(student_result)'])/$ttl <0.70 && $val['MAX(student_result)'] != \"Pending\"){\n if(isset($data2['Second Upper Class'])){\n \t$data2['Second Upper Class'] = $data2['Second Upper Class'] + 1;\n }else{\n \t$data2['Second Upper Class'] = 1;\n }\n }else if((floatval($val['MAX(student_result)'])/$ttl >= 0.70) && (floatval($val['MAX(student_result)'])/$ttl <= 1.1) && $val['MAX(student_result)'] != \"Pending\"){\n \t\n \tif(isset($data2['First'])){\n \t$data2['First'] = $data2['First'] + 1;\n }else{\n \t$data2['First'] = 1;\n }\n }else if(floatval($val['MAX(student_result)'])/$ttl == \"Pending\"){\n\t if(isset($data2['Pending'])){\n\t \t$data2['Pending'] = $data2['PendingPending'] + 1;\n\t }else{\n\t \t$data2['Pending'] = 1;\n\t }\n\t\t}\n}\n\n\treturn $data2;\n}",
"public function validateAmount()\n {\n if (!$this->hasErrors()) {\n $user = Yii::$app->user->identity;\n // Find amount bonus in wallet\n $wallet = Wallet::find()->where(['user_id'=>$user->id])->limit(1)->one();\n if (!$user || !$wallet || $this->amount > $wallet->bonus_btc) {\n $this->addError('amount', Yii::t('backend', 'Please enter the amount valid.'));\n }\n }\n }",
"public function isValMaxEvtValid() {\n\t\t\t$rc = true; $errorMgr = $this; $errorMsg = ''; \n\t\t\t$this->validValMaxEvt = true;\n\t\t\t/*==============START OF VALIDATION RULE====================*/ \n\t\t\t\n\t\t\tif($this->validMontantNet) {\n\t\t\t\tif($this->valMaxEvt==0 and $this->montantBrut<>0) $rc = false;\n\t\t\t\tif($this->valMaxEvt>$this->montantBrut) $rc = false;\n\t\t\t}\n\t\t\t$errorMgr = $this->saisie; $errorMsg = $this->typologie->getName();\n\t\t\t\n\t\t\t/*==============END OF VALIDATION RULE======================*/\n\t\t\tif(!$rc) {\n\t\t\t\t$errorMgr->setError($errorMsg);\n\t\t\t\t$this->validValMaxEvt = false;\n\t\t\t\treturn $rc;\n\t\t\t}\n\t\t}"
] | [
"0.6586787",
"0.65756553",
"0.5969844",
"0.5967825",
"0.5950547",
"0.5784687",
"0.5739888",
"0.5728683",
"0.5727934",
"0.5698699",
"0.5680408",
"0.5673976",
"0.5650199",
"0.5589529",
"0.55816346",
"0.55347806",
"0.5481709",
"0.5446",
"0.54057467",
"0.53977716",
"0.5394521",
"0.5393889",
"0.53916574",
"0.53886884",
"0.5384959",
"0.5382276",
"0.53626734",
"0.53575027",
"0.53417194",
"0.5322742"
] | 0.82128835 | 0 |
Notify Bidder who has just been outbid. | public function notifyOutbid($bid, $options = array()){
if($outbid = $this->getOutbid($bid[$this->alias]['auction_id'], $options)){
App::uses('User', 'Users.Model');
$User = new User;
if($email = $User->field('email', array('User.id' => $outbid['AuctionBid']['bidder_id']))){
$this->__sendMail($email,'Webpages.Auction Outbid Notification', $bid);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fireLockoutEvent()\n {\n Event::dispatch(new Lockout($this->request));\n }",
"public function wakeup()\n {\n $this->receiver = new \\Accounts();\n }",
"public function surrender(): void\n {\n $this->lost = true;\n }",
"public static function notifyBookNow()\n {\n }",
"public function markSignedOut();",
"public function checkOut()\n {\n if ($this->canCheckOut()) {\n $this->CheckedIn = false;\n $this->write();\n }\n }",
"public function cancelNow()\n { \n $this->setEnded();\n }",
"public function pushNotification($bid, $to){\n \n try\n { \n \n $stmt = $this->connect()->query(\"SELECT * FROM event_bookings WHERE booking_id=$bid\");\n $a_noti=0;\n $u_noti=0;\n while($row = $stmt->fetch(PDO::FETCH_ASSOC))\n {\n $a_noti = $row[\"admin_noti\"];\n $u_noti = $row[\"user_noti\"];\n \n }\n \n if($to == 0){\n $a_noti = $a_noti + 1;\n $stmt = $this->connect()->prepare(\"UPDATE event_bookings SET admin_noti=:n WHERE booking_id=:bid\");\n $stmt->execute(array(':n' => $a_noti, ':bid' => $bid)); \n }\n else{\n $u_noti = $u_noti + 1;\n $stmt = $this->connect()->prepare(\"UPDATE event_bookings SET user_noti=:n WHERE booking_id=:bid\");\n $stmt->execute(array(':n' => $u_noti, ':bid' => $bid)); \n }\n \n return;\n \n }catch(PDOException $ex)\n {\n echo 'ERROR: ' . $e->getMessage();\n } \n }",
"public function endLeave() {\n \n }",
"public function unban()\n {\n Auth::findThrottleByUserId($this->id)->unban();\n }",
"public function markLost() {\n\t\t\t$this->status = self::STATUS_LOST;\n\n\t\t\tself::updateStatus($this->status);\n\t\t}",
"public function deactivation() {\n\t\t}",
"function bbp_deactivation()\n{\n}",
"abstract public function notify();",
"public static function notifyContractGenerated(ContractBO $bo)\n {\n }",
"public function tellUnhibernate() {\n $this->rec(\"asking sensor to unhibernate attached display\");\n $this->getClient()->sendMessage('unhibernate');\n }",
"function maintainBird(Bird $b){\n $b->eat();\n $b->sleep();\n }",
"public function forget(): void;",
"function wsOnClose($clientID, $status) {\n\n\t\t$ip = long2ip($this->socket->wsClients[$clientID][6]);\n\t\n\t\t$this->socket->log(\"$ip ($clientID) has disconnected.\");\n \n\t\t//Send a user left notice to everyone in the room\n\t\t//foreach ($this->socket->wsClients as $id => $client)\n\t\t//\t$this->socket->wsSend($id, json_encode(array('tipo'=>'desconexion','cliente'=>$clientID ,'ip'=>$ip)));\n\t}",
"public function wakeup() {\n\n \n }",
"public function broadcastWhen()\n {\n return ($this->bid->auction->auction_type == AUCTION_TYPE_HIGHEST_BIDDER);\n }",
"function end_bidding($curr_oid, $check_quotes) {\n global $MIN_BIDS;\n global $wpdb;\n $curtime_mysql = current_time('mysql'); //current time in the mysql format in the server's time zone (EST)\n $wpdb->update('orders', array('order_phase' => \"Bids Received - Awaiting Customer Decision\", 'bids_received_date' => $curtime_mysql), array('oid' => \"$curr_oid\")); //update the order status\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid advanced to Bids Received\")); //log the event\n $related_quotes = $wpdb->get_results(\"SELECT * FROM quotes WHERE oid = '$curr_oid'\", ARRAY_A); //check the related quotes if they need to end\n if($check_quotes) { //if we need to cycle through the quotes to check for expired bids\n foreach($related_quotes as $openq) { //loop through all related quotes\n if ($openq['quote_status'] = 'No Response') { //if a related quote has not yet been responded to, it needs to expire\n $curr_qid = $openq['qid'];\n $wpdb->update('quotes', array('quote_status' => \"Quote Expired\"), array('qid' => \"$curr_qid\")); //update the quote status to show expired\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Quote Expired', 'log_entry' => \"Quote $curr_qid Expired\")); //log the event\n }\n }\n }\n //Send email to customer letting them know the quoting period is complete\n $order_row = $wpdb->get_row(\"SELECT * FROM orders WHERE oid = '$curr_oid'\", ARRAY_A); //get all of the order details\n $cid = $order_row['cid']; //find the customer id related to the order\n $order_name = $order_row['order_name'];\n $num_bids = $order_row['num_quotes_received'];\n $atp_due = $order_row['atp_due'];\n $atp_due = date(\"m/d/Y\", strtotime($atp_due)); //reformat date to mm/dd/yyyy format for email\n $cust_row = $wpdb->get_row(\"SELECT * FROM cust_info WHERE cid = '$cid'\", ARRAY_A); //get all of the customer contact details\n\n $email1 = $cust_row['contact_email'];\n $email2 = $cust_row['alt_email'];\n $email_array = array($email1);\n if ($email2 != NULL) {\n $email_array[] = $email2;\n }\n $headers[] = 'From: Merafab Notify <[email protected]>';\n $msg;\n if ($num_bids == 0) { //if no bids were received\n $wpdb->update('orders', array('order_phase' => \"Order Cancelled - No Bids Received\"), array('oid' => \"$curr_oid\")); //update the order status to show cancelled\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid cancelled - 0 bids received\")); //log the event\n $msg = \"We are sorry to inform you that your order did not receive any bids. Please review vendor comments for any improvement suggestions.\";\n } else { //otherwise bids were received\n $msg = \"All quote responses have been received for Order $order_name (Order Number $curr_oid).\n You have until $atp_due to make a selection before the quotes expire. Log in now!\";\n }\n wp_mail($email_array, \"Bidding Complete!\", $msg, $headers);\n}",
"public function endBorrow($id_borrow_toDel)\n {\n date_default_timezone_set('Europe/Paris');\n $currentDateTime = date('Y/m/d');\n $end_date = $currentDateTime;\n $cpt_array = 0;\n foreach ($this->_user->getBorrowList() as $borrow):\n if ($borrow->getIdBorrow() == $id_borrow_toDel) {\n $tmpBorrowController = new BorrowController();\n $tmpBorrowController->getBorrowDAO()->stopBorrow($borrow->getIdBorrow(), $borrow->getDeviceId(), $end_date);\n unset($this->_user->getBorrowList()[$cpt_array]);\n break;\n }\n $cpt_array += 1;\n endforeach;\n }",
"public function ban()\n {\n Auth::findThrottleByUserId($this->id)->ban();\n }",
"function iwBookingDeactive() {\n $timestamp = wp_next_scheduled('clear_invalid_booking_order_cronjob');\n // unschedule previous event if any\n wp_unschedule_event($timestamp, 'clear_invalid_booking_order_cronjob');\n }",
"public function markAsFinished()\n {\n $this->status = self::STATUS_INACTIVE;\n $this->save();\n }",
"public function markCheckedOut() {\n\t\t\t$this->is_checked_out = 1;\n\t\t}",
"public function unban()\n {\n app(BanServiceContract::class)->unban($this);\n }",
"public function forget()\n {\n }",
"public static function notifyCounterOfferAgainstOffer()\n {\n }"
] | [
"0.57136256",
"0.5279872",
"0.52600604",
"0.52195936",
"0.51737523",
"0.5123149",
"0.50871986",
"0.50801855",
"0.5050191",
"0.5040256",
"0.50204283",
"0.5003961",
"0.49983817",
"0.49926165",
"0.49922794",
"0.49794617",
"0.49776384",
"0.49600303",
"0.49598348",
"0.49507177",
"0.49383897",
"0.49350157",
"0.4923437",
"0.49138638",
"0.49117678",
"0.4905421",
"0.49017963",
"0.4901233",
"0.48886722",
"0.48864162"
] | 0.7318302 | 0 |
Check starting bid validation | public function _checkStartBid() {
if (!empty($this->data['AuctionBid']['auction_id'])) {
$minimumBid = $this->Auction->field('start', array('Auction.id' => $this->data['AuctionBid']['auction_id']));
if ($this->data['AuctionBid']['amount'] < $minimumBid) {
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function startValidation(){\n $this->valid = true;\n }",
"function bibdk_reservation_borchk_validate($form_state) {\n if ($form_state['clicked_button']['#name'] == 'next' && empty($form_state['input']['favourite_selected'])) {\n $agencySettings = BibdkReservationOrderObject::GetObject()->getFields();\n $messages = array();\n if (empty($agencySettings)) {\n watchdog('bibdk_reservation', 'no fields for agency', array(), WATCHDOG_ERROR);\n $messages = array(\n 'error' => t('Service Unavailable. We can not make reservation right know', array(), array('context' => 'bibdk_reservation')),\n 'status' => NULL\n );\n }\n\n if (empty($messages)) {\n $messages = bibdk_reservation_borchk_execute($form_state, $agencySettings);\n }\n if (!isset($messages)) {\n return;\n }\n if (isset($messages['status'])) {\n drupal_set_message(t($messages['status'], array(), array('context' => 'bibdk_reservation:error')), 'warning');\n }\n if (isset($messages['error'])) {\n form_set_error('borchk', t($messages['error'], array(), array('context' => 'bibdk_reservation:error')));\n }\n }\n}",
"protected function _preSave()\n\t{\n\t\tif ($this->isInsert())\n\t\t{\n\t\t\t$auction = XenAuction_DataWriter_Helper_Bid::getAuctionForBid($this);\n\t\t\t\n\t\t\tif ( ! $auction)\n\t\t\t{\n\t\t\t\t$this->error(new XenForo_Phrase('requested_auction_not_found'));\n\t\t\t}\n\t\t\t\n\t\t\tif ($auction['status'] != 'active')\n\t\t\t{\n\t\t\t\t$this->error(new XenForo_Phrase('auction_has_expired'));\n\t\t\t}\n\t\t}\n\t}",
"public function valid()\n {\n return $this->_bHasReachedFinal === false;\n }",
"public function valid() {}",
"public function valid() {}",
"public function valid () {}",
"public function valid() {\n return $this->is_complete == false;\n }",
"public function valid()\r\n {\r\n }",
"public function cab_booking_check(){\n\t\tmysql_query('UPDATE farebucket_cab_details SET booking_status = \"Closed\" WHERE CabRequiredOn < NOW()');\n\t}",
"public function violationCheck(): bool\n {\n // Check if the automated ban was triggered\n if($this->AutomatedBanTriggered)\n {\n // If the automated ban should be lifted by the timestamp\n if((int)time() > $this->AutomatedBanLiftTimestamp)\n {\n $this->AutomatedBanTriggered = false;\n $this->AccountsCreatedCount = 0;\n $this->AutomatedBanLiftTimestamp = 0;\n }\n else\n {\n return false; // The violation check failed\n }\n }\n\n // Check if the accounts created count should be discounted by the timestamp\n if((int)time() > $this->NextClearTimestamp)\n {\n if($this->AccountsCreatedCount > 0)\n {\n $this->AccountsCreatedCount -= 1;\n }\n\n $this->NextClearTimestamp = ((int)time() + 172800); // 48 Hours (2 Days)\n }\n\n // If more than two accounts were created in the past 48 hours\n if($this->AccountsCreatedCount > 2)\n {\n $this->AutomatedBanTriggered = true;\n $this->AutomatedBanLiftTimestamp = ((int)time() + 432000); // 120 Hours (5 days)\n\n return false; // The violation check failed\n }\n\n return true;\n }",
"public function isBilled() {\n $callsResult = Doctrine_Query::Create()\n ->from('Calls')\n ->where('asterisk_uniqueid = ?', $this->uniqueid)\n ->execute();\n $count = $callsResult->count();\n if($count != 0) {\n return true;\n } else {\n return false;\n }\n }",
"private function beforeBan(): bool\n {\n $event = new BanEvent();\n $this->trigger(self::EVENT_BEFORE_BANNING, $event);\n\n return $event->canBan;\n }",
"public function valid() {\n\t}",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"private static function _valid()\n {\n return self::_send() == 'valid';\n }",
"public function testValidateBeforeSubmit()\n {\n $quote = $this->getQuoteById('0000032134');\n $this->quoteValidator->validateBeforeSubmit($quote);\n }",
"public function bus_booking_check(){\n\t\tmysql_query('UPDATE farebucket_bus_details SET status = \"Closed\" WHERE doj < NOW()');\n\t}",
"public function validate(){\n\t\t\t$a = true; \n\t\t\t//echo \"<p>Count compounds = \".count($this->getCompounds()).\"</p>\"; \n\t\t\tfor($i = 0; $i < count($this->getCompounds()); $i++){\n\t\t\t\t//echo \"<p> i : \".$i.\"</p>\"; \n\t\t\t\t\n\t\t\t\t//echo \"<h1>\".$this->compounds[$i]->__get('name').\"</h1>\";\n\t\t\t\tif(!$this->compounds[$i]->validate()){\n\t\t\t\t//echo \"<h1>The compounds aren't valid!!!</h1>\";\n\t\t\t\t//echo \"<h1>\".$this->compounds[$i]->__get('name').\"</h1>\"; \n\t\t\t\t\t$a = true; break; \n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t//echo \"<p>Exited dosage validate()</p>\"; \n\t\t\tif(\n\t\t\t!validate($this->dosage_id, 'index') ||\n\t\t\t!validate($this->product_id, 'index') ||\n\t\t\t!validate($this->form, 'name') ||\n\t\t\t!validate($this->quantity, 'decimal' ) ||\n\t\t\t!validate($this->image, 'name' ) || \n\t\t\t!validate($this->price, 'decimal' || !$a ) \n\t\t\t){ \n\t\t\t\t$a = false; \n\t\t\t}\n\t\t\t//$this->__get('valid') == true ? $x = \"It's valid before the set\" : $x = \"It's invalid before the set\"; \n\t\t\t//echo \"<p>\".$x.\"</p>\";\n\t\t\t//echo \"<p>Makes it to the end</p>\"; \n\t\t\t$this->__set('valid', $a); \n\t\t\t//$this->__get('valid') == true ? $x = \"It's valid at the end\" : $x = \"It's invalid at the end\"; \n\t\t\t//echo \"<p>\".$x.\"</p>\"; \n\t\t}",
"public function valid(){ }",
"public function valid()\n {\n\n if ($this->container['current_number_scheduled'] === null) {\n return false;\n }\n if ($this->container['desired_number_scheduled'] === null) {\n return false;\n }\n if ($this->container['number_misscheduled'] === null) {\n return false;\n }\n if ($this->container['number_ready'] === null) {\n return false;\n }\n return true;\n }",
"function checkBilmarke(){\n\t\t\n\t}",
"public function valid ()\n\t{\n\t\treturn $this->current->format('Ymd') <= $this->enddate_ymd;\n\t}",
"protected function _checkFreeOrder()\n {\n }",
"public function afterBizRule(){\n \n if( $this->getRow() >= self::ROW_INITIAL_BALANCE ){\n \n if( !$this->getBankAccountEntry()->save() ){\n \n $this->addError( \"Fail at Row Balance\", $this->getBankAccountEntry()->getErrors() );\n \n }\n \n }\n \n parent::afterBizRule();\n\n }",
"public function testEndingOfSingleBorrowingValidation() {\n $borrowing = factory(Borrowing::class)->create();\n\n $response = $this->json('PATCH', route('borrowings.return'), [\n 'selectedBorrowings' => [$borrowing->id]\n ]);\n $response->assertJsonMissingValidationErrors('selectedBorrowings.0');\n }",
"protected function _isBankAccountNeeded()\n {\n return ($this->code == 'ratepay_lastschrift');\n }",
"public function shouldAskToCreateBillingAgreement()\n {\n $pre = __METHOD__ . \" : \";\n $this->_logger->debug( $pre . \"bof\" );\n $this->_logger->debug( $pre . \"eof\" );\n\n return self::$_shouldAskToCreateBillingAgreement;\n }",
"public function start_from_start_checker() {\n\n if (in_array($this->request->entry_type,['pause','resume','end'])) {\n\n //if task has no entry , return error\n $msg = \"Please START this task first before you \".\n strtoupper($this->request->entry_type).\" it\";\n\n $this->task_has_entries($msg,false);\n\n //prerequisite to be checked when a task has more than 1 entry\n $this->check_on_entry_exists();\n }\n }"
] | [
"0.6216705",
"0.6157001",
"0.6020592",
"0.5924799",
"0.581215",
"0.581215",
"0.5807148",
"0.57764107",
"0.57531935",
"0.5746289",
"0.57316685",
"0.5713588",
"0.56798387",
"0.56492966",
"0.56439",
"0.56439",
"0.5638433",
"0.563211",
"0.55722773",
"0.5571833",
"0.5556799",
"0.55241376",
"0.55180174",
"0.55166644",
"0.55131817",
"0.5510479",
"0.5483407",
"0.54704654",
"0.54618645",
"0.5444809"
] | 0.7631588 | 0 |
do any other auction wrap up stuff here | public function finishAuction($auction, $options = array()) {
if ($options['email'] !== false) {
/// then email the winner
$this->notifySeller($auction, $options);
$this->notifyWinner($auction, $options);
}
// do any other auction wrap up stuff here, just don't know what that might be right now...
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function end_bidding($curr_oid, $check_quotes) {\n global $MIN_BIDS;\n global $wpdb;\n $curtime_mysql = current_time('mysql'); //current time in the mysql format in the server's time zone (EST)\n $wpdb->update('orders', array('order_phase' => \"Bids Received - Awaiting Customer Decision\", 'bids_received_date' => $curtime_mysql), array('oid' => \"$curr_oid\")); //update the order status\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid advanced to Bids Received\")); //log the event\n $related_quotes = $wpdb->get_results(\"SELECT * FROM quotes WHERE oid = '$curr_oid'\", ARRAY_A); //check the related quotes if they need to end\n if($check_quotes) { //if we need to cycle through the quotes to check for expired bids\n foreach($related_quotes as $openq) { //loop through all related quotes\n if ($openq['quote_status'] = 'No Response') { //if a related quote has not yet been responded to, it needs to expire\n $curr_qid = $openq['qid'];\n $wpdb->update('quotes', array('quote_status' => \"Quote Expired\"), array('qid' => \"$curr_qid\")); //update the quote status to show expired\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Quote Expired', 'log_entry' => \"Quote $curr_qid Expired\")); //log the event\n }\n }\n }\n //Send email to customer letting them know the quoting period is complete\n $order_row = $wpdb->get_row(\"SELECT * FROM orders WHERE oid = '$curr_oid'\", ARRAY_A); //get all of the order details\n $cid = $order_row['cid']; //find the customer id related to the order\n $order_name = $order_row['order_name'];\n $num_bids = $order_row['num_quotes_received'];\n $atp_due = $order_row['atp_due'];\n $atp_due = date(\"m/d/Y\", strtotime($atp_due)); //reformat date to mm/dd/yyyy format for email\n $cust_row = $wpdb->get_row(\"SELECT * FROM cust_info WHERE cid = '$cid'\", ARRAY_A); //get all of the customer contact details\n\n $email1 = $cust_row['contact_email'];\n $email2 = $cust_row['alt_email'];\n $email_array = array($email1);\n if ($email2 != NULL) {\n $email_array[] = $email2;\n }\n $headers[] = 'From: Merafab Notify <[email protected]>';\n $msg;\n if ($num_bids == 0) { //if no bids were received\n $wpdb->update('orders', array('order_phase' => \"Order Cancelled - No Bids Received\"), array('oid' => \"$curr_oid\")); //update the order status to show cancelled\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid cancelled - 0 bids received\")); //log the event\n $msg = \"We are sorry to inform you that your order did not receive any bids. Please review vendor comments for any improvement suggestions.\";\n } else { //otherwise bids were received\n $msg = \"All quote responses have been received for Order $order_name (Order Number $curr_oid).\n You have until $atp_due to make a selection before the quotes expire. Log in now!\";\n }\n wp_mail($email_array, \"Bidding Complete!\", $msg, $headers);\n}",
"function on_item_restock(&$item) { return; }",
"public function auctions($type='marketplace'){\n\t\t$this->breadcrumbs->push('Marketplace', '/'); //second parameter is link\n\t\t\n\t\tif($type!='plaza' && $type!='marketplace' && $type!='gallaria'){\n\t\t\tredirect(site_url('/'));exit;\n\t\t}\n\t\t\n\t\t//store current date in local variable.\n\t\t$this->current_date = $this->general->get_local_time('time');\n\t\t$this->data['current_date'] = $this->current_date;\n\t\t//$this->data['user_id'] = $this->session->userdata(SESSION.'user_id');\n\t\t\n\t\t$this->data['bids_count'] = '';\n\t\t\n\t\t$this->data['live_auction_host'] = $this->home_module->get_live_auctions_by_type($type);\n\t\tif($this->data['live_auction_host']){\n\t\t\t$product_id_arr = array();\n\t\t\tforeach($this->data['live_auction_host'] as $auction){\n\t\t\t\tarray_push($product_id_arr, $auction->product_id);\n\t\t\t}\n\t\t\t$this->data['auction_image'] = $this->home_module->get_auction_images($product_id_arr);\n\t\t\t$this->data['bids_count'] = $this->home_module->get_bid_placed_count($product_id_arr);\n\t\t}\n\t\t\n\t\t//echo \"<pre>\"; print_r($this->data['live_auction_host']); echo \"</pre>\";\n\t\t//echo \"<pre>\"; print_r($product_id_arr); echo \"</pre>\";\n\t\t//echo \"<pre>\"; print_r($this->data['auction_image']); echo \"</pre>\";\n\t\t\n\t\t//echo \"<pre>\"; print_r($this->data['bids_count']); echo \"</pre>\";\n\t\t//now calculate the total bids placed in each a\n\t\t\n\t\t$this->data['upcoming_auction_hosts'] = $this->home_module->get_upcoming_auctions_by_type($type,'6');\n\t\t//echo \"<pre>\"; print_r($this->data['upcoming_auction_hosts']); echo \"</pre>\";\n\t\t\n\t\t$this->data['categories_auctions'] = $this->home_module->get_categories_auctions($type);\n\t\tif($this->data['categories_auctions']){\n\t\t\t$product_ids_arr = array();\n\t\t\tforeach($this->data['categories_auctions'] as $auction){\n\t\t\t\tarray_push($product_ids_arr, $auction->product_id);\n\t\t\t}\n\t\t\t$this->data['auction_images'] = $this->home_module->get_auction_multiple_images($product_ids_arr);\n\t\t}\n\t\t\n\t\t//echo \"<pre>\"; print_r($this->data['categories_auctions']); echo \"</pre>\";\n\t\t//echo \"<pre>\"; print_r($product_ids_arr); echo \"</pre>\";\n\t\t//echo \"<pre>\"; print_r($this->data['auction_images']); echo \"</pre>\";\n\t\t\n\t\t\n\t\t$seo_data=$this->general->get_seo(2);\n\t\tif($seo_data)\n\t\t{\n\t\t\t//set SEO data\n\t\t\t$this->page_title = $seo_data->page_title;\n\t\t\t$this->data['meta_keys']= $seo_data->meta_key;\n\t\t\t$this->data['meta_desc']= $seo_data->meta_description;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//set SEO data\n\t\t $this->page_title = WEBSITE_NAME;\n\t\t $this->data['meta_keys']= WEBSITE_NAME;\n\t\t $this->data['meta_desc']= WEBSITE_NAME;\n\t\t}\n\n\t\t$this->template\n\t\t\t->set_layout('general')\n\t\t\t->enable_parser(FALSE)\n\t\t\t->title($this->page_title)\n\t\t\t->build('v_auctions', $this->data);\n\t}",
"public function newAuction($new_auction_vars) {\n $new_auction_vars['refId'] = $this->token_generator->generateToken('AUCTION', 40);\n\n // // assign an address offset and an address\n // $new_auction_vars['keyToken'] = $this->token_generator->generateToken('ADDRESS', 42);\n\n // // new auctionAddress\n // $new_auction_vars['auctionAddress'] = $this->address_generator->publicAddress($new_auction_vars['keyToken']);\n\n // generate a new auction from xchain\n $address_info = $this->xchain_client->newPaymentAddress();\n $new_auction_vars['auctionAddress'] = $address_info['address'];\n $new_auction_vars['auctionAddressUuid'] = $address_info['id'];\n\n\n // and start a new monitor\n $monitor_info = $this->xchain_client->newAddressMonitor($new_auction_vars['auctionAddress'], $this->webhook_endpoint, 'receive', true);\n $new_auction_vars['xchainMonitorId'] = $monitor_info['id'];\n\n // build a slug\n $new_auction_vars['slug'] = $this->createSlug($new_auction_vars);\n\n // created TS\n $new_auction_vars['create'] = time();\n\n // timePhase\n $new_auction_vars['timePhase'] = 'prebid';\n\n // payouts\n $new_auction_vars['paidOut'] = false;\n $new_auction_vars['payoutReceipts'] = [];\n \n // logs\n $new_auction_vars['logs'] = [];\n\n // defaults\n if (!isset($new_auction_vars['platformAddress'])) { $new_auction_vars['platformAddress'] = $this->auction_defaults['platformAddress']; }\n if (!isset($new_auction_vars['confirmationsRequired'])) { $new_auction_vars['confirmationsRequired'] = $this->auction_defaults['confirmationsRequired']; }\n if (!isset($new_auction_vars['minStartingBid'])) { $new_auction_vars['minStartingBid'] = CurrencyUtil::numberToSatoshis($this->auction_defaults['minStartingBid']); }\n if (!isset($new_auction_vars['minBidIncrement'])) { $new_auction_vars['minBidIncrement'] = CurrencyUtil::numberToSatoshis($this->auction_defaults['minBidIncrement']); }\n if (!isset($new_auction_vars['bountyPercent'])) { $new_auction_vars['bountyPercent'] = $this->auction_defaults['bountyPercent']; }\n if (!isset($new_auction_vars['btcFeeRequired'])) { $new_auction_vars['btcFeeRequired'] = CurrencyUtil::numberToSatoshis($this->auction_defaults['btcFeeRequired']); }\n if (!isset($new_auction_vars['bidTokenFeeRequired'])) { $new_auction_vars['bidTokenFeeRequired'] = CurrencyUtil::numberToSatoshis($this->auction_defaults['bidTokenFeeRequired']); }\n if (!isset($new_auction_vars['prizeTokensRequired'])) { $new_auction_vars['prizeTokensRequired'] = []; }\n if (!isset($new_auction_vars['btcFeeSatisfied'])) { $new_auction_vars['btcFeeSatisfied'] = false; }\n if (!isset($new_auction_vars['bidTokenFeeSatisfied'])) { $new_auction_vars['bidTokenFeeSatisfied'] = false; }\n if (!isset($new_auction_vars['prizeTokensSatisfied'])) { $new_auction_vars['prizeTokensSatisfied'] = false; }\n\n // default state\n $default_state_vars = AuctionState::serializedInitialState();\n if (!isset($new_auction_vars['state'])) { $new_auction_vars['state'] = $default_state_vars; }\n\n // description as HTML\n $Parsedown = new Parsedown();\n $new_auction_vars['descriptionHTML'] = $Parsedown->text($new_auction_vars['description']);\n\n// // import the private key and address into the bitcoin wallet\n// if ($this->native_client) {\n// $private_key = $this->address_generator->WIFPrivateKey($new_auction_vars['keyToken']);\n\n// // unlock the wallet if needed\n// if ($this->wallet_passphrase) {\n// $result = $this->native_client->walletpassphrase($this->wallet_passphrase, 60);\n// # Debug::trace(\"called walletpassphrase result=\".Debug::desc($result).\"\",__FILE__,__LINE__,$this);\n// }\n\n// RetryController::retry(function() use ($new_auction_vars, $private_key) {\n// $result = $this->native_client->importprivkey($private_key, $new_auction_vars['auctionAddress'], false);\n// });\n// }\n \n\n $auction = $this->auction_directory->createAndSave($new_auction_vars);\n\n return $auction;\n }",
"public function updateAuctions()\n\t{\n\t\t//Get Start/End Time\n\t\t$from = Mage::getModel('magebid/auction')->getResource()->getOldestStartDate();\n\t\t$to = Mage::getModel('magebid/auction')->getResource()->getFutureStartDate();\n\t\t\n\t\t//Make call\n\t\tif ($from!=\"\") //If there is a start date\n\t\t{\n\t\t\t$items = Mage::getModel('magebid/ebay_items')->getSellerList($from,$to);\t\t\t\n\t\t\t\n\t\t\t//For every modified item\n\t\t\tforeach ($items as $item)\n\t\t\t{\n\t\t\t\t//$mapped_item = Mage::getModel('magebid/ebay_items')->getHandler()->mappingItem($item);\t\t\t\t\t\t\t\n\t\t\t\t$auction = Mage::getModel('magebid/auction')->load($item['ebay_item_id'],'ebay_item_id');\n\t\t\t\t$auction->ebayUpdate($item);\n\t\t\t}\t\n\t\t}\n\t}",
"private function step_super_stickies()\n {\n }",
"private static function _auction( $auction ) {\n return is_array($auction)\n ? ( isset($auction['item']) // SHOULD be an auction...\n ? $auction\n : NULL )\n : ( isset(self::$Auctions[$auction])\n ? self::$Auctions[$auction]\n : NULL );\n }",
"public static function BidNow( $item, $bid ) {\n $item = self::_item($item);\n\n if (!$bid = toNum($bid)) return;\n\n $log = self::GroupLogFile($item.'.bidnow');\n\n // esniper config. file will be only as long as required on file system\n self::writeEsniperCfg();\n $cmd = array('Core::BidNow', Registry::get('bin_esniper'),\n esf_User::UserDir(), $item, $bid, $log);\n if (Exec::getInstance()->ExecuteCmd($cmd, $res, Registry::get('SuDo'))) {\n Messages::Error($res);\n } else {\n Messages::Success(Translation::get('Auction.AuctionBiddedNow', $item));\n // refresh auction data\n AuctionHTML::clearBuffer($item);\n $auction = self::fetchAuction($item, FALSE);\n self::$Auctions[$item] = $auction;\n self::Save($auction, FALSE);\n }\n self::removeEsniperCfg();\n }",
"protected function prepareSelf()\n {\n // prepare offer itself\n }",
"protected function after(){}",
"protected function after(){}",
"function wauc_auction_custom_js() {\n if ( 'product' != get_post_type() ) :\n return;\n endif;\n ?><script type='text/javascript'>\n jQuery( document ).ready( function() {\n jQuery( '.options_group.pricing' ).addClass( 'show_if_auction' ).show();\n });\n </script><?php\n }",
"public function auction_close_mail()\n\t{\n\t\t$this_details = $this->home->get_auction_alert_details(2);\n\t\tforeach($this_details as $alert) {\n\t\t\tif($alert->mail_alert==2){ // First mail alert\n\t\t\t\t$time_diff = time()-$alert->end_time;\n\t\t\t\t\t$day_alert1 = AUCTION_ALERT_DAY + 1 ; \n\t\t\t $days2 = $day_alert1*24*3600; //alert mail for reset the auction \n\t\t\t\t\n\t\t\t\t\t\tif(file_exists(DOCROOT.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png')) {\n\t\t\t\t\t\t\t\t$image = PATH.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$image = PATH.\"themes/\".THEME_NAME.\"/images/noimage_deals_details.png\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t$end_time = $alert->end_time+(AUCTION_ALERT_DAY*24*60*60);\n\t\t\t\t\t\t$fromEmail = NOREPLY_EMAIL;\n\t\t\t\t\t\t$to = $alert->email;\n\t\t\t\t\t\t$subject = $this->Lang['OR_B_CANCEL'];\n\t\t\t\t\t\t$close_message = \"<p style='color:red;'>\".$this->Lang['CAN_O_NOTICE'].\"<p/><p style='color:red;'>Sorry, \".$alert->firstname.\"!</p><p style='color:red;'>\".$this->Lang['ORDR_CLED'].\"</p><p><img border='0' src='$image' height='160px' width='160px'/></p><p>\".$this->Lang['AUC_TIT'].\" : $alert->auction_title</p>\"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->name = ucfirst($alert->firstname);\n\t\t\t\t\t\t$this->merchant_message = $close_message;\n\t\t\t\t\t\t$closemessage = new View(\"themes/\".THEME_NAME.\"/merchant_signup_mail_template\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(EMAIL_TYPE==2) { \n\t\t\t\t\t\t\temail::smtp($fromEmail,$to,$subject,$closemessage); \n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\temail::sendgrid($fromEmail,$to,$subject,$closemessage);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail_alert = $this->home->update_third_mail_alert($alert->bid_id,$alert->auction_id); \n\t\t\t\t\n\t\t\t} \n\t\t} \n\t}",
"function process_order_quotes_due() {\n global $wpdb;\n //get all orders awaiting bids\n $completed_quotes_order_query = \"SELECT * FROM orders WHERE order_phase = 'Quote Requests Sent - Awaiting Vendor Responses'\";\n $completed_order_quotes = $wpdb->get_results($completed_quotes_order_query, ARRAY_A);\n foreach($completed_order_quotes as $openo) { //loop through and find any order where the quote period expired or all quotes were received\n if($openo['quotes_due'] < date(\"Y-m-d\")) {\n $curr_oid = $openo['oid'];\n end_bidding($curr_oid,true); //end bid period based on time\n } else if (($openo['num_quotes_received'] == $openo['num_quotes_requested']) && ($open['num_quotes_requested'] != 0)) {\n $curr_oid = $openo['oid'];\n end_bidding($curr_oid,false); //end bid period early due to all quotes received\n }\n }\n}",
"function fetchItems() {\r\n\t\tif (count($this->auctions)) {\r\n\t\t\tforeach($this->auctions as $auction) {\r\n\t\t\t\t//ItemCollection::getInstance()->fetchItem($auction->item->id);\r\n\t\t\t\t$auction->fetchItem();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new NoAuctionsLoaded();\r\n\t\t}\r\n\t}",
"protected function after() {}",
"protected function after() {}",
"public static function fetchAuction( $item, $all=TRUE, $talk=TRUE ) {\n if (empty($item)) {\n Messages::Error(Translation::get('Core.Error').': '.Translation::get('Core.NoItem'));\n return FALSE;\n }\n\n $item = self::_item($item);\n $auction = self::_auction($item);\n\n // Don't reread still invalid auctions, except it is allowed\n if (isset($auction['invalid']) AND $auction['invalid'] AND !$all) {\n // >> Debug\n Messages::Error('Auction '.$auction['item'].' \"'.$auction['name'].'\" is invalid.');\n Yryie::Error('Auction \"'.$auction['name'].'\" ('.$auction['item'].') '\n . 'is invalid (removed from ebay or to old), ignored re-read request');\n // << Debug\n return $auction;\n }\n\n // skip ended auctions, $auction can be FALSE!\n if (isset($auction['ended']) AND $auction['ended'] AND !$all) {\n // >> Debug\n $talk && Messages::Info('Auction '.$auction['item'].' \"'.$auction['name'].'\" is still ended.');\n Yryie::Warning('Auction \"'.$auction['name'].'\" is still ended, ignored re-read request');\n // << Debug\n return $auction;\n }\n\n if (!$auction) {\n $auction = self::$NewAuction;\n $auction['item'] = $item;\n }\n\n /// Yryie::StartTimer('AuctionParse'.$item, 'Parse '.$item);\n\n $parser = self::getParser($auction, $invalid);\n\n /// Yryie::StopTimer('AuctionParse'.$item);\n\n if (!$invalid AND !$parser) {\n Messages::Error(Translation::get('Auction.ErrorRetrieving', $item), TRUE);\n Messages::Info(Translation::get('Auction.ErrorRetrievingTryAgain', $item), TRUE);\n Messages::Info(Translation::get('Auction.ReportAuctionFiles', TEMPDIR, $item, Registry::get('URL.CreateBugTrackerItem')), TRUE);\n return FALSE;\n }\n\n if (!$invalid) {\n $name = $parser->getDetail($item, 'Title');\n // translate all [´`\"] to simple '\n $name = str_replace(array('\"', chr(96), chr(180)), '\\'', $name);\n\n if (empty($name)) {\n $invalid = TRUE;\n } else {\n $auction['name'] = $name;\n \n $bid = $parser->getDetail($item, 'Bid');\n $auction['bid'] = toNum($bid);\n\n $curr = preg_match('~&#\\d+;~', $bid, $args)\n ? $args[0]\n : trim(preg_replace('~[\\d,.]+~', '', $bid));\n $auction['currency'] = !empty($curr) ? $curr : '?';\n\n $auction['bidder'] = $parser->getDetail($item, 'Bidder');\n // find out auction win by parsing esniper log file\n // real names are only visible for logged in users (esniper)\n $user = esf_User::getActual();\n $regex = sprintf('~Auction %s: Post-bid info:.*?High bidder: %s!!!\\s+won~is', $item, $user);\n $file = self::GroupLogFile(self::getGroup($auction));\n if (file_exists($file) AND preg_match($regex, file_get_contents($file))) {\n $auction['bidder'] = $user;\n } else {\n // check \"bid now\" log file and rename it to read it only once after a esniper -n\n $regex = sprintf('~High bidder: %s!!!~i', $user);\n $file = self::GroupLogFile($item.'.bidnow');\n if (file_exists($file) AND preg_match($regex, file_get_contents($file))) {\n $auction['bidder'] = $user;\n if (Exec::getInstance()->Move($file, $file.'.last', $res)) Messages::Error($res);\n }\n }\n\n $auction['bids'] = $parser->getDetail($item, 'NoOfBids');\n $auction['_ts'] = $_SERVER['REQUEST_TIME'];\n if ($auction['endts'] AND ($auction['endts'] < $auction['_ts'])) $auction['ended']++;\n $auction['invalid'] = FALSE;\n }\n }\n\n if ($invalid) {\n Messages::Error(Translation::get('Core.Error').': '.Translation::get('Core.InvalidItem', $item));\n if (isset(self::$Auctions[$item])) {\n $auction['ended'] = $auction['invalid'] = TRUE;\n // add item id only once to auction title...\n if (!strstr($auction['name'], $item)) $auction['name'] .= ' ('.$item.')';\n } else {\n // new auction, don't add\n $auction = FALSE;\n }\n } else {\n if ($all) {\n\n $auction['seller'] = $parser->getDetail($item, 'Seller');\n $auction['bin'] = $parser->getDetail($item, 'bin');\n $auction['dutch'] = $parser->getDetail($item, 'dutch');\n $auction['endts'] = $parser->getDetail($item, 'End');\n\n if (empty($auction['image']))\n // keep auction image on upgrade, may put manual\n $auction['image'] = self::fetchAuctionImage($item);\n\n $auction['shipping'] = toNum($parser->getDetail($item, 'Shipping'));\n\n Event::Process('AuctionReadedInitial', $auction);\n } else {\n Event::Process('AuctionReaded', $auction);\n }\n // >> Debug\n $msg = 'Auction %s \"%s\" found on ebay.%s';\n Yryie::Info(sprintf($msg, $auction['item'], $auction['name'], $auction['parser']));\n Yryie::Debug($auction);\n // << Debug\n }\n return $auction;\n }",
"private function step_stickies()\n {\n }",
"function evo_belowsingletop() {\r\n\t\tdo_action('evo_belowsingletop');\r\n\t}",
"public function reasonForBuying();",
"function _buy_post() {\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t//skip updates from IPN: {PPP will be an immediate update} \r\n\t\tif(isset($_POST['ipn_track_id'])) {\r\n\t\t\texit;\r\n\t\t}\r\n\t\t// system\r\n\t\t$system_obj = mgm_get_class('system');\r\n\t\t$dge = bool_from_yn($system_obj->get_setting('disable_gateway_emails'));\r\n\t\t$dpne = bool_from_yn($system_obj->get_setting('disable_payment_notify_emails'));\r\n\r\n\t\t// get passthrough, stop further process if fails to parse\r\n\t\t$custom = $this->_get_transaction_passthrough($_POST['custom']);\r\n\t\t// local var\r\n\t\textract($custom);\r\n\t\t\t\r\n\t\t// set user\r\n\t\t$user = null;\r\n\t\t// check\r\n\t\tif(isset($user_id) && (int)$user_id > 0) $user = get_userdata($user_id);\t\r\n\t\t\r\n\t\t$blogname = get_option('blogname');\r\n\t\t$tran_success = false;\r\n\t\t\r\n\t\t//getting purchase post title and & price - issue #981\t\t\t\t\r\n\t\t$post_obj = mgm_get_post($post_id);\r\n\t\t$purchase_cost = mgm_convert_to_currency($post_obj->purchase_cost);\r\n\t\t$post = get_post($post_id);\r\n\t\t$post_title = $post->post_title;\t\t\r\n\r\n\t\t// errors\r\n\t\t$errors = array();\r\n\t\t// purchase status\r\n\t\t$purchase_status = 'Error';\r\n\t\t// status\r\n\t\t$payment_status = (isset($this->response['PAYMENTINFO_0_PAYMENTSTATUS'])) ? $this->response['PAYMENTINFO_0_PAYMENTSTATUS'] : $this->response['PAYMENTSTATUS'] ;\t\t\r\n\t\t// status\r\n\t\tif($this->status == 'test' && strtoupper($payment_status) == 'PENDING') $payment_status = 'Completed';\r\n\r\n\t\t// process on response code\r\n\t\tswitch ($payment_status) {\r\n\t\t\tcase 'Completed':\t\t\r\n\t\t\tcase 'Processed':\r\n\t\t\t\t// status\r\n\t\t\t\t$status_str = __('Last payment was successful','mgm');\r\n\t\t\t\t// purchase status\r\n\t\t\t\t$purchase_status = 'Success';\r\n\t\t\t\t\r\n\t\t\t\t// transaction id\r\n\t\t\t\t$transaction_id = $this->_get_transaction_id();\r\n\t\t\t\t// hook args\r\n\t\t\t\t$args = array('post_id'=>$post_id, 'transaction_id'=>$transaction_id);\r\n\t\t\t\t// user purchase\r\n\t\t\t\tif(isset($user_id) && (int)$user_id > 0){\r\n\t\t\t\t\t$args['user_id'] = $user_id;\r\n\t\t\t\t}else{\r\n\t\t\t\t// guest purchase\t\r\n\t\t\t\t\t$args['guest_token'] = $guest_token;\r\n\t\t\t\t}\r\n\t\t\t\t// after succesful payment hook\r\n\t\t\t\tdo_action('mgm_buy_post_transaction_success', $args);// backward compatibility\r\n\t\t\t\tdo_action('mgm_post_purchase_payment_success', $args);// new organized name\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 'Failed':\t\t\t\r\n\t\t\tcase 'Refunded':\t\t\t\r\n\t\t\tcase 'Denied':\t\t\t\r\n\t\t\tcase 'In-Progress':\t\t\t\r\n\t\t\t\t// status\r\n\t\t\t\t$status_str = __('Last payment was refunded or denied','mgm');\r\n\t\t\t\t// purchase status\r\n\t\t\t\t$purchase_status = 'Failure';\r\n\t\t\t\t\r\n \t\t\t\t// error\r\n\t\t\t\t$errors[] = $status_str;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 'Pending':\r\n\t\t\t\t// reason\t\t\t\t\r\n\t\t\t\tif(isset($this->response['PAYMENTINFO_0_PENDINGREASON'])) {\r\n\t\t\t\t\t$reason = $this->response['PAYMENTINFO_0_PENDINGREASON'];\r\n\t\t\t\t}else {\r\n\t\t\t\t\t$reason = $payment_status;\r\n\t\t\t\t}\t\r\n\t\t\t\t// status\t\r\n\t\t\t\t$status_str = sprintf(__('Last payment is pending. Reason: %s','mgm'), $reason);\r\n\t\t\t\t// purchase status\r\n\t\t\t\t$purchase_status = 'Pending';\t\r\n\t\t\t\t\r\n \t\t\t\t// error\r\n\t\t\t\t$errors[] = $status_str;\t\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// status\r\n\t\t\t\t$status_str = sprintf(__('Last payment status: %s','mgm'), (isset($payment_status) ? $payment_status : 'Unknown'));\r\n\t\t\t\t// purchase status\r\n\t\t\t\t$purchase_status = 'Unknown';\t\r\n\t\t\t\t\r\n \t\t\t\t// error\r\n\t\t\t\t$errors[] = $status_str;\t\r\n\t\t}\r\n\t\t\r\n\t\t// do action\r\n\t\tdo_action('mgm_return_post_purchase_payment_'.$this->module, array('post_id' => $post_id));// new, individual\r\n\t\tdo_action('mgm_return_post_purchase_payment', array('post_id' => $post_id));// new, global \r\n\t\t\r\n\t\t// set as purchase\r\n\t\t$status = __('Failed join', 'mgm'); //overridden on a successful payment\r\n\t\t// check status\r\n\t\tif ( $purchase_status == 'Success' ) {\r\n\t\t\t// mark as purchased\r\n\t\t\tif( isset($user->ID) ){\t// purchased by user\t\r\n\t\t\t\t// call coupon action\r\n\t\t\t\tdo_action('mgm_update_coupon_usage', array('user_id' => $user_id));\t\t\r\n\t\t\t\t// set as purchased\t\r\n\t\t\t\t$this->_set_purchased($user_id, $post_id, NULL, $_POST['custom']);\r\n\t\t\t}else{\r\n\t\t\t\t// purchased by guest\r\n\t\t\t\tif( isset($guest_token) ){\r\n\t\t\t\t\t// issue #1421, used coupon\r\n\t\t\t\t\tif(isset($coupon_id) && isset($coupon_code)) {\r\n\t\t\t\t\t\t// call coupon action\r\n\t\t\t\t\t\tdo_action('mgm_update_coupon_usage', array('guest_token' => $guest_token,'coupon_id' => $coupon_id));\r\n\t\t\t\t\t\t// set as purchased\r\n\t\t\t\t\t\t$this->_set_purchased(NULL, $post_id, $guest_token, $_POST['custom'], $coupon_code);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$this->_set_purchased(NULL, $post_id, $guest_token, $_POST['custom']);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t// status\r\n\t\t\t$status = __('The post was purchased successfully', 'mgm');\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// transaction status\r\n\t\tmgm_update_transaction_status($_POST['custom'], $status, $status_str);\r\n\t\t\r\n\t\t// blog\r\n\t\t$blogname = get_option('blogname');\t\t\t\r\n\t\t// post being purchased\t\t\t\r\n\t\t$post = get_post($post_id);\r\n\r\n\t\t// notify user, only if gateway emails on\t\r\n\t\tif( ! $dpne ) {\t\t\t\r\n\t\t\t// notify user\r\n\t\t\tif( isset($user->ID) ){\r\n\t\t\t\t// mgm post setup object\r\n\t\t\t\t$post_obj = mgm_get_post($post_id);\r\n\t\t\t\t// check\r\n\t\t\t\tif( $this->send_payment_email($_POST['custom']) ) {\t\r\n\t\t\t\t// check\r\n\t\t\t\t\tif( mgm_notify_user_post_purchase($blogname, $user, $post, $purchase_status, $system_obj, $post_obj, $status_str) ){\r\n\t\t\t\t\t// update as email sent \r\n\t\t\t\t\t\t$this->update_paymentemail_sent($_POST['custom']);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// notify admin, only if gateway emails on\r\n\t\tif ( ! $dge ) {\r\n\t\t\t// notify admin, \r\n\t\t\tmgm_notify_admin_post_purchase($blogname, $user, $post, $status);\r\n\t\t}\r\n\r\n\t\t// if failure:\r\n\t\tif( $purchase_status != 'Success' ) {\r\n\t\t\t$errors = (isset($this->response['L_ERRORCODE0']) && !empty($this->response['L_ERRORCODE0'])) ? \r\n\t\t\t\t\t(urlencode($this->response['L_ERRORCODE0'] . ': ' . $this->response['L_SHORTMESSAGE0'] . ' - ' . $this->response['L_LONGMESSAGE0'])) :\r\n\t\t\t\t\t(__('An error occured while porcessing payment.', 'mgm').': ' . $status_str);\r\n\t\t\t\t\t\r\n\t\t\tmgm_redirect(add_query_arg(array('status'=>'error','errors'=>$errors), $this->_get_thankyou_url())); exit;\r\n\t\t}\r\n\r\n\t\t// default error condition redirect\r\n\t\tif(count($errors)>0){\r\n\t\t\tmgm_redirect(add_query_arg(array('status'=>'error', 'errors'=>implode('|', $errors)), $this->_get_thankyou_url()));\r\n\t\t}\r\n\t}",
"function bid( $id, $bid, array $data = NULL ){\n $d = new \\Gaia\\Store\\KVP( $data );\n // wrapped in try/catch so we can manage transactions.\n try {\n // kick off a transaction if we aren't attached to one already.\n Transaction::start();\n \n // send the bid off to the core object for the first step of the process.\n $listing = $this->prepListing( $this->core->bid( $id, $bid, $data ) );\n \n // grab the listing's state prior to the bid we just made.\n $prior = $listing->priorstate();\n \n // if there was a previous bid, take their bid out of escrow and refund it.\n if( $prior && ( ! $d->enable_proxy || $prior->proxybid != $listing->proxybid ) ){\n $this->cancelBid( $listing->priorstate(), $data );\n }\n\n // if the bid actually changed hands, go ahead and escrow funds for the bidder.\n // so that the bidder can actually pay for what they bid when the time comes.\n if( ! $d->enable_proxy || ! $prior || $prior->proxybid != $listing->proxybid ){\n \n // set up a transfer object between the currency account and the currency escrow.\n $bidder = $this->transfer( $this->currencyAccount($listing->bidder ), \n $this->currencyEscrow( $listing->bidder ) );\n \n // subtracting moves funds into escrow.\n $bidder->subtract( $this->currencyId(), $bid, $this->prepData( $data, $listing, 'bid') );\n }\n // commit the transaction if we started it.\n Transaction::commit();\n \n // all done. \n return $listing;\n \n } catch( Exception $e ){\n // evil! revert the transaction.\n Transaction::rollback();\n \n // toss the exception again up the chain.\n throw $e;\n }\n }",
"abstract protected function after();",
"function add_item_wrap($member_id,$name,$cost,$not_infinite,$bribable,$healthy,$picture_url,$max_per_player,$replicateable,$description)\n{\n\tif ($healthy!=1) $healthy=0;\n\tif ($bribable!=1) $bribable=0;\n\tif ($not_infinite!=1) $not_infinite=0;\n\tif (!($cost>0)) $cost=0;\n\tif (!($max_per_player>0)) $max_per_player=0;\n\tif ($replicateable!=1) $replicateable=0;\n\tif ($name=='') ocw_refresh_with_message(do_lang_tempcode('W_MISSING_NAME'),'warn');\n\n\t// Get $realm,$x,$y from $member_id\n\tlist($realm,$x,$y)=get_loc_details($member_id);\n\n\tif ((!has_specific_permission($member_id,'administer_ocworld')) && ($GLOBALS['SITE_DB']->query_value('w_realms','owner',array('id'=>$realm))!=$member_id) && ($GLOBALS['SITE_DB']->query_value('w_realms','r_private',array('id'=>$realm))==1))\n\t\tocw_refresh_with_message(do_lang_tempcode('W_NO_EDIT_ACCESS_PRIVATE_REALM'),'warn');\n\n\t// Make sure the item does not already exist! (people aren't allowed to arbitarily duplicate items for security reasons)\n\t$r=$GLOBALS['SITE_DB']->query_value_null_ok('w_itemdef','bribable',array('name'=>$name));\n\tif (!is_null($r)) ocw_refresh_with_message(do_lang_tempcode('W_DUPE_ITEM'),'warn');\n\n\t// Make sure that they aren't in the brig and adding a bribable!\n\tif (($x==0) && ($y==2) && ($bribable==1)) ocw_refresh_with_message(do_lang_tempcode('ACCESS_DENIED__I_ERROR',$GLOBALS['FORUM_DRIVER']->get_username(get_member())),'warn');\n\n\t// Charge them\n\tif (!has_specific_permission($member_id,'administer_ocworld'))\n\t{\n\t\t$price=get_price('mud_item');\n\t\tif (available_points($member_id)<$price) ocw_refresh_with_message(do_lang_tempcode('W_EXPENSIVE',escape_html($price)),'warn');\n\t\trequire_code('points2');\n\t\tcharge_member($member_id,$price,do_lang('W_MADE_OCWORLD',$name));\n\t}\n\n\tadd_item($name,$bribable,$healthy,$picture_url,$member_id,$max_per_player,$replicateable,$description);\n\n\tadd_item_to_room($realm,$x,$y,$name,$not_infinite,$cost,$member_id);\n\n\tocw_refresh_with_message(do_lang_tempcode('W_MADE_ITEM_AT',escape_html($name)));\n}",
"public function getAuctionsItems($data)\n \n {\n\n self::getConnection();\n \t\tif ($data['auctiontitle'])\n\t\t{\n\n\t\t$qry=\"select AI.id,AI.title,MP.domain,AIP.name,AIP.id as image_id,AI.description,TIMESTAMPDIFF(SECOND,NOW(),OA.end_date) AS RemainingTime,(select amount from bids where auction_item_id=AI.id order by time desc limit 0,1 ) AS current_bid,OA.auction_name from auction_items as AI inner join online_auctions as OA on AI.`online_auction_id`=OA.`id` \n\t\tinner join merchant_portals as MP on AI.merchant_id =MP.merchant_id left join auction_item_photos as AIP on AIP.auction_item_id=AI.id where AI.title LIKE '%\".$data['auctiontitle'].\"%'\";\n\n\t\t}\n\t\t\n\t\telse if($data['onlineauctionid'])\n\t\t{\n\t\t$qry=\"select AI.id,AIP.id as image_id, AIP.name,AI.title,MP.domain,AI.description, TIMESTAMPDIFF(SECOND,NOW(),OA.end_date) AS RemainingTime,OA.auction_name,(select amount from bids where auction_item_id=AI.id order by time desc limit 0,1 ) AS current_bid \n\t\tfrom auction_items as AI inner join online_auctions as OA on AI.`online_auction_id`=OA.`id` inner join merchant_portals as MP on AI.merchant_id =MP.merchant_id left join auction_item_photos as AIP on AIP.auction_item_id=AI.id \n\t\twhere AI.`online_auction_id`='\".$data['onlineauctionid'].\"'\";\n\t\t \n\t\t}\n\t \n\t \telse if($data['onlineauctionidetails'])\n\t\t{\n\n\t\t$qry=\"select AI.*,(select amount from bids where auction_item_id=AI.id order by time desc limit 0,1 ) AS current_bid ,AI.id,OA.auction_name,AIP.id as image_id ,MP.domain,AIP.name from auction_items as AI inner join online_auctions as OA on AI.`online_auction_id`=OA.`id`inner join merchant_portals as MP on MP.merchant_id=AI.merchant_id\n\t\tleft join auction_item_photos as AIP on AIP.auction_item_id=AI.id where AI.`online_auction_id`='\".$data['onlineauctionidetails'].\"'\";\t\n\t \n\t\t}\n\t\telse if ($data['auctionitemdetails'])\n\t {\n\t $qry=\"select AIP.name,AI.id,AIP.id as image_id, AI.* ,MP.domain from merchant_portals as MP inner join auction_items as AI on AI.merchant_id=MP.merchant_id \n\t left join auction_item_photos as AIP on AIP.auction_item_id=AI.id where AI.id ='\". $data['auctionitemdetails'].\"'\";\n\t }\n \t\tself::$dbo->doQuery($qry);\n\t\t$result = self::$dbo->getResultSet();\n\t\treturn $result;\n \n }",
"public function suckIntoBackoffice() {\n /**\n * Adv manager's side\n */\n $this->_suckBannersIntoBackoffice();\n $this->_suckAdvsIntoBackoffice();\n $this->_suckCampaignsIntoBackoffice();\n $this->_suckProjectsIntoBackoffice();\n $this->_suckAdvGroupsIntoBackoffice();\n /**\n * Webmaster's side\n */\n $this->_suckWebsitesIntoBackoffice();\n }",
"function evo_abovesinglebottom() {\r\n\t\tdo_action('evo_abovesinglebottom');\r\n\t}",
"public function __construct() {\n\t\t\tadd_action( 'bkap_display_updated_addon_price', array( &$this, 'special_booking_display_updated_price' ), 2, 3 );\n\t\t\t\t\n\t\t\t// Display the price div if different prices are enabled for time slots\n\t\t\tadd_action( 'bkap_display_price_div', array( &$this, 'special_booking_price_div' ), 21, 1 );\n\t\t\t\t\n\t\t\t// Display the multiple days specia booking price on the product page\n\t\t\tadd_action( 'bkap_display_multiple_day_updated_price', array( &$this, 'bkap_special_booking_show_multiple_updated_price' ), 7, 8 );\n }",
"public function broadcastWhen()\n {\n return ($this->bid->auction->auction_type == AUCTION_TYPE_HIGHEST_BIDDER);\n }"
] | [
"0.57570153",
"0.5644066",
"0.55236226",
"0.54697394",
"0.54091626",
"0.5357171",
"0.53226143",
"0.53193676",
"0.5301039",
"0.5258179",
"0.5258179",
"0.52254486",
"0.516331",
"0.5148612",
"0.51359487",
"0.513208",
"0.513208",
"0.5123629",
"0.51183647",
"0.50648123",
"0.5058608",
"0.5058104",
"0.50465083",
"0.5020187",
"0.5004255",
"0.5001582",
"0.49781996",
"0.4974507",
"0.497146",
"0.49698517"
] | 0.6236746 | 0 |
Notify Seller (Site Admin/Owner) that Auction Auction has Expired. | public function notifySeller($auction, $options = array()){
$seller = $this->Auction->Seller->find('first', array('conditions' => array('Seller.id' => $auction['Auction']['seller_id'])));
$this->__sendMail($seller['Seller']['email'], 'Webpages.Auctioneer Expired Auction', $auction);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getExpiringSoon();",
"public function ExpireSurveys() \r\n\t{\r\n\t\t$sql = \"update redcap_surveys set survey_enabled = 0, survey_expiration = null where survey_enabled = 1 \r\n\t\t\t\tand survey_expiration is not null and survey_expiration <= '\" . date('Y-m-d H:i') . \"'\";\r\n\t\t$q = db_query($sql);\r\n\t\t$numSurveysExpired = db_affected_rows();\r\n\t\tdb_free_result($q);\r\n\t\t// Set cron job message\r\n\t\tif ($numSurveysExpired > 0) {\r\n\t\t\t$GLOBALS['redcapCronJobReturnMsg'] = \"$numSurveysExpired surveys were expired\";\r\n\t\t}\r\n\t}",
"public function renewExpirationTime();",
"function checkExpiring()\r\n {\r\n $config = Tienda::getInstance();\r\n \r\n // select all subs that expire in x days (where expires > today + x & expires < today + x + 1)\r\n $subscriptions_expiring_notice_days = $config->get( 'subscriptions_expiring_notice_days', '14' );\r\n $subscriptions_expiring_notice_days_end = $subscriptions_expiring_notice_days + '1';\r\n $date = JFactory::getDate();\r\n $today = $date->toFormat( \"%Y-%m-%d 00:00:00\" );\r\n \r\n $database = JFactory::getDBO();\r\n $query = \" SELECT DATE_ADD('\".$today.\"', INTERVAL %s DAY) \";\r\n $database->setQuery( sprintf($query, $subscriptions_expiring_notice_days ) );\r\n $start_date = $database->loadResult();\r\n\r\n $database->setQuery( sprintf($query, $subscriptions_expiring_notice_days_end ) );\r\n $end_date = $database->loadResult();\r\n \r\n // select all subs that expire between those dates\r\n JModel::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/models' );\r\n $model = JModel::getInstance( 'Subscriptions', 'TiendaModel' );\r\n $model->setState(\"filter_datetype\", 'expires' );\r\n $model->setState(\"filter_date_from\", $start_date );\r\n $model->setState(\"filter_date_to\", $end_date );\r\n $model->setState(\"filter_enabled\", '1' );\r\n if ($list = $model->getList())\r\n {\r\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\r\n $helper = TiendaHelperBase::getInstance('Email');\r\n foreach ($list as $item)\r\n {\r\n // Send expiring email for $item\r\n $helper->sendEmailNotices($item, 'subscription_expiring');\r\n }\r\n }\r\n \r\n if ($list = $model->getListByIssues( $subscriptions_expiring_notice_days ) )\r\n {\r\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\r\n $helper = TiendaHelperBase::getInstance('Email');\r\n foreach ($list as $item)\r\n {\r\n // Send expiring email for $item\r\n $helper->sendEmailNotices($item, 'subscription_expiring');\r\n }\r\n }\r\n }",
"public function removeExpiredSaleitems()\n {\n\n $current_time = Carbon::now();\n $expiry_date = $current_time->subDays(10);\n\n $expired_saleitems = DB::Table('saleitems')\n ->select('*')\n ->where('matched', '=', 'false')\n ->where('created_at', '<', $expiry_date);\n\n $saleitems_to_email = $expired_saleitems->get();\n\n foreach ($saleitems_to_email as $expired_saleitem)\n {\n\n //SEND EMAIL TO WARN SELLER\n $emailAddress = $expired_saleitem->seller_paypal_email;\n $data =\n [\n 'id' => $expired_saleitem->id,\n 'description' => $expired_saleitem->description,\n 'image_type' => $expired_saleitem->image_type,\n 'image_path' => Config::get('saleitems.filepath'),\n\n ];\n\n $job = (new SendMail($emailAddress, 'expired', $data));\n $this->dispatch($job);\n }\n\n $expired_saleitems->delete();\n\n return true;\n\n\n }",
"public function refreshExpireTime(): void;",
"function checkExpired()\r\n {\r\n $date = JFactory::getDate();\r\n $today = $date->toFormat( \"%Y-%m-%d 00:00:00\" );\r\n \r\n // select all subs that have expired but still have status = '1';\r\n JModel::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/models' );\r\n $model = JModel::getInstance( 'Subscriptions', 'TiendaModel' ); \r\n $model->setState(\"filter_datetype\", 'expires' );\r\n $model->setState(\"filter_date_to\", $today );\r\n $model->setState(\"filter_enabled\", '1' );\r\n if ($list = $model->getList())\r\n {\r\n foreach ($list as $item)\r\n {\r\n $this->setExpired( $item->subscription_id, $item );\r\n }\r\n }\r\n\r\n if ($list = $model->getListByIssues() )\r\n {\r\n foreach ($list as $item)\r\n {\r\n $this->setExpired( $item->subscription_id, $item, true );\r\n }\r\n }\r\n \r\n // Update config to say this has been done\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n $config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n $config->load( array( 'config_name'=>'subscriptions_last_checked') );\r\n $config->config_name = 'subscriptions_last_checked';\r\n $config->value = $today;\r\n $config->save();\r\n \r\n // TODO send summary email to admins\r\n }",
"public function updateExpired()\n {\n\n //if($this->delivery_status_id < 3)\n //foreach($deliveries as $delivery)\n //{\n if (strtotime('- 1 day') > strtotime($this->date))\n {\n $this->delivery_status_id = 5;\n $this->save();\n\n foreach($this->drops as $drop)\n {\n if ($drop->drop_status_id < 3)\n {\n $drop->drop_status_id = 5;\n $drop->save();\n }\n }\n }\n //}\n }",
"public static function remove_expired() {\r\n\t\t$impl = self::get_implementation();\r\n\t\t$impl->remove_expired();\r\n\t}",
"public static function email_users_with_expiring_cards() {\n\n\t\tglobal $wpdb;\n\t\t$prefix = $wpdb->prefix;\n\n\t\t$users = $wpdb->get_results(\"SELECT u.ID, u.user_email, m.meta_value FROM ${prefix}usermeta m, ${prefix}users u WHERE u.ID=m.user_ID AND m.meta_key='card_expiry'\");\n\n\t\t$options = get_site_option('artsite_signup_options');\n\t\t$url = (!empty($options['card_change_url'])) ? $options['card_change_url'] : home_url();\n\n\t\tforeach ($users as $user) {\n\t\t\t$days_away = self::days_to_expiry($user->meta_value);\n\t\t\t// Are we 1, 14 or 28 days away? (i.e. within those days)\n\t\t\tif (1 == $days_away || 14 == $days_away || 28 == $days_away) {\n\t\t\t\t$email_user = $user->user_email;\n\t\t\t\t// Check transient - they may already have been emailed today\n\t\t\t\t// Transient names are limited to 45 characters length - emails are not\n\t\t\t\t$ehash = 'as_emld_'.$days_away.'_'.md5($email_user);\n\t\t\t\t$emailed = get_site_transient($ehash);\n\t\t\t\tif ('done' != $emailed) {\n\t\t\t\t\t// Set for a day - by which time the check will no longer match\n\t\t\t\t\tset_site_transient($ehash, 'done', 86400);\n\t\t\t\t\t// Send the actual email\n\t\t\t\t\t$days = ($days_away == 1) ? 'day' : 'days';\n\t\t\t\t\twp_mail($email_user, 'Your card is about to expire', \"The card on your account will expire in $days_away $days time.\\r\\n\\r\\nPlease visit $url to update it in order to ensure continued access.\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n\t}",
"public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }",
"function pgItem_expire_agent(){\n\tpgItem_expire_agent_free_to_die(); // az free_ads_duration_limit moshakhas mishe\n\n}",
"public function removeExpired();",
"public function removeExpired();",
"public function getForwardersExpiredDue();",
"public function expire($exiry);",
"public function testSubscriptionExpired()\n {\n $faker = Faker::create();\n $password = $faker->password;\n\n $user = factory(CalculatieTool\\Models\\User::class)->create([\n 'expiration_date' => date('Y-m-d', strtotime(\"-1 days\", time())),\n 'secret' => Hash::make($password)\n ]);\n\n $this->visit('/')\n ->type($user->username, 'username')\n ->type($password, 'secret')\n ->press('Login')\n ->seePageIs('/account')\n ->see('Account is gedeactiveerd, maak betaling.');\n }",
"public function findForwardersExpiredDue();",
"public function getExpired();",
"public static function email_unpaid_users() {\n\n\t\tglobal $wpdb;\n\n\t\t$users = $wpdb->get_results(\"SELECT u.ID, u.user_email, m.meta_value FROM $wpdb->usermeta m, $wpdb->users u WHERE u.ID=m.user_ID AND m.meta_key='paid_until'\");\n\n\t\t$nowtime = time();\n\n\t\t$options = get_site_option('artsite_signup_options');\n\t\t$url = (!empty($options['card_change_url'])) ? $options['card_change_url'] : home_url();\n\n\t\tforeach ($users as $user) {\n\n\t\t\t$paid_until = $user->meta_value;\n\n\t\t\t$days_overdue = floor(($nowtime-$paid_until)/86400);\n\n\t\t\t// Nag them if they are 0, 7 or 14 days overdue\n\t\t\tif ($days_overdue == 0 || $days_overdue == 7 || $days_overdue == 14 || $days_overdue==-150) {\n\n\t\t\t\t$email = $user->user_email;\n\n\t\t\t\t$days = ($days_overdue == 1) ? 'day' : 'days';\n\n\t\t\t\t$overdue_descrip = ($days_overdue == 0) ? \"today\" : \"$days_overdue $days ago\";\n\n\t\t\t\t$ehash = md5($email); // Transient names must be a maximum of 45 characters long\n\t\t\t\t$user_nag_transient = get_site_transient(\"as_odnag_\".$ehash);\n\t\t\t\tif ($user_nag_transient == 'naggedtoday') continue;\n\n\t\t\t\twp_mail($email, 'Your account is now overdue', \"Your account is now overdue ($overdue_descrip); our previous attempts to charge your card failed, and you have not supplied us with a working card number in the mean-while.\\r\\n\\r\\nPlease visit $url to update your card in order to ensure continued service.\\r\\n\");\n\n\t\t\t\tset_transient(\"as_odnag_\".$ehash, 'naggedtoday', 86399);\n\n\t\t\t}\n\n\t\t}\n\n\t}",
"public function auction_close_mail()\n\t{\n\t\t$this_details = $this->home->get_auction_alert_details(2);\n\t\tforeach($this_details as $alert) {\n\t\t\tif($alert->mail_alert==2){ // First mail alert\n\t\t\t\t$time_diff = time()-$alert->end_time;\n\t\t\t\t\t$day_alert1 = AUCTION_ALERT_DAY + 1 ; \n\t\t\t $days2 = $day_alert1*24*3600; //alert mail for reset the auction \n\t\t\t\t\n\t\t\t\t\t\tif(file_exists(DOCROOT.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png')) {\n\t\t\t\t\t\t\t\t$image = PATH.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$image = PATH.\"themes/\".THEME_NAME.\"/images/noimage_deals_details.png\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t$end_time = $alert->end_time+(AUCTION_ALERT_DAY*24*60*60);\n\t\t\t\t\t\t$fromEmail = NOREPLY_EMAIL;\n\t\t\t\t\t\t$to = $alert->email;\n\t\t\t\t\t\t$subject = $this->Lang['OR_B_CANCEL'];\n\t\t\t\t\t\t$close_message = \"<p style='color:red;'>\".$this->Lang['CAN_O_NOTICE'].\"<p/><p style='color:red;'>Sorry, \".$alert->firstname.\"!</p><p style='color:red;'>\".$this->Lang['ORDR_CLED'].\"</p><p><img border='0' src='$image' height='160px' width='160px'/></p><p>\".$this->Lang['AUC_TIT'].\" : $alert->auction_title</p>\"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->name = ucfirst($alert->firstname);\n\t\t\t\t\t\t$this->merchant_message = $close_message;\n\t\t\t\t\t\t$closemessage = new View(\"themes/\".THEME_NAME.\"/merchant_signup_mail_template\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(EMAIL_TYPE==2) { \n\t\t\t\t\t\t\temail::smtp($fromEmail,$to,$subject,$closemessage); \n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\temail::sendgrid($fromEmail,$to,$subject,$closemessage);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail_alert = $this->home->update_third_mail_alert($alert->bid_id,$alert->auction_id); \n\t\t\t\t\n\t\t\t} \n\t\t} \n\t}",
"public function Expired(){\n\t\tif(strtotime($this->EndDate) < time())\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public function message()\n {\n return 'Time may have expired.';\n }",
"public function getExpiration();",
"protected function _expireAjax()\n {\n if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {\n $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');\n exit;\n }\n }",
"protected function _expireAjax()\n {\n if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {\n $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');\n exit;\n }\n }",
"public static function send_expired( Relationship $rel ) {\n\n\t\t$to = $rel->get_member()->wp_user;\n\t\t$manager = Factory::make( 'itegms-expired' );\n\t\t$message = Settings::get( 'expired' );\n\t\t$subject = sprintf( __( 'Your access to %1$s has expired.', 'LION' ),\n\t\t\t$rel->get_purchase()->get_membership()->post_title );\n\n\t\t/**\n\t\t * Filter the subject line of the expired notification.\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t * @param string $subject\n\t\t * @param Relationship $rel\n\t\t */\n\t\t$subject = apply_filters( 'itegms_expired_notification_subject', $subject, $rel );\n\n\t\t/**\n\t\t * Filter the message of the expired notification.\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t * @param string $message\n\t\t * @param Relationship $rel\n\t\t */\n\t\t$message = apply_filters( 'itegms_expired_notification_message', $message, $rel );\n\n\t\t$notification = new Notification( $to, $manager, $message, $subject );\n\n\t\t$notification->add_data_source( $rel );;\n\n\t\t$notification->set_strategy( new iThemes_Exchange() );\n\t\t$notification->send();\n\t}",
"function end_bidding($curr_oid, $check_quotes) {\n global $MIN_BIDS;\n global $wpdb;\n $curtime_mysql = current_time('mysql'); //current time in the mysql format in the server's time zone (EST)\n $wpdb->update('orders', array('order_phase' => \"Bids Received - Awaiting Customer Decision\", 'bids_received_date' => $curtime_mysql), array('oid' => \"$curr_oid\")); //update the order status\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid advanced to Bids Received\")); //log the event\n $related_quotes = $wpdb->get_results(\"SELECT * FROM quotes WHERE oid = '$curr_oid'\", ARRAY_A); //check the related quotes if they need to end\n if($check_quotes) { //if we need to cycle through the quotes to check for expired bids\n foreach($related_quotes as $openq) { //loop through all related quotes\n if ($openq['quote_status'] = 'No Response') { //if a related quote has not yet been responded to, it needs to expire\n $curr_qid = $openq['qid'];\n $wpdb->update('quotes', array('quote_status' => \"Quote Expired\"), array('qid' => \"$curr_qid\")); //update the quote status to show expired\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Quote Expired', 'log_entry' => \"Quote $curr_qid Expired\")); //log the event\n }\n }\n }\n //Send email to customer letting them know the quoting period is complete\n $order_row = $wpdb->get_row(\"SELECT * FROM orders WHERE oid = '$curr_oid'\", ARRAY_A); //get all of the order details\n $cid = $order_row['cid']; //find the customer id related to the order\n $order_name = $order_row['order_name'];\n $num_bids = $order_row['num_quotes_received'];\n $atp_due = $order_row['atp_due'];\n $atp_due = date(\"m/d/Y\", strtotime($atp_due)); //reformat date to mm/dd/yyyy format for email\n $cust_row = $wpdb->get_row(\"SELECT * FROM cust_info WHERE cid = '$cid'\", ARRAY_A); //get all of the customer contact details\n\n $email1 = $cust_row['contact_email'];\n $email2 = $cust_row['alt_email'];\n $email_array = array($email1);\n if ($email2 != NULL) {\n $email_array[] = $email2;\n }\n $headers[] = 'From: Merafab Notify <[email protected]>';\n $msg;\n if ($num_bids == 0) { //if no bids were received\n $wpdb->update('orders', array('order_phase' => \"Order Cancelled - No Bids Received\"), array('oid' => \"$curr_oid\")); //update the order status to show cancelled\n $wpdb->insert('logs', array('user_type' => 'system', 'log_type' => 'Order Phase Advanced', 'log_entry' => \"Order $curr_oid cancelled - 0 bids received\")); //log the event\n $msg = \"We are sorry to inform you that your order did not receive any bids. Please review vendor comments for any improvement suggestions.\";\n } else { //otherwise bids were received\n $msg = \"All quote responses have been received for Order $order_name (Order Number $curr_oid).\n You have until $atp_due to make a selection before the quotes expire. Log in now!\";\n }\n wp_mail($email_array, \"Bidding Complete!\", $msg, $headers);\n}",
"public static function expiredReminder($mobiles = array(), $reason = '') {\n return self::send($mobiles, $reason);\n }",
"public function expireDisplayedNotifications();"
] | [
"0.6377388",
"0.6255768",
"0.62280524",
"0.61248446",
"0.6084492",
"0.60357857",
"0.6032582",
"0.594731",
"0.5933421",
"0.5916558",
"0.59115666",
"0.5907069",
"0.588662",
"0.588662",
"0.58665675",
"0.5850101",
"0.5845901",
"0.58130485",
"0.57873344",
"0.57784706",
"0.5767435",
"0.5765998",
"0.575442",
"0.5739864",
"0.57290363",
"0.57290363",
"0.5728805",
"0.5712265",
"0.567964",
"0.5677422"
] | 0.71229386 | 0 |
begin of BS row block | function rowbegin($col=""){
if ($col!="") {
//$html='<div class="row" col-xs-'.$col.' col-sm-'.$col.'">';
$html='<div class="row">'; //col is only for fields inside
} else $html='<div class="row">';
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function startRow(): int\n {\n return 2;\n }",
"public function startRow(): int \n {\n return 2;\n }",
"protected function get_first_row(){}",
"function getStartRow() {\r\n return $this->startRow;\r\n }",
"public function setIteratorFirstRow () {}",
"function NewRow()\n {\n if(count($this->Table)==0)\n {\n $this->xpointer=0;\n $this->ypointer=0;\n }\n else \n {\n $this->xpointer=0;\n $this->ypointer++;\n }\n }",
"public function startRow()\n {\n if ($this->rowStarted) {\n throw new LogicException('Row already started.');\n }\n\n $this->rowStarted = true;\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 4 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Se pone para que depues de insertar una pagina establezca la posicion en X = 5\n $this->SetX(5);\n\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n\n //Draw the border\n //$this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 4, $data[$i], 'B', $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function table_row_open($row, $data, $class=\"\") \n {\n printf(\" <tr class='table_cell' >\\n\");\n }",
"function rowend(){\r\n return '</div>';\r\n }",
"function readRow(){\r\n \r\n }",
"function Row($data){\n \t\t$nb=0;\n\t \tfor($i=0;$i<count($data);$i++)\n \t \t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n \t\t$h=5*$nb;\n \t\t//Issue a page break first if needed\n \t\t$this->CheckPageBreak($h);\n \t\t//Draw the cells of the row\n \t\tfor($i=0;$i<count($data);$i++){\n \t\t$w=$this->widths[$i];\n \t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n \t\t//Save the current position\n \t\t$x=$this->GetX();\n \t\t$y=$this->GetY();\n \t\t//Draw the border\n \t\t$this->Rect($x,$y,$w,$h);\n \t\t//Print the text\n \t\t$this->MultiCell($w,5,$data[$i],0,$a);\n \t\t//Put the position to the right of the cell\n \t\t$this->SetXY($x+$w,$y);\n \t\t}\n \t\t//Go to the next line\n \t\t$this->Ln($h);\n\t\t}",
"public function DivRowTable() {\r\n print(\"<div style='display:table-row; '>\");\r\n }",
"public function rewind()\r\n {\r\n // first row is zero, not one!\r\n $this->currentRow = 0;\r\n }",
"function Row($data)\n\t\t\t{\n\t\t\t $nb=0;\n\t\t\t for($i=0;$i<count($data);$i++)\n\t\t\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t $h=6*$nb;\n\t\t\t //Issue a page break first if needed\n\t\t\t $this->CheckPageBreak($h);\n\t\t\t //Draw the cells of the row\n\t\t\t for($i=0;$i<count($data);$i++)\n\t\t\t {\n\t\t\t $w=$this->widths[$i];\n\t\t\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n\t\t\t //Save the current position\n\t\t\t $x=$this->GetX();\n\t\t\t $y=$this->GetY();\n\t\t\t //Draw the border\n\t\t\t $this->Rect($x,$y,$w,$h, \"FD\");\n\t\t\t //Print the text\n\t\t\t $this->MultiCell($w,6,$data[$i],0,$a);\n\t\t\t //Put the position to the right of the cell\n\t\t\t $this->SetXY($x+$w,$y);\n\t\t\t }\n\t\t\t //Go to the next line\n\t\t\t $this->Ln($h);\n\t\t\t}",
"function Row($data)\n {\n $nb = 0;\n $i = 0;\n // var_dump($data);\n // die();\n foreach ($data as $data_line) {\n $nb = max($nb, $this->NbLines($this->widths[$i], $data_line));\n $i++;\n }\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n $i = 0;\n foreach ($data as $data_line) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data_line, 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n $i++;\n }\n //Go to the next line\n $this->Ln($h);\n }",
"protected function tableHead($row) \n\t{ \n\t\tif ($this->isGrouping) \n\t\t{\n\t\t\t$this->groupStr = $this->getGroupStr($this->order_by, $row);\n\t\t\techo '<i>'.$this->groupStr.'</i>';\n\t\t}\n\t?> \n<table>\n <thead>\n <tr>\n <th width=\"20\">#</th>\n <?php $this->doTableHeader(); /* call abstract */ ?>\n </tr>\n </thead>\n <tbody>\t\n\t<?php }",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=4*$nb;\n//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';\n\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t//Print the text\n\t\t\t$this->MultiCell($w,4,$data[$i],0,$a);\n\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data)\r\n{\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n $h=5*$nb;\r\n //Issue a page break first if needed\r\n $this->CheckPageBreak($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n $this->Rect($x,$y,$w,$h);\r\n //Print the text\r\n $this->MultiCell($w,5,$data[$i],0,$a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w,$y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n}",
"function AddRow() {\n return++$this->row_count;\n }",
"function Row($data)\r\n {\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb, $this->NbLines($this->widths[$i], $data[$i]));\r\n $h=5*$nb;\r\n //Issue a page break first if needed\r\n $this->CheckPageBreak($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n $this->Rect($x, $y, $w, $h);\r\n //Print the text\r\n $this->MultiCell($w, 5, $data[$i], 0, $a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w, $y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n }",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';//ALINHAMENTO\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);//ALTURA DA LINHA\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data) {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data) {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data) {\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=5*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t\t\t//Draw the border\n\t\t\t\n\t\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=5*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data)\r\n{\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n $h=0.7*$nb;\r\n //Issue a page break first if needed\r\n // $this->CheckPageBreak($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $f=$this->fills[$i];\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n if($f) {$this->Rect($x,$y,$w,$h,'F');} // If we want a border uncomment this line\r\n //Print the text\r\n $this->MultiCell($w,0.7,$data[$i],0,$a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w,$y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n}",
"public function next()\n\t\t{\n\t\t\t$this -> Index++;\n\n\t\t\t$this -> CurrentRow = array();\n\n\t\t\tif (!$this -> TableOpen)\n\t\t\t{\n\t\t\t\t$TableCounter = 0;\n\t\t\t\t$SkipRead = false;\n\n\t\t\t\twhile ($this -> Valid = ($SkipRead || $this -> Content -> read()))\n\t\t\t\t{\n\t\t\t\t\tif ($SkipRead)\n\t\t\t\t\t{\n\t\t\t\t\t\t$SkipRead = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this -> Content -> name == 'table:table' && $this -> Content -> nodeType != XMLReader::END_ELEMENT)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($TableCounter == $this -> CurrentSheet)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this -> TableOpen = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$TableCounter++;\n\t\t\t\t\t\t$this -> Content -> next();\n\t\t\t\t\t\t$SkipRead = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this -> TableOpen && !$this -> RowOpen)\n\t\t\t{\n\t\t\t\twhile ($this -> Valid = $this -> Content -> read())\n\t\t\t\t{\n\t\t\t\t\tswitch ($this -> Content -> name)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'table:table':\n\t\t\t\t\t\t\t$this -> TableOpen = false;\n\t\t\t\t\t\t\t$this -> Content -> next('office:document-content');\n\t\t\t\t\t\t\t$this -> Valid = false;\n\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\tcase 'table:table-row':\n\t\t\t\t\t\t\tif ($this -> Content -> nodeType != XMLReader::END_ELEMENT)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this -> RowOpen = true;\n\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this -> RowOpen)\n\t\t\t{\n\t\t\t\t$LastCellContent = '';\n\n\t\t\t\twhile ($this -> Valid = $this -> Content -> read())\n\t\t\t\t{\n\t\t\t\t\tswitch ($this -> Content -> name)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'table:table-cell':\n\t\t\t\t\t\t\tif ($this -> Content -> nodeType == XMLReader::END_ELEMENT || $this -> Content -> isEmptyElement)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($this -> Content -> nodeType == XMLReader::END_ELEMENT)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$CellValue = $LastCellContent;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif ($this -> Content -> isEmptyElement)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$LastCellContent = '';\n\t\t\t\t\t\t\t\t\t$CellValue = $LastCellContent;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$this -> CurrentRow[] = $LastCellContent;\n\n\t\t\t\t\t\t\t\tif ($this -> Content -> getAttribute('table:number-columns-repeated') !== null)\n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t$RepeatedColumnCount = $this -> Content -> getAttribute('table:number-columns-repeated');\n\t\t\t\t\t\t\t\t\t// Checking if larger than one because the value is already added to the row once before\n\t\t\t\t\t\t\t\t\tif ($RepeatedColumnCount > 1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this -> CurrentRow = array_pad($this -> CurrentRow, count($this -> CurrentRow) + $RepeatedColumnCount - 1, $LastCellContent);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$LastCellContent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'text:p':\n\t\t\t\t\t\t\tif ($this -> Content -> nodeType != XMLReader::END_ELEMENT)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$LastCellContent = $this -> Content -> readString();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'table:table-row':\n\t\t\t\t\t\t\t$this -> RowOpen = false;\n\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this -> CurrentRow;\n\t\t}"
] | [
"0.6167347",
"0.6146026",
"0.60597277",
"0.6023218",
"0.59775484",
"0.5948445",
"0.5787836",
"0.5706546",
"0.5609052",
"0.55778",
"0.557547",
"0.5524031",
"0.5523104",
"0.5504988",
"0.54970384",
"0.54760164",
"0.54604405",
"0.5447657",
"0.5440348",
"0.5437057",
"0.5431614",
"0.5424324",
"0.541944",
"0.541944",
"0.54178965",
"0.5417651",
"0.5415092",
"0.53958887",
"0.53885484",
"0.5358367"
] | 0.6173112 | 0 |
end of row block | function rowend(){
return '</div>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function closeLine() {\n echo \"</tr>\";\n }",
"public function endBlock()\n {\n Block::end();\n }",
"public function finishRow()\n {\n if (!$this->rowStarted) {\n throw new LogicException('Row was not started.');\n }\n\n $this->rowStarted = false;\n $this->addRow($this->rowElems);\n $this->rowElems = [];\n }",
"public function endTable() {\n\t\tif (!empty($this->collection)) {\n\t\t\treturn \"</table>\";\n\t\t}\t\t\n\t}",
"function endChildren() {\n echo \"</tr>\";\n }",
"public function setIteratorLastRow () {}",
"private static function closeCell() {\n echo \"</td>\";\n }",
"function endRowToNewRow(){\n return '</td></tr><tr><td>';\n}",
"private function ColumnClose()\r\n\t{\r\n\t\t$this->appendHTML( \" </div>\\n\" );\r\n\t}",
"function table_row_close($row, $class=\"\") \n {\n printf(\" </tr>\\n\");\n }",
"public function endBlock()\n {\n return Recorder::end();\n }",
"public function displayItemEnd()\n\t{\n\t}",
"function endTable() {\n echo \"</table>\";\n }",
"private function end()\n {\n }",
"public function realEnd()\r\n\t{\r\n\t\treturn parent::end();\r\n\t}",
"public function endBatch()\n\t{\n\t\t$this->endElement();\n\t}",
"public function endOfTransaction() {\n\t\tif ($this->skip()) {\n\t\t\treturn;\n\t\t}\n\t\tnewrelic_end_of_transaction();\n\t}",
"abstract public function end();",
"abstract public function end();",
"public function visitEnd()\n {\n }",
"public function getLastBlock()\n {\n }",
"public function add_rowTrClose()\n {\n return '</tr>';\n }",
"public function getEndWhileStructure() {\n\t\treturn \"}\";\t\n\t}",
"static function buildEndColumn() {\r\n\t\t\techo '</DIV>';\r\n\t\t}",
"public function endElement()\n {\n $this->buffer->endElement();\n }",
"public function end();",
"public function end();",
"public function getNextIteratorRow () {}",
"public function end()\n {\n return $this->endGroup();\n }",
"public function getEndMultiLine();"
] | [
"0.6974653",
"0.69009286",
"0.68895626",
"0.6793386",
"0.6741683",
"0.65938944",
"0.65927047",
"0.6571436",
"0.6467529",
"0.6432145",
"0.6196711",
"0.61860734",
"0.6172185",
"0.61651754",
"0.61600554",
"0.6109522",
"0.6065509",
"0.6045383",
"0.6045383",
"0.60315245",
"0.6014578",
"0.6011234",
"0.60070664",
"0.59969497",
"0.5969569",
"0.5967959",
"0.5967959",
"0.5960433",
"0.59495705",
"0.59419405"
] | 0.7908001 | 0 |
image with a link and tooltip | function imageHref($attributes=array()){
extract($attributes); //get element attributes
$html = '<a href="'.$index.'" >';
$this->image($attributes);
//$html .= '<img src="' .$GLOBALS["application.imgsrc"].$file. '" alt="'.$file.'"' .$option. ' /> </a>';
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function image_link(string $image, string $title, string $url, bool $showTitle = false, array $attributes = []) : string\n{\n return HTML::imageLink($image, $title, $url, $showTitle, $attributes);\n}",
"function tooltip_button( $name, $width=300 ) {\n return '<img '\n . ' src=\"' . SERVER_NAME . IMAGES . 'oculu/question.png' . '\"'\n . ' onmouseover=\"tooltip.show( this, \\'' . $name . '\\',' . $width . ' );\"'\n . ' onmouseout=\"tooltip.hide();\"'\n . ' />'\n ;\n}",
"function link($image,$text=\"\",$uri,$help=\"\",$helpfree=\"\",$name=\"\")\r\n {\r\n if (right::field_view($help))\r\n {\r\n $retString = \"\";\r\n if ($name) $retString .= \"<a name='anchor$name'></a>\"; // insert anchor\r\n \r\n if (right::field_edit($help)) // editable: enable edit\r\n {\r\n $retString .= \"<a href='$uri'\";\r\n \t\t if ($help or $helpfree) $retString .= help::show($help,$helpfree);\r\n $retString .= \">\";\r\n \r\n if ($image) $retString .= grafik::disp($image,$text,20);\r\n else $retString .= $text;\r\n $retString .= \"</a>\";\r\n }\r\n else\r\n {\r\n $retString .= $text;\r\n }\r\n }\r\n return ($retString);\r\n }",
"function fkimage_detail($attr, $content=null) {\r\n $url = $attr['url'];\r\n $width = isset($attr['width']) ? $attr['width'] : 500;\r\n $i = ss_image_link($url, null, $width);\r\n $img = \"<div class=\\\"ss_flickr\\\">\";\r\n $img .= $i;\r\n if ($content != null)\r\n $img .= \"<p style=\\\"width:\" . $width . \"px;\\\">\" . $content . \"</p>\";\r\n $img .= \"</div>\";\r\n return $img;\r\n}",
"function tipsimg(&$vars) {\r\n $items = $this->moduleData['id'];\r\n \r\n $html = '';\r\n $values = array();\r\n \r\n $i=1;\r\n foreach($items as $item) {\r\n $filename = explode('.', preg_replace('#[\\'\"\\(\\)]+#', '', $item['file']));\r\n if(count($filename) > 1) {\r\n array_pop($filename);\r\n }\r\n $filename = implode('.', $filename).'.png';\r\n $filepath = FONTS_PATH.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.$filename;\r\n //var_dump($filename);die();\r\n \r\n $src = RESOURCE_URL.'/generate-preview?text='.$item['name'].'&font='.$item['file'].'&type=simple';\r\n if(is_file($filepath)) {\r\n $src = TPT_FONTS_URL.'/images/'.$filename;\r\n }\r\n \r\n $values[] = '<img src=\"'.RESOURCE_URL.'/generate-preview?text='.urlencode($this->getFontName($vars, $item['file'])).'&font='.$item['file'].'&type=simple&pg_x=600&pg_y=800\" />';\r\n }\r\n \r\n $valuesDelimiter = \"\\n\";\r\n $optionsAnchorsClassSfx=' display-inline-block';\r\n \r\n $html = implode($valuesDelimiter, $values);\r\n\r\n return $html;\r\n }",
"function column_image($item) {\n return \"<a class='text-info' href='\" . $item['image'] . \"'>See image</a>\";\n }",
"function print_imglinkI($url_target, $img_target, $text_link = '', $a_opciones = '') {\r\n\r\n $str_opciones = html_output_get_opciones($a_opciones);\r\n\r\n $img_string = print_img($img_target, $text_link, array(\"border\" => \"0\", \"align\" => \"absmiddle\"));\r\n\r\n $str_link = '<a href=\"%s\" title=\"%s\" %s>%s</a>';\r\n return sprintf($str_link, $url_target, $text_link, $str_opciones, $img_string);\r\n}",
"public function imageUrl() : string \n {\n return $this->trophyInfo()->trophyTitleIconUrl ?? '';\n }",
"function CrearLinkImagen($Titulo,$Nombre,$target,$RutaImage,$javascript,$Alto,$Ancho,$MasStilos,$margenes,$VectorBim){\r\n \r\n //print(\"<a href='$target' title='$Titulo'><image name='$Nombre' id='$Nombre' src='$RutaImage' $javascript style='display:scroll; position:\".$posicion.\"; right:10px; height:\".$Alto.\"px; width: \".$Ancho.\"px;'></a>\");\r\n \r\n print('<a href=\"'.$target.'\" role=\"button\" data-toggle=\"modal\" title=\"'.$Titulo.'\" style=\"display:scroll; height:'.$Alto.'px; width: '.$Ancho.'px;'.$MasStilos.'\">\r\n\t\t\t<image src='.$RutaImage.' name='.$Nombre.' id='.$Nombre.' src='.$RutaImage.' '.$javascript.' ></a>');\r\n\t}",
"function image($url, $options = array()) {\n\t\t\t$url = $this->url_for($url);\n\t\t\t$image = \"<img src=\\\"\" . RELATIVE_ROOT . \"images/$url\\\" />\";\n\t\t\tif (!empty($options['in_anchor'])) {\n\t\t\t\treturn $image;\n\t\t\t} else {\n\t\t\t\techo $image;\n\t\t\t}\n\t\t}",
"function link_to_feed($name, $uri)\r\n{\r\n return link_to(image_tag('feed.gif', array('alt' => $name, 'title' => $name)), $uri);\r\n}",
"function link_to_magnolia($url, $title=null, $imgtitle='Add to ma.gnolia')\n{\n $title = urlencode($title);\n $url = urlencode($url);\n\n return link_to(image_tag('magnolia.gif','title='.$imgtitle), 'http://ma.gnolia.com/bookmarklet/add?url='.$url.'&title='.$title);\n}",
"function toolicon ($name, $i, $url = \"table.php\", $xtra = \"\", $attribs=array(), $showText = false) {\n global $imagetheme, $location, $avelsievetools;\n \n $desc = $avelsievetools[$name]['desc'];\n $img = $avelsievetools[$name]['img'];\n\n $out = ' <a href=\"'.$url.'?rule='.$i.'&'.$name.'='.$i.\n (!empty($xtra) ? '&'.$xtra : '') .\n '\" rel=\"nofollow\"';\n \n if(sizeof($attribs) > 0) {\n foreach($attribs as $key=>$val) {\n $out .= ' '.$key.'=\"'.$val.'\"';\n }\n }\n $out .= '>';\n \n if($this->useimages) {\n $out .= '<img title=\"'.$desc.'\" src=\"'.$location.'/images/'.$imagetheme.\n '/'.$img.'\" alt=\"'.$desc.'\" border=\"0\" />';\n if($showText) {\n $out .= ' '.$desc;\n }\n } else {\n $out .= $desc;\n }\n\n $out .= '</a>';\n return $out;\n }",
"function print_imglink($url_target, $img_target, $text_link = '', $a_opciones = '') {\r\n\r\n $str_opciones = html_output_get_opciones($a_opciones);\r\n\r\n $img_string = print_img($img_target, $text_link, array(\"border\" => \"0\", \"align\" => \"absmiddle\"));\r\n\r\n $str_link = '<a href=\"%s\" %s >%s%s</a>';\r\n return sprintf($str_link, $url_target, $str_opciones, $img_string, $text_link);\r\n}",
"function link_to_technorati($url, $imgtitle='Add to Technorati')\n{\n $url = urlencode($url);\n\n return link_to(image_tag('technorati.gif','title='.$imgtitle), 'http://technorati.com/faves/?add='.$url);\n}",
"function link_to_yigg($url, $imgtitle='Add to Yigg')\n{\n $url = urlencode($url);\n\n return link_to(image_tag('yigg.gif','title='.$imgtitle), 'http://yigg.de/neu?exturl='.$url);\n}",
"function picture($id = null) {\n\t\tif (!empty($this->params['named']['small'])) {\n\t\t\t$this->layout = 'tooltip'; \n\t\t}\n\t\t$this->set('person', $this->Person->read(null, $id));\n\t}",
"public function getTag()\n {\n $image = '<img src=\"' . $this->get() . '\" border=0 width=\"' . $this->size . '\" alt=\"'.sprintf(L_CLICK,L_LINKS_19).'\" />';\n return $image;\n }",
"function classymissy_adminpanel_tooltip($tooltip) {\n\t$output = \"<div class='bpanel-option-help'>\\n\";\n\t$output .= \"<a href='' title=''> <img src='\" . CLASSYMISSY_THEME_URI . \"/framework/theme-options/images/help.png' alt='' title='' /> </a>\\n\";\n\t$output .= \"\\r<div class='bpanel-option-help-tooltip'>\\n\";\n\t$output .= $tooltip;\n\t$output .= \"\\r</div>\\n\";\n\t$output .= \"</div>\\n\";\n\techo ($output);\n}",
"function tempera_thumbnail_link( $html, $post_id, $post_image_id ) {\n $html = '<a href=\"' . get_permalink( $post_id ) . '\" title=\"' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '\" alt=\"' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '\">' . $html . '</a>';\n return $html;\n}",
"function image_link($path_action, $path_img, $text, $is_visible, $item, $color = '', $width = 0, $height = 0, $border = 0)\r\n {\r\n \t$course_id = $this->getViewVariable('courseId');\r\n\t\t$table = html_table(\"100%\",0,1,0,\"left\");\r\n\t\tif($color != ''){\r\n\t\t\t$table->set_tag_attribute('bgcolor',$color);\r\n\t\t}\r\n \t$row = html_tr();\r\n \t$row->set_tag_attribute(\"align\",\"center\");\r\n \t$col = html_td(\"\",\"left\");\r\n \t$col->set_tag_attribute(\"width\",\"20%\");\r\n \t$elem = html_a($path_action,\"\");\r\n $elem->add(html_img($path_img, $width, $height, $border));\r\n $col->add($elem);\r\n $row->add($col);\r\n $col = html_td(\"\",\"left\");\r\n \t$col->set_tag_attribute(\"width\",\"80%\");\r\n $col->add(html_a($path_action,$text));\r\n\t\t$col->add(html_br());\r\n\t\tif($is_visible){\r\n\t\t\t//font size=\"1\" color=\"#808080\" face=\"arial, helvetica\"\r\n\t\t\t$col->add(html_a(Util::format_URLPath( 'course/index.php', 'course='.$course_id.'&item='.$item.'&act=off'),agt('Ocultar')));\r\n\t\t} else {\r\n\t\t\t$col->add(html_a(Util::format_URLPath( 'course/index.php', 'course='.$course_id.'&item='.$item.'&act=on'),agt('Activar')));\r\n\t\t}\r\n\t\t\r\n $row->add($col);\r\n $table->add($row);\r\n \r\n return $table;\r\n }",
"function microbot_html_image_link($username, $post) {\n if (!$post['media_url_private']) return null;\n\n $is_media_link = true;\n $url = microbot_format_permalink($username, $post['ts'], $is_media_link);\n $url_escaped = htmlentities($url);\n $text_escaped = htmlentities($post['text']);\n $height_escaped = htmlentities($post['media_h']);\n $width_escaped = htmlentities($post['media_w']);\n\n return <<<EOT\n<a class=\"image\" href=\"{$url_escaped}\"><img src=\"{$url_escaped}\" alt=\"{$text_escaped}\" height=\"${height_escaped}\" width=\"{$width_escaped}\"></a>\nEOT;\n}",
"function CrearBotonImagen($Titulo,$Nombre,$target,$RutaImage,$javascript,$Alto,$Ancho,$posicion,$margenes,$VectorBim){\r\n \r\n //print(\"<a href='$target' title='$Titulo'><image name='$Nombre' id='$Nombre' src='$RutaImage' $javascript style='display:scroll; position:\".$posicion.\"; right:10px; height:\".$Alto.\"px; width: \".$Ancho.\"px;'></a>\");\r\n \r\n print('<a href=\"'.$target.'\" role=\"button\" data-toggle=\"modal\" title=\"'.$Titulo.'\" style=\"display:scroll; position:'.$posicion.'; '.$margenes.'; height:'.$Alto.'px; width: '.$Ancho.'px;\">\r\n\t\t\t<image src='.$RutaImage.' name='.$Nombre.' id='.$Nombre.' src='.$RutaImage.' '.$javascript.' ></a>');\r\n\t}",
"function build_link($link = '', $title = '', $image = '', $class = '') \n{\n\t$start_link = '<a href=\"'.$link.'\" title=\"'.$title.'\" class=\"'.$class.'\">';\n\t$img = '<img src=\"themes/cp/images/icons/small/'.$image.'.png\" alt=\"'. $title .'\" />'. $title;\n\t$end_link = '</a>';\n\treturn $start_link . $img . $end_link; \n}",
"function adminpic($name, $url = \"\", $alt = \"\") {\n if ($alt == \"\" AND $alt != null AND defined(\"_btalt_\".$name)) $alt = constant(\"_btalt_\".$name);\n\n $ret = \"<img src=\\\"modcp/pics/\".$name.\"\\\" border=\\\"0\\\" alt=\\\"\".$alt.\"\\\" title=\\\"\".$alt.\"\\\" />\";\n if ($url != \"\") {\n return \"<a href=\\\"\".$url.\"\\\">\".$ret.\"</a>\";\n }\n return $ret;\n}",
"function iconHref($index, $icon, $tooltip, $legend){\r\n $html = '<a href=\"'.$index.'\" data-toggle=\"tooltip\" title=\"'.$tooltip.'\">';\r\n $html .= '<span class=\"glyphicon glyphicon-'.$icon.'\" ></span>'. $legend . ' </a>';\r\n return $html;\r\n }",
"public function getImageHtml() {\n if (empty($this->imageSource)) {\n return '';\n }\n\n $attr = [];\n\n if (!empty($this->imageAlt)) {\n $attr['alt'] = $this->imageAlt;\n }\n\n if (!empty($this->imageCssClass)) {\n $attr['class'] = $this->imageCssClass;\n }\n\n $imgHtml = img($this->imageSource, $attr);\n\n if (!empty($this->imageUrl)) {\n $imgHtml = anchor($imgHtml, $this->imageUrl);\n }\n\n return $imgHtml;\n }",
"static private function image($type, $name, $title, $alt, $url = FALSE)\n\t{\n\t\t$img_config = self::config('images.'.$type);\n\t\t\n\t\t$attributes = array(\n\t\t\t'src'\t => str_replace(self::config('skin_inheritor_paths'), '', url::base()).$img_config['path'].str_replace(' ', '_', $name).'.'.$img_config['type'],\n\t\t\t'class'\t => $type,\n\t\t\t'width' => $img_config['width'].'px',\n\t\t\t'height' => $img_config['height'].'px',\n\t\t\t'title'\t => $title,\n\t\t\t'alt'\t => $alt,\n\t\t);\n\t\t\n\t\t$image = '<img src=\"'.$attributes['src'].'\" class=\"'.$attributes['class'].'\" width=\"'.$attributes['width'].'\" height=\"'.$attributes['height'].'\" title=\"'.$attributes['title'].'\" alt=\"'.$attributes['alt'].'\" />';\n\t\t\t\n\t\tif ($url)\n\t\t{\n\t\t\t$image = '<a href=\"'.$url.'\">'.$image.'</a>';\n\t\t}\n\t\t\t\t\n\t\treturn $image;\n\t}",
"function image_tag()\n{\n\tstatic $_defaults = array(\n\t\t'src' => ''\n\t\t, 'alt' => ''\n\t\t, 'border' => 0\n\t\t, 'allowed' => array('Common','alt','height','width','longdesc'\n\t\t\t,'src','usemap','ismap','name','align','border','hspace','vspace'\n\t\t)\n\t);\n\tstatic $_simple = array('src');\n\t$p = func_get_args();\n\t$p = parse_arguments($p, $_simple, $_defaults);\n\tif (empty($p['alt']))\n\t\t$p['alt'] = $p['src'];\n\t$attlist = get_attlist($p);\n\t$output = \"<img $attlist />\";\n\n\treturn $output;\n}",
"function wpdocs_post_image_html( $html, $post_id, $post_image_id ) {\n $html = '<a href=\"' . get_permalink( $post_id ) . '\" alt=\"' . esc_attr( get_the_title( $post_id ) ) . '\">' . $html . '</a>';\n return $html;\n}"
] | [
"0.6825227",
"0.65567744",
"0.6522313",
"0.65091413",
"0.64885306",
"0.6474993",
"0.6444737",
"0.6433021",
"0.64127624",
"0.64118886",
"0.6385237",
"0.6342489",
"0.63283086",
"0.6323832",
"0.62415636",
"0.6169082",
"0.61589175",
"0.614393",
"0.6113806",
"0.6065966",
"0.606393",
"0.6047988",
"0.6042656",
"0.6034472",
"0.6019827",
"0.60050243",
"0.6001584",
"0.5991835",
"0.5977917",
"0.59713143"
] | 0.65855086 | 1 |
icon with a link and tooltip | function iconHref($index, $icon, $tooltip, $legend){
$html = '<a href="'.$index.'" data-toggle="tooltip" title="'.$tooltip.'">';
$html .= '<span class="glyphicon glyphicon-'.$icon.'" ></span>'. $legend . ' </a>';
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function icon_link(string $icon, string $title, string $url, bool $showTitle = false, array $attributes = []) : string\n{\n return HTML::iconLink($icon, $title, $url, $showTitle, $attributes);\n}",
"public function get_icon()\n {\n return 'fa fa-link';\n }",
"function toolicon ($name, $i, $url = \"table.php\", $xtra = \"\", $attribs=array(), $showText = false) {\n global $imagetheme, $location, $avelsievetools;\n \n $desc = $avelsievetools[$name]['desc'];\n $img = $avelsievetools[$name]['img'];\n\n $out = ' <a href=\"'.$url.'?rule='.$i.'&'.$name.'='.$i.\n (!empty($xtra) ? '&'.$xtra : '') .\n '\" rel=\"nofollow\"';\n \n if(sizeof($attribs) > 0) {\n foreach($attribs as $key=>$val) {\n $out .= ' '.$key.'=\"'.$val.'\"';\n }\n }\n $out .= '>';\n \n if($this->useimages) {\n $out .= '<img title=\"'.$desc.'\" src=\"'.$location.'/images/'.$imagetheme.\n '/'.$img.'\" alt=\"'.$desc.'\" border=\"0\" />';\n if($showText) {\n $out .= ' '.$desc;\n }\n } else {\n $out .= $desc;\n }\n\n $out .= '</a>';\n return $out;\n }",
"public function icon() {\n\t\t$icon_url = MACHETE_BASE_URL . 'inc/' . $this->params['slug'] . '/icon.svg';\n\t\techo '<img src=\"' . esc_attr( $icon_url ) . '\" style=\"width: 96px; height: 96px;\">';\n\t}",
"protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }",
"protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }",
"public function urlIcon(): string;",
"function display_social_icon($site, $link, $title, $icon) {\n\tif($link) {\n\t\techo '<li>';\n\t\t\techo '<a target=\"_blank\" href=\"'.$site.$link.'\">';\n\t\t\t\techo '<i class=\"fab '.$icon.'\"></i>';\n\t\t\t\techo '<span class=\"sr\">'.$title.'</span>';\n\t\t\techo '</a>';\n\t\techo '</li>';\n\t}\n}",
"public static function getIconShow($url,$tooltip=true){\n\n $codeTooltip = \"\";\n\n if($tooltip){\n $codeTooltip = \"data-toggle='tooltip'\";\n }\n\n return \"<a href='\".$url.\"' class='mr-2' \".$codeTooltip.\" title='Ver detalle' >\n <i class='\".config('constant.icon.show.class').\" \".config('constant.icon.edit.color').\" fa-2x' ></i>\n </a>\";\n }",
"function ui_link_icon($action, $url, array $attributes = [], $disabled = false) {\n return Link::make($action, $url, $attributes, $disabled)\n ->withTooltip(true)\n ->size('xs');\n }",
"function linkIcon($the_link){\n\t$link_style=\"\";\n\t$endStr=substr($the_link,(strlen($the_link)-5), strlen($the_link));\n\t\tif(strpos($endStr,'doc')){\n\n\t\t\t$link_style=\"doc-ico\";\n\n\t\t}elseif(strpos($endStr,'pdf')){\n\t\t\t\t$link_style=\"pdf-ico\";\n\t\t\t\t\n\t\t\t}elseif(strpos($endStr,'pps')){\n\t\t\t\t$link_style=\"pps-ico\";\n\n\t\t}else{\n\t\t\t$link_style=\"web-ico\";\n\t\t}\n\treturn $link_style;\n}",
"public function toggleIcon($row, $href, $label, $title, $icon, $attributes) {\n\t\tif (strlen($this->Input->get('tid'))) {\n\t\t\t$this->toggleVisibility($this->Input->get('tid'), ($this->Input->get('state') == 1));\n\t\t\t$this->redirect($this->getReferer());\n\t\t}\n\n\t\t// Check permissions AFTER checking the tid, so hacking attempts are logged\n\t\tif (!$this->User->isAdmin && !$this->User->hasAccess('tl_marker::published', 'alexf')) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$href .= '&tid=' . $row['id'] . '&state=' . ($row['published'] ? '' : 1);\n\n\t\tif (!$row['published']) {\n\t\t\t$icon = 'invisible.gif';\n\t\t}\n\n\t\treturn '<a href=\"' . $this->addToUrl($href) . '\" title=\"' . specialchars($title) . '\"' . $attributes . '>' . $this->generateImage($icon, $label) . '</a> ';\n\t}",
"function render_link( $args ) {\n\t\t$args['tag'] = 'a';\n\t\t$tooltip_markup = $this->render( $args );\n\n\t\treturn $tooltip_markup;\n\t}",
"function icon() {\n\t\t$url = $this->plugin_url();\n\t\t$url .= '/images/transmit_blue.png';\n\t\treturn $url;\n\t}",
"public function icon($icon)\r\r\n {\r\r\n return '<span class=\"dashicons dashicons-marker ' . $icon . '\"><br/> </span>';\r\r\n }",
"function PdfIcon( $link, $use_icon=true,$modal=true ) {\n\n\t\treturn rsView::linkIcon($link,'COM_RETINASHOP_PDF','pdf_button','pdf_button_enable',$modal,$use_icon);\n\n\t}",
"function imic_tooltip($atts, $content = null) {\n extract(shortcode_atts(array(\n \"title\" => '',\n \"link\" => '#',\n \"direction\" => 'top'\n ), $atts));\n $tooltip_output = '<a href=\"' . $link . '\" rel=\"tooltip\" data-toggle=\"tooltip\" data-original-title=\"' . $title . '\" data-placement=\"' . $direction . '\">' . do_shortcode($content) . '</a>';\n return $tooltip_output;\n}",
"abstract protected function form_icon();",
"public function previewIcon($row, $href, $label, $title, $icon, $attributes)\n {\n // Check permissions AFTER checking the cid, so hacking attempts are logged\n if (!$this->User->hasAccess('tl_mailchimp_campaign::published', 'alexf'))\n {\n return '';\n }\n\n $href .= $row['campaign_id'];\n\n return '<a href=\"'.$href.'\" title=\"'.StringUtil::specialchars($title).'\"'.$attributes.'><img src=\"'.$icon.'\" height=\"16\" width=\"16\" alt=\"'.StringUtil::specialchars($label).'\"></a> ';\n }",
"public function icon ( ) { return NULL; }",
"public function get_icon()\n {\n return 'eicon-yoast';\n }",
"function acm_helper_help_link($link) {\n\techo '<a href=\"'.$link.'\" target=\"_blank\"><div class=\"dashicons dashicons-editor-help\"></div></a>';\n}",
"public function get_icon() {\n return 'astha far fa-images';\n }",
"public function getIconUrl();",
"public function icon_attr( $args ) {\n\n\t\t\t\tglobal $fusion_settings;\n\n\t\t\t\t$attr = [\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'style' => '',\n\t\t\t\t];\n\n\t\t\t\t$tooltip = ucfirst( $args['social_network'] );\n\t\t\t\tif ( 'custom_' === substr( $args['social_network'], 0, 7 ) ) {\n\t\t\t\t\t$attr['class'] .= 'custom ';\n\t\t\t\t\t$tooltip = str_replace( 'custom_', '', $args['social_network'] );\n\t\t\t\t\t$args['social_network'] = strtolower( $tooltip );\n\t\t\t\t}\n\n\t\t\t\t$attr['class'] .= 'fusion-social-network-icon fusion-tooltip fusion-' . $args['social_network'] . ' fusion-icon-' . $args['social_network'];\n\n\t\t\t\t$attr['aria-label'] = 'fusion-' . $args['social_network'];\n\n\t\t\t\t$link = $args['social_link'];\n\n\t\t\t\t$attr['target'] = ( $fusion_settings->get( 'social_icons_new' ) ) ? '_blank' : '_self';\n\n\t\t\t\tif ( '_blank' === $attr['target'] ) {\n\t\t\t\t\t$attr['rel'] = 'noopener noreferrer';\n\t\t\t\t}\n\n\t\t\t\tif ( 'mail' === $args['social_network'] ) {\n\t\t\t\t\t$link = $args['social_link'];\n\t\t\t\t\tif ( 'http' !== substr( $args['social_link'], 0, 4 ) ) {\n\t\t\t\t\t\tif ( apply_filters( 'fusion_disable_antispambot', false ) ) {\n\t\t\t\t\t\t\t$link = 'mailto:' . str_replace( 'mailto:', '', $args['social_link'] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link = 'mailto:' . antispambot( str_replace( 'mailto:', '', $args['social_link'] ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$attr['target'] = '_self';\n\t\t\t\t}\n\n\t\t\t\t$attr['href'] = $link;\n\n\t\t\t\tif ( $fusion_settings->get( 'nofollow_social_links' ) ) {\n\t\t\t\t\t$attr['rel'] = ( isset( $attr['rel'] ) ) ? $attr['rel'] . ' nofollow' : 'nofollow';\n\t\t\t\t}\n\n\t\t\t\tif ( $args['icon_color'] ) {\n\t\t\t\t\t$attr['style'] = 'color:' . $args['icon_color'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( 'yes' === $this->args['icons_boxed'] && $args['box_color'] ) {\n\t\t\t\t\t$attr['style'] .= 'background-color:' . $args['box_color'] . ';border-color:' . $args['box_color'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( 'yes' === $this->args['icons_boxed'] && $this->args['icons_boxed_radius'] || '0' === $this->args['icons_boxed_radius'] ) {\n\t\t\t\t\tif ( 'round' === $this->args['icons_boxed_radius'] ) {\n\t\t\t\t\t\t$this->args['icons_boxed_radius'] = '50%';\n\t\t\t\t\t}\n\t\t\t\t\t$attr['style'] .= 'border-radius:' . $this->args['icons_boxed_radius'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( 'none' !== strtolower( $this->args['tooltip_placement'] ) ) {\n\t\t\t\t\t$attr['data-placement'] = strtolower( $this->args['tooltip_placement'] );\n\t\t\t\t\t$tooltip = ( 'youtube' === strtolower( $tooltip ) ) ? 'YouTube' : $tooltip;\n\t\t\t\t\t$tooltip = ( 'linkedin' === strtolower( $tooltip ) ) ? 'LinkedIn' : $tooltip;\n\t\t\t\t\t$attr['data-title'] = $tooltip;\n\t\t\t\t\t$attr['data-toggle'] = 'tooltip';\n\t\t\t\t}\n\n\t\t\t\t$attr['title'] = $tooltip;\n\n\t\t\t\treturn $attr;\n\n\t\t\t}",
"function MyMod_Data_Fields_File_Decorator_Unlink_Icon($item,$data)\n {\n return $this->MyActions_Entry_Icon(\"Unlink\");\n }",
"public function toggleIcon($row, $href, $label, $title, $icon, $attributes)\n\t{\n\t\tif (strlen(Input::get('tid')))\n\t\t{\n\t\t\t$this->toggleVisibility(Input::get('tid'), (Input::get('state') == 1), (@func_get_arg(12) ?: null));\n\t\t\t$this->redirect($this->getReferer());\n\t\t}\n\n\t\t// Check permissions AFTER checking the tid, so hacking attempts are logged\n\t\tif (!$this->User->hasAccess('tl_page::published', 'alexf'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$href .= '&tid='.$row['id'].'&state='.($row['published'] ? '' : 1);\n\n\t\tif (!$row['published'])\n\t\t{\n\t\t\t$icon = 'invisible.gif';\n\t\t}\n\n\t\t$objPage = $this->Database->prepare(\"SELECT * FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->execute($row['id']);\n\n\t\tif (!$this->User->hasAccess($row['type'], 'alpty') || !$this->User->isAllowed(BackendUser::CAN_EDIT_PAGE, $objPage->row()))\n\t\t{\n\t\t\treturn Image::getHtml($icon) . ' ';\n\t\t}\n\n\t\treturn '<a href=\"'.$this->addToUrl($href).'\" title=\"'.specialchars($title).'\"'.$attributes.'>'.Image::getHtml($icon, $label, 'data-state=\"' . ($row['published'] ? 1 : 0) . '\"').'</a> ';\n\t}",
"public function archiveUrlIcon($row, $href, $label, $title, $icon, $attributes)\n {\n // Check permissions AFTER checking the cid, so hacking attempts are logged\n if (!$this->User->hasAccess('tl_mailchimp_campaign::published', 'alexf'))\n {\n return '';\n }\n\n $href = $row['mc_long_archive_url'];\n\n return '<a href=\"'.$href.'\" title=\"'.StringUtil::specialchars($title).'\"'.$attributes.'><img src=\"'.$icon.'\" height=\"16\" width=\"16\" alt=\"'.StringUtil::specialchars($label).'\"></a> ';\n }",
"function quickiconButton( $link, $image, $text, $hideMenu = false )\r\r\n\t{\r\r\n\t\tif ( $hideMenu ) {\r\r\n\t\t\t$hideMenu = '&hidemainmenu=1';\r\r\n\t\t} ?>\r\r\n\t\t<div class=\"icon\">\r\r\n\t\t\t<a href=\"<?php echo $link . $hideMenu; ?>\">\r\r\n\t\t\t\t<img border=\"0\" align=\"middle\" alt=\"<?php echo $text; ?>\" src=\"<?php echo JURI::root() . \"media/com_acctexp/images/admin/icons/\" . $image; ?>\"/>\r\r\n\t\t\t\t<span><?php echo $text; ?></span>\r\r\n\t\t\t</a>\r\r\n\t\t</div>\r\r\n\t<?php\r\r\n\t}",
"public function toggleIcon($row, $href, $label, $title, $icon, $attributes)\n\t{\n\t\tif (\\strlen(Contao\\Input::get('tid')))\n\t\t{\n\t\t\t$this->toggleVisibility(Contao\\Input::get('tid'), (Contao\\Input::get('state') == 1), (@func_get_arg(12) ?: null));\n\t\t\t$this->redirect($this->getReferer());\n\t\t}\n\n\t\t// Check permissions AFTER checking the tid, so hacking attempts are logged\n\t\tif (!$this->User->hasAccess('tl_product::published', 'alexf'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$href .= '&tid='.$row['id'].'&state='.($row['published'] ? '' : 1);\n\n\t\tif (!$row['published'])\n\t\t{\n\t\t\t$icon = 'invisible.svg';\n\t\t}\n\n\t\treturn '<a href=\"'.$this->addToUrl($href).'\" title=\"'.Contao\\StringUtil::specialchars($title).'\"'.$attributes.'>'.Contao\\Image::getHtml($icon, $label, 'data-state=\"' . ($row['published'] ? 1 : 0) . '\"').'</a> ';\n\t}"
] | [
"0.71891975",
"0.7093652",
"0.7011383",
"0.68324333",
"0.6780231",
"0.6780231",
"0.6761691",
"0.6734089",
"0.67127705",
"0.66076314",
"0.6467617",
"0.6441674",
"0.6394187",
"0.63710505",
"0.63543963",
"0.6342717",
"0.63048387",
"0.62907696",
"0.627588",
"0.6253045",
"0.62361443",
"0.62311286",
"0.62274474",
"0.62204003",
"0.62136436",
"0.62131274",
"0.6210554",
"0.62067443",
"0.62065935",
"0.62053686"
] | 0.7418037 | 0 |
Returns true if the request is internal. | public function is_internal()
{
return Request::instance() !== $this->request;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _is_internal_redirect()\n\t{\n\t\treturn !empty($this->env['headers']['x-internal-redirect']);\n\t}",
"public function getIsInternal()\n {\n return $this->_isInternal;\n }",
"function is_internal() {\n return false;\n }",
"public function isInternal();",
"public function isInternal()\n {\n return false;\n }",
"public function isInternal()\n\t{\n\t\treturn false;\n\t}",
"public function canUseInternal()\n {\n return $this->getMethodInstance()->canUseInternal();\n }",
"public function isInternalMode() {\r\n\t\treturn $this->mInternalMode;\r\n\t}",
"function is_request()\r\n\t{\r\n\t\treturn $this->is_request;\r\n\t}",
"public static function isInternalUrl($externalUrl)\r\n {\r\n global $_CONFIG;\r\n \r\n //check the requested link is internal or external\r\n $baseInternalUrl = ASCMS_PROTOCOL.'://'.$_CONFIG['domainUrl'];\r\n $baseInternalHost = parse_url($baseInternalUrl, PHP_URL_HOST);\r\n $externalHost = parse_url($externalUrl, PHP_URL_HOST);\r\n $internalFlag = false;\r\n if ($baseInternalHost == $externalHost || empty($externalHost)) {\r\n $internalFlag = true;\r\n }\r\n return $internalFlag;\r\n }",
"protected function is_api_request() {\r\n $endpoint_path = WP_FSM__MAIN_ENDPOINT . \"/{$this->_namespace}/migrate-license.json\";\r\n\r\n return ( false !== stristr( $_SERVER['REQUEST_URI'], $endpoint_path ) );\r\n }",
"public function hasRequest()\n {\n return $this->request ? true : false;\n }",
"public function isRequest(){ \n\t\treturn $this->isPost() || $this->isGet(); \n\t}",
"public function isInternalURL($url);",
"protected function isGetRequest()\n {\n return Input::server(\"REQUEST_METHOD\") == \"GET\";\n }",
"public function isPublic()\n {\n return ! $this->isPrivate();\n }",
"public function isMainRequest(){\n\t\treturn $this->_mainRequest;\n\t}",
"public function hasBaseRequest()\n {\n return $this->get(self::BASEREQUEST) !== null;\n }",
"public static function isAPIRequest()\n {\n include_once 'Libs/Web/Web.inc';\n $url = Web::getCurrentURL();\n $pattern = '(\\/'.API::getAPISuffix().'$|\\/'.API::getAPISuffix().'\\/)';\n $result = preg_match($pattern, $url, $matches);\n if ($result === 1) {\n return TRUE;\n }\n\n return FALSE;\n\n }",
"private function requestCheck()\n\t{\n\t\tif ( $this->internal_obj === true )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// all api methods must be called using POST request method\n\t\tif ( $_SERVER[ 'REQUEST_METHOD' ] != 'POST' )\n\t\t{\n\t\t\t$objResponse = new response( false );\n\t\t\t$objResponse->setError( 103, $this->lang->line( 'error_103' ) );\n\t\t\t\n\t\t\treturn $objResponse;\n\t\t}\n\t\t\n\t\tif ( !isset( $_SERVER[ 'CONTENT_TYPE' ] ) )\n\t\t{\n\t\t\t$_SERVER[ 'CONTENT_TYPE' ] = '';\n\t\t}\n\t\t\n\t\t$contentTypes = explode( ';', $_SERVER[ 'CONTENT_TYPE' ] );\n\t\t\n\t\tif ( !$_SERVER[ 'CONTENT_TYPE' ] || count( $contentTypes ) == 0 || 'application/json' != strtolower( trim( $contentTypes[ 0 ] ) ) )\n\t\t{\n\t\t\t$objResponse = new response( false );\n\t\t\t$objResponse->setError( 104, $this->lang->line( 'error_104' ) );\n\t\t\t\n\t\t\treturn $objResponse;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function isMainRequest(): bool\n {\n return HttpKernelInterface::MAIN_REQUEST === $this->requestType;\n }",
"public function isAuthRequest()\n {\n return $this->_isAuthRequest;\n }",
"public function isProxyRequest(): bool;",
"function request_is_get()\n{\n\tif (Request::isGet() == true) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function isRequest()\n {\n return $this->type === EntryType::REQUEST;\n }",
"public function isProcessingDirtyPages() {\r\n\t\t$requestHeader = 'HTTP_' . str_replace('-', '_', self::HTTP_Request_Header);\r\n\t\t$result = (isset($_SERVER[$requestHeader]) && $_SERVER[$requestHeader]);\r\n\t\treturn $result;\r\n\t}",
"public function canUseInternal()\n {\n }",
"function bbp_is_get_request()\n{\n}",
"public function onlyInternalFederation() {\n\t\t// if global scale is disabled federation works always globally\n\t\t$gsEnabled = $this->isGlobalScaleEnabled();\n\t\tif ($gsEnabled === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$enabled = $this->config->getSystemValue('gs.federation', 'internal');\n\n\t\treturn $enabled === 'internal';\n\t}",
"public function hasRequest() : bool\n {\n return count($this->request) > 0;\n }"
] | [
"0.75041837",
"0.7446936",
"0.74233246",
"0.740233",
"0.7343356",
"0.7280922",
"0.70156115",
"0.6890018",
"0.67688644",
"0.66313994",
"0.6626913",
"0.6553247",
"0.6547847",
"0.64374876",
"0.6364227",
"0.635225",
"0.63393044",
"0.63279575",
"0.6326237",
"0.63238156",
"0.6275742",
"0.6254462",
"0.6248405",
"0.62446094",
"0.6235253",
"0.62296945",
"0.6226367",
"0.6225222",
"0.6215195",
"0.62089926"
] | 0.85607785 | 0 |
/ When we use relative links, we'll need to set the base HREF tag if we are exporting for offline usage or have not specific a base HREF we will remove any that we find HEAD and BASE elements have been looked for during the main DOM iteration and recorded if found. | public function dealWithBaseHREFElement( $xml_doc, $base_tag_exists ) {
if ( $base_tag_exists ) {
if ( $this->shouldCreateBaseHREF() ) {
$this->base_element->setAttribute(
'href',
$this->settings['baseHREF']
);
} else {
$this->base_element->parentNode->removeChild(
$this->base_element
);
}
} elseif ( $this->shouldCreateBaseHREF() ) {
$base_element = $xml_doc->createElement( 'base' );
$base_element->setAttribute(
'href',
$this->settings['baseHREF']
);
if ( $this->head_element ) {
$first_head_child = $this->head_element->firstChild;
$this->head_element->insertBefore(
$base_element,
$first_head_child
);
} else {
WsLog::l(
'No head element to attach base to: ' . $this->page_url
);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function rw_relative_urls() {\n // Don't do anything if:\n // - In feed\n // - In sitemap by WordPress SEO plugin\n if ( is_feed() || get_query_var( 'sitemap' ) )\n return;\n\n $filters = array(\n 'attachment_link',\n 'day_link',\n 'get_comments_pagenum_link',\n 'get_pagenum_link',\n 'get_shortlink',\n 'month_link',\n 'page_link',\n 'post_link',\n 'post_type_archive_link',\n 'post_type_link',\n 'search_link',\n 'term_link',\n 'year_link'\n );\n\n foreach ( $filters as $filter ) {\n add_filter( $filter, 'wp_make_link_relative' );\n }\n }",
"public function remove_head_links() {\n\t\t\tremove_action( 'wp_head', 'rsd_link') ;\n\t\t\tremove_action( 'wp_head', 'wp_generator' );\n\t\t\tremove_action( 'wp_head', 'feed_links', 2 );\n\t\t\tremove_action( 'wp_head', 'feed_links_extra', 3 );\n\t\t\tremove_action( 'wp_head', 'index_rel_link' );\n\t\t\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t\t\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t\t\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t\t\tremove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );\n\t\t\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t\t\tremove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );\n\t\t}",
"public function cleanup_head()\n {\n // EditURI link\n remove_action('wp_head', 'rsd_link');\n // windows live writer\n remove_action('wp_head', 'wlwmanifest_link');\n // index link\n remove_action('wp_head', 'index_rel_link');\n // previous link\n remove_action('wp_head', 'parent_post_rel_link', 10, 0);\n // start link\n remove_action('wp_head', 'start_post_rel_link', 10, 0);\n // links for adjacent posts\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);\n // WP version\n remove_action('wp_head', 'wp_generator');\n }",
"function _striplinks($in=0){ \n $document = ( $in!=0) ? $in : $this->data;\n $proto=\"http://\"; //'<\\s*a\\s+.*href\\s*=\\s*([\\\"\\'])?(?(1)(.*?)\\\\1|([^\\s\\>]+))'isx\n if(preg_match_all('!href=\\s*[\\'\\\"]([^\\\"\\']*)[\\\"\\'][^>]*>([^<]*)</a!isx', $document, $links)){\n $this->fulllinks = $links;\n $dirty=$links[1];\n for ( $i =0 ; $i < count($links); $i++){\n for ( $j = 0;$j<count($links[$i]); $j++){\n $links[$i][$j] = preg_replace('!\\s{1,}!',' ',trim($links[$i][$j] ));\n }\n }\n \n\t\t$dirty = array_unique($dirty);\n \n\t\t for($i=0;$i<count($dirty);$i++){\n $tmp=$dirty[$i];\n if(ereg(\"^mailto:\",$tmp)){ continue; }//no email addys please !!\n $tmp = ereg_replace(\"(^/|/$)\",\"\",$tmp);\n $clean[] = $tmp;\n $clean = array_unique($clean);\n if($clean[$i]!=\"\"){\n $newclean[] = $clean[$i];\n }\n }//end for\n return $newclean;\n }\n }",
"public function pruneLinks()\n {\n $this->files->ensureDirExists($this->sitesPath(), user());\n\n $this->files->removeBrokenLinksAt($this->sitesPath());\n }",
"public function cleanEmptyLinks() {\r\n\t\tif ($this->links != null)\r\n\t\t{\r\n\t\t\t$oldList = $this->links;\r\n\t\t\t$this->links = null;\r\n\t\t\tforeach($oldList as $link) {\r\n\t\t\t\tif ($link->getUrl() != null && trim($link->getUrl()) != \"\") {\r\n\t\t\t\t\t$this->addLink($link);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function zombie_footer_links_misc_fallback() {\n}",
"function rebuildLinks() {\r\n\t $this->deleteLinkList();\r\n\t\t$directlinks = $this->createLinkList();\r\n\t\tforeach ($directlinks as $key => $value) {\r\n\t\t $startids[] = $key;\r\n\t\t }\r\n\t\t $this->getTree($directlinks,$startids);\r\n }",
"protected function getAnchorLinks($path, $get_buffer=false) {\nglobal $_LW;\nstatic $map;\nif (!isset($map)) {\n\t$map=[];\n};\nif (isset($map[$path])) {\n\treturn $map[$path];\n};\n$find=[];\n$replace=[];\n$anchors=[];\n$buffer='';\n$len=strlen($_LW->WWW_DIR_PATH);\nif ($buffer=@file_get_contents($path)) { // if file contents obtained\n\tif ($xml=$_LW->getDOMFromPageSource($buffer)) {\n\t\t$nodes=$xml->elements(($_LW->REGISTERED_APPS['handbook']['custom']['element_id'][0]!='#' ? '#' : '').$_LW->REGISTERED_APPS['handbook']['custom']['element_id']); // get content within element_id only\n\t\tif (isset($nodes[0])) {\n\t\t\t$buffer2=$nodes[0]->toXHTML();\n\t\t\t$use_h4=($_LW->dbo->query('select', '1', 'livewhale_pages', 'livewhale_pages.host='.$_LW->escape($_LW->CONFIG['HTTP_HOST']).' AND livewhale_pages.path='.$_LW->escape($_SERVER['PHP_SELF']))->innerJoin('livewhale_tags2any', 'livewhale_tags2any.id2=livewhale_pages.id AND livewhale_tags2any.type=\"pages\"')->innerJoin('livewhale_tags', 'livewhale_tags.title=\"Include H4\" AND livewhale_tags.id=livewhale_tags2any.id1')->exists()->run() ? true : false);\n\t\t\t$use_h5=($_LW->dbo->query('select', '1', 'livewhale_pages', 'livewhale_pages.host='.$_LW->escape($_LW->CONFIG['HTTP_HOST']).' AND livewhale_pages.path='.$_LW->escape($_SERVER['PHP_SELF']))->innerJoin('livewhale_tags2any', 'livewhale_tags2any.id2=livewhale_pages.id AND livewhale_tags2any.type=\"pages\"')->innerJoin('livewhale_tags', 'livewhale_tags.title=\"Include H5\" AND livewhale_tags.id=livewhale_tags2any.id1')->exists()->run() ? true : false);\n\t\t\t$matches=[];\n\t\t\tpreg_match_all('~<h([23'.(!empty($use_h4) ? '4' : '').(!empty($use_h5) ? '5' : '').'])[^>]*?>((?:(?!</h\\\\1>).)+?)</h\\\\1>~s', $buffer2, $matches); // get all headers\n\t\t\tif (!empty($matches[1])) {\n\t\t\t\tforeach($matches[1] as $key=>$val) {\n\t\t\t\t\tif (strpos($matches[0][$key], ' data-title')!==false) { // if a data-title was used\n\t\t\t\t\t\t$matches2=[];\n\t\t\t\t\t\tpreg_match('~ data-title=\"([^\"]+?)\"~', $matches[0][$key], $matches2);\n\t\t\t\t\t\tif (!empty($matches2[1])) {\n\t\t\t\t\t\t\t$matches[2][$key]=$matches2[1]; // use the alternate short title\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t$anchor=[ // create anchor entries\n\t\t\t\t\t\t'header'=>(int)$val,\n\t\t\t\t\t\t'title'=>strip_tags(trim($matches[2][$key])),\n\t\t\t\t\t\t'path'=>substr($path, $len)\n\t\t\t\t\t];\n\t\t\t\t\tif (substr($anchor['path'], -10, 10)==='/index.php') {\n\t\t\t\t\t\t$anchor['path']=substr($anchor['path'], 0, -9);\n\t\t\t\t\t};\n\t\t\t\t\t$matches2=[];\n\t\t\t\t\tpreg_match('~<a[^>]+?id=\"([^\"]+?)\"~', $matches[0][$key], $matches2);\n\t\t\t\t\tif (!empty($matches2[1])) { // if there is already an anchor\n\t\t\t\t\t\t$anchor['id']=$matches2[1]; // get the ID\n\t\t\t\t\t}\n\t\t\t\t\telse { // else if there is no anchor yet\n\t\t\t\t\t\t$anchor['id']=preg_replace(['~[\\s_]~', '~[^a-z0-9\\-]~', '~[\\-]{2,}~', '-amp-'], ['-', '', '-', '-'], strtolower($anchor['title'])); // set the ID\n\t\t\t\t\t\tif (isset($anchors[$anchor['id']])) { // ensure anchor is unique\n\t\t\t\t\t\t\tfor ($i=2;$i<100;$i++) {\n\t\t\t\t\t\t\t\tif (!isset($anchors[$anchor['id'].$i])) {\n\t\t\t\t\t\t\t\t\t$anchor['id']=$anchor['id'].$i;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (!empty($get_buffer)) { // if getting page buffer\n\t\t\t\t\t\t\t$find[]=$matches[0][$key]; // add each anchor to the page contents\n\t\t\t\t\t\t\t$replace[]=substr($matches[0][$key], 0, -5).'<a id=\"'.$anchor['id'].'\"></a>'.substr($matches[0][$key], -5, 5);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tif (!isset($anchors[$anchor['id']])) { // require unique anchors\n\t\t\t\t\t\t$anchors[$anchor['id']]=$anchor;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tif (!empty($find)) { // swap all anchors into page contents\n\t\t\t\tforeach($find as $key=>$val) {\n\t\t\t\t\t$find[$key]=preg_replace('~(<h[23'.(!empty($use_h4) ? '4' : '').(!empty($use_h5) ? '5' : '').'][^>]*?>)\\s*(.+?)\\s*(</h[23'.(!empty($use_h4) ? '4' : '').(!empty($use_h5) ? '5' : '').']>)~s', '\\\\1\\\\2\\\\3', $val);\n\t\t\t\t\t$find[$key]=str_replace('–', '–', $find[$key]);\n\t\t\t\t\t$find[$key]=str_replace('’', '’', $find[$key]);\n\t\t\t\t};\n\t\t\t\t$buffer=preg_replace('~(<h[23'.(!empty($use_h4) ? '4' : '').(!empty($use_h5) ? '5' : '').'][^>]*?>)\\s*(.+?)\\s*(</h[23'.(!empty($use_h4) ? '4' : '').(!empty($use_h5) ? '5' : '').']>)~s', '\\\\1\\\\2\\\\3', $buffer);\t\t\t\t\n\t\t\t\t$buffer=str_replace($find, $replace, $buffer);\n\t\t\t\tif (!empty($_LW->_GET['debug_handbook'])) { // support debugger\n\t\t\t\t\t$buffer.='<pre>'.htmlentities(var_export([$find, $replace], true)).'</pre>';\n\t\t\t\t\t$buffer.='<pre>'.htmlentities(var_export($anchors, true)).'</pre>';\n\t\t\t\t\t$buffer.='<pre>'.htmlentities($buffer).'</pre>';\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t}\n\telse if (!empty($_LW->_GET['debug_handbook'])) { // support debugger\n\t\t$buffer='(Unable to parse page for anchors)';\n\t};\n};\n$map[$path]=['anchors'=>$anchors, 'buffer'=>(!empty($get_buffer) ? $buffer : '')];\nreturn $map[$path]; // return both anchor entries and page contents\n}",
"public function extractHyperLinks() {\n\t\t$html_code = $this->theParts['html']['content'];\n\t\t$attribRegex = $this->tag_regex(array('a','form','area'));\n\t\t$codepieces = explode($attribRegex, $html_code);\t// Splits the document by the beginning of the above tags\n\t\t$len = strlen($codepieces[0]);\n\t\t$pieces = count($codepieces);\n\t\tfor($i = 1; $i < $pieces; $i++) {\n\t\t\t$tag = strtolower(strtok(substr($html_code,$len+1,10),\" \"));\n\t\t\t$len += strlen($tag) + strlen($codepieces[$i]) + 2;\n\n\t\t\t$dummy = preg_match(\"/[^>]*/i\", $codepieces[$i], $reg);\n\t\t\t\t// Fetches the attributes for the tag\n\t\t\t$attributes = $this->get_tag_attributes($reg[0]);\n\t\t\t$hrefData = array();\n\t\t\t$hrefData['ref'] = ($attributes['href'] ? $attributes['href'] : $hrefData['ref'] = $attributes['action']);\n\t\t\tif ($hrefData['ref']) {\n\t\t\t\t\t// Finds out if the value had quotes around it\n\t\t\t\t$hrefData['quotes'] = (substr($codepieces[$i],strpos($codepieces[$i], $hrefData[\"ref\"])-1,1) == '\"') ? '\"' : '';\n\t\t\t\t\t// subst_str is the string to look for, when substituting lateron\n\t\t\t\t$hrefData['subst_str'] = $hrefData['quotes'].$hrefData['ref'].$hrefData['quotes'];\n\t\t\t\tif ($hrefData['ref'] && substr(trim($hrefData['ref']),0,1) != \"#\" && !strstr($this->href_fullpath_list,\"|\".$hrefData['subst_str'].\"|\")) {\n\t\t\t\t\t$this->href_fullpath_list .= \"|\".$hrefData['subst_str'].\"|\";\n\t\t\t\t\t$hrefData['absRef'] = $this->absRef($hrefData['ref']);\n\t\t\t\t\t$hrefData['tag'] = $tag;\n\t\t\t\t\t$this->theParts['html']['hrefs'][] = $hrefData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t// Extracts TYPO3 specific links made by the openPic() JS function\n\t\t$codepieces = explode(\"onClick=\\\"openPic('\", $html_code);\n\t\t$pieces = count($codepieces);\n\t\tfor($i = 1; $i < $pieces; $i++) {\n\t\t\t$showpic_linkArr = explode(\"'\",$codepieces[$i]);\n\t\t\t$hrefData['ref'] = $showpic_linkArr[0];\n\t\t\tif ($hrefData['ref']) {\n\t\t\t\t$hrefData['quotes'] = \"'\";\n\t\t\t\t\t// subst_str is the string to look for, when substituting lateron\n\t\t\t\t$hrefData['subst_str'] = $hrefData['quotes'].$hrefData['ref'].$hrefData['quotes'];\n\t\t\t\tif ($hrefData['ref'] && !strstr($this->href_fullpath_list,\"|\".$hrefData['subst_str'].\"|\")) {\n\t\t\t\t\t$this->href_fullpath_list .= \"|\".$hrefData['subst_str'].\"|\";\n\t\t\t\t\t$hrefData['absRef'] = $this->absRef($hrefData['ref']);\n\t\t\t\t\t$this->theParts['html']['hrefs'][] = $hrefData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function substHREFsInHTML() {\n\t\tif (!is_array($this->theParts['html']['hrefs'])) return;\n\t\tforeach ($this->theParts['html']['hrefs'] as $key => $val) {\n\t\t\t\t// Form elements cannot use jumpurl!\n\t\t\tif ($this->jumperURL_prefix && $val['tag'] != 'form') {\n\t\t\t\tif ($this->jumperURL_useId) {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.$key;\n\t\t\t\t} else {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::rawUrlEncodeFP($val['absRef']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$substVal = $val['absRef'];\n\t\t\t}\n\t\t\t$this->theParts['html']['content'] = str_replace(\n\t\t\t\t$val['subst_str'],\n\t\t\t\t$val['quotes'] . $substVal . $val['quotes'],\n\t\t\t\t$this->theParts['html']['content']);\n\t\t}\n\t}",
"function rel_external($content){\n\t$regexp = '/\\<a[^\\>]*(target=\"_([\\w]*)\")[^\\>]*\\>[^\\<]*\\<\\/a>/smU';\n\tif( preg_match_all($regexp, $content, $matches) ){\n\t\tfor ($m=0;$m<count($matches[0]);$m++) {\n\t\t\tif ($matches[2][$m] == 'blank') {\n\t\t\t\t$temp = str_replace($matches[1][$m], 'rel=\"external\"', $matches[0][$m]);\n\t\t\t\t$content = str_replace($matches[0][$m], $temp, $content);\n\t\t\t} else if ($matches[2][$m] == 'self') {\n\t\t\t\t$temp = str_replace(' ' . $matches[1][$m], '', $matches[0][$m]);\n\t\t\t\t$content = str_replace($matches[0][$m], $temp, $content);\n\t\t\t}\n\t\t}\n\t}\n\treturn $content;\n}",
"function magic_rel2abs( $rel, $base ) \n{\n\textract( parse_url( $base ) );\n\n\tif ( strpos( $rel,\"//\" ) === 0 ) {\n\t\treturn $scheme . ':' . $rel;\n\t}\n\n\t// return if already absolute URL\n\tif ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) {\n\t\treturn $rel;\n\t}\n\n\t// queries and anchors\n\tif ( $rel[0] == '#' || $rel[0] == '?' ) {\n\t\treturn $base . $rel;\n\t}\n\n\t// remove non-directory element from path\n\t$path = preg_replace( '#/[^/]*$#', '', $path );\n\n\t// destroy path if relative url points to root\n\tif ( $rel[0] == '/' ) {\n\t\t$path = '';\n\t}\n\n\t// dirty absolute URL\n\t$abs = $host . $path . \"/\" . $rel;\n\n\t// replace '//' or '/./' or '/foo/../' with '/'\n\t$abs = preg_replace( \"/(\\/\\.?\\/)/\", \"/\", $abs );\n\t$abs = preg_replace( \"/\\/(?!\\.\\.)[^\\/]+\\/\\.\\.\\//\", \"/\", $abs );\n\n\t// absolute URL is ready!\n\treturn $scheme . '://' . $abs;\n}",
"function rel2abs($rel, $base) {\n // return if already absolute URL\n if (parse_url($rel, PHP_URL_SCHEME) != '') {\n return $rel;\n }\n\n // queries and anchors\n if ($rel[0]=='#' || $rel[0]=='?') {\n return $base.$rel;\n }\n\n // parse base URL and convert to local variables:\n // $scheme, $host, $path\n extract(parse_url($base));\n\n // remove non-directory element from path\n $path = preg_replace('#/[^/]*$#', '', $path);\n\n // destroy path if relative url points to root\n if ($rel[0] == '/') {\n $path = '';\n }\n\n // dirty absolute URL\n $abs = \"$host$path/$rel\";\n\n // replace '//' or '/./' or '/foo/../' with '/'\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\n\n // absolute URL is ready\n return $scheme.'://'.$abs;\n}",
"function wbkn_head_cleanup() {\n\t// If RSS feeds are not used, use this hooks to remove feed links\n\t// Category feeds\n\t// remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t// Post and comment feeds\n\t// remove_action( 'wp_head', 'feed_links', 2 );\n\n\t// EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// Previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// Start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// Links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n\t// Remove WP version from css\n\tadd_filter( 'style_loader_src', 'wbkn_remove_wp_assets_version', 0 );\n\t// Remove WP version from scripts\n\tadd_filter( 'script_loader_src', 'wbkn_remove_wp_assets_version', 0 );\n}",
"function relative_urls() {\n if (is_admin() || preg_match('/sitemap(_index)?\\.xml/', $_SERVER['REQUEST_URI']) || in_array($GLOBALS['pagenow'], ['wp-login.php', 'wp-register.php'])) {\n return;\n }\n\n $filters = array(\n 'post_link',\n 'post_type_link',\n 'page_link',\n 'attachment_link',\n 'get_shortlink',\n 'post_type_archive_link',\n 'get_pagenum_link',\n 'get_comments_pagenum_link',\n 'term_link',\n 'search_link',\n 'day_link',\n 'month_link',\n 'year_link',\n );\n\n foreach ($filters as $filter) {\n add_filter($filter, 'wp_make_link_relative');\n }\n}",
"function Yonk_head_cleanup() {\n remove_action('wp_head', 'rsd_link');\n remove_action('wp_head', 'wlwmanifest_link');\n remove_action('wp_head', 'index_rel_link');\n remove_action('wp_head', 'parent_post_rel_link', 10, 0);\n remove_action('wp_head', 'start_post_rel_link', 10, 0);\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);\n remove_action('wp_head', 'wp_generator');\n\n add_filter('xmlrpc_enabled', '__return_false');\n add_filter('the_generator', '__return_false');\n\n }",
"private function setUrls()\n {\n $host = parse_url($this->target_url, PHP_URL_HOST);\n $host = $host ? $host : parse_url($this->target_url, PHP_URL_PATH);\n $this->base_url = 'http://' . rtrim($host, '/') . '/';\n $this->domain = $host;\n $this->internal_link_pattern = str_replace(\"#domain#\", $this->domain, $this->internal_link_pattern);\n\n $this->absolute_url = substr($this->target_url, 0, strrpos($this->target_url, '/'));\n $this->absolute_url = $this->absolute_url ? $this->absolute_url . '/' : $this->base_url;\n }",
"private function relativeUrlToAbs($rel, $base)\n {\n // return if already absolute URL\n if (parse_url($rel, PHP_URL_SCHEME) != ''){\n return $rel;\n }\n\n // queries and anchors\n if ($rel[0]=='#' || $rel[0]=='?'){\n return $base . $rel;\n }\n\n extract(parse_url($base));\n \n // remove non-directory element from path\n $path = preg_replace('#/[^/]*$#', '', $path);\n\n // destroy path if relative url points to root\n if ($rel[0] == '/'){\n $path = '';\n }\n\n // dirty absolute URL\n $abs = \"$host$path/$rel\";\n\n // replace '//' or '/./' or '/foo/../' with '/'\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n\n for($n = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)){\n \n }\n\n return $scheme . '://' . $abs;\n }",
"function _pm_search_backlinks(&$data,$base,$file,$type,$lvl,$opts){\n //we do nothing with directories\n if($type == 'd') return true;;\n //only search txt files\n if(!preg_match('#\\.txt$#',$file)) return true;;\n \n //get text\n $text = io_readfile($base.'/'.$file);\n \n //absolute search id\n $sid = cleanID($opts['ns'].':'.$opts['name']);\n \n //construct current namespace\n $cid = pathID($file);\n $cns = getNS($cid);\n\n //match all links\n //FIXME may be incorrect because of code blocks\n // CamelCase isn't supported, too\n preg_match_all('#\\[\\[(.+?)\\]\\]#si',$text,$matches,PREG_SET_ORDER);\n foreach($matches as $match){\n //get ID from link and discard most non wikilinks\n list($mid) = split('[\\|#]',$match[1],2);\n if(preg_match('#^(https?|telnet|gopher|file|wais|ftp|ed2k|irc)://#',$mid)) continue;\n if(preg_match('#\\w+>#',$mid)) continue;\n if(strpos($mid,'@') !== FALSE) continue; //discard email addresses\n\n $mns = getNS($mid);\n \t//namespace starting with \".\" - prepend current namespace\n if(strpos($mns,'.')===0){\n $mid = $cns.(strpos($mns,':')===1 ?'' : ':').substr($mid,1);\n }\n if($mns===false){\n //no namespace in link? add current\n $mid = \"$cns:$mid\";\n }\n\n if (cleanID($mid) == $sid and (!isset($data[$cid]) or !in_array(noNS($mid), $data[$cid])) ){\n $data[$cid][] = noNS($mid);\n }\n }\n }",
"function echotheme_remove_headlinks()\n{\n\tremove_action('wp_head', 'index_rel_link');\n\tremove_action('wp_head', 'rsd_link');\n\tremove_action('wp_head', 'wlwmanifest_link');\n\tremove_action('wp_head', 'wp_generator');\n}",
"private function fixImageReferencesInFiles()\n {\n $xhtmlFiles = $this->getXhtmlFiles();\n foreach($xhtmlFiles as $entry){\n if($entry=='cover.xhtml'){\n continue;\n }\n $xhtml = $this->zip->getFromName($entry);\n $dom = str_get_html($xhtml);\n foreach($dom->find('img') as $element){\n $uri = $element->src;\n if(strpos($uri,' ')!==FALSE || strpos($uri,'%20')!==FALSE){\n $element->src = str_replace(' ','_', $uri);\n $element->src = str_replace('%20','_', $uri);\n }\n }\n $this->backToEpub($entry, $dom->innertext);\n }\n\n }",
"function convert_linkTag($string,$coursecode, $instructor){\n //<link src=\"https://webfoundation.org/about/vision/history-of-the-web/\">WWW History</link>\n //<link src=\"php_cheatsheet.pdf\"></link>\n //$baseLink = \"http://student.athabascau.ca/~moshiurho/Comp466_Assignment2/part2/course_files/\"; //where all documents lie \n $result = $string;\n $linkClassname = '\"moduleLink\"'; //<a> tag, make sure the actual string contains quote characters\n \n $supported_files = array(\n 'pdf',\n 'doc',\n 'docx'\n );\n \n $preliminaryLinkArray = getContents($string, '<link ', '</link>');\n $findLinkTextArray = getContents($string, '<link ', '/link>');\n $replacementArray = getContents($string, '<link ', '</link>'); //this array entries will be used to find text to delete\n $temp = array();\n $linkText = array();\n for($i=0; $i<count($preliminaryLinkArray); $i++){\n $temp[] = getContents($preliminaryLinkArray[$i], 'src=\"', '\">');\n }\n for($i=0; $i<count($findLinkTextArray); $i++){\n $linkText[] = getContents($findLinkTextArray[$i], '>', '<');\n }\n $preliminaryLinkArray = $temp; //an array of array, each entry contains an array of links for given module week\n //var_dump($preliminaryLinkArray);\n //var_dump($linkText);\n //var_dump($preliminaryLinkArray);\n \n for($i=0; $i<count($preliminaryLinkArray); $i++){\n for($j=0; $j<count($preliminaryLinkArray[$i]); $j++){ \n //process the links as needed\n //Search for either a url, or file on server then parse\n $link = $preliminaryLinkArray[$i][$j];\n //print \"link is: \".$link.\"\\n\";\n $baseLink = \"http://student.athabascau.ca/~moshiurho/Comp466_Assignment2/part2/course_files/\"; //where all documents lie\n $completeLink = $baseLink.$coursecode.\"_\".$instructor.\"/modules&references/\".$link;\n $ext = strtolower(pathinfo($completeLink, PATHINFO_EXTENSION)); // Using strtolower to overcome case sensitive\n if(in_array($ext, $supported_files)){ //if file is in server\n //print \"Was a PDF file\".\"\\n\";\n //print \"linkText[i][j] is: \".$linkText[$i][$j].\"\\n\"; \n if((int)(strlen($linkText[$i][$j]))==0){\n $replaceLink = '<a target=\"_blank\" class='.$linkClassname.' href=\"'.$completeLink.'\"'.\">Click To View\".\"</a>\";\n }else{\n $replaceLink = '<a target=\"_blank\" class='.$linkClassname.' href=\"'.$completeLink.'\"'.\">\".$linkText[$i][$j].\"</a>\";\n }\n $result = str_replace('<link '.$replacementArray[$i].'</link>',$replaceLink,$result);\n }else{ //if link is an external link\n //print 'not a doc'.\"\\n\";\n //Change $completeLink to the HTTP...\n //print \"Was a HTTP link\".\"\\n\";\n //print \"linkText[i][j] is: \".$linkText[$i][$j].\"\\n\";\n if((int)(strlen($linkText[$i][$j]))==0){\n $replaceLink = '<a target=\"_blank\" class='.$linkClassname.' href=\"'.$link.'\"'.\">Click To View\".\".</a>\";\n }else{\n $replaceLink = '<a target=\"_blank\" class='.$linkClassname.' href=\"'.$link.'\"'.\">\".$linkText[$i][$j].\"</a>\";\n }\n $result = str_replace('<link '.$replacementArray[$i].'</link>',$replaceLink,$result);\n } \n }\n }\n // var_dump($strPosArray);\n //var_dump($result); \n //print \"*******************\\n\"; \n return $result;\n}",
"function libsite7b_process_html(&$vars)\n{\n foreach (array('head', 'styles', 'scripts') as $replace) {\n if (!isset($vars[$replace])) {\n continue;\n }\n\n $vars[$replace] = preg_replace('/(src|href|@import )(url\\(|=)(\")http(s?):/', '$1$2$3', $vars[$replace]);\n }\n}",
"function unicorn_infinum_boki_dj_head_cleanup() {\n\t// category feeds\n\t// remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t// post and comment feeds\n\t// remove_action( 'wp_head', 'feed_links', 2 );\n\t// EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n\t// remove WP version from css\n\tadd_filter( 'style_loader_src', 'unicorn_infinum_boki_dj_remove_wp_ver_css_js', 9999 );\n\t// remove Wp version from scripts\n\tadd_filter( 'script_loader_src', 'unicorn_infinum_boki_dj_remove_wp_ver_css_js', 9999 );\n\n}",
"function my_theme_remove_headlinks() {\n remove_action( 'wp_head', 'wp_generator' );\n remove_action( 'wp_head', 'rsd_link' );\n remove_action( 'wp_head', 'wlwmanifest_link' );\n remove_action( 'wp_head', 'start_post_rel_link' );\n remove_action( 'wp_head', 'index_rel_link' );\n remove_action( 'wp_head', 'wp_shortlink_wp_head' );\n remove_action( 'wp_head', 'adjacent_posts_rel_link' );\n remove_action( 'wp_head', 'parent_post_rel_link' );\n remove_action( 'wp_head', 'feed_links_extra', 3 );\n remove_action( 'wp_head', 'feed_links', 2 );\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n}",
"function xugj_strip_xoops_module_header_links($document)\r\n{\r\n\t$match =array();\r\n\tif (empty($document)){\r\n\t\treturn array();\r\n\t}\r\n\tpreg_match_all(\"'<\\s*script\\s.*?src\\s*=\\s*\t\t\t# find <script src=\r\n\t\t\t\t\t([\\\"\\'])?\t\t\t\t\t# find single or double quote\r\n\t\t\t\t\t(?(1) (.*?)\\\\1 | ([^\\s\\>]+))\t\t# if quote found, match up to next matching\r\n\t\t\t\t\t\t\t\t\t\t\t\t# quote, otherwise match up to next space\r\n\t\t\t\t\t'isx\",$document,$links);\r\n\r\n\twhile(list($key,$val) = each($links[2]))\r\n\t{\r\n\t\tif(!empty($val)){\r\n\t\t\t$match[] = $val;\r\n\t\t}\r\n\t}\r\n\twhile(list($key,$val) = each($links[3]))\r\n\t{\r\n\t\tif(!empty($val)){\r\n\t\t\t$match[] = $val;\r\n\t\t}\r\n\t}\r\n\t$match_js =array();\r\n\tif (empty($match)){\r\n\t\treturn array();\r\n\t}\r\n\twhile(list($key,$val) = each($match))\r\n\t{\r\n\t\t$jsbase_name=pathinfo($val,PATHINFO_BASENAME );\r\n\t\tif(!empty($jsbase_name)){\r\n\t\t\t$jsbase_name=strtolower($jsbase_name);\r\n\t\t\t$jsbase_name = preg_replace('/.*=/isx','',$jsbase_name);\r\n\t\t\tif( substr($jsbase_name,-3) == '.js'){\r\n\t\t\t\t$match_js[] = $jsbase_name;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// return the js name\r\n\treturn $match_js;\r\n\r\n}",
"protected function insertBaseTag()\n {\n if (is_null($this->baseUrl)) {\n return;\n }\n\n $this->headerView = str_replace('<head>', '<head><base href=\"' . $this->baseUrl . '\">', $this->headerView);\n $this->footerView = str_replace('<head>', '<head><base href=\"' . $this->baseUrl . '\">', $this->footerView);\n $this->contentView = str_replace('<head>', '<head><base href=\"' . $this->baseUrl . '\">', $this->contentView);\n }",
"function bones_head_cleanup() {\n remove_action('wp_head', 'rsd_link');\n remove_action('wp_head', 'wlwmanifest_link');\n remove_action('wp_head', 'index_rel_link');\n remove_action('wp_head', 'parent_post_rel_link', 10, 0);\n remove_action('wp_head', 'start_post_rel_link', 10, 0);\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);\n remove_action('wp_head', 'wp_generator');\n add_filter('style_loader_src', 'bones_remove_wp_ver_css_js', 9999);\n add_filter('script_loader_src', 'bones_remove_wp_ver_css_js', 9999);\n }",
"function relative_to_absolute_URL($rel, $base) {\n /* return if already absolute URL */\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\n /* queries and anchors */\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\n /* parse base URL and convert to local variables:\n $scheme, $host, $path */\n extract(parse_url($base));\n /* remove non-directory element from path */\n $path = preg_replace('#/[^/]*$#', '', $path);\n /* destroy path if relative url points to root */\n if ($rel[0] == '/') $path = '';\n /* dirty absolute URL */\n $abs = \"$host$path/$rel\";\n /* replace '//' or '/./' or '/foo/../' with '/' */\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\n /* absolute URL is ready! */\n return $scheme.'://'.$abs;\n}"
] | [
"0.58043814",
"0.5793262",
"0.5534639",
"0.55337995",
"0.55110765",
"0.5472503",
"0.532178",
"0.5317958",
"0.5313279",
"0.5307047",
"0.5306633",
"0.53013015",
"0.52806795",
"0.52721465",
"0.526869",
"0.52573174",
"0.5255638",
"0.52525294",
"0.52497804",
"0.5240013",
"0.5237254",
"0.52135515",
"0.52095824",
"0.51973236",
"0.5188222",
"0.5171702",
"0.5159998",
"0.5153152",
"0.511476",
"0.51141626"
] | 0.5801572 | 1 |
/ Process URL within a DOMElement | public function processElementURL( $element ) {
list( $url, $attribute_to_change ) =
$this->getURLAndTargetAttribute( $element );
if ( ! $url || ! $attribute_to_change ) {
return;
}
$url = $this->rewriteLocalURL( $url );
return $element->setAttribute( $attribute_to_change, $url );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getProductLink($URL)\n{\n global $crawled_link;\n $html = new simple_html_dom();\n $html->load_file($URL);\n foreach ($html->find('a[class=product-image]') as $element) {\n $product_link = $element->getAttribute('href');\n $crawled_link[] = $product_link;\n }\n $html->clear();\n}",
"function get_url_list(\\DOMDocument $dom, $url){\n $links = $dom->getElementsByTagName('a');\n $count = 0;\n $newUrls = array();\n foreach($links as $link){\n $result = $link->getAttribute('href');\n $urlExtension = preg_replace('/\\//', '', $result);\n $newUrls[$count] = $url . $urlExtension;\n $count++;\n }\n return $newUrls;\n}",
"abstract public function getURL();",
"public function parse($url);",
"function parse_url ($url, $component = -1) {}",
"function getURLTag($line, $base_url){\n if (strpos($line, 'URI') !== false) {\n $sub = substr($line, strpos($line,\"URI=\")+5);\n $x = substr($sub,0,strpos($sub,\"\\\"\")); //get value of URI tag \n return getAbsURL($x, $base_url); //return the absolute url\n }\n else\n return false;\n}",
"function getURL ();",
"abstract protected function getUrl();",
"abstract public function url();",
"protected abstract function getUrlIdent();",
"abstract function url();",
"function parse_url($tree, $params = array())\n {\n $href = isset($params['url']) ? $params['url'] : $tree->toText();\n $href = $this->valid_url($href) ? $href : '';\n return $this->simple_parse($tree, '<a href=\"'.htmlspecialchars($href).'\">', '</a>');\n }",
"public function parseEtfs($url);",
"public function parse()\n {\n $url = $this->getAttribute('href');\n if (strlen($url) > 0) { //if no href just keep on parsing but ignore url\n $this->setRtfPrepend('{\\field{\\*\\fldinst{HYPERLINK \"' . $this->sanitizeString($url) . '\"}}{\\fldrslt{\\ul\\cf2 ');\n $this->setRtfAppend('}}}');\n }\n return parent::parse();\n }",
"function get_clean_url($chunk) {\n $pos1 = $pos2 = 0;\n // if not a link to another domain\n $upstr = strtoupper($chunk);\n // if( strpos( $chunk, PZ_UNDER_DIR ) < 1) return null;\n // else {\n // get position of HREF= and of closing quotation of URL that follows HREF=\n $startpos = strpos($chunk, \"HREF=\");\n $endpos = strpos($chunk, \">\", $pos1);\n $cleanurl = substr($chunk, $pos1+5, $pos2-1);\n return $cleanurl;\n // }\n // return the url\n // else return null\n\n}",
"abstract public function getUrl();",
"abstract public function getUrl();",
"final protected function parseUrl(Crawler $node, string $attr = 'href'): ?string\n {\n if (0 === $node->count()) {\n return null;\n }\n\n if (null !== $url = $node->attr($attr)) {\n return preg_replace('/^\\//', static::URL_PREFIX.'/', $url);\n }\n\n return null;\n }",
"function getUrl();",
"public function extract($dom, $url)\n {\n $this->resetUrls();\n $crawler = new DomCrawler($dom, $url);\n $links = $crawler->filter('body a')->links();\n\n foreach ($links as $link) {\n if (!in_array($link->getUri(), $this->urls)) {\n $this->urls[] = $link->getUri();\n }\n }\n\n return $this->urls;\n }",
"public function retrieveUrl()\n {\n preg_match('/(.*)\\<a href\\=\\\"(.*)\\\"\\>\\[link\\]\\<\\/a\\>/i', $this->itemContent, $matches);\n if (count($matches) != 3) {\n return $url;\n }\n\n return $matches[2];\n }",
"public static function preRenderUrl($element) {\n $element['#attributes']['type'] = 'url';\n Element::setAttributes($element, ['id', 'name', 'value', 'size', 'maxlength', 'placeholder']);\n static::setAttributes($element, ['form-url']);\n\n return $element;\n }",
"public function getUrl(): CssValue;",
"public function getURLs() {\n return $this->doc->getElementsByTagName(\"a\");\n }",
"public function url($string);",
"private function parseUrl()\n {\n $this->parsedUrl = parse_url($this->url);\n }",
"abstract public function getByURL( $URL );",
"function parse_link($tree, $params = array()) { return $this->parse_url($tree, $params); }",
"public function setUrl($value);",
"public function parseEtfDetail($url);"
] | [
"0.60857576",
"0.5906118",
"0.58689284",
"0.56738156",
"0.56628877",
"0.5639387",
"0.5582329",
"0.5533679",
"0.55135006",
"0.55106086",
"0.5496744",
"0.54647315",
"0.5459717",
"0.5426665",
"0.53648126",
"0.53507566",
"0.53507566",
"0.5309727",
"0.52728367",
"0.527228",
"0.5255991",
"0.52551794",
"0.5222878",
"0.5211015",
"0.5200335",
"0.5200183",
"0.52001137",
"0.5184511",
"0.51726204",
"0.515218"
] | 0.64306104 | 0 |
/ Download discovered assets | public function downloadAsset( $url, $extension ) {
// check if user wants to download discovered assets
$crawlable_filetypes = [
'css',
'img',
'jpeg',
'png',
'gif',
// move to helper
];
// add filter to allow user to specify extra downloadable extensions
// check if supported filetype for crawling
foreach ( $crawlable_filetypes as $filetype ) {
// error_log('testing filetype: ' . $filetype);
if ( $extension == $filetype ) {
// get url without Site URL
$save_path = str_replace(
$this->site_url,
'',
$url
);
$filename = SiteInfo::getPath( 'uploads' ) .
'wp2static-exported-site/' .
$save_path;
// check if file exists on disk
if ( is_file( $filename ) ) {
return;
}
// we now havbe something like
// wp-content/plugins/elementor-pro/assets/css/frontend.min.css
$curl_options = [];
if ( isset( $this->settings['crawlPort'] ) ) {
$curl_options[ CURLOPT_PORT ] =
$this->settings['crawlPort'];
}
if ( isset( $this->settings['crawlUserAgent'] ) ) {
$curl_options[ CURLOPT_USERAGENT ] =
$this->settings['crawlUserAgent'];
}
if ( isset( $this->settings['useBasicAuth'] ) ) {
$curl_options[ CURLOPT_USERPWD ] =
$this->settings['basicAuthUser'] . ':' .
$this->settings['basicAuthPassword'];
}
$request = new Request();
$response = $request->getURL(
$url,
$curl_options
);
if ( is_array( $response ) ) {
$ch = $response['ch'];
$body = $response['body'];
}
$basename = basename( $filename );
$dir_without_filename = str_replace(
$basename,
$filename,
$filename
);
if ( ! is_dir( $dir_without_filename ) ) {
wp_mkdir_p( $dir_without_filename );
}
if ( ! isset( $body ) ) {
return;
}
$result = file_put_contents(
$filename,
$body
);
if ( ! $result ) {
error_log( 'attempting to save' . $filename );
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUrlDownloadFiles()\n {\n // Create directory if not yet\n if (!file_exists($this->dataLocalPath)) {\n mkdir($this->dataLocalPath);\n mkdir($this->dataLocalPath . DS . 'cache');\n } elseif (!file_exists($this->dataLocalPath . DS . 'cache')) {\n mkdir($this->dataLocalPath . DS . 'cache');\n }\n\n // Generate URLs array\n $urls = array('alternateNames' => self::GEONAMES_DUMP_URL . self::ALTERNATE_NAMES_FILE);\n foreach ($this->countries as &$country) {\n $urls[$country] = self::GEONAMES_DUMP_URL . $country . '.zip';\n $this->throwExceptionIfUrlCountryNoExist($urls[$country]);\n }\n\n return $urls;\n }",
"public function downloadFiles() {\n\t\tforeach($this->files as $dest_file => $source_file) {\n\t\t\t$file_contents = $this->getFileContents($source_file);\n\t\t\t$this->writeFile($dest_file, $file_contents);\n\t\t}\n\t}",
"public function downloads()\n {\n $allMedia = Auth::user()->getMedia('kyc');\n\n // download them in a streamed way, so no prob if your files are very large\n return MediaStream::create('kyc.zip')->addMedia($allMedia);\n }",
"private function saveArticleAssets() {\n foreach ($this->files as $url => $path) {\n $contents = file_get_contents($path);\n \\Drupal::service('file_system')->saveData($contents, $this->entityDirectory . '/' . basename($url));\n }\n }",
"public function process_download()\n\t{\n\t\t//Get data\n\t\t$file = $this->security->xss_clean(strip_image_tags($this->uri->segment(3)));\n\n\t\t//Read the file's contents\n\t\t$data = file_get_contents('./assets/attachments/'.$file); \n\t\t$name = $file;\n\t\t\n\t\tforce_download($name, $data);\n\t}",
"function downloadThis()\r\n {\r\n $options2 = Array(\r\n CURLOPT_HEADER => 0, // Setting cURL's option to return the webpage data\r\n CURLOPT_RETURNTRANSFER => 1, // Setting cURL to follow 'location' HTTP headers\r\n CURLOPT_BINARYTRANSFER => 1, // Automatically set the referer where following 'location' HTTP headers\r\n ); \r\n $ch = curl_init($this->image_link); // initate curl\r\n curl_setopt_array($ch, $options2); // set curl options\r\n $now = curl_exec($ch); // start curl query\r\n curl_close($ch);\r\n $fp = fopen($this->saveto,'w'); \r\n fwrite($fp, $now);\r\n fclose($fp);\r\n }",
"public function actionDownload()\n {\n $url = $this->getQuery('url');\n $name = $this->getQuery('name');\n header('Content-Type:image/png');\n header('Content-Disposition:attachment;filename='.$name);\n $image = file_get_contents($url);\n echo $image;\n }",
"public function findDownloaded() {\n\t\t// TODO: Implement findDownloaded() method.\n\t}",
"abstract function download($force);",
"public function downloadAllImages() {\n\n\t/*if (!empty($product->small_image)) // получение фото продукта по URI\n\t{\n\n\t\t\t$imgs[] = basename($img); // name of downloaded image\n\t\t\t$imgsss = basename($img); // name of downloaded image\n\t\t}\n\t\t$imgs = array();*/\n//echo $img; echo\"<br>\";\n//echo basename($img);\n\t\t/*\tforeach ($product->images as $img)\n\t\t\t{\n\t\t\t\t// first parameter - image URI\n\t\t\t\t// second parameter - path to file, where image should be downloaded\n\t\t\t $imgdir = './images/';\n\t\t\t\t $ret = $AP->_download_image($img,$imgdir.basename($img));\n\t\t\t\t if ($ret){\n\t\t\t\t\t$imgs[] = basename($img); // name of downloaded image\n\t\t\t\t\t$imgsss = basename($img); // name of downloaded image\n\t\t\t\t}\n\t\t\t}\n\t\t$product->images = $imgsss; // array of downloaded images\n\t\techo \"<br>\";\n\t\t//var_dump($imgs);\n\t}*/\n}",
"public function download()\n {\n $file = Storage::read($this->absoluteSoucePath());\n $image = ImageResize::make($file);\n $mime = substr($this->source, strrpos($this->source, '.') + 1);\n $mime = ($mime == 'jpeg' ? 'jpg' : $mime);\n if (env('WATERMARK') == true) {\n $image->insert('uploads/assets/watermark.png', env('WATERMARK_POSITION', 'bottom-right'), 10, 10);\n }\n $filename = sprintf('%s/%s.%s', 'cache', str_random(), $mime);\n Storage::drive('local')->put($filename, (string)$image->encode($mime, 100), 'public');\n\n return $filename;\n }",
"public function downloads(): Collection;",
"function download_consumer_page() {\n if (ob_get_level()) {\n ob_end_clean();\n }\n\n // Transfer file in 1024 byte chunks to save memory usage.\n $apk_path = variable_get('gsw_consumer_mobile_filepath', '/sites/default/files/gsw_consumer.apk');\n $uri = $_SERVER['DOCUMENT_ROOT'] . $apk_path; \n $content_length = filesize($uri);\n \n header('Content-type: application/vnd.android.package-archive');\n header('Content-Disposition: attachment; filename=' . variable_get('gsw_consumer_mobile_filename', 'gsw_consumer.apk'));\n header('Content-Length: ' . $content_length);\n if ($fd = fopen($uri, 'rb')) {\n while (!feof($fd)) {\n print fread($fd, 1024);\n }\n fclose($fd);\n }\n else {\n drupal_not_found();\n }\n drupal_exit();\n}",
"abstract public function assets();",
"public function fetchDownloadableResult();",
"public function download() {\n\t\t$this->load->helper('download');\n\t\t$data = file_get_contents(base_url() . \"/assets/testsjson/ceva.xml\"); // Read the file's contents\n\t\t$name = 'ceva.xml';\n\n\t\tforce_download($name, $data);\n\n\t}",
"public function getCachedFiles();",
"public function download(){\r\n\t\tdownload($this->arquivo_nome);\r\n\t}",
"public function getAssets($types = NULL);",
"function kernel_assets_callback() {\n $args = func_get_args();\n array_unshift($args, DRUPAL_ROOT, conf_path(), 'files', 'var', 'web', 'bundles');\n\n // Create a dummy file object so we can use Drupal function to make headers.\n $file = new stdClass();\n $file->filename = implode('/', $args);\n $file->filemime = file_get_mimetype($file->filename);\n $file->filesize = filesize($file->filename);\n\n /* @see file_transfer()\n * which can't be used because it requires a stream wrapper and scheme\n */\n if (ob_get_level()) {\n ob_end_clean();\n }\n\n foreach (file_get_content_headers($file) as $name => $value) {\n drupal_add_http_header($name, $value);\n }\n drupal_send_headers();\n // Transfer file in 1024 byte chunks to save memory usage.\n if ($fd = fopen($file->filename, 'rb')) {\n while (!feof($fd)) {\n print fread($fd, 1024);\n }\n fclose($fd);\n }\n else {\n drupal_not_found();\n }\n drupal_exit();\n}",
"private function loadAssets() : void\n {\n foreach($this->assets as $asset) {\n $asset->loadRessource();\n }\n }",
"public static function assets() {\n\n\n }",
"private function download_image() {\n $image_resource = file_get_contents($this->image_src);\n $basename = basename($this->image_src);\n if (!stripos($basename, '.' . $this->file_extension)) {\n $basename .= '.' . $this->file_extension;\n }\n $image_location = dirname($this->cached_image_directory) . '/' . $basename;\n if (!file_exists($image_location)) {\n if (!file_put_contents($image_location, $image_resource)) {\n $this->error('Could not download the remote image');\n }\n }\n $this->image_src = $image_location;\n }",
"public function getDistUrls(): array;",
"function file_download() {\n $file = $_GET['file'];\n if (file_exists(file_create_path($file))) {\n $list = module_list();\n foreach ($list as $module) {\n $headers = module_invoke($module, 'file_download', $file);\n if ($headers === -1) {\n print theme('page', message_access());\n }\n elseif (is_array($headers)) {\n file_transfer($file, $headers);\n }\n }\n }\n drupal_not_found();\n}",
"function download_store_page() {\n if (ob_get_level()) {\n ob_end_clean();\n }\n $apk_path = variable_get('gsw_store_mobile_filepath', '/sites/default/files/gsw_store.apk');\n $uri = $_SERVER['DOCUMENT_ROOT'] . $apk_path; \n $content_length = filesize($uri);\n\n header('Content-type: application/vnd.android.package-archive');\n header('Content-Disposition: attachment; filename=' . variable_get('gsw_store_mobile_filename', 'gsw_store.apk'));\n // Transfer file in 1024 byte chunks to save memory usage.\n header('Content-Length: ' . $content_length);\n\n if ($fd = fopen($uri, 'rb')) {\n while (!feof($fd)) {\n print fread($fd, 1024);\n }\n fclose($fd);\n }\n else {\n drupal_not_found();\n }\n drupal_exit();\n}",
"function communityservice_account_downloads() {\n\t\tcs_get_template( 'myaccount/downloads.php' );\n\t}",
"public function getServedAssets()\n {\n return $this->served_assets;\n }",
"private function combineAssets($path)\n {\n $remoteUri = new Uri($path);\n $baseUri = $remoteUri->getScheme() . '://' . $remoteUri->getHost();\n $client = new Client([\n 'base_uri' => $baseUri,\n ]);\n\n $htmlContents = $client->get($path)\n ->getBody()\n ->getContents();\n\n $crawler = new Crawler();\n $crawler->addHtmlContent($htmlContents);\n\n $crawler->filter('link')->each(function ($node) use ($client) {\n /* @var $node Crawler */\n\n if ('stylesheet' !== $node->attr('rel')) {\n return;\n }\n\n $href = $node->attr('href');\n\n $newNodeContents = $client\n ->get($href)\n ->getBody()\n ->getContents();\n\n //$url = '#\\b(([\\w-]+:\\/\\/?|www[.])[^\\s()<>]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|\\/)))#iS';\n preg_replace_callback(\"/url\\(([A-Za-z0-9\\:\\.\\-_\\/]+)\\);/\", function ($matches) use ($client, $href) {\n try {\n $resource = $client->get(dirname($href) . DIRECTORY_SEPARATOR . end($matches));\n $mime = $resource->getHeader('Content-Type')[0];\n\n return sprintf('url(data:%s;base64,%s)', $mime, base64_encode($resource->getBody()->getContents()));\n } catch (Exception $e) {\n //just continue as if nothing happened\n }\n }, $newNodeContents);\n\n $oldNode = $node->getNode(0);\n $newNode = $oldNode\n ->ownerDocument\n ->createElement('style', $newNodeContents);\n\n $node->parents()\n ->getNode(0)\n ->replaceChild($newNode, $oldNode);\n });\n\n $crawler->filter('script')->each(function ($node) use ($client) {\n /* @var $node Crawler */\n\n $src = $node->attr('src');\n\n if (trim($node->text()) || !$src) {\n $isGa = false !== strpos($node->text(), 'GoogleAnalyticsObject');\n\n if ($isGa) {\n $nativeNode = $node->getNode(0);\n $node->getNode(0)->parentNode->removeChild($nativeNode);\n }\n\n return;\n }\n\n $newNodeContents = $client\n ->get($src)\n ->getBody()\n ->getContents();\n\n $oldNode = $node->getNode(0);\n $newNode = $oldNode\n ->ownerDocument\n ->createElement('script', htmlspecialchars($newNodeContents));\n\n $node->parents()\n ->getNode(0)\n ->replaceChild($newNode, $oldNode);\n });\n\n /* something should be done with fonts *//*\n $fonts = $client\n ->get('http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js')\n ->getBody()\n ->getContents();\n\n $firstScript = $crawler->filter('script')->getNode(0);\n $fontLoader = $crawler->getNode(0)->ownerDocument->createElement('script', $fonts);\n $firstScript->parentNode->insertBefore($fontLoader, $firstScript);\n */\n\n $crawler->filter('img')->each(function ($node) use ($client) {\n /* @var $node Crawler */\n\n $src = $node->attr('src');\n\n $resource = $client->get($src);\n $mime = $resource->getHeader('Content-Type')[0];\n $contents = $resource->getBody()->getContents();\n\n $node->getNode(0)->setAttribute('src', sprintf('url(data:%s;base64,%s)', $mime, base64_encode($contents)));\n });\n\n return $crawler->html();\n }",
"protected function loadAssets()\n {\n if (!file_exists($this->getPublicDir())) {\n mkdir($this->getPublicDir(), 0777, true);\n }\n\n Util::copy($this->getPackage()->getDir().'assets', rtrim($this->getPublicDir(), '/'));\n }"
] | [
"0.63213325",
"0.6280038",
"0.6189246",
"0.61406875",
"0.6050002",
"0.5956624",
"0.59259254",
"0.5900449",
"0.589637",
"0.5889072",
"0.588634",
"0.5831994",
"0.5813029",
"0.5759387",
"0.5734224",
"0.57044274",
"0.56820565",
"0.5634469",
"0.56213695",
"0.5589422",
"0.558561",
"0.55844104",
"0.557445",
"0.5561708",
"0.5556825",
"0.55419576",
"0.5516812",
"0.5512341",
"0.5489597",
"0.5479969"
] | 0.6671388 | 0 |
Targets have changed. Generated from protobuf field .google.firestore.v1beta1.TargetChange target_change = 2; | public function setTargetChange($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\TargetChange::class);
$this->writeOneof(2, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTargetChangeType($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\Firestore\\V1beta1\\TargetChange_TargetChangeType::class);\n $this->target_change_type = $var;\n\n return $this;\n }",
"public function getTargetChange()\n {\n return $this->readOneof(2);\n }",
"public function getTargetChangeType()\n {\n return $this->target_change_type;\n }",
"public function getDocumentChange()\n {\n return $this->readOneof(3);\n }",
"public function awaitTargetInfoChanged(ContextInterface $ctx): TargetInfoChangedEvent;",
"public function canBeUpdated($target);",
"public function getXsiTypeName() {\n return \"TargetError\";\n }",
"public function setDocumentChange($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentChange::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }",
"public function setTarget($target)\n {\n }",
"public function shouldCorrectDetectChanges()\n {\n $this->specify(\n \"Snapshot does not work correctly with changed fields\",\n function () {\n $this->setUpModelsManager();\n $robots = Robots::findFirst();\n\n expect($robots->getChangedFields())->isEmpty();\n expect($robots->deleted)->null();\n expect($robots->hasChanged('deleted'))->false();\n\n $robots->deleted = 0;\n\n expect($robots->getChangedFields())->notEmpty();\n expect($robots->deleted)->notNull();\n expect($robots->hasChanged('deleted'))->true();\n }\n );\n }",
"public function setTarget($target) {\n $this->target = $target;\n }",
"public function getChange()\n {\n return $this->change;\n }",
"public function setRequestTarget($requestTarget);",
"public function getXsiTypeName() {\n return \"TargetError.Reason\";\n }",
"public function isChange(): bool\n {\n return $this->change;\n }",
"public function setTarget($target){\n\t\t$this->target = $target;\n\t}",
"public function setTarget($target) {\n\t\t$this->target = $target;\n\t}",
"public function setTarget( $value );",
"function setTarget($s) {\n $this->newTarget = $s;\n }",
"public function getDelta() {\n $ret = false;\n\n $source = $this->postData['source_incremental'];\n $target = $this->postData['target_incremental'];\n if ( $source != $target ) {\n $sourceToken = null;\n foreach ($this->builds as $build) {\n if ( $build->getIncremental() == $target ) {\n $delta = $sourceToken->getDelta($build);\n $ret = array(\n 'date_created_unix' => $delta['timestamp'],\n 'filename' => $delta['filename'],\n 'download_url' => $delta['url'],\n 'api_level' => $delta['api_level'],\n 'md5sum' => $delta['md5'],\n 'incremental' => $delta['incremental']\n );\n } else if ( $build->getIncremental() == $source ) {\n $sourceToken = $build;\n }\n }\n }\n\n \t\treturn $ret;\n \t}",
"public function changesSince(State $previous): TellsWhatChanged;",
"public function trackChange($what, $old = null, $new = null);",
"function requestChangeProjectBudget($projectId,$uId /*who initiated the request*/,$isCallInternal) //returns a requestId\n{\n\t\n}",
"public function setTarget($var)\n {\n GPBUtil::checkMessage($var, \\Eolymp\\Resolver\\Record_Target::class);\n $this->target = $var;\n\n return $this;\n }",
"public function setTarget($project, $forwardingRule, Forminator_Google_Service_Compute_TargetReference $postBody, $optParams = array())\n {\n $params = array('project' => $project, 'forwardingRule' => $forwardingRule, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('setTarget', array($params), \"Forminator_Google_Service_Compute_Operation\");\n }",
"public function setChangeOp($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Eolymp\\Wellknown\\ExpressionEnum::class);\n $this->change_op = $arr;\n\n return $this;\n }",
"public function setTarget($var)\n {\n GPBUtil::checkString($var, True);\n $this->target = $var;\n\n return $this;\n }",
"public function testUpdateChangeFieldAfterCommit()\n {\n $services = $this->getApplication()->getServiceManager();\n $queue = $services->get('queue');\n\n // create 2 pending changes to test with\n $change1 = new Change($this->p4);\n $change1->save(); // id 1\n $change2 = new Change($this->p4);\n $change2->save(); // id 2\n\n // add a comment to change 1\n $comment = new Comment($this->p4);\n $comment->set(\n array(\n 'topic' => 'changes/1',\n 'user' => 'joe',\n 'body' => 'test'\n )\n )->save();\n\n // add comment task and process the queue\n $queue->addTask('comment', $comment->getId(), array('current' => $comment->get()));\n $this->processQueue();\n\n // verify that activity record for the comment has been created and the\n // 'change' field value was set\n $activity = Activity::fetchAll(array(), $this->p4)->first();\n $this->assertSame(1, $activity->getId());\n $this->assertSame('comment', $activity->get('type'));\n $this->assertSame(1, $activity->get('change'));\n\n // submit change 1, it will become change 3\n $file = new File;\n $file->setFilespec('//depot/testfile')->open()->setLocalContents('abc789');\n $change1->addFile($file)->submit();\n $changeId = $change1->getId(); // 3\n\n // add change commit task and process the queue\n $queue->addTask('commit', $changeId);\n $this->processQueue();\n\n // verify that:\n // 1. new activity record for the change 3 has been created and the 'change'\n // filed was properly set\n // 2. change field on activity 1 record has been updated with the new change id\n $activity = Activity::fetch(2, $this->p4);\n $this->assertSame('change', $activity->get('type'));\n $this->assertSame(3, $activity->get('change'));\n\n $activity = Activity::fetch(1, $this->p4);\n $this->assertSame(3, $activity->get('change'));\n }",
"public function getChanged()\n {\n return 0;\n }",
"public function testEnableTargetLoggingNoTarget() {\n Database::startLog('testing1');\n\n $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25])->fetchCol();\n\n // We use \"fake\" here as a target because any non-existent target will do.\n // However, because all of the tests in this class share a single page\n // request there is likely to be a target of \"replica\" from one of the other\n // unit tests, so we use a target here that we know with absolute certainty\n // does not exist.\n Database::getConnection('fake')->query('SELECT [age] FROM {test} WHERE [name] = :name', [':name' => 'Ringo'])->fetchCol();\n\n $queries1 = Database::getLog('testing1');\n\n $this->assertCount(2, $queries1, 'Recorded queries from all targets.');\n $this->assertEquals('default', $queries1[0]['target'], 'First query used default target.');\n $this->assertEquals('default', $queries1[1]['target'], 'Second query used default target as fallback.');\n }"
] | [
"0.66592044",
"0.6474909",
"0.5599796",
"0.5511695",
"0.52225506",
"0.51212096",
"0.5084771",
"0.49792528",
"0.47968975",
"0.46653503",
"0.46041632",
"0.45473388",
"0.45311326",
"0.45125365",
"0.45111006",
"0.450141",
"0.4498751",
"0.4494191",
"0.4475495",
"0.44566193",
"0.44081244",
"0.44024885",
"0.43835515",
"0.43623903",
"0.43539605",
"0.4316568",
"0.4306386",
"0.42969948",
"0.4294493",
"0.4291807"
] | 0.7040689 | 0 |
A [Document][google.firestore.v1beta1.Document] has changed. Generated from protobuf field .google.firestore.v1beta1.DocumentChange document_change = 3; | public function getDocumentChange()
{
return $this->readOneof(3);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDocumentChange($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentChange::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }",
"public function getChange()\n {\n return $this->change;\n }",
"public function update($document);",
"public function setChangeMessage($changeMessage) {\n $this->changeMessage = $changeMessage;\n }",
"public function setTargetChange($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\TargetChange::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }",
"public function setDocument($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DocumentAI\\V1\\Document::class);\n $this->document = $var;\n\n return $this;\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function setDocument($document);",
"public function setDocument($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DiscoveryEngine\\V1\\Document::class);\n $this->document = $var;\n\n return $this;\n }",
"public function update(Request $request, DocumentRequest $document)\n {\n $data = $request->input();\n $document->update($data);\n return redirect()->back();\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function setDocument($value)\n {\n return $this->setParameter('document', $value);\n }",
"protected function fixDocument(Document $document)\n {\n switch ($document->getCollection()) {\n case 'projects':\n /**\n * Bump Project version number.\n */\n $document->setAttribute('version', '0.14.0');\n\n break;\n\n case 'functions':\n /**\n * Migrate events.\n */\n if (!empty($document->getAttribute('events'))) {\n $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events')));\n }\n\n break;\n\n case 'webhooks':\n /**\n * Migrate events.\n */\n if (!empty($document->getAttribute('events'))) {\n $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events')));\n }\n\n break;\n\n case 'users':\n /**\n * Remove deleted users.\n */\n if ($document->getAttribute('deleted', false) === true) {\n $this->projectDB->deleteDocument('users', $document->getId());\n }\n break;\n }\n\n return $document;\n }",
"public function getChangeMessage() {\n return $this->changeMessage;\n }",
"public static function changerTypeDoc($idDocument){\n\t\t$document = Document::recupererDocument($idDocument);\n\t\tif($document == null){\n\t\t\treturn null;\n\t\t}\n\t\t$document->type_document = \"info\";\n\t\t/*\n\t\tif($document->type_document == \"action\"){\n\t\t\t$document->type_document = \"info\";\n\t\t}\n\t\telse{\n\t\t\t$document->type_document = \"action\";\n\t\t}*/\n\t\tR::store($document);\n\t\treturn \"ok\";\n\t}"
] | [
"0.795158",
"0.54636854",
"0.529145",
"0.52759814",
"0.5202169",
"0.5200901",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.50726295",
"0.506439",
"0.49727264",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49642375",
"0.49352267",
"0.49219522",
"0.49092406"
] | 0.7700007 | 1 |
A [Document][google.firestore.v1beta1.Document] has changed. Generated from protobuf field .google.firestore.v1beta1.DocumentChange document_change = 3; | public function setDocumentChange($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\DocumentChange::class);
$this->writeOneof(3, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDocumentChange()\n {\n return $this->readOneof(3);\n }",
"public function getChange()\n {\n return $this->change;\n }",
"public function update($document);",
"public function setChangeMessage($changeMessage) {\n $this->changeMessage = $changeMessage;\n }",
"public function setTargetChange($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\TargetChange::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }",
"public function setDocument($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DocumentAI\\V1\\Document::class);\n $this->document = $var;\n\n return $this;\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function update(Request $request, Document $document)\n {\n //\n }",
"public function setDocument($document);",
"public function setDocument($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DiscoveryEngine\\V1\\Document::class);\n $this->document = $var;\n\n return $this;\n }",
"public function update(Request $request, DocumentRequest $document)\n {\n $data = $request->input();\n $document->update($data);\n return redirect()->back();\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function edit(Document $document)\n {\n //\n }",
"public function setDocument($value)\n {\n return $this->setParameter('document', $value);\n }",
"protected function fixDocument(Document $document)\n {\n switch ($document->getCollection()) {\n case 'projects':\n /**\n * Bump Project version number.\n */\n $document->setAttribute('version', '0.14.0');\n\n break;\n\n case 'functions':\n /**\n * Migrate events.\n */\n if (!empty($document->getAttribute('events'))) {\n $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events')));\n }\n\n break;\n\n case 'webhooks':\n /**\n * Migrate events.\n */\n if (!empty($document->getAttribute('events'))) {\n $document->setAttribute('events', $this->migrateEvents($document->getAttribute('events')));\n }\n\n break;\n\n case 'users':\n /**\n * Remove deleted users.\n */\n if ($document->getAttribute('deleted', false) === true) {\n $this->projectDB->deleteDocument('users', $document->getId());\n }\n break;\n }\n\n return $document;\n }",
"public function getChangeMessage() {\n return $this->changeMessage;\n }",
"public static function changerTypeDoc($idDocument){\n\t\t$document = Document::recupererDocument($idDocument);\n\t\tif($document == null){\n\t\t\treturn null;\n\t\t}\n\t\t$document->type_document = \"info\";\n\t\t/*\n\t\tif($document->type_document == \"action\"){\n\t\t\t$document->type_document = \"info\";\n\t\t}\n\t\telse{\n\t\t\t$document->type_document = \"action\";\n\t\t}*/\n\t\tR::store($document);\n\t\treturn \"ok\";\n\t}"
] | [
"0.7700007",
"0.54636854",
"0.529145",
"0.52759814",
"0.5202169",
"0.5200901",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.51225275",
"0.50726295",
"0.506439",
"0.49727264",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49659675",
"0.49642375",
"0.49352267",
"0.49219522",
"0.49092406"
] | 0.795158 | 0 |
A [Document][google.firestore.v1beta1.Document] has been deleted. Generated from protobuf field .google.firestore.v1beta1.DocumentDelete document_delete = 4; | public function getDocumentDelete()
{
return $this->readOneof(4);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDocumentDelete($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentDelete::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }",
"public function delete()\n {\n $this->document->delete();\n }",
"public function delDocument($document) {\n global $db;\n \n delete_records(SEARCH_DATABASE_TABLE, 'id', $document->dbid);\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function remove($document);",
"public function delete(Box_View_Document &$doc) {\n if (empty($doc->id)) {\n throw new Box_View_Exception('Missing required field: id');\n }\n $curl_params[CURLOPT_CUSTOMREQUEST] = 'DELETE';\n $curl_params[CURLOPT_URL] = $this->api_url . '/' . $doc->id;\n $result = $this->httpRequest($curl_params);\n if ($result->headers->code !== 204) {\n throw new Box_View_Exception('Error: ' . print_r($result), $result->headers->code);\n }\n // Doc has been deleted set to empty Box_View_Document.\n $doc = new Box_View_Document();\n return $result->response;\n }",
"public function deleteDocument($id);",
"public function delete(User $user, Document $document)\n {\n return $user->hasProjectPermission(Permission::DOCUMENT_DELETE()->getValue());\n }",
"public function deleteDocument(int $documentId, bool $hardDelete = false): void;",
"function testDeleteDocument()\r\n {\r\n // Instantiate IC controller\r\n $icController = new InfocenterController($this->ant, $this->user);\r\n $icController->debug = true;\r\n \r\n $params['body'] = \"UnitTest IcBody\";\r\n $params['title'] = \"UnitTest IcTitle\";\r\n $params['keywords'] = \"UnitTest IcKeywords\";\r\n \r\n // Create a document\r\n $docid = $icController->saveDocument($params);\r\n $this->assertTrue($docid > 0);\r\n \r\n // test delete document\r\n $params['docid'] = $docid;\r\n $ret = $icController->deleteDocument($params);\r\n $this->assertTrue($ret > 0);\r\n $this->assertEquals($ret, $docid);\r\n }",
"public function testDeleteActionWithDocument() {\n\n $client = static::createClient();\n\n $client->request(\"GET\", \"/document/delete/3\");\n $this->assertEquals(302, $client->getResponse()->getStatusCode());\n $this->assertEquals(\"/directory/open/2\", $client->getResponse()->headers->get(\"location\"));\n\n $client->followRedirect();\n $this->assertContains(\"Document deletion successful\", $client->getResponse()->getContent());\n }",
"public function deleteAction()\n {\n $result = FALSE;\n\n $criteria = array('sqPessoa' => $this->_getParam('sqPessoa'));\n $arrDocumentos = $this->getService('Documento')->findBy($criteria);\n\n foreach ($arrDocumentos as $doc) {\n\n if ($doc->getSqAtributoTipoDocumento()\n ->getSqTipoDocumento()\n ->getSqTipoDocumento() == $this->_getParam('sqTipoDocumento')) {\n\n $criteria['sqAtributoTipoDocumento'] = $doc->getSqAtributoTipoDocumento()->getSqAtributoTipoDocumento();\n $method = 'libCorpDeleteDocumento';\n\n $result = $this->saveWs($method, $criteria,$doc);\n }\n }\n\n $this->_helper->parseJson()->sendJson($result ? 'MN131' : 'Erro na operação.');\n }",
"public function deleteServerDocument($document_id) {\n\n $document = Engine_Api::_()->getItem('sitepagedocument_document', $document_id);\n\n $storagemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('storage');\n $storageversion = $storagemodule->version;\n if ($storageversion < '4.1.1' && file_exists($document->storage_path) && !empty($document->storage_path)) {\n unlink($document->storage_path);\n }\n\n if (!empty($document->filename_id)) {\n $storage = Engine_Api::_()->getItem('storage_file', $document->filename_id);\n $fileName = $storage->name;\n $storage->delete();\n\n $document->storage_path = $fileName;\n $document->filename_id = 0;\n $document->save();\n }\n }",
"public function destroy()\n\t{\n $document = Document::find(Input::get('id_document'));\n $old_document = 'packages/documents/'.$document->name;\n $new_document = 'packages/documents/deleted/'.$document->name;\n\n if(File::exists($old_document)){\n if(File::move($old_document,$new_document)){\n $document->deleted = \"deleted\";\n $document->count_modify = $document->count_modify + 1;\n $document->save();\n\n $log_document = new LogDocument;\n $log_document->id_document = $document->id;\n $log_document->id_user = Auth::getUser()->id;\n $log_document->old_title = $document->title;\n $log_document->new_title = $document->title;\n $log_document->situation = \"Deletado\";\n $log_document->save();\n\n\n return Redirect::route('lista-documentos')\n ->withErrors(['Documento deletado com sucesso!']);\n }else{\n return Redirect::route('lista-documentos')\n ->withErrors(['Não foi possível deletar Documento']);\n }\n }\n\t}",
"public function destroy(Document $document)\n {\n\n// Storage::disk('s3')->delete('folder_path/file_name.jpg');\n// Storage::disk('s3')->delete('folder_path/file_name.jpg');\n $document->delete();\n return back()->withFlash('Documento Eliminado exitosamente');\n }",
"public function ClientdocumentRemove(Request $request,$document_id){\n // die($document_id);\n $documents = DB::table('client__document')\n ->where('document_id', $document_id)\n ->get();\n if (!empty($documents[0]->document_file) and file_exists('public/Client/ClientDocuments/' . $documents[0]->document_file)) {\n unlink('public/Client/ClientDocuments/' . $documents[0]->document_file);\n }\n $remove = DB::table('client__document')\n ->where('document_id', $document_id)\n ->delete();\n if ($remove == 1) {\n return response()->json(['success' => true, 'message' => 'Document has been removed successfully']);\n } else {\n return response()->json(['success' => false, 'message' => 'Oops something went wrong, please check!']);\n }\n }",
"public function deleteAction(Request $request, Documento $documento) {\n\n $form = $this->createDeleteForm($documento);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($documento);\n $em->flush();\n $this->get('session')->getFlashBag()->add('success', 'Documento fue eliminado exitosamente');\n } else {\n $this->get('session')->getFlashBag()->add('error', 'Ocurrio un problema con Documento');\n }\n\n return $this->redirectToRoute('documento_crud');\n }",
"public function forceDelete(User $user, Document $document)\n {\n return $user->hasProjectPermission(Permission::DOCUMENT_DELETE()->getValue());\n }",
"public function deleteSupportingDocument() {\n\n // Get file ID from GET superglobal\n $id = (isset($_GET['file'])) ? $_GET['file'] : '0';\n\n // Delete document from DB\n $deletedRow = $this->_supportingDocumentModel->deleteByRefnoAndId(\n $this->_claimReferenceNumber,\n $id\n );\n\n // Delete from file storage\n $filePath = APPLICATION_PATH . \"/../private/uploads/{$deletedRow['attachment_filename']}\";\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }",
"public function documentDestroy($id)\n {\n $d = Document::find($id);\n $d->is_deleted = 1;\n $d->save();\n return response()->json(['status' => true, 'msg' => 'Document deleted successfully']);\n }",
"public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $administrativedocument = Mage::getModel('bs_administrativedoc/administrativedocument');\n $administrativedocument->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_administrativedoc')->__('Administrative Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('There was an error deleting administrative document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('Could not find administrative document to delete.')\n );\n $this->_redirect('*/*/');\n }",
"public function delete_index()\n {\n // $permission = 'app_read_collections_' . static::$collection->summary['status'];\n\n try\n {\n Permissions::isGranted( 'app_delete_documents' );\n }\n catch( PermissionsException $e)\n {\n static::error( $e->getMessage() , 500 );\n return;\n }\n\n if( ! static::deleteToken( 'document', static::$ref ))\n {\n return;\n }\n \n static::$data = array('status' => static::$document->delete());\n static::$status = 200;\n }",
"public function deleteDocument($rid, $database = null);",
"public function deleteDocument($id) {\n $vehicledoc = VehicleDocs::find($id);\n $data = $vehicledoc->delete();\n\n if ($data == true) {\n return response()->json([\n 'status' => 'success'\n ], 200);\n } else {\n log::error($this->tag . json_encode($id));\n return response()->json([\n 'status' => 'error',\n 'error' => [\n 'data' => json_encode($id),\n 'message' => 'An error occurred while trying to upload the document. Please try again later.'\n ]\n ], 500);\n }\n }",
"function deleteDocument($condition_array = array()) {\n\t\t\n\t\t$this->collection->remove($condition_array, array(\"justOne\" => true));\n\t\t\n\t}",
"public function delete_document_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_document_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Document Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}"
] | [
"0.76686215",
"0.7314201",
"0.7125892",
"0.6564273",
"0.6564273",
"0.6564273",
"0.6564273",
"0.6564273",
"0.6504451",
"0.6416294",
"0.63944244",
"0.6319818",
"0.6096891",
"0.6092559",
"0.6039557",
"0.6020625",
"0.6004843",
"0.59686726",
"0.59336257",
"0.5915265",
"0.58936214",
"0.5890795",
"0.5888897",
"0.5882625",
"0.5875921",
"0.5848736",
"0.58277804",
"0.58256644",
"0.580644",
"0.57886696"
] | 0.7576974 | 1 |
A [Document][google.firestore.v1beta1.Document] has been deleted. Generated from protobuf field .google.firestore.v1beta1.DocumentDelete document_delete = 4; | public function setDocumentDelete($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\DocumentDelete::class);
$this->writeOneof(4, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDocumentDelete()\n {\n return $this->readOneof(4);\n }",
"public function delete()\n {\n $this->document->delete();\n }",
"public function delDocument($document) {\n global $db;\n \n delete_records(SEARCH_DATABASE_TABLE, 'id', $document->dbid);\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function remove($document);",
"public function delete(Box_View_Document &$doc) {\n if (empty($doc->id)) {\n throw new Box_View_Exception('Missing required field: id');\n }\n $curl_params[CURLOPT_CUSTOMREQUEST] = 'DELETE';\n $curl_params[CURLOPT_URL] = $this->api_url . '/' . $doc->id;\n $result = $this->httpRequest($curl_params);\n if ($result->headers->code !== 204) {\n throw new Box_View_Exception('Error: ' . print_r($result), $result->headers->code);\n }\n // Doc has been deleted set to empty Box_View_Document.\n $doc = new Box_View_Document();\n return $result->response;\n }",
"public function deleteDocument($id);",
"public function delete(User $user, Document $document)\n {\n return $user->hasProjectPermission(Permission::DOCUMENT_DELETE()->getValue());\n }",
"public function deleteDocument(int $documentId, bool $hardDelete = false): void;",
"function testDeleteDocument()\r\n {\r\n // Instantiate IC controller\r\n $icController = new InfocenterController($this->ant, $this->user);\r\n $icController->debug = true;\r\n \r\n $params['body'] = \"UnitTest IcBody\";\r\n $params['title'] = \"UnitTest IcTitle\";\r\n $params['keywords'] = \"UnitTest IcKeywords\";\r\n \r\n // Create a document\r\n $docid = $icController->saveDocument($params);\r\n $this->assertTrue($docid > 0);\r\n \r\n // test delete document\r\n $params['docid'] = $docid;\r\n $ret = $icController->deleteDocument($params);\r\n $this->assertTrue($ret > 0);\r\n $this->assertEquals($ret, $docid);\r\n }",
"public function testDeleteActionWithDocument() {\n\n $client = static::createClient();\n\n $client->request(\"GET\", \"/document/delete/3\");\n $this->assertEquals(302, $client->getResponse()->getStatusCode());\n $this->assertEquals(\"/directory/open/2\", $client->getResponse()->headers->get(\"location\"));\n\n $client->followRedirect();\n $this->assertContains(\"Document deletion successful\", $client->getResponse()->getContent());\n }",
"public function deleteAction()\n {\n $result = FALSE;\n\n $criteria = array('sqPessoa' => $this->_getParam('sqPessoa'));\n $arrDocumentos = $this->getService('Documento')->findBy($criteria);\n\n foreach ($arrDocumentos as $doc) {\n\n if ($doc->getSqAtributoTipoDocumento()\n ->getSqTipoDocumento()\n ->getSqTipoDocumento() == $this->_getParam('sqTipoDocumento')) {\n\n $criteria['sqAtributoTipoDocumento'] = $doc->getSqAtributoTipoDocumento()->getSqAtributoTipoDocumento();\n $method = 'libCorpDeleteDocumento';\n\n $result = $this->saveWs($method, $criteria,$doc);\n }\n }\n\n $this->_helper->parseJson()->sendJson($result ? 'MN131' : 'Erro na operação.');\n }",
"public function deleteServerDocument($document_id) {\n\n $document = Engine_Api::_()->getItem('sitepagedocument_document', $document_id);\n\n $storagemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('storage');\n $storageversion = $storagemodule->version;\n if ($storageversion < '4.1.1' && file_exists($document->storage_path) && !empty($document->storage_path)) {\n unlink($document->storage_path);\n }\n\n if (!empty($document->filename_id)) {\n $storage = Engine_Api::_()->getItem('storage_file', $document->filename_id);\n $fileName = $storage->name;\n $storage->delete();\n\n $document->storage_path = $fileName;\n $document->filename_id = 0;\n $document->save();\n }\n }",
"public function destroy()\n\t{\n $document = Document::find(Input::get('id_document'));\n $old_document = 'packages/documents/'.$document->name;\n $new_document = 'packages/documents/deleted/'.$document->name;\n\n if(File::exists($old_document)){\n if(File::move($old_document,$new_document)){\n $document->deleted = \"deleted\";\n $document->count_modify = $document->count_modify + 1;\n $document->save();\n\n $log_document = new LogDocument;\n $log_document->id_document = $document->id;\n $log_document->id_user = Auth::getUser()->id;\n $log_document->old_title = $document->title;\n $log_document->new_title = $document->title;\n $log_document->situation = \"Deletado\";\n $log_document->save();\n\n\n return Redirect::route('lista-documentos')\n ->withErrors(['Documento deletado com sucesso!']);\n }else{\n return Redirect::route('lista-documentos')\n ->withErrors(['Não foi possível deletar Documento']);\n }\n }\n\t}",
"public function destroy(Document $document)\n {\n\n// Storage::disk('s3')->delete('folder_path/file_name.jpg');\n// Storage::disk('s3')->delete('folder_path/file_name.jpg');\n $document->delete();\n return back()->withFlash('Documento Eliminado exitosamente');\n }",
"public function ClientdocumentRemove(Request $request,$document_id){\n // die($document_id);\n $documents = DB::table('client__document')\n ->where('document_id', $document_id)\n ->get();\n if (!empty($documents[0]->document_file) and file_exists('public/Client/ClientDocuments/' . $documents[0]->document_file)) {\n unlink('public/Client/ClientDocuments/' . $documents[0]->document_file);\n }\n $remove = DB::table('client__document')\n ->where('document_id', $document_id)\n ->delete();\n if ($remove == 1) {\n return response()->json(['success' => true, 'message' => 'Document has been removed successfully']);\n } else {\n return response()->json(['success' => false, 'message' => 'Oops something went wrong, please check!']);\n }\n }",
"public function deleteAction(Request $request, Documento $documento) {\n\n $form = $this->createDeleteForm($documento);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($documento);\n $em->flush();\n $this->get('session')->getFlashBag()->add('success', 'Documento fue eliminado exitosamente');\n } else {\n $this->get('session')->getFlashBag()->add('error', 'Ocurrio un problema con Documento');\n }\n\n return $this->redirectToRoute('documento_crud');\n }",
"public function forceDelete(User $user, Document $document)\n {\n return $user->hasProjectPermission(Permission::DOCUMENT_DELETE()->getValue());\n }",
"public function deleteSupportingDocument() {\n\n // Get file ID from GET superglobal\n $id = (isset($_GET['file'])) ? $_GET['file'] : '0';\n\n // Delete document from DB\n $deletedRow = $this->_supportingDocumentModel->deleteByRefnoAndId(\n $this->_claimReferenceNumber,\n $id\n );\n\n // Delete from file storage\n $filePath = APPLICATION_PATH . \"/../private/uploads/{$deletedRow['attachment_filename']}\";\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }",
"public function documentDestroy($id)\n {\n $d = Document::find($id);\n $d->is_deleted = 1;\n $d->save();\n return response()->json(['status' => true, 'msg' => 'Document deleted successfully']);\n }",
"public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $administrativedocument = Mage::getModel('bs_administrativedoc/administrativedocument');\n $administrativedocument->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_administrativedoc')->__('Administrative Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('There was an error deleting administrative document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('Could not find administrative document to delete.')\n );\n $this->_redirect('*/*/');\n }",
"public function delete_index()\n {\n // $permission = 'app_read_collections_' . static::$collection->summary['status'];\n\n try\n {\n Permissions::isGranted( 'app_delete_documents' );\n }\n catch( PermissionsException $e)\n {\n static::error( $e->getMessage() , 500 );\n return;\n }\n\n if( ! static::deleteToken( 'document', static::$ref ))\n {\n return;\n }\n \n static::$data = array('status' => static::$document->delete());\n static::$status = 200;\n }",
"public function deleteDocument($rid, $database = null);",
"public function deleteDocument($id) {\n $vehicledoc = VehicleDocs::find($id);\n $data = $vehicledoc->delete();\n\n if ($data == true) {\n return response()->json([\n 'status' => 'success'\n ], 200);\n } else {\n log::error($this->tag . json_encode($id));\n return response()->json([\n 'status' => 'error',\n 'error' => [\n 'data' => json_encode($id),\n 'message' => 'An error occurred while trying to upload the document. Please try again later.'\n ]\n ], 500);\n }\n }",
"function deleteDocument($condition_array = array()) {\n\t\t\n\t\t$this->collection->remove($condition_array, array(\"justOne\" => true));\n\t\t\n\t}",
"public function delete_document_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_document_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Document Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}"
] | [
"0.7575338",
"0.7315314",
"0.712762",
"0.6566006",
"0.6566006",
"0.6566006",
"0.6566006",
"0.6566006",
"0.6505023",
"0.6416032",
"0.6395749",
"0.6319577",
"0.6097629",
"0.6092689",
"0.6039834",
"0.6020851",
"0.6005694",
"0.5968846",
"0.59349775",
"0.59152645",
"0.5894996",
"0.58894837",
"0.5889062",
"0.588321",
"0.5877765",
"0.58492464",
"0.58287567",
"0.5826428",
"0.5806",
"0.57887995"
] | 0.7667773 | 0 |
A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer relevant to that target). Generated from protobuf field .google.firestore.v1beta1.DocumentRemove document_remove = 6; | public function setDocumentRemove($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\DocumentRemove::class);
$this->writeOneof(6, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove($document);",
"public function getDocumentRemove()\n {\n return $this->readOneof(6);\n }",
"public function remove($document)\n {\n $event = new Event\\RemoveEvent($document);\n $this->eventDispatcher->dispatch(Events::REMOVE, $event);\n }",
"public function delDocument($document) {\n global $db;\n \n delete_records(SEARCH_DATABASE_TABLE, 'id', $document->dbid);\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function ClientdocumentRemove(Request $request,$document_id){\n // die($document_id);\n $documents = DB::table('client__document')\n ->where('document_id', $document_id)\n ->get();\n if (!empty($documents[0]->document_file) and file_exists('public/Client/ClientDocuments/' . $documents[0]->document_file)) {\n unlink('public/Client/ClientDocuments/' . $documents[0]->document_file);\n }\n $remove = DB::table('client__document')\n ->where('document_id', $document_id)\n ->delete();\n if ($remove == 1) {\n return response()->json(['success' => true, 'message' => 'Document has been removed successfully']);\n } else {\n return response()->json(['success' => false, 'message' => 'Oops something went wrong, please check!']);\n }\n }",
"public function setRemoveTarget($var)\n {\n GPBUtil::checkInt32($var);\n $this->writeOneof(3, $var);\n\n return $this;\n }",
"public function removeVersion(object $documentVersion): void;",
"public function getRemoveTarget()\n {\n return $this->readOneof(3);\n }",
"abstract function cancellationDocument($documentId, $userId);",
"public function removeTranslation(object $document, string $locale): void;",
"public function getDocumentDelete()\n {\n return $this->readOneof(4);\n }",
"public function deleteServerDocument($document_id) {\n\n $document = Engine_Api::_()->getItem('sitepagedocument_document', $document_id);\n\n $storagemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('storage');\n $storageversion = $storagemodule->version;\n if ($storageversion < '4.1.1' && file_exists($document->storage_path) && !empty($document->storage_path)) {\n unlink($document->storage_path);\n }\n\n if (!empty($document->filename_id)) {\n $storage = Engine_Api::_()->getItem('storage_file', $document->filename_id);\n $fileName = $storage->name;\n $storage->delete();\n\n $document->storage_path = $fileName;\n $document->filename_id = 0;\n $document->save();\n }\n }",
"public function delete()\n {\n $this->document->delete();\n }",
"public function deleteDocument($rid, $database = null);",
"public function setDocumentDelete($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentDelete::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }",
"public function delete(User $user, Document $document)\n {\n return $user->hasProjectPermission(Permission::DOCUMENT_DELETE()->getValue());\n }",
"function deleteDocument($condition_array = array()) {\n\t\t\n\t\t$this->collection->remove($condition_array, array(\"justOne\" => true));\n\t\t\n\t}",
"public function removeDocument($id)\n\t{\n\t\tif ($id != null)\n\t\t{\n\t\t\t$update = $this->connection->createUpdate();\n\t\t\t$update->addDeleteQuery('id:'.$id);\n\t\t\t$update->addCommit();\n\t\t\t$response = $this->connection->update($update);\n\n\t\t\t// @FIXME: Increase error checking \n\t\t\t// Wild assumption that the update was successful\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function testRemoveDocumentUser ()\n {\n $user = User::where('is_admin', 0)->first();\n $documents = Document::latest()->take(2)->get();\n\n foreach ($documents as $document) {\n $response = $this->actingAs($user, 'api')\n ->json('DELETE', '/api/documents/'.$document->id);\n\n $response->assertStatus(403);\n }\n\n }",
"public function destroy()\n\t{\n $document = Document::find(Input::get('id_document'));\n $old_document = 'packages/documents/'.$document->name;\n $new_document = 'packages/documents/deleted/'.$document->name;\n\n if(File::exists($old_document)){\n if(File::move($old_document,$new_document)){\n $document->deleted = \"deleted\";\n $document->count_modify = $document->count_modify + 1;\n $document->save();\n\n $log_document = new LogDocument;\n $log_document->id_document = $document->id;\n $log_document->id_user = Auth::getUser()->id;\n $log_document->old_title = $document->title;\n $log_document->new_title = $document->title;\n $log_document->situation = \"Deletado\";\n $log_document->save();\n\n\n return Redirect::route('lista-documentos')\n ->withErrors(['Documento deletado com sucesso!']);\n }else{\n return Redirect::route('lista-documentos')\n ->withErrors(['Não foi possível deletar Documento']);\n }\n }\n\t}",
"public function deleteDocument($id);",
"public function deleteUnusedDocumentRecords() {\n\t\t$nonDeletedRealtyRecordUids = $this->retrieveRealtyObjectUids();\n\t\t$documentsWithRealtyRecords = ($nonDeletedRealtyRecordUids == '')\n\t\t\t? array()\n\t\t\t: tx_oelib_db::selectColumnForMultiple(\n\t\t\t\t'uid', 'tx_realty_documents',\n\t\t\t\t'object IN (' . $nonDeletedRealtyRecordUids . ')' .\n\t\t\t\t\ttx_oelib_db::enableFields('tx_realty_documents', 1) .\n\t\t\t\t\t$this->additionalWhereClause\n\t\t\t);\n\t\t$this->addToStatistics(\n\t\t\t'Enabled document records with references to realty records',\n\t\t\tcount($documentsWithRealtyRecords)\n\t\t);\n\n\t\t$numberOfDeletedDocumentRecords = tx_oelib_db::update(\n\t\t\t'tx_realty_documents', (empty($documentsWithRealtyRecords)\n\t\t\t\t\t? '1=1'\n\t\t\t\t\t: 'uid NOT IN (' . implode(',', $documentsWithRealtyRecords) . ')'\n\t\t\t\t) . $this->additionalWhereClause,\n\t\t\tarray('deleted' => 1)\n\t\t);\n\t\t$this->addToStatistics(\n\t\t\t'Total deleted document records', $numberOfDeletedDocumentRecords\n\t\t);\n\t}",
"public function remove($object) {\n\t\t$this->validate($object);\n\t\tif (!$this->removedObjects->contains($object) && $object->getDocumentId() !== NULL) {\n\t\t\t$this->removedObjects->attach($object);\n\t\t}\n\t}",
"function deleteDocuments($condition_array = array()) {\n\t\t\n\t\t$this->collection->remove($condition_array);\n\t}",
"public function deleteSupportingDocument() {\n\n // Get file ID from GET superglobal\n $id = (isset($_GET['file'])) ? $_GET['file'] : '0';\n\n // Delete document from DB\n $deletedRow = $this->_supportingDocumentModel->deleteByRefnoAndId(\n $this->_claimReferenceNumber,\n $id\n );\n\n // Delete from file storage\n $filePath = APPLICATION_PATH . \"/../private/uploads/{$deletedRow['attachment_filename']}\";\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }"
] | [
"0.7747903",
"0.7382288",
"0.736852",
"0.6834306",
"0.6182211",
"0.6182211",
"0.6182211",
"0.6182211",
"0.6182211",
"0.6085568",
"0.6044986",
"0.58938944",
"0.582172",
"0.5808603",
"0.5725132",
"0.5656652",
"0.5656022",
"0.56454176",
"0.56103563",
"0.55543715",
"0.552008",
"0.5509429",
"0.54475474",
"0.5441238",
"0.53302425",
"0.5241909",
"0.52365834",
"0.5233217",
"0.522931",
"0.5224644"
] | 0.7538043 | 1 |
A filter to apply to the set of documents previously returned for the given target. Returned when documents may have been removed from the given target, but the exact documents are unknown. Generated from protobuf field .google.firestore.v1beta1.ExistenceFilter filter = 5; | public function setFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\ExistenceFilter::class);
$this->writeOneof(5, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function contains( $filter = null ) {\n\n if( $filter > 0 ) {\n foreach( $this->storage as $e ) if( $e instanceof Exception && $e->id == $filter ) return true;\n\n return false;\n } else return isset( $this->last );\n\n }",
"public function addFilterCriteria(ClassMetadata $targetDocument)\n {\n if ($targetDocument->getReflectionClass()->implementsInterface(SoftDeletableInterface::class)) {\n return array('isDeleted' => $this->getParameter('isDeleted'));\n }\n\n return array();\n }",
"public function hasPredicateFilter(){\n return $this->_has(1);\n }",
"public function filterRemoved()\n\t{\n\t\t$owner=$this->getOwner();\n\n\t\t$criteria=$owner->getDbCriteria();\n\t\t\n\t\t$criteria->addCondition($this->trashFlagField.'!='.CDbCriteria::PARAM_PREFIX.CDbCriteria::$paramCount);\n\t\t$criteria->params[CDbCriteria::PARAM_PREFIX.CDbCriteria::$paramCount++]=$this->removedFlag;\t\t\n\t\treturn $owner;\n\t}",
"public function exists($filters = array()) {}",
"public function getFilterFromTarget($target)\n {\n foreach ($this->filterTargetMap as $key => $info) {\n if ($info['target'] === $target) {\n return $key;\n }\n }\n return false;\n }",
"public function setPredicateFilter($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Bigtable\\V2\\RowFilter::class);\n $this->predicate_filter = $var;\n\n return $this;\n }",
"public function getPredicateFilter()\n {\n return $this->predicate_filter;\n }",
"public function filter($filter)\n {\n $this->query = $this->store->filter($filter);\n\n return $this->query;\n }",
"protected static function get_query_filter( array $filter ) {\n\t\tglobal $wpdb;\n\n\t\t$where = parent::get_query_filter( $filter );\n\n\t\tif ( isset( $filter['target'] ) ) {\n\t\t\t$where[] = $wpdb->prepare( 'sent_to LIKE %s', '%' . $wpdb->esc_like( trim( $filter['target'] ) ) . '%' );\n\t\t}\n\n\t\tif ( isset( $filter['redirect_by'] ) ) {\n\t\t\t$where[] = $wpdb->prepare( 'redirect_by = %s', $filter['redirect_by'] );\n\t\t}\n\n\t\treturn $where;\n\t}",
"public function filterCollection($filter, $pagination = null, $sort = null);",
"public function has_filter()\n {\n return Composers\\FilterQueryComposer::compose((array) $this->query->get('has_filter', []));\n }",
"protected function getWhereFilterQueryBuilder($builder, array $filter)\n {\n // If I'm not filtering by deleted_at\n // and the column is not in the filter columns repository array\n if (\n (\n ! is_array(static::$filter_columns) ||\n ! in_array($filter['name'], static::$filter_columns)\n )\n && $filter['name'] !== 'deleted_at'\n ) {\n return $builder;\n }\n\n if (isset($filter['relationship-field'])) {\n $builder = $builder->with($filter['name']);\n\n if (isset($filter['operator']) && $filter['operator'] === 'in') {\n return $builder->whereHas(\n $filter['name'],\n static function ($query) use ($filter) {\n $query->whereIn(\n $filter['relationship-field'],\n $filter['value']\n );\n }\n );\n }\n\n if ($filter['value'] === null) {\n if (\n ! isset($filter['operator']) ||\n empty($filter['operator']) ||\n $filter['operator'] === '='\n ) {\n return $builder->whereHas(\n $filter['name'],\n static function ($query) use ($filter) {\n $query->whereNull($filter['relationship-field']);\n }\n );\n }\n\n if (\n isset($filter['operator']) &&\n (\n $filter['operator'] === '<>' ||\n $filter['operator'] === '!='\n )\n ) {\n return $builder->whereHas(\n $filter['name'],\n static function ($query) use ($filter) {\n $query->whereNotNull($filter['relationship-field']);\n }\n );\n }\n\n return $builder;\n }\n\n if (\n array_key_exists('target_type', $filter) &&\n is_string($filter['target_type'])\n ) {\n return $builder->whereHas(\n $filter['name'],\n static function ($query) use ($filter) {\n $query->where(\n $filter['relationship-field'],\n $filter['operator'],\n $filter['value']\n )->where(\n 'target_type',\n $filter['target_type']\n );\n }\n );\n }\n\n return $builder->whereHas(\n $filter['name'],\n static function ($query) use ($filter) {\n $query->where(\n $filter['relationship-field'],\n $filter['operator'],\n $filter['value']\n );\n }\n );\n }\n\n if ($filter['value'] === null) {\n if (\n ! array_key_exists('operator', $filter) ||\n empty($filter['operator']) ||\n $filter['operator'] === '='\n ) {\n return $builder->whereNull($filter['name']);\n }\n\n if (\n array_key_exists('operator', $filter) &&\n (\n $filter['operator'] === '<>' ||\n $filter['operator'] === '!='\n )\n ) {\n return $builder->whereNotNull($filter['name']);\n }\n\n return $builder;\n }\n\n if (\n isset($filter['operator']) &&\n $filter['operator'] === 'in'\n ) {\n return $builder->whereIn(\n $filter['name'],\n $filter['value']\n );\n }\n\n // TODO check here if valid field?\n return $builder->where(\n $filter['name'],\n $filter['operator'] ?? '=',\n $filter['value']\n );\n }",
"public function addNotAppliedFilter($to = false) {\n return $this->_addNumFilter(array(Mage::getModel('tigra/db')->getLastApplied(), $to));\n }",
"public function filter($filter = [])\n {\n $this->where($filter);\n return $this;\n }",
"public function where($collection, array $filter)\n {\n return $this->manager->executeQuery($this->getNamespace($collection), new Query($filter));\n }",
"public function hasFalseFilter(){\n return $this->_has(3);\n }",
"public function filter($predicate);",
"public function getHavingFilters(): array;",
"private function queryDocIdsWithFilter() {\n $allFetchedDocIds = array();\n // for each criteria, query the DB to fetch document IDs matching that criterion\n foreach ($this->filterParams as $crit => $keys) {\n // create query keys array of the form [[crit, key1], [crit, key2], ...]\n $queryKeys = array();\n foreach ($keys as $k) {\n array_push($queryKeys, array($crit, $k));\n \n }\n// echo \"query with keys:\\n\";\n// var_dump($queryKeys);\n $res = $this->db->fetchViewWithKeysMatch(self::$HIERARCHY_FILTER_VIEW, $queryKeys);\n\n $fetchedDocIds = array();\n if (isset($res->body) && isset($res->body->rows)) {\n foreach ($res->body->rows as $doc) {\n array_push($fetchedDocIds, $doc->value);\n }\n } else {\n throw new Exception(\"error querying '\" . self::$HIERARCHY_FILTER_VIEW . \"'\");\n }\n\n// echo 'fetched doc ids:' . count($fetchedDocIds) . \"\\n\";\n\n if (count($fetchedDocIds) == 0) { // optimization: if one set is empty, the final intersection will be empty\n return array(array(), 0, array(0, 0), array());\n }\n\n //remove possible duplicates\n $fetchedDocIds = array_values(array_unique($fetchedDocIds));\n \n array_push($allFetchedDocIds, $fetchedDocIds);\n }\n\n $numFilterParams = count($this->filterParams);\n if ($numFilterParams == 1) {\n // document ids for single criterion\n $resultDocIds = $allFetchedDocIds[0];\n } else if ($numFilterParams > 1) {\n // intersection of all document ids fetched by each criterion\n $resultDocIds = multiArrayIntersection($allFetchedDocIds);\n } else {\n // *all* ids when no filter criterion is specified\n $res = $this->db->fetchView(self::$HIERARCHY_FILTER_ALL_IDS_VIEW);\n $fetchedDocIds = array();\n if (isset($res->body) && isset($res->body->rows)) {\n foreach ($res->body->rows as $doc) {\n array_push($fetchedDocIds, $doc->value);\n }\n } else {\n throw new Exception(\"error querying '\" . self::$HIERARCHY_FILTER_ALL_IDS_VIEW . \"'\");\n }\n\n $resultDocIds = $fetchedDocIds;\n }\n\n // sort by document IDs (object IDs)\n natsort($resultDocIds);\n // sort/natsort keep the index position, which will break JSON output\n // so just keep the (now correctly sorted) values\n $resultDocIds = array_values($resultDocIds);\n \n //wrap non-integer IDs in quotation marks\n foreach($resultDocIds as $num=>$docID){\n if (!is_int($docID)){\n $resultDocIds[$num] = \"\\\"$docID\\\"\";\n }\n }\n\n // this slows down the retrieval significantly, only use this if really needed (as with VMRS)\n if (isset($this->projMeta->object_sort_key) && (strlen($this->projMeta->object_sort_key)>0)){\n \t$sortKey = $this->projMeta->object_sort_key;\n\t // fetch the preview information for the IDs\n\t $previewInfos = $this->getPreviewInfosForDocIds($resultDocIds);\n\t // sort collections result set by titles\n\t usort($previewInfos, function($obj1, $obj2) use ($sortKey) {\n\t \treturn self::sortCompareByAttr($obj1, $obj2, $sortKey);\n\t });\n\t //build new array with new ordering of IDs\n\t $resultDocIds = [];\n\t foreach ($previewInfos as $element){\n\t \tarray_push($resultDocIds, $element->{\"id\"});\n\t }\n }\n // optionally slice array when we have a limit parameter\n return $this->sliceResultSet($resultDocIds);\n }",
"public function filter($filter)\n {\n $this->query = $this->company->filter($filter);\n\n return $this->query;\n }",
"public function findAllFilter( $filter = array()){\n //print_r($filter);\n\t\t$query = $this->createQuery();\n\t $constraints[] = $query->greaterThan('uid',0);\n\t\tIf ($filter['verlag'] != 'Verlag') $constraints[] = $query->equals('verlag', $filter['verlag']);\n\t\tIf ($filter['massstab'] != 'Maßstab')$constraints[] = $query->equals('massstab', $filter['massstab']);\n\t\tIf ($filter['typ'] != 'Typ')$constraints[] = $query->equals('typ', $filter['typ'] );\n If ($filter['kartenreihe'] != 'Kartenreihe')$constraints[] = $query->like('kartenreihe', $filter['kartenreihe'] );\n\t\t//$query->setOrderings(array( $route_sort_field => \\TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface::ORDER_ASCENDING)); \n\t\t$result = $query->matching( $query->logicalAnd( $constraints ) )->execute();\n\t\treturn $result;\n\t}",
"public function filter($args) {\n switch (true) {\n case is_string($args): return $this->where($args);\n default:\n return $this->spawn()->apply_filter($args);\n }\n }",
"public function filter($filter)\n {\n $query = $this->query();\n $isFirst = true;\n foreach ($this->filterFields as $filed) \n {\n if ($isFirst) {\n $query->where($filed, 'like', '%'. $filter .'%' );\n $isFirst = false;\n } else {\n $query->orWhere($filed, 'like', '%'. $filter .'%' );\n }\n }\n\n return $query->paginate($this->perPage);\n }",
"public abstract function filter(callable $predicate);",
"protected function checkDuplicate($filter)\n {\n $model = $this->model;\n $datas = $model->find([$filter]);\n\n if (!empty($datas))\n {\n return [true, $datas[0]];\n }\n\n return [false];\n }",
"public function categoriesFilter($targetSpecializations): self\n {\n $subQuery = UserCategory::find()\n ->select(['user_id'])\n ->andFilterWhere(['category_id' => $targetSpecializations]);\n\n return $this->where(['users.id' => $subQuery]);\n }",
"public function filter(callable $predicate): self\n {\n // directory comes from the filesystem thus can't have duplicates or\n // comes from a user and must have used the standard constructor that\n // validates for duplicates, so they're can't be any duplicates after\n // a filter\n return new self(\n $this->name,\n $this->files->filter($predicate),\n $this->removed,\n );\n }",
"public function withoutFilter(string $filter, callable $callback)\n {\n if (!$this->getFilters()->has($filter)) {\n return $callback($this->entityManager);\n }\n\n try {\n $this->getFilters()->disable($filter);\n return $callback($this->entityManager);\n } finally {\n $this->getFilters()->enable($filter);\n }\n }",
"public function getFilter() {\n // and there is actually no \"delete\" filter\n return 'delete';\n }"
] | [
"0.4883907",
"0.48757404",
"0.47954297",
"0.4591445",
"0.45373768",
"0.44787332",
"0.44577435",
"0.4451425",
"0.44307524",
"0.44227195",
"0.4413449",
"0.43985078",
"0.4387401",
"0.43564",
"0.4350992",
"0.43432382",
"0.43324187",
"0.4310409",
"0.42637348",
"0.4254824",
"0.422679",
"0.42026144",
"0.41982841",
"0.41942343",
"0.4144249",
"0.4125852",
"0.41061544",
"0.4103563",
"0.4102825",
"0.41013256"
] | 0.699382 | 0 |
Insert hreflang tags for all supported_langs | private function insertHreflangTags($html)
{
if (isset($this->store->settings['supported_langs'])) {
if (is_array($this->store->settings['supported_langs'])) {
$lang_codes = $this->store->settings['supported_langs'];
} else {
$lang_codes = array($this->store->settings['supported_langs']);
}
} else {
$lang_codes = array();
}
$lang_codes_with_pipe = implode('|', $lang_codes);
$hreflang_regex = "/<link [^>]*hreflang=[\"']?($lang_codes_with_pipe)[\"']?(\s[^>]*)?\>/iU";
$html = $this->removeTagFromHtmlByRegex($html, $hreflang_regex);
$hreflangTags = array();
foreach ($lang_codes as $lang_code) {
if ($this->isNoindexLang($lang_code)) {
continue;
}
$href = $this->buildHrefLang($lang_code);
array_push($hreflangTags, '<link rel="alternate" hreflang="' . Lang::iso6391Normalization($lang_code) . '" href="' . $href . '">');
}
$parent_tags = array("(<head\s?.*?>)", "(<body\s?.*?>)", "(<html\s?.*?>)");
return $this->insertAfterTag($parent_tags, $html, implode('', $hreflangTags));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _hreflang(){\n\tglobal $lc_languages;\n\tif(_multilingual()){ ?>\n\t<?php foreach($lc_languages as $hrefLang => $langDesc) {?>\n\t\t<?php\n\t\tif(_canonical() == _url()){\n\t\t\t$alternate = _url('', NULL, $hrefLang);\n\t\t\t$xdefault = _url('', NULL, false);\n\t\t}else{\n\t\t\t$alternate = preg_replace('/\\/'._lang().'\\b/', '/'.$hrefLang, _canonical());\n\t\t\t$xdefault = preg_replace('/\\/'._lang().'\\b/', '', _canonical());\n\t\t}\n\t\t?>\n\t\t<link rel=\"alternate\" hreflang=\"<?php echo $hrefLang; ?>\" href=\"<?php echo $alternate; ?>\" />\n\t<?php } ?>\n\t<link rel=\"alternate\" href=\"<?php echo $xdefault; ?>\" hreflang=\"x-default\" />\n\t<?php }\n}",
"function add_header_lang_links() {\r\n\t\t\tglobal $zwt_site_obj;\r\n\t\t\t$trans_network = $zwt_site_obj->modules[ 'trans_network' ];\r\n\t\t\t$add_langs2head = zwt_network_vars( $trans_network->transnet_id, 'get', 'add_seo_headlangs' );\r\n\t\t\tif ( $add_langs2head ) {\r\n\t\t\t\t$links = '';\r\n\t\t\t\t$languages = $this->get_current_ls( array( 'skip_missing' => 1 ) );\r\n\t\t\t\tif ( !empty( $languages ) )\r\n\t\t\t\t\tforeach ( $languages as $lang_code => $lang ) {\r\n\t\t\t\t\t\t$lang_locale = str_replace( \"_\", \"-\", $lang_code );\r\n\t\t\t\t\t\t$links.= '<link rel=\"alternate\" hreflang=\"' . $lang_locale . '\" href=\"' . $lang[ 'url' ] . '\">';\r\n\t\t\t\t\t}\r\n\t\t\t\techo $links;\r\n\t\t\t}\r\n\t\t}",
"public function addLanguageLink($lang)\n {\n foreach ($lang as $l) {\n echo \"<link rel=\\\"alternate\\\" hreflang=\\\"\" . $l .\"\\\" href=\\\"\" . $this->uri->getAddress() .\"\\\">\";\n }\n }",
"function generateHreflangURIs()\n{\n // Define valid locales to generate URLs for.\n $validLocales = ['hr'];\n // Hreflang template string\n $hreflangTemplate = '<link rel=\"alternate\" href=\"%s\" hreflang=\"%s\" />' . PHP_EOL;\n // String to be used for all hreflang links.\n $hreflangURIs = '';\n // Get all query parameters, without locale.\n $queryParams = array_filter(\\Request::query(), function($key) {\n return $key != 'locale';\n }, ARRAY_FILTER_USE_KEY);\n // Get current URL, without query parameters.\n $url = \\Request::url();\n // Prepare the full URI without the locale parameter.\n $fullUrl = prepareFullUrlWithQueryString($url, $queryParams);\n // First create the URL for the default (en) locale.\n $hreflangURIs = sprintf($hreflangTemplate, \n $fullUrl, \\Config::get('app.fallback_locale', 'en'));\n // Now create all URIs for all other locales in validLocales array.\n foreach ($validLocales as $validLocale) {\n // Again prepare full URI, now including locale.\n $queryParams['locale'] = $validLocale;\n $fullUrl = prepareFullUrlWithQueryString($url, $queryParams);\n $hreflangURIs .= sprintf($hreflangTemplate, \n $fullUrl, $validLocale);\n }\n return $hreflangURIs;\n}",
"public function getHrefLangUrls(): array\n {\n return $this->attributes['meta']['hrefLang'] ?? [];\n }",
"private function getLangTags() {\n\t\t$langTags = array_merge((array) $this->getNodesWithAttr('lang'), (array) $this->getNodesWithAttr('lang', true));\n\t\t$tagList = array();\n\t\tforeach ($langTags as $val) {\n\t\t\tif (is_array($val['values'])) $val['values'] = implode($val['values']);\n\t\t\t$tagList[] = strtolower($val['values']);\n\t\t\t}\n\t\t$this->langTags = array_unique($tagList);\n\t}",
"private function _appendLangs(&$wrapper, $context){\n\t\t\t$label = Widget::Label( __( 'Site languages' ), null, 'column', 'frontend_localisation'.'_langs' );\n\n\t\t\trequire_once EXTENSIONS.'/languages/extension.driver.php';\n\n\t\t\t$options = Extension_Languages::findOptions( FLang::getLangs() );\n\n\t\t\t$label->appendChild( Widget::Select( 'settings['.'frontend_localisation'.'][langs]', $options, array('multiple' => 'multiple') ) );\n\t\t\t$label->appendChild( new XMLElement('p', __( 'Select languages of the site.' ), array('class' => 'help')) );\n\n\t\t\tif( isset($context['errors']['frontend_localisation']['langs']) ){\n\t\t\t\t$wrapper->appendChild( Widget::Error( $label, $context['errors']['frontend_localisation']['langs'] ) );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$wrapper->appendChild( $label );\n\t\t\t}\n\t\t}",
"public function ldv_boilerplate_translations( $lang = 'en_US'){\r\n \r\n $availableLanguages = array(\r\n 'en_US' => array(\r\n 'title' => 'Write your review',\r\n 'post_content' => 'We love hearing from our customers and we\\'d love to hear from you too. Please enter your review below',\r\n 'display_credit' => 'Powered by <a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice Reviews</a> and <a href=\"http://www.louderyou.com/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'en_GB' => array(\r\n 'title' => 'Write your review',\r\n 'post_content' => 'We love hearing from our customers and we\\'d love to hear from you too. Please enter your review below',\r\n 'display_credit' => 'Powered by <a href=\"http://loudervoice.co.uk/\" target=\"_blank\">LouderVoice UK Reviews</a>'\r\n ),\r\n 'en_IE' => array(\r\n 'title' => 'Write your review',\r\n 'post_content' => 'We love hearing from our customers and we\\'d love to hear from you too. Please enter your review below',\r\n 'display_credit' => 'Powered by <a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice Reviews</a> and <a href=\"http://www.louderyou.ie/\" target=\"_blank\">LouderYou Ireland</a>'\r\n ),\r\n 'fr_FR' => array(\r\n 'title' => 'Écrire votre avis',\r\n 'post_content' => 'Votre opinion en tant que client nous intéresse énormément. S\\'il vous plait, écrivez votre avis ci-dessous',\r\n 'display_credit' => '<a href=\"http://fr.loudervoice.com/\" target=\"_blank\">LouderVoice France</a>'\r\n ),\r\n 'fr_CH' => array(\r\n 'title' => 'Écrire votre avis',\r\n 'post_content' => 'Votre opinion en tant que client nous intéresse énormément. S\\'il vous plait, écrivez votre avis ci-dessous',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> et <a href=\"http://www.louderyou.ch/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'fr_CA' => array(\r\n 'title' => 'Écrire votre avis',\r\n 'post_content' => 'Votre opinion en tant que client nous intéresse énormément. S\\'il vous plait, écrivez votre avis ci-dessous',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> et <a href=\"http://www.louderyou.com/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'es_ES' => array(\r\n 'title' => 'Escribe tu opinión',\r\n 'post_content' => 'Nos encanta escuchar a nuestros clientes y nos encantaría saber de usted también. Por favor, introduzca sus comentarios a continuación',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> y <a href=\"http://www.louderyou.es/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'es_MX' => array(\r\n 'title' => 'Escribe tu opinión',\r\n 'post_content' => 'Nos encanta escuchar a nuestros clientes y nos encantaría saber de usted también. Por favor, introduzca sus comentarios a continuación',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> y <a href=\"http://www.louderyou.com/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'it_IT' => array(\r\n 'title' => 'Scrivi tua recensione',\r\n 'post_content' => 'Ci piace sentire dai nostri clienti e ci piacerebbe sentire anche da te. Inserisci il tuo recensioni qui sotto',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> e <a href=\"http://www.louderyou.it/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'de_DE' => array(\r\n 'title' => 'Eine meinung schreiben',\r\n 'post_content' => 'Wir hören gerne von unseren Kunden und wir würden uns freuen von Ihnen zu hören auch. Bitte geben Sie Ihren Beitrag unten',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> und <a href=\"http://www.louderyou.de/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'de_CH' => array(\r\n 'title' => 'Eine meinung schreiben',\r\n 'post_content' => 'Wir hören gerne von unseren Kunden und wir würden uns freuen von Ihnen zu hören auch. Bitte geben Sie Ihren Beitrag unten',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> und <a href=\"http://www.louderyou.ch/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'ru_RU' => array(\r\n 'title' => 'Напишите ваш отзыв',\r\n 'post_content' => 'Мы любим слышать от наших клиентов, и мы хотели бы услышать от вас. Пожалуйста, введите свой отзыв',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> and <a href=\"http://www.louderyou.com/\" target=\"_blank\">LouderYou</a>'\r\n ),\r\n 'pt_PT' => array(\r\n 'title' => 'Escreva seu comentário',\r\n 'post_content' => 'Nós adoramos ouvir de nossos clientes e nós adoraríamos ouvir de você também. Digite seu comentário abaixo',\r\n 'display_credit' => '<a href=\"http://www.loudervoice.com/\" target=\"_blank\">LouderVoice</a> and <a href=\"http://www.louderyou.com/\" target=\"_blank\">LouderYou</a>'\r\n ) \r\n );\r\n \r\n if( !empty( $lang) && array_key_exists( $lang, $availableLanguages)){\r\n return $availableLanguages[ $lang ];\r\n }\r\n \r\n return $availableLanguages['en_US'];\r\n }",
"function list_languages($options = array()) {\n\t$CI =& get_instance();\n\t$default_language = $CI->config->item('default_language');\n\t$current_language = $CI->config->item('language_abbr');\n\n\tforeach ($CI->config->item('lang_desc') as $value=>$key) {\n\t\t// If language is the same as default language, don't show the abbrevation\n\t\t$url = ($value == $default_language) ? '' : $value;\n\t\t$title = (isset($options['title']) AND $options['title'] == 'code') ? $value : $key;\n\n\t\t// Set active class on active language\n\t\t$active = ($value == $current_language) ? ' active' : '';\n\t\t\n\t\tif (isset($options['layout']) AND $options['layout'] == 'option') { \n\t\t\tif ($active) {\n\t\t\t\t$active = ' selected=\"selected\"';\n\t\t\t}\n\t\t\techo '<option value=\"'.base_url() .'/'. $url.'\"'.@$active.'class=\"'.$value.'\">'.$title.'</option>';\n\t\t} elseif (isset($options['layout']) AND $options['layout'] == 'li') {\n\t\t\techo '<li class=\"'.$value.$active.'\"><a href=\"'.base_url() .'/'. $url.'\" title=\"'.$key.'\">'.$title.'</a></li>';\n\t\t} elseif (isset($options['layout']) AND $options['layout'] == 'img') {\n\t\t\t$image_path = (isset($options['image_path'])) ? $options['image_path'] : 'images';\n\t\t\techo '<a href=\"'.base_url() .'/'. $url.'\" class=\"'.$value.$active.'\" title=\"'.$key.'\"><img src=\"'.base_url() .'/'. $image_path . \"/\" . $value.'.png\" alt=\"'.$key.'\" /></a>';\n\t\t} else {\n\t\t\techo '<a href=\"'.base_url() .'/'. $url.'\" class=\"'.$value.$active.'\" title=\"'.$key.'\">'.$title.'</a>';\n\t\t}\n\t}\n}",
"function _bibdk_theme_preprocess_footer_menu_language_links($links) {\n global $base_url;\n foreach ($links as &$link) {\n if ($link['title'] == 'English') {\n $link['href'] = $base_url . '/eng';\n }\n if ($link['title'] == 'Dansk') {\n $link['href'] = $base_url . '/da';\n }\n }\n return $links;\n}",
"public function getLanguagesAsUrl() {\n if ($this->isReady) {\n $arrReturned = $this->matchRegex($this->_strSource, IMDB::IMDB_LANGUAGES);\n if (count($arrReturned[2])) {\n foreach ($arrReturned[2] as $i => $strName) {\n $arrReturn[] = '<a href=\"http://www.imdb.com/language/' . $arrReturned[1][$i] . '\">' . $strName . '</a>';\n }\n return implode(' / ', $arrReturn);\n }\n return $this->strNotFound;\n }\n return $this->strNotFound;\n }",
"public function add_lang($lang) {\r\n $this->langs[] = strtolower($lang);\r\n }",
"public function setHreflang($v)\n {\n $this->attributes['hreflang'] = $v;\n\n return $this;\n }",
"public static function output_language_buttons() {\n//\t\t\t. BASE_URL . 'images/swe32.png\"></a>';\n//\t\techo '<a onClick=\"set_language(\\'en\\')\" class=\"lang-flag\"><img title=\"English\" src=\"' . BASE_URL \n//\t\t\t. 'images/eng32.png\"></a>';\n\t}",
"function AddDetailsForDefaultLang(){}",
"function icl_post_languages(){\n\n $languages = icl_get_languages('skip_missing=0');\n $langs = array();\n \n foreach($languages as $l){\n if(!$l['active']) {\n $langs[$l['translated_name']] = $l['url'];\n }\n }\n // Sort languages alphabetically by name\n ksort($langs);\n\n if(1 < count($languages)){\n echo '<button class=\"button\" type=\"button\" data-toggle=\"example-dropdown-1\"><i class=\"fa fa-globe\" aria-hidden=\"true\"></i> <span class=\"choose\">'. __('Choose Language','protectionpro') .'</span> <i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i></button>';\n echo '<ul class=\"dropdown-pane lang-switcher\" id=\"example-dropdown-1\" data-dropdown data-hover=\"true\" data-hover-pane=\"true\">';\n \n foreach ($langs as $key => $value) {\n echo '<li><a href=\"'.$value.'\">'.$key.'</a></li>';\n }\n echo '</ul>';\n }\n}",
"function blog_lang( $old_lang ){\n\n\t$loc = HOME . '_plugins/Blog/lang/';\n\tif( file_exists( $loc . LANG . '.php' ) )\n\t\trequire $loc . LANG . '.php';\n\telse\n\t\trequire $loc . 'English.php';\n\n\treturn array_merge( $old_lang, $lang );\n}",
"function InitializeLanguages() {\r\n // Languages as a string separated by ',' while the different translations are separated as follows: English|Bulgarian\r\n\r\n $languages = \"Afrikaans|африкански,Albanian|албански,Arabic|арабски,Azerbaijani|азерски,Basque|баски,Belarusian|беларуски,Bengali|бенгалски,Bosnian|босненски,Bulgarian|български,Cantonese|кантонски,Catalan|каталонски,Chinese|китайски,Croatian|хърватски,Czech|чешки,Danish|датски,Dutch|холандски,English|английски,Estonian|естонски,Filipino|филипински,Finnish|фински,French|френски,Georgian|грузински,German|немски,Greek|гръцки,Gujarati|гуджаратски,Hebrew|иврит,Hindi|хинди,Hungarian|унгарски,Icelandic|исландски,Indonesian|индонезийски,Irish|ирландски,Italian|италиански,Japanese|японски,Kazakh|казахски,Cambodian|камбоджански,Korean|корейски,Lao|лаоски,Latin|латински,Latvian|латвийски,Lithuanian|литовски,Malay|малайски,Marathi|маратхи,Mongolian|монголски,Nepali|непалски,Norwegian|норвежки,Pashto|пущунски,Persian|персийски,Polish|полски,Portuguese|португалски,Punjabi|панджаби,Romanian|румънски,Russian|руски,Scottish|шотландски,Serbian|сръбски,Slovak|словашки,Slovenian|словенски,Somali|сомалийски,Spanish|испански,Swahili|суахили,Swedish|шведски,Tagalog|тагалски,Tamil|тамилски,Telugu|телугу,Thai|тайвански,Turkish|турски,Ukrainian|украински,Urdu|урду,Uzbek|узбекски,Vietnamese|виетнамски,Welsh|уелски,Zulu|зулу\";\r\n\r\n $arr = explode(',', $languages);\r\n\r\n // Loop through the capture groups and add them to the DB\r\n $i = 0;\r\n foreach ($arr as $value) {\r\n $row['type_id'] = 3;\r\n $row['item_id'] = $i;\r\n $language = explode('|', $value);\r\n $row['en'] = $language[0];\r\n $row['bg'] = $language[1];\r\n AddTranslation($row);\r\n $i++;\r\n }\r\n\r\n}",
"public function add_languages() {\n\t\tload_plugin_textdomain( 'automated-featured-image-posts', false, basename( dirname( __FILE__ ) ) . '/lang' );\n\t}",
"function atp_theme_links__locale_block($variables) {\n $links = $variables['links'];\n\n $output = '';\n\n if (count($links) > 0) {\n $output .= '<ul class=\"language\">';\n\n $num_links = count($links);\n $i = 1;\n\n foreach ($links as $key => $link) {\n $class = array($key);\n\n // Add first & last classes to the list\n // We've removed the active class because it's on the anchor element already\n if ($i == 1) {\n $class[] = 'first';\n }\n if ($i == $num_links) {\n $class[] = 'last';\n }\n\n $output .= '<li' . drupal_attributes(array('class' => $class)) . '>';\n\n // Goto frontpage if no translation exist\n if (empty($link['href']))\n $link['href'] = '<front>';\n\n if (isset($link['href'])) {\n // Remove the 'language-link' class\n $link['attributes'] = array();\n\n // Pass in $link as $options, they share the same keys.\n $output .= l($link['language']->native, $link['href'], $link);\n }\n elseif (!empty($link['title'])) {\n $output .= '<span>' . $link['language']->native . '</span>';\n }\n\n $i++;\n $output .= \"</li>\\n\";\n }\n\n $output .= '</ul>';\n }\n\n return $output;\n}",
"public function setHreflang($hreflang) {\n $this->hreflang = $hreflang;\n }",
"function add_language_switcher ( $items, $args ) {\n if ($args->theme_location == 'main') {\n $languages = icl_get_languages('skip_missing=0&orderby=code');\n if(!empty($languages)){\n foreach($languages as $l){\n $li = '<li class=\"language\">';\n if($l['country_flag_url']){\n if(!$l['active']){\n $li .= '<a href=\"'.$l['url'].'\">';\n $li .= icl_disp_language($l['native_name']);\n $li .= '</a>';\n }\n $li .= '</li>';\n }\n }\n }\n $items .= $li;\n }\n return $items;\n}",
"function wpml_language_switch() {\n\t$lang = icl_get_languages('skip_missing=N');\n\t$ret = '';\n\tif(count($lang) > 0) {\n\tforeach($lang as $value) {\n\t\t$ret .= ($value['active'] == 0) ? '<li class=\"language dropdown menu-item\"><a href=\"' . $value['url'] . '\">' .\n\t\t\t$value['native_name'] . '</a></li>' : '';\n\t}\n\t}\n\treturn $ret;\n}",
"function el_installation_register_languages($strings = array()) {\n global $ElInstall;\n $ElInstall->langStrings = $strings;\n}",
"function get_rocket_all_active_langs_uri() {\n\t\t_deprecated_function( __FUNCTION__, '2.2', 'get_rocket_i18n_uri()' );\n\t\treturn get_rocket_i18n_uri();\n\t}",
"function setLanguages($langPrimary, $langSecondary = '');",
"public function get_language_list(){\n\n $lang_list .=\"<table width=100% border=0><tr width=100%><td align=right>\";\n $data = array(1 => 'ENGLISH' , 'SPANISH' , 'FRENCH' ); //Assign Languages into $data Array from Key value 1.\n \n foreach($data as $k=>$v){\n $lang_list.=\"<a href=\\\"index.php?language=$v\\\" class=\\\"link1\\\">$v\";\n $lang_list .=\"</a>\";\n $lang_list .=\" <span class=\\\"pipeline\\\"> |</span> \";\n }\n\n $lang_list .=\"</td></tr></table>\";\n\n return $lang_list;\n }",
"function languages() {\n\t// pack abbreviation/language array\n\t// important note: you must have the default language as the last item in each major language, after all the\n\t// en-ca type entries, so en would be last in that case\n\t$a_languages = array (\n\t\t\t'af' => 'Afrikaans',\n\t\t\t'sq' => 'Albanian',\n\t\t\t'ar-dz' => 'Arabic (Algeria)',\n\t\t\t'ar-bh' => 'Arabic (Bahrain)',\n\t\t\t'ar-eg' => 'Arabic (Egypt)',\n\t\t\t'ar-iq' => 'Arabic (Iraq)',\n\t\t\t'ar-jo' => 'Arabic (Jordan)',\n\t\t\t'ar-kw' => 'Arabic (Kuwait)',\n\t\t\t'ar-lb' => 'Arabic (Lebanon)',\n\t\t\t'ar-ly' => 'Arabic (libya)',\n\t\t\t'ar-ma' => 'Arabic (Morocco)',\n\t\t\t'ar-om' => 'Arabic (Oman)',\n\t\t\t'ar-qa' => 'Arabic (Qatar)',\n\t\t\t'ar-sa' => 'Arabic (Saudi Arabia)',\n\t\t\t'ar-sy' => 'Arabic (Syria)',\n\t\t\t'ar-tn' => 'Arabic (Tunisia)',\n\t\t\t'ar-ae' => 'Arabic (U.A.E.)',\n\t\t\t'ar-ye' => 'Arabic (Yemen)',\n\t\t\t'ar' => 'Arabic',\n\t\t\t'hy' => 'Armenian',\n\t\t\t'as' => 'Assamese',\n\t\t\t'az' => 'Azeri',\n\t\t\t'eu' => 'Basque',\n\t\t\t'be' => 'Belarusian',\n\t\t\t'bn' => 'Bengali',\n\t\t\t'bg' => 'Bulgarian',\n\t\t\t'ca' => 'Catalan',\n\t\t\t'zh-cn' => 'Chinese (China)',\n\t\t\t'zh-hk' => 'Chinese (Hong Kong SAR)',\n\t\t\t'zh-mo' => 'Chinese (Macau SAR)',\n\t\t\t'zh-sg' => 'Chinese (Singapore)',\n\t\t\t'zh-tw' => 'Chinese (Taiwan)',\n\t\t\t'zh' => 'Chinese',\n\t\t\t'hr' => 'Croatian',\n\t\t\t'cs' => 'Czech',\n\t\t\t'da' => 'Danish',\n\t\t\t'div' => 'Divehi',\n\t\t\t'nl-be' => 'Dutch (Belgium)',\n\t\t\t'nl' => 'Dutch (Netherlands)',\n\t\t\t'en-au' => 'English (Australia)',\n\t\t\t'en-bz' => 'English (Belize)',\n\t\t\t'en-ca' => 'English (Canada)',\n\t\t\t'en-ie' => 'English (Ireland)',\n\t\t\t'en-jm' => 'English (Jamaica)',\n\t\t\t'en-nz' => 'English (New Zealand)',\n\t\t\t'en-ph' => 'English (Philippines)',\n\t\t\t'en-za' => 'English (South Africa)',\n\t\t\t'en-tt' => 'English (Trinidad)',\n\t\t\t'en-gb' => 'English (United Kingdom)',\n\t\t\t'en-us' => 'English (United States)',\n\t\t\t'en-zw' => 'English (Zimbabwe)',\n\t\t\t'en' => 'English',\n\t\t\t'us' => 'English (United States)',\n\t\t\t'et' => 'Estonian',\n\t\t\t'fo' => 'Faeroese',\n\t\t\t'fa' => 'Farsi',\n\t\t\t'fi' => 'Finnish',\n\t\t\t'fr-be' => 'French (Belgium)',\n\t\t\t'fr-ca' => 'French (Canada)',\n\t\t\t'fr-lu' => 'French (Luxembourg)',\n\t\t\t'fr-mc' => 'French (Monaco)',\n\t\t\t'fr-ch' => 'French (Switzerland)',\n\t\t\t'fr' => 'French (France)',\n\t\t\t'mk' => 'FYRO Macedonian',\n\t\t\t'gd' => 'Gaelic',\n\t\t\t'ka' => 'Georgian',\n\t\t\t'de-at' => 'German (Austria)',\n\t\t\t'de-li' => 'German (Liechtenstein)',\n\t\t\t'de-lu' => 'German (Luxembourg)',\n\t\t\t'de-ch' => 'German (Switzerland)',\n\t\t\t'de' => 'German (Germany)',\n\t\t\t'el' => 'Greek',\n\t\t\t'gu' => 'Gujarati',\n\t\t\t'he' => 'Hebrew',\n\t\t\t'hi' => 'Hindi',\n\t\t\t'hu' => 'Hungarian',\n\t\t\t'is' => 'Icelandic',\n\t\t\t'id' => 'Indonesian',\n\t\t\t'it-ch' => 'Italian (Switzerland)',\n\t\t\t'it' => 'Italian (Italy)',\n\t\t\t'ja' => 'Japanese',\n\t\t\t'kn' => 'Kannada',\n\t\t\t'kk' => 'Kazakh',\n\t\t\t'kok' => 'Konkani',\n\t\t\t'ko' => 'Korean',\n\t\t\t'kz' => 'Kyrgyz',\n\t\t\t'lv' => 'Latvian',\n\t\t\t'lt' => 'Lithuanian',\n\t\t\t'ms' => 'Malay',\n\t\t\t'ml' => 'Malayalam',\n\t\t\t'mt' => 'Maltese',\n\t\t\t'mr' => 'Marathi',\n\t\t\t'mn' => 'Mongolian (Cyrillic)',\n\t\t\t'ne' => 'Nepali (India)',\n\t\t\t'nb-no' => 'Norwegian (Bokmal)',\n\t\t\t'nn-no' => 'Norwegian (Nynorsk)',\n\t\t\t'no' => 'Norwegian (Bokmal)',\n\t\t\t'or' => 'Oriya',\n\t\t\t'pl' => 'Polish',\n\t\t\t'pt-br' => 'Portuguese (Brazil)',\n\t\t\t'pt' => 'Portuguese (Portugal)',\n\t\t\t'pa' => 'Punjabi',\n\t\t\t'rm' => 'Rhaeto-Romanic',\n\t\t\t'ro-md' => 'Romanian (Moldova)',\n\t\t\t'ro' => 'Romanian',\n\t\t\t'ru-md' => 'Russian (Moldova)',\n\t\t\t'ru' => 'Russian',\n\t\t\t'sa' => 'Sanskrit',\n\t\t\t'sr' => 'Serbian',\n\t\t\t'sk' => 'Slovak',\n\t\t\t'ls' => 'Slovenian',\n\t\t\t'sb' => 'Sorbian',\n\t\t\t'es-ar' => 'Spanish (Argentina)',\n\t\t\t'es-bo' => 'Spanish (Bolivia)',\n\t\t\t'es-cl' => 'Spanish (Chile)',\n\t\t\t'es-co' => 'Spanish (Colombia)',\n\t\t\t'es-cr' => 'Spanish (Costa Rica)',\n\t\t\t'es-do' => 'Spanish (Dominican Republic)',\n\t\t\t'es-ec' => 'Spanish (Ecuador)',\n\t\t\t'es-sv' => 'Spanish (El Salvador)',\n\t\t\t'es-gt' => 'Spanish (Guatemala)',\n\t\t\t'es-hn' => 'Spanish (Honduras)',\n\t\t\t'es-mx' => 'Spanish (Mexico)',\n\t\t\t'es-ni' => 'Spanish (Nicaragua)',\n\t\t\t'es-pa' => 'Spanish (Panama)',\n\t\t\t'es-py' => 'Spanish (Paraguay)',\n\t\t\t'es-pe' => 'Spanish (Peru)',\n\t\t\t'es-pr' => 'Spanish (Puerto Rico)',\n\t\t\t'es-us' => 'Spanish (United States)',\n\t\t\t'es-uy' => 'Spanish (Uruguay)',\n\t\t\t'es-ve' => 'Spanish (Venezuela)',\n\t\t\t'es' => 'Spanish (Traditional Sort)',\n\t\t\t'sx' => 'Sutu',\n\t\t\t'sw' => 'Swahili',\n\t\t\t'sv-fi' => 'Swedish (Finland)',\n\t\t\t'sv' => 'Swedish',\n\t\t\t'syr' => 'Syriac',\n\t\t\t'ta' => 'Tamil',\n\t\t\t'tt' => 'Tatar',\n\t\t\t'te' => 'Telugu',\n\t\t\t'th' => 'Thai',\n\t\t\t'ts' => 'Tsonga',\n\t\t\t'tn' => 'Tswana',\n\t\t\t'tr' => 'Turkish',\n\t\t\t'uk' => 'Ukrainian',\n\t\t\t'ur' => 'Urdu',\n\t\t\t'uz' => 'Uzbek',\n\t\t\t'vi' => 'Vietnamese',\n\t\t\t'xh' => 'Xhosa',\n\t\t\t'yi' => 'Yiddish',\n\t\t\t'zu' => 'Zulu' \n\t);\n\treturn $a_languages;\n}",
"private function setLanguagesList()\n {\n $languagesList = File::directories($this->paths['lang']);\n\n foreach ($languagesList as $key => $language) {\n $this->languagesList[$key] = substr(str_replace($this->paths['lang'], '', $language), 1);\n }\n }",
"public function set_languages() {\n\n\t\t$supported_languages = array(\n\t\t\t'ar' => __( 'Arabic', 'wpmovielibrary-iso' ),\n\t\t\t'bg' => __( 'Bulgarian', 'wpmovielibrary-iso' ),\n\t\t\t'cs' => __( 'Czech', 'wpmovielibrary-iso' ),\n\t\t\t'cn' => __( 'Cantonese', 'wpmovielibrary-iso' ),\n\t\t\t'da' => __( 'Danish', 'wpmovielibrary-iso' ),\n\t\t\t'de' => __( 'German', 'wpmovielibrary-iso' ),\n\t\t\t'el' => __( 'Greek', 'wpmovielibrary-iso' ),\n\t\t\t'en' => __( 'English', 'wpmovielibrary-iso' ),\n\t\t\t'es' => __( 'Spanish', 'wpmovielibrary-iso' ),\n\t\t\t'fa' => __( 'Farsi', 'wpmovielibrary-iso' ),\n\t\t\t'fi' => __( 'Finnish', 'wpmovielibrary-iso' ),\n\t\t\t'fr' => __( 'French', 'wpmovielibrary-iso' ),\n\t\t\t'he' => __( 'Hebrew', 'wpmovielibrary-iso' ),\n\t\t\t'hi' => __( 'Hindi', 'wpmovielibrary-iso' ),\n\t\t\t'hu' => __( 'Hungarian', 'wpmovielibrary-iso' ),\n\t\t\t'it' => __( 'Italian', 'wpmovielibrary-iso' ),\n\t\t\t'ja' => __( 'Japanese', 'wpmovielibrary-iso' ),\n\t\t\t'ko' => __( 'Korean', 'wpmovielibrary-iso' ),\n\t\t\t'nl' => __( 'Dutch', 'wpmovielibrary-iso' ),\n\t\t\t'no' => __( 'Norwegian', 'wpmovielibrary-iso' ),\n\t\t\t'pl' => __( 'Polish', 'wpmovielibrary-iso' ),\n\t\t\t'pt' => __( 'Portuguese', 'wpmovielibrary-iso' ),\n\t\t\t'ru' => __( 'Russian', 'wpmovielibrary-iso' ),\n\t\t\t'sv' => __( 'Swedish', 'wpmovielibrary-iso' ),\n\t\t\t'tr' => __( 'Turkish', 'wpmovielibrary-iso' ),\n\t\t\t'uk' => __( 'Ukrainian', 'wpmovielibrary-iso' ),\n\t\t\t'zh' => __( 'Mandarin', 'wpmovielibrary-iso' ),\n\t\t);\n\n\t\t$standard_languages = array(\n\t\t\t'af' => 'Afrikaans',\n\t\t\t'ar' => 'Arabic',\n\t\t\t'bg' => 'Bulgarian',\n\t\t\t'cn' => 'Cantonese',\n\t\t\t'cs' => 'Czech',\n\t\t\t'da' => 'Danish',\n\t\t\t'de' => 'German',\n\t\t\t'el' => 'Greek',\n\t\t\t'en' => 'English',\n\t\t\t'es' => 'Spanish',\n\t\t\t'fa' => 'Farsi',\n\t\t\t'fi' => 'Finnish',\n\t\t\t'fr' => 'French',\n\t\t\t'he' => 'Hebrew',\n\t\t\t'hi' => 'Hindi',\n\t\t\t'hu' => 'Hungarian',\n\t\t\t'it' => 'Italian',\n\t\t\t'ja' => 'Japanese',\n\t\t\t'ko' => 'Korean',\n\t\t\t'la' => 'Latin',\n\t\t\t'nb' => 'Norwegian BokmÃ¥l',\n\t\t\t'nl' => 'Dutch',\n\t\t\t'no' => 'Norwegian',\n\t\t\t'ny' => 'Chichewa',\n\t\t\t'pl' => 'Polish',\n\t\t\t'pt' => 'Portuguese',\n\t\t\t'ro' => 'Romanian',\n\t\t\t'ru' => 'Russian',\n\t\t\t'sk' => 'Slovak',\n\t\t\t'st' => 'Southern Sotho',\n\t\t\t'sv' => 'Swedish',\n\t\t\t'ta' => 'Tamil',\n\t\t\t'th' => 'Thai',\n\t\t\t'tr' => 'Turkish',\n\t\t\t'uk' => 'Ukrainian',\n\t\t\t'zh' => 'Chinese',\n\t\t\t'xh' => 'Xhosa',\n\t\t\t'zu' => 'Zulu',\n\t\t);\n\n\t\t$native_languages = array(\n\t\t\t'af' => 'Afrikaans',\n\t\t\t'ar' => 'العربية',\n\t\t\t'bg' => 'български език',\n\t\t\t'cn' => '广州话 / 廣州話',\n\t\t\t'cs' => 'Český',\n\t\t\t'da' => 'Dansk',\n\t\t\t'de' => 'Deutsch',\n\t\t\t'el' => 'ελληνικά',\n\t\t\t'en' => 'English',\n\t\t\t'es' => 'Español',\n\t\t\t'fa' => 'فارسی',\n\t\t\t'fi' => 'Suomi',\n\t\t\t'fr' => 'Français',\n\t\t\t'he' => 'עִבְרִית',\n\t\t\t'hi' => 'हिन्दी',\n\t\t\t'hu' => 'Magyar',\n\t\t\t'it' => 'Italiano',\n\t\t\t'ja' => '日本語',\n\t\t\t'ko' => '한국어/조선말',\n\t\t\t'la' => 'Latin',\n\t\t\t'nb' => 'Bokmål',\n\t\t\t'nl' => 'Nederlands',\n\t\t\t'no' => 'Norsk',\n\t\t\t'ny' => 'chiCheŵa, chinyanja',\n\t\t\t'pl' => 'Polski',\n\t\t\t'pt' => 'Português',\n\t\t\t'ru' => 'Pусский',\n\t\t\t'sk' => 'Slovenčina',\n\t\t\t'st' => 'Sesotho',\n\t\t\t'sv' => 'Svenska',\n\t\t\t'ta' => 'தமிழ்',\n\t\t\t'th' => 'ภาษาไทย',\n\t\t\t'tr' => 'Türkçe',\n\t\t\t'uk' => 'Український',\n\t\t\t'zh' => '普通话',\n\t\t\t'xh' => 'isiXhosa',\n\t\t\t'zu' => 'isiZulu',\n\t\t);\n\n\t\t/**\n\t\t * Filter the default supported languages list.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param array $supported_languages\n\t\t */\n\t\tself::$supported_languages = apply_filters( 'wpmoly/filter/l10n/languages/supported', $supported_languages );\n\n\t\t/**\n\t\t * Filter the default standard languages list.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param array $supported_languages\n\t\t */\n\t\tself::$standard_languages = apply_filters( 'wpmoly/filter/l10n/languages/standard', $standard_languages );\n\n\t\t/**\n\t\t * Filter the default native languages list.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param array $supported_languages\n\t\t */\n\t\tself::$native_languages = apply_filters( 'wpmoly/filter/l10n/languages/native', $native_languages );\n\t}"
] | [
"0.7145375",
"0.69903946",
"0.68900585",
"0.64225346",
"0.62331074",
"0.6198266",
"0.6148831",
"0.61099905",
"0.6028522",
"0.5998906",
"0.5950287",
"0.59311175",
"0.5883214",
"0.5877378",
"0.5864022",
"0.5834318",
"0.5801049",
"0.5794452",
"0.57825917",
"0.5777798",
"0.57722133",
"0.5743656",
"0.57022923",
"0.5697709",
"0.5693937",
"0.5683471",
"0.5602769",
"0.5590469",
"0.55652094",
"0.5563085"
] | 0.7484256 | 0 |
Remove form elements to avoid CSRF token or flexible input's value Note: Because php5.3 doesn't allow calling private method inside anonymous function, Use `_` prefix to imply `private` | function _removeForm($node, $marker)
{
if (strtolower($node->tag) === 'form') {
$this->putReplaceMarker($node, $marker);
return;
}
if (strtolower($node->tag) === 'input' && strtolower($node->getAttribute('type')) == 'hidden') {
$originalText = $node->getAttribute('value');
if (strpos($originalText, HtmlReplaceMarker::$keyPrefix) !== false) {
return;
}
$key = $marker->addValue($originalText);
$node->setAttribute('value', $key);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeFormVariables($key, $prefix=true)\n {\n /* Remove all matching GET and POST variables */\n if ($prefix) {\n $key = MYOOS_FORM_VARIABLE_PREFIX . $key;\n }\n unset($_POST[$key]);\n unset($_FILES[$key]);\n unset($_GET[$key]);\n }",
"function business_no_sanitize( $input ) {\n}",
"private function updateFormBasedOnDisableSignatureSetting()\n {\n /** @var FormHelperService $this->formHelper */\n $formHelper = $this->getServiceLocator()->get('Helper\\Form');\n if ($this->continuationDetailData['disableSignatures'] === true) {\n // remove options radio, sign button, checkbox, enable print sign and return fieldset\n $formHelper->remove($this->form, 'content->signatureOptions');\n $formHelper->remove($this->form, 'content->declarationForVerify');\n } else {\n $formHelper->remove($this->form, 'content->disabledReview');\n }\n }",
"function hiddenNodata($field,$value){\r\n $html ='<input type=\"hidden\" value=\"'.$value.'\" name=\"' .$field. '\" />'; //no need to unset\r\n return $html;\r\n }",
"function sanitizeFormPassword($inputText){\n $inputText = strip_tags($inputText); //gets rid off the html elements\n \n return $inputText;\n \n}",
"function globalXssClean()\n\t{\n\t $sanitized = arrayStripTags(Input::all());\n\t Input::merge($sanitized);\n\t}",
"function form_method($method)\n{\n echo '<input type=\"hidden\" name=\"_method\" value=\"' . $method . '\">';\n}",
"public function clearForm(){\n // $this->name = '';\n // $this->price = '';\n // $this->detail = '';\n // $this->status = 1;\n }",
"function csrfInput(){\r\n return '<input type=\"hidden\" value=\"'.$_SESSION['csrf'].'\" name=\"csrf\">';\r\n}",
"protected function cleanRequest()\n {\n // clean request\n if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())\n {\n $_GET = $this->stripSlashes($_GET);\n $_POST = $this->stripSlashes($_POST);\n $_REQUEST = $this->stripSlashes($_REQUEST);\n $_COOKIE = $this->stripSlashes($_COOKIE);\n }\n }",
"private function resetInputFields(){\n $this->name = '';\n $this->email = '';\n $this->user_id = '';\n $this->identification = '';\n $this->address = '';\n $this->phone = '';\n $this->social_network_1 = '';\n $this->social_network_2 = '';\n $this->social_network_3 = '';\n $this->social_network_4 = '';\n $this->hashtag = '';\n $this->history = '';\n }",
"public function removeFormTagFromForms() {\n foreach (CF7::getInstance()->getForms() as $formId) {\n $output = get_post_meta($formId, '_form', true);\n $pattern = '/(\\n\\n\\[wpgdprc?.*\\])/';\n preg_match($pattern, $output, $matches);\n if (!empty($matches)) {\n $output = preg_replace($pattern, '', $output);\n update_post_meta($formId, '_form', $output);\n }\n }\n }",
"function form_hidden($name, $value, $edit = 'edit', $attributes = NULL) {\n return '<input type=\"hidden\" name=\"'. $edit .'['. $name .']\" id=\"'. form_clean_id($edit .'-'. $name) .'\" value=\"'. check_plain($value) .'\"'. drupal_attributes($attributes) .\" />\\n\";\n}",
"public function unset_superglobals()\n {\n unset($this->_POST);\n unset($this->_GET);\n unset($this->_SESSION);\n }",
"public function resetForm() {\n//$this->addDebug(DEBUG_FUNCTION_TRACE);\n $this->name = '';\n $this->formBody = array();\n $this->formPasswordMeterCode = array();\n $this->formCode = array();\n }",
"public function reset()\n {\n /* @var $element FormElement */\n foreach ( $this->elements as $element )\n {\n //TODO remove temp hardcode to avoid token reset\n if( $element->getName() != self::ELEMENT_CSRF_TOKEN )\n {\n $element->setValue(null);\n }\n }\n\n return $this;\n }",
"function form_hidden($hiddens=\"\")\n\t{\n\t\tif (is_array($hiddens))\n\t\t{\n\t\t\tforeach ($hiddens as $v)\n\t\t\t{\n\t\t\t\t$form .= \"\\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $form;\n\t}",
"public function removeInput($name);",
"private function clean() {\n\t\t//--\n\t\tunset($this->input);\n\t\t$this->index = 0;\n\t\t$this->a = $this->b = '';\n\t\tunset($this->c);\n\t\tunset($this->options);\n\t\t//--\n\t}",
"function UnsetRequest()\n {\n \n unset($_REQUEST[\"mus_interperm__INP_ID\"]);\n unset($_REQUEST[\"mus_interperm__INP_NOMBRE\"]);\n }",
"public function decapsulate();",
"private function inputHidden()\n {\n ?>\n <input type=\"hidden\" name=\"_token\" value=\"<?= $this->key_csfr ?>\"/>\n <?php\n }",
"function safePOSTNonMySQL($name){\n if(isset($_POST[$name])){\n return strip_tags($_POST[$name]);\n }else{\n return \"\";\n }\n}",
"protected function removeFields()\n {\n // logged in. In neither case is it appropriate for\n // the user to get to pick an existing userid. The user\n // also doesn't get to modify the validate field which\n // is part of how their account is verified by email.\n\n unset($this['user_id'], $this['validate'], $this['validate_at'],\n $this['created_at'], $this['updated_at'], $this['email_new']);\n\n }",
"function sanitizeFormString($inputText){\n $inputText = strip_tags($inputText); //gets rid off the html elements\n $inputText = str_replace(\" \", \"_\", $inputText); //replace all space with empty strings\n $inputText = ucfirst(strtolower($inputText)); //makes the first letter uppercase\n \n return $inputText;\n \n}",
"protected function _clean(){\r\n if(get_magic_quotes_gpc()){\r\n $this->_data = $this->_stripSlashes($this->_data);\r\n $this->_post = $this->_stripSlashes($this->_post);\r\n $this->_get = $this->_stripSlashes($this->_get);\r\n }\r\n }",
"public function getUnsubmittedEloquaforms();",
"protected function removeExtraFields(Request $request, Form $form)\n {\n $data = $request->request->all();\n $children = $form->all();\n $data = array_intersect_key($data, $children);\n $request->request->replace($data);\n }",
"function UnsetRequest()\n {\n \n unset($_REQUEST[\"mco_producpromo__PPM_ID\"]);\n unset($_REQUEST[\"mco_producpromo__PDU_ID\"]);\n unset($_REQUEST[\"mco_producpromo__PPM_FECHAINI\"]);\n unset($_REQUEST[\"mco_producpromo__PPM_FECHAFIN\"]);\n unset($_REQUEST[\"mco_producpromo__PPM_PRECIOPROM\"]);\n }",
"public function suppress()\n {\n unset($_GET[$this->parameterName]);\n $this->request->offsetUnset($this->parameterName);\n }"
] | [
"0.6127608",
"0.5869888",
"0.5734033",
"0.57249916",
"0.5701873",
"0.5637554",
"0.5618657",
"0.5583589",
"0.5572142",
"0.5559644",
"0.5549259",
"0.5548213",
"0.5541737",
"0.5534998",
"0.5507025",
"0.55047214",
"0.5489734",
"0.5488431",
"0.5482717",
"0.54784304",
"0.54611945",
"0.54563355",
"0.5452523",
"0.5438892",
"0.5436467",
"0.5418083",
"0.539429",
"0.53702873",
"0.53688467",
"0.53554934"
] | 0.6049282 | 1 |
This tests the perform() method with dummy action implementation. | public function testPerform()
{
// create a new mock action implementation
$action = $this->getMock('AppserverIo\Routlt\Mock\MockDispatchAction', array('getServletContext'));
// set the method name
$action->setAttribute(ContextKeys::METHOD_NAME, 'indexAction');
// create a mock servlet request
$servletRequest = $this->getMock('AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface');
$servletRequest->expects($this->once())
->method('getPathInfo')
->will($this->returnValue($result = '/index/index'));
// create a mock servlet response
$servletResponse = $this->getMock('AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface');
$servletResponse->expects($this->once())
->method('appendBodyStream')
->with($result);
// invoke the method we want to test
$action->perform($servletRequest, $servletResponse);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function perform();",
"protected function perform()\n {\n }",
"abstract public function doAction();",
"public function perform() {\n // TODO: Implement perform() method.\n }",
"public function executeAction()\n {\n throw new Frapi_Error('NOT_IMPLEMENTED');\n }",
"public function test_it_works() {\n\t\t$this->assertTrue( \\function_exists( 'do_action' ) );\n\t}",
"abstract function execute($action);",
"abstract public function execute(Action $action);",
"public function testGetAction()\r\n\t{\r\n\t}",
"protected abstract function perform(...$args);",
"public function executeAction();",
"function test_dispatch() {\n\t\t// NB: The dispatcher makes use of get_raw_data() which may not work\n\t\t// properly with unit tests, so that might need a workaround.\n\t\t$this->markTestIncomplete('Missing test implementation.');\n\t}",
"abstract public function actionsForPassed( $result );",
"public function testExecute()\n {\n $this->shipmentLoaderMock->expects($this->once())\n ->method('load')\n ->will($this->returnValue($this->shipmentMock));\n $this->labelGenerator->expects($this->once())\n ->method('create')\n ->with($this->shipmentMock, $this->requestMock)\n ->will($this->returnValue(true));\n $this->shipmentMock->expects($this->once())->method('save')->will($this->returnSelf());\n $this->messageManagerMock->expects($this->once())->method('addSuccess');\n $this->responseMock->expects($this->once())->method('representJson');\n\n $this->assertNull($this->controller->execute());\n }",
"public function dispatch(): void;",
"public function dispatch(): void;",
"public function executeAction()\n {\n throw new Frapi_Error('METHOD_NOT_ALLOWED');\n }",
"public function testRecordActionWithNotInitializedTarget() {\n\t\t$this->User->id = 1;\n\t\t$this->Article->create();\n\n\t\t$this->User->recordAction('like', $this->Article);\n\t}",
"public function test_execute()\n {\n\n $viewFactory = m::mock('Illuminate\\Contracts\\View\\Factory');\n $request = m::spy('Payum\\Core\\Request\\RenderTemplate');\n $templateName = 'foo.template';\n $parameters = [];\n $result = 'foo';\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $request\n ->shouldReceive('getTemplateName')->andReturn($templateName)\n ->shouldReceive('getParameters')->andReturn($parameters);\n\n $viewFactory\n ->shouldReceive('make')->with($templateName, $parameters)->andReturnSelf()\n ->shouldReceive('render')->andReturn($result);\n\n $renderTemplateAction = new RenderTemplateAction($viewFactory);\n $renderTemplateAction->execute($request);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $request->shouldHaveReceived('getTemplateName')->once();\n $request->shouldHaveReceived('getParameters')->once();\n $request->shouldHaveReceived('setResult')->with($result)->once();\n }",
"public function testGetDefaultAction()\n {\n $this->assertSame(sprintf('%sAction', DispatchAction::DEFAULT_METHOD_NAME), $this->action->getDefaultMethod());\n }",
"protected function performStep()\n {\n }",
"public function testExecute()\n\t{\n\t\t// Manually inject the dispatcher.\n\t\tTestReflection::setValue($this->class, 'dispatcher', $this->getMockDispatcher());\n\n\t\t// Register all the methods so that we can track if they have been fired.\n\t\t$this->class->registerEvent('onBeforeExecute', 'JWebTestExecute-onBeforeExecute')\n\t\t\t->registerEvent('JWebDoExecute', 'JWebTestExecute-JWebDoExecute')\n\t\t\t->registerEvent('onAfterExecute', 'JWebTestExecute-onAfterExecute');\n\n\t\t$this->class->execute();\n\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\t'onBeforeExecute',\n\t\t\t\t'JWebDoExecute',\n\t\t\t\t'onAfterExecute',\n\t\t\t),\n\t\t\tTestMockDispatcher::$triggered\n\t\t);\n\t}",
"public function testExecute()\n {\n $page = $this->createPartialMock(\n \\Magento\\Framework\\View\\Result\\Page::class,\n ['setActiveMenu', 'addBreadcrumb', 'getConfig']\n );\n $title = $this->createMock(\\Magento\\Framework\\View\\Page\\Title::class);\n $config = $this->createMock(\\Magento\\Framework\\View\\Page\\Config::class);\n $page->expects($this->any())->method('getConfig')->will($this->returnValue($config));\n $config->expects($this->any())->method('getTitle')->will($this->returnValue($title));\n $this->quote->expects($this->any())->method('getId')\n ->will($this->returnValue(1));\n\n $result = $this->controller->execute();\n $this->assertInstanceOf(\\Magento\\Framework\\Controller\\ResultInterface::class, $result);\n }",
"protected abstract function perform($task);",
"public function testAction()\n {\n $this->assertEmpty($this->Authorizer->getData());\n\n $this->Authorizer->action('index', function($auth) {\n\n });\n\n $this->assertNotEmpty($this->Authorizer->getData());\n }",
"public function testThrowAction()\n {\n $res = $this->controller->throwAction();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }",
"public function testPlayActionPost()\n {\n $res = $this->controller->playActionPost();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }",
"public function testresultActionPostDefaultInput()\n {\n $result = $this->controller->resultActionPost();\n $this->assertInstanceOf(\"Anax\\Response\\Response\", $result);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $result);\n }",
"abstract protected function doExecute(Invocation $invocation);",
"public function testExample(): void\n {\n $facadeResult = $this->facadeController->__invoke(\n [\n 1,\n 2\n ],\n 6000,\n 10000\n );\n\n $this->assertNotEmpty($facadeResult);\n }"
] | [
"0.7394945",
"0.7222261",
"0.7004042",
"0.68904376",
"0.67537224",
"0.67259395",
"0.6720883",
"0.6672998",
"0.6672148",
"0.65715444",
"0.6490105",
"0.6440761",
"0.64287955",
"0.6415809",
"0.62585014",
"0.62585014",
"0.6156044",
"0.6149705",
"0.6141134",
"0.6108297",
"0.606793",
"0.60570496",
"0.60291225",
"0.6028214",
"0.5971739",
"0.5960774",
"0.59327817",
"0.5926893",
"0.5918287",
"0.5871932"
] | 0.734924 | 1 |
Test that the getServletRequest() method returns the expected ServletRequest instance. | public function testGetServletRequest()
{
// create and set the mock servlet request
$this->action->setServletRequest($servletRequest = $this->getMock('AppserverIo\Psr\Servlet\Http\HttpServletRequestInterface'));
// query whether the instances are identically
$this->assertSame($servletRequest, $this->action->getServletRequest());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetRequest()\n {\n $this->assertInstanceOf('\\Psr\\Http\\Message\\RequestInterface', $this->container->get('request'));\n }",
"public function testGetRequest()\n {\n $this->assertInstanceOf(RequestInterface::class, $this->container['request']);\n }",
"public function testGetRequest()\n {\n $c = new Container;\n $this->assertInstanceOf('\\Psr\\Http\\Message\\RequestInterface', $c['request']);\n }",
"public function testRequest() {\n $builder = new Builder();\n $this->assertInstanceOf(Request::class, $builder->request($this->createMock(Request::class)));\n }",
"public function testRequest() {\n $parser = new Parser();\n $request = $this->createMock(Request::class);\n\n $this->assertNull($parser->request());\n $this->assertInstanceOf(Request::class, $parser->request($request));\n $this->assertNull($parser->request());\n }",
"public function testRequest() {\n $builder = new Builder();\n $request = $this->createMock(Request::class);\n\n $this->assertNull($builder->request());\n $this->assertInstanceOf(Request::class, $builder->request($request));\n $this->assertNull($builder->request());\n }",
"public function testRequestIsPassedCorrectly()\n {\n $value = $this->get_reflection_property_value('request');\n\n $this->assertSame($value, $this->request);\n }",
"public function testGetReturnsNullWithNonGetRequest() {\n\n $server['REQUEST_METHOD'] = 'POST';\n\n $request = ServerRequestFactory::fromGlobals($server, ['var' => 'set']);\n $this->assertNull($request->get('var'));\n }",
"public function getRequest()\n {\n if (!self::$request) {\n $this->mockClass('Symfony\\Component\\HttpFoundation\\Request', '\\Mock');\n\n self::$request = new \\Mock\\Request();\n }\n\n return self::$request;\n }",
"public function testGetRequest0()\n{\n\n // Traversed conditions\n // if ($this->container->has('request_stack')) == false (line 64)\n\n $actual = $this->globalVariables->getRequest();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testGetRequest1()\n{\n\n // Traversed conditions\n // if ($this->container->has('request_stack')) == true (line 64)\n\n $actual = $this->globalVariables->getRequest();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testWithRequestTarget(): void\n {\n $request = new ServerRequest([\n 'environment' => [\n 'REQUEST_URI' => '/articles/view/1',\n 'QUERY_STRING' => 'comments=1&open=0',\n ],\n 'base' => '/basedir',\n ]);\n $this->assertSame(\n '/articles/view/1?comments=1&open=0',\n $request->getRequestTarget(),\n 'Should not include basedir.'\n );\n\n $new = $request->withRequestTarget('/articles/view/3');\n $this->assertNotSame($new, $request);\n $this->assertSame(\n '/articles/view/1?comments=1&open=0',\n $request->getRequestTarget(),\n 'should be unchanged.'\n );\n $this->assertSame('/articles/view/3', $new->getRequestTarget(), 'reflects method call');\n }",
"private function getRequest()\n\t{\n\t\treturn Mockery::mock('\\Illuminate\\Http\\Request');\n\t}",
"public function mockRequest(): Request\n\t{\n\t\treturn $this->createMock(Request::class);\n\t}",
"protected function mockRequest()\n {\n return $this->createMock(ServerRequestInterface::class);\n }",
"function get_request(): ServerRequestInterface\n{\n $request = Container::get('request');\n\n if (is_null($request)) {\n $request = HttpFactory::createRequest();\n Container::set('request', $request);\n }\n\n return $request;\n}",
"public function getRequest()/*# : RequestInterface */;",
"public function testInstance0()\n{\n\n $actual = $this->request->instance();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testMatches()\n {\n $matcher = new \\Bundle\\FeedImportBundle\\Component\\HttpFoundation\\RequestMatcher();\n $request = $this->getMock('\\Symfony\\Component\\HttpFoundation\\Request');\n $this->assertEquals(\n $matcher::HTTP_OK,\n $matcher->matches($request)\n );\n }",
"public function getRequest(): RequestInterface;",
"public function getRequest()\n {\n return $this->request ?: \\Symfony\\Component\\HttpFoundation\\Request::createFromGlobals();\n }",
"public function testMatchWithRequest()\n {\n\n $router = $this->getMockBuilder('\\AltoRouterDebug')\n ->setMethods(array('getRequestURI', 'getRequestMethod'))\n ->getMock();\n $router->method('getRequestURI')\n ->willReturn('/foo/test/do');\n $router->method('getRequestMethod')\n ->willReturn('POST');\n $router->map(\n 'POST',\n '/foo/[:controller]/[:action]',\n 'foo_action',\n 'foo_route'\n );\n $this->assertEquals(\n array(\n 'target' => 'foo_action',\n 'params' => array(\n 'controller' => 'test',\n 'action' => 'do',\n 'method' => 'POST'\n ),\n 'name' => 'foo_route'\n ),\n $router->match()\n );\n }",
"public function testGetVersion()\n {\n\n // create a stub for the ServletRequest interface\n $stub = $this->getMock('\\AppserverIo\\Psr\\Servlet\\ServletRequestInterface');\n\n // Configure the stub.\n $stub->expects($this->any())\n ->method('getVersion')\n ->will($this->returnValue($version = 'HTTP/1.1'));\n\n // create a new wrapper instance\n $wrapper = new ServletRequestWrapper();\n $wrapper->injectRequest($stub);\n\n // check if the version has been returned\n $this->assertSame($version, $wrapper->getVersion());\n }",
"public function getRequest(): Request;",
"public function getRequest(): Request;",
"public function getRequest(): RequestInterface\n {\n }",
"abstract protected function _validateRequest(\\Zend_Controller_Request_Abstract $request);",
"public function test_correct_output()\n {\n // get current request.\n $currentRequest = Request::current();\n\n // asset the output request is an instance of symfony request.\n $this->assertInstanceOf(SymfonyRequest::class, $currentRequest);\n }",
"public function test_request_instance_is_always_the_same()\n {\n // get two current request instances from request static method.\n $instanceOne = Request::current();\n $instanceTwo = Request::current();\n\n // instances one and two should be the same.\n $this->assertSame($instanceOne, $instanceTwo);\n\n // clone a instance to verify the same.\n $instanceThree = clone $instanceTwo;\n\n // instance two and three should be different.\n $this->assertNotSame($instanceTwo, $instanceThree);\n }",
"public function test_psr7_request(): void {\n\t\t$http = new HTTP();\n\t\t$request = $http->psr7_request(\n\t\t\t'GET',\n\t\t\t'https://google.com'\n\t\t);\n\n\t\t$this->assertInstanceOf( RequestInterface::class, $request );\n\t\t$this->assertEquals( 'GET', $request->getMethod() );\n\t\t$this->assertInstanceOf( UriInterface::class, $request->getUri() );\n\t\t$this->assertEquals( 'google.com', $request->getUri()->getHost() );\n\t}"
] | [
"0.7980566",
"0.7907261",
"0.76707643",
"0.7160754",
"0.7064895",
"0.70395786",
"0.7031503",
"0.6933058",
"0.69027287",
"0.67846924",
"0.6722662",
"0.6660193",
"0.66194487",
"0.6581737",
"0.65736586",
"0.6539919",
"0.65321076",
"0.64227897",
"0.6417254",
"0.63736254",
"0.6371057",
"0.6308318",
"0.6302787",
"0.6272447",
"0.6272447",
"0.6254854",
"0.62209284",
"0.6210558",
"0.61970615",
"0.618004"
] | 0.87466985 | 0 |
Test that the getServletResponse() method returns the expected ServletResponse instance. | public function testGetServletResponse()
{
// create and set the mock servlet response
$this->action->setServletResponse($servletResponse = $this->getMock('AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface'));
// query whether the instances are identically
$this->assertSame($servletResponse, $this->action->getServletResponse());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetResponse()\n {\n $this->assertInstanceOf('\\Psr\\Http\\Message\\ResponseInterface', $this->container->get('response'));\n }",
"public function testGetResponse()\n {\n $this->assertInstanceOf(Response::class, $this->getResponse());\n }",
"public function testGetResponse()\n {\n $c = new Container;\n $this->assertInstanceOf('\\Psr\\Http\\Message\\ResponseInterface', $c['response']);\n }",
"public function testGetResponse()\n {\n $this->assertInstanceOf(ResponseInterface::class, $this->container['response']);\n }",
"public function testGetVersion()\n {\n\n // create a stub for the ServletRequest interface\n $stub = $this->getMock('\\AppserverIo\\Psr\\Servlet\\ServletRequestInterface');\n\n // Configure the stub.\n $stub->expects($this->any())\n ->method('getVersion')\n ->will($this->returnValue($version = 'HTTP/1.1'));\n\n // create a new wrapper instance\n $wrapper = new ServletRequestWrapper();\n $wrapper->injectRequest($stub);\n\n // check if the version has been returned\n $this->assertSame($version, $wrapper->getVersion());\n }",
"abstract public function getExpectedResponse(): string;",
"public function testResponse() {\n $builder = new Builder();\n $this->assertInstanceOf(Response::class, $builder->response($this->createMock(Response::class)));\n }",
"public function testJustResponseFullfilled()\n {\n $renderSimpleMock = $this->getMock(\n SimpleRenderer::class,\n ['render'],\n [$this->helperManagerMock, [], $this->factoryMock, $this->wpMock]\n );\n\n $renderSimpleMock->expects($this->once())\n ->method('render')\n ->with($this->stubPath, $this->stubArgs)\n ->willReturn($this->stubContent);\n\n $responseMock = $this->getMockBuilder(ResponseInterface::class)->getMock();\n $streamMock = $this->getMockBuilder(StreamInterface::class)->getMock();\n\n $responseMock->expects($this->once())->method('getBody')->willReturn($streamMock);\n $streamMock->expects($this->once())->method('write')->with($this->stubContent);\n\n $this->assertEquals(\n $responseMock,\n $renderSimpleMock->response(\n $responseMock,\n $this->stubPath,\n $this->stubArgs\n )\n );\n }",
"public function testResponse() {\n $parser = new Parser();\n $response = $this->createMock(Response::class);\n\n $this->expectException(Exception::class);\n $parser->response($response);\n }",
"public function testControllerReturnsResponse()\n {\n $controller = new YatzyProcessor();\n\n $exp = \"\\Psr\\Http\\Message\\ResponseInterface\";\n $res = $controller();\n $this->assertInstanceOf($exp, $res);\n }",
"public function testResponseType()\n {\n $this->assertNotNull(self :: $beerMapResponse);\n\n $expectedType = 'Response\\BeerMapClientResponse\\BeerMapClientResponse';\n\n $this->assertEquals(\n get_class(self :: $beerMapResponse), $expectedType,\n \"Response isnt of expected type : $expectedType\"\n );\n }",
"public function testGetServletRequest()\n {\n\n // create and set the mock servlet request\n $this->action->setServletRequest($servletRequest = $this->getMock('AppserverIo\\Psr\\Servlet\\Http\\HttpServletRequestInterface'));\n\n // query whether the instances are identically\n $this->assertSame($servletRequest, $this->action->getServletRequest());\n }",
"public static function getMockResponse()\n {\n return self::$mockResponse;\n }",
"public function getInternalResponse(): HttpResponseInterface;",
"public function testPlayActionGet()\n {\n $res = $this->controller->playActionGet();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }",
"private function getBaseMockResponse()\n {\n return $this->getMock('Psr\\Http\\Message\\ResponseInterface');\n }",
"protected function mockResponse()\n {\n return $this->createMock(ResponseInterface::class);\n }",
"public function testplayActionGet()\n {\n // echo var_dump($this->app);\n $res = $this->controller->playActionGet();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }",
"public function test_correct_output()\n {\n // get current request.\n $currentRequest = Request::current();\n\n // asset the output request is an instance of symfony request.\n $this->assertInstanceOf(SymfonyRequest::class, $currentRequest);\n }",
"public function testSimple() : void {\n\t\t$url = self::$server->setResponseOfPath(\n\t\t\t'/definedPath',\n\t\t\tnew Response(\n\t\t\t\t'This is our http body response',\n\t\t\t\t[ 'X-Foo-Bar' => 'BazBazBaz' ],\n\t\t\t\t200\n\t\t\t)\n\t\t);\n\n\t\t$content = file_get_contents($url);\n\t\t$this->assertContains('X-Foo-Bar: BazBazBaz', $http_response_header);\n\t\t$this->assertEquals(\"This is our http body response\", $content);\n\t}",
"public function testResponses() {\n // Test that event subscriber does not interfere with normal requests.\n $url = Url::fromRoute('render_array_non_html_subscriber_test.render_array');\n\n $this->drupalGet($url);\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains(\"Controller response successfully rendered.\");\n\n // Test that correct response code is returned for any non-HTML format.\n foreach (['json', 'hal+json', 'xml', 'foo'] as $format) {\n $url = Url::fromRoute('render_array_non_html_subscriber_test.render_array', [\n '_format' => $format,\n ]);\n\n $this->drupalGet($url);\n $this->assertSession()->statusCodeEquals(406);\n $this->assertSession()->pageTextNotContains(\"Controller response successfully rendered.\");\n }\n\n // Test that event subscriber does not interfere with raw string responses.\n $url = Url::fromRoute('render_array_non_html_subscriber_test.raw_string', [\n '_format' => 'foo',\n ]);\n\n $this->drupalGet($url);\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->responseContains(\"Raw controller response.\");\n }",
"public function testOnKernelResponse(): void\n {\n $this->attributes\n ->expects($this->once())\n ->method('isListenerActive')\n ->with('dummy')\n ->willReturn(true);\n\n /** @var FilterResponseEvent|MockObject $event */\n $event = $this->getMockBuilder(FilterResponseEvent::class)\n ->disableOriginalConstructor()\n ->getMock();\n $event\n ->method('getRequest')\n ->willReturn($this->request);\n $event\n ->method('getResponse')\n ->willReturn($this->response);\n\n $this->listener->onKernelResponse($event);\n\n $this->assertEquals('en', $this->request->getLocale());\n }",
"abstract protected function getResponse(): ResponseInterface;",
"protected function setUp(): void\n {\n\n /*********************************************************\n * Enumerate our responses\n *********************************************************/\n $response = new BasicResponse(\n 'http', 'www.jasig.org', '/some/path'\n );\n $response->ensureIsGet();\n $response->setResponseHeaders(\n array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',\n 'Server: Apache-Coyote/1.1', 'Pragma: no-cache',\n 'Expires: Thu, 01 Jan 1970 00:00:00 GMT',\n 'Cache-Control: no-cache, no-store',\n 'Content-Type: text/html;charset=UTF-8',\n 'Content-Language: en-US', 'Via: 1.1 cas.example.edu',\n 'Connection: close', 'Transfer-Encoding: chunked',\n )\n );\n $response->setResponseBody(\"I am Jasig\");\n DummyRequest::addResponse($response);\n\n $response = new BasicResponse(\n 'http', 'www.example.org', '/some/other/path'\n );\n $response->ensureIsGet();\n $response->setResponseHeaders(\n array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',\n 'Server: Apache-Coyote/1.1', 'Pragma: no-cache',\n 'Expires: Thu, 01 Jan 1970 00:00:00 GMT',\n 'Cache-Control: no-cache, no-store',\n 'Content-Type: text/html;charset=UTF-8',\n 'Content-Language: en-US', 'Via: 1.1 cas.example.edu',\n 'Connection: close', 'Transfer-Encoding: chunked',\n )\n );\n $response->setResponseBody(\"I am Example\");\n DummyRequest::addResponse($response);\n\n $response = new BasicResponse(\n 'http', 'www.educause.edu', '/path'\n );\n $response->ensureIsGet();\n $response->setResponseHeaders(\n array('HTTP/1.1 200 OK', 'Date: Wed, 29 Sep 2010 19:20:57 GMT',\n 'Server: Apache-Coyote/1.1', 'Pragma: no-cache',\n 'Expires: Thu, 01 Jan 1970 00:00:00 GMT',\n 'Cache-Control: no-cache, no-store',\n 'Content-Type: text/html;charset=UTF-8',\n 'Content-Language: en-US', 'Via: 1.1 cas.example.edu',\n 'Connection: close', 'Transfer-Encoding: chunked',\n )\n );\n $response->setResponseBody(\"I am Educause\");\n DummyRequest::addResponse($response);\n\n }",
"public function assert(ResponseInterface $response);",
"public function testGetResponseWithException()\n {\n $mock = m::mock(\n 'Estey\\ReactMiddleware\\CompileReact[getCompilerUrl]',\n [$this->config]\n )->shouldAllowMockingProtectedMethods();\n\n $this->setInaccessible($mock, 'view', $this->view);\n $this->setInaccessible($mock, 'query', []);\n\n $mock->shouldReceive('getCompilerUrl')->once()->andReturn('localhost');\n\n $client = m::mock('GuzzleHttp\\Client');\n $response = m::mock('Psr\\Http\\Message\\ResponseInterface');\n\n $this->view\n ->shouldReceive('getData')\n ->once()\n ->andReturn(['foo' => 'bar']);\n\n $this->config\n ->shouldReceive('get')\n ->once()\n ->with('react.connect_timeout', 0)\n ->andReturn(1);\n\n $this->config\n ->shouldReceive('get')\n ->once()\n ->with('react.timeout', 0)\n ->andReturn(15);\n\n $options = [\n 'query' => [],\n 'json' => ['foo' => 'bar'],\n 'connect_timeout' => 1,\n 'timeout' => 15\n ];\n\n $client\n ->shouldReceive('request')\n ->once()\n ->with('POST', 'localhost', $options)\n ->andThrow(m::mock('Exception'));\n\n $this->assertNull(\n $this->callInaccessibleMethod($mock, 'getResponse', [$client])\n );\n }",
"public function testResponse() {\n $builder = new Builder();\n $response = $this->createMock(Response::class);\n\n $this->expectException(Exception::class);\n $builder->response($response);\n }",
"public function testShutdownReturnsTheResponseObject()\n {\n $response = $this->mockResponse();\n $response->expects($this->once())\n ->method('getHeader')\n ->with(\n 'Set-Cookie'\n )\n ->willReturn([]);\n $response->expects($this->once())\n ->method('withoutHeader')\n ->with(\n 'Set-Cookie'\n )\n ->willReturn($response)\n ;\n $response->expects($this->once())\n ->method('withAddedHeader')\n ->willReturn($response)\n ;\n $storage = new CookieStorage([\n 'encryption.key' => $this->keyString\n ]);\n $return = $storage->shutdown([], $response);\n $this->assertEquals($response, $return);\n }",
"public function testHomepageGetResponse()\n {\n $this->get('/')\n ->assertStatus(200);\n }",
"function get_response() {\n\t\treturn $this->response;\n\t}"
] | [
"0.7060237",
"0.69305795",
"0.6925759",
"0.6739684",
"0.61562276",
"0.61401594",
"0.61248684",
"0.6100095",
"0.6072122",
"0.60715735",
"0.6044573",
"0.5968934",
"0.59573805",
"0.59041977",
"0.58884776",
"0.5843284",
"0.5785346",
"0.57803714",
"0.577922",
"0.5743039",
"0.5734839",
"0.5734289",
"0.5733623",
"0.5724771",
"0.57119894",
"0.5706236",
"0.5696012",
"0.5673888",
"0.5647011",
"0.5643605"
] | 0.8683336 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.