query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
set last query to present query
public function query($sql){ //for debug purposes $this->lastQuery = $sql; $result = mysqli_query($this->conn, $sql); $this->confirmQuery($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function setLastQuery($newQuery = \"\")\r\n {\r\n $_SESSION[\"last_query\"] = $newQuery;\r\n }", "protected function resetLastQuery(): void\n {\n $this->lastQuery = null;\n }", "function lastQuery() {\n\t\treturn $this->lastQuery;\n\t}", "public function getLastQuery(): Query;", "public function lastQuery() {\r\n\r\n\t\treturn $this -> lastQuery;\r\n\r\n\t}", "public function getLastQuery(){\n\t\treturn $this->lastQuery;\n\t}", "public function lastQuery() {\n return $this->last_query;\n }", "public function get_last_query(){\n\t\treturn $_POST[\"__query___\"][ count( $_POST[\"__query___\"] ) - 1 ];\n\t}", "public function lastQuery() {\n\t\treturn $this->mLastQuery;\n\t}", "public static function getLastQuery()\n {\n return self::$lastQuery;\n }", "public function flushQuery()\n\t{\n\t\t$this->cur_query = \"\";\n\t}", "public function GetLastQuery()\r\n {\r\n return $this->_LastQuery;\r\n }", "static function getLastQuery()\r\n {\r\n return $_SESSION[\"last_query\"];\r\n }", "public function GetLastQuery()\r\n\t{\r\n\t\treturn $this->_lastQuery;\r\n\t}", "public function updateQueryTime()\n\t{\n\t\t$this->setLastQueryTime(time());\n\t\t$this->save();\n\t}", "function last_query()\n\t{\n\t\treturn $this->db->last_query();\n\t}", "public function getLastQuery()\n {\n $query_num = $this->query_count - 1;\n if ($query_num < 0) {\n return \"\";\n } else {\n return $this->queries[$this->query_count - 1];\n }\n }", "public function set_default_query($query){\n $this->default_query = $query;\n }", "protected function resetQuery()\n {\n array_forget($this->query, ['start', 'end']);\n }", "function set_query($query) {\n\t\t\t// it just sets the query with which to get a recordset\n\t\t\t$this->query = $query;\n\t\t}", "public function after($query);", "public function getLastQuery(): string;", "public function resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}", "public function getLastSelect();", "public function lastQuery($query = \"query\")\n\t{\n\n\t\ttry \n\t\t{\n\t\t\tif(empty($this->connection))\n\t\t\t{\n\t\t\t\t$this->openConnection();\n\n\t\t\t\tif($this->config->connector == \"mysql\")\n\t\t\t\t{\n\t\t\t\t\t$this->lastQuery = mysql_query($query);\n\t\t\t\t}\n\t\t\t\telseif($this->config->connector == \"mysqli\")\n\t\t\t\t{\n\t\t\t\t\t$this->lastQuery = mysqli_query($this->connection, ($query));\n\t\t\t\t}\n\n\t\t\t\t$this->closeConnection();\n\n\t\t\t\treturn $this->lastQuery;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->config->connector == \"mysql\")\n\t\t\t\t{\n\t\t\t\t\t$this->lastQuery = mysql_query($query);\n\t\t\t\t}\n\t\t\t\telseif($this->config->connector == \"mysqli\")\n\t\t\t\t{\n\t\t\t\t\t$this->lastQuery = mysqli_query($this->connection, ($query));\n\t\t\t\t}\n\n\t\t\t\treturn $this->lastQuery;\n\t\t\t}\n\n\t\t} \n\n\t\tcatch (Exception $e) \n\t\t{\n\t\t\treturn $e;\n\t\t}\n\t}", "public function setQuery(rbQuery &$query) {\n $this->query =& $query;\n }", "public function last(): QueryInterface\n\t{\n\t\tif ($this->isEmpty()) {\n\t\t\treturn new Query();\n\t\t}\n\n\t\treturn $this[$this->count() - 1];\n\t}", "function addQuery() {}", "function setParamsToSaveQuery()\n {\n \n \n if($this->form->getQuery())\n {\n $stringTmp=$this->form->getQuery()->getSqlQuery();\n $stringTmp=substr($stringTmp, strpos($stringTmp,' FROM ' ));\n $stringTmp=substr($stringTmp, 0, strpos($stringTmp,' LIMIT ' ));\n $this->getUser()->setAttribute('queryToSaveWhere', $stringTmp);\n }\n \n if($this->form->getQuery()->getParams())\n {\n $stringTmp=\"\";\n $arrayTmp=$this->form->getQuery()->getParams();\n if(isset($arrayTmp['where']))\n {\n foreach($arrayTmp['where'] as $key=>$value)\n {\n $stringTmp.=\";|\".$value.\"|\";\n }\n $this->getUser()->setAttribute('queryToSaveParams', $stringTmp);\n }\n }\n return;\n }", "public function showPreviousQuery(){\n\n\t\t\treturn $this->lastQuery;\n\t\t}", "public function flushQuery();", "private function resetQuery() {\r\n\t\tunset($this->query);\r\n\t\t$this->query = $this->createQuery();\r\n\t\tunset($this->queryConstraints);\r\n\t\t$this->queryConstraints = array();\r\n\t}", "public function setQuery($query);", "protected function dbReset() {\r\n $this->query_result = '';\r\n }", "protected function resetQuery()\n {\n $this->bindings = [];\n $this->types = [];\n }", "public function getLastQuery(): string\n {\n return array_values(array_slice($this->History, -1))[0];\n }", "protected function getLastUpdateQuery()\n {\n return $this->lastUpdateQuery;\n }", "public static function flushQueryLog()\n {\n }", "function _logLastQuery($marca = null){\n $CI =& get_instance();\n log_message('error', $marca.' - '.$CI->db->last_query());\n }", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "function lastId()\n {\n return isset($this->_query) ? $this->_query->lastId() : $this->_lastid;\n }", "public function setQuery($query) {\r\n $this->query = $query;\r\n }", "public function resetQuery(): ?Builder;", "public function setQuery( $query ){\n \n $this->query = $query;\n \n }", "public function last();", "public function last();", "public function last();", "private function finalize() {\n $this->_log_queries[] = $this->_active_query;\n $this->_active_query = empty($this->_hold_queries) ? NULL : array_pop($this->_hold_queries);\n }", "protected function finalizeQueryObject() {\n // Inject the meta and tax query\n if (count($this->metaQuery) > 1) {\n $this->getContext('query')->set('meta_query', $this->metaQuery);\n }\n\n // Inject the tax and tax query\n if (count($this->taxQuery) > 1) {\n $this->getContext('query')->set('tax_query', $this->taxQuery);\n }\n\n // Refresh the query object\n $this->getContext('query')->query($this->getContext('query')->query_vars);\n\n // Custom data attributes for helping\n // with fancy pagination\n $this->addData('max-pagination', $this->getContext('query')->max_num_pages);\n $this->addData('current-page', max(1, $this->getContext('query')->query_vars['paged']));\n\n // Mark as last page\n if ($this->getData('max-pagination') == $this->getData('current-page')) {\n $this->addContext('lastpage', true);\n }\n\n return $this;\n }", "public function getLastQueryResult()\n {\n return $this->aLastResult;\n }", "private function resetQuery()\n {\n $this->cols('*');\n }", "public function SetLastRecord($record){$this->_lastrecord = $record;}", "public function setQuery(Query $query) \n\t{\n\t\t$this->query = $query;\n\t}", "public static function resetQueryCount() {\n \tself::$queryCount = 0;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n }", "private function q($query) {\n $this->last_query = $query;\n $this->result = mysql_query($query,$this->link) or $this->err(mysql_error());\n $this->queries++;\n $this->affected_rows = mysql_affected_rows($this->link);\n if(is_resource($this->result)) {\n $this->num_rows = mysql_num_rows($this->result);\n } else {\n $this->num_rows = 0;\n }\n \n $this->insert_id = mysql_insert_id($this->link); // <-- Ugly sollution, I know\n }", "public function hook_query(&$query)\n {\n \n }", "public function hook_query(&$query)\n {\n \n }", "function flush(){\n\t\t$this->last_result = array();\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "function query() {\n $this->field_alias = $this->real_field;\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}", "public function getLastsQuery(int $count): Query;", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function query() {\n $this->field_alias = $this->real_field;\n }", "public function lastQuery( $format = null )\n {\n if( $format == 'json' )\n return json_encode( $this->_queryLog );\n\n return $this->_queryLog;\n }", "public function init_save_queries()\n {\n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public function editSaveQuery() {\n\t\t$this->expiredStatusToQuery('expired', 'expiration');\n\t}", "protected function getLastSql() {\n return $this->last_sql;\n }", "public function next_query(array $query)\n\t{\n\t\t$this->_next_query = $query;\n\t}", "function log_query($query)\n\t\t{\n\t\t\t// Log how the last function was called\n\t\t\t$this->func_call = $query;\n\t\t\t\n\t\t\t// Keep an running Log of all functions called\n\t\t\tarray_push($this->all_func_calls, $this->func_call);\n\t\t}", "public function query($query){\n\t\t$this->lastQuery = $query;\n\t\treturn $this->connection->query($query);\n\t}", "protected function afterQuery() {\n\n // Make WP_User_Query behaves like WP_Query\n if ($this->query['number'] && $this->total_users) {\n $this->max_num_pages = ceil($this->total_users / $this->query['number']);\n }\n\n foreach ($this->results as $key => $user) {\n if ($user instanceof WP_User) {\n do_action('vtcore_wordpress_pre_get_user_object', $this->results[$key]);\n }\n }\n }", "public function set_simple_query($query) {\n $this->query = \"\";\n $this->query = $query;\n //print $this->query;\n $this->execute_single_query();\n if(empty($this->err)):\n $this->err = 6;\n $this->msj = \"La transaccion se registro correctamente. \";\n endif; \n \n }", "public function flushQueryLog()\n\t{\n\t\t$this->neoeloquent->flushQueryLog();\n\t}", "public function setQuery($query)\n {\n $this->parameters['query'] = $query;\n }", "public function LogQueries($q){\n\t\t$this->queries = $q;\n\t\treturn $this;\n\t}", "public function LogQueries($q){\n\t\t$this->queries = $q;\n\t\treturn $this;\n\t}", "public function setQuery($query){\n\t $this->instance->setQuery($query);\n\t\treturn true;\n\t}", "public function getLastQueryTime()\n\t{\n\t\treturn strftime($this->last_query_time);\n\t}", "public function clearQueries(): void\n {\n $this->queries = [];\n }", "public function set_base_query_outcome(){\n\t\t$alias_header_name = array( \"income_id\" , \"divisi_name\" , \"divisisub_name\" , 'jumlah' , 'tanggal', 'updated_at' );\n\t\t$first = sprintf( '\n\t\t\tselect main.id as %1$s , third.nama as %2$s, second.nama as %3$s,\n\t\t\tmain.jumlah as %4$s , main.tanggal as %5$s , main.updated_at as %6$s\n\t\t\tfrom outcome main , divisi third , divisisub second\n\t\t\twhere second.id = main.idsubdivisi and third.id = second.iddivisi \n\t\t',\n\t\t$alias_header_name [0] , \n\t\t$alias_header_name [1] , \n\t\t$alias_header_name [2] ,\n\t\t$alias_header_name [3] ,\n\t\t$alias_header_name [4] ,\n $alias_header_name [5] \n\t\t);\n\t\t$this->set_alias($alias_header_name);\n\t\t$this->set_base_query($first);\n\t}", "public function reset_query(): self\n\t{\n\t\t$this->selects = [];\n\t\t$this->updates = [];\n\t\t$this->wheres = [];\n\t\t$this->limit = self::DEFAULT_LIMIT;\n\t\t$this->offset = 0;\n\t\t$this->sorts = [];\n\n\t\treturn $this;\n\t}", "private function LastPosts(){\n $this->lastrecord = ORM::factory('Posts')->find_all()->count();\n }", "public function lastRow()\n {\n $query = clone $this;\n $offset = $this->limit ? $this->limit['start'] : 0;\n\n // Limit index to start in case of empty results\n $index = max($this->count() + $offset - 1, 0);\n $query->setLimit(1, $index);\n return $query;\n }", "protected function queryMore()\n {\n $result = $this->client->queryMore($this->queryResult->getQueryLocator());\n $this->setQueryResult($result);\n $this->rewind();\n }", "public function getLastSQL()\n {\n return $this->last_sql;\n }", "private function setQuery($sql){\n $this->isStatement = false;\n return $this->sqli->query($sql);\n }", "public function newQuery();", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "function pre_query() { \r\n // Unset invalid date values before the query runs.\r\n if (!empty($this->view->args) && count($this->view->args) > $this->position) {\r\n $argument = $this->view->args[$this->position];\r\n $parts = $this->date_handler->arg_parts($argument);\r\n if (empty($parts[0]['date']) && empty($parts[0]['period'])) {\r\n unset($this->view->args[$this->position]); \r\n }\r\n }\r\n \r\n $this->get_query_fields();\r\n if (!empty($this->query_fields)) {\r\n foreach ($this->query_fields as $query_field) {\r\n $field = $query_field['field'];\r\n // Explicitly add this table using add_table so Views does not\r\n // remove it if it is a duplicate, since that will break the query.\r\n $this->query->add_table($field['table_name'], NULL, NULL, $field['table_name']);\r\n }\r\n }\r\n }", "protected function set_query($query, $q) {\n // Set hightlighting.\n $query->setHighlight(true);\n foreach ($this->highlightfields as $field) {\n $query->addHighlightField($field);\n }\n $query->setHighlightFragsize(static::FRAG_SIZE);\n $query->setHighlightSimplePre(self::HIGHLIGHT_START);\n $query->setHighlightSimplePost(self::HIGHLIGHT_END);\n $query->setHighlightMergeContiguous(true);\n\n $query->setQuery($q);\n\n // A reasonable max.\n $query->setRows(static::QUERY_SIZE);\n }", "public function clear() {\n\t\t$this->expected_query = '';\n\t}", "function query() {\n $this->add_additional_fields();\n }", "public function set_last_fetch( $timestamp ) {\n\t\t$this->ryte_option[ self::LAST_FETCH ] = $timestamp;\n\t}" ]
[ "0.7700382", "0.7555782", "0.7164885", "0.7086459", "0.6991607", "0.69829834", "0.69499695", "0.6784595", "0.6768863", "0.67634267", "0.67031544", "0.6625186", "0.6602108", "0.65464514", "0.6480334", "0.64726645", "0.64195716", "0.64069813", "0.6345529", "0.6325208", "0.6299342", "0.6272942", "0.62646365", "0.6185898", "0.6180081", "0.61427826", "0.61372524", "0.6129798", "0.6112586", "0.6110732", "0.6085168", "0.60330033", "0.5963864", "0.5948367", "0.5947938", "0.59406227", "0.5930399", "0.59285504", "0.5909168", "0.58940244", "0.58932436", "0.58795685", "0.5865863", "0.5864486", "0.5861282", "0.5861282", "0.5861282", "0.5841572", "0.58358955", "0.5829535", "0.5824877", "0.57968634", "0.5782562", "0.5779823", "0.5777993", "0.57416844", "0.5739165", "0.5739165", "0.57358265", "0.573376", "0.573376", "0.5732566", "0.5732566", "0.57241", "0.5686819", "0.56852144", "0.56852144", "0.56852144", "0.56852144", "0.5682499", "0.56765443", "0.56754136", "0.56382746", "0.5626068", "0.56151867", "0.5601649", "0.55940676", "0.5592219", "0.555922", "0.55523473", "0.5551913", "0.55497265", "0.5541576", "0.5541576", "0.55401486", "0.55332255", "0.5531841", "0.553114", "0.5520479", "0.549741", "0.5489423", "0.5475867", "0.54707646", "0.546615", "0.5439354", "0.54378295", "0.5435711", "0.543496", "0.5432155", "0.5421866", "0.54205877" ]
0.0
-1
get list of rules
public function getRules();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRulesList(){\n return $this->_get(3);\n }", "public function getRules() {}", "abstract protected function getRules();", "public function getRules(): Collection;", "public static function getRules(): array;", "public function getRules(): array;", "public function getRules(): array;", "public function get_all_rules()\n {\n }", "public function getRules()\n {\n return $this->get(self::_RULES);\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules() {\n\t\treturn $this->rules ?? [];\n\t}", "abstract public function getRules(): array;", "public function getRules(): array\n {\n return $this->rules;\n }", "public function getRules() {\n\t\t$out = array();\n\t\tforeach ($this->rules as $name => $rule) {\n\t\t\t$out[$name] = $rule->description;\n\t\t}\n\t\treturn $out;\n\t}", "public function getRules() : array\n {\n return $this->rules;\n }", "public function rules(): array;", "public function rules(): array;", "public function rules(){\n $rules = [];\n if(!empty($this->rules)){\n foreach ($this->rules as $action => $rule) {\n $regex = \"*\" . $action;\n if($this->is($regex)){\n $rules = $rule;\n break;\n }\n }\n }\n return $rules;\n }", "public function getRules()\r\n\t{\r\n\t\treturn $this->rules;\r\n\t}", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules() : array\n {\n return $this->getDaoRepository()->getRules();\n }", "public function rules();", "public function rules();", "public function rules();", "public function getRules()\r\n\t{\r\n\t\treturn $this->_rules;\r\n\t}", "public function getRules( )\n {\n return $this->rules;\n }", "public static function getRules() \n {\n return self::$rules;\n }", "public function getRules()\n {\n return (array) $this->rules;\n }", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function getRules()\n {\n $rules = [];\n // Default UserAgent\n if (isset($this->rules[self::USER_AGENT])) {\n $rules = array_merge($rules, $this->rules[self::USER_AGENT]);\n }\n // Matching UserAgent\n if (isset($this->rules[$this->userAgentMatch])) {\n $rules = array_merge($rules, $this->rules[$this->userAgentMatch]);\n }\n // Result\n return $rules;\n }", "public function getRules()\n\t{\n\t\t\n\t\t$rules = array();\n\t\t\n\t\tforeach ( $this->getFields() as $field )\n\t\t{\n\t\t\t$rules = array_merge( $rules, $field->getRules() );\n\t\t}\n\t\t\n\t\treturn $rules;\n\t}", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "abstract public function rules(): array;", "abstract public function rules(): array;", "abstract public function rules(): array;", "public function getRules(): RuleList\n {\n return new RuleList($this->rules->toArray());\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public function getRules() {\n\t\treturn self::$rules;\n\t}", "public function getRules()\n {\n if (!isset($this->_rules)){\n $this->_getRules();\n }\n return $this->_rules;\n }", "public function getRules()\n {\n return [\n 'title' => ['requiredFill', 'trim', 'htmlSpecialChars', 'len100'],\n 'content' => ['requiredFill', 'htmlSpecialChars'],\n 'categoryId' => ['requiredFill', 'isInteger'],\n ];\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function createRules()\n {\n return [];\n }", "public function rules()\n {\n return RuleSet::find(Game::find($this->game_id)->rules_id);\n }", "public function rules() : array\n {\n return StoreRulesService::getInstance()->get(\n array_merge($this->all(), [\n 'id' => $this->route('visit'),\n ])\n );\n }", "abstract public function rules() : array;", "public function findRules()\n {\n $keys = array();\n $values = array();\n \n foreach ($this->route as $key => $value) {\n \n $keys[] = $key; \n $values[] = $value; \n \n }\n \n return array(\"keys\" => $keys, \"values\" => $values);\n \n }", "function getRulesList() {\n\t\tglobal $app_strings;\n\t\tglobal $theme;\n\n\t\t$this->loadRules();\n\t\t$rulesDiv = $app_strings['LBL_NONE'];\n\n\t\tif(isset($this->rules)) {\n\t\t\t$focusRules = $this->rules;\n\n\t\t\t$rulesDiv = \"<table cellpadding='0' cellspacing='0' border='0' height='100%'>\";\n\t\t\tforeach($focusRules as $k => $rule) {\n\t\t\t\t$rulesDiv .= $this->renderRuleRow($rule);\n\t\t\t}\n\t\t\t$rulesDiv .= \"</table>\";\n\t\t}\n\n\t\t$smarty = new Sugar_Smarty();\n\t\t$smarty->assign('app_strings', $app_strings);\n\t\t$smarty->assign('theme', $theme);\n\t\t$smarty->assign('savedRules', $rulesDiv);\n\t\t$ret = $smarty->fetch(\"include/SugarRouting/templates/rulesList.tpl\");\n\n\t\treturn $ret;\n\t}", "protected function getRules(): array\n {\n return [\n 'getFileExtensions' => [self::RULE_ARRAY, self::RULE_REQUIRED],\n 'isFileValid' => self::RULE_BOOL,\n 'getInternalRefNumber' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getExternalRefNumber' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getAssistantTitle' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getPatientContacts' => self::RULE_STRING,\n 'getPatientName' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getPatientBirthday' => [self::RULE_STRING, self::RULE_DATE],\n 'getParentAccidentMarkers' => self::RULE_ARRAY,\n 'getVisitTime' => [self::RULE_STRING, self::RULE_DATE],\n 'getVisitDate' => [self::RULE_STRING, self::RULE_REQUIRED, self::RULE_DATE],\n 'getCaseCreationDate' => [self::RULE_STRING, self::RULE_REQUIRED, self::RULE_DATE],\n 'getVisitCountry' => self::RULE_STRING,\n 'getVisitRegion' => self::RULE_STRING,\n 'getVisitCity' => self::RULE_STRING,\n 'getPatientSymptoms' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorInvestigation' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorRecommendation' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorDiagnostics' => self::RULE_ARRAY,\n 'getDoctorName' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorMedicalBoardingNum' => self::RULE_STRING,\n 'getDoctorGender' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getImages' => self::RULE_ARRAY,\n 'getCaseableType' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getIncomePrice' => self::RULE_FLOAT,\n 'getCurrency' => self::RULE_STRING\n ];\n }", "abstract public function getValidationRules(): array;", "abstract protected function getValidationRules();", "public static function getRules() {\n return [\n 'title' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'author' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'description' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'price' => FILTER_VALIDATE_FLOAT,\n 'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]\n ];\n }", "private function getRegisteredRules()\n {\n return $this->registeredRules;\n }", "protected function defineRules()\n {\n return [];\n }", "public function rules()\n {\n return static::staticRules();\n }", "public function rules()\n {\n // get action name\n $routeAction = app('router')->currentRouteAction();\n $method = trim( strrchr($routeAction, '@'), '@');\n $rules = [];\n\n // 是否有对应方法的验证规则\n if ( isset($this->ruleConfig[$method]) ) {\n $rules = $this->ruleConfig[$method];\n\n // 可以设置一个默认规则列表,没有对应规则时则用默认的\n } elseif ( ! empty($this->ruleConfig['__default'])) {\n $rules = $this->ruleConfig['__default'];\n }\n\n return $rules;\n }", "public function getValidationRules() : array;", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function rules()\n {\n return static::$rules;\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->createRules();\n\n case 'PUT':\n case 'PATCH':\n return $this->updateRules();\n\n case 'DELETE':\n return $this->deleteRules();\n\n default:\n return [];\n }\n }", "public function & getRules()\n {\n return $this->rules;\n }", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "public function rules()\n { \n return $this->rules;\n }", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function getRules(): array\n {\n if (Auth::id()==1){\n return [\n ['disk' => 'projects', 'path' => '*', 'access' => 2],\n ];\n }\n return \\DB::table('acl_rules')\n ->where('user_id', $this->getUserID())\n ->get(['disk', 'path', 'access'])\n ->map(function ($item) {\n return get_object_vars($item);\n })\n ->all();\n }", "public function get_rules()\n\t{\n\t\t$this->layout->with('title', 'Rules')\n\t\t\t\t\t ->nest('content', 'rules');\n\t}", "public function getGroupedRules(): array;", "public static function getAll() {\n return YtelAdvancedListRules::\n all(['from_list_id', 'from_campaign_id', 'from_list_status', 'to_list_id', 'to_list_status', 'interval', 'active', 'last_run', 'next_run', 'last_update_count']);\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function rules()\n {\n return $this->jobCategoryRepository->rules();\n }", "public function getRules()\n {\n return isset($this->Rules) ? $this->Rules : null;\n }", "public function rules()\n {\n return $this->initRules(new Calendar());\n }", "protected abstract function rules();", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "private function getRules()\n {\n return array(\n 'name' => new Pattern\\Name,\n 'height' => new Pattern\\Height,\n 'lat' => array(\n 'required' => true,\n 'rules' => array('Latitude')\n ),\n 'lng' => array(\n 'required' => true,\n 'rules' => array('Longitude')\n ),\n 'api_key' => array(\n 'required' => true,\n 'rules' => array(\n 'NotEmpty' => array(\n 'message' => 'Google API key can not be empty'\n )\n )\n ),\n 'style' => array(\n 'required' => false,\n 'rules' => array('Json')\n )\n );\n }", "public function rules() {\n return $this->get_from_model(__FUNCTION__);\n }", "abstract function rules();", "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function rules() {\n\t\t// 全リクエスト共通ルールと継承先ルールのマージ\n\t\t// 同一のキーがあれば継承先ルールで上書き\n\t\treturn array_merge($this->__base_rules, $this->rules);\n }", "public function getRule();", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "private static function getRules() {\n return [\n 'imeArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'cenaArtikla' => FILTER_VALIDATE_FLOAT,\n 'opisArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'kategorijaArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'zalogaArtikla' => FILTER_VALIDATE_FLOAT,\n \n /*'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]*/\n ];\n \n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function getCreateRules()\n {\n return [];\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n //no rules\n return [];\n }" ]
[ "0.8531926", "0.8500616", "0.83190566", "0.8303848", "0.8300871", "0.8227738", "0.8227738", "0.8100199", "0.80676585", "0.80380654", "0.80380654", "0.80380654", "0.79961723", "0.7965298", "0.7877579", "0.78692764", "0.7777388", "0.77557963", "0.77557963", "0.77471775", "0.77195084", "0.7718094", "0.7718094", "0.7718094", "0.7718094", "0.77022475", "0.7699842", "0.7699842", "0.7699842", "0.7632009", "0.7621459", "0.7617687", "0.76067257", "0.7606615", "0.75992036", "0.7585781", "0.7562433", "0.7551877", "0.7551877", "0.7551877", "0.753224", "0.7493146", "0.748113", "0.7461197", "0.74491584", "0.7390595", "0.737407", "0.73686546", "0.7344312", "0.7317675", "0.7308472", "0.7292571", "0.72779024", "0.72734547", "0.7245791", "0.7236859", "0.72295606", "0.7224198", "0.72235286", "0.7210157", "0.7200476", "0.7198427", "0.71843415", "0.71730775", "0.71636206", "0.71568173", "0.71568173", "0.71568173", "0.71568173", "0.7150633", "0.71419823", "0.7135058", "0.7131169", "0.7127402", "0.7125589", "0.71229964", "0.71164757", "0.71140414", "0.7112337", "0.71026677", "0.70870936", "0.7085098", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70822006", "0.7070537", "0.70683813", "0.70681447", "0.7066666", "0.7048495", "0.7037896", "0.7028386", "0.70260036", "0.7019843", "0.6990002", "0.6987329" ]
0.8726984
0
/ Ahora mostramos la estadistica para cada articulo dentro de nuestra administracion, generando una nueva columna donde se muestran el numero de visitas para cada articulo.
function posts_column_views($defaults){ $defaults['post_views'] = __('Visitas'); return $defaults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visites_mensuelles_chiffres($global_jour) {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$periode = date('m/y'); // mois /annee en cours (format de $date)\r\n\t$dday = date('j'); // numero du jour\r\n\t$nb_mois = $GLOBALS['actijour']['nbl_mensuel']; // nombre mois affiche\r\n\r\n\t$requete = \"FROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m') AS d_mois, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%y') AS d_annee, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m/%y') AS date_unix, \r\n\t\t\tSUM(visites) AS visit_mois \r\n\t\t\tFROM spip_visites WHERE date > DATE_SUB(NOW(),INTERVAL 2700 DAY) \r\n\t\t\tGROUP BY date_unix ORDER BY date DESC LIMIT 0,$nb_mois\";\r\n\r\n\t// calcul du $divis : MAX de visites_mois\r\n\t$r = sql_select($requete);\r\n\t$tblmax = array();\r\n\twhile ($rmx = @sql_fetch($r)) {\r\n\t\t$tblmax[count($tblmax) + 1] = $rmx['visit_mois'];\r\n\t}\r\n\treset($tblmax);\r\n\r\n\tif (count($tblmax) == 0) {\r\n\t\t$tblmax[] = 1;\r\n\t}\r\n\t$divis = max($tblmax) / 100;\r\n\r\n\t//le tableau a jauges horizontales\r\n\t$aff .= debut_cadre_relief(\"\", true)\r\n\t\t. \"<span class='arial2'>\" . _T('actijour:entete_tableau_mois', array('nb_mois' => $nb_mois)) . \"\\n</span>\"\r\n\t\t. \"<table width='100%' cellpadding='2' cellspacing='0' border='0' class='arial2'>\\n\"\r\n\t\t. \"<tr><td align='left'>\" . _T('actijour:mois_pipe')\r\n\t\t. \"</td><td width='50%'>\" . _T('actijour:moyenne_mois') . \"</td>\\n\"\r\n\t\t. \"<td><b>\" . _T('actijour:visites') . \"</b></td></tr>\";\r\n\r\n\t$ra = sql_select($requete);\r\n\twhile ($row = sql_fetch($ra)) {\r\n\t\t$val_m = $row['d_mois'];\r\n\t\t$val_a = $row['d_annee'];\r\n\t\t$date = $row['date_unix'];\r\n\t\t$visit_mois = $row['visit_mois'];\r\n\t\t$idefix = '';\r\n\r\n\t\t//nombre de jours du mois $mois\r\n\t\t$mois = mktime(0, 0, 0, $val_m, 1, $val_a);\r\n\t\t$nbr_jours = intval(date(\"t\", $mois));\r\n\r\n\t\t// nombre de jours, moyenne, si mois en cours\r\n\t\tif ($date != $periode) {\r\n\t\t\t$nbj = $nbr_jours;\r\n\t\t\t$moy_mois = floor($visit_mois / $nbj);\r\n\t\t\t$totvisit = $visit_mois;\r\n\t\t} else {\r\n\t\t\t$nbj = ($dday == 1) ? $dday : $dday - 1;\r\n\t\t\t$moy_mois = floor(($visit_mois - $global_jour) / $nbj);\r\n\t\t\t$totvisit = $visit_mois - $global_jour;\r\n\t\t\t$idefix = \"*\";\r\n\t\t}\r\n\t\t$totvisit = number_format($totvisit, 0, ',', '.');\r\n\r\n\t\t//longeur jauge (ne tiens pas compte du jour en cour)\r\n\t\t$long = floor($visit_mois / $divis);\r\n\r\n\t\t// couleur de jauge pour mois le plus fort\r\n\t\t$color_texte = '';\r\n\t\tif ($long == 100) {\r\n\t\t\t$coul_jauge = $couleur_foncee;\r\n\t\t\t$color_texte = \"style='color:#ffffff;'\";\r\n\t\t} else {\r\n\t\t\t$coul_jauge = $couleur_claire;\r\n\t\t}\r\n\r\n\t\t$aff .= \"<tr><td class='arial2' colspan='3'>\"\r\n\t\t\t. \"<div style='position:relative; z-index:1; width:100%;'>\"\r\n\t\t\t. \"<div class='cell_info_mois'>$date</div>\"\r\n\t\t\t. \"<div class='cell_moymens'>$moy_mois</div>\"\r\n\t\t\t. \"<div class='cell_info_tot' $color_texte><b>$totvisit</b>$idefix</div>\"\r\n\t\t\t. \"</div>\";\r\n\t\t# barre horiz \r\n\t\t$aff .= \"<div class='fond_barre'>\\n\"\r\n\t\t\t. \"<div style='width:\" . $long . \"%; height:11px; background-color:\" . $coul_jauge . \";'></div>\\n\"\r\n\t\t\t. \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"<tr><td colspan='3'><span class='verdana1'>\"\r\n\t\t. _T('actijour:pied_tableau_mois') . \"</span></td></tr>\\n\"\r\n\t\t. \"</table></span>\\n\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n\r\n}", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "function articles_visites_semaine($nbj = '8') {\r\n\t# $nbj --> nombre de jours du tableau \r\n\t# par defaut 8 ; tableau de la semaine dans actijour_pg.php\r\n\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$q = sql_select(\r\n\t\t\"DATE_FORMAT(sva.date,'%d/%m') AS date_fr, \r\n\t\tCOUNT(sva.id_article) AS nbart, sv.visites, sva.date \r\n\t\tFROM spip_visites_articles sva LEFT JOIN spip_visites sv ON sva.date = sv.date \r\n\t\tWHERE sva.date > DATE_SUB(NOW(),INTERVAL $nbj DAY) \r\n\t\tGROUP BY sva.date \r\n\t\tORDER BY sva.date\"\r\n\t);\r\n\r\n\t# construit table semaine\r\n\t$semainier = array();\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$key = strtotime($row['date']);\r\n\t\t$semainier[$key]['date_fr'] = $row['date_fr'];\r\n\t\t$semainier[$key]['nbart'] = $row['nbart'];\r\n\t\t$semainier[$key]['visites'] = $row['visites'];\r\n\t\t$i++;\r\n\t}\r\n\treset($semainier);\r\n#echo \"<pre>\"; print_r($semainier); echo \"</pre>\";\r\n\r\n\t# combler les jours sans visite\r\n\tif (count($semainier) < $nbj) {\r\n\t\tfor ($i = 0; $i < $nbj; $i++) {\r\n\t\t\tif (!array_key_exists($ante = ante_date_jour($i), $semainier)) {\r\n\t\t\t\t$semainier[$ante]['date_fr'] = ante_date_jour($i, true);\r\n\t\t\t\t$semainier[$ante]['nbart'] = '0';\r\n\t\t\t\t$semainier[$ante]['visites'] = '0';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n#echo \"2 - <pre>\"; print_r($semainier); echo \"</pre> - 2\";\r\n\tksort($semainier);\r\n\r\n\t#\r\n\t# affiche bloc stats semaine\r\n\t#\r\n\t$aff = debut_cadre_relief(\"cal-semaine.gif\", true);\r\n\t# prepa tableau\r\n\t$aff .= \"<span class='verdana3 bold'>\" . _T('actijour:huit_derniers_jours') . \"</span>\\n\"\r\n\t\t. \"<table width='100%' border='0' cellpadding='1' cellspacing='0'>\\n\"\r\n\t\t. \"<tr><td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t. _T('actijour:jour') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_m'>\" . _T('actijour:nombre_art') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:visites') . \"</div>\\n</td>\";\r\n\r\n\t# les colonnes\r\n\t$add = 0;\r\n\tforeach ($semainier as $day => $vals) {\r\n\t\t$aff .= \"<td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t\t. $vals['date_fr'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_m'>\" . $vals['nbart'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $vals['visites']\r\n\t\t\t. \"</div></td>\\n\";\r\n\t\t//calcul moyenne de la \"periode\"\r\n\t\t$add += $vals['visites'];\r\n\t}\r\n\t# moyenne visite semaine\r\n\t$moysem = round($add / 8);\r\n\r\n\t# derniere colonne affichage : moyenne periode\r\n\t$aff .= \"<td>\"\r\n\t\t. \"<div class='cell_huit_t'>&nbsp;</div>\"\r\n\t\t. \"<div class='cell_huit_m' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:moyenne_c')\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $moysem . \"</div>\"\r\n\t\t. \"</td></tr></table>\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function graficaIncidenciasMesActual($conexion){\n\t$sql = \"SELECT a.nombre as 'NOMBRE', count(m.id) AS'NUMERO' from mes_area m INNER JOIN area a ON a.id = m.id_area where '2020-10-01' > m.fecha_entrada and '2020-10-01' < m.fecha_salida OR m.fecha_salida is null GROUP BY m.id_AREA\";\n\n\t$resultados = mysqli_query($conexion, $sql);\n\t//$labels = mysqli_fetch_array($resultados);\n \t$i=0;\n\t$data=\"\";\n\twhile ($row = mysqli_fetch_assoc($resultados)) {\n\t\tif ($i==0) {\n\t\t\t$data .= $row['NOMBRE'] .'||'.$row['NUMERO'].'||'; \n\t\t}\n\t}\n\t\treturn $data;\n}", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "function ultimos_materiales_publicados() {\n\t\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tAND materiales.material_estado=1\n\t\tORDER BY materiales.fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, sum(b.no_dias) as no_dias,count(substr(b.fecha_inicio,1,4)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,4)\n ORDER BY substr(b.fecha_inicio,1,4)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$ano]= $cantidad;\n }\n }\n }", "function visualizar($pag=\"\",$orderby=\"\")\n {\n global $sIdConvenioAct;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=20;\n elseif ($total<400):\n $tampag=40;\n else:\n $tampag=60;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n else if($this->edit==1 and $this->delete==1) $espacio = 2;\n else if($this->edit==1 and $this->delete==0) $espacio = 1;\n else if($this->edit==0 and $this->delete==1) $espacio = 1;\n else $espacio = 0;\n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption><center><font size='1.5'>\".$tablades.\"</font></center></caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=\".($espacio+2).\"></td>\";\n \n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" or is_numeric($des)) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Imprimir' href='reporte/rptEmbarques.php?iFolio=\".$row['iFolio'].\"&sContrato=\".$row['sContrato'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=$sIdConvenioAct\".\"&dFecha=\".$row['dIdFecha'].\"' target='_blank' >\n \\n<img src='\".$this->PathImages.\"impresora.png' width=15></a></td>\";//$_SESSION['orden']\n if($this->edit==1)\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Seleccionar Folio' href='$_SERVER[PHP_SELF]?iFolioSuministro=\".$row['iFolio'].\"'>\n \\n<img src='\".$this->PathImages.\"seleccionar.jpg' width=15></a></td>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Modificar Registro ' href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n \\n<img src='\".$this->PathImages.\"editar.png' width=12></a></td>\";\n if($this->delete==1)//'href='$_SERVER[PHP_SELF]?operacion=b&$filtro'\n echo \"\\n<td class='CrearReporte' >\n \\n<a title = 'Eliminar el Registro' href=\\\"#\\\" \n onClick=\\\" if( confirm('Realmente Desea Eliminar el Registro?') ){ document.location='$_SERVER[PHP_SELF]?operacion=b&$filtro' };\\\" >\n \\n<img src='\".$this->PathImages.\"eliminar.png' width=12>\n \\n</a></td> \";\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos(strtoupper($this->nombreCampo($result, $i)),strtoupper(\"Imagen\")) and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen = str_replace(\"/\",\"-\",$nombreImagen);\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img border=1 src = '$nombreImagen' width = '90' heigth = '90'</img></td>\";\n $img = false;\n }\n else if(( strpos(strtoupper($this->nombreCampo($result, $i)),\"DLL\")!==false or strpos(strtoupper($this->nombreCampo($result, $i)),\"MN\")!==false )\n AND $this->tipoCampo($result, $i)==\"real\"){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'>$ \".$row[$i].\"</td>\";\n }\n else if( strpos($this->tipoCampo($result, $i),\"real\")!==false ){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'> \".$row[$i].\"</td>\";\n }\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n\n }\n echo \"\\n</tr>\";\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "public static function aumentarNumVisitasModel($tabla,$id_usuario)\n {\n $statement = Conexion::conectar()->prepare(\"SELECT num_visitas FROM $tabla WHERE id_usuario = :id_usuario\");\t\n //DEfinicion de para metro para la consulta en la tabla usuarios\n $statement->bindParam(\":id_usuario\", $id_usuario, PDO::PARAM_INT);\n //Ejecutar la sentencia\n $statement->execute();\n //Asociar resiultados y eevolver el arraty al controller\n $cantidad = $statement->fetch();\n $cantidadNueva = $cantidad[\"num_visitas\"]+1;\n \n //preparar la consulta conectando a la base de datos\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET num_visitas=:num_visitas WHERE id_usuario=:id_usuario\");\t\n //Definicion de parametros para la actualizacion en la base de datos tabla categorias\n $stmt->bindParam(\":num_visitas\", $cantidadNueva, PDO::PARAM_INT);\n $stmt->bindParam(\":id_usuario\", $id_usuario, PDO::PARAM_INT);\n //Si la ejecucion de la consulta es exitosa se devuelve mensaje de exito al controller\n if($stmt->execute())\n {\n return \"success\";\n }\n else\n {\n //De lo contrario se devuelve mensaje nde error\n return \"error\";\n }\n //Cerrar la conexion al final\n $stmt->close();\n\n \n //Cerrar conexion al final\n $statement->close();\n }", "public function makeColumns(){\n $hijosDetalle=$this->\n getReportedetalle()->\n where(['and', \"esdetalle='1'\", \"visiblecampo='1'\"])->\n orderBy('orden')->all();\n //echo count( $hijosDetalle);die();\n $columns=[];\n foreach($hijosDetalle as $fila){\n $columns[]=[\n 'attribute'=>$fila->nombre_campo,\n 'label'=>$fila->aliascampo,\n 'format'=>'raw',\n 'options'=>['width'=>\n $this->sizePercentCampo($fila->nombre_campo).'%'],\n ];\n \n \n }\n return $columns;\n \n }", "function recuperaDatosMetasId(){\n $folio=0;\n $tmp=array();\n if(trim($this->data['folio'])!= \"\"){\n $tmp=explode('-',$this->data['folio']);\n $folio= $tmp[0] + 0;\n if($folio > 0){\n $this->arrayDatosMetas=$this->regresaMetasActividad($folio);\n }\n }\n }", "public static function estadisticasDesignaciones($ciclo)\n {\n $sql =\"SELECT sed.abreviacion as Sede, car.nombre as Carrera\n , COUNT( DISTINCT per.idpersona) as total\n , COUNT( DISTINCT IF(per.idsexo = 1, per.idpersona, NULL)) as varones\n , COUNT( DISTINCT IF(per.idsexo = 2 , per.idpersona, NULL)) as mujeres\n , td.idtipodesignacion, ded.iddedicacion, td.descripcion as tipo_designacion\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=0, per.idpersona, NULL)) as NivelESinDefinir\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=1, per.idpersona, NULL)) as NivelEPrimario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=2, per.idpersona, NULL)) as NivelESecundario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=3, per.idpersona, NULL)) as NivelETerciario\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=4, per.idpersona, NULL)) as NivelEUnivesitarioPreGr\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=5, per.idpersona, NULL)) as NivelEUniversitarioGr\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=6, per.idpersona, NULL)) as NivelEMaestria\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=7, per.idpersona, NULL)) as NivelEDoctorado\n , COUNT(DISTINCT IF(maxnivelinfo.idnivelestudio=8, per.idpersona, NULL)) as NivelEEspecializacion\n , COUNT(DISTINCT IF(des.idtipodesignacion IN ( 1,7), des.iddesignacion, NULL)) as Profesor_Titular\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (2,8), des.iddesignacion, NULL)) as Profesor_Asociado\n , COUNT(DISTINCT IF(des.idtipodesignacion IN ( 3,9), des.iddesignacion, NULL)) as Profesor_Adjunto\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (4,10), des.iddesignacion, NULL)) as JTP\n , COUNT(DISTINCT IF(des.idtipodesignacion = 5, des.iddesignacion, NULL)) as Ayudante_Diplomado\n , COUNT(DISTINCT IF(des.idtipodesignacion IN (6,12), des.iddesignacion, NULL)) as Ayudante_Alumno\n , COUNT(DISTINCT IF(des.idtipodesignacion = 11, des.iddesignacion, NULL)) as Auxiliar_Docente\n , COUNT(DISTINCT IF(des.idtipodesignacion = 13, des.iddesignacion, NULL)) as Profesor_Emerito\n , COUNT(DISTINCT IF(des.idtipodesignacion = 14, des.iddesignacion, NULL)) as Profesor_Honorario\n , COUNT(DISTINCT IF(des.idtipodesignacion = 15, des.iddesignacion, NULL)) as Profesor_Consulto\n , COUNT(DISTINCT IF(des.idtipodesignacion = 16, des.iddesignacion, NULL)) as Profesor_Invitado\n , COUNT(DISTINCT IF(des.iddedicacion = 1, des.iddesignacion, NULL)) as Sin_Dedicacion\n , COUNT(DISTINCT IF(des.iddedicacion = 2, des.iddesignacion, NULL)) as Dedicacion_Simple\n , COUNT(DISTINCT IF(des.iddedicacion = 3, des.iddesignacion, NULL)) as Dedicacion_Completa\n , COUNT(DISTINCT IF(des.iddedicacion = 4, des.iddesignacion, NULL)) as Dedicacion_Parcial\n , COUNT(DISTINCT IF(des.iddedicacion = 5, des.iddesignacion, NULL)) as Dedicacion_Semi_Exclusiva\n , COUNT(DISTINCT IF(des.iddedicacion = 6, des.iddesignacion, NULL)) as Dedicacion_Exclusiva\n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona\n LEFT JOIN (SELECT info.idestudio, info.idpersona, info.idnivelestudio FROM (SELECT e.idestudio, e.idpersona, e.idnivelestudio FROM estudios e JOIN niveles_estudios niv ON e.idnivelestudio= niv.idnivelestudio ORDER BY e.idpersona, niv.idordenimportancia DESC) as info GROUP BY info.idpersona) as maxnivelinfo ON per.idpersona = maxnivelinfo.idpersona\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra\n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera\n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion = cd.idcategoriadesignacion\n LEFT JOIN estudios est ON maxnivelinfo.idestudio = est.idestudio \n WHERE YEAR(des.inicio)= \".$ciclo.\" AND des.idestadodesignacion = 5\n GROUP BY sed.idsede, car.idcarrera;\";\n\n //echo $sql;exit;\n\n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n \n return $q;\n }", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, month(b.fecha_inicio) AS mes,b.no_dias,count(substr(b.fecha_inicio,1,7)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND year(b.fecha_inicio) ='\".$this->ano_id.\"' AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,7)\n ORDER BY substr(b.fecha_inicio,1,7)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$mes,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$mes]= $cantidad;\n }\n }\n }", "function mostraGrid() {\n $total_reg = \"20\"; // número de registros por página\n\n\n $pagina = $_SESSION['pagina'];\n\n //Current Page / Pagina Atual\n if (!$pagina) {\n $pc = \"1\";\n } else {\n $pc = $pagina;\n }\n\n $inicio = $pc - 1;\n $inicio = $inicio * $total_reg;\n\n\n //Busca os registros para o Grid\n global $con;\n $busca = 'select k.*, p.descricao as pdescricao,e.descricao as edescricao\n from kardexs k\n left join produtos p on (p.id=k.produto_id)\n left join estoques e on (e.id=k.estoque_id)';\n $qry_limitada = mysql_query(\"$busca LIMIT $inicio,$total_reg\");\n $linha = mysql_fetch_assoc($qry_limitada);\n\n\n // Total de Registros na tabela \n $qry_total = mysql_query('SELECT count(*)as total from kardexs');\n $linha_total = mysql_fetch_assoc($qry_total); //recupera a linha\n $total_registros = $linha_total['total']; //pega o valor\n ?>\n\n <table border=\"1\">\n <thead>\n <tr>\n <th>Id</th>\n <th>Data Movimento</th>\n <th>Produto</th>\n <th>P. Descricao</th>\n <th>Estoque</th>\n \n <th>Estoque</th>\n <th>Tipo Movimento</th>\n <th>sinal</th>\n <th>Qtd</th> \n <th>Acao</th>\n </tr>\n </thead>\n <tbody>\n <?php\n do {\n echo \"\n <tr>\n <td>\" . $linha['id'] . \"</td>\n <td>\" . $linha['created'] . \"</td>\" .\n \"<td>\" . $linha['produto_id'] . \"</td>\" .\n \"<td>\" . $linha['pdescricao'] . \"</td>\" .\n \"<td>\" . $linha['estoque_id'] . \"</td>\" .\n \n \"<td>\" . $linha['edescricao'] . \"</td>\" .\n \"<td>\" . $linha['tiposmovimento_id'] . \"</td>\" .\n \"<td>\" . $linha['sinal'] . \"</td>\" .\n \"<td>\" . $linha['qtd'] . \"</td>\" .\n \"<td> <a href='cad_kardex.php?acao=confirmaExcluir&id=\" . $linha['id'] . \"'>Excluir</a></td>\" .\n \"</tr>\";\n } while ($linha = mysql_fetch_assoc($qry_limitada));\n ?>\n </tbody>\n </table>\n <?php\n echo navegacao($pc, $total_registros);\n }", "public function contarAlumnosController(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT COUNT(*) FROM sesion_cai WHERE fecha = CURDATE() AND hora >= DATE_FORMAT(NOW(), '%k:00:00') AND hora <= DATE_FORMAT(NOW(), '%k:59:59') AND asistencia=0\"); //se prepara la conexion\n\t\t//definicion de parametros\n\t\t$stmt->execute(); //ejecucion mediante pdo\n\t\treturn $stmt->fetch()[0]; //se retorna lo asociado a la consulta\n\t\t$stmt->close();\n\t}", "function SELECT_COUNT_alunosEstadual (){\n $sql = 'SELECT COUNT(i.`tipo_instituicao`) AS `Escolas Estaduais` FROM `visita` as v INNER JOIN `agendamento_institucional` as ai on v.`agendamento_institucional_ID` = ai.`ID` INNER JOIN `professor_instituicao` as pii on ai.`professor_instituicao_ID` = pii.`ID` INNER JOIN `instituicao` AS i ON pii.`instituicao_ID` = i.`ID` WHERE i.`tipo_instituicao`= \"Estadual\"';\n $stmt = $this->dataBase->query($sql);\n $row = $stmt->fetch_assoc();\n return $row; \n }", "function show_past($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'datum' DESC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\n\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "public function historicoMovimentacao() // Gera dados para tabela hist mov\n\t\t{\n\t\t\t// Busca dados das movimentacoes\n\t\t\t$select = \"\n\t\t\t\tSELECT cod_item, cod_operacao, desc_operacao, tipo, qtde, dat_movimento, usuario, item_desc\n\t\t\t\tFROM estoque_movnto\";\n\t\t\t$result = $this->mysqli->query($select);\n\t\t\tself::checaBuscaVazia($result); // Confere se o select retornou algo\n\n\t\t\twhile($row = $result->fetch_assoc()){\t\t\t\n\t\t\t\t// Gera conteudo da tabela\n\t\t\t\t$this->hist_mov .= \"\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\".$row['item_desc'].\"</td>\n\t\t\t\t\t<td>\".$row['cod_item'].\"</td>\n\t\t\t\t\t<td>\".$row['desc_operacao'].\"</td>\n\t\t\t\t\t<td>\".$row['cod_operacao'].\"</td>\n\t\t\t\t\t<td>\".$row['tipo'].\"</td>\n\t\t\t\t\t<td>\".$row['qtde'].\"</td>\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<td>\".$row['dat_movimento'].\"</td>\n\t\t\t\t\t<td>\".$row['usuario'].\"</td>\n\t\t\t\t</tr>\";\t\t\t\t\t\t \n\t\t\t}\n\t\t\techo $this->hist_mov; // Imprime as linhas da tabela\n\t\t}", "function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "public function NombresColumnas($tabla)\r\n {\r\n\t$this->tabla=$tabla;\r\n\t$Columnas1=mysql_query(\"select * from $this->tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$this->NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($this->NombreCol[$i]==\"\"){\r\n\t\t\tunset($this->NombreCol[$i]); \r\n\t\t\t$this->NombreCol = array_values($this->NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n$this->ID=$this->NombreCol[0];\r\n\r\n$numCols=count($this->NombreCol);\r\n$this->NumCols=$numCols;\r\n//print($this->NumCols);\r\n//print_r($this->NombreCol);\r\n\r\n\t\t\r\n\t}", "static public function mdlMostrarInventario( ){\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"\n\n\n \nSELECT inventario.id, codigo_barras, inventario.nombre, inventario.medida_ingreso, COUNT( inventario_x_unidad_medida_salida.id_inventario) as medida_salida , inventario.actual_cantidad, inventario.cantidad_alerta, inventario.actual_costo_valorizado, inventario.costo_ideal\nFROM inventario \nLEFT JOIN inventario_x_unidad_medida_salida ON inventario_x_unidad_medida_salida.id_inventario = inventario.id\nWHERE estado = 1\nGROUP BY codigo_barras, inventario.nombre, inventario.medida_ingreso, inventario.actual_cantidad, inventario.cantidad_alerta, inventario.actual_costo_valorizado, inventario.costo_ideal, inventario_x_unidad_medida_salida.id_inventario;\n\n\n\n\n\t\t\t\t\");\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n \n\t\t$stmt-> close();\n\n\t\t$stmt = null;\n\n\t}", "function show_best($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'views' DESC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "public function NombresColumnasEsp($tabla)\r\n {\r\n\t//echo \"Entrando a nombres \";\r\n\t$Columnas1=mysql_query(\"select * from $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$this->NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($this->NombreCol[$i]==\"\"){\r\n\t\t\tunset($this->NombreCol[$i]); \r\n\t\t\t$this->NombreCol = array_values($this->NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n$this->ID=$this->NombreCol[0];\r\n\r\n$numCols=count($this->NombreCol);\r\n$this->NumCols=$numCols;\r\n//return()\r\n//echo \"Saliendo de nombres \";\r\n//print($this->NumCols);\r\n//print_r($this->NombreCol);\r\n\r\n\t\t\r\n\t}", "function hojas_vida_modificadas(){\n // Consulta\n $sql =\n \"SELECT\n c.Nombre,\n Count(hv.Pk_Id_Hoja_Vida) Vinculados,\n IFNULL(\n (\n SELECT\n Count(hvo.Nombres)\n FROM\n solicitudes.hojas_vida AS hvo\n LEFT JOIN ica.tbl_valores AS co ON hvo.Fk_Id_Valor_Contratista = co.Pk_Id_Valor\n WHERE\n hvo.Fecha_Actualizacion BETWEEN DATE_SUB(NOW(), INTERVAL 7 DAY)\n AND CURDATE()\n AND co.Pk_Id_Valor = c.Pk_Id_Valor\n GROUP BY\n co.Pk_Id_Valor\n ),\n 0\n ) Modificados\n FROM\n solicitudes.hojas_vida AS hv\n LEFT JOIN ica.tbl_valores AS c ON hv.Fk_Id_Valor_Contratista = c.Pk_Id_Valor\n WHERE\n hv.Contratado = 1\n AND c.Nombre IS NOT NULL\n GROUP BY\n hv.Fk_Id_Valor_Contratista\n ORDER BY\n c.Nombre ASC\";\n\n //Se retorna el resultado de la consulta\n return $this->db->query($sql)->result();\n }", "public function enfocarCamaraAlumnos1() {\n\n self::$alumnos1->enfocar();\n\n }", "function getEstadisticasElementos() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleEstadisticasElementos($this->extra[\"monitor_id\"], $this->extra[\"pagina\"], 1);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT foo.nodo_id FROM (\".\n\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\",'\".\n\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')) AS foo, nodo n \".\n\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t$monitor_ids = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'elem_estadistica_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleEstadisticasElementos($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function nbr_auteurs_enligne() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n// nombre d_auteurs depuis 15 mn ()\r\n# inc/auth.php update-set en_ligne => NOW() : \"moment\" de session !\r\n# voir ecrire/action:logout.php\r\n# spip update-set 'en_ligne' datetime -15 mn au logout de session !!??!!\r\n# aff' nbr corresp aux auteurs affiches par spip en bandeau sup !\r\n\r\n\t$q = sql_select(\"COUNT(DISTINCT id_auteur) AS nb, statut \" .\r\n\t\t\"FROM spip_auteurs \" .\r\n\t\t\"WHERE en_ligne > DATE_SUB( NOW(), INTERVAL 15 MINUTE) \" .\r\n\t\t\"AND statut IN ('0minirezo', '1comite', '6forum') \" . // limite statuts spip (autres!)\r\n\t\t\"AND id_auteur != $connect_id_auteur \" .\r\n\t\t\"GROUP BY statut\"\r\n\t);\r\n\r\n\tif (sql_count($q)) {\r\n\t\t$aff .= _T(\"actijour:auteurs_en_ligne\") . \"<br />\\n\";\r\n\t\tWhile ($r = sql_fetch($q)) {\r\n\t\t\tif ($r['statut'] == '0minirezo') {\r\n\t\t\t\t$stat = _T('actijour:abrv_administrateur');\r\n\t\t\t} elseif ($r['statut'] == '1comite') {\r\n\t\t\t\t$stat = _T('actijour:abrv_redacteur');\r\n\t\t\t} elseif ($r['statut'] == '6forum') {\r\n\t\t\t\t$stat = _T('actijour:abrv_visiteur');\r\n\t\t\t}\r\n\t\t\t$aff .= $r['nb'] . \" $stat<br />\\n\";\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t$aff .= _T(\"actijour:aucun_auteur_en_ligne\") . \"\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "function getEstadisticaPorDia() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $dias_semana;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_por_dia.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primero_dia');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_pordiasemana(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t$T->setVar('__objetivo_nombre', $conf_objetivo->getAttribute('nombre'));\n\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($dias_semana as $dia_id => $dia_nombre){\n\t\t\t\t$primero = true;\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@dia_id='.(($dia_id == 7)?0:$dia_id).']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t$T->setVar('es_primero_dia', '');\n\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t$T->setVar('__dia_nombre', $dia_nombre);\n\t\t\t\t\t\t$T->setVar('__dia_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t$T->parse('es_primero_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t\t}\n\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t\t$T->setVar('__paso_minimo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_maximo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_promedio', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t$primero = false;\n\t\t\t\t\t$linea++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function scrivitop5mipiace() {\n\tconnetti($db);\n\t$query=\"SELECT username, count(*) n FROM vb_vbseo_likes left join vb_user on l_dest_userid=userid where username<>'' and userid<>770 group by username order by n desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Username</th><th>\"Mi piace\" ricevuti</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['username'] . '</td><td>' . $riga['n'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n\telse\n\t\techo '<b>Statistiche \"mi piace\"<br />disponibili solo da maggio 2013</b>';\n}", "function generar_report_equiposxfecha($fechadesde,$fechahasta){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$fecha_desde = orderfecha($fechadesde);\n\t$fecha_hasta = orderfecha($fechahasta);\n\t\n\t$con = \"SELECT id_check_equipos,u.dni_usu AS dni,concat(nombres_usu,' ',apellidos_usu) AS name,desc_equipos,check_equipos,fech_asig_equipos,check_por_equipos,obs_equipos,fech_check_equipos\n\t\t\tFROM usuario AS u INNER JOIN equipos_check AS e\n\t\t\tON u.dni_usu=e.check_por_equipos WHERE fech_asig_equipos >= '$fechadesde' AND fech_asig_equipos <= '$fechahasta'\n\t\t\tORDER BY fech_asig_equipos DESC\";\n\t$query2 = mysqli_query($connect,$con);\n\t$query = mysqli_query($connect,$con);\n\t\n\tif($fila= mysqli_fetch_array($query2)){\n\t\t$i = 1;\n\t\t$report = \"\n\t\t<br/><center><h4 class='text-info'>Equipos revisados del $fecha_desde al $fecha_hasta</h4></center><br/>\n\t\t<table class='table table-bordered table-striped'>\n\t\t\t<thead>\n\t\t\t\t<tr class='alert alert-primary'>\n\t\t\t\t\t<th><center>N°</center></th>\n\t\t\t\t\t<th><center>Descripción de equipos</center></th>\n\t\t\t\t\t<th><center>Revisado</center></th>\n\t\t\t\t\t<th><center>Fecha asignado</center></th>\n\t\t\t\t\t<th><center>Fecha revisado</center></th>\n\t\t\t\t\t<th><center>Responsable</center></th>\n\t\t\t\t\t<th><center>Observaciones</center></th>\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\";\n\t\t\n\t\twhile($row= mysqli_fetch_array($query)){\n\t\t\t$id_check_equipos = $row['id_check_equipos'];\n\t\t\t$names = $row['name'];\n\t\t\t$check_equipos = $row['check_equipos'];\n\t\t\t$names = mb_convert_case($names, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t$dni = $row['dni'];\n\t\t\t$desc_equipos = $row['desc_equipos'];\n\t\t\t$fech_asig_equipos = orderfecha($row['fech_asig_equipos']);\n\t\t\t$fecha_revisado_por = orderfecha($row['fech_check_equipos']);\n\t\t\t$hora_revisado_por = orderhora($row['fech_check_equipos']);\n\t\t\t$obs_equipos = $row['obs_equipos'];\n\t\t\t\n\t\t\tif($check_equipos == \"no\"){\n\t\t\t\t$active=\"class='table-danger'\";\n\t\t\t}else{\n\t\t\t\t$active=\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$report = $report.\"\n\t\t\t\t<tr \".$active.\">\n\t\t\t\t\t<th><center>$i</center></th>\n\t\t\t\t\t<td style='text-transform:uppercase;'>$desc_equipos</td>\n\t\t\t\t\t<td style='text-transform:uppercase;'><center>$check_equipos</center></td>\n\t\t\t\t\t<td><center><small>$fech_asig_equipos</small></center></td>\n\t\t\t\t\t<td><center><small>$fecha_revisado_por<br/>$hora_revisado_por</small></center></td>\n\t\t\t\t\t<td><center><small>$names</small></center></td>\n\t\t\t\t\t<td style='text-transform:uppercase;'>$obs_equipos</td>\n\t\t\t\t</tr>\n\t\t\t\";\n\t\t\t$i++;\n\t\t}\n\t\t$report = $report.\"</tbody></table>\";\t\t\t\t\t\t\t\n\t}else{\n\t\t$report = \"\n\t\t<tr>\n\t\t\t<td colspan='6'><h5 class='text-info'>No hay Registros.</h5><p class='text-info'>No se registraron equipos revisados en esta fecha.</p></td>\n\t\t</tr>\";\t\n\t}\n\treturn $report;\n}", "function recuperaDatosMetas(){\n $folio=0;\n $tmp=array();\n if(trim($this->data['folio']) != \"\"){\n $tmp=explode('-',$this->data['folio']);\n $folio= $tmp[0] + 0;\n if($folio > 0){\n $this->arrayDatos=$this->regresaMetas($folio);\n }\n }\n }", "function show_worse($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'views' ASC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "public function getListeVisiteurs(){\n\t\t$req = \"select * from visiteur order by VIS_MATRICULE\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "function scrivitop5sezioni() {\n\tconnetti($db);\n\t$query=\"SELECT f.title tt ,sum(`views`) v FROM `vb_thread` t left join vb_forum f on t.forumid=f.forumid group by f.title order by v desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Sezione</th><th>Visite</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['tt'] . '</td><td>' .$riga['v'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n}", "function ultimos_materiales_publicados_limit($inicial,$cantidad) {\n\t\n\t\t\n\t\t$query = \"SELECT materiales.*, licencias.*\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tAND materiales.material_estado=1\n\t\tORDER BY materiales.fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "function NUMERO_DE_HIJOS_MAYORES_ESTUDIANDO($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m)=SPLIT( '[/.-]', $_ARGS[\"PERIODO\"]); \r\n\r\n $anio = $a - 18;\r\n\t$fecha18 = \"$anio-$m-01\";\r\n\t\r\n\t $anio = $a - 25;\r\n\t$fecha25 = \"$anio-$m-01\";\r\n\r\n\t$sql = \"SELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\trh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' \r\n\t\t\t\tAND\tFechaNacimiento <= '\".$fecha18.\"'\r\n\t\t\t\tAND\tFechaNacimiento >= '\".$fecha25.\"'\r\n\t\t\t\tAND rh_cargafamiliar.Parentesco = 'HI' \r\n\t\t\t\tAND rh_cargafamiliar.FlagEstudia = 'S'\t\r\n\t\t\t\t\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}", "public function run()\n\t{\n\t\t\\DB::table('agresions')->delete();\n \n\t\t\\DB::table('agresions')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => '1',\n\t\t\t\t'agresion' => 'Asesinato',\n\t\t\t\t'agresioncategorias_id' => '1',\n\t\t\t\t'description' => 'Acciones con las que se priva de la vida a una persona, en razón de su tarea de informar o de comunicar. O haya sido desaparecida o dada por muerta, cualquiera que sea el medio que haya sido utilizado por el agresor.',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => '2',\n\t\t\t\t'agresion' => 'Atentado',\n\t\t\t\t'agresioncategorias_id' => '2',\n\t\t\t\t'description' => 'Un acto de acoso generalizado de mala fe que conlleva diversas acciones y diferentes intensidades de violencia. Es realizado por una persona, o por un grupo de ellas, contra otra, u otras, sean funcionarios públicos o civiles. O, contra objetos ajenos, públicos o privados, con el objetivo de causar daño a la persona o a sus bienes. Como la muerte, en el caso; o la destrucción, si se trata de objetos.',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => '3',\n\t\t\t\t'agresion' => 'Daño Moral',\n\t\t\t\t'agresioncategorias_id' => '3',\n\t\t\t\t'description' => 'Implica en acciones de agravio, de menoscabo, en las que se rebaja el nivel de las capacidades personales y subjetivas, o que suscitan un descredito profesional. Siempre en función del ejercicio de la libertad de expresión.',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => '4',\n\t\t\t\t'agresion' => 'Amenazas',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t\t'description' => 'Aviso de una represalia inminente a ser realizada por quien agrede. El mensaje es verbal o escrito, dado en forma directa; o por vías indirectas, como teléfono o mensajes electrónicos, o por medio de otra persona; con el objetivo de provocar la auto censura o censura indirecta.',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => '5',\n\t\t\t\t'agresion' => 'Amenazas a muerte',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t\t'description' => 'La represalia anunciada en el mensaje del que avisa, o manda avisar, es que va a matar a la víctima escogida.',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => '6',\n\t\t\t\t'agresion' => 'Hostigamiento',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t'description' => 'Es un contexto de acciones repetidas de acoso progresivo en un mismo evento o una secuencia de estos. Causada por motivos políticos o por presión exterior. Ejemplo: se le niega o limita la entrada el acceso a un sitio (o la salida), a una cosa, un recurso, o a una persona; confiscación o destrucción de sus materiales y equipos; se les limita su libertad de movimiento; se les despide o son degradados de puesto; se hacen ataque a sus familiares.',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => '7',\n\t\t\t\t'agresion' => 'Intimidación',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t\t'description' => 'El efecto de acciones que buscan infundir miedo, como una angustia perturbadora del ánimo personal ante un riesgo o un daño, real o imaginario. O bien, producir temor, a fin de provocar el deseo de huir, o de rehusar una actividad, o un algo, que se obliga a ver como dañoso, arriesgado o peligroso. Con actos que influyen en el trabajo. Sea en sentido editorial, o en la línea informativa de la persona que comunica, que edita, dirige, o trabaja, en un medio de comunicación o campo equivalente.\n',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => '8',\n\t\t\t\t'agresion' => 'Presión Psicológica',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t\t'description' => 'El efecto de un conjunto indiscriminado de acciones encaminadas a provocar zozobra, y desestabilizar la organización sicológica de la persona agredida. Están destinadas a causar tensión para coaccionar a la victima a que su trabajo informativo, o comunicativo, se efectúe en cierta forma, o impedir que se realice.\n',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => '9',\n\t\t\t\t'agresion' => 'Ataque corporal',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Cualquier arremetida en la que se producen empujones violentos, golpes o heridas al cuerpo de la victima agredida.\n',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => '10',\n\t\t\t\t'agresion' => 'Ataque corporal con arma',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Cualquier arremetida en la que se causan golpes o heridas, con\narma o cualquier objeto que cumpla tal función, al cuerpo de la\nvíctima agredida.\n',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => '11',\n\t\t\t\t'agresion' => 'Ataque a edificios',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Cuando un medio de información es dañado, allanado o registrado; incluso cuando algún empleado de la compañía que no es periodista es atacado a consecuencia del trabajo informativo del medio.\n',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => '12',\n\t\t\t\t'agresion' => 'Daño Economico',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Se refiere a las acciones que causan destrucción, total o parcial, de equipos, instrumentos, recursos; y sus costos de reparación. O pagos probables necesarios para recuperar o recomponer lo dañado.\n',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => '13',\n\t\t\t\t'agresion' => 'Daño a la salud',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Daños temporales, o definitivos, provocados al organismo por medios físicos o químicos a causa del ejercicio de derecho de expresión de una persona.\n',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => '14',\n\t\t\t\t'agresion' => 'Sabotaje',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Consiste en una acción deliberada para ejecutar disturbios, la obstrucción, la interrupción o la destrucción de material por alguien, que va dirigida a debilitar a otra persona, a la que cree su adversaria.\n',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => '15',\n\t\t\t\t'agresion' => 'Detención Arbitraria',\n\t\t\t\t'agresioncategorias_id' => '4',\n\t\t\t\t'description' => 'Acciones de privación de la libertad por el ejercicio del derecho\nde expresión en una práctica informativa, comunicativa. Sea que\nésta se halle en proceso, o que haya sido publicada, o aun esté por publicarse. Si es detenido a causa del ejercicio de su profesión.\n',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => '16',\n\t\t\t'agresion' => 'Desplazamiento (refugio o exilio) forzado',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Cuando una persona, periodista o comunicadora, es obligada a salir, sea en forma temporal, o definitiva, de su lugar o país de origen, por el temor fundado de que es perseguido por una causa relacionada a su libertad de expresión.',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => '17',\n\t\t\t\t'agresion' => 'Secuestro',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Si no se presume la participación del Estado, se perfila un secuestro extorsivo. El Pacto Internacional de Derechos Civiles y Políticos y la Convención Americana sobre Derechos Humanos y otros instrumentos internacionales, obligan a cada Estado Parte, a “tomar medidas para proteger la vida, libertad, intimidad, reputación y demás derechos fundamentales de la población frente a la delincuencia común u organizada” ',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => '18',\n\t\t\t\t'agresion' => 'Hostigamiento Judicia',\n\t\t\t\t'agresioncategorias_id' => '6',\n\t\t\t\t'description' => 'Amenazas de funcionarios de iniciar acciones judiciales contra un medio o periodista; demandas por daños y perjuicios o querellas por calumnias e injurias destinadas a inhibir la difusión de un hecho o de una crítica; sentencias a prisión o a pagar indemnizaciones por esos delitos; imposición para revelar fuentes de información, arresto o detención por orden de autoridades judiciales; allanamiento de medios de comunicación.\n',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => '19',\n\t\t\t\t'agresion' => 'Impunidad',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => '',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => '20',\n\t\t\t\t'agresion' => 'Suspención o negación de Credenciales',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Cuando se le niegan o se le suspenden credenciales a un periodista; se le niega o cancela una visa, con el claro propósito de impedir realizar una cobertura informativa.\n',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => '21',\n\t\t\t\t'agresion' => 'Restricciones Legales',\n\t\t\t\t'agresioncategorias_id' => '6',\n\t\t\t'description' => 'Aprobación de leyes restrictivas para la libertad de prensa individual y de medios, o se presentan proyectos legislativos o decretos del ejecutivo con esa finalidad. Si la identidad agredida es demanda por difamación a fin de suprimir (ignorar, detener) una noticia. Cuando es multado o sentenciado a prisión.\n',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => '22',\n\t\t\t\t'agresion' => 'Despidos injustificados',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Es la cancelación definitiva del empleo a la víctima, por reclamar derecho de expresión, casi siempre impulsada por la presión que ejercen actores externos, estatales y no estatales; por denunciar irregularidades; o por investigar temas que el medio censura.\n',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => '23',\n\t\t\t\t'agresion' => 'Inpedimentos informativos',\n\t\t\t\t'agresioncategorias_id' => '6',\n\t\t\t\t'description' => 'Son acciones con las que se retiene, o se oculta, en forma deliberada, informaciones para obstaculizar la investigación o cobertura de un tema determinado. Incluye restringir acceso a la información pública.',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => '24',\n\t\t\t\t'agresion' => 'Presiones económicas',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Se utiliza la contratación de publicidad en un medio determinado, como una forma de premiar o sancionar por la línea informativa. Es un elemento capaz de inhibir el ejercicio crítico. También el uso arbitrario de controles administrativos o tributarios.\n',\n\t\t\t),\n\t\t\t24 => \n\t\t\tarray (\n\t\t\t\t'id' => '25',\n\t\t\t\t'agresion' => 'Chantaje/Extorción',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Mediante actos violetos o intimidatorios, una persona es obligada a realizar u omitir un acto o negocio jurídico con, o sin, ánimo de lucro y con la intención de causar un perjuicio patrimonial o bien del sujeto pasivo, o de un tercero.\n',\n\t\t\t),\n\t\t\t25 => \n\t\t\tarray (\n\t\t\t\t'id' => '26',\n\t\t\t\t'agresion' => 'Obstrucción informativa',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Diversas formas de agresión que impiden el acceso, o la permanencia, en el contexto donde ocurre un acontecimiento para obtener o continuar una información a la que se busca darle cobertura periodística.\n',\n\t\t\t),\n\t\t\t26 => \n\t\t\tarray (\n\t\t\t\t'id' => '27',\n\t\t\t\t'agresion' => 'Represión ilegal e injustificada',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t'description' => 'Cuando las personas que realizan una cobertura periodística, en un evento, o circunstancia, son impedidas o reprimidas por agentes del estado (policías, militares y otros similares) a fin de evitar que obtengan información sobre los hechos ocurridos.\n',\n\t\t\t),\n\t\t\t27 => \n\t\t\tarray (\n\t\t\t\t'id' => '28',\n\t\t\t\t'agresion' => 'Restricción a la democracia',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Toda acción que, de una forma o de otra, limita las libertades y la práctica de la democracia, mediante normas impuestas por el Estado. Produce un contrasentido que afrenta la calidad de estado democrático.\n',\n\t\t\t),\n\t\t\t28 => \n\t\t\tarray (\n\t\t\t\t'id' => '29',\n\t\t\t\t'agresion' => 'Censura',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Censura',\n\t\t\t),\n\t\t\t29 => \n\t\t\tarray (\n\t\t\t\t'id' => '30',\n\t\t\t\t'agresion' => 'Rapto',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Una persona se lleva o retiene a otra a la fuerza, es decir, sin su consentimiento con la intención de miras deshonestas o menoscabar su integridad sexual.',\n\t\t\t),\n\t\t\t30 => \n\t\t\tarray (\n\t\t\t\t'id' => '31',\n\t\t\t\t'agresion' => 'Derechos digitales',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Persecución digital, hackeos, intervenciones telefónicas.',\n\t\t\t),\n\t\t\t31 => \n\t\t\tarray (\n\t\t\t\t'id' => '32',\n\t\t\t\t'agresion' => 'Uso abusivo del poder del Estado',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Deportación, estigmatización, criminalización, exilio, abuso de control de publicidad.',\n\t\t\t),\n\t\t\t32 => \n\t\t\tarray (\n\t\t\t\t'id' => '33',\n\t\t\t\t'agresion' => 'Uso abusivo del poder no estatal',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Control mediante la publicidad, estigmatización.',\n\t\t\t),\n\t\t\t33 => \n\t\t\tarray (\n\t\t\t\t'id' => '34',\n\t\t\t\t'agresion' => 'Decomiso de equipo',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Decomiso de equipo',\n\t\t\t),\n\t\t\t34 => \n\t\t\tarray (\n\t\t\t\t'id' => '35',\n\t\t\t\t'agresion' => 'Allanamiento',\n\t\t\t\t'agresioncategorias_id' => '8',\n\t\t\t\t'description' => 'Allanamiento ',\n\t\t\t),\n\t\t\t35 => \n\t\t\tarray (\n\t\t\t\t'id' => '36',\n\t\t\t\t'agresion' => 'Criminalizacion',\n\t\t\t\t'agresioncategorias_id' => '8',\n\t\t\t\t'description' => 'Criminalizacion',\n\t\t\t),\n\t\t\t36 => \n\t\t\tarray (\n\t\t\t\t'id' => '37',\n\t\t\t\t'agresion' => 'Robo',\n\t\t\t\t'agresioncategorias_id' => '5',\n\t\t\t\t'description' => 'Robo',\n\t\t\t),\n\t\t\t37 => \n\t\t\tarray (\n\t\t\t\t'id' => '38',\n\t\t\t\t'agresion' => 'Hackeo',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Hackeo',\n\t\t\t),\n\t\t\t38 => \n\t\t\tarray (\n\t\t\t\t'id' => '39',\n\t\t\t\t'agresion' => 'Expulsion ',\n\t\t\t\t'agresioncategorias_id' => '8',\n\t\t\t\t'description' => 'Expulsion',\n\t\t\t),\n\t\t\t39 => \n\t\t\tarray (\n\t\t\t\t'id' => '40',\n\t\t\t\t'agresion' => 'Acoso Cibernetico',\n\t\t\t\t'agresioncategorias_id' => '7',\n\t\t\t\t'description' => 'Acoso Cibernetico',\n\t\t\t),\n\t\t\t40 => \n\t\t\tarray (\n\t\t\t\t'id' => '41',\n\t\t\t\t'agresion' => 'Violación a la libertad de expresión ',\n\t\t\t\t'agresioncategorias_id' => '6',\n\t\t\t\t'description' => 'Violación a la libertad de expresión ',\n\t\t\t),\n\t\t));\n\t}", "public function change()\n {\n\t$import_fossils = $this->execute (\n\t\"INSERT INTO fossil (id, submission_date, paleo_decision, latitude, longitude, title, description, visitor_id, rationale) VALUES\n\n\t(1,'2015-07-02',1,40.781979,-73.972014,'Shark tooth','Shark tooth',101,'Pleistocene Carcharodon carcharias'),\n(2,'2015-07-02',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',102,'Foraminiferal limestone'),\n(3,'2015-07-03',1,40.781979,-73.972014,'Maybe T. rex bone','Maybe T. rex bone',103,'Fossil bone chunk'),\n(4,'2015-07-03',2,40.781979,-73.972014,'Fossil?','Fossil?',104,'Probably mineral'),\n(5,'2015-07-04',1,40.781979,-73.972014,'Fossils','Fossils',105,'Fossils'),\n(6,'2015-07-05',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',106,'Probable Favosites and a rock'),\n(7,'2015-07-06',1,40.781979,-73.972014,'Fossil rib with human workmanship','Fossil rib with human workmanship',107,'Probable fossil bone with possible much-later human workmanship'),\n(8,'2015-07-06',1,40.781979,-73.972014,'Fossil','Fossil',108,'Trimerus cephalon'),\n(9,'2015-07-07',2,40.781979,-73.972014,'I guess \\'fossil\\'','I guess \\'fossil\\'',109,'Rocks'),\n(10,'2015-07-08',2,40.781979,-73.972014,'Fossil','Fossil',110,'Rock'),\n(11,'2015-07-11',1,40.781979,-73.972014,'Bone','Bone',111,'Horse radioulna and femur fragments, possibly as old as Ice Age'),\n(12,'2015-07-12',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',112,'Bryozoan hash'),\n(13,'2015-07-12',1,40.781979,-73.972014,'He was told fish but doubts it','He was told fish but doubts it',113,'Gastropods'),\n(14,'2015-07-13',1,40.781979,-73.972014,'Fossil worm tubes and a kind of sea creature, maybe a snail or shell fossil or something else','Fossil worm tubes and a kind of sea creature, maybe a snail or shell fossil or something else',114,'Worm tubes/plant bits/or nothing and a fossil snail'),\n(15,'2015-07-16',2,40.781979,-73.972014,'Fossil','Fossil',115,'Rock'),\n(16,'2015-07-18',2,40.781979,-73.972014,'Fossil','Fossil',116,'Limonite'),\n(17,'2015-07-21',1,40.781979,-73.972014,'Fossil coral or fossil beehive','Fossil coral or fossil beehive',117,'Fossil coral'),\n(18,'2015-07-21',2,40.781979,-73.972014,'Fossilized egg','Fossilized egg',118,'Rock'),\n(19,'2015-07-24',2,40.781979,-73.972014,'Fossil dinosaur egg','Fossil dinosaur egg',119,'Rock'),\n(20,'2015-07-24',2,40.781979,-73.972014,'Octopus Fossil','Octopus Fossil',120,'Calcite cave formation'),\n(21,'2015-07-25',2,40.781979,-73.972014,'Possible fossil egg and tooth','Possible fossil egg and tooth',121,'Probable weathered limestone and ironstone nodule'),\n(22,'2015-07-26',2,40.781979,-73.972014,'Trilobyte','Trilobyte',122,'Fake'),\n(23,'2015-07-26',1,40.781979,-73.972014,'Fossil of maybe a fish, maybe a vertebrate [vertebra?] or a shoulder blade','Fossil of maybe a fish, maybe a vertebrate [vertebra?] or a shoulder blade',123,'Probable fossil marine mammal bone fragment'),\n(24,'2015-07-26',2,40.781979,-73.972014,'Presumably fossil','Presumably fossil',124,'Possible stromatolite, oncolite, or thrombolite'),\n(25,'2015-07-27',1,40.781979,-73.972014,'Possible fossil bone','Possible fossil bone',125,'Fossil bone, maybe turtle'),\n(26,'2015-07-27',2,40.781979,-73.972014,'Possible fossil','Possible fossil',126,'Very odd rock'),\n(27,'2015-07-29',2,40.781979,-73.972014,'Fossil head','Fossil head',127,'Rock'),\n(28,'2015-07-30',2,40.781979,-73.972014,'Fossil egg or septarian concretion','Fossil egg or septarian concretion',128,'Rock or possibly degraded rubber/plastic'),\n(29,'2015-07-31',1,40.781979,-73.972014,'Fossil vertebrates, arthropods and plants (several kinds of fishes, angiosperms, auroch, \ncycads, grasses, and reptile from L. Dev., Perm., Triassic, L. Cret., Paleocene, Miocene, Paleogene, Quaternary','Fossil vertebrates, arthropods and plants (several kinds of fishes, angiosperms, auroch, \ncycads, grasses, and reptile from L. Dev., Perm., Triassic, L. Cret., Paleocene, Miocene, Paleogene, Quaternary',129,'IDs are probably correct'),\n(30,'2015-08-01',2,40.781979,-73.972014,'Dinosaur eggs','Dinosaur eggs',130,'Chert concretions'),\n(31,'2015-08-02',1,40.781979,-73.972014,'Fossil plant','Fossil plant',131,'Calamites pith cast'),\n(32,'2015-08-02',2,40.781979,-73.972014,'Fossil tooth embedded in rock','Fossil tooth embedded in rock',132,'Rock'),\n(33,'2015-08-03',1,40.781979,-73.972014,'Fossil','Fossil',133,'Probably fossil'),\n(34,'2015-08-03',2,40.781979,-73.972014,'Possible fossilized skull of a small of the \\\"preserved flesh\\\" type','Possible fossilized skull of a small of the \\\"preserved flesh\\\" type',134,'Rock'),\n(35,'2015-08-04',1,40.781979,-73.972014,'Fossils','Fossils',135,'Mostly brachiopods'),\n(36,'2015-08-04',1,40.781979,-73.972014,'Fossil','Fossil',136,'Stigmarian rhizomorph'),\n(37,'2015-08-05',1,40.781979,-73.972014,'Possible fossil impressions of a scaly, reptilian type texture, similar to a snake\\'s skin','Possible fossil impressions of a scaly, reptilian type texture, similar to a snake\\'s skin',137,'Fossil lycopsids'),\n(38,'2015-08-09',3,40.781979,-73.972014,'Possible fossil insect or maybe fish or crab','Possible fossil insect or maybe fish or crab',138,'Possible olenellid trilobite'),\n(39,'2015-08-10',3,40.781979,-73.972014,'Presumable fossil skeleton','Presumable fossil skeleton',139,'Possible ammonite'),\n(40,'2015-08-11',1,40.781979,-73.972014,'Fossil tooth or coral','Fossil tooth or coral',140,'Mostly fossil crinoids with bivalve or brachiopod'),\n(41,'2015-08-12',2,40.781979,-73.972014,'Fossil dinosaur egg','Fossil dinosaur egg',141,'Glassy nodule'),\n(42,'2015-08-12',1,40.781979,-73.972014,'Possible fossil','Possible fossil',142,'Mammoth molar'),\n(43,'2015-08-13',2,40.781979,-73.972014,'Fossil front toe or claw from early crocodillian or turtle','Fossil front toe or claw from early crocodillian or turtle',143,'Flint nodule'),\n(44,'2015-08-14',1,40.781979,-73.972014,'Possible fossil','Possible fossil',144,'Fossil echinoid mold'),\n(45,'2015-08-15',2,40.781979,-73.972014,'Possible fossil fungus','Possible fossil fungus',145,'Probable calcite cave formation'),\n(46,'2015-08-16',3,40.781979,-73.972014,'Fossils','Fossils',146,'Branching bryozoan and un known'),\n(47,'2015-08-16',2,40.781979,-73.972014,'Presumably fossil','Presumably fossil',147,'Horn coral'),\n(48,'2015-08-17',2,40.781979,-73.972014,'Possible fossil on possible fossil bone','Possible fossil on possible fossil bone',148,'Waterworn piece of coral with attached weathered worm tube'),\n(49,'2015-08-18',1,40.781979,-73.972014,'Fossil','Fossil',149,'Fossil mammal calcaneum'),\n(50,'2015-08-18',2,40.781979,-73.972014,'Presumably fossil','Presumably fossil',150,'Probable mineral growth'),\n(51,'2015-08-19',2,40.781979,-73.972014,'Fossil whale','Fossil whale',151,'Modern sperm whale'),\n(52,'2015-08-20',1,40.781979,-73.972014,'Trace fossils','Trace fossils',152,'Trace fossils or non-organismal sedimentary features'),\n(53,'2015-08-20',2,40.781979,-73.972014,'“Embryo of a spinosauridae” and fossil egg','“Embryo of a spinosauridae” and fossil egg',153,'Rocks'),\n(54,'2015-08-20',2,40.781979,-73.972014,'Fossil','Fossil',154,'Probably just a rock'),\n(55,'2015-08-21',2,40.781979,-73.972014,'Fossil','Fossil',155,'Rock'),\n(56,'2015-08-21',3,40.781979,-73.972014,'Fossils','Fossils',156,'Probable partial ammonite, unidentifiable fossil, chert'),\n(57,'2015-08-21',2,40.781979,-73.972014,'Marine turtle fossil','Marine turtle fossil',157,'Rock'),\n(58,'2015-08-24',1,40.781979,-73.972014,'Plateosaurus','Plateosaurus',158,'Fossil cave bear finger'),\n(59,'2015-08-25',3,40.781979,-73.972014,'Possible fossil','Possible fossil',159,'Possible trace fossil'),\n(60,'2015-08-26',2,40.781979,-73.972014,'Possible fossilised [sic] egg','Possible fossilised [sic] egg',160,'Mineral accumulation'),\n(61,'2015-08-27',2,40.781979,-73.972014,'Possible dinosaur fossil','Possible dinosaur fossil',161,'Rock'),\n(62,'2015-08-27',1,40.781979,-73.972014,'Fossils','Fossils',162,'Calamites, Favosites, horn coral, colonial coral, other coral or bryozoan'),\n(63,'2015-08-28',1,40.781979,-73.972014,'Possible fossil','Possible fossil',163,'Vinctifer comptoni'),\n(64,'2015-08-29',1,40.781979,-73.972014,'Fossil marine bone','Fossil marine bone',164,'Fossil fish tooth'),\n(65,'2015-08-29',3,40.781979,-73.972014,'Possible fossil bone','Possible fossil bone',165,'Probable rock, if a fossil: maybe a burrow'),\n(66,'2015-08-30',3,40.781979,-73.972014,'Fossil','Fossil',166,'Probable fossil, maybe fish or plant'),\n(67,'2015-08-31',3,40.781979,-73.972014,'Fossil','Fossil',167,'Possible fossil'),\n(68,'2015-09-01',2,40.781979,-73.972014,'Fossilized coral','Fossilized coral',168,'Rock'),\n(69,'2015-09-03',2,40.781979,-73.972014,'Rather large bone (presumably not fossil)','Rather large bone (presumably not fossil)',169,'Tuna bone'),\n(70,'2015-09-03',1,40.781979,-73.972014,'Fossils','Fossils',170,'Productid brachiopod, unknown impression, Syringopora-like coral, horn coral'),\n(71,'2015-09-03',1,40.781979,-73.972014,'Possible fossil','Possible fossil',171,'Fossil nautiloid'),\n(72,'2015-09-04',3,40.781979,-73.972014,'Dinosaur tooth','Dinosaur tooth',172,'Probable fossil'),\n(73,'2015-09-04',3,40.781979,-73.972014,'Fossil plant or animal','Fossil plant or animal',173,'Probable rudist and unknown'),\n(74,'2015-09-04',1,40.781979,-73.972014,'Fossil','Fossil',174,'Clam steinkern'),\n(75,'2015-09-05',1,40.781979,-73.972014,'Possible fossil','Possible fossil',175,'Horn coral'),\n(76,'2015-09-05',3,40.781979,-73.972014,'Fossil','Fossil',176,'Oyster shell, possibly fossil'),\n(77,'2015-09-06',1,40.781979,-73.972014,'Fossils, possible bone','Fossils, possible bone',177,'2 horn corals, a porous rock, and possible obsidian, cow tooth'),\n(78,'2015-09-08',2,40.781979,-73.972014,'Possible fossil','Possible fossil',178,'Probable layered flint'),\n(79,'2015-09-08',3,40.781979,-73.972014,'Fossils','Fossils',179,'A rock and fossil corals'),\n(80,'2015-09-08',2,40.781979,-73.972014,'Presumably fossil bone','Presumably fossil bone',180,'Likely modern ?cow phalanx'),\n(81,'2015-09-10',1,40.781979,-73.972014,'Possible fossil worm','Possible fossil worm',181,'Probable straight-shelled nautiloid, possible brachiopod, probable horn coral, indet. fossil'),\n(82,'2015-09-11',1,40.781979,-73.972014,'Tooth','Tooth',182,'Upper left horse molar or premolar'),\n(83,'2015-09-12',2,40.781979,-73.972014,'Fossils','Fossils',183,'Unknown'),\n(84,'2015-09-13',2,40.781979,-73.972014,'Possible fossil','Possible fossil',184,'Likely modern encrusting bryozoan'),\n(85,'2015-09-14',3,40.781979,-73.972014,'Possible fossil','Possible fossil',185,'Possibly fossil puffer fish jaw'),\n(86,'2015-09-14',2,40.781979,-73.972014,'Possible fossil tooth','Possible fossil tooth',186,'Non-fossil unknown'),\n(87,'2015-09-16',1,40.781979,-73.972014,'fossil','fossil',187,'brachiopod'),\n(88,'2015-09-16',1,40.781979,-73.972014,'Possible fossil jawbone','Possible fossil jawbone',188,'Pleistocene bison or musk ox jaw fragment'),\n(89,'2015-09-17',2,40.781979,-73.972014,'Fossil bone','Fossil bone',189,'Weathered chunk of sandstone matrix'),\n(90,'2015-09-18',2,40.781979,-73.972014,'Top of spine and ribs of Anchisaurus','Top of spine and ribs of Anchisaurus',190,'Weathered chunk of layered sedimentary rock and other rocks'),\n(91,'2015-09-19',1,40.781979,-73.972014,'Fossil','Fossil',191,'Fossil turtle shell fragments, croc osteoderms, and other fragments'),\n(92,'2015-09-19',2,40.781979,-73.972014,'Presumably fossil','Presumably fossil',192,'Probably modern mammal (maybe dolphin) vertebral epiphysis'),\n(93,'2015-09-19',2,40.781979,-73.972014,'Unusual fossil','Unusual fossil',193,'Unknown, but doubtful that it is a fossil'),\n(94,'2015-09-20',1,40.781979,-73.972014,'Fossil','Fossil',194,'Possible turtle and vertebrae'),\n(95,'2015-09-23',1,40.781979,-73.972014,'Possible fossilized tooth','Possible fossilized tooth',195,'Probable horn coral'),\n(96,'2015-09-24',3,40.781979,-73.972014,'Fossils','Fossils',196,'Possible turtle bone (?fossil), Enchodus fang'),\n(97,'2015-09-25',1,40.781979,-73.972014,'Fossil','Fossil',197,'Possibly Devonian coral, brachiopod, and other marine invertebrates'),\n(98,'2015-09-25',2,40.781979,-73.972014,'Fossil','Fossil',198,'Probably coalified plant remains,\nnatural fracture patterns and mineral stains, rock'),\n(99,'2015-09-25',1,40.781979,-73.972014,'Possible fossil','Possible fossil',199,'Moroccan Orthoceras, doctored ammonite'),\n(100,'2015-09-27',2,40.781979,-73.972014,'Bog dinosaur with skin','Bog dinosaur with skin',200,'Rock'),\n(101,'2015-09-27',2,40.781979,-73.972014,'Fossil','Fossil',201,'Unknown'),\n(102,'2015-09-29',1,40.781979,-73.972014,'Fossil','Fossil',202,'Possible coalified wood'),\n(103,'2015-09-30',1,40.781979,-73.972014,'Fossil shell and possible coral','Fossil shell and possible coral',203,'Fossil brachiopod and probable coral'),\n(104,'2015-09-30',1,40.781979,-73.972014,'Dinosaur bone','Dinosaur bone',204,'Probably fossils'),\n(105,'2015-10-01',1,40.781979,-73.972014,'Possible turtle','Possible turtle',205,'Snails'),\n(106,'2015-10-01',2,40.781979,-73.972014,'Some form of fossil reptile, maybe a pterosaur','Some form of fossil reptile, maybe a pterosaur',206,'Fake'),\n(107,'2015-10-01',1,40.781979,-73.972014,'Fossil tooth, tusk, or plant','Fossil tooth, tusk, or plant',207,'Castoroides upper incisor fragment'),\n(108,'2015-10-01',1,40.781979,-73.972014,'Bone','Bone',208,'Probable fragment of cow or horse scapula'),\n(109,'2015-10-04',2,40.781979,-73.972014,'Dinosaur egg, fossil animal head','Dinosaur egg, fossil animal head',209,'Concretion, rock'),\n(110,'2015-10-04',1,40.781979,-73.972014,'Fossil','Fossil',210,'Probable Arthrophycus-like trace fossil'),\n(111,'2015-10-05',1,40.781979,-73.972014,'Fossil shell','Fossil shell',211,'Horn coral'),\n(112,'2015-10-05',2,40.781979,-73.972014,'Presumably fossil egg','Presumably fossil egg',212,'Concretion'),\n(113,'2015-10-05',2,40.781979,-73.972014,'Fossil with a lot of sharp teeth, hardened reptile scales, two short arms and fingers all tangled up under the head or skin that settled after it died','Fossil with a lot of sharp teeth, hardened reptile scales, two short arms and fingers all tangled up under the head or skin that settled after it died',213,'Rock'),\n(114,'2015-10-05',2,40.781979,-73.972014,'Fossil','Fossil',214,'Rock with crystals'),\n(115,'2015-10-06',2,40.781979,-73.972014,'2 chamber fossilized heart','2 chamber fossilized heart',215,'Chert nodule'),\n(116,'2015-10-08',2,40.781979,-73.972014,'?Possibly fossil whale vertebrae','?Possibly fossil whale vertebrae',216,'Modern whale vertebrae'),\n(117,'2015-10-08',1,40.781979,-73.972014,'Fossil','Fossil',217,'Fossil, probably marine invertebrate'),\n(118,'2015-10-09',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',218,'Horn coral'),\n(119,'2015-10-09',3,40.781979,-73.972014,'Possible fossil','Possible fossil',219,'Helmet shell lip'),\n(120,'2015-10-10',1,40.781979,-73.972014,'Fossil','Fossil',220,'Small cetacean vertebra'),\n(121,'2015-10-10',2,40.781979,-73.972014,'Possible fossil','Possible fossil',221,'Botryoidal mineral'),\n(122,'2015-10-11',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',222,'Probable crinoid stem fragment'),\n(123,'2015-10-12',2,40.781979,-73.972014,'Fossil','Fossil',223,'Probable non-fossil rock'),\n(124,'2015-10-12',1,40.781979,-73.972014,'Fossil shell','Fossil shell',224,'Fossil snail'),\n(125,'2015-10-13',1,40.781979,-73.972014,'Fossil','Fossil',225,'Halysites'),\n(126,'2015-10-14',3,40.781979,-73.972014,'Trace fossil or straight-shelled cephalopod, and possible fossil imprint','Trace fossil or straight-shelled cephalopod, and possible fossil imprint',226,'Probable trace fossil, rock'),\n(127,'2015-10-15',2,40.781979,-73.972014,'Presumably fossil','Presumably fossil',227,'Probably rock'),\n(128,'2015-10-15',1,40.781979,-73.972014,'Fossil','Fossil',228,'Horn coral'),\n(129,'2015-10-17',1,40.781979,-73.972014,'Mastodon teeth','Mastodon teeth',229,'Mastodont teeth'),\n(130,'2015-10-19',1,40.781979,-73.972014,'Fossil','Fossil',230,'Isotelus pygidium'),\n(131,'2015-10-19',2,40.781979,-73.972014,'Fossil','Fossil',231,'Rock'),\n(132,'2015-10-20',2,40.781979,-73.972014,'Possible fossil','Possible fossil',232,'Odd rock'),\n(133,'2015-10-22',2,40.781979,-73.972014,'Not rocks','Not rocks',233,'Geodes'),\n(134,'2015-10-22',2,40.781979,-73.972014,'Fossil skull','Fossil skull',234,'Rock'),\n(135,'2015-10-23',2,40.781979,-73.972014,'Big dinosaur bone','Big dinosaur bone',235,'Rock'),\n(136,'2015-10-23',1,40.781979,-73.972014,'Presumably fossil bone','Presumably fossil bone',236,'Palmoxylon'),\n(137,'2015-10-23',2,40.781979,-73.972014,'Presumably fossils','Presumably fossils',237,'Sedimentary concretions'),\n(138,'2015-10-23',2,40.781979,-73.972014,'Possible fossil','Possible fossil',238,'Rock'),\n(139,'2015-10-24',1,40.781979,-73.972014,'Fossil','Fossil',239,'Ammonite chamber steinkern'),\n(140,'2015-10-25',1,40.781979,-73.972014,'Fossil','Fossil',240,'Probable orthocone'),\n(141,'2015-10-25',2,40.781979,-73.972014,'cephalopod concretions','cephalopod concretions',241,'unknown'),\n(142,'2015-10-26',3,40.781979,-73.972014,'Possible fossils (one possible fossil anemone)','Possible fossils (one possible fossil anemone)',242,'Manganese dendrites, horn coral, branching bryozoan mold'),\n(143,'2015-10-26',2,40.781979,-73.972014,'Fossil','Fossil',243,'Septarian concretions'),\n(144,'2015-10-26',3,40.781979,-73.972014,'Fossil, coprolites','Fossil, coprolites',244,'Heteromorph ammonite, non-coprolites'),\n(145,'2015-10-27',3,40.781979,-73.972014,'Possible fossil','Possible fossil',245,'Possible fossil'),\n(146,'2015-10-27',1,40.781979,-73.972014,'Possible fossil','Possible fossil',246,'Ammonite'),\n(147,'2015-10-28',2,40.781979,-73.972014,'Fossil','Fossil',247,'Rock'),\n(148,'2015-10-28',2,40.781979,-73.972014,'Bones or a skeleton of a dragon that spits fire','Bones or a skeleton of a dragon that spits fire',248,'No response required'),\n(149,'2015-10-28',1,40.781979,-73.972014,'Fossil','Fossil',249,'Probably mold of club urchin spine'),\n(150,'2015-10-28',2,40.781979,-73.972014,'Possible fossilized egg','Possible fossilized egg',250,'Concretion'),\n(151,'2015-10-30',1,40.781979,-73.972014,'Megalodon tooth','Megalodon tooth',251,'Probable Megalodon projectile point'),\n(152,'2015-10-30',1,40.781979,-73.972014,'Presumably fossil','Presumably fossil',252,'Fossil shell');\"\n\n\t);\n }", "function fillMinistriesTable() {\n global $db;\n\n //oblast, meno, datum od a do\n $query = \"SELECT \n CASE\n WHEN utvary.nazov LIKE '%školstva%' THEN 'školstvo'\n WHEN utvary.nazov LIKE '%zdravotníctva%' THEN 'zdravotníctvo'\n WHEN utvary.nazov LIKE '%financií%' THEN 'financie'\n WHEN utvary.nazov LIKE '%dopravy%' THEN 'doprava'\n ELSE 'iné'\n END AS oblast,\n utvary.nazov AS ministerstvo, \n osoby.meno AS minister,\n osoby.datumOD AS od,\n osoby.datumDO AS do \n FROM utvary\n INNER JOIN osoby \n ON osoby.id_utvary = utvary.id\";\n\n $stmt = $db->query($query);\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($results as $result) {\n echo \"<tr class='table-item'>\";\n echo \"<td>{$result['oblast']}</td>\";\n echo \"<td>{$result['ministerstvo']}</td>\";\n echo \"<td>{$result['minister']}</td>\";\n echo \"<td>{$result['od']}</td>\";\n echo \"<td>{$result['do']}</td>\";\n\n /*vypocet poctu dni ministra vo funkcii\n podla https://www.geeksforgeeks.org/program-to-find-the-number-of-days-between-two-dates-in-php/ */\n $endDate = ($result['do']) ? $result['do'] : date(\"Y-m-d\");\n $diff = strtotime($endDate) - strtotime($result['od']);\n $days = abs(round($diff / 86400));\n\n echo \"<td>{$days}</td>\";\n echo \"</tr>\";\n }\n}", "function insertVisita($conexion,$ip,$fecha,$hora){\r\n $numTransaccion = 0;\r\n $consu=\"insert into visitas(ip_cliente,fecha,time) \r\n values('$ip','$fecha','$hora')\";\r\n insertUpdate($conexion,$consu);\r\n }", "function generar_report_turnosxfecha($fecha){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$con = \"SELECT u.dni_usu AS dni,concat(apellidos_usu,', ',nombres_usu) AS name,turno_hora,fecha_hora\n\t\t\tFROM usuario as u INNER JOIN horario as h\n\t\t\tON u.dni_usu=h.dni_usu WHERE activo_usu='si' AND fecha_hora = '$fecha' AND turno_hora <> '' AND turno_hora <> '--'\n\t\t\tORDER BY turno_hora\";\n\t$query = mysqli_query($connect,$con);\t\t\n\t$query2 = mysqli_query($connect,$con);\n\n\tif($lista= mysqli_fetch_array($query)){\n\t/* cabecera de la tabla del reporte */\n\t\t$fecha_front = orderfecha($fecha);\n\n\t\t$dia = substr($fecha_front,0,2);\n\t\t$mes = generar_mes(substr($fecha_front,3,2));\n\t\t$anio = substr($fecha_front,6,4);\n\t\t\n\t\t$report = \"\n\t\t<br/><center><h4 class='text-info'>Turnos asignados del día $dia de $mes de $anio </h4></center><br/>\n\t\t<table class='table table-bordered table-striped'>\n\t\t\t<thead>\n\t\t\t\t<tr class='alert alert-primary'>\n\t\t\t\t\t<th><center>N°</center></th>\n\t\t\t\t\t<th><center>Apellidos y Nombres</center></th>\n\t\t\t\t\t<th><center>Turno</center></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\";\n\t\t$i = 1;\n\t\twhile($row= mysqli_fetch_array($query2)){\n\t\t\t$dni = $row['dni'];\n\t\t\t$fecha = orderfecha($row['fecha_hora']);\n\t\t\t$names = $row['name'];\t\t\t\n\t\t\t$names = mb_convert_case($names, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t$turno = $row['turno_hora'];\n\t\t\t$turno = mb_convert_case($turno, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t\n\t\t\t$report = $report.\"\n\t\t\t<tr>\n\t\t\t\t<td><center>\".$i.\"</center></td>\n\t\t\t\t<td class='names'>\".$names.\"</td>\n\t\t\t\t<td><center>\".$turno.\"</center></td>\n\t\t\t</tr>\";\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t$report = $report.\"</tbody></table>\";\n\t}else{\n\t\t$report = \"\n\t\t<tr>\n\t\t\t<td colspan='4'><h5 class='text-info'>No hay Registros.</h5><p class='text-info'>No se registraron turnos en esta fecha.</p></td>\n\t\t</tr>\";\n\t}\t\t\t\t\n\treturn $report;\n}", "public function desparasitantes_tatalDesparasitantes(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idDesparasitanteMascota) as cantidadDesparasitantes from tb_desparasitantesMascotas \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadDesparasitantes'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getChoisirVisiteur() //cette fonction permet au comptable de choisir un visiteur\n {\n $requetePrepare = PdoGSB::$monPdo->prepare(\n 'SELECT *'\n . 'FROM visiteur'\n //. 'ORDER BY nom'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n\n }", "function actualizarEstadisticaV(){\n\t\t\t$sql=\"UPDATE estadistica SET votovalido = votovalido+1,\nvotototal = votototal+1 where idestaditica=(Select max(idestaditica) from estadistica);\";\n\t\t\treturn $sql;\n\t\t}", "public function alejarCamaraAlumnos1() {\n\n self::$alumnos1->alejarZoom();\n\n }", "function consulta_registro_ventas_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=2\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED)\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function EdadesCapacitados($arrayCedulasCapacitados, $eventosCap, $tipoOrg, $org)\n{\n\t$arrayCedulasCapacitados = array_unique($arrayCedulasCapacitados);\n\t//$eventosCap = array_unique($eventosCap);\n\t//print_r2($arrayCedulasCapacitados);\n\t//print_r2($eventosCap);\n\n\t$sizeEventos = count($eventosCap);\n\t$anioSel = getAnioSeleccionado();\n\tglobal $tablaCapacitados;\n\t$indiceCap = 0;\n\tforeach($arrayCedulasCapacitados as $valor)\n\t{\n\t\tfor($i = 0; $i < $sizeEventos; $i++)\n\t\t{\n\t\t\t$sqlDetalleCapacitados = \"select * from asistentes where cod_evento = '\" . $eventosCap[$i] . \"' and cedula = '\" . $valor . \"' and anio = \" . $anioSel . \" and tipo_evento = '\" . $tipoOrg . \"' group by cedula\";\n\t\t\t//echo $sqlDetalleCapacitados . \"<br>\";\n\t\t\t$resDetalleCap = query($sqlDetalleCapacitados);\n\t\t\t$numFilas = mysql_num_rows($resDetalleCap);\n\n\t\t\tif($numFilas > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resDetalleCap))\n\t\t\t\t{\n\t\t\t\t\t$indiceCap++;\n\t\t\t\t\t$nOrg = \"\";\n\t\t\t\t\t//echo $sqlDetalleCapacitados . \"<br>\";\n\t\t\t\t\t$sqlOrgCap = \"select organizacion from u_organizaciones where cod_u_organizaciones = \" . $org;\n\t\t\t\t\t$resOrgCap = query($sqlOrgCap);\n\t\t\t\t\twhile($fila1 = mysql_fetch_array($resOrgCap))\n\t\t\t\t\t{\n\t\t\t\t\t\t$nOrg = $fila1['organizacion'];\n\t\t\t\t\t}\n\t\t\t\t\t$tablaCapacitados .= \"<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $indiceCap . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $fila['apellidos'] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $fila['cedula'] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $fila['genero'] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $fila['edad'] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $eventosCap[$i] . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $tipoOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\" . $nOrg . \"</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "public function mostrar_tabla_anuncios(){\n\n\t\t$return = '';\n\t\t$mensaje = array('0' => 'Desactivado', '1' => 'Activo');\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'anuncio_promocionado',\n\t\t\t\t\t 'anuncio_e','paquete','activo','apto');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios', NULL, $cols)){\n\n\t\t\t$return .= '<table class=\"table table-bordered table-hover\">';\n\n\t\t\t$return .= '<tr>\n\t\t\t\t\t <th>Imagen</th>\n\t\t\t\t\t <th>Clave interna</th>\n\t\t\t\t\t <th>Paquete</th>\n\t\t\t\t\t <th>Provincia</th>\n\t\t\t\t\t <th>Operacion</th>\n\t\t\t\t\t <th>Nº imagenes</th>\n\t\t\t\t\t <th>Idiomas</th>\n\t\t\t\t\t <th>Contratado</th>\n\t\t\t\t\t <th>Anuncio apto</th>\n\t\t\t\t\t <th>Anuncio activo</th>\n\t\t\t\t\t <th>Opciones</th>\n\t\t\t\t\t </tr>';\n\t\t\t//por cada anuncio varias cosas habra que hacer\n\t\t\t$i=1;\t\t \n\t\t\tforeach ($salida as $key => $value) {\n\t\t\n\t\t\t\t$num = $i++;\n\t\t\t\t$id_arr = md5($value['id']);\n\t\t\t\t$imagen = $this->sacar_foto($id_arr, $this->user);\n\n\t\t\t\t$return .='<tr>\n\t\t\t\t\t \t<td>'.$imagen.'</td>\n\t\t\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t\t\t <td>'.$value['paquete'].'</td>\n\t\t\t\t\t <td>'.$value['provincia'].'<br />\n\t\t\t\t\t '.$this->show_municipio($value['municipio']).'</td>\n\t\t\t\t\t <td>'.$value['tipo_venta'].'</td>';\n\n\n\n\t\t\t\t//mostrara numero de imagenes en el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->num_imagenes_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\n\t\t\t\t//mostrando idiomas en los que esta el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->idiomas_del_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\t\t\t\t//estrella o promocionado\n\t\t\t\t$return .='<td>';\n\t\t\t\tif(!empty($value['anuncio_promocionado']) && ($value['anuncio_promocionado'] == 1)){\n\t\t\t\t\t$return .= 'Anuncio promocionado<br />';\t}\n\t\t\t\tif($value['anuncio_e'] == 1){\n\t\t\t\t\t$return .= 'Anuncio estrella';\t\t\t}\t\n\t\t\t\t\t\n\t\t\t $return .= '</td>';\n\t\t\t $return .= '<td>'.$value['apto'].'</td>';\n\t\t\t $return .= '<td id=\"act-'.$id_arr.'\">'.$mensaje[$value['activo']].'</td>';\n\t\t\t //dropdown de opciones\n\t\t\t $return .= '<td>'.$this->dropdown_tabla_anuncios($id_arr).'</td>';\n\t\t\n\t\t\t\t$return .= '</tr>';\n\n\t\t\t}//fin del foreach\n\n\t\t\t$return .= '</table>';\n\n\n\t\t}else{\n\t\t\t$return .= '<h5 id=\"sec1\">No hay anuncios 1 </h5>';\n\t\t}\n\n\t\treturn $return;\n\t}", "public static function estadisticasDesignacionesDetalladas($ciclo)\n {\n $sql =\"SELECT sed.abreviacion as Sede, car.nombre as Carrera, \n CONCAT(per.apellido,', ',per.nombre) as persona,\n IF(per.idsexo=1,'M','F') as sexo, \n DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(per.fechanac)), '%Y')+0 AS edad,\n CONCAT(td.descripcion,' (', cd.descripcion,')') as tipo_designacion,\n m.nombre as materia, des.iddesignacion,\n IFNULL((SELECT CONCAT(descripcion, IF(concluyo=2 AND ne.idnivelestudio NOT IN (2,3),' (En Curso)','')) FROM niveles_estudios WHERE idordenimportancia = MAX(ne.idordenimportancia)),' ') as nivel_educativo, \n GROUP_CONCAT(DISTINCT est.descripcion SEPARATOR ',') as titulo,\n rp.resolucion, ciu.descripcion as ciudad \n FROM designaciones des\n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona\n LEFT JOIN contactos cont ON per.idpersona = cont.idpersona\n LEFT JOIN ciudades ciu ON cont.idciudadt = ciu.idciudad\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra\n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN materias m ON mp.idmateria = m.idmateria\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera\n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion = cd.idcategoriadesignacion\n LEFT JOIN estudios est ON per.idpersona = est.idpersona\n LEFT JOIN niveles_estudios ne ON est.idnivelestudio = ne.idnivelestudio\n LEFT JOIN resoluciones_profesores rp ON des.idresolucioncsu = rp.idresolucionprofesor\n WHERE YEAR(des.inicio)= \".$ciclo.\" AND des.idestadodesignacion = 5\n GROUP BY per.idpersona, des.iddesignacion; \";\n\n //echo $sql;exit;\n\n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n \n return $q;\n }", "function newsDiLihat( $tbl_news, $Det ){\n\t\n\t\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE id='$Det'\");\n\t\t\t$datanews = mysql_fetch_array($sql);\n\t\t\t$dilihat = $datanews ['dilihat'];\n\t\t\t$dilihat = $dilihat+1;\n\t\n\t\t\t$sqlupdate = mysql_query(\"UPDATE $tbl_news SET dilihat='$dilihat' WHERE id='$Det'\");\n\t\t\t\n\t\t\treturn $sqlupdate;\n\t}", "function crear_tabla_horario()\n {\n //El funcionamiento es el mismo que en crear_tabla, excepto que aqui no le pasamos el profesor\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n\n $num1 = filter_input(INPUT_POST, 'num1');\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n $mes = str_pad($mes, 2, \"0\", STR_PAD_LEFT);\n $h_profe=$this->model->get_h_profe($profe[0]['id_profesores'], $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n for($i=0;$i<5;$i++)\n {\n\n $numeros[$i+1] = $numeros[$i]+1;\n\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n for($i=8;$i<21;$i++)\n {\n if($i!=14 && $i!=15)\n {\n\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n $ano=str_pad($numeros[$k],2,\"0\",STR_PAD_LEFT);\n //Si el horario del profe esta vacio printamos boton en todos los td\n if(!empty($h_profe))\n {\n $cont = 0;\n foreach ($h_profe as $hora)\n {\n $mes_1 = $mes;\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $fecha = $año.\"-\".$mes_1.\"-\".$ano;\n\n //Comprobamos si la hora y la fecha coincide y sumamos 1 al contador\n if($hora['hora']==$i && $hora['fecha'] == $fecha)\n {\n $cont++;\n }\n }\n //Si el cantador sigue en 0 printamos boton ya que significa que no ha sido marcada\n if($cont ==0)\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n }\n else\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n }\n $total.=\"</tr>\";\n }\n }\n echo $total;\n }", "public function historico()\n {\n $pasientes = (new \\App\\Models\\Pasientes())->getAll(['pasientes.*, null AS ciudad']);\n\n # Busqueda de ciuidad\n foreach ($pasientes as $key => $pasiente){\n $ciudad = (new Ciudades())->getById($pasiente['id_ciudad']);\n $pasientes[$key]['ciudad'] = $ciudad['ciudad'];\n }\n\n View::set('pasientes', $pasientes);\n echo View::render('pasientes');\n }", "function crear_tabla()\n {\n //Array para saber cuantos dias tienen los meses\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n //Recogemos los datos\n $num1 = filter_input(INPUT_POST, 'num1');\n $profe = filter_input(INPUT_POST, 'profe');\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n //Recogemos los horarios del profesor y la zona seleccionados\n $h_profe=$this->model->get_h_profe($profe, $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n //Sacamos los cinco numeros de la semana\n for($i=0;$i<5;$i++)\n {\n $numeros[$i+1] = $numeros[$i]+1;\n //si el numero es superior al dia maximo del mes entonces le restamos el dia maximo y reseteamos los dias\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n //marcamos que cambiamos de mes\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n //bucle para crear los tr de las horas\n for($i=8;$i<21;$i++)\n {\n //Quitamos las horas de comer\n if($i!=14 && $i!=15)\n {\n //generamos el primer td con la hora\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n //bucle para sacar el resto de td\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n //foreach de horarios para comprobar si coincide con la fecha y tenemos que printar un boton\n foreach ($h_profe as $hora)\n {\n //creamos otra variable de mes para no modificar la global\n $mes_1 = $mes;\n //Preguntas para saber si hay que modificar el mes, ya sea sumar o cambiar a 1\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n //Añadimos un zero a la izquierda si es inferior a 10\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $dia = str_pad($numeros[$k], 2, \"0\", STR_PAD_LEFT);\n //Montamos la fecha\n $fecha = $año.\"-\".$mes_1.\"-\".$dia ;\n\n //Preguntamos si la hora del tr es la misma que la del horario y lo mismo con la fecha\n if($hora['hora']== $i && $hora['fecha'] == $fecha)\n {\n //Si coincide creamos el boton\n $total.= \"<button class='practica hvr-grow-shadow'>Marcar</button>\";\n }\n }\n //Le metemos un span oculto con los datos de dia y hora.\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n\n }\n $total.=\"</tr>\";\n }\n }\n //Enviamos la tabla\n echo $total;\n }", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "public function gera_linhas_somatorios()\n\t{\n\t\tif(count($this->somatorios) > 0)\n\t\t{\n\t\t\techo \"<tr class=totalizadores>\";\n\t\t\tfor($i=0; $i < count($this->nome_colunas); $i++)\n\t\t\t{\n\t\t\t\t$alinhamento = $this->nome_colunas[$i][alinhamento];\n\n\t\t\t\tfor($b=0; $b < count($this->somatorios); $b++)\n\t\t\t\t{\n\t\t\t\t\tif($this->nome_colunas[$i][nome_coluna] == $this->somatorios[$b][nome_coluna])\n\t\t\t\t\t{\n\t\t\t\t\t\t$valor = $this->somatorios[$b][total];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// \tVERIFICO SE E PARA IMPRIMIR O VALOR\n\t\t\t\tif($this->nome_colunas[$i][somatorio] == 's')\n\t\t\t\t{\n\t\t\t\t\t//\t ESCOLHO O TIPO DE DADO\n\t\t\t\t\tswitch($this->nome_colunas[$i][tipo])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'moeda':\n\t\t\t\t\t\t\t$valor = Util::exibe_valor_moeda($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'data':\n\t\t\t\t\t\t\t$valor = Util::data_certa($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$valor = $valor;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"\n\t\t\t\t\t\t \t<td align=$alinhamento>\n\t\t\t\t\t\t\t\t\" . $valor . \"\n\t\t\t\t\t\t \t</td>\n\t\t\t\t\t\t \";\n\t\t\t\t\t$valor = '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"<td align=$alinhamento></td>\";\n\t\t\t\t}\n\n\n\n\t\t\t}\n\t\t\techo '</tr>';\n\t\t}\n\t}", "public function index()\n {\n $viajes = Viaje::all();\n $id_user = Auth::user()->id;\n\n foreach($viajes as $key => $viaje)\n {\n $id_movil= $viaje->id_movil;\n $id_tarifa= $viaje->id_tarifa;\n $id_user= $viaje->id_user;\n \n $tarifa = Tarifa::find($id_tarifa);\n $movil = Movil::find($id_movil);\n $user = User::find($id_user);\n\n $id_servicio= $tarifa->id_servicio;\n $servicio = Servicio::find($id_servicio);\n\n $movilNameModelo = $movil->modelo;\n $movilNamePlaca = $movil->placa;\n\n $movilName = $movilNameModelo.\" \".$movilNamePlaca;\n $tarifaName = $tarifa->name;\n $tarifaPrecio = $tarifa->precio;\n $userName = $user->name;\n $servicioName = $servicio->name;\n \n $viaje->id_user=$userName;\n $viaje->id_movil=$movilName;\n $viaje->id_tarifa=$tarifaName;\n $viaje->precio=$tarifaPrecio;\n $viaje->id_servicio=$servicioName;\n }\n\n $hoy = getdate();\n $dia = $hoy['mday'];\n $mes = $hoy['mon'];\n \n if($mes<10){\n $hoystring = '0'.$mes.'-'.$dia;\n }else{\n $hoystring = $mes.'-'.$dia;\n };\n\n $valor = Contador::where(\\DB::raw(\"to_char(created_at, 'mm-dd')\"),$hoystring)->count();\n if($valor==0){\n Contador::create([\n 'user' => 0,\n 'parada' => 0,\n 'promocion' => 0,\n 'estadistica' => 0,\n 'reporte' => 0,\n 'movil' => 0,\n 'servicio' => 0,\n 'tarifa' => 0,\n 'viaje' => 1,\n 'permiso' => 0,\n 'fecha' => $hoystring,\n ]);\n }else{\n $vectores = Contador::where(\\DB::raw(\"to_char(created_at, 'mm-dd')\"),$hoystring)->get();\n foreach ($vectores as $vector){\n $contador = $vector;\n }\n $contador->viaje = $contador->viaje + 1;\n $contador->save();\n };\n $tot = $this->totVisitas();\n return view('crudviajeAdmin.index', compact('viajes','tot'));\n }", "function RellenarIndice()\r\n {\r\n $this->AddPage();\r\n\r\n $this->Imprimir('2. Revisión y Análisis de las siguientes interrupciones:', 20, 10);\r\n\r\n $cont_causa500 = 1;\r\n $cont_imp = 1;\r\n $cont_pro = 1;\r\n\r\n foreach ($this->eventos as $evento)\r\n {\r\n if (Doctrine_Core::getTable('SAF_EVENTO_CONVOCATORIA')->getEventoConvocatoria($evento, $this->convocatoria)->getStatus() == 'analizado')\r\n {\r\n $this->ImprimirSubtituloIndice($evento, $cont_causa500, $cont_imp, $cont_pro);\r\n\r\n $fecha_evento = strftime(\"%A, %d/%m/%Y\", strtotime($evento->getFHoraIni()));\r\n $text = \"RI. \" . $evento->getCEventoD() . \" - Circuito \" . $evento->getCircuito() . \". \" . $fecha_evento . '. MVAmin: ' . $evento->getMvaMin();\r\n $this->Imprimir($text, 40, 10);\r\n }\r\n }\r\n }", "function tabla_filas_proyecto_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.$opera[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.$boucher[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.$observ[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function mdatosEjercicioInformacion() {\n\t\t$conexion = conexionbasedatos();\n\t\t\n\t\t$idejercicio = $_GET[\"idejercicio\"];\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO AND FE.IDEJERCICIO = $idejercicio;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "static public function showVisits(){\n $registro = static::leftJoin(\"users\",\"visitors.user_id\",\"=\",\"users.id\")\n ->join('handling_times',\"visitors.handling_time_id\",\"=\",\"handling_times.id\")\n ->join('direction_tickets',\"visitors.direction_ticket_id\",\"=\",\"direction_tickets.id\")\n ->join('directions',\"direction_tickets.direction_id\",\"=\",\"directions.id\")\n ->join('sectors',\"directions.sector_id\",\"=\",\"sectors.id\")\n ->select('visitors.id','first_name','last_name','identification_card','phone','sector','input','output')\n ->orderBy('visitors.id', 'DESC')\n ->get();\n return $registro;\n }", "public function genero(Request $request)\n {\n ///ALUMNOS EXPEDIENTE LLENO\n\n $alumnos=DB::select('Select (select COUNT(exp_generales.id_exp_general)\n FROM exp_generales\n JOIN exp_asigna_alumnos ON exp_generales.id_alumno=exp_asigna_alumnos.id_alumno\n JOIN exp_asigna_tutor ON exp_asigna_tutor.id_asigna_generacion=exp_asigna_alumnos.id_asigna_generacion\n WHERE exp_generales.id_carrera='.$request->id_carrera.' AND exp_asigna_alumnos.id_asigna_generacion='.$request->id_asigna_generacion.' AND exp_asigna_alumnos.deleted_at is null AND exp_generales.sexo=\"M\") as M, (select COUNT(exp_generales.id_exp_general)\n FROM exp_generales\n JOIN exp_asigna_alumnos ON exp_generales.id_alumno=exp_asigna_alumnos.id_alumno\n JOIN exp_asigna_tutor ON exp_asigna_tutor.id_asigna_generacion=exp_asigna_alumnos.id_asigna_generacion\n WHERE exp_generales.id_carrera='.$request->id_carrera.' AND exp_asigna_alumnos.id_asigna_generacion='.$request->id_asigna_generacion.' AND exp_asigna_alumnos.deleted_at is null AND exp_generales.sexo=\"F\") as F');\n $totalcontestaron=$alumnos[0]->M+$alumnos[0]->F;\n //dd($totalcontestaron);\n Session::put('total_alumnos',$totalcontestaron==0?1:$totalcontestaron);\n Session::put('total_mujeres',$alumnos[0]->F==0?1:$alumnos[0]->F);\n Session::put('total_hombres',$alumnos[0]->M==0?1:$alumnos[0]->M);\n\n ///ALUMNOS TOTALES\n $datos=DB::select('SELECT (select count(gnral_alumnos.id_alumno) as Masculino FROM gnral_alumnos\n JOIN exp_asigna_alumnos ON gnral_alumnos.id_alumno=exp_asigna_alumnos.id_alumno\n JOIN exp_asigna_tutor ON exp_asigna_tutor.id_asigna_generacion=exp_asigna_alumnos.id_asigna_generacion\n WHERE gnral_alumnos.genero=\"M\" AND exp_asigna_alumnos.deleted_at is null AND gnral_alumnos.id_carrera='.$request->id_carrera.' AND\n exp_asigna_alumnos.id_asigna_generacion='.$request->id_asigna_generacion.') as MAS,\n (select count(gnral_alumnos.id_alumno) as Femenino FROM gnral_alumnos\n JOIN exp_asigna_alumnos ON gnral_alumnos.id_alumno=exp_asigna_alumnos.id_alumno\n JOIN exp_asigna_tutor ON exp_asigna_tutor.id_asigna_generacion=exp_asigna_alumnos.id_asigna_generacion\n WHERE gnral_alumnos.genero=\"F\" AND exp_asigna_alumnos.deleted_at is null AND gnral_alumnos.id_carrera='.$request->id_carrera.' AND\n exp_asigna_alumnos.id_asigna_generacion='.$request->id_asigna_generacion.') as FEM');\n\n $total=$datos[0]->MAS+$datos[0]->FEM;\n return response()->json(\n [[\"name\"=>\"Hombres\",\"y\"=>round(($datos[0]->MAS)*100/($total==0?1:$total))],\n [\"name\"=>\"Mujeres\",\"y\"=>round(($datos[0]->FEM)*100/($total==0?1:$total))]],200\n );\n }", "public function indexHistorialEstudiante()\n { \n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n if($resultado != 1 || $rolActual != 4){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValuesEstudiante($idActual[0][0]); //carga el index con todas las solicitudes del estudiante actualmente logueado \n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }", "function ultimos_materiales() {\n\t\n\t\t\n\t\t$query = \"SELECT materiales.*, licencias.*\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tORDER BY materiales.fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function bloc_stats_generales(\r\n\t$prev_visites,\r\n\t$global_jour,\r\n\t$date_globaljour,\r\n\t$global_stats,\r\n\t$prim_jour_stats,\r\n\t$nb_jours_stats,\r\n\t$moy_global_stats,\r\n\t$cumul_vis_art_jour,\r\n\t$moy_pages_jour,\r\n\t$global_pages_stats,\r\n\t$moy_pag_vis,\r\n\t$date_max,\r\n\t$visites_max\r\n) {\r\n\r\n\tif (is_array($prev_visites)) {\r\n\t\tif ($prev = intval($prev_visites[1])) {\r\n\t\t\t$prev = \"&nbsp;+ \" . $prev;\r\n\t\t} else {\r\n\t\t\t$prev = '';\r\n\t\t}\r\n\t}\r\n\r\n\t$aff = '';\r\n\r\n\t$aff .= debut_cadre_relief(\"statistiques-24.gif\", true)\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:nombre_visites_') . \"</span>\\n\"\r\n\t\t. \"<br /><span class='verdana2'>\" . $date_globaljour . \"</span>\"\r\n\t\t. \"<div class='cell_info alter-fond'>\"\r\n\t\t. _T('actijour:global_vis_jour', array('global_jour' => $global_jour . $prev))\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"<div class='cell_info'>\"\r\n\t\t. _T('actijour:global_vis_global', array('global_stats' => $global_stats))\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:stats_actives_') . \"</span>\\n\"\r\n\t\t. \"<div class='cell_info'>\\n\"\r\n\t\t. _T('actijour:depuis_le_prim_jour', array('prim_jour_stats' => $prim_jour_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:soit_nbre_jours', array('nb_jours_stats' => $nb_jours_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:soit_moyenne_par_jour', array('moy_global_stats' => $moy_global_stats)) . \"\\n\"\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:pages_article_vues') . \"</span><br />\\n\"\r\n\t\t. \"<div class='cell_info alter-fond'>\\n\"\r\n\t\t. _T('actijour:pages_art_cumul_jour', array('cumul_vis_art_jour' => $cumul_vis_art_jour)) . \"<br />\\n\"\r\n\t\t. _T('actijour:pages_art_moyenne_jour', array('moy_pages_jour' => $moy_pages_jour)) . \"<br />\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div class='cell_info'>\\n\"\r\n\t\t. _T('actijour:pages_global_cumul_jour', array('global_pages_stats' => $global_pages_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:pages_global_moyenne_jour', array('moy_pag_vis' => $moy_pag_vis)) . \"<br />\\n\"\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:grosse_journee_') . \"</span>\\n\"\r\n\t\t. \"<div class='cell_info'>\\n\"\r\n\t\t. http_img_pack('puce-verte-breve.gif', 'ico', '', '') . \"&nbsp;\"\r\n\t\t. _T('actijour:date_jour_maxi_vis', array('date_max' => $date_max, 'visites_max' => $visites_max))\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function get_horas_asignadas_x_designacion($designacion)\n {\n $anio = date('Y');\n\t$sql = \"\n\t\tSELECT sum(carga_horaria) as suma\n\t\tFROM asignaciones\n\t\tWHERE designacion = $designacion AND estado = 1\n OR (designacion = $designacion AND estado = 15 AND ciclo_lectivo = $anio)\n\t\t\";\n\treturn toba::db()->consultar_fila($sql);\n }", "function show_global_worse()\n{\n$sql = \"SELECT datum, SUM(count) AS count FROM `stats` GROUP BY datum ORDER BY SUM(count) ASC LIMIT 0,14\";\n$result = mysql_db_query(\"portal\",$sql);\nwhile($zeile = mysql_fetch_array($result))\n{\nextract($zeile);\n\necho '<table><tr><td width=\"100\">';\necho $datum;\necho '</td><td>';\necho $count;\necho '</td></tr></table>';\n}\n}", "public function getPageCountData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.category_id','category.category_name', 'statistic.ip_address as access','statistic.created_at')) \n\t\t//->join('category','category.id','=','statistic.category_id')->groupBy('category_name'); \n\n\t\t$stat = StatView::select(array('id','category_name', 'ip_address as temp2', 'ip_address as temp1'))->groupBy('category_name');\n\t\t\n\t\treturn Datatables::of($stat) \n\t\t-> edit_column('temp1','{{ DB::table(\\'stat_view\\')->where(\\'category_name\\', \\'=\\', $category_name)->orderBy(\\'date\\',\\'DESC\\')->first()->date }}')\n\t\t-> edit_column('temp2','{{ DB::table(\\'stat_view\\')->where(\\'category_name\\', \\'=\\', $category_name)->count() }}')\n\t\t-> remove_column('id') \n\t\t-> make();\n\n\t}", "function tabla_filas_compra_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$empresa,$caja,$banco,$cuenta,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t$empresa = explode(\"|\", $empresa);\n\t\t$caja = explode(\"|\", $caja);\n\t\t$banco = explode(\"|\", $banco);\n\t\t$cuenta = explode(\"|\", $cuenta);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.utf8_decode($opera[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.trim($boucher[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.utf8_decode($observ[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tsucur'.$i.'\" id = \"Tsucur'.$i.'\" value = \"'.$empresa[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcaja'.$i.'\" id = \"Tcaja'.$i.'\" value = \"'.$caja[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tbanco'.$i.'\" id = \"Tbanco'.$i.'\" value = \"'.$banco[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcuenta'.$i.'\" id = \"Tcuenta'.$i.'\" value = \"'.$cuenta[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "public function examenes_tatalExamenes(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idExamen) as cantidadExamenes from tb_examenes \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadExamenes'];\t\t\t\n\t\t\t\n\t\t\t\n }", "function ultimos_materiales_limit($inicial,$cantidad) {\n\t\n\t\t\n\t\t$query = \"SELECT materiales.*, licencias.*\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tORDER BY materiales.fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function ListaCompetenciaDeUsuario(){\n \n include(\"../modelo/cnx.php\");\n $cnx = pg_connect($entrada) or die (\"Error de conexion. \". pg_last_error());\n session_start();\n $id_usuario=$_SESSION[\"id_usuario\"];\n $seleccionar=\"SELECT competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n FROM equipo_usuario, equipo, competencia_equipo, competencia, usuario\n where competencia.id_competencia=competencia_equipo.id_competencia and\n competencia_equipo.id_equipo=equipo.id_equipo and \n equipo.id_equipo=equipo_usuario.id_equipo and\n equipo_usuario.id_usuario='$id_usuario'\n group by competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n order by competencia.id_competencia desc\";\n \n $result = pg_query($seleccionar) or die('ERROR AL INSERTAR DATOS: ' . pg_last_error());\n $columnas = pg_numrows($result);\n $this->formu.='<table><tr><td>Identificador</td>';\n $this->formu.='<td>Nombre Competencia</td>';\n $this->formu.='<td>Fecha Inicio</td>';\n $this->formu.='<td>Fecha Final</td></tr>';\n for($i=0;$i<=$columnas-1; $i++){\n $line = pg_fetch_array($result, null, PGSQL_ASSOC);\n $this->formu.='<tr> \n <td>'.$line['id_competencia'].'</td> \n <td>'.$line['nombre_competencia'].'</td>\n <td>'.$line['fecha_inicio_competencia'].'</td>\n <td>'.$line['fecha_fin_competencia'].'</td>\n </tr>';\n }\n $this->formu.='</table>';\n\n return $this->formu; \n }", "public function liteAnalisis()\n {\n $results = DB::select(\"\n SELECT\n SUM(CASE WHEN criticidad = 'Critical' THEN 1 ELSE 0 END) as 'Critical',\n SUM(CASE WHEN criticidad = 'High' THEN 1 ELSE 0 END) as 'High',\n SUM(CASE WHEN criticidad = 'Medium' THEN 1 ELSE 0 END) as 'Medium',\n SUM(CASE WHEN criticidad = 'Low' THEN 1 ELSE 0 END) as 'Low'\n FROM(\n SELECT\n primerset.criticidad\n FROM\n ((SELECT Rel_Operador_Perfil.operador AS 'operador1', Rel_Operador_Perfil.sucursal_operador as 'sucursal1', Duty.nombre AS 'D1', Matriz.criticidad AS 'criticidad',\n Matriz.conflicto AS 'conflicto', Rel_Duty_Perfil.perfil as \\\"P1\\\"\n FROM (Rel_Operador_Perfil\n INNER JOIN Rel_Duty_Perfil ON Rel_Operador_Perfil.Operador_Perfil = Rel_Duty_Perfil.perfil\n INNER JOIN Duty ON Rel_Duty_Perfil.idduty = Duty.id\n INNER JOIN Matriz ON Duty.id = Matriz.duty1 ) )AS primerset\n \n INNER JOIN\n (SELECT Matriz.conflicto as 'conflicto2', Rel_Operador_Perfil.operador as 'operador2',Rel_Operador_Perfil.sucursal_operador as 'sucursal2', Duty.nombre AS 'D2', Rel_Duty_Perfil.perfil as \\\"P2\\\"\n FROM(Rel_Operador_Perfil\n INNER JOIN Rel_Duty_Perfil ON Rel_Operador_Perfil.Operador_Perfil = Rel_Duty_Perfil.perfil\n INNER JOIN Duty ON Rel_Duty_Perfil.idduty = Duty.id\n INNER JOIN Matriz ON Duty.id = Matriz.duty2 ) ) AS segundoset\n ON primerset.operador1 = segundoset.operador2) \n WHERE primerset.conflicto = segundoset.conflicto2\n GROUP BY primerset.operador1, primerset.D1, segundoset.D2, primerset.conflicto, primerset.criticidad,primerset.P1,segundoset.P2) AS fullset\n\");\n return $results; \n }", "private function desplegarDashboards(){\n $sql = '\n SELECT \n dashboard.id_dashboard, \n dashboard.nombre, \n dashboard.menu, \n dashboard.id_perfil, \n dashboard.id_tipo_ambito,\n dashboard.icono, \n dashboard.activo,\n ambito.tipo as ambito,\n perfil.nombre as perfil\n FROM dashboard.dashboard as dashboard\n INNER JOIN core.tipo_ambito as ambito \n on (ambito.id_tipo_ambito = dashboard.id_tipo_ambito)\n INNER JOIN core.perfil as perfil\n on (perfil.id_perfil = dashboard.id_perfil)\n WHERE dashboard.activo = 1;';\n $respuesta = $this->ejecutarSelect($sql);\n $tr = '';\n foreach ($respuesta as $temp) {\n if ($temp['activo'] == 1) {\n $activo = '<i class=\"fa fa-check-circle-o\" aria-hidden=\"true\"></i>';\n } else {\n $activo = '<i class=\"fa fa-times\" aria-hidden=\"true\"></i>';\n }\n $tr .= '<tr>\n <td>1</td>\n <td>'.$temp['nombre'].'</td>\n <td>'.$temp['menu'].'</td>\n <td>'.$temp['perfil'].'</td>\n <td>'.$temp['ambito'].'</td>\n <td><a href=\"#\" class=\"ver_un_dashboard\" data-id=\"'.$temp['id_dashboard'].'\"><i class=\"fa fa-file-text\" aria-hidden=\"true\"></i></a></td>\n <td><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></td>\n </tr>';\n }\n return $tr;\n\n }", "function tabla_filas_proyecto($filas,$moneda,$cant,$tip,$barc,$artc,$desc,$prev,$mon,$mons,$monc,$tfdsc,$fdsc,$tdsc,$dsc,$IVA){\n\t\t$monchunk = explode(\"/\",$moneda); \n\t\t$Vmond = trim($monchunk[0]); // Nombre de Moneda\n\t\t$Vmons = trim($monchunk[1]); // Simbolo de Moneda\n\t\t$Vmonc = trim($monchunk[2]); // Tipo de Cambio\n\t\t$Vmonc = str_replace(\"(\",\"\",$Vmonc); //le quita el primer parentesis que rodea el tipo de cambio\n\t\t$Vmonc = str_replace(\" x 1)\",\"\",$Vmonc); //le quita el 2do. parentesis y el x 1\n\t\t\t$salida = '<br>';\n\t\t\t$salida.= '<table class = \"tablegrid\">';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\" height = \"30px\">No.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Cant.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"300px\">Descipción</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Unitario</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Descuento</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Total</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\"></td>';\n\t\t\t$salida.= '</tr>';\n\t$STotal = 0;\n\t$Total = 0;\n\t$Rtotal = 0;\n\t$DescU = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//No.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.$i.'.</td>';\n\t\t\t//Cantidad\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spancant'.$i.'\">'.$cant[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"cant'.$i.'\" id = \"cant'.$i.'\" value = \"'.$cant[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tip'.$i.'\" id = \"tip'.$i.'\" value = \"'.$tip[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descripcion o Articulo\n\t\t\t$desc[$i] = utf8_decode($desc[$i]);\n\t\t\t$desc[$i] = trim($desc[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"left\">'.$desc[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"barc'.$i.'\" id = \"barc'.$i.'\" value = \"'.$barc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"artc'.$i.'\" id = \"artc'.$i.'\" value = \"'.$artc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"desc'.$i.'\" id = \"desc'.$i.'\" value = \"'.$desc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Precio U.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.trim($mons[$i]).' '.$prev[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"prev'.$i.'\" id = \"prev'.$i.'\" value = \"'.$prev[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mon'.$i.'\" id = \"mon'.$i.'\" value = \"'.trim($mon[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mons'.$i.'\" id = \"mons'.$i.'\" value = \"'.trim($mons[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"monc'.$i.'\" id = \"monc'.$i.'\" value = \"'.trim($monc[$i]).'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descuento\n\t\t\t$dsign = ($tdsc[$i] == \"P\")?\"%\":trim($mons[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandsc'.$i.'\">'.$dsign.' '.$dsc[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tdsc'.$i.'\" id = \"tdsc'.$i.'\" value = \"'.$tdsc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"dsc'.$i.'\" id = \"dsc'.$i.'\" value = \"'.$dsc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//sub Total\n\t\t\t$rtot = ($prev[$i] * $cant[$i]);\n\t\t\tif($tdsc[$i] == \"P\"){\n\t\t\t\t$descuento = ($rtot *($dsc[$i])/100);\n\t\t\t}else if($tdsc[$i] == \"M\"){\n\t\t\t $descuento = $dsc[$i];\n\t\t\t}\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$descuento);\n\t\t\t$DescU += $Dcambiar;\n\t\t\t$stot = $rtot - $descuento;\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$stot);\n\t\t\t$STotal+= $Dcambiar;\n\t\t\t$Rcambiar = Cambio_Moneda($monc[$i],$Vmonc,$rtot);\n\t\t\t$Rtotal+= $Rcambiar;\n\t\t\t$stot = round($stot, 2);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstot'.$i.'\">'.trim($mons[$i]).' '.$stot.'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stot'.$i.'\" id = \"stot'.$i.'\" value = \"'.$stot.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"rtot'.$i.'\" id = \"rtot'.$i.'\" value = \"'.$rtot.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//---\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<a href = \"javascript:void(0);\" onclick = \"QuitarFilaVenta('.$i.')\" title = \"Quitar Fila\" style = \"border:none;\" ><img src = \"../../CONFIG/images/icons/delete.png\" style = \"vertical-align:middle;border:none;\"></a>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\tif($tfdsc == \"P\"){\n\t\t\t\t$descuento = ($STotal *($fdsc)/100);\n\t\t\t}else if($tfdsc == \"M\"){\n\t\t\t $descuento = $fdsc;\n\t\t\t}\n\t\t\t$Total = $STotal - $descuento;\n\t\t\t$STotal = round($STotal, 2); //total sin iva\n\t\t\t$Total = round($Total, 2); //total sin iva\n\t\t\t$DescU = round($DescU, 2); //promedio de descuento\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"3\" rowspan = \"4\">';\n\t\t\t$salida.= '<span id = \"spannota\">';\n\t\t\t$salida.= '<b>NOTA:</b> MONEDA PARA COTIZACI&Oacute;N: <b>'.$Vmond.'</b>. TIPO DE CAMBIO '.$Vmonc.' x 1';\n\t\t\t$salida.= '</span></td>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/Unitarios</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanpromdesc\"><b>'.$Vmons.' '.$DescU.'</b></span>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"promdesc\" id = \"promdesc\" value = \"'.$DescU.'\" /></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Subtotal</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstotal\"><b>'.$Vmons.' '.$STotal.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stotal\" id = \"stotal\" value = \"'.$STotal.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/General</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandscgeneral\"><b>'.$Vmons.' '.$descuento.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"tdescuento\" value = \"'.$descuento.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttdescuento\" value = \"'.$tfdsc.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">TOTAL</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanttotal\"><b>'.$Vmons.' '.$Total.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttotal\" value = \"'.$Total.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Rtotal\" id = \"Rtotal\" value = \"'.$Rtotal.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"filas\" id = \"filas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\t\t$salida.= '</form>';\n\t\t\t$salida.= '<br>';\n\t\n\treturn $salida;\n}", "function SELECT_COUNT_alunosPrivada (){\n $sql = 'SELECT COUNT(i.`tipo_instituicao`) AS `Escolas Privadas` FROM `visita` as v INNER JOIN `agendamento_institucional` as ai on v.`agendamento_institucional_ID` = ai.`ID` INNER JOIN `professor_instituicao` as pii on ai.`professor_instituicao_ID` = pii.`ID` INNER JOIN `instituicao` AS i ON pii.`instituicao_ID` = i.`ID` WHERE i.`tipo_instituicao`= \"Privada\"';\n $stmt = $this->dataBase->query($sql);\n $row = $stmt->fetch_assoc();\n return $row; \n }", "public static function obtenerNuevasDesignaciones($idsede, $anio, $idarea)\n {\n \n $anioanterior = $anio - 1;\n\n $sql =\"SELECT sed.nombre as sede, CONCAT(car.nombre,' - ',pe.nombre) as carreraplan, car.nombre as carrera, fac.nombre as facultad, CONCAT(per.apellido,', ',per.nombre) as persona,\n per.apellido, per.nombre,\n tp.descripcion as tipodocumento, \n per.numerodoc,\n m.nombre as materia,\n td.descripcion as tipodesignacion,\n cd.descripcion as categoria, \n cd.idcategoriadesignacion,\n edes.descripcion as estadodesignacion,\n mp.anodecursada,\n IFNULL(des.horas, 0 ) as horas,\n td.descripcion as tipo, \n if(des.adhonorem,'AD HONOREM','') as adhonorem, \n if(des.licencia,'EN LICENCIA','') as licencia, \n ded.descripcion as dedicacion,\n sed.abreviacion as sedeabreviada,\n car.idcarrera,\n YEAR(des.inicio) as ciclolectivo,\n DATE_FORMAT(des.inicio, '%d/%m/%Y') AS inicioformat, DATE_FORMAT(des.fin, '%d/%m/%Y') AS finformat\n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona \n JOIN tipos_documentos tp ON per.idtipodoc = tp.idtipodoc\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra \n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN materias m ON mp.idmateria = m.idmateria\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera \";\n \n // se filtra por area solo si el area existe\n if ($idarea<>'')\n $sql .=\" JOIN areas_carrera ar ON car.idcarrera= ar.idcarrera AND ar.idarea = \".$idarea.\" \"; \n\n \n $sql .=\"JOIN facultades fac ON car.idfacultad = fac.idfacultad \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion= cd.idcategoriadesignacion \n LEFT JOIN (SELECT designaciones.idcatedra, designaciones.idprofesor FROM designaciones JOIN catedras ON designaciones.idcatedra = catedras.idcatedra WHERE YEAR(designaciones.inicio) = \".$anioanterior.\" AND catedras.idsede = \".$idsede.\" AND designaciones.idcatedra IS NOT NULL AND designaciones.idprofesor IS NOT NULL GROUP BY designaciones.idcatedra, designaciones.idprofesor) as anioanterior ON des.idprofesor = anioanterior.idprofesor AND des.idcatedra = anioanterior.idcatedra \n WHERE YEAR(des.inicio)= \".$anio.\" AND sed.idsede = \".$idsede.\" AND anioanterior.idprofesor IS NULL\n ORDER BY car.nombre, per.apellido; \";\n \n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n\n return $q;\n }", "function get_designaciones_ocupa_reserva($anio){\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n \n $sql=\"select distinct t_d.id_designacion,\"\n // . \" case when t_d.id_norma is null then (t_d1.apellido||', '||t_d1.nombre||'('||'id:'||t_d.id_designacion||'-'||t_d.cat_mapuche||')') else t_d1.apellido||', '||t_d1.nombre||'('||'id:'||t_d.id_designacion||'-'||t_d.cat_mapuche||'-'||t_no.nro_norma||'/'|| extract(year from t_no.fecha)||')' end as descripcion \"\n . \" trim(t_d1.apellido)||', '||trim(t_d1.nombre)||' '||t_d.cat_estat||t_d.dedic||'-'||t_d.carac||'(id:'||t_d.id_designacion||') '||' desde: '||to_char(t_d.desde,'DD/MM/YYYY')||' '||coalesce(t_no.emite_norma,'')||case when t_no.nro_norma is not null then ': ' else '' end||coalesce(cast(t_no.nro_norma as text),'')||case when t_no.nro_norma is not null then '/' else '' end||coalesce(cast(extract(year from t_no.fecha) as text),'') as descripcion\"\n . \" from designacion t_d \"\n . \" LEFT OUTER JOIN norma t_no ON (t_d.id_norma=t_no.id_norma), docente t_d1, unidad_acad t_u\"\n . \" where t_d.id_docente=t_d1.id_docente \"\n . \" and t_d.uni_acad=t_u.sigla \"\n . \" and not(t_d.hasta is not null and t_d.desde>t_d.hasta)\"//descarto que se anulo\n . \" and t_d.desde<'\".$udia.\"' and (t_d.hasta>'\".$pdia.\"' or t_d.hasta is null)\"\n . \" and t_d.carac='I' \"\n . \" and not exists (select * from novedad t_no where t_no.id_designacion=t_d.id_designacion\"\n . \" and t_no.tipo_nov in (2,5) \"\n . \" and t_no.desde<'\".$udia.\"' and t_no.hasta>'\".$pdia.\"')\"\n . \" order by descripcion\";\n \n $sql = toba::perfil_de_datos()->filtrar($sql);//aplico el perfil de datos\n return toba::db('designa')->consultar($sql);\n }", "public function enfocarCamaraAlumnos2() {\n\n self::$alumnos2->enfocar();\n\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->sqlBase = \"SELECT idFactura, nombreTienda AS tienda, DATE_FORMAT(fecha, '%d/%c/%Y') as fecha, numFactura FROM tblfacturas \nINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda WHERE idOpciones = 0\";\n\t\t\t$this->titulo = \"REGISTRO DE ENVIOS A TIENDAS\";\n\t}", "function cargar_data_registro_venta($nombre_anio='', $nombre_mes='', $nrocomprobante='', $limit='') {\n $sql = \"SELECT\n prosic_comprobante.id_comprobante\n , prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.status_comprobante\n , prosic_anexo.codigo_anexo\n , prosic_subdiario.id_subdiario\n , prosic_subdiario.codigo_subdiario\n , prosic_subdiario.nombre_subdiario\n , prosic_anio.nombre_anio\n , prosic_mes.nombre_mes\n , prosic_tipo_comprobante.codigo_tipo_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n ,prosic_comprobante.nro_comprobante\n ,prosic_moneda.codigo_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo\n ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_mes\n ON (prosic_comprobante.id_mes = prosic_mes.id_mes)\n INNER JOIN prosic_anio\n ON (prosic_comprobante.id_anio = prosic_anio.id_anio)\n INNER JOIN prosic_subdiario\n ON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n INNER JOIN prosic_tipo_comprobante\n ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_plan_contable\n ON (prosic_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n INNER JOIN prosic_moneda\n ON (prosic_comprobante.id_moneda= prosic_moneda.id_moneda)\n\t\t\tWHERE prosic_comprobante.id_subdiario=2 \";\n if ($nombre_anio != ''\n )$sql.=\" AND prosic_anio.nombre_anio='\" . $nombre_anio . \"'\";\n if ($nombre_mes != ''\n )$sql.=\" AND prosic_mes.nombre_mes='\" . $nombre_mes . \"'\";\n if ($nrocomprobante != ''\n )$sql.=\" AND prosic_comprobante.nro_comprobante like'%\" . $nrocomprobante . \"%' \";\n if ($limit != ''\n )$sql.=$limit;\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function visites_pre_traitement($prev_visites) {\r\n\r\n\t# pour page hier\r\n\tif (!is_array($prev_visites)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$temps = $prev_visites[0];\r\n\t$visites = $prev_visites[1];\r\n\t$visites_a = $prev_visites[2];\r\n\r\n\tif (count($temps)) {\r\n\t\tsort($temps);\r\n\t}\r\n\r\n\t$aff = '';\r\n\tif ($nb_articles = count($visites_a)) {\r\n\t\t$heure_f = date('H\\hi', $temps[0]);\r\n\t\t$date_f = date('d/m/Y', $temps[0]);\r\n\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. _T('actijour:depuis_date_visites_pg',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'heure' => $heure_f,\r\n\t\t\t\t\t'date' => $date_f == date('d/m/Y') ? '' : '(' . $date_f . ')',\r\n\t\t\t\t\t'nb_visite' => $visites,\r\n\t\t\t\t\t'nb_articles' => $nb_articles\r\n\t\t\t\t))\r\n\t\t\t. \"\\n</div>\\n\";\r\n\t}\r\n\r\n\treturn $aff;\r\n}", "public function getNombreAdmin() {\n\t\n\t\t$this->log->debug(\"Usager::getNombreAdmin() Début\");\n\t\n\t\t$total = 0;\n\t\n\t\ttry {\n\t\t\t$sql = \"select count(*) from tusager where role = ? and statut = ?\";\n\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t$sth->execute(array(USAGER::ROLE_ADMINISTRATEUR,USAGER::STATUT_ACTIF));\n\t\t\t\t\n\t\t\t// Obtenir le nombre d'administrateurs actifs\n\t\t\t$total = $sth->fetchColumn();\n\t\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tErreur::erreurFatal('018', \"Usager::getNombreAdmin() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t}\n\t\n\t\t$this->log->debug(\"Usager::getNombreAdmin() Fin total = '$total'\");\n\t\n\t\treturn $total;\n\t}", "public function index()\n {\n if(Auth::user()->hasRole('empleador')){\n\n $empresaId = Auth::user()->persona->juridica->id;\n\n //-------------------------------------------------------//\n\n $cantEstadosPostulados = DB::select('select count(*) postulados, epl.estado_postulacion\n from estudiante_propuesta_laboral as epl join propuestas_laborales pl on epl.propuesta_laboral_id = pl.id\n where pl.juridica_id = ?\n group by estado_postulacion\n order by postulados Desc',[$empresaId]);\n\n //-------------------------------------------------------//\n\n $cantPostSinDecidirPorProp = DB::select('select count(*) postulados_sin_decidir, pl.titulo\n from estudiante_propuesta_laboral as epl join propuestas_laborales pl on epl.propuesta_laboral_id = pl.id\n where epl.estado_postulacion = \"en espera\" and pl.juridica_id = ?\n group by titulo\n order by postulados_sin_decidir Desc',[$empresaId]);\n\n $propConMayorEstSinDecidir = [];\n $i = 0;\n while ( ($i < 3) && ( $i < sizeof($cantPostSinDecidirPorProp))){\n $cantPostSinDecidirPorProp[$i]->titulo = str_limit($cantPostSinDecidirPorProp[$i]->titulo, $limit = 20, $end = '...');\n $propConMayorEstSinDecidir[$i] = $cantPostSinDecidirPorProp[$i];\n $i++;\n }\n\n //-------------------------------------------------------//\n\n $SueldoPorCarrera = DB::select('select avg(cvs.sueldo_bruto_pretendido) promedio_sueldo, ca.nombre_carrera as carrera\n from cvs join estudiantes as es on cvs.estudiante_id = es.id join carreras as ca on es.carrera_id = ca.id\n where cvs.sueldo_bruto_pretendido > 0\n group by carrera\n order by promedio_sueldo desc');\n\n // LAS 5 CARRERAS CON MAYOR SUELDO\n $carrerasConMayorSueldoPretendido = [];\n $i = 0;\n while ( ($i < 5) && ( $i < sizeof($SueldoPorCarrera))){\n $SueldoPorCarrera[$i]->carrera = str_limit($SueldoPorCarrera[$i]->carrera, $limit = 20, $end = '...');\n $carrerasConMayorSueldoPretendido[$i] = $SueldoPorCarrera[$i];\n $i++;\n }\n\n //-------------------------------------------------------//\n\n $cantidadEstudiantePorCarrera = DB::select('\n select count(*) as cantidad_estudiantes, c.nombre_carrera\n from estudiantes as e join carreras as c on e.carrera_id = c.id\n group by e.carrera_id\n order by cantidad_estudiantes Desc');\n\n // LAS 5 CARRERAS CON MAYOR CANTIDAD DE ESTUDIANTES\n $carrerasConMayorCantidadEstudiantes = [];\n $i = 0;\n while ( ($i <= 4) && ( $i < sizeof($cantidadEstudiantePorCarrera))){\n $cantidadEstudiantePorCarrera[$i]->nombre_carrera = str_limit($cantidadEstudiantePorCarrera[$i]->nombre_carrera, $limit = 20, $end = '...');\n $carrerasConMayorCantidadEstudiantes[$i] = $cantidadEstudiantePorCarrera[$i];\n $i++;\n }\n\n //-----------------------------------------------------//\n\n // por defecto seria empresa, ultimo mes, vigentes\n\n $today = Carbon::today();\n $desde = $today->subMonth()->toDateString();\n $today = Carbon::today()->toDateString();\n\n $cantidadPropuestasPorFiltro = DB::select('select count(*) as cantidad_propuestas, ca.nombre_carrera as filtro\n from propuestas_laborales as pl join requisitos_carrera as rc on pl.id = rc.propuesta_laboral_id join carreras as ca on rc.carrera_id = ca.id\n where pl.juridica_id = ? and pl.fecha_inicio_propuesta >= ? and pl.fecha_fin_propuesta >= ?\n group by filtro\n order by cantidad_propuestas Desc',[$empresaId,$desde,$today]);\n\n $cantidadPropuestas = [];\n $i = 0;\n while ( ($i <= 9) && ( $i < sizeof($cantidadPropuestasPorFiltro))){\n $cantidadPropuestasPorFiltro[$i]->filtro = str_limit($cantidadPropuestasPorFiltro[$i]->filtro, $limit = 20, $end = '...');\n $cantidadPropuestas[$i] = $cantidadPropuestasPorFiltro[$i];\n $i++;\n }\n\n return view('in.reportes.empleador.index')\n ->with('carrerasConMayorCantidadEstudiantes',$carrerasConMayorCantidadEstudiantes)\n ->with('cantidadPropuestas',$cantidadPropuestas)\n ->with('carrerasConMayorSueldoPretendido',$carrerasConMayorSueldoPretendido)\n ->with('propConMayorEstSinDecidir',$propConMayorEstSinDecidir)\n ->with('cantEstadosPostulados',$cantEstadosPostulados);\n\n }else{\n return redirect()->route('in.sinpermisos.sinpermisos');\n }\n }", "public function indexAsistenciaDiaria()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $ciclo = $dbm->getRepositoriosById(\"Ciclo\", \"activo\", 1);\n $nivel = $dbm->getRepositoriosModelo(\"Nivel\", \n [\"d.nivelid, d.nombre\"], \n [[\"nivelid is not null and cn.asistenciapordia = 1 and d.activo = 1 \"]], false, true, [\n [\"entidad\" => \"CeConfiguracionnivel\", \"alias\" => \"cn\", \"left\" => false, \"on\" => \"cn.configuracionnivelid = d.configuracionnivelid\"]\n ]);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n\t\t\t$periodoeval = $dbm->getRepositoriosModelo(\"CePeriodoevaluacion\", [\"d.periodoevaluacionid, d.descripcion, IDENTITY(c.cicloid) as cicloid, GROUPCONCAT(DISTINCT IDENTITY(g.gradoid)) as gradoid\"],\n\t\t\t\t[], false, false, [\n\t\t\t\t[\"entidad\" => \"CeConjuntoperiodoevaluacion\", \"alias\" => \"c\", \"left\" => false, \"on\" => \"c.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n\t\t\t\t[\"entidad\" => \"CeGradoporconjuntoperiodoescolar\", \"alias\" => \"g\", \"left\" => false, \"on\" => \"g.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n ], 'd.periodoevaluacionid');\n $param = $dbm->getRepositorioById('Parametros', 'parametrosid', 156);\n\n\n $array = array(\"ciclo\" => $ciclo, \n \"nivel\" => $nivel, \n \"grado\" => $grado, \n \"semestre\" => $semestre,\n \"grupo\" => $grupo,\n \"periodos\" => $periodoeval,\n \"param\" => $param && $param->getValor() ? intval($param->getValor()) : null\n );\n return new View($array, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "public function index()\n {\n $user = Auth::user()->id;\n $vi = Vigilant::where('usuario',$user)->first();\n $visits = DB::select(\"select FECHA_VISITA fecha, (R.FIRST_NAME||' ' ||R.LAST_NAME) residente, (V.FIRST_NAME||' '||V.LAST_NAME) visitante, TOV.DESCRIPTION tipo from VISITS inner join VISITORS V on VISITS.ID_VISITANTE = V.ID inner join HOUSES on VISITS.ID_CASA = HOUSES.ID inner join RESIDENTS R on HOUSES.ID_RESIDENTE = R.ID inner join TYPE_OF_VISITORS TOV on V.TYPE_VISITOR_ID = TOV.ID where VISITS.ID_VIGILANTE = ? order by FECHA_VISITA DESC \",[$vi->id]);\n return View('visits/index',compact('visits'));\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "function grafico_1_3( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_partido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t// . \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t//echo $query;\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t//var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, actor, partido, cantidad de menciones\n\t$i = -1;\n\t$partidos = [];\n\t\n\t$children_partidos = [];\n\t$i_actor = 0;\n\tforeach($main as $k=>$v){\n\t\t// obtengo el/los partidos\n\t\t$partidos_array = json_decode( $v['id_partido'], true);\n\t\tif( ! is_array($partidos_array) ) continue;\n\t\t\n\t\tforeach($partidos_array as $p){\n\t\t\t$partido_nombre = R::findOne('attr_partido','id LIKE ?',[$p])['nombre'];\n\t\t\t$tabla[ ++$i ] = [\n\t\t\t\t'ua' => $ua_nombre,\n\t\t\t\t'actor' => $v['nombre'] . ' ' . $v['apellido'],\n\t\t\t\t'partido' => $partido_nombre,\n\t\t\t\t'cantidad' => $v['cantidad']\n\t\t\t\t];\n\t\t\t\t// agrego el partido y el grafico\n\t\t\t\tif(! in_array($partido_nombre,$partidos)){\n\t\t\t\t\t$partidos[] = $partido_nombre;\n\t\t\t\t\t$x = new StdClass(); // objeto vacio\n\t\t\t\t\t$x->name = $partido_nombre;\n\t\t\t\t\t$x->rank = 0;\n\t\t\t\t\t$x->weight = count($partidos); //'Yellow'; cargar desde JS\n\t\t\t\t\t$x->id = 1;\n\t\t\t\t\t$x->children = [];\n\t\t\t\t\t$children_partidos[] = $x;\n\t\t\t\t}\n\t\t\t\t// obtengo el indice del partido y lo inserto\n\t\t\t\t$index = array_search($partido_nombre,$partidos);\n\t\t\t\t$t = new StdClass(); // objeto vacio\n\t\t\t\t$t->name = $v['nombre'] . ' ' . $v['apellido'] . \" (\" . $v['cantidad'] . \")\";\n\t\t\t\t$t->rank = $v['cantidad'];\n\t\t\t\t$t->weight = $i_actor; //'Yellow'; cargar desde JS\n\t\t\t\t$t->id = 1;\n\t\t\t\t$t->children = [];\n\t\t\t\t// lo agrego al padre correspondiente\n\t\t\t\t$children_partidos[ $index ]->children[] = $t;\n\t\t\t\t$children_partidos[ $index ]->rank += 1;\n\t\t\t}\n\t\t\t++$i_actor;\n\t}\n\t// grafico\n\t/*$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];*/\n\t\n\t// creo los objetos partidos\n\t\n\t/*foreach($partidos as $p){\n\t\t$x = new StdClass(); // objeto vacio\n\t\t$x->name = $p;\n\t\t$x->rank = 0;\n\t\t$x->weight = 0; //'Yellow'; cargar desde JS\n\t\t$x->id = 1;\n\t\t$x->children = [];\n\t}*/\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Partidos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = $children_partidos;\n\t\n\t\n\t/*foreach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}*/\n\t\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n}", "public function autoevaluaciones()//tabla 15 autoevaluacion\n {\n //AutoevaPlangestionAnayeva=la tabla de relacion entre autoevaluacion y anayeva\n //user_id= nombre del campo que relaciona user con calificacion\n //anayeva_id=nombre del campo que relaciona user con calificacion\n //belongstoMany= de muchos a muchos\n return $this->belongsToMany('App\\Autoevaluacion','AutoevaPlangestionAnayeva', 'autoevaluacion_id', 'anayeva_id');\n \n }", "function generaTabla($idciudad, $tnegocio, $cantidad, $criterio, $pagina, $registro)\n {\n $array = tbOrganizacionData::getpaginartmp($idciudad, $tnegocio, (($pagina - 1) * $registro), $registro);\n $str = '';\n $imgs= \"\";\n $sihotel = 0;\n $i =0;\n foreach ($array as $rs) {\n $i++;\n $sihotel = 0;\n $dimgs = \"images/imgHoteles/dir\".$rs['idorg'].\"/imgHotel\";\n if (is_dir($dimgs)) {\n //Escaneamos el directorio\n $carpeta = @scandir($dimgs);\n $sihotel = count($carpeta);\n }\n $imgs = \"images/imgHoteles/\";\n $imgs .= ($sihotel > 2) ? \"dir\" . $rs['idorg'] . \"/imgHotel\" : \"imgdefault/hotel\" ;\n $str .= '\n <div class=\"row stylerow\">\n <div class=\"col-sm-3 col-md-3 col-lg-3 quitar\"> \n <img class=\"img-fluid img-thumbnail\" src=\"'.\n $imgs.'/img1.jpg\" alt=\"\" style=\"height: 100% !important;\"/>\n </div>\n <div class=\"col-sm-2 col-md-2 col-lg-2 quitar\"> \n <div class=\"dos\">\n <img class=\"img-fluid img-thumbnail\" src=\"'.$imgs . '/img2.jpg\" alt=\"\"/> \n <img class=\"img-fluid img-thumbnail\" src=\"'.$imgs . '/img3.jpg\" alt=\"\"/> \n </div>\n </div>\n <!-- <div class=\"clearfix\"></div> -->\n <div class=\"col-sm-7 col-md-7 col-lg-7 quitar\"> \n <div class=\"row\"> \n <div class=\"col-sm-12 col-md-12 col-lg-12 quitar\"> \n <a href=\"index.php?view=datosHotel.php&idh='. $rs['idorg'].'\" ><span class=\"namehotel\">'.$rs['nomborg']. '</span></a>\n </div>\n <div class=\"col-sm-12 col-md-12 col-lg-12 styledato\"> \n ' . $rs['desgeneral1'] . '<br> ' . $rs['desgeneral2']. '\n </div>\n </div> \n </div>\n </div>'; \n }\n $funcion = \"buscaRecord\";\n $str .= pagination($cantidad, $pagina, $funcion, $criterio, $registro, 6);\n // pagination($cantidad, $pagina, $funcion, $criterio, $registro, 5); \n return $str;\n }", "function formulaires_publication_ouverte_agenda_charger_dist()\n{\n\t$values = array();\n\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= \"evenement\";\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement'); \t\t// heure de l'événement\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// lieu de l'evenement\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// lieu de l'evenement\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// lieu de l'evenement\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// lieu de l'evenement\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// lieu de l'evenement\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// lieu de l'evenement déjà existant\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['date'] = _request('date');\n\t$values['date_modif'] = _request('date_modif');\n\t$values['supprimer_documents'] = _request('supprimer_documents');\n\t// editos\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t// si c'est pas un debut d'article\n\tif (_request('titre') or _request('previsu'))\n\t\t$values['ancre'] = '#etape_4';\n\telse\n\t\t$values['ancre'] = '.page-article';\n\t\n\t/*\n\t * s'il s'agit du premier passage, on créé l'article\n\t */\n\tif (!$values['id_article'])\n\t{\n\t\t$id_article = indymedia_creer_article();\n\t\t$values['id_article'] = $id_article;\n\t}\n\t/*\n\t * sinon, si admin, on peut l'éditer\n\t */\n\telse if ($values['id_article'] && est_admin())\n\t{\n\t\t$id_article = (int) $values['id_article'];\n\t\t// on recupere des infos sur l'article\t\n\t\t$row = sql_fetsel(\n\t\t\tarray('texte','extra','id_rubrique','titre','date_debut_indy','statut','date'),\n\t\t\tarray('spip_articles'),\n\t\t\tarray('id_article='.$id_article)\n\t\t);\n\t\t$values['texte'] = $row['texte'] ;\n\t\t$values['titre'] = $row['titre'] ;\n\t\t$values['id_rubrique'] = $row['id_rubrique'] ;\n\t\t//$values['statut'] = $row['statut'] ;\n\t\t$extra = unserialize($row['extra']);\n\t\t$values['explication'] = $extra['OP_moderation'];\n\t\t$values['pseudo'] = $extra['OP_pseudo'];\n\t\t$values['email'] = $extra['OP_email'];\n\t\t$values['date'] = $row['date'];\n\t\t\n\t\t// on recupere la date, l'heure et le lieu de l'evenement\n\t\t$values = indymedia_ajout_valeurs_date ($values, $row['date_debut_indy']);\n\t\t$values = indymedia_ajout_valeurs_lieu ($values, $id_article);\n\t\t$values = indymedia_ajout_valeurs_mots ($values, $id_article);\n\t}\n\tinclude_spip('inc/securiser_action');\n\t$values['cle_ajouter_document'] = calculer_cle_action('ajouter-document-' . 'article' . '-' . $id_article);\n\n\treturn $values;\n}", "protected function alterar(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $sets = \"\";\n $id_registro = '';\n $contador = \"\";\n $count = 1;\n foreach ($execute as $contar) {\n if ($contar->Key != 'PRI') {\n $atributos_field = $contar->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n $contador = $contador + 1;\n }\n }\n }\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n if ($count != $contador) {\n $sets .= $attr->Field . \" = '\" . $this->$get() . \"',\";\n } else {\n $sets .= $attr->Field . \" = '\" . $this->$get().\"'\";\n }\n $count = $count + 1;\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $update = \"UPDATE \".$this->table.\" SET \".$sets.\" WHERE \".$id_registro.\" = \".$this->getIdTable();\n\n $execute_into = conexao::toConnect()->executeQuery($update);\n if (count($execute_into) > 0) {\n return $execute_into;\n }else{\n return false;\n }\n }", "function ultimos_eu_publicados_limit($inicial,$cantidad) {\n\t\n\t\t$query = \"SELECT eu.*, eu_descripcion.*\n\t\tFROM eu, eu_descripcion\n\t\tWHERE eu.id_eu=eu_descripcion.id_eu\n\t\tAND eu.eu_estado=1\n\t\tORDER BY eu.fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function limite_trazadora($fecha) {\r\n $fecha = strtotime(fecha_db($fecha));\r\n $actualm = date('m', $fecha);\r\n $actualy = $actualy2 = date('Y', $fecha);\r\n // $ano = date('Y', $fecha);\r\n $desdem1 = '01';\r\n $hastam1 = '04';\r\n $desdem2 = '05';\r\n $hastam2 = '08';\r\n $desdem3 = '09';\r\n $hastam3 = '12';\r\n if ($actualm >= $desdem1 && $actualm <= $hastam1) {\r\n $cuatrimestre = 1;\r\n $cuatrimestrem = 3;\r\n //$actualy2++;\r\n }\r\n if ($actualm >= $desdem2 && $actualm <= $hastam2) {\r\n $cuatrimestre = 2;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n // $actualy2++;\r\n }\r\n if ($actualm >= $desdem3 && $actualm <= $hastam3) {\r\n $cuatrimestre = 3;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n $actualy2++;\r\n }\r\n\r\n $query2 = \"SELECT desde\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n $valor['desde'] = $actualy . '-' . $res_sql2->fields['desde'];\r\n\r\n $query2 = \"SELECT limite\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n\r\n $valor['limite'] = $actualy2 . '-' . $res_sql2->fields['limite'];\r\n\r\n return $valor;\r\n}", "function LLena_GridGeneral()\n { /*Instruccion de sql que manda los datos al dbgEstimacion*/\n global $sContrato;\n $sql= \"select\n iNumeroEstimacion as Estimacion,\n sNumeroOrden as No_Orden,\n iSemana as Sem,\n sNumeroGenerador as Gen,\n lStatus as Status,\n dFinancieroGenerador as Porcent,\n date_format(dFechaInicio,'%d/%m/%Y') as F_Inicio,\n date_format(dFechaFinal,'%d/%m/%Y') as F_Final,\n format(dMontoMN,2) as Monto_MN,\n format(dMontoDLL,2) as Monto_DLL,\n sFaseObra as Fase_Obra\n from\n estimaciones\n where\n sContrato='$sContrato'\";\n $this->qryGeneral->Active=false;\n $this->qryGeneral->setSQL($sql);\n $this->qryGeneral->Active=true;\n }", "function getMovimientos($fecha_desde, $fecha_hasta)\n{\n $db = new MysqliDb();\n $resultsDetalles = [];\n\n// $SQL = \"select movimiento_id, asiento_id, fecha, c.cuenta_id, c.descripcion, usuario_id, importe, 0 general, 0 control, 0 ca, 0 cc, 0 me,\n//0 detalles\n//from movimientos m inner join cuentas c on m.cuenta_id = c.cuenta_id where (m.cuenta_id like '1.1.1.2%' or m.cuenta_id = '1.1.1.10' or m.cuenta_id = '1.1.4.01')\n//and (fecha between '\" . $fecha_desde . \"' and '\" . $fecha_hasta . \"');\";\n\n\n $SQL = \"SELECT\n movimiento_id,\n asiento_id,\n (SELECT\n valor\n FROM\n detallesmovimientos d\n WHERE\n d.movimiento_id = m.movimiento_id\n AND detalle_tipo_id = 2) detalle,\n DATE_FORMAT(fecha,'%d-%m-%Y') fecha,\n c.cuenta_id,\n c.descripcion,\n usuario_id,\n importe,\n CASE when m.cuenta_id = '1.1.1.10' then importe else 0 end general,\n CASE when m.cuenta_id = '1.1.1.10' then importe else 0 end control,\n CASE when m.cuenta_id = '1.1.1.22' then importe else 0 end ca,\n CASE when m.cuenta_id = '1.1.1.21' then importe else 0 end cc,\n CASE when m.cuenta_id = '1.1.1.10' then importe else 0 end me,\n CASE when m.cuenta_id = '1.1.1.24' then importe else 0 end mp,\n CASE when m.cuenta_id = '1.1.4.01' then importe else 0 end ta\nFROM\n movimientos m\n INNER JOIN\n cuentas c ON m.cuenta_id = c.cuenta_id\nWHERE\n (m.cuenta_id LIKE '1.1.1.2%'\n OR m.cuenta_id = '1.1.1.10'\n OR m.cuenta_id = '1.1.4.01')\n AND (fecha BETWEEN '\" . $fecha_desde . \"' and '\" . $fecha_hasta . \"');\";\n\n\n//or m.cuenta_id = '1.1.7.01'\n//or m.cuenta_id = '1.2.1.01'\n//or m.cuenta_id = '1.3.1.01'\n//or m.cuenta_id = '1.3.2.01'\n//or m.cuenta_id = '1.3.3.01'\n//or m.cuenta_id = '2.1.1.01'\n//or m.cuenta_id = '2.1.2.01'\n//or m.cuenta_id like '4.2.1.%'\n//or m.cuenta_id like '5.2.1.%'\n//or m.cuenta_id = '5.2.2.01'\n//or m.cuenta_id = '5.2.3.01'\n//or m.cuenta_id like '5.2.4.%'\n//or m.cuenta_id like '5.2.5.%'\n//or m.cuenta_id like '5.2.8.%'\n//or m.cuenta_id = '5.3.1.01'\n\n $results = $db->rawQuery($SQL);\n\n// foreach ($results as $row) {\n// $SQL = \"select\n//detalle_tipo_id,\n//valor detalle\n//\n// from detallesmovimientos\n// where detalle_tipo_id in (2) and movimiento_id = \" . $row['movimiento_id'] . \";\";\n// $detalles = $db->rawQuery($SQL);\n//\n// $row[\"detalles\"] = $detalles;\n// array_push($resultsDetalles, $row);\n//\n// }\n\n echo json_encode($results);\n}", "public function getNominaEeua($id)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, f.formula,c.dias,e.tipo,a.idEmp, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then g.idCcos End as idCcos, # Centros de costos\n case a.horasCal when 0 then 0 \n when 1 then (c.dias*8) End as horas, 1, # Horas desrrollo\n case when e.valor=2 then \n case when e.tipo = 1 then a.valor else 0 End \n when e.valor=1 then 0 \n End as dev, # Devengado\n ( case when e.valor=2 then \n case when e.tipo = 2 then a.valor else 0 End \n when e.valor=1 then 0\n End ) / cal.valor as ded , # Deducido \n e.idFor, c.diasVac, hh.codigo as nitTer, c.diasVac \nfrom n_emp_conc a \ninner join n_nomina_e c on a.idEmp=c.idEmp \ninner join n_nomina d on d.id=c.idNom\ninner join n_conceptos e on e.id=a.idCon\ninner join n_formulas f on f.id=e.idFor\ninner join a_empleados g on g.id=c.idEmp\nleft join n_terceros_s h on h.id = e.idTer \nleft join n_terceros hh on hh.id = h.idTer \ninner join n_tip_calendario cal on cal.id = d.idCal \nWHERE not exists (SELECT null from n_nomina_e_d \nwhere c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=2 )\nand d.estado=0 and c.idNom='.$id.' and c.actVac = 0 ',Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function mdatosEjercicios(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\n\t}", "function Escenario($lista){\r\necho \"<table class='tg' border='1' style='margin:auto;'>\";\r\n echo \"<tr>\";\r\n echo \"<th colspan='6'>ESCENARIO</th>\";\r\n echo \"<tr>\";\r\n echo \"<th></th>\r\n <th>1</th>\r\n <th>2</th>\r\n <th>3</th>\r\n <th>4</th> \r\n <th>5</th>\r\n </tr>\";\r\n \r\n$i=1;\r\n// Imprimimos el contenido de la tabla\r\nforeach ($lista as $fila) {\r\n echo \"<tr>\";\r\n echo \"<th>\";\r\n echo $i;\r\n echo \"</th>\";\r\n foreach ($fila as $silla) {\r\n echo \"<td>\";\r\n echo $silla;\r\n echo \"</td>\";\r\n }\r\n echo \"</tr>\";\r\n $i++;\r\n }\r\necho \"</table>\";\r\n}", "public function getNombreAdmin() {\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::getNombreAdmin() Début\");\n\t\t\t\t\n\t\t\t$total = 0;\n\t\t\n\t\t\ttry {\n\t\t\t\t$sql = \"select count(*) from tusager where role = ?\";\n\t\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t\t$sth->execute(array(USAGER::ROLE_ADMINISTRATEUR));\n\t\t\t\t\t\n\t\t\t\t// Obtenir le nombre d'administrateurs actifs\n\t\t\t\t$total = $sth->fetchColumn();\n\t\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\tErreur::erreurFatal('018', \"Maintenance::getNombreAdmin() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t\t}\n\t\t\t\t\n\t\t\t$this->log->debug(\"Maintenance::getNombreAdmin() Fin total = '$total'\");\n\t\t\n\t\t\treturn $total;\n\t\t}" ]
[ "0.600245", "0.58265793", "0.5663111", "0.5615238", "0.5612189", "0.56053364", "0.56039834", "0.5583585", "0.5556775", "0.55057216", "0.5462677", "0.5411139", "0.54092", "0.53830427", "0.5381245", "0.5365633", "0.5362829", "0.5341498", "0.533916", "0.533275", "0.5324862", "0.53032357", "0.5297258", "0.52765936", "0.5274334", "0.5267396", "0.5257814", "0.52558273", "0.52469", "0.52462786", "0.52381647", "0.5232796", "0.5226743", "0.5226148", "0.52209425", "0.5216477", "0.5216029", "0.520296", "0.52027893", "0.52020425", "0.5197579", "0.5197083", "0.5187707", "0.51873857", "0.51799166", "0.5177375", "0.51763916", "0.5174498", "0.5171111", "0.51679784", "0.5165442", "0.51624507", "0.5161552", "0.51562154", "0.51510674", "0.51447695", "0.51378", "0.513359", "0.51307523", "0.5128051", "0.5121732", "0.51204395", "0.51192915", "0.51189286", "0.51183105", "0.51125175", "0.51095253", "0.5109306", "0.5105355", "0.50990236", "0.5098957", "0.50969535", "0.50960547", "0.5095901", "0.5095531", "0.50955045", "0.5092393", "0.5083828", "0.50672036", "0.5067141", "0.5066515", "0.5064787", "0.5062626", "0.50621635", "0.5057989", "0.50568837", "0.50543845", "0.5044751", "0.5042049", "0.5039225", "0.50387293", "0.5034528", "0.50344366", "0.5031043", "0.50301075", "0.50280344", "0.5027143", "0.5023825", "0.50228244", "0.5010215", "0.5002227" ]
0.0
-1
$this>path = new File($certificateFolder);
function __construct(String $certificateFolder) { $this->path = new FileLocator($certificateFolder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(string $file_path);", "public function __construct($file);", "function __construct($file_path)\n {\n $this->open($file_path);\n }", "public function __construct($path);", "public function getFile() {}", "public function getFile() {}", "public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }", "public function __construct()\n {\n //\n\n\t echo new FakeFile( )\n }", "public static function getFile() {}", "function getFile(): object {\n return $this->file;\n }", "protected static function file()\n {\n }", "function __construct($path) {\n\t\t$this->path = $path;\t\t\n\t}", "public function __construct($file)\n {\n }", "public function __construct($file)\n {\n }", "protected function _construct() {\n\t\t$this->_fileObj = $this->fileObj();\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->files = new Filesystem();\n }", "public function __construct($filename);", "public function __construct(){\r\n\t\t$dir = $this->dir;\r\n\t}", "abstract protected function getFile(): File;", "public function get_certificate_file() {\n return '../data/certificates/' . hash_secure($this->name) . '.crt';\n }", "function getCertificateFile()\n {\n return $this->_certificateFile;\n }", "public function __construct($path){\n\t\t$this->path = $path;\n\t\tif(!file_exists($path)){\n\t\t\t$this->createFile($path);\n\t\t}\n\t}", "function __construct($file = null){\n\t\t$this->file = $file;\n\t}", "public function __construct($path){\n $this->path = $path;\n }", "public function getFile ();", "public function __construct($path) {\n\t$this->path = $path;\n }", "public function __construct($file)\n {\n $this->file = $file;\n }", "public function __construct($file = \"\")\n {\n $this->file = $file;\n }", "public function __construct($file) {\n $this->file = $file;\n }", "function __construct($file=null) {\n $this->file = $file;\n }", "public function __construct($file, $password,$openSsl)\n {\n $this->fileNameDir = $file;\n $this->password = $password;\n $this->openSsl = $openSsl;\n\n }", "function & getFileInstance() \n {\n $vfile =& v()->filesystem()->file();\n \t return $vfile;\n }", "public function __construct()\n {\n $this->files = new Filesystem();\n parent::__construct();\n }", "public function getFilePath(): string;", "public function getFilePath(): string;", "public function getPathToFile(): string;", "public function __construct($file)\n\t{\n\t\t$this->file = $file;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->dirName=public_path(\"files/collections/incoming/\");\n }", "function __construct($file_path, $template_file) {\r\n $this->cachefile = './app/_cache/'.$this->base64_url($file_path);\r\n # collect an md5 of all files\r\n $this->hash = $this->create_hash();\r\n # determine our file type so we know how (and if) to comment \r\n $this->filetype = $this->set_filetype($template_file);\r\n $this->comment_tags = $this->set_comment_tags();\r\n }", "public function __construct($filePath)\n {\n $this->path = $filePath;\n }", "public function getFile(): string;", "public function getFile(): string;", "public function getFile(): string;", "protected function fileObj() {\n\t\t$fileObj = new Varien_Io_File ();\n\t\treturn $fileObj;\n\t}", "public function __construct($path)\n {\n $this->path = $path;\n\n }", "private function __construct()\n {\n \t$this->storage_dir = $_SERVER[\"DOCUMENT_ROOT\"] . '/storage';\n }", "public function getFile();", "public function getFile();", "public function openFile() {\n $this->file = fopen($this->_dir . $this->_filename,\"r\");\n }", "function __construct ($file)\n {\n $this->_statFileFolder($file);\n }", "public function __construct($filePath)\n {\n $this->filePath = $filePath;\n }", "protected function openFile() {}", "public function __construct()\n {\n parent::__construct();\n $this->files = app('files');\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function __construct($path)\n\t{\n\t\t$this->path = $path;\n\t}", "public function testRetrieveFilePath()\n {\n $this->file = 'test';\n\n self::assertEquals('test', $this->getFile());\n }", "protected function getFileFactory() {}", "public function __construct()\n {\n parent::__construct();\n $this->fileClassFactory = new FileFactory();\n }", "public function __construct(File $file)\n\t{\n\t\t$this->file = $file;\n\t}", "private static function file()\n {\n $files = ['File', 'Filesystem'];\n $folder = static::$root.'Filesystem'.'/';\n\n self::call($files, $folder);\n\n $files = ['FileNotFoundException', 'DirectoryNotFoundException'];\n $folder = static::$root.'Filesystem/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function __construct(\n protected string $filename\n ) {\n }", "public function __construct() {\r\n $directoryInfo = new DirectoryInfo(getcwd());\r\n $this->directoryRoot = $directoryInfo->root();\r\n }", "public function __construct(File $file)\n {\n $this->file = $file;\n }", "public function __construct(File $file)\n {\n $this->file = $file;\n }", "public function __construct(File $file)\n {\n $this->file = $file;\n }", "public function __construct(File $file)\n {\n $this->file = $file;\n }", "public function __construct($file_path) {\n\t\t$file_path = self::standardizePath($file_path);\n\t\tif (!self::exists($file_path)) {\n\t\t\tthrow new \\Exception(\"File does not exist: \\\"$file_path\\\"\");\n\t\t}\n\t\t$this->path = realpath($file_path);\n\t}", "public function getFilepath();", "protected function createFile() {}", "final function getFile();", "function __construct($file){\t\t\n\t\t$this->pathFile = $file;\t\t\t\t\t\t\t\t\t\t// inisialisasi pathFile\n\t\t$this->filename = pathinfo($this->pathFile)['filename'];\t\t//mengambil namafile dari pathFile\n\t\t$this->getTextInside();\t\t\t\t\t\t\t\t\t\t\t//menjalankan fungsi getTextInside\n\t}", "public function __construct($path)\n {\n $this->path = $path;\n }", "public function __construct($path)\n {\n $this->path = $path;\n }", "public function __construct(private string $path)\n {\n $this->open();\n }", "public function file($path);", "public function __construct($path) {\n $this->physicalPath = realpath($path);\n \n if(!is_file($this->physicalPath)){\n throw new Exception($physicalPath.' is not a file');\n }\n \n $this->path_parts = pathinfo($this->physicalPath);\n }", "function __construct($class = 'Unknown', $file = \"../../log/heili.log\") {\n\n $this->class = $class;\n $this->file = new File($file);\n $opened = $this->file->open($this->conf[\"mode\"]);\n\n }", "public function __construct($file,$email)\n {\n $this->file = $file;\n $this->email=$email;\n }", "public function __construct(string $file)\n {\n $this->file = $file;\n }", "public function __construct(string $file)\n {\n $this->file = $file;\n }", "public static function get_certificate_path()\n {\n }", "public static function set_certificate_path($path)\n {\n }", "public function setPath($file);", "abstract protected function getFileWithPath();", "public function __construct()\n {\n $this->folderCreator = new FolderCreator();\n }", "public function get_file()\n {\n return $this->file;\n }", "public function fopen() \n { \n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->files = \"\";\n\t}", "public function __construct(bool $file = false)\n {\n $this->file = $file;\n }", "public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n\n\n }", "public function __construct($file_path = '')\n {\n if (empty($file_path)) {\n $file_path = ROOT . '/private/cache/';\n }\n\n $this->setCacheDir($file_path);\n }", "public function __construct(FileInterface $file) {\n $this->file = $file;\n }", "public function __construct($file='')\n\t{\n\t\tif(!empty($file))\n\t\treturn $this->get($file);\n\t}", "public function testGetFile()\n {\n\n }", "public function __construct($path)\n {\n $this->path = $path;\n\n $this->localFilesystem($path);\n }", "public function __construct($path) {\r\n\t\tparent::__construct();\r\n\t\t$this->_path = $path;\r\n\t}", "public function __construct() {\n $this -> fichier = new Fichier(\"../contributeurs\", false);\n }" ]
[ "0.6861805", "0.660397", "0.64530945", "0.63977253", "0.63536257", "0.6351859", "0.63486254", "0.6246805", "0.6214628", "0.61984205", "0.6184057", "0.61572343", "0.6137795", "0.61377895", "0.61106455", "0.61079943", "0.61064553", "0.60980433", "0.6095672", "0.60745305", "0.6030743", "0.60300845", "0.60196847", "0.6011931", "0.6005542", "0.5992895", "0.5985963", "0.5973122", "0.5955361", "0.59388965", "0.5936236", "0.5933229", "0.5930515", "0.5921744", "0.5921744", "0.59092027", "0.589425", "0.5893298", "0.5888108", "0.5880469", "0.58697265", "0.58697265", "0.58697265", "0.5845398", "0.58140546", "0.58077645", "0.5772672", "0.5772672", "0.57446367", "0.57406807", "0.5720559", "0.5716772", "0.5711394", "0.57021695", "0.57021695", "0.57021695", "0.57021695", "0.56985605", "0.5696097", "0.56893444", "0.56852", "0.5684605", "0.568412", "0.56738234", "0.56734544", "0.5663484", "0.5663484", "0.5663484", "0.5663484", "0.56607634", "0.5652975", "0.5648419", "0.5626798", "0.5617131", "0.56126195", "0.56126195", "0.5610537", "0.5605014", "0.56040984", "0.5599385", "0.5597334", "0.55955744", "0.55955744", "0.5590341", "0.5571762", "0.5570141", "0.5568701", "0.55500776", "0.55417573", "0.55414975", "0.554108", "0.5538943", "0.5538341", "0.55329466", "0.55314636", "0.55294055", "0.5516962", "0.5516066", "0.5515842", "0.55086845" ]
0.6901473
0
Desarrollar una funcion que reciba un array o un string, en un mismo parametro, e imprima el contenido de la varible en un archivo
function print_f($variable){ if(is_array($variable)){ //Si es un array, lo recorro y guardo el contenido en el archivo "datos.txt" foreach($variable as $valor){ $contenido = $contenido . $valor . "\n"; } file_put_contents("datos.txt", $contenido); } else{ //Entonces es string, guardo el contenido en el archivo "datos.txt" file_put_contents("datos.txt", $variable); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readFileFromParam() {\n\t\tglobal $argv;\n\t\t$myArr = array();\n $myString = \"\";\n $len = 0;\n \n\t\tif (($file = fopen($argv[1], \"r\") or exit (\"Sorry - file not found.\")) != FALSE) {\n\t\t\twhile (($data = fgets($file)) != FALSE) {\n\t\t\t $myArr[$len] = $data;\n $len++; \n\t\t\t}\n\t\t}\t\n\t\tfclose($file);\n \n // make sure that we have input that we are expecting \n if ($len >= 2) {\n $this->width = intval($myArr[0]);\n for ($i = 1; $i < $len; $i++) {\n $myString.=$myArr[$i];\n }\n $this->originalArray = explode(\" \", $myString);\n } else die(\"Bad input - exiting.\");\n\n \n\t}", "function chooseFile($gender,$education,$height,$age){\n $result[0]=gender($gender);\n $result[1]=education($education);\n $result[2]=height($height);\n $result[3]=age($age);\n return $result;\n}", "function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(FILEUSER, 'r') or die(\"ERROR al abrir fichero de usuarios\"); // abrimos el fichero para lectura\n \n while ($linea = fgets($fich)) {\n $partes = explode('|', trim($linea));\n // Escribimos la correspondiente fila en tabla\n $tabla[]= [ $partes[0],$partes[1],$partes[2],$partes[3]];\n }\n fclose($fich);\n return $tabla;\n}", "function ola(){\n\n$argumentos = func_get_args();// recupera todos os argumentos da variavel que é um array \nreturn $argumentos;\n}", "function funConverteData($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = explode('/',$data);\n\n\t//AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = $partes_da_data[2].'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\treturn $data;\n}", "function GetData($path)\n{\n static $final_str = \"\";\n $file = fopen($path, 'r') or die(\"Не удалось открыть файл. Скорее всего путь к файлу задан не верно или его не существет.\");\n\n while(!feof($file))\n {\n $str = fgets($file);\n $final_str .= $str . \" \";\n }\n fclose($file);\n $arr = explode(\" \", $final_str);\n $final_str = \"\";\n return $arr;\n\n\n}", "function consultarFuncionalidad()\n\t\t{\n\t\t\t\t $file = fopen(\"../Archivos/ArrayConsultarFuncionalidad.php\", \"w\");\n\t\t\t\t fwrite($file,\"<?php class consult { function array_consultar(){\". PHP_EOL);\n\t\t\t\t fwrite($file,\"\\$form=array(\" . PHP_EOL);\n\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"SELECT * FROM funcionalidades \";\n\t\t\t$resultado=$mysqli->query($query);\n\t\t\tif(mysqli_num_rows($resultado)){\n\t\t\t\twhile($fila = $resultado->fetch_array())\n\t\t\t{\n\t\t\t\t$filas[] = $fila;\n\t\t\t}\n\t\t\tforeach($filas as $fila)\n\t\t\t{ \n\t\t\t\t$nombre=$fila['NOMBRE_FUNCIONALIDAD'];\n\t\t\t\t$descripcion=$fila['DESCRIPCION'];\n\t\t\t\tfwrite($file,\"array(\\\"nombre\\\"=>'$nombre',\\\"descripcion\\\"=>'$descripcion'),\" . PHP_EOL);\n\t\t\t}\n\t\t\t}\n\t\t\t fwrite($file,\");return \\$form;}}?>\". PHP_EOL);\n\t\t\t\t fclose($file);\n\t\t\t\t $resultado->free();\n\t\t\t\t $mysqli->close();\n\t\t}", "public function saveData(string $fileName, array $data): string;", "function array2file($array, $filename) {\n\t$temp = '<?php\nclass ProcMap\n{\n private static $_procmap = '.var_export($array, TRUE).';\n\n public static function getProcAll()\n {\n return self::$_procmap;\n }\n\n public static function getProcFromSchema($schema_name)\n {\n return self::$_procmap[$schema_name];\n }\n\n}\n?>';\n\tfile_exists($filename) or touch($filename);\n\tfile_put_contents($filename, $temp);\n}", "function inscription(array $user){ \n \n //Recupere tous les utilisateurs du fichier sous forme de Tableau\n $arr_users=getAllUsers();\n // Ajoute le User dans le Tableau\n $arr_users[]=$user;\n //Convertir le Tableau en Chaine\n $str_user=json_encode($arr_users,JSON_PRETTY_PRINT);\n //Ajouter la chaine dans le Fichier\n file_put_contents(FILE_NAME,$str_user); \n\n }", "abstract protected function load(): array;", "function cargar_archivo($data) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"init\">\r\n $ruta = $data[\"archivo\"];\r\n $tipo_archivo = $data[\"tipo_archivo\"];\r\n $lectura = false;\r\n $buffer = array();\r\n $canalTemp = \"\";\r\n $indicadorTemp = \"\";\r\n $fechaTemp = \"\";\r\n $horaInicioTemp = \"\";\r\n $horaFinTemp = \"\";\r\n $descripcionTemp = \"\";\r\n // </editor-fold>\r\n\r\n try {\r\n $archivo = new SplFileObject($ruta, \"r\");\r\n } catch (Exception $exc) {\r\n throw new Exception(\"No se pudo cargar el archivo.\");\r\n echo $exc->getTraceAsString();\r\n }\r\n\r\n switch ($tipo_archivo) {\r\n case self::tipo_archivo_emisiones:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Channel\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[0]) != \"Channel\" ||\r\n $this->limpiar_valores($valores[1]) != \"Date\" ||\r\n $this->limpiar_valores($valores[2]) != \"Description\" ||\r\n $this->limpiar_valores($valores[4]) != \"Start time\" ||\r\n $this->limpiar_valores($valores[5]) != \"End time\" ||\r\n $this->limpiar_valores($valores[8]) != \"Target\\Variable\" ||\r\n $this->limpiar_valores($valores[9]) != \"SHR %\" ||\r\n $this->limpiar_valores($valores[10]) != \"AMR\" ||\r\n $this->limpiar_valores($valores[11]) != \"AMR %\" ||\r\n $this->limpiar_valores($valores[12]) != \"RCH [Not cons. - TH: 0min.]\" ||\r\n $this->limpiar_valores($valores[13]) != \"ATS\"\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[0]) != \"\") {\r\n $valores[0] = $this->limpiar_canal($valores[0]);\r\n $canalTemp = $valores[0];\r\n } else {\r\n $valores[0] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[1]) && $valores[1] != \"\") {\r\n $valores[1] = $this->formatea_fecha($valores[1]);\r\n $fechaTemp = $valores[1];\r\n } else {\r\n $valores[1] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"descripcion programa\">\r\n if ($this->limpiar_canal($valores[2]) != \"\") {\r\n $valores[2] = $this->limpiar_canal($valores[2]);\r\n $descripcionTemp = $valores[2];\r\n } else {\r\n $valores[2] = $descripcionTemp;\r\n }// </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"hora inicio\">\r\n if ($this->limpiar_canal($valores[4]) != \"\") {\r\n $valores[4] = $this->limpiar_canal($valores[4]);\r\n $horaInicioTemp = $valores[4];\r\n } else {\r\n $valores[4] = $horaInicioTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"hora fin\">\r\n if ($this->limpiar_canal($valores[5]) != \"\") {\r\n $valores[5] = $this->limpiar_canal($valores[5]);\r\n $horaFinTemp = $valores[5];\r\n } else {\r\n $valores[5] = $horaFinTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"valores indicadores\">\r\n $valores[8] = $this->limpiar_canal($valores[8]); // indicador\r\n $valores[9] = $this->limpiar_valores($valores[9]); //shr %\r\n $valores[10] = $this->limpiar_valores($valores[10]); //amr\r\n $valores[11] = $this->limpiar_valores($valores[11]); //amr %\r\n $valores[12] = $this->limpiar_valores($valores[12]); //rch\r\n $valores[13] = $this->limpiar_valores($valores[13]); //ats\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n case self::tipo_archivo_totales:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Channel\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[0]) != 'Channel' ||\r\n $this->limpiar_valores($valores[1]) != 'Target' ||\r\n $this->limpiar_valores($valores[3]) != 'Date\\Variable' ||\r\n $this->limpiar_valores($valores[4]) != 'SHR %' ||\r\n $this->limpiar_valores($valores[5]) != 'AMR' ||\r\n $this->limpiar_valores($valores[6]) != 'AMR %' ||\r\n $this->limpiar_valores($valores[7]) != 'RCH [Not cons. - TH: 0min.]' ||\r\n $this->limpiar_valores($valores[8]) != 'ATS'\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n /* Verificando que la linea está completa */\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[0]) != \"\") {\r\n $valores[0] = $this->limpiar_canal($valores[0]);\r\n $canalTemp = $valores[0];\r\n } else {\r\n $valores[0] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Indicador\">\r\n if ($this->limpiar_canal($valores[1]) != \"\") {\r\n $valores[1] = $this->limpiar_canal($valores[1]);\r\n $indicadorTemp = $valores[1];\r\n } else {\r\n $valores[1] = $indicadorTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[3])) {\r\n $valores[3] = $this->formatea_fecha($valores[3]);\r\n $fechaTemp = $valores[3];\r\n } else {\r\n $valores[3] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Valores indicador\">\r\n $valores[4] = $this->limpiar_valores($valores[4]);\r\n $valores[5] = $this->limpiar_valores($valores[5]);\r\n $valores[6] = $this->limpiar_valores($valores[6]);\r\n $valores[7] = $this->limpiar_valores($valores[7]);\r\n $valores[8] = $this->limpiar_valores($valores[8]);\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n /* Elimino la fila de encabezado */\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n case self::tipo_archivo_medias_horas:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Month\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[1]) != 'Date' ||\r\n $this->limpiar_valores($valores[2]) != 'Channel' ||\r\n $this->limpiar_valores($valores[3]) != 'Target' ||\r\n $this->limpiar_valores($valores[4]) != 'Day Part\\Variable' ||\r\n $this->limpiar_valores($valores[5]) != 'SHR %' ||\r\n $this->limpiar_valores($valores[6]) != 'AMR' ||\r\n $this->limpiar_valores($valores[7]) != 'AMR %' ||\r\n $this->limpiar_valores($valores[8]) != 'RCH [Not cons. - TH: 0min.]' ||\r\n $this->limpiar_valores($valores[9]) != 'ATS'\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n /* Verificando que la linea está completa */\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[1]) && $valores[1] != \"\") {\r\n $valores[1] = $this->formatea_fecha($valores[1]);\r\n $fechaTemp = $valores[1];\r\n } else {\r\n $valores[1] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[2]) != \"\") {\r\n $valores[2] = $this->limpiar_canal($valores[2]);\r\n $canalTemp = $valores[2];\r\n } else {\r\n $valores[2] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Indicador\">\r\n if ($this->limpiar_canal($valores[3]) != \"\") {\r\n $valores[3] = $this->limpiar_canal($valores[3]);\r\n $indicadorTemp = $valores[3];\r\n } else {\r\n $valores[3] = $indicadorTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Valores indicador\">\r\n $valores[4] = $this->limpiar_valores($valores[4]);\r\n $valores[5] = $this->limpiar_valores($valores[5]);\r\n $valores[6] = $this->limpiar_valores($valores[6]);\r\n $valores[7] = $this->limpiar_valores($valores[7]);\r\n $valores[8] = $this->limpiar_valores($valores[8]);\r\n $valores[9] = $this->limpiar_valores($valores[9]);\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n /* Elimino la fila de encabezado */\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n default :\r\n throw new Exception(\"Operacion invalida\");\r\n break;\r\n }\r\n /* Elimino encabezado de tabla */\r\n unset($buffer[0]);\r\n return $buffer;\r\n }", "function js($arquivo);", "function array_to_arrayfile($theArray, $filepath) {\n// The file may then be converted back into an array using the arrayfile_to_array() function\n\n if ($fp = fopen($filepath, \"w+\")) {\n $encoded = serialize($theArray);\n fwrite($fp, $encoded);\n fclose($fp);\n } else\n echo \"Unable to write array to $filepath\";\n}", "public function get_contents_array($file)\n {\n }", "public function get_contents_array($file)\n {\n }", "public function get_contents_array($file)\n {\n }", "public function get_contents_array($file)\n {\n }", "public function get_contents_array($file)\n {\n }", "function csv($fichier, $meteocode, $date, $code)\n{\n $lines2 = file($fichier);\n\n $id = $meteocode;\n // Affiche toutes les lignes du tableau comme code HTML, avec les numéros de ligne\n foreach($lines2 as $line_num2 => $line2)\n {\n $chaine2 = htmlspecialchars($line2);\n\n if(strpos($chaine2, $date['aa'] . '-' . $date['mm'] . '-' . $date['jj']))\n {\n /* * *************************************************\n * À regler le probleme de .0 dans la ligne suivante *\n * ************************************************** */\n\n if(strstr($chaine2, $id . '.0_' . $code . '_'))\n {\n $text = strpbrk($chaine2, '2');\n $x = strpos($text, 'v', 32);\n $lien = substr($text, 0, $x + 1);\n $parametre = substr($lien, -6, -4);\n switch($parametre)\n {\n case 'CC':$lien_cc = $lien;\n break;\n case 'PA':$lien_pa = $lien;\n break;\n case 'OP':$lien_pop = $lien;\n break;\n case 'TA':$lien_ta = $lien;\n break;\n case 'TD':$lien_td = $lien;\n break;\n case 'WS':$lien_ws = $lien;\n break;\n }\n }\n }\n }\n $lien_csv = array(\n 'lien_cc' => $lien_cc,\n 'lien_pa' => $lien_pa,\n 'lien_pop' => $lien_pop,\n 'lien_ta' => $lien_ta,\n 'lien_td' => $lien_td,\n 'lien_ws' => $lien_ws,\n );\n return($lien_csv);\n}", "protected abstract function getData(): array;", "function array_codproduto_foto($con){\r\n\t$param_cadastro_dirfotoprod = param(\"CADASTRO\", \"DIRFOTOPROD\", $con);\r\n\t$arr_codproduto = array();\r\n\tif(is_dir($param_cadastro_dirfotoprod)){\r\n\t\t$dir = opendir($param_cadastro_dirfotoprod);\r\n\t\twhile($file = readdir($dir)){\r\n\t\t\t$file = strtolower($file);\r\n\t\t\tif(strpos($file, \".jpg\") !== FALSE){\r\n\t\t\t\t$arr_codproduto[] = str_replace(\".jpg\", \"\", $file);\r\n\t\t\t}\r\n\t\t\tif(is_dir($file)){\r\n\t\t\t\tif(is_numeric($file)){\r\n\t\t\t\t\t$arr_codproduto[] = $file;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $arr_codproduto;\r\n}", "function ajout_fichier(array $array){\n $json = json_encode($array);\n file_put_contents(FILE_QUESTION, $json);\n}", "function writeToAFile(string $file,array $array)\n\t{\n\t\treturn file_put_contents($file, implode(\"\\n\",$array));\n\t}", "function st_get_content_from_func($function,$data = array(),$settings = array()){\r if(!function_exists($function) || !is_string($function)){\r return false;\r }\r\r ob_start();\r $old_cont = ob_get_contents();\r ob_end_clean();\r ob_start();\r call_user_func($function,$data,$settings);\r $content = ob_get_contents();\r ob_end_clean();\r echo $old_cont;\r return $content;\r\r}", "function import(array $data);", "function arrayToFile($oldList, $key, $value, $fileName, $name) {\n $oldList[\"$key\"] = $value;\n $newList = http_build_query($oldList, '', ', ');\n $newList = noAscii($newList);\n $newList = str_replace(\"=\", \"=>\", \"$newList\");\n $newList = '\"'.$newList;\n $newList = str_replace(\"=>\", '\"=>\"', $newList);\n $newList = str_replace(\", \", '\", \"', $newList);\n $arrayFile = fopen(\"$fileName\", \"w\");\n fwrite($arrayFile, \"<?php \".'$'.$name.' = array('.$newList.'\"); ?>');\n fclose($arrayFile);\n}", "function storeData(){\n global $data_file;\n $content = file_get_contents($data_file); //failo turinys\n $formData = implode(',', $_POST); //konvertuojame POST masyva i string\n $content .= $formData.\"\\n\"; //ivedame po kiekvieno submit pabaiga prie formos duomenu pridedame eilutes pabaigos zenkla\n file_put_contents($data_file, $content); //rasom i txt faila formos duomenis\n var_dump($content);\n}", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "function editar_pelicula($peliActual){\n // leemos todas las pelis, y las volcamos al fichero menos la pasada como argumento\n\n $lesPelis=readPelis();\n\n // obrim el fitxer de pelis per a escriptura. \n $f = fopen(filePeliculas, \"w\");\n\n foreach($lesPelis as $peli){\n\n // guardem la peli llegida o l'actual, si és el cas\n if ($peli[\"id\"]==$peliActual[\"id\"]){\n $p=$peliActual;\n }\n else{\n $p=$peli;\n }\n\n //convertim $peli (array asociatiu) en array\n\n $valors_peli=array();\n foreach($p as $k=>$v){\n array_push($valors_peli,$v);\n }\n\n //escrivim al fitxer\n fputcsv($f,$valors_peli,\",\");\n\n }\n\n fclose($f);\n \n \n\n}", "function file_content($f){\n\n if(file_exists($f)){\n if(is_readable($f)){\n if($file = @fopen($f, \"r\") == FALSE){\n fprintf(STDERR, \"Nie je mozne otvorit subor.\\n\");\n exit(2); \n } \n \n $content = file_get_contents($f);\n $functions = content_filter($content);\n return $functions;\n }\n \n }\n \n \n}", "function exportDataOneInscritos($T_INSCRITOS,$PROVINCIA,$CLAVE,$TOMO,$FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $Query = new Query($mysqli, \"SELECT * FROM \".$TINS.\" where provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA,&$CLAVE,&$TOMO,&$FOLIO);\n $data = $Query->getresults($parametros);\n\n // --- Guardamos el documento\n if (isset($data[0])) {\n return $data[0];} else {return null;}\n}", "function creararrayReservas()\n{\n\t$deportistaId=null;\n\t$actividadId=null;\n\t$fecha=null;\n\t$asistencia=null;\n\t\n\t$file = fopen(\"../Archivos/ArrayConsultarReservas.php\", \"w\");\n\n\tfwrite($file,\"<?php class consultReserva { function array_consultarReservas(){\". PHP_EOL);\n\tfwrite($file,\"\\$form=array(\" . PHP_EOL);\n\n\t$mysqli=$this->conexionBD();\n\t$resultado=$mysqli->query(\"SELECT * FROM `Deportista_reserva_actividad`\");\n\tif(mysqli_num_rows($resultado)){\n\n\t\twhile($fila = $resultado->fetch_array())\n\t\t{\n\t\t\t$filas[] = $fila;\n\t\t}\n\t\tforeach($filas as $fila)\n\t\t{\n\t\t\t$deportistaId=$fila['Deportista_id_Usuario'];\n\t\t\t$actividadId=$fila['Actividad_id_Actividad'];\n\t\t\t$fecha=$fila['Fecha'];\n\t\t\t$asistencia=$fila['Asistencia'];\n\n\t\t\tfwrite($file,\"array(\n\t\t\t\t\\\"deportistaId\\\"=>'$deportistaId',\n\t\t\t\t\\\"actividadId\\\"=>'$actividadId',\n\t\t\t\t\\\"fecha\\\"=>'$fecha',\n\t\t\t\t\\\"asistencia\\\"=>'$asistencia'),\" . PHP_EOL);\n\n\t \t}\n\t \t\n\t \tfwrite($file,\");return \\$form;}}?>\". PHP_EOL);\n\t \tfclose($file);\n\t \t$resultado->free();\n\t\t$mysqli->close();\n\t}else{\n\tfwrite($file,\")\" . PHP_EOL);\n\tfwrite($file,\";return \\$form;}}?>\". PHP_EOL);\t\n\tfclose($file);\n\t}\n}", "function returnResultAndContent() {\n $function = func_get_arg(0);\n ob_start();\n if (func_num_args() > 1)\n $result = call_user_func_array($function, array_slice(func_get_args(), 1));\n else\n $result = call_user_func($function);\n $content = ob_get_clean();\n return array($result, $content);\n }", "function fileData($file, $header = NULL) {\n\t\treturn src\\Libre::__fileData($file, $header);\n\t}", "function load_js($arquivo=NULL,$pasta='js',$remoto=FALSE){\n if($arquivo!= null):\n $CI =& get_instance();\n $CI->load->helper('url');\n $retorno ='';\n if(is_array($arquivo)):\n foreach ($arquivo as $js):\n $retorno .= set_js($remoto,$js,$pasta);\n endforeach;\n else:\n $retorno = set_js($remoto,$arquivo,$pasta);\n endif;\n endif;\n return $retorno;\n}", "function listarTodos2(){\n\tglobal $ruta_archivo;\n\t$array_result=array();\n\t$contenido_verificacion = file_get_contents($ruta_archivo);\n\t$lineas = explode(\"\\n\", $contenido_verificacion);\n return $lineas;\n\n\n//------USO---------\n /*\n\t$lineas_count = count($lineas);\n\n//---recorremos desde la segunda linea\n\tfor($i = 1; $i < $lineas_count; $i++) {\n\n\t\tif(empty($lineas[$i]) || $lineas[$i]==\"\"){\n\t\t\tcontinue;\n\t\t//echo $i.\"-\".$lineas[$i].\"-\";\n\t\t}\n\n\t\t$array_fila = explode('|', $lineas[$i]);\n\n\t\techo $array_fila[1].\"<br>\";\n\t\t\n\t}\n\t\n*/\n}", "function loadFromFile(string $filepath): ?array {//lolo\n $fichier = file_get_contents($filepath);\n\n if ($fichier === false) {\n return null;\n }\n\n $tab = json_decode($fichier, true);\n if ($tab === null) {\n return null;\n }\n return $tab;\n}", "public static function getDataFromApi($functionname, $param = array(), $type = \"POST\") {\n\n $url = \\Config::get('constant.API_LINK') . $functionname;\n\n $curl = curl_init();\n\n if ($type == \"POST\") {\n $method = 1; //Post\n } else {\n $method = 0; //GET\n }\n\n if (isset($param['file'])) {\n $tmp_path = $param['file']->getRealPath();\n $type_data = $param['file']->getMimeType();\n\n $file = new CURLFile($tmp_path, $type_data, $param['file']->getClientOriginalName());\n\n $param['file'] = $file;\n }\n\n\n $header_data = array(\n \"username : guest\",\n \"password : guest\",\n \"token : HalfTicket\",\n 'Authorization: Basic YWRtaW46ZmFzdGJhbmtpbmcxMjM0'\n );\n\n\n \n \n curl_setopt($curl, CURLOPT_URL, $url); \n\n if ($type == \"POST\") {\n\n //dd($param);\n curl_setopt($curl, CURLOPT_POST, $method);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $param); //http_build_query($param)\n\n }\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header_data);\n curl_setopt($curl, CURLOPT_USERAGENT, \"Fastbanking\");\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n \n\n \n $data = curl_exec($curl);\n // echo curl_error($curl);\n // exit;\n // dd($data);\n $data = json_decode($data, true);\n\n \n // print_r(\"<pre>\"); \n // print_r($data); \n // exit; \n\n curl_close($curl);\n\n return $data;\n }", "private function readFileAsArray()\n {\n return file($this->getFolder() . $this->filename);\n }", "function readFile($file){\n \n $content = [];\n $file = new \\SplFileObject($file); \n $file->setFlags(\\SplFileObject::READ_CSV); // lee csv\n foreach ($file as $line) {\n $content[] = $line;\n }\n $count= count($content); // cuenta las filas\n $countValues = count($content[0]); //cuenta las columnas\n $i=0;\n for ($i=0;$i<$countValues;$i++){\n\n for ($j=1;$j<$count;$j++){\n $this->change_index ($content[$j], $i, $content[0][$i]); // cambia los indices\n }\n }\n return $content;\n}", "function array_to_file(array $data, $file = DEFAULT_METAFILE)\n{\n try {\n if (!$data || !is_array($data) || !count($data)) {\n return true;\n }\n $dir = ROOT_FOLDER;\n $filename = $file;\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n $file = fopen($filename, \"w\");\n foreach ($data as $key => $value) {\n fwrite($file, (string) $key . \": \" . (string) $value . \"\\n\");\n }\n fclose($file);\n return true;\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), $e->getCode());\n }\n}", "public function recorrerArchivoCSV(){\n $array = [];\n for ($row = $this->filaDesde; $row <= $this->filaHasta; ++ $row) {\n $item = new ExtractoBancarioItemVO();\n $registro = $this->FILE[$row];\n $registro = explode (\",\", $registro);\n\n //este IF es por si tiene \",\" en algún lugar del nro, pasa en MACRO.\n if ($this->idTipoBanco['valor'] == 3){\n $aux = [];\n //arreglamos el formato de la fecha.\n $date = new DateTime($registro[0]);\n $aux[0] = $date->format(\"Y-m-d\");\n\n //asigno los valores que están bien en $aux.\n $aux[1] = $registro[1];\n $aux[2] = $registro[2];\n $aux[3] = $registro[3];\n\n //arreglamos el registro para que los nros queden en la posición del array que les corresponden.\n //analizo el campo Débito.\n $i=4;\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[4] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[4] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[4] = str_replace('\"', \"\", $aux[4]);\n\n //incremento el valor de $i.\n $i++;\n //analizo el campo Crédito.\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[5] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[5] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[5] = str_replace('\"', \"\", $aux[5]);\n\n //incremento el valor de $i.\n $i++;\n //analizo el campo Saldo.\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[6] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[6] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[6] = str_replace('\"', \"\", $aux[6]);\n\n $registro = $aux;\n }\n\n for ($col = $this->columnaDesde; $col < $this->columnaHasta; ++ $col) {\n //si la columna leída nos interesa continúo.\n if(in_array($col, $this->columnas)){\n $val = $registro[$col];\n array_push($array, trim($val));\n }\n }\n\n $item->asignarValores($array, $this->idTipoBanco['valor']); //asigno los valores al objeto.\n $this->mensaje['valor'] .= $item->idTipoBancoConcepto['referencia']->result->getMessage();\n //si el status no es OK, incremento el contador de erróneos.\n if($item->idTipoBancoConcepto['referencia']->result->getStatus() != STATUS_OK)\n $this->cantidadRegistrosError['valor']++;\n $this->extractoBancarioItemArray[] = $item; //agrego el registro al array.\n\n $array = [];\n $this->cantidadRegistros['valor']++;\n }\n }", "public function recorrerArchivoTXT(){\n $array = [];\n\n for ($row = $this->filaDesde; $row <= $this->filaHasta; ++ $row) {\n $item = new ExtractoBancarioItemVO();\n $registro = $this->FILE[$row];\n if($this->idTipoBanco['valor'] == 5){\n //pongo como separador la coma.\n $registro = preg_replace('/ +/', \",\", $registro);\n }\n\n $registro = explode (\",\" , $registro);\n\n if($this->idTipoBanco['valor'] == 5){\n //la posición 4 del vector es un error al hacer el parseo, no hay que considerarlo.\n //arreglo los valores del array para sacar un caracter inválido que viene del archivo.\n $invalido = $registro[1][0].$registro[1][1]; //en esta posición encuentro el caracter inválido.\n foreach ($registro as &$valor){\n $valor = str_replace($invalido, \"\", $valor);\n $valor = trim ($valor);\n }\n }\n\n for ($col = $this->columnaDesde; $col < $this->columnaHasta; ++ $col) {\n //si la columna leída nos interesa continúo.\n if(in_array($col, $this->columnas)){\n $val = $registro[$col];\n array_push($array, trim($val));\n }\n }\n\n $item->asignarValores($array, $this->idTipoBanco['valor']); //asigno los valores al objeto.\n $this->mensaje['valor'] .= $item->idTipoBancoConcepto['referencia']->result->getMessage();\n //si el status no es OK, incremento el contador de erróneos.\n if($item->idTipoBancoConcepto['referencia']->result->getStatus() != STATUS_OK)\n $this->cantidadRegistrosError['valor']++;\n $this->extractoBancarioItemArray[] = $item; //agrego el registro al array.\n\n $array = [];\n $this->cantidadRegistros['valor']++;\n }\n }", "function element($fileName, $data=null, $return=false ) {\n if ( is_bool($data) ) { $return = $data; }\n $fileName = $this->path($fileName);\n\n if ( is_array($data) ) { extract($data); }\n\n if ($return) {\n ob_start();\n include \"$fileName\";\n $data = ob_get_contents();\n ob_end_clean();\n return $data;\n } else {\n include \"$fileName\";\n }\n }", "function show_content($arr)\n{\n $content = print_r($arr, TRUE);\n file_put_contents('/data1/php_var_contents.log', $content);\n}", "function leer_fichero_completo($nombre_fichero){\n $fichero_texto = fopen ($nombre_fichero, \"r\");\n //obtenemos de una sola vez todo el contenido del fichero\n //OJO! Debido a filesize(), sólo funcionará con archivos de texto\n $contenido_fichero = fread($fichero_texto, filesize($nombre_fichero));\n return $contenido_fichero;\n }", "function retorno($nombre,$apellido)\n {\n if( is_string($nombre) && is_string($apellido) )\n {\n //filter_vars()\n $dame = $nombre. \"<br>\". $apellido;\n return $dame;\n }\n else\n {\n return \"Ingresaste mal los datos. tienen que ser caractéres alfabéticos\";\n }\n\n }", "public function write_jason($arry,$java_callback=\"null\"){\n try{\n \n //can use implode\n \n$io=0;\n$arr_count=count($arry);\nwhile($io<$arr_count){\n$string=$string.$arry[$io].$this->seprator;\n$io++;\n}\n$string=$string.$java_callback;\n\nreturn $string;\n\n\n }catch(Exception $e){\n\t\t \n\t\treturn \"\"; \n\t\t \n\t }\n\n\n}", "function funConverteDataHora($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = \"\";\n\t$hora = \"\";\n\t$partes_da_data = explode('/',$data);\n\t$hora = substr($partes_da_data[2],4,-1);\n\n //AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = substr($partes_da_data[2],0,4).'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\t//return \n\treturn $data.' '.$hora;\n}", "function filtrado($datos)\n{\n if (gettype($datos) == \"string\") {\n $datos = trim($datos); // Elimina espacios antes y después de los datos\n $datos = stripslashes($datos); // Elimina backslashes \\\n $datos = htmlspecialchars($datos); // Traduce caracteres especiales en entidades HTML\n }\n return $datos;\n}", "function export($array, $file){\n\t$file =fopen($file, 'w');\n\t$data = json_encode($array, FILE_USE_INCLUDE_PATH);\n\tfwrite($file, $data);\n\tfclose($file);\n}", "function createFichierTxt($cat_txt, $emp, $emp_sigle, $path_txt, $date_debut, $date_fin){\n $data = array();\n $txt =array();\n $no_data_msg = '';\n\n if ($cat_txt == 'AD'){\n $data = getListAdhesionsDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Adhesions du mois');\n }\n if ($cat_txt == 'PS'){\n $data = getListPSDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Parts Sociales du mois');\n }\n if ($cat_txt == 'NE'){\n $data = getListEpargneDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Epargnes du mois');\n }\n if ($cat_txt == 'NP'){\n $data = getListPretDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Prets du mois');\n }\n\n $nombre_colonnes = $data['nbrCols']+1;\n\n if(sizeof($data)>1){\n $file_handle = fopen($path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\",\"w\");\n $txt_path = $path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt_name = $cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt['path'] = $txt_path;\n $txt['name'] = $txt_name;\n foreach($data as $key => $value){\n $content = '';\n //if($key != 'nbrCols'){\n //$content = $key;\n //}\n for($i=1;$i<=$nombre_colonnes;$i++){\n $content .= $value['col'.$i.'_value'];\n }\n fwrite($file_handle, $content.\"\\r\\n\");\n }\n fclose($file_handle);\n }\n else{\n $txt['no_data'] = $no_data_msg;\n }\n\n return $txt;\n}", "function Exportar($Pft, $fullpath){\r\n global $Wxis,$xWxis,$db_path,$arrHttp,$msgstr,$separador,$wxisUrl;\r\n $query = \"&base=\" . $arrHttp[\"base\"] . \"&cipar=$db_path\".\"par/\".$arrHttp[\"cipar\"].\"&Formato=\".urlencode($Pft);\r\n if (isset($arrHttp[\"Mfn\"]) and trim($arrHttp[\"Mfn\"])!=\"\") {\r\n \t$query.=\"&Opcion=rango&Mfn=\" . $arrHttp[\"Mfn\"].\"&to=\".$arrHttp[\"to\"];\r\n }else{\r\n\t\tif (isset($arrHttp[\"Expresion\"]) and trim($arrHttp[\"Expresion\"])!=\"\"){\r\n\t\t\t$query.=\"&Opcion=buscar&Expresion=\";\r\n\t\t \t$query.= urlencode($arrHttp[\"Expresion\"]);\r\n\t\t}else if (isset($arrHttp[\"seleccionados\"])){\r\n\t\t\t$query.=\"&Opcion=seleccionados&Seleccionados=\";\r\n\t\t\t$query.=\"&Mfn=\".str_replace(\",\",\"&Mfn=\",$arrHttp[\"seleccionados\"]);\r\n }\r\n }\r\n // Write iso files always direct to disc\r\n if ($arrHttp[\"tipo\"]==\"iso\" and !isset($arrHttp[\"seleccionados\"])) $query.=\"&archivo=\".urlencode($fullpath);\r\n \t$contenido=\"\";\r\n \t$IsisScript=$xWxis.\"export_txt.xis\";\r\n \tinclude(\"../common/wxis_llamar.php\");\r\n if ($err_wxis!=\"\") die; // do no continue if there are severe errors\r\n \tif ($arrHttp[\"Accion\"]==\"P\"){ // Preview\r\n \t\t$salida=\"\";\r\n \t\t$nl=\"<br>\";\r\n \t\tforeach ($contenido as $value) $salida.=$value.$nl;\r\n \t\tif (trim($value)==$separador) $salida.=$nl.$nl;\r\n echo \"$salida\";\r\n \t\tdie;\r\n \t}\r\n \tif ($arrHttp[\"Accion\"]==\"S\" ){ // this for data not directly written to disc\r\n if ($arrHttp[\"tipo\"]==\"iso\") {// iso is only converted from array to string\r\n $salida=\"\";\r\n foreach ($contenido as $value) {\r\n $salida.=$value;\r\n }\r\n return $salida;\r\n } else {//txt requires some formatting (why?)\r\n $salida=\"\";\r\n $nl=PHP_EOL;\r\n foreach ($contenido as $value) {\r\n $salida.=$value.PHP_EOL;\r\n }\r\n if (trim($value)==$separador) $salida.=$nl.$nl;\r\n return $salida;\r\n }\r\n \t}\r\n}", "abstract public function array2Data($arr);", "public function read(): array;", "public function importArray($data);", "function Grabar_Archivo($examen,$nombre,$desc,$extension){\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n $ClsExa = new ClsExamen();\n //$respuesta->alert(\"$curso,$tema,$nombre,$desc,$extension\");\n\t//-- mayusculas\n\t$nombre = trim($nombre);\n\t$desc = trim($desc);\n\t$extension = strtolower($extension);\n\t$desc = str_replace(\";\",\".\",$desc);\n\t//-- decodificacion\n\t$nombre = utf8_encode($nombre);\n\t$desc = utf8_encode($desc);\n //--\n\t$nombre = utf8_decode($nombre);\n\t$desc = utf8_decode($desc);\n\t//--\n if($examen != \"\" && $nombre != \"\" && $extension != \"\"){\n\t\t$codigo = $ClsExa->max_examen_archivo_curso($examen);\n $codigo++;\n $sql = $ClsExa->insert_examen_archivo_curso($codigo,$examen,$nombre,$desc,$extension);\n $rs = $ClsExa->exec_sql($sql);\n //$respuesta->alert(\"$sql\");\n if($rs == 1){\n $respuesta->assign(\"Filecodigo\",\"value\",$codigo); ///asigna el codigo de documento\n $respuesta->script('CargaArchivos();'); ///submit al archivo de carga de documento (upload)\n }else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error en la transacci\\u00F3n\", \"error\").then((value)=>{ cerrar(); });');\n\t\t}\t\n\t\t\t\n\t}\n return $respuesta;\n}", "public function validateTableDataToFile($postArray,$editId) \n{\n\nreturn array();\n\n}", "function load_input_file_into_php_array() {\n#This shows the file the directory of the data info\n$file_string = file_get_contents(\"data/input.json\");\n#Adding true will ensure objects are changed to associative arrays\n$file_array = json_decode($file_string, true);\n #Prints out a message to the command line when function is excecuted\nprint \"Loading...\\n\";\n#Returning the variable will prevent a value of \"null\" showing up\n return $file_array;\n}", "function example($string, array $array = array())\n {\n return $array;\n }", "public function getData() : array;", "public function getData() : array;", "function getArray();", "function sGetJsCodeArrayDistributori($rsArgDistributori) {\n\t$sOutput = 'aDistributori = new Array();'; \n\t$i=0;\n\tforeach ($rsArgDistributori as $aDistributore) {\n\t\textract($aDistributore);\n\t\t$sOutput .= \"aDistributori[$i] = new Array($dst_id, $dst_lat, $dst_lng, '\" . \n\t\t'<h3>' . sGetJsString(sH(sGetIndirizzoCompleto($aDistributore))) . '</h3>' . \n\t\t'<div>' . sGetJsString(sGetDistrHtmlDescription($aDistributore)) . '</div>' .\n\t\t\"', '\".sGetJsString(sH(sGetIndirizzoCompleto($aDistributore))).\"');\\n\";\n\t\t$i++;\n\t}\n\treturn $sOutput;\n}", "final public function getData(): string {}", "public function load() : array;", "function crearPedido($tipoPizza,$tamanoPizza,$masaPizza,$extrasPizza,$numeroPizzas,$precioPedido){\r\n $extras = '';\r\n foreach ($extrasPizza as $key => $value) {\r\n $extras .= $value.' <br>';\r\n }\r\n //creamos el pedido, extras es un array\r\n $pedido = array(\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>El tipo de pizza es </td><td class='.\"pedidoTD\".'>' =>\r\n $tipoPizza.'</td></tr>',\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>El tamaño de pizza es </td><td class='.\"pedidoTD\".'>' =>\r\n $tamanoPizza.'</td></tr>',\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>La masa de la pizza es </td><td class='.\"pedidoTD\".'>' =>\r\n $masaPizza.'</td></tr>',\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>Extras </td><td class='.\"pedidoTD\".'>' =>\r\n $extras.'</td></tr>',\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>El número de pizzas de este tipo pedidos </td><td class='.\"pedidoTD\".'>' =>\r\n $numeroPizzas.'</td></tr>',\r\n '<tr class='.'precioTr'.'><td class='.\"precioTituloTD\".'>El precio de este pedido es </td><td class='.\"pedidoTD\".'>' =>\r\n $precioPedido.' euros</td></tr>'\r\n );\r\n return $pedido;\r\n}", "function aggiungiAllegato($pratica,$documento){\n \n}", "function JSON_Get_ModulosxPerfil($perfil)\n{\n\t$perfiles = consultar(\"SELECT * FROM tr_modulosxperfiles WHERE id_perfiles=$perfil \");\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($perfiles)) {\n\t\t$id_perfiles = $valor['id_perfiles'];\n\t\t$id_modulos = $valor['id_modulos'];\n\t\t$vector = $id_modulos;\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn json_encode($datos,JSON_HEX_TAG);\t\n}", "function formatear_mes($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $mes.\"/\".$anno;\n\t\t\n\t\treturn $temp;\n\t}", "public function getCamposExportables($etapa){\n\n log_message(\"INFO\", \"getListaExportables\", FALSE);\n if( !is_object($etapa) ){\n throw new ApiException('Se esperaba una instancia del \"Objeto\" de \"Etapa\"');\n }\n $campos = null;\n foreach($etapa->Tarea->Pasos as $paso){\n foreach($paso->Formulario->Campos as $campo){\n if($campo->exponer_campo){\n $campos[] = $campo;\n }\n }\n }\n $return=array();\n if(isset($campos)){\n foreach ($campos as $campo) {\n\n $key= $campo->nombre;//$value['nombre'];\n\n log_message(\"INFO\", \"Nombre variable a retornar: \".$key, FALSE);\n log_message(\"INFO\", \"Tipo variable a retornar: \".$campo->tipo, FALSE);\n if($campo->tipo == 'file'){\n //FIX valor\n $filename = 'uploads/datos/'.str_replace('\"','',$campo->nombre);\n $data = file_get_contents($filename);\n if(isset($data) && $data != '' && $campo->isCurrentlyVisible($etapa->id)){\n $return[$key]=base64_encode($data);\n }\n }else if($campo->tipo == 'documento'){\n $documento = Doctrine::getTable('Documento')->findOneByIdAndProcesoId($campo->documento_id,$etapa->Tarea->proceso_id);\n //Revisar si variables del documento han sido reemplazadas\n $contenido = $documento->contenido;\n\n $docCompleto = $this->esDocumentoCompleto($etapa->id, $contenido);\n\n if($docCompleto && $campo->isCurrentlyVisible($etapa->id)){\n $file = $documento->generar($etapa->id);\n $data = file_get_contents('uploads/documentos/'.$file->filename);\n if(isset($data) && $data != '') {\n $return[$key] = base64_encode($data);\n }\n }\n }else{\n log_message(\"INFO\", \"Obteniendo valor para etapa: \".$etapa->id, FALSE);\n $valor_campo = $campo->displayDatoSeguimiento($etapa->id);\n if(isset($valor_campo) && $valor_campo != '') {\n $return[$key] = str_replace('\"', '', $valor_campo);\n }\n }\n\n }\n }\n log_message(\"INFO\", \"Variables a retornar: \".$this->varDump($return), FALSE);\n return $return;\n }", "function GetTheDataArray($keys = array())\n{\n $ReturnData = '';\n $key1 = isset($keys[0]) && !empty($keys[0]) ? $keys[0] :null;\n $key2 = isset($keys[1]) && !empty($keys[1]) ? $keys[1] :null;\n $key3 = isset($keys[2]) && !empty($keys[2]) ? $keys[2] :null;\n $key4 = isset($keys[3]) && !empty($keys[3]) ? $keys[3] :null;\n\n if(!is_null($key1) && is_null($key2))\n {\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1];\n } elseif(!is_null($key1) && !is_null($key2) && is_null($key3)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2];\n } elseif(!is_null($key1) && !is_null($key2) && !is_null($key3) && is_null($key4)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2][$key3];\n\n } elseif(!is_null($key1) && !is_null($key2) && !is_null($key3) && !is_null($key4)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2][$key3][$key4];\n } else {\n $ReturnData = '';\n }\n\n\n return $ReturnData;\n\n\n}", "function Array_Get_Perfiles($perfil)\n{\n\tif($perfil=='3')\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles`\");\n\t}\n\telse\n\t{\n\t\t$perfiles = consultar(\"SELECT * FROM `tb_perfiles` WHERE id_perfiles!=3\");\n\t}\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($perfiles)) {\n\t\t$id_perfiles = $valor['id_perfiles'];\n\t\t$nombre = $valor['nombre'];\n\t\t$descripcion = $valor['descripcion'];\n\t\t$nivel = $valor['nivel'];\n\t\t$vector = array(\n\t\t\t'id_perfiles'=>\"$id_perfiles\",\n\t\t\t'nombre' => \"$nombre\",\n\t\t\t'descripcion' => \"$descripcion\",\n\t\t\t'nivel' => \"$nivel\"\n\t\t\t);\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn $datos;\t\n\n}", "function get_data($name)\n {\n }", "function LogArrayToFile($data = NULL){\n if($data == NULL){\n $data = JRequest::get('POST');\n }\n if( !($file = fopen( JPATH_BASE.\"/../log.txt\", \"a+\") )) { // Um diretorio acima da raiz do joomla\n echo 'Erro ao criar arquivo!'; \n } else {\n fwrite($file, date(\"Y-m-d h:i:s\"). \" | \");\n foreach($data AS $item => $value){\n $conteudo = $item . '> '.$value . ' | ';\n if( fwrite($file, $conteudo) === FALSE ){\n echo 'Erro ao escrever dados';\n }\n }\n fwrite($file, \"\\n\");\n } \n}", "function FUNC_RETORNA_DESCRICAO_BAIRRO($pdo, $cod_bairro){\r\n $sql = \"SELECT * FROM Bairro WHERE Cod_Bairro = '$cod_bairro'\";\r\n $query = $pdo->prepare($sql);\r\n//executo o comando sql\r\n $query->execute();\r\n\r\n// Faço uma comparação para saber se a busca trouxe algum resultado\r\n if (($dados = $query->fetch()) == true) {\r\n $achou = 1;\r\n $descricao = $dados['Desc_Bairro'];\r\n } else {\r\n $achou = \"\";\r\n $descricao = \"\" . $sql;\r\n }\r\n\r\n\r\n $var = Array(\r\n \"achou\" => \"$achou\",\r\n \"descricao\" => \"$descricao\"\r\n );\r\n \r\n return $var;\r\n}", "function leer_archivo($archivo)\n{\n $fp = fopen($archivo,\"r\"); \n $contador = fgets($fp, 26); \n fclose($fp);\n return ($contador) ;\n\n}", "public static function encodeToFile($path, $array);", "function formataData($data,$tipo) {\n\n if($tipo == 'b'){\n return implode('-',array_reverse(explode('/',$data)));\n } else {\n return implode('/',array_reverse(explode('-',$data)));\n }\n}", "function load_from_source($quiz_filename, $quiz_sheet = \"\") {\n\n if (!file_exists($quiz_filename)) {\n die(\"Source file -$quiz_filename- not found\");\n }\n\n $ext = pathinfo($quiz_filename, PATHINFO_EXTENSION);\n if (strtoupper($ext) == \"CSV\") {\n// is a \n $data_quiz_src = $this->csv_to_array($quiz_filename);\n } elseif (strtoupper($ext) == \"ODS\") {\n\n $data_quiz_src = ods_to_array($quiz_filename, $quiz_sheet);\n } elseif (strtoupper($ext) == \"SQLITE\") {\n $quiz_name = isset($file_data[1]) ? $file_data[1] : \"\";\n // $data_quiz_src = sqlite_to_array($quiz_filename, $quiz_name);\n } else {\n die(\"$quiz_name: Unkown format\");\n }\n\n return $data_quiz_src;\n}", "public function getFileProcObj() {}", "public function getFileProcObj() {}", "function GetArrNameByArrayCod($Table, $cod, $lang_id = _LANG_ID, $my_ret_val = NULL)\n {\n $this->Msg = new ShowMsg();\n $rezult = array();\n if ( empty($cod) ) {\n if (!empty($my_ret_val)) return '';\n else $rezult;\n }\n $str=implode(',',$cod);\n $tmp_db = DBs::getInstance();\n $q=\"SELECT * FROM `\".$Table.\"` WHERE `cod` in (\".$str.\") AND `lang_id`='\".$lang_id.\"'\";\n $res = $tmp_db->db_Query($q);\n //echo '<br> $q='.$q.' $tmp_db->result='.$tmp_db->result;\n if ( !$res OR !$tmp_db->result ) return false;\n $row_num = $tmp_db->db_GetNumRows();\n for ($i=0;$i<$row_num;$i++)\n {\n $row_res = $tmp_db->db_FetchAssoc();\n //echo '<br> $row_res[name]='.$row_res['name'];\n $field_type = mysql_field_type($tmp_db->result,3);\n //echo '<br>$field_type='.$field_type;\n //echo '<br> $my_ret_val='.$my_ret_val;\n $retval = stripslashes( $row_res['name'] );\n\n if ( empty($retval) ){\n if ( $field_type!='blob' ){\n if ( !empty($my_ret_val)) $retval = '';\n else $retval = $this->Msg->show_text('_VALUE_NOT_SET');\n }\n }\n //echo '<br>$this->make_encoding='.$this->make_encoding;\n if( $this->make_encoding==1 AND !empty($this->encoding_from) AND !empty($this->encoding_to) ) {\n $retval = iconv($this->encoding_to, $this->encoding_from, $retval);\n }\n $rezult[$row_res['cod']]=$retval;\n }\n return $rezult;\n }", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "function array_to_file($ARRAY, $FILE) {\n\n ## Globals\n global $DELIMITER;\n \n\t\t// if file does not exist, create the file.\n\t\tif ( ! file_exists($FILE))\n\t\t{\n\t\t//$fp = fopen($FILE, 'w') or die('Cannot open file: '.$FILE); //create file\n\t\t$fp = fopen($FILE, 'w') or die('Cannot open file: '.$FILE); //create file\n\t\tfclose($fp);\n\t\t}\n\t\t\n ## Checks\n if (is_array($ARRAY)) { \n if (file_exists($FILE)) { \n \n ## Create File Pointer \n if ($fp = fopen($FILE, 'a')) {\n \n ## Write To File\n $count = 0;\n foreach ($ARRAY as $a) { \n $keys = ''; $line = ''; \n foreach ($a as $key => $value ) {\n ## [KEYS] Array -> String\n if ($count == 0) {\n $keys .= \"$key$DELIMITER\";\n }\n ## [VALUES] Array -> String\n $line .= \"$value$DELIMITER\";\n }\n \n ## Append new line chars\n $line .= \"\\n\"; $keys .= \"\\n\";\n \n ## Write To File\n if ($count == 0) { \n fwrite($fp, $keys); \n $count ++;\n }\n fwrite($fp, $line); \n } \n \n ## Close File && End Safely\n fclose($fp); \n return TRUE; \n \n }\n }\n } \n }", "function teste($teste, $nome_do_teste){\n\n echo \"\n \n =========================<br>\n $nome_do_teste<br>\n =========================<br>\n \".print_r($teste).\"\n\n <br><br>\n \n \";\n\n }", "function getNomeArquivo($iInstit, $sDataini, $sDatafim, $sRemessa) {\n\n $sNomeArquivo = \"\";\n $sSqlInstit = \"select cgc,db21_tipoinstit from db_config where codigo = {$iInstit} \";\n $rsInstit = pg_query($sSqlInstit);\n $iNumRows = pg_num_rows($rsInstit);\n if ($iNumRows == 0) {\n return false;\n }\n $oInstit = db_utils::fieldsMemory($rsInstit, 0);\n switch ( $oInstit->db21_tipoinstit) {\n case '1' :\n $sTipoGoverno = 'P';\n break;\n case '2' :\n $sTipoGoverno = 'C';\n break;\n case '6' :\n $sTipoGoverno = 'A';\n break;\n case '7' :\n $sTipoGoverno = 'A';\n break;\n case '8' :\n $sTipoGoverno = 'F';\n break;\n case '9' :\n $sTipoGoverno = 'E';\n break;\n case '10' :\n $sTipoGoverno = 'E';\n break;\n case '11' :\n $sTipoGoverno = 'E';\n break;\n case '12' :\n $sTipoGoverno = 'E';\n break;\n default :\n $sTipoGoverno = 'O';\n \n }\n \n $cnpj = $oInstit->cgc;\n $sDataInicial = implode(\"\", array_reverse(explode(\"-\", $sDataini)));\n $sDataFinal = implode(\"\", array_reverse(explode(\"-\", $sDatafim)));\n $sDataGeracao = date('dmY', db_getsession('DB_datausu'));\n $iCodigoRemssa = str_pad($sRemessa, 12, STR_PAD_RIGHT);\n $sNomeArquivo = \"{$cnpj}.{$sDataInicial}.{$sDataFinal}.{$sDataGeracao}.{$sTipoGoverno}.{$iCodigoRemssa}\";\n \n return $sNomeArquivo;\n\n}", "public function armaArrayINAvanzado($array) {\n //Array ( [0] => Array ( [0] => pepe [1] => 1 ) [1] => Array ( [0] => opcPrecioVenta [1] => 150000 AND 200000 ) )\n $retorno = '';\n $propin = '0';\n if (sizeof($array) > 0) {\n $datosDB = new DatospropPGDAO();\n foreach ($array as $opcion) {\n if ($propin != '') {\n switch ($opcion[0]) {\n case 'opcAmbientes':\n $id_carac = 208;\n break;\n //\t\t\t\t\t\tcase 'opcDespachos':\n //\t\t\t\t\t\t\t$id_carac=208;\n //\t\t\t\t\t\t\tbreak;\n case 'opcMonedaVenta':\n $id_carac = 165;\n break;\n case 'opcPrecioVenta':\n $id_carac = 161;\n break;\n case 'opcMonedaAlquiler':\n $id_carac = 166;\n break;\n case 'opcPrecioAlquiler':\n $id_carac = 164;\n break;\n case 'opcSupTotal':\n $id_carac = 198;\n break;\n case 'opcOrientacion':\n $id_carac = 43;\n break;\n default:\n $id_carac = 0;\n break;\n }\n if ($id_carac != 0) {\n $resultprop = $this->leeDBArray($datosDB->coleccionPropiedadCaracAvanzada($id_carac, $opcion[1], $propin));\n $propin = $this->armaStringId($resultprop);\n }\n }\n }\n if ($propin != '') {\n $retorno = $propin;\n } else {\n $retorno = -1;\n }\n }\n return $retorno;\n }", "function get_filename($get_exa_id){\n $class_bd =new bd();\n $class_utiles= new utiles();\n $sql = \"SELECT * FROM Exam INNER JOIN TypeExam ON Exam.tye_id=TypeExam.tye_id WHERE exa_id='{$get_exa_id}'\";\n $resultado=$class_bd->ejecutar($sql);\n $r=$class_bd->retornar_fila($resultado);\n $string.=$r[\"tye_name\"].\"-\";\n $string.=$class_utiles->fecha_mysql_php_export($r[\"exa_date\"]);\n return ($string);\n}", "function getFileData( $name ) {\r\n\treturn addslashes( @fread( fopen( $_FILES[$name][tmp_name], \"rb\" ), @filesize( $_FILES[$name][tmp_name] ) ) );\r\n}", "function insertarArticulo( $arrayArticulo , $arrayFiles , $ruta_subida ){\n \n $titulo = addslashes ( $arrayArticulo['titulo'] );\n $subtitulo = addslashes ($arrayArticulo['subtitulo'] );\n $contenido = addslashes ($arrayArticulo['contenido'] );\n $autor_id = $arrayArticulo['autor_id'];\n $genero_id = $arrayArticulo['genero_id'];\n $activo = 1;\n\n //manejo de la imagen\n $imagen_1 = $arrayFiles['imagen']['name'];\n if( !move_uploaded_file($arrayFiles['imagen']['tmp_name'], $ruta_subida . $imagen_1) ){\n $imagen_1 = \"NULL\"; \n }\n\n $sql = \"INSERT INTO articulo \n ( `titulo`, `contenido`, `imagen_1`, `autor_id`,`subtitulo`, `genero_id`, `activo` )\n VALUES \n ( '$titulo' , '$contenido' , '$imagen_1' , '$autor_id' , '$subtitulo' , '$genero_id' , $activo)\"; \n \n if( $id = ejecutarConsulta($sql) ){ \n return getArticulo( $id );\n }else{\n return false;\n }\n \n \n\n }", "function despedida($adios){\n echo $adios.\"<br>\";// con el punto se concatena una cadena de texto con una variable\n}", "function params(array $data);", "function analiza_archivo_presupuesto_rf_lib($file)\n{\n $cliente=new cliente();\n if (!file_exists($file)){\n exit(\"File not found\");\n }\n $htmlContent=file_get_contents($file);\n $DOM=new DOMDocument();\n //echo $htmlContent;\n @$DOM->loadHTML($htmlContent);\n $Header = $DOM->getElementsByTagName('td');\n $Detail = $DOM->getElementsByTagName('td');\n foreach($Header as $NodeHeader)\n {\n $aDataTableHeaderHTML[]=trim($NodeHeader->textContent);\n //echo $aDataTableHeaderHTML;\n }\n print_r($aDataTableHeaderHTML);\n \n \n $fecha_presupuesto=substr($aDataTableHeaderHTML[5],23,10);\n $nombre_cliente=$aDataTableHeaderHTML[8];\n $dirección_cliente=$aDataTableHeaderHTML[10];\n $rpu=$aDataTableHeaderHTML[12];\n $telefono=$aDataTableHeaderHTML[14];\n $presupuesto=$aDataTableHeaderHTML[16];\n $marca_instalar=$aDataTableHeaderHTML[26];\n $modelo_instalar=$aDataTableHeaderHTML[27];\n $capacidad_instalar=$aDataTableHeaderHTML[28];\n $monto_financiar=$aDataTableHeaderHTML[29];\n $marca_retirar=$aDataTableHeaderHTML[37];\n $capacidad_retirar=$aDataTableHeaderHTML[38];\n $modelo_retirar=$aDataTableHeaderHTML[39];\n $antiguedad=$aDataTableHeaderHTML[40];\n $solicitud=$aDataTableHeaderHTML[42];\n $precio_sin_iva=$aDataTableHeaderHTML[46];\n $iva=ltrim($aDataTableHeaderHTML[49]);\n $bonificacion=$aDataTableHeaderHTML[61];\n $monto_financiar2=$aDataTableHeaderHTML[64];\n $excedente=$aDataTableHeaderHTML[58];\n $interes=$aDataTableHeaderHTML[67];\n $iva_interes=$aDataTableHeaderHTML[70];\n $financiado=$aDataTableHeaderHTML[73];\n $amortizacion=$aDataTableHeaderHTML[76];\n $num_pagos=substr($aDataTableHeaderHTML[74],0,2);\n $fecha_presupuesto=obtiene_fecha($fecha_presupuesto);\n $precio_sin_iva=substr($precio_sin_iva,1,9);\n $iva=substr($iva,17,8);\n $monto_financiar=substr($monto_financiar2,16,10);\n $excedente=substr($excedente,16,7);\n $interes=substr($interes,17,8);\n $iva_interes=substr($iva_interes,16,7);\n $financiado=substr($financiado,17,9);\n $amortizacion=substr($amortizacion,17,6);\n //echo $fecha_presupuesto.\"\\n\";\n //echo $nombre_cliente.\"\\n\";\n //echo $rpu.\"\\n\";\n //echo $presupuesto.\"\\n\";\n //echo $telefono.\"\\n\";\n //echo $marca_instalar.\"\\n\";\n //echo $modelo_instalar.\"\\n\";\n //echo $capacidad_instalar.\"\\n\";\n //echo $marca_retirar.\"\\n\";\n //echo $modelo_retirar.\"\\n\";\n //echo $capacidad_retirar.\"\\n\";\n //echo $solicitud.\"\\n\";\n //echo $precio_sin_iva.\"\\n\";\n //echo $iva.\"\\n\";\n //echo $monto_financiar.\"\\n\";\n //echo $excedente.\"\\n\";\n //echo $interes.\"\\n\";\n //echo $iva_interes.\"\\n\"; //23\n //echo $financiado.\"\\n\"; //26\n //echo $amortizacion.\"\\n\"; //23\n //echo $num_pagos.\"\\n\";\n $sp=\"RF\";\n $activo=1;\n $sql=\"INSERT INTO\n presupuestos (fecha,nombre,rpu,num_presupuesto,telefono,marca_ins,modelo_ins,capacidad_ins,\n marca_ret,modelo_ret,capacidad_ret,solicitud,instalacion,precio_sin_iva,iva_equipo,monto_financiar,\n excedente,interes,iva_interes,total_financiamiento,amortizacion,pagos,subprograma,activo)\n VALUES (\n '$fecha_presupuesto', '$nombre_cliente','$rpu','$presupuesto','$telefono','$marca_instalar',\n '$modelo_instalar','$capacidad_instalar','$marca_retirar','$modelo_retirar','$capacidad_retirar',\n '$solicitud','0','$precio_sin_iva','$iva','$monto_financiar','$excedente','$interes',\n '$iva_interes','$financiado','$amortizacion','$num_pagos','$sp','$activo'\n )\";\n $resp=$cliente->insertar($sql);\n if($resp)\n {\n echo \"Se guardo correctamente\";\n }\n else{\n echo \"No se pudo guardar\";\n }\necho $sql;\n\n\n\n\n}", "function e(array $a = [1, 2, 3, 4], $b = \"hi\") {}", "protected function processArrayArgument($val, $option) {\n\t\tif ('@' == $val[0]) {\n\t\t\t$val = file(substr($val, 1), FILE_IGNORE_NEW_LINES);\n\t\t}\n\n\t\tif (is_string($val)) {\n\t\t\t$val = [ $val ];\n\t\t}\n\n\t\treturn $val;\n\t}" ]
[ "0.60956895", "0.5862017", "0.5849489", "0.5704998", "0.567625", "0.5525777", "0.5523403", "0.547683", "0.54739606", "0.5453325", "0.5448067", "0.5427438", "0.53477925", "0.5330651", "0.5317426", "0.5317426", "0.5317426", "0.5316768", "0.5316578", "0.52904195", "0.52730924", "0.5250507", "0.5238502", "0.52379376", "0.5236041", "0.52359796", "0.52326035", "0.5212744", "0.5211714", "0.5211714", "0.5211714", "0.5211714", "0.5206827", "0.5195242", "0.51813287", "0.5174939", "0.5174501", "0.5133782", "0.5126581", "0.51207316", "0.51126885", "0.5102473", "0.5100118", "0.5092555", "0.5088766", "0.50802064", "0.5078283", "0.5073427", "0.5071544", "0.506385", "0.50587505", "0.5054972", "0.5046076", "0.50386375", "0.5033472", "0.5026112", "0.50218743", "0.50196224", "0.5016901", "0.5009421", "0.500833", "0.49967206", "0.49936312", "0.4973147", "0.49624127", "0.49624127", "0.49583173", "0.49579164", "0.49558127", "0.49540436", "0.49486756", "0.49405456", "0.49323556", "0.49281204", "0.4921995", "0.49127197", "0.49120814", "0.49090308", "0.4908845", "0.49073002", "0.49071005", "0.49033433", "0.48999575", "0.48998386", "0.48997477", "0.48990354", "0.48984796", "0.48978856", "0.48908472", "0.4889344", "0.4888663", "0.48855275", "0.48754162", "0.48733687", "0.48676184", "0.48662442", "0.48641172", "0.4862201", "0.48495317", "0.48488265" ]
0.6409371
0
TODO: Implement wrapMessages() method.
public function wrapMessages(string $messages, string $type): string { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMessages() {}", "public function getMessages() {}", "public function getMessages(){ }", "public function toMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "function tn_prepare_messages() {\n\n\t$_messages = TN_Messages::get_instance();\n\n\t$messages = $_messages->get_messages();\n\n\tif( $messages ) :\n\n\t\tadd_action( 'tn_messages', function() use ( $messages ) { \n\n\t\t\tforeach( $messages as $key => $message ) {\n\t\t\t\t// we add data-message - useful if element is eg cloned to pull it downscreen\n\t\t\t\tif( isset( $message['success'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message success\"><?php echo $message['success']; ?></div>\n\t\t\t\t<?php elseif ( isset( $message['error'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message error\"><?php echo $message['error']; ?></div>\t\n\t\t\t\t<?php endif; \n\t\t\t}\n\n\t\t});\n\n\tendif;\n}", "public function messages();", "public function messages();", "public function messages();", "function getMessages(){\r\n return $this->messages;\r\n }", "protected function defineMessages()\n {\n return [];\n }", "public function getMessageHolder () {\n $messages = $this->getMessages();\n $messages_body = '';\n\n if ($messages) {\n $container_name = 'paddy-messenger with-messages';\n\n foreach ($messages as $namespace => $submessages) {\n foreach ($submessages as $message) {\n $messages_body .= '<li class=\"' . $namespace . '\">' . $message . '</li>';\n }\n }\n } else {\n $container_name = 'paddy-messenger no-messages';\n }\n\n return '<ul class=\"' . $container_name . '\">' . $messages_body . '</ul>';\n }", "public function messages()\n {\n }", "public function get_message_strings() {\n foreach($this->messages as $singleMessage) {\n \n }\n }", "protected abstract function _message();", "protected function renderMessage() {}", "public function getMessages(): Collection;", "public function getMessages(): Collection;", "public function getMessagesAndFlush() {}", "public function getMessages(): array;", "public function getMessages(): array;", "public function getMessages(): array;", "public function getMessages($f) { }", "protected function initializeMessages()\n {\n $this->messages = array(\n \n );\n }", "public function get_messages(){\n return $this->messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function testMessages() {\n $result = new Hostingcheck_Result_Info();\n $this->assertEquals(array(), $result->messages());\n $this->assertFalse($result->hasMessages());\n\n $messages = array(\n new Hostingcheck_Message('Foo message'),\n new Hostingcheck_Message('Bar Message'),\n );\n $result = new Hostingcheck_Result_Info($messages);\n $this->assertEquals($messages, $result->messages());\n\n $this->assertTrue($result->hasMessages());\n }", "abstract public function get_message();", "public function getMessages() {\r\n \t$this->getForm()->getMessages();\r\n }", "function getMessages() {\n\t\t$pre= $this->code;\n\t\tif (defined('CACHE_IDENTIFIER')) {\n\t\t\t$pre= CACHE_IDENTIFIER;\n\t\t}\n\n\t\tif (function_exists('apc_fetch') && (DEBUG < 1)) {\n\t\t\t$temp= apc_fetch($pre.'_lang_'.$this->code);\n\t\t\tif (false != $temp) {\n\t\t\t\t$this->messages= & $temp;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t//TODO eaccellerator? cacheutil?\n\t\t}\n\n\t\t$messages= array ();\n\t\tinclude (ROOT.'controllers'.DS.'lang'.DS.$this->code.'.php');\n\t\t$this->messages= & $messages;\n\n\t\tif (function_exists('apc_store') && (DEBUG < 1)) {\n\t\t\tapc_store($pre.'lang_'.$this->code, $this->messages, 300);\n\t\t} else {\n\t\t\t//TODO eaccellerator? cacheutil?\n\t\t}\n\t}", "public function getMessages(){\n\t\treturn $this->messages;\n\t}", "public function getMessages(){\n\t\treturn $this->messages;\n\t}", "public function getMessages(): array\n {\n }", "public function getMessages () {\n return $this->messages;\n }", "public function get_messages() {\n return $this->messages;\n }", "function messages( $array ) {\n\t\t$this->messages_list = $array;\n\t\t}", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function messages()\n {\n return [\n //\n ];\n }", "public function getMessages()\n {\n return $this->messages;\n }", "public function getMessages()\n {\n return $this->messages;\n }", "public function getMessages()\n {\n return Controllers\\MessagesController::getInstance();\n }", "public function getMessages()\n {\n return Controllers\\MessagesController::getInstance();\n }", "public function getMessages()\n {\n return $this->_msg;\n }", "public function testMessages()\n {\n $message = new PrivateMessage();\n $conversation = new Conversation();\n $this->assertEmpty($conversation->getMessages());\n\n $conversation->addMessage($message);\n $this->assertEquals(new ArrayCollection([$message]), $conversation->getMessages());\n\n $conversation->removeMessage($message);\n $this->assertEmpty($conversation->getMessages());\n }", "public function renderMessages()\n {\n // No messages available\n if(!$this->processor->messages) return;\n\n $messages = '';\n foreach($this->processor->messages as $message) {\n $messages .= $this->genMessage($message['type'], $message['text']);\n }\n return $messages;\n }", "public function getMessageBag();", "public function renderFlashMessages() {}", "public function getMessages(): array\n {\n return $this->messages;\n }", "public function getMessages(): array\n {\n return $this->messages;\n }", "public function getMessages(): array\n {\n return $this->messages;\n }", "public function getMessages(): array\n {\n return $this->messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function getMessages()\n {\n return $this->_messages;\n }", "public function getMessages() {\n return $this->messages;\n }", "protected function renderFlashMessages() {}", "public function initMessage() {}", "function wise_chat_endpoint_messages() {\n\t$wiseChatEndpoints = WiseChatContainer::get('endpoints/WiseChatEndpoints');\n\t$wiseChatEndpoints->messagesEndpoint();\n}", "function getMessagesPrint(){\r\n foreach ($this->messages as $key => $value) {\r\n echo $this->messagePrefixForPrint.$value.\"<br>\\n\";\r\n }\r\n }", "function message(Message $message);", "public function messages()\n {\n return [\n \n ];\n }", "public function testGetMessageFromKeyIncludingCurrent()\n {\n $storage = ['slimFlash' => [ 'Test' => ['Test', 'Test2']]];\n $flash = new Messages($storage);\n $flash->addMessageNow('Test', 'Test3');\n\n $messages = $flash->getMessages();\n\n $this->assertEquals(['Test', 'Test2','Test3'], $flash->getMessage('Test'));\n }", "private function _getAllMessages() {\r\n $_aMessages = array();\r\n foreach ( $this->aMessages as $_sLabel => $_sTranslation ) {\r\n $_aMessages[ $_sLabel ] = $this->get( $_sLabel );\r\n }\r\n return $_aMessages;\r\n }", "protected function buildMessages()\n {\n\n $messageObject = Message::getActive();\n\n $html = '';\n\n // Gibet Fehlermeldungen? Wenn ja dann Raus mit\n if ($errors = $messageObject->getErrors()) {\n\n $html .= '<div id=\"wgt-box_error\" class=\"wgt-box error\">'.NL;\n\n foreach ($errors as $error)\n $html .= $error.'<br />'.NL;\n\n $html .= '</div>';\n\n } else {\n\n $html .= '<div style=\"display:none;\" id=\"wgt-box_error\" class=\"wgt-box error\"></div>'.NL;\n }\n\n\n // Gibet Systemmeldungen? Wenn ja dann Raus mit\n if ($warnings = $messageObject->getWarnings()) {\n\n $html .= '<div id=\"wgt-box_warning\" class=\"wgt-box warning\">'.NL;\n\n foreach ($warnings as $warn)\n $html .= $warn.\"<br />\".NL;\n\n $html .= '</div>';\n } else {\n\n $html .= '<div style=\"display:none;\" id=\"wgt-box_warning\" class=\"wgt-box warning\"></div>'.NL;\n }\n\n // Gibet Systemmeldungen? Wenn ja dann Raus mit\n if ($messages = $messageObject->getMessages()) {\n $html .= '<div id=\"wgt-box_message\" class=\"wgt-box message\" >'.NL;\n\n foreach ($messages as $message)\n $html .= $message.\"<br />\".NL;\n\n $html .= '</div>';\n } else {\n\n $html .= '<div style=\"display:none;\" id=\"wgt-box_message\" class=\"wgt-box message\"></div>'.NL;\n }\n\n // Meldungen zurückgeben\n return $html;\n\n }", "public function testGetMessagesFromPrevRequest()\n {\n $storage = ['slimFlash' => ['Test']];\n $flash = new Messages($storage);\n\n $this->assertEquals(['Test'], $flash->getMessages());\n }", "public function get_messages() {\n\t\t$messages = $this->_read_messages();\n\t\t$this->clear_messages();\n\t\treturn apply_filters( 'tn_get_messages', $messages );\t\n\t}", "public function commonMessages() {\n return [];\n }", "public function getMessage() {}", "public function getMessage() {}", "public function getMessage() {}", "public function getMessages()\n {\n foreach (parent::getMessages() as $message) {\n switch ($message->getType()) {\n case 'PresenceOf':\n $message->setMessage('The field ' . $message->getField() . ' is required');\n break;\n case 'Uniqueness':\n $message->setMessage('The field ' . $message->getField() . ' must be unique');\n break;\n case 'Email':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid email');\n break;\n case 'Url':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid url');\n break;\n case 'InclusionIn':\n $message->setMessage('The field ' . $message->getField() . ' must contain a value in [' . implode(',', $message->getDomain()) . ']');\n break;\n case 'DateValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid date.');\n break;\n case 'TimestampValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid timestamps.');\n break;\n }\n }\n\n return parent::getMessages();\n }", "public function messages(): array\n {\n return [\n //\n ];\n }", "public function getMessages() :array\r\n {\r\n return $this->messages;\r\n }", "public function messages() {\n return [\n ];\n }", "public function messages() {\n return [\n ];\n }", "public function messages()\n {\n return static::staticMessages();\n }", "public function testMessageThreadsV2GetMessages()\n {\n }", "public static function render_messages()\n\t\t{\t$output = '';\n\t\t\tif ( !empty( self::$messages ) )\n\t\t\t{\t$output .= '<div class=\"wpvm_messages\">';\n\t\t\t\t$output .= implode( '', self::$messages );\n\t\t\t\t$output .= '</div>';\n\t\t\t}\n\n\t\t\treturn $output;\n\t\t}", "public function testSetMessagesForCurrentRequest()\n {\n $storage = ['slimFlash' => [ 'error' => ['An error']]];\n\n $flash = new Messages($storage);\n $flash->addMessageNow('error', 'Another error');\n $flash->addMessageNow('success', 'A success');\n $flash->addMessageNow('info', 'An info');\n\n $messages = $flash->getMessages();\n $this->assertEquals(['An error', 'Another error'], $messages['error']);\n $this->assertEquals(['A success'], $messages['success']);\n $this->assertEquals(['An info'], $messages['info']);\n\n $this->assertArrayHasKey('slimFlash', $storage);\n $this->assertEmpty([], $storage['slimFlash']);\n }", "public function messages()\n {\n return [\n ];\n }", "protected function loadMessages()\n {\n $message = $this->event->get('message');\n\n $text = $message['text'];\n\n if ($this->config->get('strip_annotations') === true && isset($message['annotations'])) {\n $start = $message['annotations'][0]['startIndex'];\n $length = $message['annotations'][0]['length'];\n $text = substr($text, $start + $length + 1);\n }\n\n $this->messages = [new IncomingMessage($text, $message['sender']['name'], $message['name'], $this->event->toArray())];\n }", "public function MyMessages(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/myMessage';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Messages',\n\t\t\t'londontec' => $this->setting_model->Get_All('londontec_users'),\n\t\t\t'student' => $this->setting_model->Get_All('students'),\n\t\t\t'message' => $this->setting_model->Get_All_DESCENDING('message','message_id'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function cis_login_get_messages() {\n\n\tglobal $cis_login_message;\n\t$html = \"<div id=\\\"message-1\\\" class=\\\"updated\\\"><ul>\\n\";\n\n\tif (!count($cis_login_message))\n\t\treturn false;\n\tforeach ($cis_login_message as $msg)\n\t\t$html .= \"<li>{$msg}</li>\\n\";\n\n\twp_enqueue_style('colors');\n\treturn $html .= \"</ul>\\n</div>\\n\";\n}", "public function messages()\n {\n $pieces = explode('\\\\', __CLASS__);\n $pack = mb_strtolower($pieces[1]);\n // dddx($pieces);\n $pieces = \\array_slice($pieces, 3);\n $pieces = collect($pieces)->map(\n function ($item) {\n return snake_case($item);\n }\n )->all();\n $trad_name = $pack.'::'.implode('.', $pieces);\n $trad = trans($trad_name);\n if (! \\is_array($trad)) {\n // dddx($trad_name.' is not an array');\n $trad = [];\n }\n $tradGeneric = trans('ui::generic'); // deve funzionare anche senza il pacchetto \"food\", invece \"extend\" e' un pacchetto primario\n if (! \\is_array($tradGeneric)) {\n $tradGeneric = [];\n }\n $trad = array_merge($tradGeneric, $trad);\n\n return $trad;\n }", "public function messageProvider()\n {\n return [[\"a string\"]];\n }", "protected function addFlashMessages() {}" ]
[ "0.72713464", "0.72713464", "0.714196", "0.71093196", "0.7061492", "0.7061492", "0.7061492", "0.7061492", "0.7061492", "0.7061492", "0.7061492", "0.70536304", "0.67928547", "0.67928547", "0.67928547", "0.66566473", "0.66309863", "0.6595975", "0.6492883", "0.6445229", "0.6401888", "0.6376965", "0.63720775", "0.63720775", "0.6343171", "0.6342649", "0.6342649", "0.6342649", "0.62879395", "0.625479", "0.62483054", "0.6213081", "0.61738425", "0.6166354", "0.6162389", "0.6139254", "0.61392045", "0.61392045", "0.6116011", "0.6106493", "0.6099615", "0.60872996", "0.6078535", "0.6078535", "0.6078535", "0.6078535", "0.6078535", "0.6078535", "0.6078535", "0.6078535", "0.604198", "0.604198", "0.6041119", "0.6041119", "0.6029576", "0.6015109", "0.60113174", "0.6011053", "0.59967995", "0.5989788", "0.5989788", "0.5989788", "0.5989788", "0.59884065", "0.59884065", "0.59884065", "0.59884065", "0.59884065", "0.59845626", "0.59793633", "0.597251", "0.59648", "0.59589624", "0.5958412", "0.59584045", "0.5956926", "0.59545475", "0.5944816", "0.5943618", "0.59317905", "0.59224564", "0.5918935", "0.5918935", "0.5918935", "0.5918021", "0.5905866", "0.5887902", "0.5883725", "0.5883725", "0.58836216", "0.58803403", "0.58730084", "0.5868125", "0.58663684", "0.5862841", "0.5862249", "0.585991", "0.5853473", "0.5835971", "0.583299" ]
0.5917994
85
Total values of items in this order (without any tax)
public function getSubTotal() { $total = 0; // Calculate total from items in the list foreach($this->Items() as $item) { $total += $item->getSubTotal(); } return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function itemTotal(): float;", "public function getTotal() \n {\n $tax = $this->getTax(); \n return $this->_subtotal + $tax; \n }", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function total()\n {\n // $this->line_items\n $total_price = 0;\n foreach ($this->line_items as $key => $value) {\n $total_price = $total_price + $value->product->price_amount;\n }\n // dd();\n return $total_price;\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "public function sumItems(): float\n\t{\n\t\treturn $this->storage->sum();\n\t}", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function total(): float\n {\n return $this->itemsPrice()->sum(fn (array $item) => $item['price']);\n }", "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "public function getTotalAttribute() {\n return $this->cartItems->map(function ($item, $key) {\n return $item->subtotal;\n })->sum();\n }", "public function getTotalItems()\n {\n $total = 0;\n \n foreach ($this->items as $item) {\n $total += ($item->Quantity) ? $item->Quantity : 1;\n }\n\n return $total;\n }", "public function getTotal()\n {\n $cart = $this->getContent();\n\n $sum = array_reduce($cart->all(), function ($a, ItemCollection $item) {\n return $a += $item->getPrice(false);\n }, 0);\n\n return Helpers::formatValue(floatval($sum), $this->config['format_numbers'], $this->config);\n }", "public function getTotal(){\n\t\t$total = parent::getTotal();\n\t\t$total->setValue(Mage::helper('utils/discount')->getDiscountData($this->getQuote())->getDiscountInclTax());\n\t\treturn $total;\n\t}", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function getTotalPrice()\n\t{\n\t\t$total = 0.0;\n\n\t\tforeach ($this->items as $item)\n\t\t{\n $total += $item->getPrice() + $item->getExtrasPrice();\n }\n\n\t\treturn $total;\n\t}", "public function getTotal()\n {\n return ($this->amount + $this->tax_amount)* $this->currency_converter;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function total()\n {\n $total = 0;\n\n foreach ($this->contents() as $item) $total += (float)$item->total();\n\n return (float)$total;\n }", "public function totalWithDependentItems()\n {\n $depItemTotal = $this->dependentItems()->sum('total');\n return $this->total + $this->dependentItems()->sum('total');\n\n }", "public function total()\n {\n $total = 0;\n foreach($this->_data as &$product) {\n $total += ($product['price'] * $product['quantity']);\n }\n\n return $total;\n }", "public function total_items()\n {\n $total_items = 0;\n $items = $this->_session->offsetGet('products');\n if ($this->_isCartArray($items) === TRUE)\n {\n foreach ($items as $key)\n {\n $total_items =+ ($total_items + $key['qty']);\n }\n return $total_items;\n }\n }", "public function TotalItems()\n {\n return $this->getTotalItems();\n }", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "public function total()\n {\n return $this->subtotal() + $this->shipping() + $this->vat()->sum();\n }", "public function calculateTotalPrice($items){\n $total = 0;\n foreach($items as $item){\n $total += $item['subtotal'];\n }\n return $total;\n }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }", "public function getTotalValue()\n {\n $totalValue = 0.0;\n $cartItems = $this->cart->getCartItems();\n\n foreach ($cartItems as $cartItem) {\n $totalValue += $cartItem['price'] * $cartItem['quantity'];\n }\n\n return $totalValue;\n }", "public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}", "public function total_items()\n\t{\n\t\treturn array_get($this->cart_contents, $this->cart_name . '.total_items', 0);\n\t}", "private function get_total_tax() {\n\n\t\t$taxes = $this->order->getCombinedTax();\n\n\t\t$tax = 0;\n\n\t\tif ( empty( $taxes ) ) {\n\t\t\treturn $tax;\n\t\t}\n\n\t\tforeach( $taxes as $name => $amount ) {\n\t\t\t$tax += $amount;\n\t\t}\n\n\t\treturn $tax;\n\t}", "public function total(): float\n {\n $price = $this->price;\n\n /* if ($this->hasOptions()) {\n foreach ($this->data['options'] as $item) {\n if (array_key_exists('price', $item)) {\n $price += $item['price'];\n }\n }\n }\n\n if ($includeTax) {\n $price = $this->tax->add($price);\n }*/\n\n return (float)($price * $this->quantity);\n }", "public function subtotal()\n {\n $subTotal = 0;\n foreach($this->items as $item) {\n $subTotal += $item->get(Cart\\Item::KEY_AMOUNT);\n }\n return $subTotal;\n }", "public function getValorTotal(){\n $sum = 0;\n foreach($this->itens as $i):\n $sum += $i->getPreco() * $i->getQuantidade();\n endforeach;\n\n return $sum;\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function total()\n {\n if ($this->_isCartArray($this->cart()) === TRUE)\n {\n $price = 0;\n $vat = 0;\n foreach ($this->cart() as $key)\n {\n $item_price = ($key['price'] * $key['qty']);\n $item_vat = (($item_price/100)*$key['vat']);\n // $price =+ ($price + ($key['price'] * $key['qty']));\n $price += $item_price;\n $vat += $item_vat;\n }\n\n // $params = $this->_config['vat'];\n // $vat = $this->_formatNumber((($price / 100) * $params));\n\n return array(\n 'sub-total' => $this->_formatNumber($price),\n 'vat' \t\t=> $this->_formatNumber($vat),\n 'total' \t=> $this->_formatNumber($price + $vat)\n );\n }\n }", "public function total()\n {\n return $this->calculateTotal();\n }", "function getTotalItems() { return $this->m_totalItems; }", "public function originalTotal(): float\n {\n return $this->content()->sum(fn (CartItem $item) => $item->originalTotal());\n }", "public function total();", "public function total();", "public function total();", "public function getTotalPrice() {\n return $this->getQuantity()*$this->getPrice();\n }", "public function getTaxTotal() {\n $total = 0;\n\n // Calculate total from items in the list\n foreach($this->Items() as $item) {\n $total += $item->getTaxTotal();\n }\n\n // Add any tax from postage\n $total += $this->PostageTax;\n\n return $total;\n }", "public function initTotal()\n {\n // Return val.\n $temp = 0;\n // Add cone price.\n $temp += $this->coneType['price'];\n // Add all scoops of ice cream.\n foreach ($this->scoops as $scoop) {\n $temp += $scoop['price'];\n }\n // Return total item cost.\n return $temp;\n }", "public function getTotal(): float\n {\n $total = 0;\n foreach ($this->itemsVolume as $code => $volume) {\n $total += $this->store->calculatePrice($code, $volume);\n }\n return $total;\n }", "public function getTotalTaxAmount();", "protected function _getTotal()\n {\n return $this->formatPriceWithComma($this->_getOrder()->getGrandTotal());\n }", "public function __subTotal($items) {\n\n $price = 0.0;\n\n foreach ($items as $item) {\n\n// if ($item['currency_id'] == 2)\n// $currency = 1;\n//\n// if ($item['currency_id'] == 1)\n// $currency = 4.17;\n//\n// if ($item['currency_id'] == 3)\n// $currency = 4.50;\n\n //$price += $this->__lineItemTotal($item['qty'], $item['price'], $item['taxRate'], $item['currency_id']);\n //$price += $item['qty'] * $item['price'] * $currency;\n $price += $item['qty'] * $item['price'] * $item['rate'];\n }\n\n return $price;\n }", "public function getTotalQtyOrdered();", "public function total(){\n\t\treturn $this->total;\n\t}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotalAmount();", "public function total()\n\t{\n\t\treturn array_get($this->cart_contents, $this->cart_name . '.cart_total', 0);\n\t}", "public function get_total()\n\t{\n\t\treturn $this->EE->cartthrob->cart->total();\n\t}", "public function total(): float;", "public function total(): float;", "function getTotalWeight()\n { $total = 0 ;\n if (count($this->items) > 0) \n { \n for ($p=0; $p<count($this->items); $p++) \n {\n $total = $total + $this->items[$p];\n }\n }\n return $total;\n }", "public function total()\n\t{\n\t\treturn $this->total;\n\t}", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function getBaseTotalQtyOrdered();", "public static function getQtdTotalIngressos()\n {\n $conteudo = self::getConteudo();\n return $conteudo->sum('quantidade');\n }", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "public function getTotal()\n {\n return $this->totalCalculator->getCartTotal($this->cart);\n }", "public function get_total()\n {\n }", "protected function getTotItems()\n {\n if ($this->exportableHandler !== null) {\n return $this->exportableHandler->getTotItems();\n } else {\n return 0;\n }\n }", "public function getTotal()\n\t{\n\t\treturn $this->getKeyValue('total'); \n\n\t}", "public function getTotalAmount()\n {\n return $this->subtotal() + $this->shippingCost() + $this->tax() - $this->discounts();\n }", "private function setTotalAmounts()\n {\n $taxable\t= 0.00;\n $expenses = 0.00;\n $outlays\t= 0.00;\n\n foreach ($this->invoiceDetails as $invoiceDetail) {\n $amount = $invoiceDetail->getAmount();\n switch ($invoiceDetail->getType())\n {\n case 'incoming':\n $taxable += $amount;\n break;\n case 'expense':\n $taxable += $amount;\n $expenses += $amount;\n break;\n case 'outlay':\n $outlays += $amount;\n break;\n }\n }\n\n $this->setTotalTaxable($taxable);\n $this->setTotalExpenses($expenses);\n $this->setTotalOutlays($outlays);\n }", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}", "public function getTotal()\n {\n $subTotal = $this->getSubTotal(false);\n\n $newTotal = 0.00;\n\n $process = 0;\n\n $conditions = $this\n ->getConditions()\n ->filter(function (CartCondition $cond) {\n return $cond->getTarget() === 'total';\n });\n\n // if no conditions were added, just return the sub total\n if (!$conditions->count()) {\n return Helpers::formatValue($subTotal, $this->config['format_numbers'], $this->config);\n }\n\n $conditions\n ->each(function (CartCondition $cond) use ($subTotal, &$newTotal, &$process) {\n $toBeCalculated = ($process > 0) ? $newTotal : $subTotal;\n\n $newTotal = $cond->applyCondition($toBeCalculated);\n\n $process++;\n });\n\n return Helpers::formatValue($newTotal, $this->config['format_numbers'], $this->config);\n }", "public function getTotalPrice()\n {\n return @$this->attributes[\"valor_notafiscal\"];\n }", "public function getTotal();", "public function getTotal();", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function Total()\n {\n if ($this->Order()->IsCart()) { //always calculate total if order is in cart\n return $this->calculatetotal();\n }\n return $this->CalculatedTotal; //otherwise get value from database\n }", "public function total(){\n return $this->cart_contents['cart_total'];\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function amount()\n {\n return $this->products()->select('price')->get()->sum(function ($product) {\n return $product->price;\n });\n }", "public function calculateTotalAmount()\n {\n\n $total = 0;\n $base_currency_total = 0;\n $items_in_bag = Session::get('items');\n\n if (!empty($items_in_bag)) {\n foreach ($items_in_bag as $item) {\n $priceAccessoiresMust = 0;\n $priceAccessoires = 0;\n if (!empty($item['orderItemAccessories'])) {\n foreach ($item['orderItemAccessories'] as $orderItemAccessorie) {\n if (Session::get('cur_currency') === 'USD') {\n if(!empty($orderItemAccessorie['must_purchase']) && $orderItemAccessorie['must_purchase'] == 1) {\n $priceAccessoiresMust = $priceAccessoiresMust + $item['quantity'] * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }else{\n $priceAccessoires = $priceAccessoires + 1 * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }\n } else {\n if(!empty($orderItemAccessorie['must_purchase']) && $orderItemAccessorie['must_purchase'] == 1) {\n $priceAccessoiresMust = $priceAccessoiresMust + $item['quantity'] * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }else{\n $priceAccessoires = $priceAccessoires + 1 * ($orderItemAccessorie['price'] * Session::get('amount_per_unit'));\n }\n }\n }\n }\n\n if (Session::get('cur_currency') === 'USD') {\n $price = $item['quantity'] * ($item['price'] * Session::get('amount_per_unit'));\n } else {\n $price = $item['quantity'] * $item['price'];\n }\n\n $base_currency_total = $base_currency_total + ($item['price'] * $item['quantity']) + $priceAccessoiresMust + $priceAccessoires;\n $total = round($total + $price + $priceAccessoiresMust + $priceAccessoires, 2);\n\n }\n }\n\n Session::put('total', $total);\n Session::put('bc_currency_total', $base_currency_total);\n return $total;\n }", "function get_total() {\n\t\t\treturn cmdeals_price($this->total);\n\t\t}", "function get_cart_total() {\n\t\t\tif (!$this->prices_include_tax) :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total);\n\t\t\telse :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total + $this->tax_total);\n\t\t\tendif;\n\t\t}", "public function getTotal():int{\r\n\t return (int)$this->_vars['total_items']??0;\r\n\t}", "function inventory_total($inventory) {\n $inventory_total = 0;\n foreach ($inventory as $product_id => $quantity) {\n $inventory_total += $quantity;\n }\n return $inventory_total;\n}", "public function getTotal(){\n $cantidad = $this->cantidad;\n\t\treturn $this->productos\n\t\t\t\t\t\t->map(function($prod){return $prod->precio;})\n\t\t\t\t\t\t->reduce(function($acum, $elem)use($cantidad){\n return $acum + ($elem * $cantidad);\n });\n\t}", "public function getBaseTotal()\n {\n return ($this->amount + $this->tax_amount) ;\n }", "public function getTotal() {\n\t\treturn $this->total;\n\t}", "public function getTotal()\n\t{\n\t\treturn $this->total;\n\t}", "public function provideTotal()\n {\n return [\n [[1, 2, 5, 8], 16],\n [[-1, 2, 5, 8], 14],\n [[1, 2, 8], 11]\n ];\n }", "public function getTotal(): float\r\n {\r\n $total = 0;\r\n\r\n foreach ($this->basket as $product => $quantity) {\r\n $total += $this->product_price_calculator->getTotalPrice($product, $quantity);\r\n }\r\n\r\n return $total;\r\n }", "public function getPrice() {\n $sum = parent::getPrice();\n foreach ($this->extraItems as $extraItem) {\n $sum += $extraItem->getPrice();\n }\n return $sum;\n }", "public function gettotal()\r\n {\r\n return $this->total;\r\n }", "public function getMinOrderTotal();", "public function getTotalItems()\n\t{\n\t\treturn $this->totalItems;\n\t}" ]
[ "0.7840666", "0.7607806", "0.75806826", "0.7437518", "0.74133396", "0.74101573", "0.74066925", "0.73827547", "0.7366938", "0.73305714", "0.73085326", "0.7292632", "0.72888774", "0.725131", "0.72466314", "0.72401214", "0.720252", "0.71927935", "0.7178356", "0.7166466", "0.7149631", "0.71301514", "0.71208733", "0.71066344", "0.7098968", "0.70644534", "0.7060776", "0.7048721", "0.70462346", "0.70383036", "0.70186174", "0.7015329", "0.7002603", "0.70018566", "0.69717824", "0.69700325", "0.69699734", "0.6968264", "0.69655675", "0.6959565", "0.6959565", "0.6959565", "0.69483924", "0.69480646", "0.69094807", "0.69091105", "0.69057447", "0.6891364", "0.68683714", "0.6853988", "0.6848192", "0.68471956", "0.68471956", "0.68437344", "0.6838274", "0.6821103", "0.681809", "0.681809", "0.6816569", "0.68131644", "0.6806428", "0.68058544", "0.6805406", "0.67980236", "0.67952377", "0.6793235", "0.67896456", "0.67888534", "0.6787033", "0.6784185", "0.6782216", "0.67718226", "0.676315", "0.6761749", "0.6761749", "0.6761189", "0.67608", "0.67565036", "0.67534477", "0.67534477", "0.67534477", "0.67534477", "0.67534477", "0.67534477", "0.674826", "0.67426586", "0.6738176", "0.6734042", "0.67316806", "0.6727952", "0.67252374", "0.6723396", "0.6714254", "0.66962254", "0.6690849", "0.6689216", "0.6685075", "0.66708595", "0.6666091", "0.66639155" ]
0.6898818
47
Total values of items in this order
public function getTaxTotal() { $total = 0; // Calculate total from items in the list foreach($this->Items() as $item) { $total += $item->getTaxTotal(); } // Add any tax from postage $total += $this->PostageTax; return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function getTotalItems()\n {\n $total = 0;\n \n foreach ($this->items as $item) {\n $total += ($item->Quantity) ? $item->Quantity : 1;\n }\n\n return $total;\n }", "public function TotalItems()\n {\n return $this->getTotalItems();\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "public function total_items()\n {\n $total_items = 0;\n $items = $this->_session->offsetGet('products');\n if ($this->_isCartArray($items) === TRUE)\n {\n foreach ($items as $key)\n {\n $total_items =+ ($total_items + $key['qty']);\n }\n return $total_items;\n }\n }", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function itemTotal(): float;", "function getTotalItems() { return $this->m_totalItems; }", "public function sumItems(): float\n\t{\n\t\treturn $this->storage->sum();\n\t}", "public function totalUniqueItems()\n {\n return $this->totalItems(true);\n }", "public function totalWithDependentItems()\n {\n $depItemTotal = $this->dependentItems()->sum('total');\n return $this->total + $this->dependentItems()->sum('total');\n\n }", "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "public function total_items()\n\t{\n\t\treturn array_get($this->cart_contents, $this->cart_name . '.total_items', 0);\n\t}", "public function total()\n {\n $total = 0;\n foreach($this->_data as &$product) {\n $total += ($product['price'] * $product['quantity']);\n }\n\n return $total;\n }", "public function getTotalItems()\n\t{\n\t\treturn $this->totalItems;\n\t}", "public function getTotalAttribute() {\n return $this->cartItems->map(function ($item, $key) {\n return $item->subtotal;\n })->sum();\n }", "public function total()\n {\n $total = 0;\n\n foreach ($this->contents() as $item) $total += (float)$item->total();\n\n return (float)$total;\n }", "public function total()\n {\n // $this->line_items\n $total_price = 0;\n foreach ($this->line_items as $key => $value) {\n $total_price = $total_price + $value->product->price_amount;\n }\n // dd();\n return $total_price;\n }", "public function getTotal()\n {\n $cart = $this->getContent();\n\n $sum = array_reduce($cart->all(), function ($a, ItemCollection $item) {\n return $a += $item->getPrice(false);\n }, 0);\n\n return Helpers::formatValue(floatval($sum), $this->config['format_numbers'], $this->config);\n }", "public function getTotal()\n\t{\n\t\treturn $this->getKeyValue('total'); \n\n\t}", "public function getTotal();", "public function getTotal();", "protected function getTotItems()\n {\n if ($this->exportableHandler !== null) {\n return $this->exportableHandler->getTotItems();\n } else {\n return 0;\n }\n }", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function total();", "public function total();", "public function total();", "function getTotalWeight()\n { $total = 0 ;\n if (count($this->items) > 0) \n { \n for ($p=0; $p<count($this->items); $p++) \n {\n $total = $total + $this->items[$p];\n }\n }\n return $total;\n }", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function list_items_total()\n\t{\n\t\t$cnt = $this->list_items(NULL, NULL, NULL, NULL, TRUE);\n\t\tif (is_array($cnt))\n\t\t{\n\t\t\treturn count($cnt);\n\t\t}\n\t\treturn $cnt;\n\t}", "function totalItems($newValue=NULL) {\n\t\tif ( isset($newValue) ) $this->total_items = IntVal($newValue);\n\t\treturn $this->total_items;\n\t}", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function total(): int\n {\n return count($this->all());\n }", "public function getTotal():int{\r\n\t return (int)$this->_vars['total_items']??0;\r\n\t}", "public function total()\n {\n return $this->calculateTotal();\n }", "public function total(): int\n {\n return Arr::get($this->meta, 'total', $this->count());\n }", "public function getValorTotal(){\n $sum = 0;\n foreach($this->itens as $i):\n $sum += $i->getPreco() * $i->getQuantidade();\n endforeach;\n\n return $sum;\n }", "abstract public function countTotal();", "function getTotals(){\n\t\treturn $this->cache->getTotals();\n\t}", "public function provideTotal()\n {\n return [\n [[1, 2, 5, 8], 16],\n [[-1, 2, 5, 8], 14],\n [[1, 2, 8], 11]\n ];\n }", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function getTotal()\n\t{\n\t\treturn $this->total;\n\t}", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function total()\n\t{\n\t\treturn $this->total;\n\t}", "public function total(){\n\t\treturn $this->total;\n\t}", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotalQtyOrdered();", "public function getTotal() {\n\t\treturn $this->total;\n\t}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getTotalQuantity()\n {\n $items = $this->getContent();\n\n if ($items->isEmpty()) return 0;\n\n $count = array_reduce($items->all(), function ($a, ItemCollection $item) {\n return $a += $item->quantity;\n }, 0);\n\n return $count;\n }", "public function total(): float\n {\n return $this->itemsPrice()->sum(fn (array $item) => $item['price']);\n }", "public function getTotalItemCount();", "public function total_articulos(){\r\n\t\t\tif (count($this->listArticulos)==0) return 0;\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo)\r\n\t\t\t\t$total+=$elArticulo->unidades;\r\n\t\t\treturn $total;\r\n\t\t}", "function inventory_total($inventory) {\n $inventory_total = 0;\n foreach ($inventory as $product_id => $quantity) {\n $inventory_total += $quantity;\n }\n return $inventory_total;\n}", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}", "public function calculateTotalPrice($items){\n $total = 0;\n foreach($items as $item){\n $total += $item['subtotal'];\n }\n return $total;\n }", "public function getTotalItems()\n {\n if ($this->totalItems === null) {\n $this->totalItems = count($this->list ?? []);\n }\n\n return $this->totalItems;\n }", "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $isbn => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "public function getTotalQuantity()\n {\n $quantity = 0;\n foreach ($this->order_configurations as $config) {\n $quantity += $config->quantity;\n }\n return $quantity;\n }", "public function getTotal(){\n $cantidad = $this->cantidad;\n\t\treturn $this->productos\n\t\t\t\t\t\t->map(function($prod){return $prod->precio;})\n\t\t\t\t\t\t->reduce(function($acum, $elem)use($cantidad){\n return $acum + ($elem * $cantidad);\n });\n\t}", "function total_items($cart){\n $items = 0;\n if(is_array($cart)){\n foreach($cart as $isbn => $qty){\n $items += $qty;\n }\n }\n return $items;\n }", "public function getTotalQty()\n {\n $qty = 0;\n foreach ($this->lineItems as $item) {\n $qty += $item->qty;\n }\n\n return $qty;\n }", "public function totalItems($unique = false)\n {\n $total = 0;\n\n foreach ($this->contents() as $item) {\n $total += $unique ? 1 : $item->quantity;\n }\n\n return $total;\n }", "public function get_total_items()\n {\n $num = 0;\n\n if (isset($_SESSION['cart'])) {\n foreach ($_SESSION['cart'] as $item) {\n $num = $num + $item;\n }\n }\n return $num;\n }", "public function total()\n\t{\n\t\treturn array_get($this->cart_contents, $this->cart_name . '.cart_total', 0);\n\t}", "public function totalCount();", "public function totalCount();", "public function initTotal()\n {\n // Return val.\n $temp = 0;\n // Add cone price.\n $temp += $this->coneType['price'];\n // Add all scoops of ice cream.\n foreach ($this->scoops as $scoop) {\n $temp += $scoop['price'];\n }\n // Return total item cost.\n return $temp;\n }", "public static function total()\n {\n $total = 0;\n if (isset($_SESSION['cart']) && $_SESSION['cart'] != null) {\n foreach ($_SESSION['cart'] as $cart) {\n $total += $cart['qty'];\n }\n }\n return $total;\n }", "public function totalQuantity(): int\n {\n return $this->items->sum(function ($item) {\n return $item->quantity;\n });\n }", "public function subtotal()\n {\n $subTotal = 0;\n foreach($this->items as $item) {\n $subTotal += $item->get(Cart\\Item::KEY_AMOUNT);\n }\n return $subTotal;\n }", "public function total(){\n return $this->cart_contents['cart_total'];\n }", "public function sum()\n {\n return array_sum($this->data);\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function getSubTotal() {\n $total = 0;\n\n // Calculate total from items in the list\n foreach($this->Items() as $item) {\n $total += $item->getSubTotal();\n }\n\n return $total;\n }", "public function getTotalPrice()\n\t{\n\t\t$total = 0.0;\n\n\t\tforeach ($this->items as $item)\n\t\t{\n $total += $item->getPrice() + $item->getExtrasPrice();\n }\n\n\t\treturn $total;\n\t}", "public function sum() {\n\t\t$sum = 0;\n\t\tforeach ($this as $value) {\n\t\t\t$sum += $value;\n\t\t}\n\t\treturn $sum;\n\t}", "public function getTotal() \n {\n $tax = $this->getTax(); \n return $this->_subtotal + $tax; \n }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }", "function getTotal()\r\n\t{\r\n\t\tif( empty($this->_total) )\r\n\t\t{\r\n\t\t\t$this->_total\t= $this->_getListCount( $this->_query() );\r\n\t\t}\r\n\r\n\t\treturn $this->_total;\r\n\t}", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "public function total()\n {\n if ($this->_isCartArray($this->cart()) === TRUE)\n {\n $price = 0;\n $vat = 0;\n foreach ($this->cart() as $key)\n {\n $item_price = ($key['price'] * $key['qty']);\n $item_vat = (($item_price/100)*$key['vat']);\n // $price =+ ($price + ($key['price'] * $key['qty']));\n $price += $item_price;\n $vat += $item_vat;\n }\n\n // $params = $this->_config['vat'];\n // $vat = $this->_formatNumber((($price / 100) * $params));\n\n return array(\n 'sub-total' => $this->_formatNumber($price),\n 'vat' \t\t=> $this->_formatNumber($vat),\n 'total' \t=> $this->_formatNumber($price + $vat)\n );\n }\n }", "public function getTotalValue()\n {\n $totalValue = 0.0;\n $cartItems = $this->cart->getCartItems();\n\n foreach ($cartItems as $cartItem) {\n $totalValue += $cartItem['price'] * $cartItem['quantity'];\n }\n\n return $totalValue;\n }", "public function calculateTotal() {\n $result = 0;\n\n if(isset($_SESSION['user']['basket']))\n foreach ($_SESSION['user']['basket'] as $item)\n $result += $item['product']['price']*$item['quantity'];\n\n return $result;\n }", "function getTotal() {\r\n\t\tif (empty ( $this->_total )) {\r\n\t\t\t$query = $this->_buildQuery ();\r\n\t\t\t$this->_total = $this->_getListCount ( $query );\r\n\t\t}\r\n\t\treturn $this->_total;\r\n\t}", "public function get_total_items()\n\t{\n\t\t$num = 0;\n\t\t\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\tforeach($_SESSION['cart'] as $item)\n\t\t\t{\n\t\t\t\t$num = $num + $item;\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}", "public function individual_products_total() {\n\n foreach($this->remaining_category_price as $remaining_category_prices){\n $this->individual_products_total += $remaining_category_prices['price'];\n }\n\n }", "public function getNumTotalItems()\n {\n return $this->numTotalItems;\n }", "public function sum() {\n\t\treturn array_sum($this->_value);\n\t}", "public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}", "public function getTotal()\n\t{\n\t\t\n\t\treturn count($this->findAll());\n\t}", "function getTotal() {\n\t\tif (empty($this->_total)) {\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}" ]
[ "0.77438444", "0.7740794", "0.74697185", "0.7412311", "0.73996043", "0.7378311", "0.7358779", "0.7354533", "0.7285978", "0.7219718", "0.72026575", "0.7187239", "0.7166573", "0.7138649", "0.7130117", "0.7111038", "0.7106049", "0.70964336", "0.70951694", "0.70790625", "0.70391744", "0.7019189", "0.7019189", "0.6992331", "0.69557995", "0.6947394", "0.6945049", "0.6945049", "0.6945049", "0.694297", "0.69236577", "0.69154364", "0.69076717", "0.6904961", "0.6901546", "0.6894067", "0.68939215", "0.6881834", "0.68751913", "0.6873357", "0.6871834", "0.68666375", "0.686653", "0.6838392", "0.6832585", "0.68311536", "0.6830083", "0.6828094", "0.6828094", "0.6828094", "0.6828094", "0.6828094", "0.6828094", "0.68236905", "0.6820326", "0.6818663", "0.6818663", "0.681577", "0.68149245", "0.6814451", "0.67870873", "0.67862654", "0.67833716", "0.67706895", "0.67575854", "0.6755752", "0.67500025", "0.6747396", "0.67460674", "0.67393583", "0.6727881", "0.6727079", "0.6726601", "0.6725219", "0.6725219", "0.6723367", "0.6703503", "0.66940486", "0.6674787", "0.66665345", "0.6650739", "0.66499686", "0.66480404", "0.66441303", "0.66438085", "0.6643396", "0.6640658", "0.6633146", "0.66325974", "0.6628554", "0.66273886", "0.6624985", "0.6623333", "0.6618631", "0.66037554", "0.6600805", "0.6600374", "0.6597562", "0.65954494", "0.65826714", "0.6577234" ]
0.0
-1
Get the postage cost for this order
public function getPostage() { return $this->PostageCost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostageCost()\n {\n $total = 0;\n \n if ($this->postage) {\n $total = $this->postage->Cost;\n }\n \n return $total;\n }", "public function getCost()\n {\n return $this->get(self::_COST);\n }", "public function cost()\n {\n return $this->getPrice();\n }", "public function cost()\n {\n return $this->price;\n }", "public function getCost()\n {\n return isset($this->transaction['order']['cost']) ? $this->transaction['order']['cost'] : '';\n }", "public function getCost()\n {\n return round($this->price * $this->quantity, 2);\n }", "public function getCost(): double \n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost();", "public function getCostMoney()\n {\n return $this->get(self::_COST_MONEY);\n }", "public function getCost() {\n return 15 + $this->carService->getCost();\n }", "function getCost(){\n return $this->cost;\n }", "public function getCustomCost() {\n return $this->customCost;\n }", "public function cost()\n {\n return $this->beverage->cost() + $this->cost;\n }", "public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }", "public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }", "public function getShippingCost();", "public function getTotalcost()\n {\n return $this->totalcost;\n }", "public function shippingCost()\n {\n return $this->shippingCalculator->run($this);\n }", "public function getTotalCost()\n {\n $this->loadItems();\n return $this->calculator->getCost($this->items);\n }", "public function getTaxCost()\n {\n $total = 0;\n\n foreach ($this->items as $item) {\n if ($item->TotalTax) {\n $total += $item->TotalTax;\n }\n }\n\n if ($this->postage && $this->postage->Cost && $this->postage->Tax) {\n $total += ($this->postage->Cost / 100) * $this->postage->Tax;\n }\n \n return $total;\n }", "public function cost() {\n $cost = $this->beverage->cost();\n switch ($this->beverage->getSize()) {\n case 'tall':\n $cost += 1;\n break;\n case 'grande':\n $cost += 3;\n break;\n case 'venti':\n $cost += 6;\n break;\n }\n return $cost;\n }", "public function getTotalCost()\n {\n $subtotal = $this->SubTotalCost;\n $discount = $this->DiscountAmount;\n $postage = $this->PostageCost;\n $tax = $this->TaxCost;\n\n return ($subtotal - $discount) + $postage + $tax;\n }", "public function getCosts()\n {\n return $this->_costs;\n }", "public function get_base_cost() {\n\t\t$costs = get_post_meta( $this->product_id, '_bkap_resource_base_costs', true );\n\t\t$cost = isset( $costs[ $this->get_id() ] ) ? $costs[ $this->get_id() ] : '';\n\n\t\treturn (float) $cost;\n\t}", "public function getItemCost()\n {\n return $this->itemCost;\n }", "public function getFixedCost()\n {\n return $this->fixed_cost;\n }", "public function getUnitCost()\n {\n return $this->producer->getUnitCost();\n }", "public function totalCost(): float;", "public function getCosto()\n {\n return $this->costo;\n }", "public function shippingCosts(): string\n {\n return $this->rate->price;\n }", "public function getTotalCost()\n\t{\n\t\t$tprice = $this->getPrice();\n\n\t\tforeach ($this->options as $o)\n\t\t{\n\t\t\t$tprice += $o->getPrice() * $o->getQuantity();\n\t\t}\n\n\t\treturn $tprice;\n\t}", "public function getAccountingCost()\n {\n return $this->accountingCost;\n }", "protected function cost()\n {\n return $this->rounds;\n }", "public function get_cost() {\n\n\t\t$cost = $this->cost || is_numeric( $this->cost ) && $this->cost === 0 ? $this->cost : '';\n\n\t\t/**\n\t\t * Filter the add-on cost.\n\t\t *\n\t\t * @since 1.0\n\t\t * @param mixed $cost The add-on cost.\n\t\t * @param \\WC_Checkout_Add_On $add_on This instance of WC_Checkout_Add_On class.\n\t\t */\n\t\treturn apply_filters( 'wc_checkout_add_ons_add_on_get_cost', $cost, $this );\n\t}", "protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }", "public function getProductsCostTotal()\n {\n return $this->getProducts()->sum('price');\n }", "public function getPrice()\n {\n return $this->amount;\n }", "public function getShippingCost()\r\n {\r\n return $this->shipping_cost;\r\n }", "public function getUnitCost()\n {\n return $this->unitCost;\n }", "public function get_block_cost() {\n\t\t$costs = get_post_meta( $this->product_id, '_resource_block_costs', true );\n\t\t$cost = isset( $costs[ $this->get_id() ] ) ? $costs[ $this->get_id() ] : '';\n\n\t\treturn (float) $cost;\n\t}", "public function cost(){\n\t\t\n\t\treturn 200;\n\t}", "public function getBaseCost() {\n return $this->item->getBaseCost();\n }", "public function getProfitCostAttribute()\n {\n if ( Configuration::get('MARGIN_PRICE') == 'STANDARD' )\n return $this->cost_price;\n\n if ( Configuration::get('MARGIN_PRICE') == 'AVERAGE' )\n return $this->cost_average;\n\n // Sensible default\n return $this->cost_price;\n }", "public function getProfitCostAttribute()\n {\n if ( Configuration::get('MARGIN_PRICE') == 'STANDARD' )\n return $this->cost_price;\n\n if ( Configuration::get('MARGIN_PRICE') == 'AVERAGE' )\n return $this->cost_average;\n\n // Sensible default\n return $this->cost_price;\n }", "public function getTotalCost()\n {\n return number_format($this->total_cost, 2, \".\", \",\");\n }", "public function getDayCost()\n {\n return $this->dayCost;\n }", "public function getPothlandcost()\n {\n return $this->pothlandcost;\n }", "public function getFullCost()\n {\n $price = 0;\n\n foreach ($this->order_configurations as $config) {\n $products = EntityUtils::getRepository(\"Product\")->getProducts($config->configuration, true);\n foreach ($products as $product) {\n $price += $product->price * $config->quantity;\n }\n }\n\n return number_format($price, 2, \".\", \",\");\n }", "public function get_total_debit(){\n return $this->get_storage_cost() + $this->get_services_cost();\n }", "function get_cost() {\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"Calulating bill for cr $this->id\", \"\", \"\", 0, 0, 0);\n\t\t$cr_appliance_id = $this->appliance_id;\n\t\t$app_id_arr = explode(\",\", $cr_appliance_id);\n\t\t$cr_costs_final = 0;\n\t\tforeach ($app_id_arr as $app_id) {\n\t\t\t$cloud_app = new cloudappliance();\n\t\t\t$cloud_app->get_instance_by_appliance_id($app_id);\n\t\t\t// check state, only bill if active\n\t\t\tif ($cloud_app->state == 1) {\n\t\t\t\t// basic cost\n\t\t\t\t$cr_costs = 0;\n\t\t\t\t// + per cpu\n\t\t\t\t$cr_costs = $cr_costs + $this->cpu_req;\n\t\t\t\t// + per nic\n\t\t\t\t$cr_costs = $cr_costs + $this->network_req;\n\t\t\t\t// ha cost double\n\t\t\t\tif (!strcmp($this->ha_req, '1')) {\n\t\t\t\t\t$cr_costs = $cr_costs * 2;\n\t\t\t\t}\n\t\t\t\t// TODO : disk costs\n\t\t\t\t// TODO : network-traffic costs\n\n\t\t\t\t// sum\n\t\t\t\t$cr_costs_final = $cr_costs_final + $cr_costs;\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Billing active appliance $app_id (cr $this->id) = $cr_costs CC-units\", \"\", \"\", 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Not billing paused appliance $app_id (cr $this->id)\", \"\", \"\", 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Final bill for cr $this->id = $cr_costs_final CC-units\", \"\", \"\", 0, 0, 0);\n\t\treturn $cr_costs_final;\n\t}", "public function cost(): float\n {\n if ($this->beverage->isSmallSize()) {\n return 0.10 + $this->beverage->cost();\n }\n\n if ($this->beverage->isMediumSize()) {\n return 0.15 + $this->beverage->cost();\n }\n\n if ($this->beverage->isLargeSize()) {\n return 0.20 + $this->beverage->cost();\n }\n\n return 0.20 + $this->beverage->cost();\n }", "private function totalCost()\n {\n return number_format($this->msgCount() * $this->recipients() * $this->smsCost(), 2);\n }", "public function darCosto()\n {\n /**\n * @var float $costo\n */\n\n $costo = $this->getPrecio();\n\n return $costo;\n }", "public function getSubTotalCost()\n {\n $total = 0;\n\n foreach ($this->items as $item) {\n if ($item->SubTotal) {\n $total += $item->SubTotal;\n }\n }\n \n return $total;\n }", "public function getAditionalPrice()\n {\n return @$this->attributes[\"preco_adicional\"];\n }", "public function getBaseTotalInvoicedCost();", "public function getCostPerTraveledHour()\n {\n return $this->cost_per_traveled_hour;\n }", "public function costo()\n {\n return '$' . (string) number_format($this->costo, 2);\n }", "function get_order_discount_total() {\n\t\t\treturn $this->discount_total;\n\t\t}", "public function getCostPerHour()\n {\n return $this->cost_per_hour;\n }", "public function get_services_cost(){\n //find all the requested services on a deadbody\n $sql = \"SELECT * FROM requested_service WHERE dead_no={$this->id}\";\n $this->requested_services = RequestedService::find_by_sql($sql);\n $total_debit = 0;\n //for each requested service find price and add to total debit\n foreach ($this->requested_services as $requested_service) {\n $service = Service::find_by_id($requested_service->service_no);\n $total_debit += $service->price;\n }\n return $total_debit;\n }", "function pmpro_fpost_get_featured_price() {\r\n\treturn number_format( (int) pmpro_getOption( 'fpostcost' ), 2 );\r\n}", "public function getTotalCost()\n {\n $totalCost = 0.00;\n\n foreach ($this->getItems() as $cartItem) {\n $totalCost += ($cartItem->price * $cartItem->count);\n }\n\n return $totalCost;\n }", "public function getUnitPurchaseCost()\n {\n if ($this->producer->isWorkOrder()) {\n return $this->producer->getUnitCost();\n } elseif ($this->producer->isStockItem()) {\n return $this->standardUnitCost;\n } else {\n return $this->producer->getUnitCost();\n }\n }", "public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}", "public function getEffectivePrice()\n {\n return $this->effective_price;\n }", "public function getCostFactor() : int\n {\n return $this->cost;\n }", "public function get_shipping_cost()\n {\n $products = $this->get();\n $shipping = 0;\n if (! empty($products)) {\n foreach ($products as $product) {\n if ($product['weight'] <= 200) {\n $shipping += 1.00 * ($_SESSION['cart'][$product['id']]);\n } elseif ($product['weight'] <= 500) {\n $shipping += 3.00 * ($_SESSION['cart'][$product['id']]);\n } elseif ($product['weight'] <= 800) {\n $shipping += 5.00 * ($_SESSION['cart'][$product['id']]);\n } elseif ($product['weight'] <= 1000) {\n $shipping += 8.00 * ($_SESSION['cart'][$product['id']]);\n } elseif ($product['weight'] <= 1500) {\n $shipping += 8.00 * ($_SESSION['cart'][$product['id']]);\n } elseif ($product['weight'] <= 1500) {\n $shipping += 8.00 * ($_SESSION['cart'][$product['id']]);\n } else {\n $shipping += 20.00 * ($_SESSION['cart'][$product['id']]);\n }\n }\n return $shipping; \n }\n else {\n return 0.00;\n }\n\n }", "public function getPaymentPrice() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentPrice;\r\n\t}", "public function getTotalCostToMoneyAttribute()\n {\n return ( isset($this->total_cost) ) ? toMoney($this->total_cost) : toMoney(0);\n }", "function get_total() {\n\t\t\treturn cmdeals_price($this->total);\n\t\t}", "public function Price() {\n\t\t$amount = $this->Amount();\n\n\t\t//Transform price here for display in different currencies etc.\n\t\t$this->extend('updatePrice', $amount);\n\n\t\treturn $amount;\n\t}", "public function get_total_cost()\n {\n $num = \"0.00\";\n\n if (isset($_SESSION['cart'])) {\n // if there are items to display\n $ids = $this->get_ids();\n\n // get product ids\n global $products;\n $prices = $products->get_prices($ids);\n\n // loop through, adding the cost of each item * the number of item\n // in the cart to $num each time\n\n if ($prices != null) {\n foreach ($prices as $price) {\n $num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n }\n }\n }\n return $num;\n }", "public function getCostInteger()\n {\n return (int) round($this->getCost() * 100);\n }", "public function getPrice()\n {\n return $this->object->Price;\n }", "public function getTotalCostAttribute()\n {\n $credits = ( isset( $this->subject->{ subject_credits() } ) &&\n is_int( $this->subject->{ subject_credits() } ) ) ?\n (int) $this->subject->{ subject_credits() } : (int) 0;\n $cost = ( isset( $this->cost->{ cost() } ) &&\n is_float( $this->cost->{cost()} ) ) ?\n (float) $this->cost->{ cost() } : (float) 0;\n return (int) $credits * (float) $cost;\n }", "public function getTotalPrice()\n {\n $tax = $this->tax->tax;\n $price = $this->getFinalPrice();\n $shipping = $this->shipping_cost;\n\n return ((($price + $shipping) * $tax) + $price + $shipping);\n }", "public function get_price(){\n\t\treturn $this->price;\n\t}", "public function getPriceDelivery()\n {\n return $this->priceDelivery;\n }", "public function getShippingCostPaidByOption()\n {\n return $this->shippingCostPaidByOption;\n }", "public function getPrice() {\n\t\treturn($this->price);\n\t}", "public function get_total_cost()\n\t{\n\t\t$num = '0.00';\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\t#if there are items to display \n\t\t\t\n\t\t\t#get product ids\n\t\t\t$ids = $this->get_ids();\n\t\t\t\n\t\t\t#get product prices\n\t\t\tglobal $Products;\n\t\t\t$prices = $Products->get_prices($ids);\n\t\t\t\n\t\t\t#loop throih adding the cost of each item and timesing it by the number of item in the cart. \n\t\t\tif($prices != NULL)\n\t\t\t{\n\t\t\t\tforeach($prices as $price)\n\t\t\t\t{\n\t\t\t\t\t$num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}", "function calculateCost($event = null) {\r\n\t\tif(!$event) $event = $this->EventRegistration()->Event();\r\n\t\t$cost = $this->Ticket()->Price;\r\n\t\t$cost = $event->updateAttendeeCost($cost,$this);\r\n\t\t$this->Cost = $cost;\r\n\t\treturn $cost;\r\n\t}", "public function getCostDetails()\n {\n\n $return = array (\n 'type' => $this->getType(),\n 'extra' => null,\n 'cost' => $this->getCost(),\n 'total' => $this->getCost(),\n 'children' => array(),\n );\n\n //call the children and populate 'children'\n $order = $this->getOrder();//get the order\n $items = $order->getItem();//get all the items in the order\n $children = array();\n foreach ($items as $i => $item) {\n if (is_object($item) && $item->getType() != $this->getType() && is_object($item->getParent())) {\n $p = $item->getParent();//get parent\n if ($p->getId() == $this->getId()) {\n //Parent is same as me, so this is a child of mine, add it to the array of children.\n //remember the function is not static, so cannot use callDisplay() or callUpdate(), need to call\n //the method directly.\n $costResult = $item->getCostDetails();\n if ($costResult !== false) {\n //only add if they do not return bool false\n $children[$item->getId()] = $costResult;\n $return['total'] += $costResult['total']; //add to total we are returning.\n }\n }\n }\n }\n if ($return['total'] == 0) {\n //total is 0, even after going through children! no cost details to return\n return false;\n }\n if (count($children)) {\n //add children to the array\n $return['children'] = $children;\n }\n return $return;\n }", "public function getCostDetails()\n {\n\n $return = array (\n 'type' => $this->getType(),\n 'extra' => null,\n 'cost' => $this->getCost(),\n 'total' => $this->getCost(),\n 'children' => array(),\n );\n\n //call the children and populate 'children'\n $order = $this->getOrder();//get the order\n $items = $order->getItem();//get all the items in the order\n $children = array();\n foreach ($items as $i => $item) {\n if (is_object($item) && $item->getType() != $this->getType() && is_object($item->getParent())) {\n $p = $item->getParent();//get parent\n if ($p->getId() == $this->getId()) {\n //Parent is same as me, so this is a child of mine, add it to the array of children.\n //remember the function is not static, so cannot use callDisplay() or callUpdate(), need to call\n //the method directly.\n $costResult = $item->getCostDetails();\n if ($costResult !== false) {\n //only add if they do not return bool false\n $children[$item->getId()] = $costResult;\n $return['total'] += $costResult['total']; //add to total we are returning.\n }\n }\n }\n }\n if ($return['total'] == 0) {\n //total is 0, even after going through children! no cost details to return\n return false;\n }\n if (count($children)) {\n //add children to the array\n $return['children'] = $children;\n }\n return $return;\n }", "public function getCostDetails()\n {\n\n $return = array (\n 'type' => $this->getType(),\n 'extra' => null,\n 'cost' => $this->getCost(),\n 'total' => $this->getCost(),\n 'children' => array(),\n );\n\n //call the children and populate 'children'\n $order = $this->getOrder();//get the order\n $items = $order->getItem();//get all the items in the order\n $children = array();\n foreach ($items as $i => $item) {\n if (is_object($item) && $item->getType() != $this->getType() && is_object($item->getParent())) {\n $p = $item->getParent();//get parent\n if ($p->getId() == $this->getId()) {\n //Parent is same as me, so this is a child of mine, add it to the array of children.\n //remember the function is not static, so cannot use callDisplay() or callUpdate(), need to call\n //the method directly.\n $costResult = $item->getCostDetails();\n if ($costResult !== false) {\n //only add if they do not return bool false\n $children[$item->getId()] = $costResult;\n $return['total'] += $costResult['total']; //add to total we are returning.\n }\n }\n }\n }\n if ($return['total'] == 0) {\n //total is 0, even after going through children! no cost details to return\n return false;\n }\n if (count($children)) {\n //add children to the array\n $return['children'] = $children;\n }\n return $return;\n }", "public function getCost($purchase = false, $withPromotion = true)\n {\n return $purchase ? $this->product->base_price * Config::getValue('buyMultiplier') * $this->quantity : $this->getPrice($withPromotion) * $this->quantity;\n }", "public function getPaymentAmount()\n {\n return $this->bonus + parent::getSalary();\n }", "function getOverallOrderPrice(){\n\t\t$t=0;\n\t\t$a = Order::where('payment', 'verified')->get();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t\n\t\t$r = intVal($n->qty)*intVal($n->price);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function getCosts()\n {\n $quotation = $this->firstQuotation();\n\n if ($quotation) {\n return $quotation->getCosts();\n }\n\n return null;\n }", "public function getPrice()\n {\n return $this->get(self::_PRICE);\n }", "public function getMisccost()\n {\n return $this->misccost;\n }", "public function getStoreToOrderRate();", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }", "public function getPrice()\n {\n return $this->price;\n }" ]
[ "0.80778193", "0.7858859", "0.7741399", "0.7631515", "0.76224536", "0.76028836", "0.7595196", "0.75835454", "0.75835454", "0.75835454", "0.7427905", "0.7324105", "0.73094076", "0.7278735", "0.71628827", "0.7157007", "0.7098993", "0.7098993", "0.70699406", "0.7006299", "0.69864666", "0.688232", "0.6867375", "0.6862266", "0.6846539", "0.684016", "0.6833732", "0.68076134", "0.678094", "0.6761136", "0.66988796", "0.6690941", "0.6690687", "0.6660918", "0.6641321", "0.6584874", "0.6579441", "0.65295887", "0.65132827", "0.6512635", "0.65076023", "0.65031636", "0.6494231", "0.6484306", "0.64725596", "0.64676183", "0.64676183", "0.6466668", "0.64528406", "0.6427768", "0.64039266", "0.63958377", "0.63732666", "0.633363", "0.6291375", "0.62905854", "0.62824", "0.6255916", "0.62487364", "0.62458634", "0.6241649", "0.61967486", "0.61953044", "0.6194747", "0.61837995", "0.6171112", "0.6154224", "0.61535305", "0.6148878", "0.6146946", "0.61430913", "0.6141521", "0.6138981", "0.6113548", "0.61085653", "0.61047524", "0.6095648", "0.6080986", "0.60739356", "0.6060963", "0.6047544", "0.6046429", "0.60419416", "0.60374874", "0.60297984", "0.6029247", "0.6025918", "0.6025918", "0.6025918", "0.60121685", "0.60088557", "0.6002546", "0.5988841", "0.59875", "0.5970858", "0.59677476", "0.5961263", "0.5961263", "0.5961263", "0.5961263" ]
0.76968616
3
Total of order including postage
public function getTotal() { $sub = ($this->hasDiscount()) ? $this->SubTotal - $this->DiscountAmount : $this->SubTotal; return number_format($sub + $this->Postage + $this->TaxTotal, 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "public function getTotal(){\n $total=0;\n\n foreach ( $this->getOrderLines() as $ol){\n $total += $ol->getSubTotal();\n }\n \n return $total;\n }", "public function getOrdertotal()\n {\n return $this->ordertotal;\n }", "public function total();", "public function total();", "public function total();", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getTotal();\n }", "public function getMinOrderTotal();", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "function getOverallOrderPrice(){\n\t\t$t=0;\n\t\t$a = Order::where('payment', 'verified')->get();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t\n\t\t$r = intVal($n->qty)*intVal($n->price);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function getTotal() \n {\n $tax = $this->getTax(); \n return $this->_subtotal + $tax; \n }", "public function get_total()\n {\n }", "function calculateOrderAmount(): int {\n // Calculate the order total on the server to prevent\n // customers from directly manipulating the amount on the client\n $oldCart=Session::get('cart');\n $cart = new Cart($oldCart);\n $total = $cart->totalPrice;\n return $total * 100;\n }", "public function getOrderTotal($order)\n {\n return number_format($order->order_total, 2, '.', '');\n }", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "public function getCurrentMonthTotalOrder() : int;", "public static function getTotalValueOfOrder()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 2);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "private function get_num_total_orders()\n\t{\n\t\treturn wp_count_posts('order_paysera')->publish;\n\t}", "function get_total() {\n\t\t\treturn cmdeals_price($this->total);\n\t\t}", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "static public function get_shipping_line_total( $order ){\n\n \t\t$version = toret_check_wc_version();\n\n \tif( $version === false ){\n\n \t$total = $order->get_total_shipping(); \n \n \t}else{\n\n\t $shippings = $order->get_items( 'shipping' );\n\t\t\t\tforeach( $shippings as $shipping ){\n \t\t\t\t\t\n \t\t\t\t$total = $shipping->get_total();\n \t\t\t\t\t\n\t\t\t\t} \t\n\n \t}\n\n \treturn $total;\n\n \t}", "public function get_total()\n\t{\n\t\treturn $this->EE->cartthrob->cart->total();\n\t}", "public function calculateOrderTotal($items)\n {\n $total = 0;\n foreach ($items as $key => $item) {\n $total += $item['quoted_price'];\n }\n return $total;\n }", "function get_order_total(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$max=count($_SESSION[$cart]);\n\t$sum=0;\n\tfor($i=0;$i<$max;$i++){\n\t\t$pid=$_SESSION[$cart][$i]['bookid'];\n\t\t$q=$_SESSION[$cart][$i]['qty'];\n\t\t$price=get_price($pid);\n\t\t$sum+=$price*$q;\n\t}\n\treturn $sum;\n}", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function getMaxOrderTotal();", "public function get_total(){\n $total = 0;\n \n // récupert tous les articles de la commande\n $articles = $this->get_all_articles();\n \n // parcourt ces articles\n foreach($articles as $a){\n $price = $a->get_price(true);\n \n // puis calcul le prix\n $total += $a->nb * $price;\n }\n \n return $total;\n }", "public function getTotalAmount();", "public function total()\n {\n // $this->line_items\n $total_price = 0;\n foreach ($this->line_items as $key => $value) {\n $total_price = $total_price + $value->product->price_amount;\n }\n // dd();\n return $total_price;\n }", "public function total(){\n\t\treturn $this->total;\n\t}", "public function total(){\n return $this->cart_contents['cart_total'];\n }", "function get_order_discount_total() {\n\t\t\treturn $this->discount_total;\n\t\t}", "public function getTotal()\n {\n return ($this->amount + $this->tax_amount)* $this->currency_converter;\n }", "function wpap_get_total_woocommerce_order_fees($order)\n{\n $total_fee = 0;\n $order_fee_items = $order->get_fees();\n if(!is_array($order_fee_items)){\n return $total_fee;\n }\n \n foreach ( $order_fee_items as $fee_item ) {\n $total_fee += $fee_item['line_total'];\n }\n return $total_fee;\n}", "function btce_get_active_order_total($key, $secret) {\n $orders = btce_active_orders($key, $secret);\n $_total = 0;\n foreach ($orders->return as $order) {\n if ($order->type == 'sell') {\n $_total += $order->amount;\n }\n }\n return $_total;\n}", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function Total()\n {\n if ($this->Order()->IsCart()) { //always calculate total if order is in cart\n return $this->calculatetotal();\n }\n return $this->CalculatedTotal; //otherwise get value from database\n }", "private function get_total_tax() {\n\n\t\t$taxes = $this->order->getCombinedTax();\n\n\t\t$tax = 0;\n\n\t\tif ( empty( $taxes ) ) {\n\t\t\treturn $tax;\n\t\t}\n\n\t\tforeach( $taxes as $name => $amount ) {\n\t\t\t$tax += $amount;\n\t\t}\n\n\t\treturn $tax;\n\t}", "public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }", "public function total()\n\t{\n\t\treturn $this->total;\n\t}", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "public function getTotalQtyOrdered();", "public function totalWithDependentItems()\n {\n $depItemTotal = $this->dependentItems()->sum('total');\n return $this->total + $this->dependentItems()->sum('total');\n\n }", "public function total()\n {\n return $this->subtotal() + $this->shipping() + $this->vat()->sum();\n }", "public function total()\n {\n return $this->calculateTotal();\n }", "public function gettotal()\r\n {\r\n return $this->total;\r\n }", "protected function _getTotal()\n {\n return $this->formatPriceWithComma($this->_getOrder()->getGrandTotal());\n }", "public function getTotal()\n {\n $cart = $this->getContent();\n\n $sum = array_reduce($cart->all(), function ($a, ItemCollection $item) {\n return $a += $item->getPrice(false);\n }, 0);\n\n return Helpers::formatValue(floatval($sum), $this->config['format_numbers'], $this->config);\n }", "public function getGrandTotal();", "public function get_total_refunded( $order ) {\n\t\tglobal $wpdb;\n\n\t\t$total = $wpdb->get_var( $wpdb->prepare( \"\n\t\t\tSELECT SUM( postmeta.meta_value )\n\t\t\tFROM $wpdb->postmeta AS postmeta\n\t\t\tINNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d )\n\t\t\tWHERE postmeta.meta_key = '_refund_amount'\n\t\t\tAND postmeta.post_id = posts.ID\n\t\t\", $order->get_id() ) );\n\n\t\treturn $total;\n\t}", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "public function getTotalOrdersAm()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getMontoTotal() {\n $command = Yii::app()->db->createCommand()\n ->select('sum(t.monto) as total')\n ->from('pago t');\n return $command->queryRow()['total'];\n }", "public static function getTotalValueOfOrderDashboard()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 0);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function getTotalPrice() {\n return $this->getQuantity()*$this->getPrice();\n }", "public function getCartTotal()\n {\n }", "public function get_orders_total() : array {\n\t\t$element = $this->dom->find( '#j-order-num' );\n\t\tif ( ! $element ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\t$value = explode( ' ', $element[0]->text() );\n\t\tif ( ! $value || empty( $value[0] ) ) {\n\t\t\treturn [\n\t\t\t\t'orders_total' => 0,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'orders_total' => intval( $value[0] ),\n\t\t];\n\t}", "public function getTotal();", "public function getTotal();", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "function get_cart_total() {\n\t\t\tif (!$this->prices_include_tax) :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total);\n\t\t\telse :\n\t\t\t\treturn cmdeals_price($this->cart_contents_total + $this->tax_total);\n\t\t\tendif;\n\t\t}", "function getOverallOrderRemain(){\n\t\t$t=0;\n\t\t$a = Order::all();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t$sl =Order::where('payment', 'verified')->count();\n\t\t$r=intVal($sl);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "public function getTotalPrice()\n\t{\n\t\t$total = 0.0;\n\n\t\tforeach ($this->items as $item)\n\t\t{\n $total += $item->getPrice() + $item->getExtrasPrice();\n }\n\n\t\treturn $total;\n\t}", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function calc(Order $order);", "function getTotalPrice(){\n \treturn $this->myCart->total();\n }", "abstract public function countTotal();", "public function itemTotal(): float;", "public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}", "public function getOrderBaseGrandTotal(){\n return $this->_getData(self::ORDER_BASE_GRAND_TOTAL);\n }", "public function getTotalQuantity()\n {\n $quantity = 0;\n foreach ($this->order_configurations as $config) {\n $quantity += $config->quantity;\n }\n return $quantity;\n }", "private function _calculateTotalDiscount($order){\n\t $storeCredit = $order->getCustomerBalanceAmount();\n\t $giftCardAmount = $order->getGiftCardsAmount();\n\t $totalDiscountAmount = $storeCredit + $giftCardAmount;\n\t return number_format($totalDiscountAmount, 2, '.', '');\n }", "public function getBaseTotalQtyOrdered();", "public function totalBillOS()\n {\n return $this->bills->sum('outstanding');\n }", "public static function getQtdTotalIngressos()\n {\n $conteudo = self::getConteudo();\n return $conteudo->sum('quantidade');\n }", "public function getGrandTotal()\n {\n return $this->getOrder()->getGrandTotal();\n }", "public function total()\n\t{\n\t\treturn array_get($this->cart_contents, $this->cart_name . '.cart_total', 0);\n\t}", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n $subTotal = $this->getSubTotal(false);\n\n $newTotal = 0.00;\n\n $process = 0;\n\n $conditions = $this\n ->getConditions()\n ->filter(function (CartCondition $cond) {\n return $cond->getTarget() === 'total';\n });\n\n // if no conditions were added, just return the sub total\n if (!$conditions->count()) {\n return Helpers::formatValue($subTotal, $this->config['format_numbers'], $this->config);\n }\n\n $conditions\n ->each(function (CartCondition $cond) use ($subTotal, &$newTotal, &$process) {\n $toBeCalculated = ($process > 0) ? $newTotal : $subTotal;\n\n $newTotal = $cond->applyCondition($toBeCalculated);\n\n $process++;\n });\n\n return Helpers::formatValue($newTotal, $this->config['format_numbers'], $this->config);\n }", "public function subtotal();", "public function modelTotal(){\n\t\t\t//---\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select id from orders\");\n\t\t\t//lay tong so ban ghi\n\t\t\treturn $query->rowCount();\n\t\t\t//---\n\t\t}", "public function total()\n {\n $total = 0;\n\n foreach ($this->contents() as $item) $total += (float)$item->total();\n\n return (float)$total;\n }", "function getPriceTotal()\n{\n\t$total = \\Cart::instance('shopping')->total();\n\n return $total;\n}", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function get_total_payment(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando el importe\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['subtotal'];\n\t\t\t\t}\n\t \t}\n\n\t \t$_SESSION['importe'] = $total;\n\n\t \treturn number_format($total, 2,',','.');\n\t }", "public function total()\n {\n $total = 0;\n foreach($this->_data as &$product) {\n $total += ($product['price'] * $product['quantity']);\n }\n\n return $total;\n }", "public function getTotalById($idOrder)\n {\n //Gets the total for an order\n \treturn $this->mgrOrder->getTotalById($idOrder) . \"$\";\n }", "public function originalTotal(): float\n {\n return $this->content()->sum(fn (CartItem $item) => $item->originalTotal());\n }", "public function total(): float\n {\n $price = $this->price;\n\n /* if ($this->hasOptions()) {\n foreach ($this->data['options'] as $item) {\n if (array_key_exists('price', $item)) {\n $price += $item['price'];\n }\n }\n }\n\n if ($includeTax) {\n $price = $this->tax->add($price);\n }*/\n\n return (float)($price * $this->quantity);\n }", "public function totaliza_pedido()\r\n {\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_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_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 $this->mgt_pedido_valor_desconto->Text = '0.00';\r\n $this->mgt_pedido_valor_pedido->Text = '0.00';\r\n $this->mgt_pedido_valor_ipi->Text = '0.00';\r\n $this->mgt_pedido_valor_total->Text = '0.00';\r\n\r\n $Comando_SQL = \"select * from mgt_cotacoes_produtos where mgt_cotacao_produto_numero_cotacao = '\" . trim($this->mgt_pedido_numero->Text) . \"' order by mgt_cotacao_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Cotacoes_Produtos->Fields['mgt_cotacao_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Cotacoes_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_pedido_valor_desconto->Text = number_format($valor_desconto, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_pedido->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_pedido_valor_total->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "public function getTotalOrdersMo()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(oc_po_product.id) as total_orders FROM oc_po_order \nLEFT JOIN oc_po_product \nON(oc_po_order.id = oc_po_product.order_id)\nWHERE oc_po_order.user_id='103' AND oc_po_product.item_status <> 0\");\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}" ]
[ "0.77671987", "0.7684026", "0.75328183", "0.7202079", "0.7202079", "0.7202079", "0.71825165", "0.7176639", "0.71408474", "0.70981425", "0.70921874", "0.70871454", "0.70000887", "0.6991273", "0.6990894", "0.698819", "0.6985154", "0.6935586", "0.6926372", "0.69143444", "0.69130445", "0.6875794", "0.6871651", "0.68655765", "0.6858769", "0.6848678", "0.6840775", "0.6818561", "0.68180686", "0.68117964", "0.68060434", "0.6797211", "0.67738014", "0.67472297", "0.67448425", "0.6728929", "0.67275435", "0.67275435", "0.6714972", "0.6704225", "0.6691604", "0.66883343", "0.66777605", "0.6674935", "0.6672598", "0.66663474", "0.66584176", "0.66485274", "0.6646142", "0.6642608", "0.6625983", "0.66138613", "0.659379", "0.6591448", "0.65896696", "0.65895814", "0.65866923", "0.6584661", "0.65818316", "0.65801495", "0.65783703", "0.65740633", "0.65740633", "0.6573215", "0.6569468", "0.6565185", "0.6556855", "0.65555847", "0.6554387", "0.6551633", "0.6547992", "0.6541689", "0.6532558", "0.65309525", "0.65259135", "0.6525673", "0.6524457", "0.65121216", "0.64859647", "0.64795333", "0.64763737", "0.6472374", "0.6472374", "0.6472374", "0.6472374", "0.6472374", "0.6472374", "0.6466152", "0.6456168", "0.64530426", "0.6446781", "0.64457196", "0.6445437", "0.64414394", "0.64369655", "0.643436", "0.6432216", "0.6432184", "0.64280754", "0.642185" ]
0.6649881
47
Return a list string summarising each item in this order
public function getItemSummary() { $return = ''; foreach($this->Items() as $item) { $return .= "{$item->Quantity} x {$item->Title};\n"; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toList() : string\n {\n return implode(\"\\n\", $this->all());\n }", "public function __toString(): string\n {\n $ret = \"\";\n\n if (count($this->_items) > 0) {\n foreach ($this->_items as $orderItem) {\n $ret .= $orderItem->__toString() . PHP_EOL;\n }\n }\n\n // Taxes:\n $ret .= \"Sales Taxes: \" . MoneyHelper::getInstance()->asDecimal($this->getTotalTaxes()) . PHP_EOL;\n\n // Total:\n $ret .= \"Total: \" . MoneyHelper::getInstance()->asDecimal($this->getGrandTotal()) . PHP_EOL;\n\n return rtrim($ret, PHP_EOL);\n }", "function list_items($items) {\n $string = '';\n foreach ($items as $key => $item) {\n $key++;\n $string .= \"[{$key}] {$item}\". PHP_EOL;\n\n }\n \nreturn $string;\n}", "public function __toString() {\n\t\treturn $this->result . ($this->ordered ? '</ol>' : '</ul>') . PHP_EOL;\n\t}", "public function renderItems()\n {\n $list = [];\n if (($before = $this->renderBeforeItemList()) !== null) {\n $list[] = $before;\n }\n $list[] = parent::renderItems();\n\n if (($after = $this->renderAfterItemList()) !== null) {\n $list[] = $after;\n }\n\n return implode('', $list);\n }", "function list_items($list)\n{\n\t$result = '';\n\tforeach ($list as $key => $value) {\n // Display each item and a newline\n $add = $key + 1; \n $result .= \"[{$add}] {$value}\\n\";\n }\n\t\n\treturn $result;\n}", "private function knapsackContents() : string\n {\n $contents = \"\\n\";\n foreach($this->items as &$item) {\n $contents .= (string)$item;\n }\n return $contents;\n }", "public function __toString(): string\n {\n return implode(',', $this->items);\n }", "function toString(){\n\t\treturn join(\"\",$this->_Items);\n\t}", "function list_items($list)\n{\n // Create empty starter string\n $listString = '';\n \n // Loop through an array $list to pull out $key and $items from the array.\n foreach ($list as $key => $items) {\n // Increment $key so list number starts at 1 rather than 0.\n $key++;\n // Concatenate each list item to $listString\n $listString .= \"[{$key}] {$items}\" . PHP_EOL;\n }\n return $listString;\n}", "public function generateOrder();", "function getOrderings() ;", "public function getResult() {\n\t\t$output = \"<ul>\";\n\n\t\tfor ($i = 0; $i < count($this->items); $i++) {\n\t\t\tif (!isset($this->items[$i]['after'])) continue;\n\t\t\t$output .= \"<li><b>\".$this->items[$i]['text'].\"</b><br />start: \".$this->items[$i]['start'].\"; end: \".$this->items[$i]['end'].\"; exec time: \".$this->items[$i]['use'].\"</li>\";\t\n\t\t}\n\n\t\t$output .= \"<li><b>\".$this->queryCount.\" sql queries.</b><br />total exec time: \".$this->compareMicrotimes($this->startTime, self::getMicrotime()).\"; for sql queries: \".$this->queryTime.\";</li>\";\n\t\t$output .= \"</ul>\";\n\t\treturn $output;\n\t}", "public function __toString()\n {\n $prefix = $this->getPrefix();\n \n $tmp = array();\n foreach ($this->items as $i) {\n $tmp[] = sprintf('%s%s', $prefix, $i);\n }\n \n return implode($tmp, ' | ');\n }", "public function summary() {\n\t\t$i = $this->count() === 1 ? 'item' : 'items';\n\t\treturn \"{$this->count()} $i in your cart.\";\n\t\t\n\t}", "function list_items($list) \n{\n $x = '';\n foreach($list as $key => $item) {\n $key++;\n $x .= \"[{$key}] {$item}\\n\";\n }\n return $x;\n // Return string of list items separated by newlines.\n // Should be listed [KEY] Value like this:\n // [1] TODO item 1\n // [2] TODO item 2 - blah\n // DO NOT USE ECHO, USE RETURN\n}", "public function toString(){\n $output = '';\n if(!empty($this->category_list)){\n $output .= \"------------------\\nCATEGORIES\\n------------------\\n\";\n foreach($this->category_list as $c)\n $output .= $c->toString();\n }\n if(!empty($this->user_category_list)){\n $output .= \"------------------\\nUSER'S CATEGORIES\\n------------------\\n\";\n foreach($this->user_category_list as $u)\n $output .= $u->toString();\n }\n if(!empty($this->entity_list)){\n $output .= \"------------------\\nENTITIES\\n------------------\\n\";\n foreach($this->entity_list as $e)\n $output .= $e->toString();\n }\n if(!empty($this->concept_list)){\n $output .= \"------------------\\nCONCEPTS\\n------------------\\n\";\n foreach($this->concept_list as $c)\n $output .= $c->toString();\n }\n if(!empty($this->time_expression_list)){\n $output .= \"------------------\\nTIME EXPRESSIONS\\n------------------\\n\";\n foreach($this->time_expression_list as $t)\n $output .= $t->toString();\n }\n if(!empty($this->money_expression_list)){\n $output .= \"------------------\\nMONEY EXPRESSIONS\\n------------------\\n\";\n foreach($this->money_expression_list as $m)\n $output .= $m->toString();\n }\n if(!empty($this->uri_list)){\n $output .= \"------------------\\nURIs\\n------------------\\n\";\n foreach($this->uri_list as $u)\n $output .= $u->toString();\n }\n if(!empty($this->phone_expression_list)){\n $output .= \"------------------\\nPHONE EXPRESSIONS\\n------------------\\n\";\n foreach($this->phone_expression_list as $p)\n $output .= $p->toString();\n }\n if(!empty($this->quotation_list)){\n $output .= \"------------------\\nQUOTATIONS\\n------------------\\n\";\n foreach($this->quotation_list as $q)\n $output .= $q->toString();\n }\n if(!empty($this->issue_list)) {\n $output .= \"------------------\\nISSUES\\n------------------\\n\";\n foreach($this->issue_list as $i)\n $output .= $i->toString();\n }\n return $output;\n }", "public function __toString()\n {\n $content = '';\n foreach ($this->getContent() as $item) {\n $content .= $item->__toString();\n }\n return $content;\n }", "public function getOrderings();", "function __toString() {\r\n return implode('', $this->list);\r\n }", "public function __toString()\n {\n return \"{$this->getOrder()}/{$this->getUniqueName()}\";\n }", "function getRepresentation() {\n\t $n = count($this->genes) + 1;\n\t $rep = array();\n\t for($i=1;$i<$n;$i++) $rep[] = $i;\n\n\t for($i=1;$i<($n-1);$i++) {\n\t $t = $rep[$this->genes[$i][0]];\n\t $rep[$this->genes[$i][0]] = $rep[$this->genes[$i][1]];\n\t $rep[$this->genes[$i][1]] = $t;\n\t }\n\t $lrep = '';\n\t foreach($rep as $g) $lrep .= $g . ',';\n\n\t //Since in our tests items are progressive, let's count progressive\n\t $cprog = 0;\n\t for($i=0;$i<count($rep)-1;$i++) \n\t if(($rep[$i+1]-$rep[$i]) == 1) $cprog ++;\n\t $lrep .= \" $cprog couple in order\";\n\t return $lrep;\n\t}", "public function order();", "public function __toString() {\r\n\t\t/*$stringReturn = '';\r\n\t\t$j = -1;\r\n\t\tforeach( $this->propreties as $key => $value ) {\r\n\t\t\t$stringReturn .= '<li><u title=\"'.$this->arrayInfos[$key].'\">'. $key . '</u> : ' . $value .'</li>';\r\n\t\t}*/\r\n/*\r\n\t\t$stringReturn .= '</ul>';\r\n*/\r\n var_dump($this);\r\n\t\t//return $stringReturn;\r\n\t}", "function listItems($var)\n{\n\n $string = '';\n\n foreach ($var as $key => $value) {\n $key++;\n $string .= \"[$key]\" . $value . PHP_EOL;\n }\n\n return $string; \n}", "public function toString()\n {\n return \"Gift message is displayed for each items on order(s) view page on frontend correctly.\";\n }", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "private function _serialize()\r\n {\r\n $values = array(count($this->_items));\r\n foreach ($this->_items as $item)\r\n {\r\n $itemArr = $item->asArray();\r\n foreach ($this->_struct as $key)\r\n {\r\n $values[] = is_null($itemArr[$key]) ? '---' : $itemArr[$key];\r\n }\r\n }\r\n if ($this->getDeliveryGrossAmount() > 0)\r\n {\r\n $values[0]++;\r\n $values[] = 'Delivery';\r\n $values[] = 1;\r\n $values[] = number_format($this->getDeliveryNetAmount(), 2);\r\n $values[] = number_format($this->getDeliveryTaxAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n }\r\n\r\n return implode(':', $values);\r\n }", "public function getOrderings() {}", "public function getOrderedMediaItems()\n {\n $values = $this->getArrayValue();\n if (isset($values['reuse']))\n {\n $slot = aReusableSlotTable::getReusedSlot($values['reuse']);\n if ($slot)\n {\n return $slot->getOrderedMediaItems();\n }\n else\n {\n return array();\n }\n }\n return parent::getOrderedMediaItems();\n }", "public function getOrderList()\n {\n }", "public function buildBasketContent()\n {\n $orders = $this->getOrder();\n $basketArray = [];\n\n foreach($orders as $order){\n $portionId = $order['portionId'];\n $portion = Portion::where('id',$portionId)->get();\n $basketArray[] = [['portion'=>$portion], ['units'=> $order['unit']]];\n }\n return $basketArray;\n }", "function issuu_api_folder_result_orders() {\n $result_orders = &drupal_static(__FUNCTION__);\n // Check if the array is not already initialized.\n if (!isset($result_orders)) {\n $result_orders = array(\n 'asc' => t('Ascending'),\n 'desc' => t('Descending'),\n );\n }\n return $result_orders;\n}", "public function toString() {\r\n return implode($this->result);\r\n }", "public function __toString(){\n\t\treturn $this->combineElements();\n\t}", "public function __toString() {\n\t\treturn serialize($this->list);\n\t}", "function getOrder()\n {\n return 50;\n }", "private function OrdersList()\n\t{\tob_start();\n\t\t$nl = \"\\n\";\n\t\t$blank = ',,,,,,';\n\t\theader('Pragma: ');\n\t\theader('Cache-Control: ');\n\t\theader('Content-Type: application/csv;charset=UTF-8');\n\t\theader('Content-Disposition: attachment; filename=\"iidr_orders_details.csv\"');\n\t\tif ($orders = $this->GetOrders())\n\t\t{\t$students = array();\n\t\t\t$orderid = 0;\n\t\t\techo 'orderid,order time,customer,customer id,order value,paid,delivered,item type,item,item price', $nl;\n\t\t\tforeach ($orders as $order_row)\n\t\t\t{\t$order = new AdminStoreOrder($order_row);\n\t\t\t\t//$items = $order->GetItems();\n\t\t\t\tif (!$students[$order->details['sid']])\n\t\t\t\t{\t$students[$order->details['sid']] = new Student($order->details['sid']);\n\t\t\t\t}\n\t\t\t\t$total_discounts = 0;\n\t\t\t\tforeach ($order->GetItems() as $item)\n\t\t\t\t{\tif ($order->id == $orderid)\n\t\t\t\t\t{\techo $blank;\n\t\t\t\t\t} else\n\t\t\t\t\t{\techo $order->id, ',\"', date('d-M-y @H:i', strtotime($order->details['orderdate'])), '\",\"', $this->CSVSafeString($students[$order->details['sid']]->GetName()), '\",', $students[$order->details['sid']]->id, ',', number_format($order->GetRealTotal(), 2), ',\"', (int)$order->details['paiddate'] ? date('d/m/y @H:i', strtotime($order->details['paiddate'])) : '', '\",\"', $order->details['delivered'] ? 'Yes' : '', '\"';\n\t\t\t\t\t\t$orderid = $order->id;\n\t\t\t\t\t}\n\t\t\t\t\techo ',\"', $this->CSVSafeString($item['ptype']), '\",\"', (int)$item['qty'], ' x ', $this->CSVSafeString($item['title']), '\",', number_format($item['totalpricetax'], 2), $nl;\n\t\t\t\t\tforeach ($item['discounts'] as $item_discount)\n\t\t\t\t\t{\tif (!$discounts[$item_discount['discid']])\n\t\t\t\t\t\t{\t$discounts[$item_discount['discid']] = new DiscountCode($item_discount['discid']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo $blank, ',\"discount\",\"', $this->CSVSafeString($discounts[$item_discount['discid']]->details['discdesc']), '\",-', number_format($item_discount['discamount'], 2), $nl;\n\t\t\t\t\t\t$total_discounts += $item_discount['discamount'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($order->GetAllReferrerRewards() as $reward)\n\t\t\t\t{\techo $blank, ',\"reward\",\"refer-a-friend\",-', number_format($reward['amount'], 2), $nl;\n\t\t\t\t}\n\t\t\t\tforeach ($order->GetAllAffRewards() as $reward)\n\t\t\t\t{\techo $blank, ',\"reward\",\"affiliate scheme\",-', number_format($reward['amount'], 2), $nl;\n\t\t\t\t}\n\t\t\t\tforeach ($order->GetBundles() as $bundle)\n\t\t\t\t{\techo $blank, ',\"bundle\",\"', (int)$bundle['qty'], ' x ', $this->CSVSafeString($bundle['bname']), '\",-', number_format($bundle['totaldiscount'], 2), $nl;\n\t\t\t\t}\n\t\t\t\tif ($total_discounts)\n\t\t\t\t{\techo $blank, ',,\"Total discounts\",-', number_format($total_discounts, 2), $nl;\n\t\t\t\t}\n\t\t\t\tif ($order->details['delivery_price'] > 0)\n\t\t\t\t{\techo $blank, ',\"delivery\",\"', ($order->details['delivery_id'] && ($deloption = new DeliveryOption($order->details['delivery_id'])) && $deloption->id) ? $this->CSVSafeString($deloption->details['title']) : '','\",', number_format($order->details['delivery_price'], 2), $nl;\n\t\t\t\t}\n\t\t\t\tif ($order->details['txfee'] > 0)\n\t\t\t\t{\techo $blank, ',,\"Transaction fee\",', number_format($order->details['txfee'], 2), $nl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "public function displayOrder()\n {\n $orderList = array();\n\n try {\n $stmt = $this->db->prepare(\"SELECT * \n FROM OrderTable\n WHERE OrderStatus = 0\");\n $stmt->execute();\n\n $row[] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($stmt->rowCount() > 0) {\n foreach ($row as $order) {\n array_push($orderList, $order);\n\n }\n return $orderList;\n\n }\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function getOrder()\n {\n //Note: order by parts are not \"named\" so it's all or nothing\n return $this->_get('_order');\n }", "public function getOrder(): array;", "public static function sortables()\n {\n return ['id', 'module_name'];\n }", "public function renderItems()\n {\n $this->dataProvider->setPagination(false);\n\n $rows=[];\n $this->renderLevel($rows,0,0);\n\n return implode($this->separator, $rows);\n }", "public function __toString()\n\t{\n\t\treturn PHP_EOL.$this->_name.' '.implode($this->_glue, $this->_elements);\n\t}", "public function alignOnList(): string\n {\n return $this->alignOnList;\n }", "function getOrder()\n {\n return 0;\n }", "function getOrder()\n {\n return 0;\n }", "public function __toString(){\n\t\t\treturn $this->return_all();\n\t}", "function build_array_of_ordered_items( $item ) {\n\n\t// Declare an array to populate with item information\n\t$item_array = array();\n\n\t// Get the SKU for the item, using the variation_id\n\t$sku = get_post_meta( $item['variation_id'], '_sku', true );\n\t// Get the quantity of the item sold from the item object\n\t$quantity = $item['quantity'];\n\t// Get the name of the item sold from the item object\n\t$name = $item['name'];\n\t// Get the total cost of the item sold from the item object\n\t$total = $item['total'];\n\n\t// Add these variables to the item_array\n\t$item_array['SKUSize'] = $sku;\n\t// $item_array['Article'] = $name;\n\t$item_array['Quantity'] = $quantity;\n\t$item_array['Item_Price'] = floatval($total / $quantity);\n\t$item_array['Line_Total'] = floatval($total);\n\n\t// Return the result of the array\n\treturn $item_array;\n\n}", "protected function buildItemsList()\n {\n $creances = $this->entityManager->getRepository('OvescoFacturationBundle:Creance')\n ->findBy(['debiteurId' => $this->getParameter('debiteurId')]);\n return array_filter($creances, function(Creance $creance) { return $creance->getFacture() === null; });\n }", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "public function format()\n {\n $result = array();\n\n foreach ($this->groups as $group) {\n $result[] = array(\n 'id' => $group->getInternalId(),\n 'external_id' => $group->getExternalId(),\n 'value' => $group->getName(),\n 'label' => $group->getName(),\n );\n }\n\n return $result;\n }", "protected function outputOrderedList(array $data)\n {\n $maxNum = mb_strlen(strval(count($data) + 1)) + 3;\n\n foreach (array_values($data) as $index => $value) {\n $key = (' ' . ($index + 1) . ')');\n $key = str_pad($key, $maxNum, ' ', STR_PAD_RIGHT);\n\n $this->outputLine($key . $value);\n }\n }", "public function get_referral_description() {\n\n\t\t$items = $this->order->getItems();\n\t\t$description = array();\n\n\t\tforeach ( $items as $item ) {\n\n\t\t\t$description[] = $item->getName();\n\n\t\t}\n\n\t\t$description = implode( ', ', $description );\n\n\t\treturn $description;\n\t}", "public function __toString()\n {\n $strings = [];\n $string = [];\n $strings['Name'] = $this->getName();\n $strings['status'] = $this->getName();\n $strings['speed'] = self::$speed;\n\n foreach ($strings as $name => $value) $string[] = \"$name: $value\";\n\n return implode(', ', $string);\n }", "public function getNormalizedCartItems() {\n $i = 0;\n $upsellProductIds = array();\n foreach (WC()->cart->get_cart() as $item) {\n $productId = get_post_meta($item['product_id']);\n $productId =$productId['productId'][0] ;\n if ($i == 0) {\n $product_fields['productId'] = $productId;\n $product_fields['product_qty_' . $productId] .= $item['quantity'];\n }\n else {\n $product_fields['upsellCount'] = 1;\n array_push($upsellProductIds, $productId);\n $product_fields['product_qty_' . $productId] .= $item['quantity'];\n }\n $i++;\n }\n $uids = '';\n foreach ($upsellProductIds as $uid) {\n $uids .= $uid . ',';\n }\n $product_fields['upsellProductIds'] = substr($uids, 0, -1);\n return $product_fields;\n }", "public function __toString()\n\t{\n\t\t$output = '';\n\n\t\tforeach (array_keys($this->data) as $key) {\n\t\t\tif (is_array($this->data[$key])) {\n\t\t\t\t$output .= implode(PHP_EOL, $this->data[$key]) . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t$output .= $this->data[$key] . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "function getOrder();", "public function build(): string\n {\n return implode(' ', $this->items);\n }", "public function getAvailableOrders()\n {\n return [\n 'name-asc' => 'from-a-z',\n 'name-desc' => 'from-z-a',\n 'created_at-desc' => 'newest-first',\n 'created_at-asc' => 'oldest-first',\n 'price-asc' => 'cheapest-first',\n 'price-desc' => 'expensive-first'\n ];\n }", "function toString() {\n $result = $this->first_name . ' ' . $this->surname; // full name\n $result .= ' ('.$this->average().\")\\n\"; // grade average\n foreach($this->emails as $which=>$what) // emails sorted by email-type\n $result .= $which . ': '. $what. \"\\n\"; // in descending order\n $result .= \"\\n\"; // always attach a newline character at the end\n return '<pre>'.$result.'</pre>'; // returns string enclosed by tags\n }", "public function itemsList()\n {\n return DB::table('examseries_data')\n ->join('quizzes', 'quizzes.id', '=', 'quiz_id')\n ->select('quizzes.*' )\n ->where('examseries_id', '=', $this->id)->get();\n }", "public function output() {\n\t\treturn array_merge(\n\t\t\tarray(\"<ul data-divider-theme='b' id='list_{$this->options['id']}' \".($this->options['inset']?'data-inset=\"true\" ':'').($this->options['actions']?\"data-split-icon='{$this->options['icon']}' data-split-theme='a'\":\"\").\" data-role='listview'>\"),\n\t\t\t$this->items,\n\t\t\tarray(\"</ul>\"));\n\t}", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function getSummariesList() {\n return $this->_get(1);\n }", "public function getOrder()\n {\n return 110;\n }", "function getTotalsForDisplay()\n {\n $amount = $this->getSource()->formatPriceTxt($this->getAmount());\n\n if ($this->getAmountPrefix()) {\n $amount = $this->getAmountPrefix() . $amount;\n }\n\n $title = __($this->getTitle());\n if ($this->getTitleSourceField()) {\n $label = $title . ' (' . $this->getTitleDescription() . '):';\n } else {\n $label = $title . ':';\n }\n\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function toString() {\n $list= '';\n foreach ($this->list as $preference => $q) {\n $list.= (1.0 - $q < 0.001) ? ', '.$preference : sprintf(', %s;q=%.1f', $preference, $q);\n }\n return $this->getClassName().'<'.substr($list, 2).'>';\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "function lista(array $nums)\n{\n\n\t$lista = \"Arreglo: \".implode(\", \",$nums);\n\t$lista.= \"<ul>\";\n\t$lista.= \"<br><li>Promedio: \".promedio($nums).\"</li>\"; \n\t$lista.= \"<br><li>Mediana: \".mediana($nums).\"</li>\";\n\tsort($nums); \n\t$lista.= \"<br><li>Menor a mayor: \".implode(\", \",$nums).\"</li>\";\n\trsort($nums); \n\t$lista.= \"<br><li>Mayor a menor: \".implode(\", \",$nums).\"</li>\";\n\t$lista.=\"</ul>\";\n\n\treturn $lista;\n\n}", "private function renderItems() {\n\t\t$items = '';\n\t\tif ($this->feedElements['items']) {\n\t\t\tforeach ($this->feedElements['items'] as $item)\n\t\t\t\t$items .= $item->getNode();\n\t\t}\n\t\treturn $items;\n\t}", "public function __toString()\n\t{\n\t\t$list_html = $this->build_list($this->data);\n\t\t\n\t\treturn $list_html;\n\t}", "function list_cart_items()\n{\n\tforeach (WC()->cart->get_cart() as $cart_item) {\n\t\t$item_name = $cart_item['data']->get_title();\n\t\t$quantity = $cart_item['quantity'];\n\t\t$price = $cart_item['data']->get_price();\n\n\t\techo '\n\t\t<li class=\"list-group-item d-flex justify-content-between align-items-center\">\n\t\t\t<div>\n\t\t\t\t' . $item_name . '<span class=\"font-weight-bold\"> x ' . $quantity . '</span>\n\t\t\t</div>\n\t\t\t<span class=\"h5\">' . $price . '</span>\n\t\t</li>';\n\t};\n}", "function toString() {\n\t\treturn $this->FiscaalGroepID . \",\" . $this->FiscaalGroupType . \",\" . $this->GewijzigdDoor . \",\" . $this->GewijzigdOp;\n\t}", "public function __toString()\n {\n $sql = array();\n foreach ($this->items as $command => $args)\n if (!empty($args))\n $sql[] = sprintf(\"%s %s\", $command, $args);\n\n return implode(' ', $sql);\n }", "public function getOrder()\n {\n return 100;\n }", "public function getOrder()\n {\n return 100;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return 0;\n }", "public function getOrder()\n {\n return 140;\n }", "function getSortedItemsArray()\n\t{\n\t\t$med_items = $this->getItemsArray();\n\n\t\t// sort by order setting\n\t\tswitch($this->getOrder())\n\t\t{\n\t\t\tcase ilObjMediaCast::ORDER_TITLE:\n\t\t\t\t$med_items = ilUtil::sortArray($med_items, \"title\", \"asc\", false, true);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase ilObjMediaCast::ORDER_CREATION_DATE_ASC:\n\t\t\t\t$med_items = ilUtil::sortArray($med_items, \"creation_date\", \"asc\", false, true);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase ilObjMediaCast::ORDER_CREATION_DATE_DESC:\n\t\t\t\t$med_items = ilUtil::sortArray($med_items, \"creation_date\", \"desc\", false, true);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase ilObjMediaCast::ORDER_MANUAL:\n\t\t\t\t$order = array_flip($this->readOrder());\t\t\n\t\t\t\t$pos = sizeof($order);\n\t\t\t\tforeach(array_keys($med_items) as $idx)\n\t\t\t\t{\n\t\t\t\t\tif(array_key_exists($idx, $order))\n\t\t\t\t\t{\n\t\t\t\t\t\t$med_items[$idx][\"order\"] = ($order[$idx]+1)*10;\n\t\t\t\t\t}\n\t\t\t\t\t// item has no order yet\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$med_items[$idx][\"order\"] = (++$pos)*10;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$med_items = ilUtil::sortArray($med_items, \"order\", \"asc\", true, true);\n\t\t\t\tbreak;\t\t\t\n\t\t}\n\n\t\treturn $med_items;\n\t}", "public function __toString()\n {\n $retval = \"\";\n foreach($this->vector as $k => $v)\n {\n $retval .= \"$v \";\n }\n return $retval;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }" ]
[ "0.64233047", "0.6347259", "0.62909704", "0.62092125", "0.614493", "0.6084903", "0.6080245", "0.6065177", "0.60519177", "0.59055525", "0.5887425", "0.58818746", "0.58699155", "0.58278614", "0.5810605", "0.58101577", "0.5807248", "0.5766627", "0.5690212", "0.5675996", "0.563244", "0.56167597", "0.559142", "0.55704623", "0.5558367", "0.5534616", "0.55205387", "0.55205387", "0.55205387", "0.55205387", "0.55205387", "0.55205387", "0.5496018", "0.54862386", "0.5391762", "0.53852487", "0.5345774", "0.53386205", "0.53352743", "0.53160256", "0.5296689", "0.52922875", "0.5285162", "0.5280482", "0.52684546", "0.52660704", "0.5263098", "0.524834", "0.5232612", "0.52162266", "0.5203171", "0.5203171", "0.5201919", "0.5197862", "0.5196651", "0.5191047", "0.5191047", "0.5187627", "0.51846206", "0.5183549", "0.5177913", "0.5174042", "0.5164356", "0.51637113", "0.51592284", "0.5157338", "0.51499534", "0.51477516", "0.5144711", "0.513609", "0.513609", "0.513609", "0.5135191", "0.5132004", "0.51267993", "0.5122183", "0.5122183", "0.5122183", "0.511753", "0.5110595", "0.51060236", "0.5106014", "0.5103017", "0.50980955", "0.5097587", "0.5097587", "0.50974464", "0.50974464", "0.50974464", "0.5096223", "0.50962067", "0.50954175", "0.5084007", "0.5080991", "0.5080991", "0.5080991", "0.5080991", "0.5080991", "0.5080991", "0.5080991" ]
0.61355567
5
API Callback before this object is written to the DB
public function onBeforeWrite() { parent::onBeforeWrite(); // See if this order was just marked paid, if so reduce quantities for // items. if($this->isChanged("Status") && $this->Status == "paid") { foreach($this->Items() as $item) { $product = $item->MatchProduct; if($product->ID && $product->Quantity) { $new_qty = $product->Quantity - $item->Quantity; $product->Quantity = ($new_qty > 0) ? $new_qty : 0; $product->write(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function beforeSaveInDB(){}", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function onAfterSave();", "public function preSaveCallback()\n {\n $this->performPreSaveCallback();\n }", "public function preSaveCallback()\n {\n $this->performPreSaveCallback();\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function onBeforeWrite() {\r\n\t\tparent::onBeforeWrite();\r\n\t}", "public function preSave() {}", "public function afterSaveCommit(): void\n {\n }", "protected function _postInsert()\n\t{\n\t}", "public function postSave() {}", "protected function performPostPersistCallback()\n {\n // echo 'inserted a record ...';\n return true;\n }", "public function onBeforeSave();", "public function preSave() { }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "protected function saveInsert()\n {\n }", "protected function _postSave()\r\n\t{\r\n\t}", "public function save() {}", "public function save() {}", "public function save() {}", "public function saveToDB()\n {\n }", "public function commit() {}", "protected function hook_afterSave(){}", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function afterSave(){\n\t}", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function afterSave()\n {\n\n }", "public function _postInsert()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function committed();", "public function onBeforeWrite() {\n if(!isset($this->FinishDateTime) || strtotime($this->FinishDateTime) < 1000) {\n $this->FinishDateTime = date('Y-m-d H:i:s', strtotime(date('Y-m-d', strtotime($this->StartDateTime)) . ' 23:59:59'));\n }\n\n /**\n * Increment the .ics calendar invite sequence number if any of the\n * key properties of this Event have been updated (after initital creation)\n */\n if(!empty($this->ID)) {\n $cf = $this->getChangedFields(true, 2);\n foreach(static::$key_properties as $property) {\n if(isset($cf[$property])) {\n $this->Sequence = $this->Sequence + 1;\n $this->UpdatedSequenceNotification($this);\n break;\n }\n }\n }\n\n\n parent::onBeforeWrite();\n\n }", "protected function onBeforeSave()\n {\n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function onBeforeWrite()\n {\n $this->Title = $this->getName();\n\n // Generate the ticket code\n if ($this->exists() && empty($this->TicketCode)) {\n $this->TicketCode = $this->generateTicketCode();\n }\n\n parent::onBeforeWrite();\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "protected function afterSave() {\n\n }", "protected function _saveBefore()\n {\n // nothing here\n }", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "function after_save() {}", "protected function afterInsert()\n {\n }", "public function onPrePersist()\n {\n $this->status = 1;\n $this->createdDateTime = new \\DateTime(\"now\");\n $this->lastUpdatedDateTime = new \\DateTime(\"now\");\n }", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public abstract function commit();", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function onWrite();", "public function onSaveNewRecord()\n {\n $this->created = $this->updated = new \\DateTime();\n $this->rev = 1;\n }", "public final function save() {\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public final function save()\n {\n }", "protected function _beforeSave() {\n\t}", "public function prePersist()\n {\n }", "public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }", "public function persist() {}", "public function onAfterWrite() {\r\n\t\tparent::onAfterWrite();\r\n\t\t$this->zlog('Write');\r\n\t}", "protected function saveUpdate()\n {\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n }", "protected function hook_beforeSave(){}", "function onSave()\n {\n $object = parent::onSave();\n }", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "abstract public static function saved($callback);", "public function save() {\n\t\t\t\n\t\t}", "public function beforeSave()\n {\n $value = $this->getValue();\n $value = $this->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }", "public function save()\r\n {\r\n //\r\n }", "public function prePersist()\n {\n $this->updatedAt = new \\DateTime();\n $this->createdAt = new \\DateTime();\n }", "protected function afterInsertAccepting()\n {\n }", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public abstract function save();", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function save()\n {\n // For V2.0\n }", "public function save() {\n if($this->hasUid){\n //Create new uid, and varify that it hasn't been used.\n //This might take a bit of overhead, but useful for ensuring you don't have duplicate UID's in any table\n $uniqueID = new uniqueID();\n $UID = $uniqueID->shorten($uniqueID->generate()); //final shortened userId\n\n while (!checkUidIsUnique($UID)) {\n $uniqueID = new uniqueID();\n $UID = $uniqueID->shorten($uniqueID->generate()); //final shortened userId\n }\n\n $this->uid = $UID;\n }\n \n //Check if we are creating a new object\n if ($this->uid == \"\" && $this->id == \"\") {\n $newFields = array();\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n \n $ins[] = ':' . $key;\n array_push($newFields, $key);\n }\n $ins = implode(',', $ins);\n $fields = implode(',', $newFields);\n \n //Get the current database time\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n $stmt = $PDO->prepare(\"SELECT NOW() today\");\n $stmt->execute();\n $dateTime = $stmt->fetch();\n $this->created_at = $dateTime[0]->today;\n $NetworkConnection->closeConnection();\n \n\n try {\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n $stmt = $PDO->prepare(\"INSERT INTO \" . $this->tableName .\" ($fields) VALUES ($ins)\");\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n $stmt->bindValue(':' . $key, $value);\n \n }\n var_dump($stmt);exit();\n $result = $stmt->execute();\n \n $NetworkConnection->closeConnection();\n \n if ($result && $this->hasUid) {\n //Created new lead entry\n $newUID = new UID(array(\"uid\" => $UID, \"table_name\" => $this->tableName));\n $newUID->save();\n return $this;\n }else{\n return $this;\n }\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n } else {\n \n $fields = array();\n $set = '';\n $x = 1;\n\n //TODO:: JMJ think this is reminent of old code, consider for removal\n //$this->created_at = date(\"Y-m-d H:i:s\");\n\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n array_push($fields, $key);\n }\n\n for ($x = 0; $x < count($fields); $x++) {\n $set .= \"{$fields[$x]} = ?\";\n if ($x < count($fields) - 1) {\n $set .= ', ';\n }\n }\n\n //Update existing entry\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n if(!$this->hasUid){\n $stmt = $PDO->prepare(\"UPDATE \" . $this->tableName .\" SET {$set} WHERE id=?\");\n }else{\n $stmt = $PDO->prepare(\"UPDATE \" . $this->tableName .\" SET {$set} WHERE uid=?\");\n }\n for ($i = 0; $i < count($fields); $i++) {\n\n $stmt->bindParam($i + 1, $this->{$fields[$i]});\n if ($i + 1 == count($fields)) {\n if(!$this->hasUid){\n $stmt->bindParam($i + 2, $this->id);\n }else{\n $stmt->bindParam($i + 2, $this->uid);\n }\n \n }\n }\n\n $result = $stmt->execute();\n \n $NetworkConnection->closeConnection();\n \n if ($result) {\n return $this;\n }\n }\n }", "public function markAsPersisted(): void;", "public function save()\n\t{\n\t\t$this->copyAttributesToValues() ;\n\t\tif( $this->factory )\n\t\t{\n\t\t\tswitch( $this->todo )\n\t\t\t{\n\t\t\t\tcase 1: // Insert\n\t\t\t\t\tif( $this->factory->insertObjectIntoDB( $this ) ) $this->state = \"inserted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2: // update\n\t\t\t\t\tif( $this->factory->updateObjectIntoDB( $this ) ) $this->state = \"updated\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3: // delete\n\t\t\t\t\tif( $this->factory->deleteObjectIntoDB( $this ) ) $this->state = \"deleted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "public function _insert()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }", "public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n\n if ($this->ID && !$this->StoreTitle && $this->access_token) {\n /*\n if ($fc = new FoxyStripeClient()) {\n $client = $fc->getClient();\n $errors = [];\n\n $result = $client->get($fc->getCurrentStore());\n $this->owner->StoreTitle = $result['store_name'];\n\n $errors = array_merge($errors, $client->getErrors($result));\n if (count($errors)) {\n Injector::inst()->get(LoggerInterface::class)\n ->error('FoxyStripeSiteConfig::onBeforeWrite errors - ' . json_encode($errors));\n }\n }\n */\n }\n }", "protected function afterInserting()\n {\n }", "public function persist()\n {\n //\n }", "protected function _insert()\n\t{\n\t}", "public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function save()\n\t{\n\n\t}", "public function after_insert() {}", "public function saveData()\r\n {\r\n \r\n }", "function commit(): void;", "public function save()\n {\n //\n }", "public function persist()\n {\n persistableCollection::getInstance($this->resourceName)->persistObject($this);\n $this->loaded = true;\n $this->persisted = true;\n }", "public function onAfterWrite()\n {\n if ($this->owner->ImageID) {\n $this->owner->Image()->publishSingle();\n }\n }" ]
[ "0.7023155", "0.69771075", "0.69771075", "0.68390816", "0.68033314", "0.68033314", "0.6795757", "0.6795757", "0.6793903", "0.6793903", "0.6736093", "0.6728146", "0.66032565", "0.658259", "0.65468806", "0.65348", "0.6531158", "0.65279573", "0.6475497", "0.6465709", "0.64558536", "0.6449727", "0.6449727", "0.64491254", "0.64482635", "0.64325106", "0.6430075", "0.63707274", "0.63509613", "0.63359165", "0.631314", "0.63102263", "0.62964356", "0.6291926", "0.62799656", "0.6279651", "0.6267546", "0.6263921", "0.62586224", "0.62516695", "0.62467676", "0.6240238", "0.62379014", "0.62326133", "0.62305766", "0.62231076", "0.62183225", "0.6211581", "0.61852384", "0.61852384", "0.6173321", "0.61564755", "0.61505353", "0.61434877", "0.6143296", "0.6139589", "0.6136527", "0.61314684", "0.61303824", "0.6129443", "0.6118799", "0.61108094", "0.6110394", "0.61053354", "0.6105302", "0.6093603", "0.60907096", "0.6082598", "0.6080328", "0.6060525", "0.6053327", "0.60530186", "0.6044183", "0.6038767", "0.6034019", "0.60339004", "0.6027944", "0.6026889", "0.60258996", "0.6024633", "0.6018294", "0.60105395", "0.6005489", "0.6003948", "0.6003948", "0.6003948", "0.6003948", "0.6003948", "0.6000409", "0.5999572", "0.5992282", "0.59717894", "0.59717405", "0.59704864", "0.5963891", "0.5960718", "0.5950811", "0.59493095", "0.59490854", "0.5947437", "0.5939915" ]
0.0
-1
API Callback before this object is removed from to the DB
public function onBeforeDelete() { // Delete all items attached to this order foreach($this->Items() as $item) { $item->delete(); } parent::onBeforeDelete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onRemove();", "public function after_delete() {}", "protected function afterRemoving()\n {\n }", "public function afterRemove()\n\t{}", "protected function afterDelete()\r\n {\r\n }", "public function onAfterDelete();", "public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }", "function after_delete() {}", "protected function afterDelete()\n {\n }", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "public function remove() {}", "public function remove() {}", "protected function beforeRemoving()\n {\n }", "protected function performPostRemoveCallback()\n {\n // echo 'deleted a record ...';\n \n return true;\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "protected function _preDelete() {}", "abstract public static function deleted($callback);", "public function onBeforeDelete();", "public function afterDeleteCommit(): void\n {\n }", "public function preDelete() { }", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function postRemove($entity);", "public function remove ($obj) {}", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "protected function preDeleteHook($object) { }", "public function remove() {\n }", "protected function postDeleteHook($object) { }", "public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}", "public function preRemove($entity);", "public function deleted() {\n // TODO Implement this\n }", "public function deleting()\n {\n # code...\n }", "function onDelete()\n\t{\n\t\treturn $this->getLookupTable()->deleteKey($this->getValue());\n\t}", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "function before_delete() {}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function onAfterDelete()\n\t{\n\t\t// attempt to save this entry to ensure relationship integrity.\n\t\t// TODO make sure everything is already dissociated when we hit this\n\t\t$last_author = $this->Author;\n\t\t$this->Author = NULL;\n\n\t\t$last_author->updateAuthorStats();\n\t\t$this->updateEntryStats();\n\t}", "public function remove()\n {\n\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "function remove($aws_data_object) {\n\t\t}", "public function remove()\n {\n }", "public function preRemoveCallback()\n {\n $this->performPreRemoveCallback();\n }", "public function preRemoveCallback()\n {\n $this->performPreRemoveCallback();\n }", "protected function _postDelete()\n {\n $this->clearResources();\n }", "public function afterDelete()\n {\n \\PProject::model()->updateAll([\n 'artist_id' => new \\CDbExpression('NULL')\n ], 'artist_id = :artist_id', [\n ':artist_id' => $this->id\n ]);\n }", "public function delete() {}", "public function delete() {}", "public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}", "public function delete() {}", "public function canBeRemoved() {}", "public function delete() {}", "protected function processDeletedObjects() {}", "public function remove($object): void;", "public function onAfterDelete() {\n parent::onAfterDelete();\n\n foreach ($this->Items() as $item) {\n $item->delete();\n }\n }", "public function delete_data_to_tombstone(){\n }", "protected function _postDelete()\n\t{\n\t}", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function removeRetainsObjectForObjectsNotInCurrentSession() {}", "public function onAfterDelete()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n // Force SearchUpdater to mark this record as dirty\n // Note: Some extensions require entire hierarchy passed to augmentWrite()\n $manipulation = array();\n foreach (ClassInfo::ancestry($this->owner) as $class) {\n if (!is_subclass_of($class, DataObject::class)) {\n continue;\n }\n\n $tableName = DataObject::getSchema()->tableName($class);\n $manipulation[$tableName] = array(\n 'fields' => array(),\n 'id' => $this->owner->ID,\n 'class' => $class,\n // Note: 'delete' command not actually handled by manipulations,\n // but added so that SearchUpdater can detect the deletion\n 'command' => 'delete'\n );\n }\n\n $this->owner->extend('augmentWrite', $manipulation);\n\n SearchUpdater::handle_manipulation($manipulation);\n }", "protected function _predelete() {\n }", "public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }", "function delete () {\n\t\t$stm = DB::$pdo->prepare(\"delete from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function remove($object)\n {\n parent::delete($object); // TODO: Change the autogenerated stub\n }", "protected function onAfterDelete()\n {\n $s3 = $this->getS3Client();\n\n $cmd = $s3->getCommand('DeleteObject', [\n 'Bucket' => $this->Bucket,\n 'Key' => $this->Key\n ]);\n\n $s3->execute($cmd);\n\n return parent::onAfterDelete();\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function register_delete_callback( $callback );", "function OnAfterDeleteItem(){\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}", "public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }", "protected function delete() {\n\t}", "protected function onDeleted()\n {\n return true;\n }", "public final function delete() {\n }", "function afterDelete() {\n \t\t$this->_ownerModel->deleteAll(array(\n \t\t\t\t'model' => $this->_Model->alias,\n \t\t\t\t'foreign_key' => $this->_Model->id,\n \t\t\t\t$this->settings[$this->_Model->alias]['userPrimaryKey'] => $this->_User,\n \t\t));\n\t\t}", "protected function onDeleting()\n {\n return true;\n }", "public function remove($object);", "public function remove($object);", "public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }", "public function delete()\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->remove_item($this->item['id']);\n }", "protected function beforeDelete()\n {\n }", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "public function onBeforeDelete()\n {\n // after deleting the code it's not validatable anymore, simply here for cleanup\n if ($this->TicketQRCode()->exists()) {\n $this->TicketQRCode()->delete();\n }\n\n parent::onBeforeDelete();\n }", "public function hook_after_delete($id) {\n\n }", "public function delete() {\r\n }", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }" ]
[ "0.76699215", "0.7421804", "0.729886", "0.7280106", "0.71365166", "0.71324843", "0.7089952", "0.70717645", "0.7046764", "0.7016627", "0.7016627", "0.69988257", "0.6998365", "0.69609445", "0.696023", "0.6957569", "0.6956488", "0.69203836", "0.68374366", "0.68128425", "0.67887104", "0.6758243", "0.6736086", "0.6705919", "0.66732043", "0.66551405", "0.6634565", "0.66012514", "0.66012514", "0.66012514", "0.66012514", "0.65848255", "0.65837", "0.6577467", "0.65556586", "0.651445", "0.650378", "0.6497509", "0.64933497", "0.64897656", "0.6489442", "0.6481188", "0.64729357", "0.64675856", "0.6462035", "0.6451028", "0.6445043", "0.64289975", "0.6424701", "0.6424701", "0.6424701", "0.6413258", "0.64045703", "0.640343", "0.6400164", "0.6371693", "0.63689315", "0.63689315", "0.63580686", "0.63503736", "0.6341544", "0.6341544", "0.63413894", "0.6341167", "0.63405836", "0.6340339", "0.6336355", "0.63334167", "0.6326009", "0.63203996", "0.6316915", "0.62752277", "0.6275109", "0.627236", "0.6265945", "0.6252805", "0.62381107", "0.6219351", "0.6218567", "0.6218498", "0.62135625", "0.6196188", "0.6186343", "0.6183538", "0.6178736", "0.6161669", "0.6146876", "0.61424804", "0.61407393", "0.61373264", "0.61294395", "0.6113155", "0.6113155", "0.6110425", "0.6108702", "0.60934615", "0.6084888", "0.6068815", "0.60556555", "0.60531163", "0.6052543" ]
0.0
-1
API Callback after this object is written to the DB
public function onAfterWrite() { parent::onAfterWrite(); // Check if an order number has been generated, if not, add it and save again if(!$this->OrderNumber) { $this->OrderNumber = $this->generate_order_number(); $this->write(); } // Deal with sending the status email if($this->isChanged('Status') && in_array($this->Status, array('failed','paid','processing','dispatched')) ) { $siteconfig = SiteConfig::current_site_config(); $from = $siteconfig->EmailFromAddress; $vars = array( 'Order' => $this, 'SiteConfig' => $siteconfig ); // Deal with customer email if($siteconfig->sendCommerceEmail('Customer', $this->Status)) { // if subsites installed, then get the native language for that site $current_i18n = i18n::get_locale(); if($this->SubsiteID && class_exists('Subsite') && $this->Subsite()) i18n::set_locale($this->Subsite()->Language); $subject = _t('CommerceEmail.Order', 'Order') . " {$this->OrderNumber} {$this->getTranslatedStatus()}"; $body = $this->renderWith('OrderEmail_Customer', $vars); $email = new Email($from,$this->Email,$subject,$body); $email->sendPlain(); // If subsites enabled, set the language back if($this->SubsiteID && class_exists('Subsite') && $this->Subsite()) i18n::set_locale($current_i18n); } // Deal with vendor email if($siteconfig->sendCommerceEmail('Vendor', $this->Status)) { $subject = _t('CommerceEmail.Order', 'Order') . " {$this->OrderNumber} {$this->getTranslatedStatus()}"; switch($this->Status) { case 'paid': $email_to = $siteconfig->PaidEmailAddress; case 'processing': $email_to = $siteconfig->ProcessingEmailAddress; case 'dispatched': $email_to = $siteconfig->DispatchedEmailAddress; } if(isset($email_to)) { $body = $this->renderWith('OrderEmail_Vendor', $vars); $email = new Email($from,$email_to,$subject,$body); $email->sendPlain(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "public function onAfterSave();", "public function saveToDB()\n {\n }", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function save() {}", "public function save() {}", "public function save() {}", "public function afterSaveCommit(): void\n {\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function commit() {}", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function postSave() {}", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "public abstract function commit();", "protected function performPostPersistCallback()\n {\n // echo 'inserted a record ...';\n return true;\n }", "public final function save() {\n }", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function afterSave(){\n\t}", "public final function save()\n {\n }", "public function afterSave()\n {\n\n }", "public function saveToDb()\n\t{\n\t\tparent::saveToDb();\n\t\t$this->insertAttachment();\n\t}", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n }", "public function save() {\n\t\t\t\n\t\t}", "protected function _postSave()\r\n\t{\r\n\t}", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function commit();", "public function committed();", "public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function _postInsert()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function save()\n {\n // For V2.0\n }", "protected function hook_afterSave(){}", "public abstract function save();", "protected function _postInsert()\n\t{\n\t}", "function after_save() {}", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function save()\r\n {\r\n //\r\n }", "public function save()\n\t{\n\t\t$this->copyAttributesToValues() ;\n\t\tif( $this->factory )\n\t\t{\n\t\t\tswitch( $this->todo )\n\t\t\t{\n\t\t\t\tcase 1: // Insert\n\t\t\t\t\tif( $this->factory->insertObjectIntoDB( $this ) ) $this->state = \"inserted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2: // update\n\t\t\t\t\tif( $this->factory->updateObjectIntoDB( $this ) ) $this->state = \"updated\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3: // delete\n\t\t\t\t\tif( $this->factory->deleteObjectIntoDB( $this ) ) $this->state = \"deleted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "public function save() {\n $db = Db::instance();\n $db_properties = array(\n 'action' => $this->action,\n 'url_mod' => $this->url_mod,\n 'description' => $this->description,\n 'target_id' => $this->target_id,\n 'target_name' => $this->target_name,\n 'creator_id' => $this->creator_id,\n 'creator_username' => $this->creator_username\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save() {\n }", "public function save() {\n }", "protected function afterSave() {\n\n }", "public function onAfterWrite() {\r\n\t\tparent::onAfterWrite();\r\n\t\t$this->zlog('Write');\r\n\t}", "public function persist() {}", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function commitUpdate();", "public function save()\n\t{\n\n\t}", "public function save() {\n }", "protected function saveUpdate()\n {\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'event_type_id' => $this->event_type_id,\n 'user_1_id' => $this->user_1_id,\n 'user_2_id' => $this->user_2_id,\n 'user_1_name' => $this->user_1_name,\n 'user_2_name' => $this->user_2_name,\n 'product_1_name' => $this->product_1_name,\n 'product_2_name' => $this->product_2_name,\n 'data_1' => $this->data_1,\n 'data_2' => $this->data_2\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save() \n {\n\t\t$this->setLastUpdateTime(date(MYSQL_DATETIME_FORMAT));\n\n\t\tif($this->getId() ) {\n\t\t\treturn $this->_update();\n\t\t} else {\n\t\t\treturn $this->_insert();\n\t\t}\n\t}", "public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }", "protected function saveInsert()\n {\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function onWrite();", "public function save()\n {\n $db = DatabaseUtil::db_connect($this->database);\n $db->query('update ' . $this->table . 'set ' . $this->column . ' = ' . $this->value . ' where ID=' . $this->ID);\n $db->close();\n }", "public function save()\n {\n //\n }", "public function save(){\r\n\t\tif ($this->new){\r\n\t\t\treturn $this->insert();\r\n\t\t} else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}", "public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }", "public function saveData()\r\n {\r\n \r\n }", "public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function finished() {\n $this->setFinishedAt(new MongoDate());\n $this->save();\n }", "protected function afterInsert()\n {\n }", "public function save()\n {\n $this->persist($this->state);\n }", "public function persist()\n {\n //\n }" ]
[ "0.7129526", "0.7129526", "0.7050235", "0.70251524", "0.70251524", "0.69667184", "0.68732816", "0.6855578", "0.6800485", "0.67896706", "0.67896706", "0.6789429", "0.6755349", "0.66785234", "0.6656412", "0.6648279", "0.66437894", "0.6592316", "0.6588565", "0.65849906", "0.65582246", "0.65559506", "0.65451765", "0.65232706", "0.65225756", "0.64995736", "0.64965194", "0.6466467", "0.6461482", "0.64611846", "0.6453964", "0.6447375", "0.64342505", "0.6430006", "0.64270705", "0.64270705", "0.64270705", "0.64270705", "0.64270705", "0.64199126", "0.6409431", "0.64040005", "0.6402652", "0.64013034", "0.6399942", "0.6394148", "0.6390761", "0.6375807", "0.6366022", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348689", "0.6348369", "0.63459843", "0.6343845", "0.63133603", "0.6312387", "0.6312387", "0.6311386", "0.63091564", "0.6307609", "0.6297953", "0.62905866", "0.62854016", "0.6284267", "0.626024", "0.6256434", "0.6247989", "0.6242561", "0.6235536", "0.6234879", "0.623314", "0.6225462", "0.62246996", "0.62243557", "0.6207551", "0.6204998", "0.6193788", "0.6193678", "0.61876386", "0.61876386", "0.61785835", "0.61767113", "0.61718786", "0.6171697", "0.6167773" ]
0.0
-1
API Callback after this object is removed from to the DB
public function onAfterDelete() { parent::onAfterDelete(); foreach ($this->Items() as $item) { $item->delete(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onRemove();", "public function after_delete() {}", "public function afterRemove()\n\t{}", "protected function afterRemoving()\n {\n }", "public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }", "protected function afterDelete()\r\n {\r\n }", "public function onAfterDelete();", "function after_delete() {}", "public function remove() {}", "public function remove() {}", "protected function afterDelete()\n {\n }", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "public function postRemoveCallback()\n {\n $this->performPostRemoveCallback();\n }", "protected function performPostRemoveCallback()\n {\n // echo 'deleted a record ...';\n \n return true;\n }", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "abstract public static function deleted($callback);", "public function postRemove($entity);", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function remove ($obj) {}", "public function afterDeleteCommit(): void\n {\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function remove() {\n }", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function deleted() {\n // TODO Implement this\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function deleting()\n {\n # code...\n }", "function remove($aws_data_object) {\n\t\t}", "protected function postDeleteHook($object) { }", "function onDelete()\n\t{\n\t\treturn $this->getLookupTable()->deleteKey($this->getValue());\n\t}", "public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}", "public function remove($object): void;", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function onAfterDelete()\n\t{\n\t\t// attempt to save this entry to ensure relationship integrity.\n\t\t// TODO make sure everything is already dissociated when we hit this\n\t\t$last_author = $this->Author;\n\t\t$this->Author = NULL;\n\n\t\t$last_author->updateAuthorStats();\n\t\t$this->updateEntryStats();\n\t}", "protected function beforeRemoving()\n {\n }", "public function afterDelete()\n {\n \\PProject::model()->updateAll([\n 'artist_id' => new \\CDbExpression('NULL')\n ], 'artist_id = :artist_id', [\n ':artist_id' => $this->id\n ]);\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function remove($object)\n {\n parent::delete($object); // TODO: Change the autogenerated stub\n }", "function delete () {\n\t\t$stm = DB::$pdo->prepare(\"delete from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function remove()\n {\n\n }", "public function onAfterDelete()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n // Force SearchUpdater to mark this record as dirty\n // Note: Some extensions require entire hierarchy passed to augmentWrite()\n $manipulation = array();\n foreach (ClassInfo::ancestry($this->owner) as $class) {\n if (!is_subclass_of($class, DataObject::class)) {\n continue;\n }\n\n $tableName = DataObject::getSchema()->tableName($class);\n $manipulation[$tableName] = array(\n 'fields' => array(),\n 'id' => $this->owner->ID,\n 'class' => $class,\n // Note: 'delete' command not actually handled by manipulations,\n // but added so that SearchUpdater can detect the deletion\n 'command' => 'delete'\n );\n }\n\n $this->owner->extend('augmentWrite', $manipulation);\n\n SearchUpdater::handle_manipulation($manipulation);\n }", "public function remove()\n {\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function onBeforeDelete();", "public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}", "protected function _postDelete()\n {\n $this->clearResources();\n }", "public function finish()\n {\n // get the alternate's person record\n $db_alternate = lib::create( 'database\\alternate', $this->get_argument( 'remove_id' ) );\n $db_person = $db_alternate->get_person();\n\n // call the parent method to delete the alternate\n parent::finish();\n\n // now delete the person\n try\n {\n $db_person->delete();\n }\n catch( \\cenozo\\exception\\database $e )\n { // help describe exceptions to the user\n if( $e->is_constrained() )\n {\n throw lib::create( 'exception\\notice',\n 'Unable to delete the '.$this->child_subject.\n ' because it is being referenced by the database.', __METHOD__, $e );\n }\n\n throw $e;\n } \n }", "protected function _preDelete() {}", "public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}", "public function delete()\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->remove_item($this->item['id']);\n }", "public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }", "public function delete_data_to_tombstone(){\n }", "public function remove($object);", "public function remove($object);", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "protected function onAfterDelete()\n {\n $s3 = $this->getS3Client();\n\n $cmd = $s3->getCommand('DeleteObject', [\n 'Bucket' => $this->Bucket,\n 'Key' => $this->Key\n ]);\n\n $s3->execute($cmd);\n\n return parent::onAfterDelete();\n }", "public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }", "public final function delete() {\n }", "protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}", "public function removeRetainsObjectForObjectsNotInCurrentSession() {}", "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "function afterDelete() {\n \t\t$this->_ownerModel->deleteAll(array(\n \t\t\t\t'model' => $this->_Model->alias,\n \t\t\t\t'foreign_key' => $this->_Model->id,\n \t\t\t\t$this->settings[$this->_Model->alias]['userPrimaryKey'] => $this->_User,\n \t\t));\n\t\t}", "function OnAfterDeleteItem(){\n }", "public function delete()\n {\n $database = cbSQLConnect::adminConnect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "protected function _postDelete()\n\t{\n\t}", "public function afterDelete()\n {\n foreach (static::find()->where(['parent_id' => $this->id])->all() as $item) {\n $item->delete();\n }\n }", "protected function processDeletedObjects() {}", "function delete() {\n\t\treturn $this->destroy();\n\n\t}", "public function preDelete() { }", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "public function delete($object) {\r\n \r\n }", "public function register_delete_callback( $callback );", "protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t\tComment::model()->deleteAll('photo_id='.$this->id);\n\t\tTag::model()->updateFrequency($this->tags, '');\n\t}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "protected function delete() {\n\t}", "protected function preDeleteHook($object) { }", "public function delete() {\r\n }", "public function preRemove($entity);", "public function hook_after_delete($id) {\n\n }", "function destroy() {\n\t\tif (!$this->before_destroy()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->remove_dependents();\n\n\t\tif (isset($this->deleted_field)) {\n\t\t\t$query = \"UPDATE \".$this->db->escape_identifier($this->table).\" SET \".$this->deleted_field.\" = '1'\".$this->where_this();\n\n\t\t} else {\n\t\t\t$query = \"DELETE FROM \".$this->db->escape_identifier($this->table).$this->where_this();\n\n\t\t}\n\n\t\t$result = $this->db->query($query);\n\n\t\t$this->after_destroy();\n\n\t\treturn $result;\n\n\t}", "protected function afterDelete()\n {\n parent::afterDelete();\n //Comment::model()->deleteAll('post_id='.$this->id);\n VideoTag::model()->updateFrequency($this->tags, '');\n }" ]
[ "0.7542932", "0.73507524", "0.7181743", "0.71804345", "0.71469074", "0.7015905", "0.7003163", "0.6979227", "0.6960795", "0.6960478", "0.692682", "0.689657", "0.689657", "0.6820351", "0.67868817", "0.6757821", "0.675697", "0.6723526", "0.6718578", "0.6713574", "0.6701855", "0.66992736", "0.6658138", "0.6654318", "0.66025656", "0.6596642", "0.6596642", "0.6596642", "0.6596642", "0.6565741", "0.654933", "0.6543991", "0.6517854", "0.6506546", "0.6506426", "0.6499059", "0.64617604", "0.64521694", "0.6445973", "0.64354306", "0.64123183", "0.64029855", "0.6387667", "0.63780236", "0.6371369", "0.6371369", "0.6371369", "0.6366405", "0.63660896", "0.63464904", "0.6334997", "0.6334997", "0.633474", "0.63332385", "0.63298965", "0.6327441", "0.63212436", "0.6305321", "0.62913007", "0.6271274", "0.6263065", "0.6262688", "0.6252019", "0.62485653", "0.62472343", "0.62341416", "0.62331194", "0.6223923", "0.6219607", "0.62170374", "0.62170374", "0.62092656", "0.62063843", "0.6194629", "0.61869276", "0.61779356", "0.6176018", "0.61756307", "0.6163842", "0.6158258", "0.61547244", "0.6146859", "0.6146671", "0.61296403", "0.6110878", "0.6100905", "0.60946625", "0.60854965", "0.60822105", "0.60718834", "0.60681653", "0.6060381", "0.605814", "0.6057528", "0.6055111", "0.605308", "0.6040846", "0.6039873", "0.6037524", "0.60373694" ]
0.6448388
38
Only order creators or users with VIEW admin rights can view
public function canView($member = null) { $extended = $this->extend('canView', $member); if($extended && $extended !== null) return $extended; if($member instanceof Member) $memberID = $member->ID; else if(is_numeric($member)) $memberID = $member; else $memberID = Member::currentUserID(); if($memberID && Permission::checkMember($memberID, array("ADMIN", "COMMERCE_VIEW_ORDERS"))) return true; else if($memberID && $memberID == $this->CustomerID) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commerce_store_admin_order_view_access($order) {\n $access = commerce_order_admin_order_view_access($order);\n return $access || user_access('view any commerce_order entity in own store') && commerce_order_access('view', $order);\n}", "public function adminOnly();", "public function adminOnly();", "public function get_adminOrder(){\n if(Auth::user()->user_type == 0){\n return redirect('/adminlogin');\n }\n $orders = Transaction::all();\n return view('admin.orders',compact('orders'));\n }", "public function testAdminOrderView() {\n $line_item = $this->createEntity('commerce_line_item', [\n 'type' => 'product_variation',\n 'unit_price' => [\n 'amount' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'line_items' => [$line_item],\n ]);\n\n // First test that the current admin user can see the order.\n $this->drupalGet($order->toUrl()->toString());\n $this->assertSession()->statusCodeEquals(200);\n\n // Order displays email address.\n $this->assertSession()->pageTextContains($this->loggedInUser->getEmail());\n\n // Logout and check that anonymous users cannot see the order admin screen\n // and receive a 403 error code.\n $this->drupalLogout();\n\n $this->drupalGet($order->toUrl()->toString());\n $this->assertSession()->statusCodeEquals(403);\n }", "function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}", "public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }", "protected function isAdminUser() {}", "private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}", "public function is_admin_only()\n\t{\n\t\treturn false;\n\t}", "public function isAdmin();", "public function adminAll(){\n $orders = order::with('user')->withTrashed()->get();\n return view('Admin.Orders.all',compact('orders'));\n }", "public function index()\n {\n if(auth()->user()->hasRole('owner')){\n return view('items.index', ['categories' => auth()->user()->restorant->categories->reverse(), 'restorant_id' => auth()->user()->restorant->id]);\n }else\n return redirect()->route('orders.index')->withStatus(__('No Access'));\n }", "public function AdminView(){\n //Restricting this view for operators (Only SuperAdmins should be able to view)\n if(Auth::user()->role ==='Admin'){\n\n $data['allData'] = Admin::all();\n return view('backend.admin.view_admin',$data);\n\n }else{\n return redirect('admin/error')->with('error', 'You are not allowed to access this page');\n }\n }", "function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }", "public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}", "public function isAdmin() {}", "protected function isCurrentUserAdmin() {}", "public function authorize()\n {\n $order = $this->route('order');\n if($order){\n \t$order_repository = app()->make(orderRepository::class);\n\t return $order_repository->accesibleOrders(Auth::user())->findOneBy($order->id);\n\n }\n return false;\n\n }", "protected function isCurrentUserAdmin() {}", "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n //managers can add / edit\n if (in_array($this->request->action, ['delete','add','edit','reorder'])) {\n if ($user['group_id'] <= 4) {\n return true;\n }\n }\n \n \n //Admins have all\n return parent::isAuthorized($user);\n }", "function authorizedAdminOnly(){\n global $authenticatedUser;\n if(!$authenticatedUser['admin']){\n header(\"HTTP/1.1 403 Forbidden\");\n header(\"Location: https://eso.vse.cz/~frim00/marvelous-movies/error-403\");\n exit();\n }\n }", "public function checkACL()\n {\n return parent::checkACL() || \\XLite\\Core\\Auth::getInstance()->isPermissionAllowed('manage orders');\n }", "public function hasAdminRights() {\n return in_array($this['user_type_id'], [3, 7]);\n }", "public function relatorio4(){\n $this->isAdmin();\n }", "public function rol_conductor_only_access()\n {\n if ($this->rol != 3) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }", "function isAdmin(){\n$user = $this->loadUser(Yii::app()->user->user_id);\nreturn intval($user->user_role_id) == 1;\n}", "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Edit products') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }", "public function getIsAdmin();", "public function getIsAdmin();", "public function adminUserConditionMatchesAdminUser() {}", "public function isAdmin()\n {\n }", "private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }", "public function isAdmin(){\n\t\tparent::isAdmin();\n\t}", "function vns_subscribe_order_add_access_capabilities() {\n $roles = array( 'administrator','editor' );\n foreach ( $roles as $role ) {\n \n $role = get_role( $role );\n if ( empty( $role ) ) {\n continue;\n }\n \n \n \n \n if(!$role->has_cap( 'vns_subscribe_order_view_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_view_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_add_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_add_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_edit_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_edit_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_delete_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_delete_news' );\n }\n \n \n \n }\n \n $user = wp_get_current_user();\n $user->get_role_caps();\n \n}", "function checkAdminOwner() {\n //Ensure user is logged in\n if(Auth::guest()) {\n return false;\n }\n //Ensure that the user is an admin or an owner\n $roles = Auth::user()->roles;\n //Loop through roles and check for permission\n foreach($roles as $role) {\n if($role->name == \"admin\" || $role->name == \"owner\") {\n //Double check to make sure user is not banned\n if(checkSingleRole(\"banned\") == false)\n return true;\n else\n return false; //User is an admin but is banned\n }\n }\n //User is not an admin or an owner\n return false;\n}", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "public function mustbeadmin()\n {\n if (!$this->hasadmin())\n {\n $this->web()->noaccess();\n }\n }", "function canView($user) {\n if($this->isOwner()) {\n return true;\n } // if\n \n return in_array($this->getId(), $user->visibleCompanyIds());\n }", "public function _isAdmin() {\n\t\t$user_id = $this->Auth->user('id');\n\t\t$aro = array('model' => 'User', 'foreign_key' => $user_id); \n\t\t$aco = 'role/super/admin';\n\t\treturn $this->Acl->check($aro, $aco);\n\t}", "public function view(User $user, Order $order)\n {\n return $user->hasPermission('order.viewany') || $order->customer->id == $user->id;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/order');\n }", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "public function authorize()\n {\n return Auth::user()->type == 'admin';\n }", "public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }", "public function viewableByOwnerOnly();", "public function index()\n {\n $id = Auth::user()->id;\n $orders = Order::where('user_id',$id)->get();\n $orders_done = Order::where('user_id',$id)->where('etat', 'Termine')->get();\n $orders_undone = Order::where('user_id',$id)->where('etat','en attente')->get();\n\n return view('adminpanel.index', ['orders_done' => $orders_done, 'orders_undone' => $orders_undone, 'orders' => $orders ]);\n }", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "public function index()\n {\n if(auth()->user()->id!='30'){ //hereglegch ni admin bish bol\n $user_id=auth()->user()->id;\n $user=User::find($user_id);\n $data['orders'] = Auth::user()->orders;\n $data['orders'] -> transform(function($order,$key){\n $order->cart = unserialize($order->cart);\n return $order;\n });\n $data['posts']=$user->posts;\n }\n if(auth()->user()->isadmined=='1'){ //hereglegch ni admin bol\n $data['all_orders'] = Order::orderBy('id','desc')->paginate(5);\n $data['all_orders'] -> transform(function($order,$key){\n $order->cart = unserialize($order->cart);\n return $order;\n });\n $data['$S_users']= User::orderBy('id','desc')->paginate(5);\n }\n return view('dashboard')->with('data',$data);\n }", "public function index()\n {\n if(\\Auth::user()->type =='admin'){\n $orders = Order::all()->sortByDesc(\"created_at\");\n } else {\n $orders = Order::where('user_id', \\Auth::user()->id)->get();\n }\n \n return view('order.index', ['orders'=>$orders]);\n }", "public function admin_order()\n {\n /*return view('admin_order');*/\n $orders = Scrap_order::get();\n return view('admin_order', ['orders' => $orders]);\n }", "function action_admin(&$handler)\n {\n // Access control\n if (!$this->allowed(\"any_project\"))\n {\n $user = getUser();\n $this->addFilter(\"project.coordinator=\".$user[\"id\"]);\n }\n return $handler->action_admin();\n }", "public function orders()\n {\n return $this->belongsToMany('Dashboard\\Sales\\Order')->onlyOwners();\n }", "public function isAdmin()\n {\n return $this->group_id === 1;\n }", "protected function _canViewOrder($order)\n {\n $customerId = Mage::getSingleton('customer/session')->getCustomerId();\n if (isset($order['osc_magento_id']) && isset($order['magento_customers_id']) && $order['magento_customers_id'] == $customerId) {\n return true;\n }\n return false;\n }", "public function actionIndex()\n {\n $user = $user=\\common\\models\\User::find()\n ->where(['=', 'user.id', Yii::$app->user->id])\n ->one();\n if ($user->role_id == \"theCreator\"){\n $users = \\common\\models\\User::find()->andWhere(['=', 'role_id', 'Admin'])->all();\n return $this->render('index', [\n 'users' => $users,\n\n ]);\n }\n else{\n return $this->render('../site/error');\n }\n }", "public function view(Admin $admin)\n {\n return $admin->checkPermission('show_listAdmin');\n }", "public function administradores(){\n\n $users = User::where('id', '!=', Auth::user()->id)->get();\n\n return view('administradores', compact('users'));\n }", "public function isAuthorized($user) {\n if ($this->action === 'add') {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('edit', 'delete'))) {\n $presupuestoId = $this->request->params['pass'][0];\n if ($this->Post->isOwnedBy($presupuestoId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "public function authorize()\n {\n return Auth()->user()->can('isAdmin');\n }", "public function isAdmin(){\n return $this->role=='admin';\n }", "public function IsAdmin ();", "private function canViewOrder(\\Magento\\Sales\\Model\\Order $order)\n {\n $customerId = $this->userContext->getUserId();\n $orderOwnerId = $order->getCustomerId();\n if ($orderOwnerId != $customerId &&\n (\n !$this->authorization->isAllowed('Magento_Sales::view_orders_sub') ||\n !$this->companyContext->isModuleActive()\n )\n ) {\n return false;\n }\n\n if ($this->companyContext->isCurrentUserCompanyUser()\n && !$this->authorization->isAllowed('Magento_Sales::view_orders')) {\n return false;\n }\n\n $subCustomers = $this->companyStructure->getAllowedChildrenIds($customerId);\n if (!in_array($orderOwnerId, $subCustomers) && $orderOwnerId != $customerId) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public static function requireAdmin() {\n\t$status = (Yii::$app->user->identity->roles == 'admin') ? true : false;\n return $status\n }", "public function view_order()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$this->data['heading'] = 'View Order';\n\t\t\t$user_id = $this->uri->segment(4, 0);\n\t\t\t$deal_id = $this->uri->segment(5, 0);\n\t\t\t$this->data['ViewList'] = $this->order_model->view_orders($user_id, $deal_id);\n\t\t\t$this->load->view('admin/order/view_orders', $this->data);\n\t\t}\n\t}", "public function actionAdministrador(){\n\t\t//total inscritos\n\t\t//total comunicaciones\n\t\t//pendientes de revisar?\n\t\tif( Yii::app()->user->rol == 1 || Yii::app()->user->rol == 2){\t\t\n\t\t\t$edicion = Dato::model()->find('clave = \"edicion\"');\n\t\t\t$pagado = $this->totalpagado();\n\n\t\t\t$total = $this->totalPagar();\n\n\t\t\t$comunicaciones = $this->totalComunicaciones();\n\n\t\t\t$norevisadas = $this->pendientesRevisar();\n\n\t\t\t$inscritos = $this->totalInscritos();\n\t\t\t\n\t\t\t$datos = $this->totalInscritosGrafica();\n\t\t\t$this->render('administrador', array(\n\t\t\t\t'total'=>$total, \n\t\t\t\t'pagado' => $pagado,\n\t\t\t\t'inscritos'=>$inscritos,\n\t\t\t\t'comunicaciones'=>$comunicaciones,\n\t\t\t\t'norevisadas'=>$norevisadas,\n\t\t\t\t'edicion' => $edicion->valor,\n\t\t\t\t'datos' => $datos,\n\t\t\t\t)\n\t\t\t);\n\t\t}else{\n\t\t\tYii::app()->end();\n\t\t}\n\t}", "public function isAdmin()\n {\n return $this->role == 1;\n }", "function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}", "function adminUsers()\n {\n $userLogged = Auth::check(['administrateur']);\n \n $userManager = new UserManager();\n $listUsers = $userManager->getListUsers();\n require'../app/Views/backViews/user/backAdminUsersView.php';\n }", "public function index()\n {\n $allorder= [];\n if(auth()->user()->level == 'admin' )\n {\n $allorder= Order::paginate(10);\n }\n else{\n $allorder=Order::where('user_id',auth()->user()->id)->paginate(10);\n }\n\n \n return view(ad.'.order.index',['title'=>trans('admin.order'),'all'=>$allorder]);\n }", "public function adminOrderIndex()\n {\n $orders = Order::with(['products', 'user'])->whereNotNull('paid_datetime')->latest()->get()->all();\n return view('admin.orders.index', compact('orders'));\n }", "protected function requiresAdmin() {\n if (!$this->evaluateACLS(self::ACL_ADMIN)) {\n $this->unauthorizedAccess();\n }\n }", "public function checkAccess()\n {\n $orders = $this->getOrders();\n\n return parent::checkAccess()\n && $orders\n && $orders[0]\n && $orders[0]->getProfile();\n }", "public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }", "public static function getAdminList()\n {\n \t$type = \"text/html\";\n \t$terms = array(\n \t\t\t'isapproved' => 1\n \t);\n \t$data = self::getListByFilter($terms);\n \n \treturn response()->view('adminlist', [ 'data' => $data, 'isadmin' => self::isAdmin()])->header('Content-Type', $type);\n }", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "public function authorize()\n {\n return Auth::check() && Auth::user()->hasAnyRol([\n 'contractor-superadmin',\n 'contractor-manager',\n 'contractor-worker',\n 'contractor-admin',\n ]);\n }", "public function isAuthorized($user) {\n if (isset($user['role']) && $this->action == 'index') {\n return true;\n }\n \n // The owner of a whatever can view, edit and delete it\n $userAssignedId = $this->{$this->modelClass}->findById($this->request->params['pass'][0])['Branch']['user_id'];\n\n if( $user['id'] == $userAssignedId ){\n return true;\n }\n // Default deny\n return parent::isAuthorized($user); \n }", "public function isAdmin()\n {\n if($this->u_r_id==null )\n {\n $this->u_r_id = array();\n $this->u_r_id[]=0;\n\n\n }\n foreach ($this->u_r_id as $int)\n {\n if($int==1)\n return true;\n }\n return false;\n }", "public function is_admin(){\n\t\treturn $this->account_type == \"manager\";\n\t}", "public function isAdmin()\n {\n return (\\Auth::user()->role == 'admin');\n }", "function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return auth()->user()->admin();\n }", "public function authorize()\n {\n return auth()->user()->admin();\n }", "public function authorize()\n {\n return auth()->user()->admin();\n }", "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('table'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "public function isAuthorized($user)\n{\n if (in_array($this->request->action,['postjob','apply','posted','applied','getjob'])) {\n return true;\n }\n // The owner of an job can edit and delete it\n if (in_array($this->request->action, ['edit', 'delete'])) {\n $jobId = (int)$this->request->params['pass'][0];\n if ($this->Jobs->isOwnedBy($jobId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}", "public function get_adminIndex(){\n if(Auth::user()->user_type == 0){\n return redirect('/adminlogin');\n }\n return view('admin.index');\n }", "public function isAdministrador(){ return false; }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "function IsAdmin()\n{\n\treturn false;\n}", "function rordb_can_user_view_items(){\n return current_user_can('rordb_view_items');\n}" ]
[ "0.74309516", "0.6762254", "0.6762254", "0.67123437", "0.6495226", "0.64607954", "0.63877654", "0.631979", "0.630981", "0.62731874", "0.62484103", "0.62472475", "0.6245806", "0.62293524", "0.6213342", "0.61986494", "0.6196738", "0.6171531", "0.6166352", "0.6165085", "0.6138691", "0.61261", "0.6103077", "0.60917604", "0.60896057", "0.6077402", "0.6062271", "0.6054029", "0.6040852", "0.6034649", "0.6034649", "0.60341513", "0.60312134", "0.6023663", "0.60189736", "0.60135126", "0.60132396", "0.6010678", "0.59806913", "0.59742707", "0.5967618", "0.59518677", "0.59452873", "0.5943848", "0.5943848", "0.59434974", "0.59358793", "0.5924156", "0.5919407", "0.59092784", "0.5905848", "0.5901535", "0.5900996", "0.5897324", "0.5893759", "0.58924407", "0.5887282", "0.58866334", "0.58848006", "0.5881127", "0.58804226", "0.5879655", "0.5877371", "0.5870123", "0.5869751", "0.58689576", "0.58688736", "0.5867898", "0.58657295", "0.5864553", "0.58619875", "0.58589935", "0.58481246", "0.58455086", "0.5840846", "0.5830872", "0.5828891", "0.5826259", "0.58248925", "0.58139825", "0.58080006", "0.5803573", "0.5803498", "0.58020633", "0.5801285", "0.5795627", "0.5794903", "0.5787331", "0.5786644", "0.57682395", "0.57682395", "0.57682395", "0.5767582", "0.5766286", "0.5764023", "0.5760773", "0.5758416", "0.5751083", "0.5751083", "0.575062", "0.5742332" ]
0.0
-1
Anyone can create orders, even guest users
public function canCreate($member = null) { $extended = $this->extend('canCreate', $member); if($extended && $extended !== null) return $extended; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createOrder(){\n $order = Auth::user()->orders()->create(['status' => 'aguardando']);\n\n return $order;\n }", "public function create()\n {\n if (Gate::allows('create-order')) {\n return view('orders.create', [\n 'order' => null\n ]);\n }\n else {\n abort(403);\n }\n }", "public static function createOrder ()\n\t{\n $user=Auth::user();// here to get the user info and store it in the $user variable\n $order=$user->orders()->create([\n 'total'=>Cart::total(),\n 'delivered' =>0\n\n ]);\n // the delivered column will get by default the value zero which means that this order\n // is not delivered yet \n\n $cartItems=cart::content();\n //seek for intels about attach function \n\n foreach($cartItems as $cartItem)\n $order->orderItems()->attach($cartItem->id,[\n 'qty'=>$cartItem->qty ,\n 'total' => $cartItem->qty*$cartItem->price \n ]);\n\n\t}", "public function creating(Order $Order)\n {\n //code...\n }", "public function createForOthers(User $user)\n {\n return User::hasPermission('order.create-for-others');\n }", "public function canStoreOrder();", "public function create()\n\t{\n\t\tif (\\Auth::user()) {\n\t\t\treturn view('orders.create');\n\t\t} else {\n\t\t\treturn view('auth.login');\n\t\t}\n\t\t\n\t}", "public function testIsUserCanSeeSpecificOrdersForCustomer()\n {\n //when\n $user = factory('App\\User')->create();\n $this->actingAs($user, 'api');\n\n //given\n $customer = factory('App\\Customer')->create();\n $user->customers()->save($customer);\n $order = Order::make(['user_id' => $user->id]);\n $customer->orders()->save($order);\n\n $customer2 = factory('App\\Customer')->create();\n $user->customers()->save($customer2);\n $order2 = Order::make(['user_id' => $user->id]);\n $customer2->orders()->save($order2);\n\n\n $response = $this->post(route('api.customer.orders', [\n 'customer_id' => $customer->id\n ]));\n $response->assertStatus(200);\n $response->assertJson([[\n 'customer_id' => $customer->id,\n 'user_id' => $user->id,\n ]]);\n $response->assertJsonMissing([[\n 'customer_id' => $customer2->id,\n ]]);\n }", "public function create(Order $order)\n {\n //\n }", "public function create(User $user, Order $order)\n {\n if ($user->{'user-id'} === $order->{'user-id-buy'} || $user->{'user-id'} === $order->{'user-id-sell'}) {\n return true;\n }\n\n return false;\n }", "public function creating(Order $order)\n\t{\n\t\t$user = auth()->user();\n\n\t\t// auto set status = pending\n\t\tif (is_null($order->status)) {\n\t\t\t$order->status = Order::STATUS_PENDING;\n\t\t}\n\n\t\t// auto set user_id\n\t\tif (!empty($user)) {\n\n\t\t\t// set user_id as author\n\t\t\tif (empty($order->user_id)) {\n\t\t\t\t$order->user_id = $user->id;\n\t\t\t}\n\n\t\t\t// set company_id\n\t\t\tif (\n\t\t\t\tempty($order->company_id) &&\n\t\t\t\t!is_null($user->getCurrentCompanyId())\n\t\t\t) {\n\t\t\t\t$order->company_id = $user->getCurrentCompanyId();\n\t\t\t}\n\t\t}\n\t}", "public function create() : Orders;", "public function validateSalesOrderCreation()\n {\n if (!$this->_role->getWebsiteIds()) {\n $this->_forward();\n }\n\n // check whether there is disallowed website in request?\n }", "public function createorderAction()\n {\n\t\ttry{\n\t\t\t// Write your code here\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$objOrderTable = $sm->get('Order\\Model\\OrderTable');\n\t\t\t\t\n\t\t\t\t$posts['order_attachment'] = $posts['multipleimagesHidden'];\n\t\t\t\tunset($posts['multipleimagesHidden']);\n\t\t\t\t\n\t\t\t\t/*foreach($posts as $key => $value){\n\t\t\t\t\tif(empty($value))\n\t\t\t\t\t\tunset($posts[$key]);\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tlist($d, $m, $y) = explode('/', $posts['exp_delivery_date']);\n\t\t\t\t$posts['exp_delivery_date'] = \"$y-$m-$d\";\n\t\t\t\t\n\t\t\t\tif(empty($posts['id'])){\n\t\t\t\t\t$posts['created_date'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$posts['created_by'] = $identity['user_id'];\n\t\t\t\t}else{\n\t\t\t\t\t$posts['updated_date'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$posts['updated_by'] = $identity['user_id'];\n\t\t\t\t}\n\t\t\t\tunset($posts['opp_name']);\n\t\t\t\t\n\t\t\t\techo $objOrderTable->createOrder($posts);\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n }", "public function CanProcessOrders()\n {\n if ($this->owner->IsShopAdmin()) {\n return true;\n }\n\n return Permission::checkMember($this->owner, EcommerceConfig::get(EcommerceRole::class, 'process_orders_permission_code'));\n }", "public function testCreateOrder() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'order_items' => [$order_item],\n 'uid' => $this->loggedInUser,\n 'store_id' => $this->store,\n ]);\n\n $order_exists = (bool) Order::load($order->id());\n $this->assertNotEmpty($order_exists, 'The new order has been created in the database.');\n }", "public function create()\n {\n // Admin only\n }", "public function createOrderAction()\n {\n $data = $this->Request()->getParams();\n $data = $data['data'];\n\n $orderNumber = $this->getOrderNumber();\n\n /** @var \\Shopware_Components_CreateBackendOrder $createBackendOrder */\n $createBackendOrder = Shopware()->CreateBackendOrder();\n $hasMailError = false;\n\n try {\n /** @var Shopware\\Models\\Order\\Order $orderModel */\n $orderModel = $createBackendOrder->createOrder($data, $orderNumber);\n\n if (!$orderModel instanceof \\Shopware\\Models\\Order\\Order) {\n $this->view->assign($orderModel);\n\n return false;\n }\n } catch (\\Exception $e) {\n $this->view->assign(\n [\n 'success' => false,\n 'message' => $e->getMessage()\n ]\n );\n\n return;\n }\n\n try {\n //sends and prepares the order confirmation mail\n $this->sendOrderConfirmationMail($orderModel);\n } catch (\\Exception $e) {\n $hasMailError = $e->getMessage();\n }\n\n if ($hasMailError) {\n $this->view->assign(\n [\n 'success' => true,\n 'orderId' => $orderModel->getId(),\n 'mail' => $hasMailError,\n 'ordernumber' => $orderModel->getNumber()\n ]\n );\n\n return;\n }\n\n $this->view->assign(\n [\n 'success' => true,\n 'orderId' => $orderModel->getId(),\n 'ordernumber' => $orderModel->getNumber()\n ]\n );\n }", "public function authorize()\n {\n $order = $this->route('order');\n if($order){\n \t$order_repository = app()->make(orderRepository::class);\n\t return $order_repository->accesibleOrders(Auth::user())->findOneBy($order->id);\n\n }\n return false;\n\n }", "public function create()\n {\n //\n\n // $products = Order::orderByDesc('id')->get();\n // $orderUser = $products->user->id;\n\n // return view('manage_orders', 'orderUser');\n }", "public function creating(Order $order): void\n\t{\n\t\tif (auth()->check()) {\n\t\t\t$order->client_id = auth()->id();\n\t\t}\n\t\t// If a booster has been selected for the order, set its status to progress, otherwise pending\n\t\t(bool) $order->booster_id ? $order->status = 'progress' : 'pending';\n\t}", "function checkAndSaveOrder(){\n if(!getSession('USER')){\n if(!isset($_POST['USER']))\n return false;\n setSession('USER', array(\n 'name' => $_POST['USER']['name'],\n 'phone' => $_POST['USER']['phone'],\n 'email' => $_POST['USER']['email'],\n 'address' => $_POST['USER']['address'],\n )\n );\n }\n\n $orders = getSession('basket');\n\n foreach($orders as $order){\n saveOrder($order);\n /*if(!saveOrder($order));\n return false;*/\n }\n\n return true;\n}", "public function handleOrderCreated(OrderCreatedEvent $event) {\n $order = $event->order;\n $user = $order->user;\n if( null != $user ) {\n $user->notify(new OrderStatusNotification($order, 'created'));\n }\n }", "private function _isGuestOrder()\n {\n return $this->getOrder() instanceof Mage_Sales_Model_Order &&\n $this->getOrder()->getCustomerIsGuest();\n }", "public function test_it_must_be_authenticated_user()\n {\n $this->json('post' , 'api/orders')->assertStatus(401);\n }", "public function testTrackOrderRequestWithUserCreateMethod(): void\n {\n $tracker = new Tracker($this->DATASET_ID(), $this->API_KEY());\n\n $money = new Money();\n $money->amount = 100;\n $money->currency = new Currency();\n $money->currency->value = \"DKK\";\n\n $order = new Order();\n $order->user = User::create(null, \"t-Id\", null, null, null, null, null);\n $order->subtotal = $money;\n $order->orderNumber = \"1\";\n\n $trackOrderRequest = new TrackOrderRequest();\n $trackOrderRequest->order = $order;\n\n $response = $tracker->request('TrackOrderRequest', $trackOrderRequest);\n\n self::assertEquals(200, $response->code);\n self::assertEquals(null, $response->body);\n }", "public function create_only()\n {\n \n // Fetch latest MMS orders from MAX Live DB with status Delivered and customer MEAF and save the first matching order\n $this->pick_order();\n \n // Create the XML files for the order\n $this->create_xml_file();\n }", "public function store(Request $request)\n {\n $this->authorize('create',Order::class);\n $data = $request->all();\n if(!$this->user->is_admin){\n $data['user_id'] = $this->user->id;\n unset($data['status']);\n }\n\n return $this->helper->store(new OrderRequest($data));\n }", "public function actionGuestcreate()\n {\n if (!Yii::$app->user->can('anonymous')) {\n return $this->enterGuestAccess();\n }\n else {\n return $this->actionCreate();\n }\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function processGuestToCustomer()\n {\n }", "public function store(AdminOrderCreateRequest $request, User $user)\n {\n DB::beginTransaction();\n\n $order = new Order();\n $order->fill($request->only(['staff_notes', 'customer_notes']));\n $order->createdByUser()->associate($request->user());\n $order->createdForUser()->associate($user);\n $order->for_date = today();\n $order->save();\n\n $products = collect($request->input('products', []))\n ->filter(function ($product) {\n return Arr::get($product, 'quantity') &&\n Arr::get($product, 'unit_price');\n })->unique('id');\n\n $products->each(function ($product, $key) use ($order) {\n $orderProduct = new OrderProduct();\n $orderProduct->fill($product);\n $orderProduct->product()->associate($product['id']);\n $order->orderProducts()->save($orderProduct);\n });\n\n DB::commit();\n event(new OrderCreated($order));\n\n alert()->success('Order was created successfully.');\n return redirect()->route('admin.orders.edit', $order);\n\n }", "public function create()\n {\n $this->authorize('create', Transaction::class);\n }", "public function order() {\n if(\\Auth::user() == null){\n\n \\Session::flash('warning', 'Je moet eerst inloggen!');\n return Redirect('/inloggen');\n\n }\n\n // Create order\n $order = new Order();\n $order->user_id = \\Auth::user()->id;\n\n // Save order\n $order->save();\n\n // Store ordered products\n foreach($this->getCart() as $item => $amount){\n $order_product = new OrderProduct();\n $order_product->order_id = $order->id;\n $order_product->product_id = $item;\n $order_product->amount = $amount;\n $order_product->save();\n }\n\n // Remove shopping cart session\n session()->forget('cart');\n\n // Send user to his order page\n return Redirect('/orders/'.$order->id);\n\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_purchase_order())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('purchase_order_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'purchase_order');\n\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/orders/purchase_order');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_failure') . $this->purchase_order_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('purchase_order', 'purchase_order.js');\n\n\t\tTemplate::set('toolbar_title', lang('purchase_order_create') . ' Purchase Order');\n\t\tTemplate::render();\n\t}", "public function created(Order $order)\n {\n //\n }", "public function created(Order $Order)\n {\n //code...\n }", "public function __construct()\n {\n $this->middleware('admin',['only' => ['make_order']]);\n }", "public function order_create()\n {\n $this->_checkPartner();\n \n $mod_c = $this->_getConfig();\n if(isset($mod_c['orders_limit']) && $mod_c['orders_limit']) {\n $sql = \"SELECT COUNT(id) FROM client_order WHERE client_id = :cid AND DATE_FORMAT(created_at, '%Y-%m-%d') = :date GROUP BY client_id\";\n $count = R::getCell($sql, array('cid'=>$this->client->id, ':date'=>date('Y-m-d')));\n if($count >= $mod_c['orders_limit']) {\n throw new Box_Exception('Daily orders limit reached. Order today :today out of :limit', array(':today'=>$count, ':limit'=>$mod_c['orders_limit']), 8804);\n }\n }\n \n $partner = $this->service->getPartner($this->client);\n $price = $this->service->getPartnerPrice($this->client);\n \n if(isset($mod_c['check_balance']) && $mod_c['check_balance']) {\n $client = $this->getApiAdmin()->client_get(array('id'=>$this->client->id));\n if($client['balance'] < $price) {\n throw new Box_Exception('Not enough money in balance to create order. You must have at least $:price in your balance', array(':price'=>$price), 8808);\n }\n }\n \n if(!isset($mod_c['lid'])) {\n throw new Box_Exception('Partners program is temporary disabled.',null, 8806);\n }\n \n if($partner->product_id) {\n $product_id = $partner->product_id;\n } else {\n $product_id = $mod_c['lid'];\n }\n \n $odata = array(\n 'client_id' => $this->client->id,\n 'product_id' => $product_id,\n 'price' => $price,\n 'quantity' => 1,\n 'period' => '1M',\n 'activate' => true,\n 'invoice_option' => 'no-invoice',\n 'config' => array(\n 'partner_id' => $this->client->id,\n ),\n );\n \n $order_id = $this->getApiAdmin()->order_create($odata);\n \n $odata = array(\n 'id' => $order_id,\n 'invoice_option'=> 'issue-invoice',\n 'expires_at' => date('Y-m-d', strtotime('+14 days')),\n );\n $this->getApiAdmin()->order_update($odata);\n \n $this->service->addOrderForPartner($this->client, $order_id);\n \n $this->getApiAdmin()->hook_call(array('event'=>'onAfterPartnerOrderCreate', 'params'=>array('client_id'=>$this->client->id, 'order_id'=>$order_id)));\n \n $this->_log('Partner created new order #%s', $order_id);\n return $order_id;\n }", "public function validateSalesOrderInvoiceCreateAction()\n {\n if ($id = $this->_request->getParam('order_id')) {\n $className = \\Magento\\Sales\\Model\\Order::class;\n } elseif ($id = $this->_request->getParam('invoice_id')) {\n $className = \\Magento\\Sales\\Model\\Order\\Invoice::class;\n } else {\n return true;\n }\n\n if ($id) {\n $object = $this->_objectManager->create($className)->load($id);\n if ($object && $object->getId()) {\n $store = $object->getStoreId();\n if (!$this->_role->hasStoreAccess($store)) {\n $this->_forward();\n return false;\n }\n }\n }\n return true;\n }", "public function my_orders(Request $request)\n {\n if (!User::where('type', 'user')->find($request->user()->id))\n return response()->json(['status' => 'false', 'message' => trans('app.user_not_found'), 'data' => null], 404);\n $user = User::where('type', 'user')->find($request->user()->id);\n if ($user->active != 'active')\n return response()->json(['status' => 'false', 'message' => trans('auth.deactivated_account'), 'data' => null], 403);\n if ($user->banned != '0')\n return response()->json(['status' => 'false', 'message' => trans('auth.banned_account'), 'data' => null], 401);\n try {\n return response()->json([\n 'status' => 'true',\n 'message' => '',\n 'data' => MiniUserOrder::collection(Order::where('user_id', $user->id)->orderBy('created_at', 'DESC')->get())\n ], 200);\n } catch (Exception $e) {\n DB::rollback();\n return response()->json(['status' => 'false', 'message' => trans('auth.something_went_wrong_please_try_again'), 'data' => null], 401);\n }\n }", "public function validateOrder();", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/order');\n }", "public function store(Request $request)\n {\n //dd($request->all());\n //$user = new User();\n // $user = $this->request->user();\n \n $pedido = $request->all();\n // $order = new Order();\n // $order->customer_id = $pedido['customer_id'];\n // $order->name = $pedido['name'];\n // $order->address = $pedido['address'];\n // $order->phone = $pedido['phone'];\n // $order->delivery_tax = $pedido['delivery_tax'];\n // $order->status = $pedido['status'];\n // $order->save();\n\n $order = Order::create([\n 'customer_id' => $pedido['customer_id'],\n 'name' => $pedido['name'],\n 'address' => $pedido['address'],\n 'phone' => $pedido['phone'],\n 'delivery_tax' => $pedido['delivery_tax'],\n 'status' => $pedido['status']\n ]);\n // foreach($pedido['order_menus'] as $vars){\n // $orderMenu = new OrderMenu();\n // $orderMenu->order_id = $order->id;\n // $orderMenu->menu_id = $vars['menu_id'];\n // $orderMenu->quantity = $vars['quantity'];\n // $orderMenu->save();\n // }\n // return response()->json($order, 201);\n // return $order;\n }", "public function storeOrder($request);", "public function create(Request $request)\n {\n $admin_id = $request->session()->get('loggedIn')['id']; \n $data['mainMenu'] = 'orderManagement';\n $data['subMenu'] = 'orderList';\n $data['users'] = User::where(['admin_id'=>$admin_id,'status'=>'1'])->get();\n $data['products'] = Product::where(['admin_id'=>$admin_id,'status'=>'1'])->get();\n return view('admin.order.add-order',$data);\n }", "public function createOrder($order)\n {\n $this->notificationRepository->create(['type' => 'order', 'order_id' => $order->id]);\n \n event(new CreateOrderNotification);\n }", "public function create(User $user)\n {\n if ($user->can('create client payment detail')) {\n return true;\n }\n }", "public function create() {\n //Si el usuario solicito recordar entonces verifica a cookie\n if (!empty($_COOKIE['tokenCookie'])){\n $user = Account::where('token', $_COOKIE['tokenCookie'])->first();\n if (!empty($user))\n session(['user'=>$user]);\n }\n \n //Si la session esta vacia devuelve la pantalla a login\n if (empty(session('user')))\n return redirect('account/login');\n \n $user = session('user');\n $orders = array();\n $status = \"new\";\n $subtitle = 'Reportar un paquete nuevo';\n $statusName='<p style=\"color: orange; margin:0;\">Reportar un paquete nuevo</p>'; \n \n \n return view('order.create', ['user'=>$user]);\n }", "public function saveOrderAnonymousUser($request)\n {\n $this->saveNewOrderData(0, $request, true);\n\n //Save order products\n $this->saveNewOrderProducts($request->order);\n\n return;\n\n }", "public function create()\n {\n // $this->authorize('create', Comment::class);\n\n }", "private function _getOrder()\n {\n if (!is_null($this->_order)) {\n return $this->_order;\n }\n \n $orderId = $this->getRequest()->getParam('orderId');\n if (!empty($orderId)) {\n $this->_order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);\n return $this->_order;\n }\n \n Mage::throwException('Forbidden');\n }", "public function created(Order $order)\n\t{\n\t\t//\n\t}", "public function created(Order $order)\n\t{\n\t\t//\n\t}", "public function actionCreate()\n {\n /** @var Order $model */\n $model = new Order;\n // Load saved draft\n $draftModel = $model->getDraftOrderByUser($this->acl->getUser());\n if ($draftModel) {\n $model = $draftModel;\n }\n\n $event = new OrderCreatedEvent($model, $this);\n $model->onOrderCreated = [$event, 'sendNotification'];\n\n // Get current model scenario\n $scenario = $model->getScenario();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Order'])) {\n $model->setAttributes($_POST['Order']);\n $model->setAttribute('creator_id', Yii::app()->user->getId());\n $model->orderItems = $_POST['OrderItems'];\n\n if ($model->isDraft()) {\n $redirect = ['index'];\n $scenario = 'saveDraft';\n $model->setScenario($scenario);\n // Order is not created until it is actually posted\n // It is posted when status changed from \"Draft\"\n $model->setAttribute('created', null);\n } else {\n $model->setAttribute('created', date('Y-m-d'));\n $redirect = ['view', 'id' => $model->id];\n }\n\n // Same scenario should apply to related models\n if ($model->saveWithRelated(['orderItems' => ['scenario' => $scenario]])) {\n $this->redirect($redirect);\n }\n }\n\n $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function testAdminUserCreateAndGetTransactions()\n {\n $transactionRepo = new TransactionRepository;\n $users = new UserRepository;\n $transactionService = new TransactionService;\n $adminUser = $users->getAdminUser();\n $amount = 15.99;\n $transactionService->createUserTransaction($adminUser, $amount);\n $transactions = $transactionRepo->getByUserId($adminUser->id);\n $this->assertGreaterThan(0, $transactions->count());\n }", "public function makeOrderRequest()\n {\n //check if the user is logged and user permission\n if (UserManager::isUserLogged()) {\n if (UserManager::getPermission($_SESSION['email']) == BASE) {\n\n //check post variables\n if (isset($_POST['delivery_date']) && isset($_POST['article_id']) && isset($_POST['article_quantity']) && !empty($_POST['article_id']) && !empty($_POST['article_quantity']) && !empty($_POST['delivery_date'])) {\n\n //test input\n $article_id = Validator::testInput($_POST['article_id']);\n $article_quantity = Validator::testInput($_POST['article_quantity']);\n $delivery_date = Validator::testInput($_POST['delivery_date']);\n $article = ArticleManager::getArticleById($article_id);\n $expire_date = $article['data_scadenza'];\n $available_date = $article['disponibile_il'];\n\n if (Validator::isDeliveryDateValid($delivery_date, $expire_date, $available_date)) {\n\n //create order\n $order = new OrderModel($article_quantity, $article_id, UserManager::getUserByEmail($_SESSION['email'])['id'], $delivery_date);\n\n //try to make the order request\n if (OrderManager::addOrder($order)) {\n MessageManager::setSuccessMsg('Richiesta inviata. Il tuo ordine verrà visionato');\n MessageManager::unsetErrorMsg();\n } else {\n MessageManager::setErrorMsg('Impossibile richiedere questo articolo');\n }\n } else {\n MessageManager::setErrorMsg('La data di consegna non è valida');\n }\n }\n }\n header('Location: ' . URL . 'catalog');\n exit;\n }\n header('Location: ' . URL . 'home');\n }", "public function testAnonymousViewOrder() {\n $order_item = OrderItem::create([\n 'type' => 'default',\n 'quantity' => 2,\n 'unit_price' => new Price('12.00', 'USD'),\n ]);\n $order_item->save();\n\n /** @var \\Drupal\\commerce_order\\Entity\\Order $order */\n $order = Order::create([\n 'type' => 'default',\n 'state' => 'completed',\n 'uid' => 0,\n 'order_items' => [$order_item],\n 'mail' => '[email protected]',\n 'order_number' => '1',\n ]);\n $order->save();\n\n // Check order list page is not available even though there is a completed\n // order.\n $this->drupalGet('/user/0/orders/');\n $this->assertSession()->statusCodeEquals(404);\n\n // Check that the order is also not available directly.\n $this->drupalGet('/user/0/orders/' . $order->id());\n $this->assertSession()->statusCodeEquals(403);\n }", "public function store(StoreRequest $request)\n{\n $AgentPermission=Permission::where('name','like','%Order%')->get();\n\n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password'=>Hash::make($request->password),\n 'password_confirmation'=>Hash::make($request->password_confirmation),\n 'mobile'=>$request->mobile,\n 'work'=>$request->work,\n 'is_agent'=>'1'\n ]);\n\n $user->assignRole([3]);\n\n foreach($AgentPermission as $a)\n {\n $user->givePermissionTo($a->id);\n\n }\n\n return $user;\n}", "public function createOrder(Request $request)\n {\n\n $order = Order::create([\n 'room_id' => $request['roomId'],\n 'user_id' => $request['userId'],\n 'guests' => $request['guests'],\n 'check_in' => $request['checkIn'],\n 'check_out' => $request['checkOut'],\n 'total_days' => $request['totalDays'],\n 'message' => $request['message'],\n 'status' => $request['status'],\n ]);\n\n return response()->json([\n \"message\" => \"pesananmu masuk kedalam proses\",\n \"data\" => $order\n ]);\n }", "public function prepareOrder()\n {\n if ($this->user !== null && $order = Order::where('status', 0)->where('user_id', $this->user->id)->first()) \n {\n return Address::where('user_id', $this->user->id)->first();\n }\n return response()->json(['error' => 'Unauthorized'], 401);\n }", "function create(Request $request) {\n // create order\n $data = [\n 'client_name' => $request->client_name,\n 'date' => $request->order_date,\n ];\n $order = $this->orders->create($data);\n\n // add products to order\n $num_products = $this->products->numProducts();\n for($i = 1; $i < $num_products + 1; $i++) {\n $key = 'product-' . $i;\n if($request[$key] != null) {\n $this->orders->addProduct($order->id, $i, $request[$key]);\n } \n }\n Redirect::to('encomendas');\n }", "public function createOrder($cartData,$token,$isApi,$customerId = NULL);", "public function doCreate(){\n //only logged in users can write comments\n if(Security::isAuthenticated()){\n if($_POST['send']){\n $userid = Security::getUser()->id;\n $postid = $_GET['blogid'];\n //protects from attackers\n $comment = htmlspecialchars($_POST['commentarea']);\n $time = date(\"Y-m-d\");\n $commentRepository = new CommentRepository();\n //call to createComment\n $commentRepository->createComment($userid, $postid, $comment, $time);\n header('Location: /comment/showComments?id='.$postid);\n }\n }else{\n echo'Only logged in users can write comments';\n }\n }", "public function store(Request $request)\n {\n $data = $request->json()->all();\n // dd($request->user());\n\n $user = $request->user();\n\n // Enregistrement commande\n $order = $user->orders()->create([\n 'payment_intent_id' => $data['paymentIntent']['id'],\n 'amount' => $data['paymentIntent']['amount'],\n 'payment_created' => (new DateTime())->setTimesTamp($data['paymentIntent']['created'])->format('y-m-d H:i:s'),\n // 'user_id' => $request->payment,\n \n ]);\n // $order = new Order();\n\n\n foreach(Cart::content() as $product)\n {\n $order->products()->create([\n 'title' => $product->name,\n 'quantite' => $product->qty,\n 'price' => $product->price\n ]);\n // $order->payment_intent_id = $data['paymentIntent']['id'];\n }\n if($data['paymentIntent']['status'] == 'succeeded')\n {\n Cart::destroy();\n Session::flash('success','Votre commande à été traitée avec succes');\n return response()->json(['success' => 'Le paiement à réussi']);\n //return back()->with('success', 'Le paiement à réussi.');\n }\n else\n {\n return response()->json(['error' => 'Le paiement à échoué']);\n }\n}", "public function testPurchaseFlow()\n\t{\n\t\t// Prepare\n\n\t\t$user = factory('App\\User')->create(['password' => Hash::make('laravel-shop')]);\n\n\t\t$bool = Auth::attempt(['email' => $user->email, 'password' => 'laravel-shop']);\n\n\t\t$cart = App\\Cart::current()\n\t\t\t->add(['sku' => '0001', 'price' => 1.99])\n\t\t\t->add(['sku' => '0002', 'price' => 2.99]);\n\n\t\tShop::setGateway('testPass');\n\n\t\tShop::checkout();\n\n\t\t$order = Shop::placeOrder();\n\n\t\t$this->assertNotNull($order);\n\n\t\t$this->assertNotEmpty($order->id);\n\n\t\t$this->assertTrue($order->isCompleted);\n\n\t\t$user->delete();\n\t}", "public function createOrder(AddressStore $request)\n {\n $validated = $request->validated();\n \n if ($this->user !== null) \n {\n if ($order = Order::where('status', 0)->where('user_id', $this->user->id)->first())\n {\n $address = Address::where('user_id', $this->user->id)->first();\n if ($address !== null)\n { \n $address->delete();\n }\n\n $validated['user_id'] = $this->user->id;\n $address = Address::create($validated);\n\n $order->status = 1;\n $order->save();\n\n return $order;\n }\n return response()->json(['error' => 'There is nothing in checkout stage'], 422);\n }\n return response()->json(['error' => 'Unauthorized'], 401);\n }", "public function makeOrders() {\n $this->cleanOrderLogs();\n $r = $this->updateSales();\n if (!$r) return false;\n // select tragento_sales with order_id = 0\n $db = Mage::getSingleton('core/resource')->getConnection('core_read');\n $query = \"SELECT * FROM `tragento_sales` WHERE order_id=0 ORDER BY purchase_id ASC\";\n $orders = $db->fetchAll($query);\n foreach ($orders as $order) {\n $this->makeOrder($order);\n }\n return true;\n }", "public function creating(Order $model)\n {\n//\n// $model->created_user_id = $this->user->id;\n// $model->created_user_name = $this->user->name;\n $model->status = 1;\n $model->user_name = optional($model->user)->name??'';\n $model->amount = ($model->amount==0)?0.01:$model->amount;\n if (empty($model->father_id))\n $model->leader_id = $model->user_id;\n $model->number = date('Ymd') . time();\n if ($model->use_times != 0)\n User::find($model->user_id)->decrement('tour_times',$model->use_times);\n// \\Log::info('orders::'.json_encode($model));\n //判断是否为香榧果订单 统计斤数\n $can = $this->checkOrderCreate($model);\n if ($can == 1)\n $model->fruit_order = 1;\n //$model->address_str = $model->address ? $model->address->location : '';\n // $model->amount = bcmul(constants('PRODUCT_PRICE'), $model->qty, 2);\n }", "public function create(User $user)\n {\n return $user->can('create_customer');\n }", "public function createOrder()\n {\n if(!request()->ajax())\n {\n throw new BadRequestHttpException();\n }\n\n $data = request()->all();\n\n $model = new OrderViewModel(request('language'));\n\n $this->orderService->fill($model);\n\n DB::beginTransaction();\n\n if (auth()->check())\n {\n $userId = auth()->id();\n }\n else\n {\n $userId = null;\n }\n \n $this->orderService->createOrder($data, $userId, $model);\n\n $this->orderService->createOrderProducts($model);\n \n try \n {\n \\Mail::to(request('email'))->send(new OrderReport($model, request('name')));\n\n \\Mail::to(config('mail.from.address'))->send(new OrderReportManager($model, request('name')));\n }\n catch (\\Exception $e)\n {\n\n DB::rollBack();\n \n return response()->json([\n 'status' => 'error'\n ]);\n }\n \n $this->cartService->clearCart();\n \n DB::commit();\n \n Session::put('isOrderCreated', true);\n \n return response()->json([\n 'status' => 'success'\n ]);\n }", "public function hasActiveOrders()\n {\n }", "public function saveOrderAuthUser($request)\n {\n $this->saveNewOrderData(Auth::user()->id, $request);\n\n //Save order products\n $this->saveNewOrderProducts($request->order);\n\n return;\n\n }", "public function create(User $user)\n {\n return $user->hasPermissionTo('create sales');\n }", "public function authorize()\n {\n return auth()->user()->can('create', Pizza::class);\n }", "function validateOrder() {\n\techo \"Validating Order </br>\";\n\t$data = createOrder();\n\t$response = postRequest('/api/order/validate', $data);\n\tprintInfo($response);\n}", "function persistOrder(User $user, Order $order, array $orderItems);", "public function user_can_create_order($mjob_id, $user_id){\r\n global $ae_post_factory;\r\n $order = $ae_post_factory->get('mjob_order');\r\n $args = array(\r\n 'post_type'=>'mjob_order',\r\n 'post_parent'=> $mjob_id,\r\n 'author'=> $user_id,\r\n 'posts_per_page'=> 3\r\n );\r\n $posts = get_posts($args);\r\n if( $posts && !empty($posts) ) {\r\n return array('success'=>false, 'data'=>$order->convert($posts['0']));\r\n }\r\n return array('success'=> true);\r\n\r\n }", "public function createorder()\n\n {\n $data = request()->validate([\n 'user_id' => ['required'],\n \"restaurant_id\" => ['required'],\n 'restaurant_service_id' => [],\n 'menu_id' => [],\n 'quantity' => [],\n 'table_id' => [],\n 'notes' => [],\n\n\n ]);\n\n\n\n $restaurant = RestaurantProfile::where('id', '=', $data['restaurant_id'])->get();\n\n $order = Order::create([\n 'restaurant_service_id' => $data['restaurant_service_id'],\n 'user_id' => $data['user_id'],\n 'restaurant_profile_id' => $data['restaurant_id'],\n 'menu_id' => $data['menu_id'],\n 'quantity' => $data['quantity'],\n 'table_id' => $data['table_id'] ?? null,\n 'notes' => $data['notes'] ?? null,\n 'status' => 1\n\n ]);\n if ($data['restaurant_service_id'] == 2) {\n\n $order_details = OrderDetail::create([\n 'note' => $data['note'],\n 'estate' => $data['estate'] ?? 'estate',\n 'full_name' => $data['full_name'] ?? 'full_name',\n 'email' => $data['email'] ?? 'email',\n 'note' => $data['note'] ?? 'note',\n 'phone' => $data['phone'] ?? 'phone',\n 'house' => $data['house'] ?? 'house',\n 'house_no' => $data['house_no'] ?? 'house_no',\n 'city' => $data['city'] ?? 'city',\n 'delivery_day' => $data['delivery_schedule_time'] ?? 'delivery_day',\n 'delivery_time' => $data['delivery_schedule_day'] ?? 'delivery_time',\n 'order_id' => $order->id\n ]);\n }\n\n return $this->jsonResponse(false, 'order created successfully', 'order', $order);\n }", "protected function isValidOrder()\n {\n return true;\n }", "public function create_order( $args = array() )\n {\n return $this->_request('createorder', $args);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:255',\n 'description' => 'required'\n ]);\n Order::create([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'employer_id' => $request->user()->id\n ]);\n //$order->employer->attach($request->user());\n return redirect()->route('order.my');\n }", "public function create(User $user)\n {\n //if( $user->permission == 2 || $user->permission == 3 ){\n \n if( $user->role == 2){ //if admin\n return true;\n }else if( $apartment != null && $user->apartmentsOwned->contains( $apartment->id ) ){\n return true;\n }else{\n return false;\n }\n\n }", "protected function _ensureCustomer()\n {\n if ( $this->_isGuestOrder() && Mage::helper('gueststorecredit')->canConvertGuest() ) {\n $customer = Mage::helper('gueststorecredit')->createNewCustomerFromOrder($this->getOrder());\n\n $this->getCreditMemo()->setCustomerId($customer->getId());\n\n $this->setCustomerId($customer->getId())\n ->setCustomer($customer);\n\n $this->setIsFromGuestFlag(true);\n }\n\n parent::_ensureCustomer();\n }", "public function store(Request $request, Order $order)\n {\n $request->validate([\n 'recepie_menu_id' => 'required',\n 'qty' => 'required', \n 'status_id' => 'required',\n 'amount' => 'required' \n ]); \n\n $ticket = new Ticket($request->all());\n $ticket->store($order);\n $ticket = $order->tickets()->find($ticket->id);\n\n return response()->json([\n 'data' => $ticket\n ], 201);\n }", "public function testCreateOrder()\n {\n $result = OrdersService::create([\n 'title' => 'Test Order',\n 'state' => 'INITIAL',\n 'res_id' => 1,\n 'foods' => [1, 2],\n ]);\n\n $this->assertInstanceOf(Model::class, $result);\n }", "function createOrder() {\n\t$postData = new Order;\n\n\treturn $postData->getOrderJson();\n}", "public function create()\n {\n return isAdmin();\n }", "public function create()\n {\n $result = $this->orderRepository->UserOrderProduct();\n\n if ($result === 'Order successfully') {\n return Redirect::route('show')->with('success', trans('message.success_order'));\n } else {\n return redirect()->route('show')->with('error', trans('message.ordererror'));\n }\n\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function createOrder($user_id, $total, $shipping_price)\n {\n $this->user_id = $user_id;\n $this->total = $total;\n $this->shipping_price = $shipping_price;\n $this->save();\n }", "function creatememberandaddtoorder($data, $form){\n\t\t$member = new Member();\n\t\t$order = ShoppingCart::current_order();\n\t\tif($order && $order->exists()) {\n\t\t\t$form->saveInto($member);\n\t\t\t$password = ShopAccountForm_PasswordValidator::clean_password($data);\n\t\t\tif($password) {\n\t\t\t\t$member->changePassword($password);\n\t\t\t\tif($member->validate()->valid()){\n\t\t\t\t\t$member->write();\n\t\t\t\t\tif($member->exists()) {\n\t\t\t\t\t\tif(!$order->MemberID) {\n\t\t\t\t\t\t\t$order->MemberID = $member->ID;\n\t\t\t\t\t\t\t$order->write();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$member->login();\n\t\t\t\t\t\t$this->sessionMessage(_t(\"ShopAccountForm.SAVEDDETAILS\", \"Your details has been saved.\"), \"good\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->sessionMessage(_t(\"ShopAccountForm.COULD_NOT_CREATE_RECORD\", \"Could not save create a record for your details.\"), \"bad\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->sessionMessage(_t(\"ShopAccountForm.COULD_NOT_VALIDATE_MEMBER\", \"Could not save your details.\"), \"bad\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->sessionMessage(_t(\"ShopAccountForm.COULDNOTFINDORDER\", \"Could not find order.\"), \"bad\");\n\t\t}\n\t\t$this->controller->redirectBack();\n\t}", "public function create()\n\t{\n\t\t$order = new Order;\n\n\t\t// Set the 'default' order status\n\t\t//$orderStatus = OrderStatus::find(Config::get('Orders::defaultStatus'));\n\n\t\t//$orderStatus->order()->associate($order);\n\n\n\n\t\t// Save the order\n\t\t$order->save();\n\n\t\t// Return the response, with the order, as JSON\n\t\treturn Response::json($order);\n\t}", "public function __construct($user,$order)\n {\n $this->user = $user;\n $this->order = $order;\n }", "public function prevent_users_withonly_index_permissions_from_creating_service()\n {\n $user = $this->getRandomUser('only index');\n\n $response = $this->actingAs($user)->get(route('service.create'));\n\n $response->assertRedirect('service');\n }", "public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create(OrderFormRequest $request)\n {\n try {\n $request->validated();\n if (empty($request->status)) {\n $request->status = 2;\n }\n if (empty($request->user_id)) {\n $request->customer = auth()->user()->id;\n }\n $order = Order::where([\n 'user_id' => $request->customer,\n 'room_id' => $request->room,\n 'status' => $request->status\n ])->count();\n if ($order) {\n throw new \\Exception('Такой заказ уже существует');\n }\n $order = new Order();\n $order->fill([\n 'user_id' => $request->customer,\n 'room_id' => $request->room,\n 'status' => $request->status,\n 'note_date' => $this->convertDate($request->note_date, $request->note_time),\n 'days' => $request->days\n ]);\n $order->save();\n if ($order->status == 2) {\n event(new FreeRoom(0, $order->room_id));\n }\n $mail_order = $order->with(['customer', 'room'])->findOrFail($order->id);\n event(new OrderComplete($mail_order));\n event(new WriteAudit((object)[\n 'id' => $order->id,\n 'customer' => $order->user_id,\n 'room' => $order->room_id,\n 'type' => 'room'\n ], 1, 15));\n// Mail::to($mail_order->customer)->send(new OrderShipped(\n// $mail_order\n// ));\n return response()->json([\n 'status' => 'success',\n 'msg' => 'Заказ успешно добавлен'\n ], 200);\n } catch (\\Exception $error) {\n return response()->json([\n 'status' => 'error',\n 'msg' => $error->getMessage()\n ]);\n }\n }", "public function store(Request $request)\n {\n /*$this->validate($request, [\n 'shipping_id' => 'required',\n 'vehicle_id' => 'required',\n 'driver_id' => 'required',\n 'user_id' => 'required'\n ]);*/\n return $this->orderInterface->store($request);\n }", "protected function canCreate() {}", "public function store(Request $request)\n {\n return Order::create([\"client_id\" => $request->client_id]);\n }", "public function create(User $user)\n {\n // Approvals can't be created like this, they're created by actions\n return false;\n }" ]
[ "0.6789236", "0.6546317", "0.6395398", "0.6345244", "0.62821716", "0.6266845", "0.6250803", "0.61733466", "0.61536336", "0.6114564", "0.60527945", "0.60353374", "0.5961002", "0.59541523", "0.5925883", "0.5886639", "0.5877791", "0.5860154", "0.5825765", "0.58227515", "0.5758851", "0.5757928", "0.5720618", "0.5715673", "0.5704828", "0.5665942", "0.5661356", "0.5629023", "0.5628255", "0.56257147", "0.56227386", "0.5622112", "0.5621439", "0.5617141", "0.56052333", "0.55940133", "0.55896133", "0.5587191", "0.5566579", "0.55610424", "0.55608314", "0.5559987", "0.55514705", "0.55400807", "0.55395365", "0.55340374", "0.5526976", "0.55233765", "0.55075264", "0.55001944", "0.54836506", "0.54705775", "0.54636055", "0.54636055", "0.5460916", "0.5456371", "0.5449052", "0.54445606", "0.5441405", "0.54350805", "0.5433045", "0.5429646", "0.54296285", "0.54269665", "0.5422855", "0.54202956", "0.54123944", "0.54118395", "0.54055333", "0.54042363", "0.54025495", "0.5394559", "0.5383251", "0.53796667", "0.53765863", "0.5374059", "0.5370396", "0.53646374", "0.53626895", "0.533853", "0.53329134", "0.53324246", "0.53280616", "0.5321146", "0.5321011", "0.5316527", "0.5316506", "0.5314874", "0.5314289", "0.53133464", "0.53091586", "0.5308463", "0.5307522", "0.5306032", "0.5302629", "0.530001", "0.5297394", "0.5295499", "0.5294061", "0.5292212", "0.528787" ]
0.0
-1
Only users with EDIT admin rights can view an order
public function canEdit($member = null) { $extended = $this->extend('canEdit', $member); if($extended && $extended !== null) return $extended; if($member instanceof Member) $memberID = $member->ID; else if(is_numeric($member)) $memberID = $member; else $memberID = Member::currentUserID(); if($memberID && Permission::checkMember($memberID, array("ADMIN", "COMMERCE_EDIT_ORDERS"))) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commerce_store_admin_order_view_access($order) {\n $access = commerce_order_admin_order_view_access($order);\n return $access || user_access('view any commerce_order entity in own store') && commerce_order_access('view', $order);\n}", "public function get_adminOrder(){\n if(Auth::user()->user_type == 0){\n return redirect('/adminlogin');\n }\n $orders = Transaction::all();\n return view('admin.orders',compact('orders'));\n }", "public function editTheNotValidatedOrderAction(UserOrder $order){\n\n\t}", "public function adminOnly();", "public function adminOnly();", "public function testAdminOrderView() {\n $line_item = $this->createEntity('commerce_line_item', [\n 'type' => 'product_variation',\n 'unit_price' => [\n 'amount' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'line_items' => [$line_item],\n ]);\n\n // First test that the current admin user can see the order.\n $this->drupalGet($order->toUrl()->toString());\n $this->assertSession()->statusCodeEquals(200);\n\n // Order displays email address.\n $this->assertSession()->pageTextContains($this->loggedInUser->getEmail());\n\n // Logout and check that anonymous users cannot see the order admin screen\n // and receive a 403 error code.\n $this->drupalLogout();\n\n $this->drupalGet($order->toUrl()->toString());\n $this->assertSession()->statusCodeEquals(403);\n }", "function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}", "public function is_admin_only()\n\t{\n\t\treturn false;\n\t}", "public function edit(order $order)\n {\n //\n }", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function edit(Order $order)\n {\n //\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Edit products') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }", "public function can_edit($userID = '') {\n\t\t\t$order = SalesOrder::load($this->orderno);\n\t\t\treturn $order->can_edit($userID);\n\t\t}", "protected function isAdminUser() {}", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public function authorize()\n {\n $order = $this->route('order');\n if($order){\n \t$order_repository = app()->make(orderRepository::class);\n\t return $order_repository->accesibleOrders(Auth::user())->findOneBy($order->id);\n\n }\n return false;\n\n }", "public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }", "function user_can_edit_user($user_id, $other_user)\n {\n }", "public function isAdmin();", "function authorizedAdminOnly(){\n global $authenticatedUser;\n if(!$authenticatedUser['admin']){\n header(\"HTTP/1.1 403 Forbidden\");\n header(\"Location: https://eso.vse.cz/~frim00/marvelous-movies/error-403\");\n exit();\n }\n }", "public function edit(Order $order){\n\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/order');\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "function canEdit(User $user) {\n return $user->isFinancialManager();\n }", "public function _isAdmin() {\n\t\t$user_id = $this->Auth->user('id');\n\t\t$aro = array('model' => 'User', 'foreign_key' => $user_id); \n\t\t$aco = 'role/super/admin';\n\t\treturn $this->Acl->check($aro, $aco);\n\t}", "public function isAdmin() {}", "function isAdmin(){\n$user = $this->loadUser(Yii::app()->user->user_id);\nreturn intval($user->user_role_id) == 1;\n}", "public function test_users_edit_admin_returns_403(){\n $this->signInUser();\n $response = $this->get(route('users.edit', ['user'=> 1 ]));\n $response->assertStatus(403);\n }", "public function can_edit() {\n return true;\n }", "public function adminAll(){\n $orders = order::with('user')->withTrashed()->get();\n return view('Admin.Orders.all',compact('orders'));\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function checkACL()\n {\n return parent::checkACL() || \\XLite\\Core\\Auth::getInstance()->isPermissionAllowed('manage orders');\n }", "public function mustbeadmin()\n {\n if (!$this->hasadmin())\n {\n $this->web()->noaccess();\n }\n }", "public function edit(Orders $orders)\r\n {\r\n //\r\n }", "public function edit(User $user)\n { \n return $user->checkRole(['administrator','editor','documenter']);\n }", "public function edit(orders $orders)\n {\n //\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }", "public function view_order()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$this->data['heading'] = 'View Order';\n\t\t\t$user_id = $this->uri->segment(4, 0);\n\t\t\t$deal_id = $this->uri->segment(5, 0);\n\t\t\t$this->data['ViewList'] = $this->order_model->view_orders($user_id, $deal_id);\n\t\t\t$this->load->view('admin/order/view_orders', $this->data);\n\t\t}\n\t}", "public function isAdmin(){\n\t\tparent::isAdmin();\n\t}", "public function edit(Product $product)\n {\n // Admin Only \n }", "public function edit(Orders $orders)\n {\n //\n }", "public function edit(Orders $orders)\n {\n //\n }", "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "protected function canEdit() {}", "public function view(User $user, Order $order)\n {\n return $user->hasPermission('order.viewany') || $order->customer->id == $user->id;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "public function relatorio4(){\n $this->isAdmin();\n }", "public function AdminView(){\n //Restricting this view for operators (Only SuperAdmins should be able to view)\n if(Auth::user()->role ==='Admin'){\n\n $data['allData'] = Admin::all();\n return view('backend.admin.view_admin',$data);\n\n }else{\n return redirect('admin/error')->with('error', 'You are not allowed to access this page');\n }\n }", "public function edit($id)\n {\n $users= User::where('id',$id)->get()[0];\n $services= Service::where('user_id',$users->id)->get();\n $orders= Order::where('user_id',$users->id)->get();\n $myorders= Order::where('user_order',$users->id)->get();\n\n\n return view('admin.users.edit',compact('users','services','orders','myorders'));\n }", "public function authorize()\n {\n return Gate::allows('admin.shipment.edit', $this->shipment);\n }", "public function edit($id)\n {\n $order = Order::where('id',$id)->with('user')->first();\n return view('admin/orders/edit',compact('order'));\n }", "public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }", "public function isAdmin()\n {\n }", "public function admin_order()\n {\n /*return view('admin_order');*/\n $orders = Scrap_order::get();\n return view('admin_order', ['orders' => $orders]);\n }", "public function isOrderEditable()\n {\n return !\\XLite::isFreeLicense();\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function edit(POSOrder $order)\n {\n if (auth()->user()->can('pos_order.update', $order)) {\n $products = auth()->user()->pos->activeProducts;\n return view('pos.orders.edit', compact('order', 'products'));\n }\n abort(403);\n }", "private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function isAdmin(){\n return $this->role=='admin';\n }", "public function isAuthorized($user)\n{\n if (in_array($this->request->action,['postjob','apply','posted','applied','getjob'])) {\n return true;\n }\n // The owner of an job can edit and delete it\n if (in_array($this->request->action, ['edit', 'delete'])) {\n $jobId = (int)$this->request->params['pass'][0];\n if ($this->Jobs->isOwnedBy($jobId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected function requiresAdmin() {\n if (!$this->evaluateACLS(self::ACL_ADMIN)) {\n $this->unauthorizedAccess();\n }\n }", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "public function getIsAdmin();", "public function getIsAdmin();", "public static function requireAdmin() {\n\t$status = (Yii::$app->user->identity->roles == 'admin') ? true : false;\n return $status\n }", "protected function check_edit_permission($comment)\n {\n }" ]
[ "0.7628756", "0.6865917", "0.68158907", "0.6804738", "0.6804738", "0.6789904", "0.6498177", "0.6472775", "0.6471079", "0.6451094", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64366347", "0.64276105", "0.6391334", "0.63852876", "0.637833", "0.63748926", "0.6345474", "0.6344532", "0.63253075", "0.63226104", "0.63225055", "0.63158876", "0.63059944", "0.6299738", "0.6299205", "0.6292552", "0.628604", "0.62752926", "0.62671787", "0.62396765", "0.6236582", "0.62230736", "0.6220808", "0.62197864", "0.6216124", "0.6215004", "0.6206379", "0.6194892", "0.6178919", "0.61675656", "0.61601126", "0.6157341", "0.6145992", "0.61401576", "0.6127449", "0.6125446", "0.6125446", "0.6115117", "0.6114218", "0.6107687", "0.6106826", "0.6106826", "0.6096067", "0.60909307", "0.6087659", "0.6083391", "0.6077377", "0.60714376", "0.6071351", "0.60711884", "0.6068659", "0.606831", "0.60323733", "0.6029233", "0.6012952", "0.6011799", "0.6002203", "0.5998943", "0.59873986", "0.59852666", "0.5983416", "0.5983416", "0.5971018", "0.596555" ]
0.0
-1
No one should be able to delete an order once it has been created
public function canDelete($member = null) { $extended = $this->extend('canDelete', $member); if($extended && $extended !== null) return $extended; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(Order $Order)\n {\n //code...\n }", "public function deleted(Order $Order)\n {\n //code...\n }", "public function deleted(Order $order)\n {\n //\n }", "public function deleted(Order $order)\n {\n //\n }", "public function deleteOrder($order_id);", "public function testDeleteOrder() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'order_items' => [$order_item],\n 'uid' => $this->loggedInUser,\n 'store_id' => $this->store,\n ]);\n $order->delete();\n\n $order_exists = (bool) Order::load($order->id());\n $order_item_exists = (bool) OrderItem::load($order_item->id());\n $this->assertEmpty($order_exists, 'The new order has been deleted from the database.');\n $this->assertEmpty($order_item_exists, 'The matching order item has been deleted from the database.');\n }", "public function deleted(Order $order)\n\t{\n\t\t//\n\t}", "public function deleted(Order $order)\n\t{\n\t\t//\n\t}", "function deleteOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$orderId = json_decode ( $request->getBody () );\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$db->deleteOrder ( $orderId->orderId );\n\t\techo '{\"deleteStatus\":\"YES\"}';\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\techo '{\"errorText\":\"Delete order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}", "function deleteOrder($orderId);", "public function destroy(Order $order)\n {\n\n }", "public function testDeleteOrder()\n {\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(order $order)\n {\n //\n }", "public function forceDeleted(Order $order)\n {\n //\n }", "public function forceDeleted(Order $order)\n {\n //\n }", "public function forceDeleted(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $order)\n {\n //\n }", "public function destroy(Order $Order)\n {\n //\n }", "public function destroy(Order $order)\n {\n \n }", "public function delete_order()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$order_id = $this->uri->segment(4, 0);\n\t\t\t$condition = array('id' => $order_id);\n\t\t\t$old_order_details = $this->order_model->get_all_details(PRODUCT, array('id' => $order_id));\n\t\t\t$this->update_old_list_values($order_id, array(), $old_order_details);\n\t\t\t$this->update_user_order_count($old_order_details);\n\t\t\t$this->order_model->commonDelete(PRODUCT, $condition);\n\t\t\t$this->setErrorMessage('success', 'Order deleted successfully');\n\t\t\tredirect('admin/order/display_order_list');\n\t\t}\n\t}", "public function forceDeleted(Order $order)\n\t{\n\t\t//\n\t}", "public function forceDeleted(Order $order)\n\t{\n\t\t//\n\t}", "public function destroy(RequestOrder $requestOrder)\n\n {\n\n //\n\n }", "function deleteItem($orderId)\n {\n }", "public function destroy(Order $order)\n {\n \n $order->order_lines()->delete();\n $order->delete(); \n return redirect()->route('orders.index');\n }", "public function destroy(TxShopDomainModelOrderItem $order)\n {\n //\n }", "static function cancelOrder($order_id) {\n\t\t\t$query = \"delete from orders where OID = ?\";\n\t\t\t$dataArr = array($order_id);\n\t\t\tOrder::manDb($query, $dataArr);\n\t\t}", "public function deleteById($orderlineId);", "public function delete( &$order, $args = array() ) {\n\t\tglobal $wpdb;\n\n\t\t$order_id = $order->get_id();\n\n\t\tparent::delete( $order, $args );\n\n\t\tif ( $args['force_delete'] || 0 == $order->get_id() ) {\n\t\t\t$wpdb->delete(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\tarray(\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function creating(Order $Order)\n {\n //code...\n }", "public function destroy(Order $orders)\n {\n //\n }", "public function destroy(orders $orders)\n {\n //\n }", "public function destroy(Orders $orders)\r\n {\r\n //\r\n }", "public function deleteOrder(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n\r\n $key = $_REQUEST['id'];\r\n //$key = 2;\r\n $condition['id'] = $key;\r\n $form = M(\"orderinfo\");\r\n $data = $form->where($condition)->delete();\r\n $this->redirect('/index.php/Admin/index');\r\n //$this->display();\r\n }", "public function testCreateOrder() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'order_items' => [$order_item],\n 'uid' => $this->loggedInUser,\n 'store_id' => $this->store,\n ]);\n\n $order_exists = (bool) Order::load($order->id());\n $this->assertNotEmpty($order_exists, 'The new order has been created in the database.');\n }", "public function deleteOrderDetails($product_code,$order_id=NULL,$quantity,$token=NULL);", "public function destroy(CustomerOrder $customerOrder)\n {\n //\n }", "public function destroy(CustomerOrder $customerOrder)\n {\n //\n }", "public function deleted(Order $order)\n {\n foreach (OrderProduct::where('order_id',$order->id)->get() as $orderProduct) {\n $product = Product::find($orderProduct->product_id);\n $cardController = new GlobalCardController();\n $product->count = $cardController->countProduct($orderProduct->product_id);\n $product->save();\n }\n }", "public function destroy(OrderDetails $orderDetails)\n {\n //\n }", "public function destroy(Order $order)\n {\n $order->delete();\n }", "public function preDelete() { }", "public function destroy(Order $order)\n {\n /** order dengan status 1 forceDelete */\n if ($order->status == 1) {\n foreach ($order->details()->get() as $detail) {\n $qty = $detail->product->stock->qty + $detail->qty;\n ProductStock::whereProductId($detail->product_id)\n ->update(['qty' => $qty]);\n }\n\n if ($order->payment_count > 0) {\n Storage::delete($order->payment->proof);\n $order->payment()->forceDelete();\n }\n\n $order->details()->forceDelete();\n $order->forceDelete();\n return redirect(route('orders.index'))->withToastSuccess('Succesfully Deleted');\n }\n\n $order->delete();\n\n return redirect(route('orders.index'))->withToastSuccess('Succesfully Deleted');\n }", "public function destroy(Orders $orders)\n {\n //\n }", "public function destroy(Orders $orders)\n {\n //\n }", "public function create(Order $order)\n {\n //\n }", "function MyShop_OrderDelete($args) {\n global $_TABLES;\n\n $sql = \"DELETE FROM {$_TABLES['myshop_order']} WHERE orderid = '{$args['orderid']}'\";\n DB_query($sql);\n}", "protected function _preDelete() {}", "static function cleanupOrder( $orderID )\n {\n $db = eZDB::instance();\n $orderID =(int) $orderID;\n $rows = $db->arrayQuery( \"SELECT productcollection_id, order_nr FROM ezorder WHERE id='$orderID'\" );\n if ( count( $rows ) > 0 )\n {\n // Who deletes which order in shop should be logged.\n eZAudit::writeAudit( 'order-delete', array( 'Order ID' => $orderID,\n 'Comment' => 'Removed the order and its related data from the database: eZOrder::cleanupOrder()' ) );\n\n $productCollectionID = $rows[0]['productcollection_id'];\n $orderNr = (int)$rows[0]['order_nr'];\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezorder where id='$orderID'\" );\n $db->query( \"DELETE FROM ezproductcollection where id='$productCollectionID'\" );\n $db->query( \"DELETE FROM ezproductcollection_item where productcollection_id='$productCollectionID'\" );\n $db->query( \"DELETE FROM ezorder_status_history WHERE order_id=$orderNr\" );\n $db->commit();\n }\n }", "public function delete_OrderPage(){\n $id_product = $_REQUEST[\"id_product\"];\n $id_order = $_REQUEST[\"id_order\"];\n $query = \"DELETE FROM order_u\n WHERE order_u.id = $id_order;\";\n $data = $this->connection->query($query);\n\n $query = \"DELETE FROM order_product\n WHERE order_product.order_id = $id_order;\";\n $data = $this->connection->query($query);\n \n }", "public function onBeforeDelete() {\n // Delete all items attached to this order\n foreach($this->Items() as $item) {\n $item->delete();\n }\n\n parent::onBeforeDelete();\n }", "public function delete(){\r\n\t\tglobal $DB;\r\n\t\tif($this->id > 0){\r\n\t\t\t$sql = \"UPDATE personalization_orders\r\n\t\t\t\t\tSET\r\n\t\t\t\t\tstatus = 0\r\n\t\t\t\t\tWHERE id = {$this->id}\";\r\n\t\t\tif($DB->no_result($sql)){\r\n\t\t\t\tCachehandler::removeCache(Cachehandler::genKeyword($this));\r\n\t\t\t\tunset($this);\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function deleteorders($id, $order)\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n OrderModel::manage_order($id, $order);\n }", "public function Do_delete_Example1(){\n\n\t}", "public function unsetOrderId(): void\n {\n $this->orderId = [];\n }", "public function destroy(Order $order)\n {\n if ($order->rollback()) {\n return response()->json(['status' => true]);\n } else {\n return response()->json(['status' => false]);\n }\n }", "protected function delete() {\n\t}", "public function destroy(StatusOrder $statusOrder)\n {\n //\n }", "public function sDeleteTemporaryOrder()\n {\n $sessionId = $this->getSession()->offsetGet('sessionId');\n\n if (empty($sessionId)) {\n return;\n }\n\n $deleteWholeOrder = $this->db->fetchAll('\n SELECT * FROM s_order WHERE temporaryID = ? LIMIT 2\n ', [$this->getSession()->offsetGet('sessionId')]);\n\n foreach ($deleteWholeOrder as $orderDelete) {\n $this->db->executeUpdate('\n DELETE FROM s_order WHERE id = ?\n ', [$orderDelete['id']]);\n\n $this->db->executeUpdate('\n DELETE FROM s_order_details\n WHERE orderID=?\n ', [$orderDelete['id']]);\n }\n }", "public function testDeleteOrderTag()\n {\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete($order_id)\n {\n $this->db->where('id', $order_id);\n return $this->db->delete('orders') == TRUE;\n }", "public function destroy(ProductOrder $productOrder)\n {\n //\n }", "public function destroy(Order $order)\n {\n /*if (Gate::allows('delete-order', $order)) {*/\n $order->delete();\n return redirect()->route('order.my');\n /*} else {\n abort(403);\n }*/\n }", "public function delete()\n\t{\n\t\t$res = $this->getDB()->delete('quotes',['quote_id'=>$this->getId()]);\n\n\t\t// Check to see if the query ran properly.\n\t\tif(!$res)\n\t\t{\n\t\t\tthrow new Exception('The product was not deleted from the quote/order.');\n\t\t}\n\t}", "public function deleteOrder($id_order)\n\t\t{\n\t\t\t$this->mgrOrder->deleteOrder($id_order);\n\t\t}", "public function orders_delete($app, $collection_id = null, $order_id = null) {\n\t\t//Delete order\n\t\t$success = Elementorder::delete($order_id);\n\n\t\treturn $app->toJSON(['status' => $success]);\n\t}", "public function destroy(Request $request, Order $order)\n {\n $validator = Validator::make($request->all(), [\n 'id' => ['required', Rule::exists('order')->where('order_status', Order::STATUS_CLOSED)],\n ]);\n if ($validator->fails())\n {\n return ['code' => 3001, 'message' => $validator->errors()->first(), 'data' => $validator->errors()];\n }\n $ids = is_array($request->id) ? $request->id : [$request->id];\n $model = $order::whereIn('id', $ids);\n if ($model->delete())\n {\n return [\n 'code' => 200,\n 'message' => __('admin.SuccessDestroyed'),\n 'log' => sprintf('[%s][%s]『id:%s』', __('admin.SuccessDestroyed'), $order->tableComments, json_encode($ids))\n ];\n } else\n {\n return ['code' => 5001, 'message' => __('admin.Server internal error')];\n }\n }", "public function delete(Order $order)\n {\n $order->delete();\n\n return response()->json([], 200);\n }", "public function cancel()\n {\n $this->canceled = true;\n\n $this->save();\n\n $this->user->notify(new OrderCanceled($this));\n\n }", "public function delete(Order $order)\n {\n if (!Auth::user()->isAdmin()) {\n return redirect()->back()->with(['error_message' => 'Page not found!']);\n }\n }", "public function clearOrder() {\n\t\t\t$this->order->clearOrder();\n\t\t}", "public function destroy(Order $order){\n foreach ($order->products as $product){\n $product->update([\n 'stock'=>$product->stock +$product->pivot->quantity\n ]);\n }//end of foreach\n $order->products()->detach();\n $order->delete();\n session()->flash('success',__('site.deleted_successfully'));\n return redirect()->route('dashboard.orders.index');\n }", "function deleteItem($orderId)\n {\n $dataService = new OrderDataService();\n\n return $dataService->deleteItem($orderId);\n }", "function deleteMe()\n\t\t{\n\t\t\tif(empty($this->id))\n\t\t\t\treturn false;\n\n\t\t\tglobal $wpdb;\n\t\t\t$this->sqlQuery = \"DELETE FROM $wpdb->pmpro_membership_orders WHERE id = '\" . $this->id . \"' LIMIT 1\";\n\t\t\tif($wpdb->query($this->sqlQuery) !== false)\n\t\t\t{\n\t\t\t\tdo_action(\"pmpro_delete_order\", $this->id, $this);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "private function deleteOrderInformation()\n {\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $sql = \"UPDATE `s_core_snippets`\n SET `value` = CASE\n WHEN `value` = 'Transaction ID' THEN 'Free text 4'\n WHEN `value` = 'Transaktions-ID' THEN 'Freitextfeld 4'\n ELSE `value`\n END\n WHERE `namespace` = 'backend/order/main'\n AND `value` IN ('Transaction ID','Transaktions-ID')\";\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $sql = \"DELETE FROM s_attribute_configuration WHERE `table_name` = 's_order_attributes' AND\n `column_name` IN ('attribute4') AND\n `label` IN ('Transaction ID')\";\n }\n Shopware()->Db()->query($sql);\n }", "public function destroy(GroceryOrder $groceryOrder)\n {\n //\n }" ]
[ "0.7734511", "0.7657907", "0.7652144", "0.7652144", "0.7575158", "0.7502184", "0.7428316", "0.7428316", "0.7422564", "0.74171025", "0.7329596", "0.7262482", "0.7247783", "0.720496", "0.7185836", "0.7185836", "0.7185836", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7127131", "0.7084794", "0.7070144", "0.6968107", "0.6960477", "0.6960477", "0.6902276", "0.6859839", "0.68541455", "0.67552364", "0.66979104", "0.66814744", "0.6678393", "0.6652449", "0.6627761", "0.6599236", "0.65778244", "0.6558887", "0.6553783", "0.6546869", "0.6530691", "0.6530691", "0.65280765", "0.64852864", "0.6480032", "0.6477834", "0.6461423", "0.6459996", "0.6459996", "0.6448978", "0.64442974", "0.6443458", "0.64284873", "0.6374255", "0.63604057", "0.6359054", "0.63451463", "0.63284487", "0.63122", "0.6310277", "0.6294574", "0.6294553", "0.6285743", "0.62851745", "0.6279602", "0.6278291", "0.6278291", "0.62763685", "0.62762994", "0.6272991", "0.62712705", "0.6269369", "0.62638515", "0.62604284", "0.62570596", "0.62522537", "0.62378955", "0.6232396", "0.62314826", "0.62269944", "0.6222039", "0.6208528", "0.6202458", "0.6198901" ]
0.0
-1
/ specify names for command properties, not required
public function createAction() { $this->request()->commandProperties([ 'name', ]); if (!$name = $this->request()->command('name')) return $this->_('ERROR: Empty migration name parameter'); if (!$name = preg_replace('~[^0-9A-z_]+~iu', '', $name)) return $this->_('ERROR: Wrong migration name parameter'); if (!is_dir(MIGRATE_PATH)) return $this->_('ERROR: Directory is not exist "' . MIGRATE_PATH . '"'); $name = 'Migrate_' . time() . "_$name"; $content = @file_get_contents(BASE_PATH . 'base/migrate/create.tpl'); $content = str_replace('{name}', $name, $content); @file_put_contents(MIGRATE_PATH . $name . '.php', $content); return $this->_('Migration "' . $name . '" created'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function defineCommandOptions(){}", "public function command($name)\n {\n $this->name = $name;\n }", "protected function defineCommandOptions()\n {\n $this->addOption('all', 'A', InputOption::VALUE_NONE, \"List all defined globals settings\");\n\n $this->addArgument('key', InputArgument::OPTIONAL, \"Config param name\", null);\n $this->addArgument('value', InputArgument::OPTIONAL, \"If set, will set param [key] to this value\", null);\n\n }", "abstract public function getCommandName();", "public function testConstructSetsName()\n {\n self::assertNotEmpty($this->command->getName());\n }", "public function nameCommand()\n {\n $userName = $this->getFromName();\n if (!empty($this->e->getParams())) {\n $newName = implode(' ', $this->e->getParams());\n $this->reply($userName . ' теперь известен как ' . $newName);\n } else {\n $newName = $userName;\n $this->reply($userName . ' теперь использует имя по-умолчанию');\n }\n $this->setUserName($this->getUserId(), $newName);\n }", "protected function configure() {\n $this->setName('show');\n $this->setDescription('Find a property by its ID');\n $this->addArgument('id', InputArgument::REQUIRED, 'ID must be set');\n }", "abstract protected function getCommand();", "public function testParsingCommandName()\n {\n $request = $this->parser->parse('foo');\n $this->assertEquals('foo', $request->getCommandName());\n $this->assertEquals([], $request->getArgumentValues());\n $this->assertEquals([], $request->getOptionValues());\n }", "public function getCommandName(): string;", "protected function configure()\n {\n $this->setName('examplecommand:helloworld');\n $this->setDescription('ExampleCommandDescription');\n $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');\n }", "protected function configure() {\n\n\t\tparent::configure();\n\t\t$this\n\t\t\t->setName( self::COMMAND_NAME )\n\t\t\t->setDescription( 'Just testing some command-running stuff' );\n\n\n\t}", "public function getCommand()\n {\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function getShortCommandIdentifiers() {}", "protected function configure() {\n $this\n // the name of the command (the part after \"bin/console\")\n ->setName('admin:generar-clientes-prueba')\n\n // the short description shown while running \"php bin/console list\"\n ->setDescription('Crea clientes de manera aleatoria.')\n\n // the full command description shown when running the command with\n // the \"--help\" option\n ->setHelp(\"Crea clientes de manera aleatoria con un numero definido por el primer parametro\")\n ->addArgument('cantidad', InputArgument::REQUIRED, '¿Cuantos clientes?')\n ;\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function getCommand();", "protected function standardCommands()\n {\n return [\n AnyMakeCommand::class,\n TraitMakeCommand::class,\n ContractMakeCommand::class,\n InterfaceMakeCommand::class,\n ];\n }", "protected abstract function describeCommand(\\RectorPrefix20210607\\Symfony\\Component\\Console\\Command\\Command $command, array $options = []);", "public function getCommand() {}", "public static function allowedCommands()\n {\n return array(\n 'help' => 'Help',\n 'changeNamespace' => 'Replace namespace',\n );\n }", "protected function configure()\n {\n $this\n ->setName(\"{$this->namespace}:{$this->method}\")\n ->setDescription($this->description)\n ->addArgument($this->argName, InputArgument::REQUIRED, 'The input string.')\n ->configureOptions();\n }", "public static function getCommand($property = null,$default = null) {\n if(!isset(self::$command)) {\n\n // get the command map\n $map = self::getCommandMap();\n\n // load the command\n $action = self::getAction();\n if (isset ( $map [$action])) {\n $command = $map [$action];\n } else if (array_key_exists ( null, $map )) {\n $command = $map [null];\n } else {\n return;\n }\n\n // set the command\n self::$command = is_object($command)\n ? (array)$command\n : array_merge(self::getCommandDefaults(),$command);\n }\n\n if(func_num_args() > 0) {\n if(isset(self::$command[$property])) {\n return self::$command[$property];\n }\n return $default;\n }\n\n return self::$command;\n }", "public function getCommandText();", "protected function configure()\n {\n $this->setName('andvab_geonames:clear:alternatenames');\n $this->setDescription('Clear the table alternate_names');\n $this->addArgument('languages', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The list of languages.');\n }", "protected function configure()\n {\n $this->setName($this->command)->setDescription($this->text);\n\n $this->addArgument('name', InputArgument::REQUIRED, 'Name of the class');\n\n $optional = InputOption::VALUE_OPTIONAL;\n\n $this->addOption('path', null, $optional, 'Path for the file to be created', $this->path);\n\n $this->addOption('namespace', null, $optional, 'Namespace of the class', $this->namespace);\n\n $this->addOption('package', null, $optional, 'Name of the package', 'App');\n\n $author = 'Rougin Gutib <[email protected]>';\n\n $this->addOption('author', null, $optional, 'Name of the author', $author);\n }", "abstract protected function getCommandList();", "function wsdl_docs_soapclient_ui_property_row($service, $types, $name = '', $info = array()) {\n $property['name'] = array(\n '#type' => 'textfield',\n '#disabled' => TRUE,\n '#size' => 40,\n '#default_value' => $name,\n );\n return $property;\n}", "function defCmdT($idx, $title, $command, $has_filter = false, $header_size = 0) {\n\tglobal $commands;\n\t$title = htmlspecialchars($title, ENT_NOQUOTES);\n\t$commands[$idx] = array(\n\t\t'title' => $title,\n\t\t'command' => $command,\n\t\t'has_filter' => $has_filter,\n\t\t'header_size' => $header_size);\n}", "public function generateCommands();", "protected function configure()\n {\n $this\n ->setName('iNachoLee:copiarcargas')\n ->setDefinition(array(\n new InputOption('accion', false, InputOption::VALUE_OPTIONAL, 'Preguntas Temporales')\n ))\n ->setDescription('Genera Slug y Linea de academica');\n }", "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'],\n ];\n }", "function customCommand($cmdName, $status, $var1 = '', $var2 = '') \r\n {\r\n $cmdName = mysql_real_escape_string($cmdName);\r\n $status = mysql_real_escape_string($status);\r\n $var1 = mysql_real_escape_string($var1);\r\n $var2 = mysql_real_escape_string($var2);\r\n \r\n $sql = \"INSERT INTO `commands` (\r\n `id` ,\r\n `status` ,\r\n `action` ,\r\n `var1` ,\r\n `var2` ,\r\n `test_id`\r\n )\r\n VALUES (\r\n NULL , '$status', '$cmdName', '$var1', '$var2', '$this->t_id'\r\n );\";\r\n $this->sql($sql);\r\n }", "protected function configure()\n {\n $this\n ->setName('permissions')\n ->setDescription('Set the permissions of a kServer project')\n ->addArgument('name', InputArgument::REQUIRED, 'The name of the project');\n }", "protected function configure()\n {\n $this->setName( 'ezp_cookbook:myfistcommand' )->setDefinition(\n array(\n new InputArgument( 'contentId', InputArgument::REQUIRED, 'An existing content id' )\n )\n );\n }", "private static function processSubCommand($command, $subcommand_name, $keys) {\r\n //adds a subcommand\r\n $submcd = $command->addCommand($subcommand_name);\r\n\r\n //merge passed keys with standard values. standard values will be overwritten\r\n $keys = array_merge(array(\r\n 'short' => array(\r\n 'actions' => array(\r\n 'insert' => 'optional',\r\n ),\r\n 'description' => 'if set, will just output the ID of newly inserted line on success',\r\n 'action' => 'StoreTrue'\r\n ),\r\n 'noconfirm' => array(\r\n 'actions' => array(\r\n 'delete' => 'optional',\r\n ),\r\n 'description' => 'if set, will not ask for confirmation on delete',\r\n 'action' => 'StoreTrue'\r\n ),\r\n ), $keys);\r\n\r\n // for all possible parameters\r\n foreach ($keys as $key => $data) {\r\n // if parameter is required or optional for this subcommand\r\n if (isset($data['actions'][$subcommand_name]) && ($data['actions'][$subcommand_name] == 'optional' || $data['actions'][$subcommand_name] == 'required')) {\r\n //set standard options for $submcd->addOption\r\n $stdopts = array(\r\n 'long_name' => '--' . $key,\r\n 'help_name' => $key\r\n );\r\n //add extra options. ignore $data['actions'] and $data['colname'], these are not of interest to $submcd->addOption\r\n $extraopts = array_diff_key($data, array('actions' => null, 'colname' => null));\r\n $options = array_merge($stdopts, $extraopts);\r\n //add prefix (required) or (optional) to description\r\n $options['description'] = sprintf('(%2$s) %1$s', $data['description'], $data['actions'][$subcommand_name]);\r\n //add option to subcommand\r\n $option = $submcd->addOption($key, $options);\r\n }\r\n }\r\n }", "protected function configure()\n {\n\n // initialize the command with the required/optional options\n $this->setName(CommandNames::IMPORT_CREATE_OK_FILE)\n ->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for the import, one of \"create-ok-files\" or a combination of them', 'create-ok-files')\n ->setDescription('Create\\'s the OK file for the CSV files of the configured source directory');\n\n // invoke the parent method\n parent::configure();\n }", "private function specifyParameters(): void\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n $this->addArgument(...$arguments);\n }\n\n foreach ($this->getOptions() as $options) {\n $this->addOption(...$options);\n }\n }", "protected function configure()\n {\n // command configuration\n $this->setName('cs:generate:group')\n ->setDescription('Create and register new group')\n ->addArgument('name', InputArgument::OPTIONAL, \"What's the group name?\")\n ->addArgument('locked', InputArgument::OPTIONAL, \"What's the group locked state?\")\n ->addArgument('expiration', InputArgument::OPTIONAL, \"What's the group expiration date?\")\n ->addArgument('roles', InputArgument::IS_ARRAY, \"What's the group roles?\");\n }", "public function command($m){}", "abstract public function getCommand(string $name): string;", "public function getName() {\n return $this->commandName;\n }", "protected function specifyParameters()\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n call_user_func_array([$this, 'addArgument'], $arguments);\n }\n foreach ($this->getOptions() as $options) {\n call_user_func_array([$this, 'addOption'], $options);\n }\n }", "function _getCommands()\n\t{\n\t\treturn array();\n\t}", "protected function configure(): void\n {\n $this->setName('abc:check-cars')\n ->setDescription('Check all cars')\n ->addArgument('format', InputArgument::OPTIONAL, 'Progress format')\n ->addOption('option', null, InputOption::VALUE_NONE, 'Option description');\n }", "abstract function command();", "protected function configure()\n {\n $this\n ->setName('demo:greet')\n ->setDescription('Greet someone')\n ->addArgument(\n 'name',\n InputArgument::OPTIONAL,\n 'Who do you want to greet?'\n )\n ->addOption(\n 'yell',\n null,\n InputOption::VALUE_NONE,\n 'If set, the task will yell in uppercase letters'\n );\n }", "protected function configure()\n {\n $this->setName('state:list')\n ->setDescription('List states of a stated class')\n ->addArgument(\n 'path',\n InputOption::VALUE_REQUIRED,\n 'Path of the stated class'\n );\n }", "protected function resolveCommandMethodName() {}", "protected function configure()\n {\n $this->setDescription('Send a notification to a user')\n ->setHelp('This command allows you to send a notification to a user');\n $this->addArgument('subject', InputArgument::REQUIRED, 'Add notification subject');\n $this->addArgument('message', InputArgument::REQUIRED, 'Add notification message');\n $this->addArgument('type', InputArgument::REQUIRED, 'Specify notification type');\n $this->addArgument('username', InputArgument::REQUIRED, 'Specify user to whom this notification will be sent to');\n }", "private function _prepareCommand() {\n\t\t$args = array(\n\t\t\tself::PDF_DPI => $this->getDpi(),\n\t\t\tself::PDF_GRAYSCALE => $this->getIsGrayscale(),\n\t\t\tself::PDF_HEADER_LEFT => null,\n\t\t\tself::PDF_HEADER_RIGHT => null,\n\t\t\tself::PDF_LOWQUALITY => $this->getIsLowQuality(),\n\t\t\tself::PDF_ORIENTATION => $this->getPageOrientation(),\n\t\t\tself::PDF_PAGE_SIZE => $this->getPageSize()\n\t\t);\n\t\t$args = array_filter($args, create_function('$v', 'return !(false === $v);'));\n\t\t$args = array_filter($args, create_function('$v', 'return !is_null($v);'));\n\n\t\t$options = array_keys($args);\n\n\t\tarray_walk($options, create_function('&$v,$k', '$v = $v . \" %s\";'));\n\t\treturn vsprintf($this->_command . ' ' . implode(' ', $options) . ' - - ', array_values($args));\n\t}", "protected function configure()\n {\n $this->setName('key:drop')\n ->setDescription('Drops registered key')\n ->setHelp(\"<comment>\\nDrops registered key.\\n</comment>\")\n ->addOption('storage', null, InputOption::VALUE_REQUIRED, 'Specify the storage of the key to delete', 'file');\n }", "public function setCommand($command)\n\t{\n\t\t$this->command = $command;\n\t}", "public function getCommands()\n {\n return [\n ];\n }", "public function testNameAndArguments()\n {\n $this->assertEquals('contao:install-web-dir', $this->command->getName());\n $this->assertTrue($this->command->getDefinition()->hasArgument('path'));\n }", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function getCommand()\n {\n\n return [\n\n // Usage of the command\n 'usage' => \"Command reads a file and output it in upper or lower case\",\n\n // Options for only this command\n 'options' => [\n '--up' => 'Will put string in uppercase',\n '--low' => 'Will put string in lowercase'\n ],\n\n // 'cast' => [\n // 'up' => 'int', // Cast to int, bool, float. Default is string\n // ],\n\n // Main options, which other commands may have access to\n 'main_options' => [\n '--main' => 'Test with a main option'\n ],\n\n // Are there any arguments and what are they used for.\n // This is only for displaying help. Any number of arguments can be\n 'arguments' => [\n 'File' => 'Read from a file and output to stdout. You can also pipe input to the command',\n ],\n \n // Set a default command if none if given\n // php demos/example --up README.md\n // Instead of:\n // php demos/example echo --up README.md\n // Then set 'is_default' to true\n // 'is_default' => true, \n ];\n }", "function wsdl_docs_soapclient_ui_property_row_new($name) {\n $property['name'] = array(\n '#type' => 'textfield',\n '#disabled' => TRUE,\n '#size' => 40,\n '#default_value' => $name,\n );\n return $property;\n}", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function inflect(ICommand $command);", "public function supports($commandClassName);", "protected function configure()\n {\n $this\n ->setName('jump')\n ->addArgument('name', InputArgument::OPTIONAL, 'The name of the jumpbox')\n ->setDescription('Create a new jumpbox for accessing private databases');\n }", "public function testOoCanSetGetParameters()\n {\n $mainCommand = 'ls';\n $parameters = [new Command\\Parameter('/usr/local/bin'), new Command\\Parameter('../')];\n $command = $this->createInstance($mainCommand);\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n $this->assertEquals($parameters, $command->getParameters(), 'Must be able to get and set multiple parameter objects');\n }", "public function testCanSetGetSubCommands()\n {\n $mainCommand = 'composer';\n $subCommands = ['init', 'another'];\n $command = $this->createInstance($mainCommand);\n foreach ($subCommands as $_subCommand) {\n $command->addSubCommand($_subCommand);\n }\n $this->assertSame($subCommands, $command->getSubCommands(), 'Must be able to have a list of all subcommands retrieved');\n }", "protected function configure()\n {\n $this->setName('processor');\n $this->addArgument('filePath', InputArgument::REQUIRED, 'Please enter the input file path');\n }", "function _getCommands()\n\t{\n\t\t$commands = array();\n\t\t$commands[] = array( 'permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true );\n//\t\t$commands[] = array('permission' => 'read', 'cmd' => 'render', 'lang_var' => 'show', 'default' => true);\n//\t\t$commands[] = array('permission' => 'write', 'cmd' => 'enableAdministrationPanel', 'lang_var' => 'edit_content');\n//\t\t$commands[] = array( 'permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'settings' );\n\n\t\treturn $commands;\n\t}", "public function command($value) {\n return $this->setProperty('command', $value);\n }", "public function setDefaultCommands() {\n\t\t$this->registerAll([\n\n\t\t]);\n\t}", "public function help()\n {\n echo PHP_EOL;\n $output = new Output;\n $output->write('Available Commands', [\n 'color' => 'red',\n 'bold' => true,\n 'underline' => true,\n ]);\n echo PHP_EOL;\n\n $maxlen = 0;\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n if ($len > $maxlen) {\n $maxlen = $len;\n }\n\n }\n\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n $output->write(' ')\n ->write($key, ['color' => 'yellow'])\n ->write(str_repeat(' ', $maxlen - $len))\n ->write(' - ')\n ->write($description);\n\n echo PHP_EOL;\n }\n\n echo PHP_EOL;\n\n }", "public static function getCommandDefaults() {\n\t return self::$commandDefaults \n\t ?? (self::$commandDefaults = array(\n\t 'session' => true,\n\t 'authenticate' => true,\n\t 'authorize' => null,\n\t 'access_level' => 1,\n\t 'validate' => null,\n\t 'post'=> null,\n\t 'get' => null,\n\t 'page' => null,\n\t 'tab' => null,\n\t 'tabgroup' => null));\n\t}", "public function generateConfigCommand()\n {\n $this->outputLine('Making the following config settings:');\n foreach ($this->configSettings as $key => $value) {\n $this->h5pFramework->setOption($key, $value);\n $this->outputLine(\"<b>$key:</b> $value\");\n }\n }", "protected function configure()\n {\n $this->setName('cs:remove:group')\n ->setDescription('Remove a group')\n ->addArgument('name', InputArgument::OPTIONAL, \"What's the group name?\");\n }", "private function getCommandString($name, $args = [])\n {\n $result = \"notificationName;\" . strlen($name) . \";\" . $name . \";\";\n\n foreach ($args as $key => $value) {\n $result .= $key . \";\" . strlen($value) . \";\" . $value . \";\";\n }\n\n return $result;\n }", "function getCommandClass()\r\n\t{\r\n\t\treturn ''; \t\r\n\t}", "protected function configure()\n {\n $this\n ->setName('command:again')\n ->addArgument('id', InputArgument::OPTIONAL, 'The command ID')\n ->setDescription('Re-execute a CLI command');\n }", "public function testOoCanOutputAllWithValues()\n {\n $mainCommand = 'composer';\n $command = $this->createInstance($mainCommand);\n\n $subCommands = [new Command\\Subcommand('update')];\n foreach ($subCommands as $_subCommand) {\n $command->addSubCommand($_subCommand);\n }\n \n $flags = [new Command\\Flag('n', 'trololo')];\n foreach ($flags as $_flag) {\n $command->addFlag($_flag);\n }\n\n $arguments = [new Command\\Argument('no-dev', 'lalala')];\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n\n $parameters = [new Command\\Parameter('monolog/monolog')];\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n\n $this->assertEquals(\n sprintf('%1$s update -n %3$s --no-dev %4$s %2$s', $mainCommand, escapeshellarg('monolog/monolog'), escapeshellarg('trololo'), escapeshellarg('lalala')),\n (string) $command,\n 'Must be able to output the command string correctly, including the sub command, flags, arguments, and parameters'\n );\n }", "public function validateAndParseArgs() {\n $areParamsValid = true;\n \n // Validate Command\n if(!in_array($this->cmd, $this->validCommands)) {\n throw new \\Exception(\"Invalid Command '\" . $this->cmd . \"'.\");\n }\n \n // Validate Command Parameters\n switch($this->cmd) {\n case 'add':\n // Param order should be: pet_type, item_type, name, color, lifespan, age, price\n if(count($this->cmdParams) !== 7) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[4]) || !is_numeric($this->cmdParams[5]) || !is_numeric($this->cmdParams[6])) {\n $areParamsValid = false;\n }\n // Do not allow negative values\n if($this->cmdParams[4][0] === \"-\" || $this->cmdParams[5][0] === \"-\" || $this->cmdParams[6][0] === \"-\") {\n $areParamsValid = false;\n }\n break;\n case 'update':\n // Param order should be: id, pet_type, item_type, name, color, lifespan, age, price\n if(count($this->cmdParams) !== 8) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[0]) || !is_numeric($this->cmdParams[5]) || !is_numeric($this->cmdParams[6]) || !is_numeric($this->cmdParams[7])) {\n $areParamsValid = false;\n }\n // Do not allow negative values\n if($this->cmdParams[5][0] === \"-\" || $this->cmdParams[6][0] === \"-\" || $this->cmdParams[7][0] === \"-\") {\n $areParamsValid = false;\n }\n break;\n case 'delete':\n if(count($this->cmdParams) !== 1) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[0])) {\n $areParamsValid = false;\n }\n break;\n case 'list':\n // 'list' can come with a 'sort' and/or 'filter parameter\n if(isset($this->cmdParams[0])) {\n if($this->cmdParams[0] === \"filters\") {\n $this->arg_list_filters = ((isset($this->cmdParams[1])) ? $this->cmdParams[1] : null);\n } elseif($this->cmdParams[0] === \"sort\") {\n $this->arg_list_sort = ((isset($this->cmdParams[1])) ? $this->cmdParams[1] : null);\n } else {\n $areParamsValid = false;\n }\n }\n if(isset($this->cmdParams[2])) {\n if($this->cmdParams[2] === \"filters\") {\n $this->arg_list_filters = ((isset($this->cmdParams[3])) ? $this->cmdParams[3] : null);\n } elseif($this->cmdParams[2] === \"sort\") {\n $this->arg_list_sort = ((isset($this->cmdParams[3])) ? $this->cmdParams[3] : null);\n } else {\n $areParamsValid = false;\n }\n }\n break;\n case 'help':\n break;\n default:\n throw new \\Exception(\"This line should not have been reached; bug in code.\");\n }\n \n if(!$areParamsValid) {\n throw new \\Exception(\"Invalid parameters passed to script.\");\n }\n }", "public function set_properties( $args ) {\n\n\t\t// Reset default property values\n\t\t$reset = array(\n\t\t\t'debug_mode' => false,\n\t\t\t'parant_plugin_slug' => '',\n\t\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/wordpress-plugins.php',\n\t\t);\n\n\t\t// Define properties\n\t\tforeach ( $reset as $name => $default ) {\n\n\t\t\tif ( array_key_exists( $name, $args ) ) {\n\t\t\t\t// If set, use defined values\n\t\t\t\t$this->{$name} = $args[$name];\n\t\t\t} else {\n\t\t\t\t// If not set, use default values\n\t\t\t\t$this->{$name} = $default;\n\t\t\t}\n\n\t\t}\n\n\t}", "public function getCommandMap(): array\n {\n return [\n 'GetProducts' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductList',\n 'GetProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductGet',\n 'CreateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductCreate',\n 'UpdateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductUpdate',\n 'DeleteProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductDelete',\n 'GetLicenses' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\LicenseList'\n ];\n }", "abstract protected function properties();", "public function registerCommands()\n\t{\n// Artisan::add(new InstallCommand);\n// Artisan::add(new UpdateCommand);\n \n\t\t$commands = array('SkinsInstall','SkinsUpdate');\n\n\t\tforeach ($commands as $command)\n\t\t{\n\t\t\t$this->{'register'.$command.'Command'}();\n\t\t}\n\n\t\t$this->commands(\n\t\t\t'command.skins.install','command.skins.update'\n\t\t);\n \n\t}", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "protected function configure() {\n $this\n ->setName('command:traitement')\n ->setDescription('Traitement des données Apidae');\n }", "public function defaultCommands()\n {\n return [\n 'server' => [\n 'class' => ServerCommand::class,\n ],\n 'server:start' => [\n 'class' => ServerStartCommand::class,\n ],\n 'server:stop' => [\n 'class' => ServerStopCommand::class,\n ],\n 'server:restart' => [\n 'class' => ServerRestartCommand::class,\n ],\n 'server:reload' => [\n 'class' => ServerReloadCommand::class,\n ],\n 'server:serve' => [\n 'class' => ServerServeCommand::class,\n ],\n 'shell' => [\n 'class' => ShellCommand::class,\n ]\n ];\n }", "static function getSubCommands();", "protected function configure() {\n\t\t$this->setName('tiny:invoice:delete');\n\t\t$this->setDescription('Delete an invoice');\n\t\t$this->addArgument('invoice_id', InputArgument::REQUIRED, 'invoice_id');\n\t}", "function properties()\n {\n }", "public function getCommandOptionDefinitions()\n {\n return [];\n }", "public function getCommandOptionDefinitions()\n {\n return [];\n }", "public function setName($name) {\n $trimmed = trim($name);\n\n if (strlen($trimmed) > 0 && !strpos($trimmed, ' ')) {\n $this->commandName = $name;\n\n return true;\n }\n\n return false;\n }", "public function testCanSetGetParameters()\n {\n $mainCommand = 'ls';\n $parameters = ['/var/log', './'];\n $command = $this->createInstance($mainCommand);\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n $this->assertEquals($parameters, $command->getParameters(), 'Must be able to get and set multiple parameters');\n }", "protected function configure()\n\t{\n\t\t$this\n\t\t\t->setName('user:activate')\n\t\t\t->setDescription($this->language->lang('CLI_DESCRIPTION_USER_ACTIVATE'))\n\t\t\t->setHelp($this->language->lang('CLI_HELP_USER_ACTIVATE'))\n\t\t\t->addArgument(\n\t\t\t\t'username',\n\t\t\t\tInputArgument::REQUIRED,\n\t\t\t\t$this->language->lang('CLI_DESCRIPTION_USER_ACTIVATE_USERNAME')\n\t\t\t)\n\t\t\t->addOption(\n\t\t\t\t'deactivate',\n\t\t\t\t'd',\n\t\t\t\tInputOption::VALUE_NONE,\n\t\t\t\t$this->language->lang('CLI_DESCRIPTION_USER_ACTIVATE_DEACTIVATE')\n\t\t\t)\n\t\t\t->addOption(\n\t\t\t\t'send-email',\n\t\t\t\tnull,\n\t\t\t\tInputOption::VALUE_NONE,\n\t\t\t\t$this->language->lang('CLI_DESCRIPTION_USER_ADD_OPTION_NOTIFY')\n\t\t\t)\n\t\t;\n\t}", "public function getCommands()\n {\n return array();\n }", "private function registerConsoleCommands()\n {\n $this->commands(BadasoSitemapSetup::class);\n $this->commands(BadasoSitemapTestSetup::class);\n }", "public function getProperty1Name() {}", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier.\n if ($this->signature !== null) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct();\n }\n\n $this->setDescription($this->description);\n\n $this->setHidden($this->hidden);\n\n if ($this->signature === null) {\n $this->specifyParameters();\n }\n }", "private function printListOfCommands()\n {\n /**\n * @var Padding\n */\n $padding = $this->cli->padding(50)->char(' ');\n $padding->label(' <bold><blue>show dbs:</blue></bold>')->result('show database names');\n $padding->label(' <bold><blue>show collection:</blue></bold>')->result('show collections in current database');\n $padding->label(' <bold><blue>use:</blue></bold>')->result('set current database');\n }", "public abstract function registry(): CommandDescribe;", "protected static function command_details($options, $keys) {\r\n $propel_class = call_user_func(array(get_called_class(), 'getPropelClass')) . 'Query';\r\n $q = new $propel_class;\r\n\r\n $item = $q->findOneBy($keys['id']['colname'], $options['id']);\r\n if ($item == null) {\r\n $cmdname = call_user_func(array(get_called_class(), 'CLI_commandName'));\r\n trigger_error(sprintf(\"No $cmdname found for id %d.\\n\", $options['id']), E_USER_ERROR);\r\n }\r\n\r\n $table_keys = array_keys(array_filter($keys, function($val) {\r\n return isset($val['colname']);\r\n }));\r\n $results = self::prepareQueryResult(array($item));\r\n self::printTable($table_keys, $results);\r\n }" ]
[ "0.6406731", "0.6141441", "0.60041213", "0.59673685", "0.58744985", "0.57174426", "0.5699127", "0.5605896", "0.5524268", "0.5471651", "0.5463972", "0.5425009", "0.542314", "0.54102296", "0.5391896", "0.53867847", "0.5383985", "0.53772336", "0.5370679", "0.53553486", "0.5349045", "0.53378826", "0.5239498", "0.52262735", "0.5221047", "0.5217697", "0.52056646", "0.51924175", "0.5191813", "0.5160647", "0.514787", "0.51444155", "0.5137974", "0.513791", "0.5132061", "0.5125773", "0.5125684", "0.51173586", "0.5115023", "0.51143706", "0.5106656", "0.5102265", "0.50990564", "0.5098407", "0.50950783", "0.5092139", "0.50921273", "0.50833267", "0.507332", "0.5062045", "0.5057226", "0.5056428", "0.5051642", "0.5048646", "0.5043425", "0.50432557", "0.50431293", "0.5028944", "0.50266623", "0.5026295", "0.5009637", "0.5004749", "0.4998436", "0.4994714", "0.4986995", "0.49767706", "0.49762055", "0.4974378", "0.49729818", "0.4972435", "0.49678084", "0.49663934", "0.49629265", "0.49546573", "0.4954464", "0.49515438", "0.49499163", "0.4948734", "0.49408653", "0.49363106", "0.49302748", "0.4927648", "0.49159372", "0.49159372", "0.49158528", "0.49130374", "0.4912378", "0.49114478", "0.49094513", "0.49084547", "0.49084547", "0.4896392", "0.48945054", "0.48923913", "0.48922378", "0.48878857", "0.48875833", "0.48847145", "0.48776716", "0.4874345", "0.48735413" ]
0.0
-1
Get the value of Id_batiment
public function getId_batiment() { return $this->Id_batiment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBidId(){\n return $this->bidId; \n }", "public function getBid()\n {\n return $this->getAttribute()->getBid();\n }", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function setId_batiment($Id_batiment)\n {\n $this->Id_batiment = $Id_batiment;\n\n return $this;\n }", "public function getidBateau(){\r\n return $this->_idBateau;\r\n }", "public function getID_B()\n {\n return $this->ID_B;\n }", "public function getId_Boisson()\n{\nreturn $this->Id_Boisson;\n}", "public function getBachilleratoId()\n\t{\n\t\treturn $this->bachilleratoId;\n\t}", "public function getIdAttribute()\n {\n return $this->attributes['bag_id'];\n }", "public function getBentukLembagaId()\n {\n return $this->bentuk_lembaga_id;\n }", "public function getIdBangunan()\n {\n return $this->id_bangunan;\n }", "public function getPeminjamanBukuAttribute(){\n return $this->buku->pluck('id')->toArray();\n }", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public function get_bagian($id)\r\n\t\t{\r\n\t\t\t$hasil = $this->db->query(\"SELECT * FROM tbl_bagian WHERE id_unit='$id'\");\r\n\t\t\treturn $hasil->result(); \r\n\t\t}", "public function getId(){\n return $this->_data['id'];\n }", "function getStatusID() {\n\t\treturn $this->data_array['status_id'];\n\t}", "public function getBeritabyID($ID_BRT)\n {\n \n return $this->db->get_where('tb_berita', ['ID_BRT' => $ID_BRT])->row_array();\n }", "public function getBU()\n {\n $value = $this->get(self::BU);\n return $value === null ? (integer)$value : $value;\n }", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public function getBarangId($id_barang)\n {\n return $this->db->get_where('tb_barang', ['id_barang' => $id_barang])->result_array();\n }", "public function getStatusId()\n {\n return $this->getValue('nb_icontact_prospect_status_id');\n }", "public function getId(){\n return (string) $this->film['id'];\n }", "public function getBankId()\n {\n return $this->bank_id;\n }", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "public function fetchBatchId ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setClass_id($batch_identifier_class_id);\r\n $class_object->fetchInfo();\r\n $batch_id = $class_object->getBatch_id();\r\n return $batch_id;\r\n }", "public function getBatchID()\n {\n return $this->BatchID;\n }", "public function getIdAct(){\n\t\treturn $this->idAct;\n\t}", "public function cekIdBayarLast()\n {\n\n $query = \"SELECT id_bayar FROM pembayaran order by id_bayar DESC limit 1\";\n\n return $this->db->query($query)->row_array();\n }", "public function retrieve_product_batchid()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$batch_id = $this->input->post('batch_id');\n\t\t$product_info = $CI->Invoices->get_total_product_batch($batch_id);\n\t\techo json_encode($product_info);\n\t}", "public function getId_book()\n {\n return $this->id_book;\n }", "public function getId() {\n\t\treturn $this -> data['id'];\n\t}", "public function getIntuitTid(){\n return $this->intuit_tid;\n }", "function get_tb_am_bon($bon_id)\n {\n return $this->db->get_where('tb_am_bons',array('bon_id'=>$bon_id))->row_array();\n }", "public function getTid()\n {\n \treturn $this->getParameter('tid');\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function getId() {\r\n\t\treturn $this->data['id'];\r\n\t}", "public function getBLID() {\n\t\treturn $this->blid;\n\t}", "public function id() {\n return $this->activity_array['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "function getBrfId()\n {\n return (int) $this->_iBrfId;\n }", "public function findById($id){\n $query = $this->db->get_where('bmi_pasien',['id'=>$id]);\n return $query->row();\n }", "public function getIdBaru($data)\n {\n $query = \"SELECT id_baru FROM \".$this->table.\" WHERE id=:id\";\n\n $this->db->query($query);\n\n $this->db->bind('id', $data);\n\n return $this->db->single();\n }", "public function getVarighet()\n {\n return $this->getTid();\n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function getBreeding($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from breeding_tbl where breeding_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breeding_id'];\n\n\t}\n\t$crud->disconnect();\n}", "function getStatId(){\n $connexion = openDBConnexion();\n $request = $connexion->prepare('\n SELECT idStatistics FROM bdd_satisfevent.statistics\n ORDER BY idStatistics DESC LIMIT 1 ');\n $request->execute(array());\n $result = $request->fetchAll();\n return $result[0]['idStatistics'];\n}", "public function getIdBosses() {\n return intval($this->idBosses);\n }", "public function getBusinessId()\n {\n return $this->id;\n }", "function getIdBosses() {\n return $this->idBosses;\n }", "public function getIdHapusBuku()\n {\n return $this->id_hapus_buku;\n }", "public function getBookId()\n {\n return $this->bookId;\n }", "public function getFcpoIbannumber() \n {\n return $this->getResponseParameter('clearing_bankiban');\n }", "public function getBvoucher()\n {\n return $this->bvoucher;\n }", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getTid()\n {\n return $this->getTitler()->getVarighet();\n }", "public function poslednji_vestackiId() \n {\n $ocene=$this->findAll();\n $maxId=-1;\n foreach ($ocene as $ocena)\n {\n if ($ocena->VestackiId>$maxId)\n {\n $maxId=$ocena->VestackiId; \n }\n }\n return $maxId;\n }", "function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}", "public function getBonus() {\n return strval($this->bonus);\n }", "public function getIdDetail()\n {\n \treturn \"AVD-03-\". date(\"Y\") . sprintf('%05d', $this->id_actadocumentacion);\n }", "public function getBankId()\n {\n if (!empty($this->info['bank_id'])) {\n return $this->info['bank_id'];\n }\n }", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "function getBreed($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breed'];\n\n\t}\n\t$crud->disconnect();\n}", "public function getPkValue(){\n $pk = static::getPk();\n return (int) $this->$pk;\n }", "public function get_attr($id_atributo)\n {\n $this->db->where('id_atributo_b', $id_atributo);\n $resultado = $this->db->get('atributos_b');\n\n return $resultado->row();\n }", "public function getId()\n {\n return $this['id'];\n }", "function get_idbrg()\n {\n\t\t$this->db->order_by('ID_BRG', 'asc');\n\t\t$result = $this->db->get('tb_barang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->ID_BRG] = $row->NAMA_BRG;\n }\n }\n return $data;\n }", "public function getId()\n {\n return $this->getValue('id');\n }", "public function getBackblazeB2KeyId() {\n return @$this->attributes['backblaze_b2_key_id'];\n }", "public function getFundacion_idFundacion(){\n return $this->Fundacion_idFundacion;\n }", "public function getAttributeId();", "public function getBusinessUnitID(): string;", "public function getId() {\n return $this->attributes['id'];\n }", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getBonusCode()\n {\n return $this->bonusCode;\n }", "public function bobot_abc($id_bobot){\n\t\t$hasil = $this->db->where('id', $id_bobot)\n\t\t\t\t\t\t ->get('bobot');\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->row();\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function idPenjualan()\n {\n $get_id = $this->penjualan->get_idmax();\n\n return $get_id; //TRX00001\n }", "public function getId(){\r\n\t\t\treturn $this->id;\r\n\t\t}", "public function getValueId()\n {\n return $this->valueId;\n }", "public function getID()\n {\n return $this->banner_campaign_id;\n }", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getBetWithId($id, $db){\r\n $sql = \"SELECT movies.title as bet_movie ,users.username as username , current_bets.bet_status, place_bets.amount, place_bets.bet_type,place_bets.current_bet_id, place_bets.id FROM movies INNER JOIN current_bets ON movies.id = current_bets.movie_id inner join place_bets on current_bets.id = place_bets.current_bet_id inner join users on users.id = place_bets.user_id where place_bets.id = :id\";\r\n $pdostm = $db->prepare($sql);\r\n $pdostm->bindParam(':id', $id);\r\n $pdostm->execute();\r\n $bet = $pdostm->fetch(\\PDO::FETCH_OBJ);\r\n return $bet;\r\n }", "public function obtrequiereih($id_biopsia){\n $stmt=$this->objPDO->prepare(\"SELECT requiere_ih as requeridoih from sisanatom.detalle_bioce where id_biopsia=:id_biopsia\");\n $stmt->execute(array('id_biopsia'=>$id_biopsia));\n $reqbio=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $reqbio[0]->requeridoih;\n }", "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT id_komponenbiaya from masterkomponenbiaya order by id_komponenbiaya asc');\n\t\treturn $datas;\n\t}", "public function getId(){\r\n\t\treturn $this->id;\r\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}" ]
[ "0.6747695", "0.66339815", "0.66311955", "0.658652", "0.643237", "0.6398355", "0.6224411", "0.6188837", "0.6156267", "0.6151657", "0.6064528", "0.58263236", "0.5734558", "0.57297283", "0.57233727", "0.56914264", "0.5638607", "0.56230545", "0.5612167", "0.56011236", "0.55915684", "0.5564997", "0.5541738", "0.5541446", "0.55357575", "0.55320555", "0.5532051", "0.5531287", "0.55252045", "0.55213165", "0.5518142", "0.5498724", "0.549708", "0.5492643", "0.5473513", "0.54692715", "0.5465766", "0.5464458", "0.54599696", "0.54599696", "0.545687", "0.5456106", "0.54541314", "0.5453611", "0.5441406", "0.5434414", "0.5427328", "0.542238", "0.54158247", "0.54020554", "0.54018223", "0.53964853", "0.53960824", "0.5391751", "0.5390397", "0.5386853", "0.5386853", "0.5386853", "0.5386853", "0.5386853", "0.5368988", "0.536058", "0.5353347", "0.535167", "0.534683", "0.53438246", "0.53434664", "0.5343456", "0.53408265", "0.5329191", "0.5328516", "0.53231317", "0.53222126", "0.53167504", "0.5310564", "0.5310208", "0.5295712", "0.5293334", "0.52863234", "0.52863234", "0.527619", "0.5274392", "0.52738184", "0.52714956", "0.5271261", "0.5268944", "0.5268782", "0.52685016", "0.52685016", "0.52640533", "0.52640533", "0.52640533", "0.52640533", "0.52522486", "0.5245445", "0.52359855", "0.52325225", "0.5228425", "0.5228425", "0.5228425" ]
0.86391884
0
Set the value of Id_batiment
public function setId_batiment($Id_batiment) { $this->Id_batiment = $Id_batiment; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId_batiment()\n {\n return $this->Id_batiment;\n }", "public function setId($IDabbonamento)\n {\n $this->id = $IDabbonamento;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setId($id)\r\n {\r\n $this->data['itemid'] = (int) $id;\r\n }", "public function setId_Boisson($Id_Boisson)\n{\n$this->Id_Boisson = $Id_Boisson;\n\nreturn $this;\n}", "public function setIdVit($id){\n\t\t$this->id = $id;\n\t}", "function setBrfId($a_iBrfId)\n {\n $this->_iBrfId = (int) $a_iBrfId;\n $this->setSearchParameter('brf_id', $this->_iBrfId);\n }", "public function setId($id){\n $this->_id = $id;\n }", "public function setId($var){\n\t\t$this->id=$var;\n\t}", "function SetId($value) { $this->id=$value; }", "public function setId_book($id_book)\n {\n $id_book = (int) $id_book;\n if (is_int($id_book) && $id_book > 0) {\n $this->id_book = $id_book;\n }\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = (int)$iid_situacion;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }", "public function setId($id)\n {\n $this->id = $id;\n\n \n }", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function getId_Boisson()\n{\nreturn $this->Id_Boisson;\n}", "function setId($id){\n\t\t$this->id = $id;\n\t}", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "public function setId($id){\n $this->id = $id;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function setId($x) { $this->id = $x; }", "public function setId($id){ $this->id=$id;}", "public function setStatusIdAttribute($input)\n {\n $this->attributes['status_id'] = $input ? $input : null;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function getBidId(){\n return $this->bidId; \n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public function setId($id){\n $this->id=$id;\n }", "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id){\n\t\t$this->id = $id;\n\t}", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function setId($id){\n\t\t\t\t$this->id=$id;\n\t\t\t}", "public function setIdRespuesta($idRespuesta)\n {\n $this->idRespuesta = $idRespuesta;\n \n }", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId(int $id)\n {\n $this->id = $id;\n }", "public function setBentukLembagaId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->bentuk_lembaga_id !== $v) {\n $this->bentuk_lembaga_id = $v;\n $this->modifiedColumns[] = SekolahPaudPeer::BENTUK_LEMBAGA_ID;\n }\n\n if ($this->aBentukLembaga !== null && $this->aBentukLembaga->getBentukLembagaId() !== $v) {\n $this->aBentukLembaga = null;\n }\n\n\n return $this;\n }", "function setBatchID($BatchID)\n\t\t{\n\t\t\t$this->BatchID = $BatchID;\n\t\t}", "public function setId($id)\n {\n $this->_id = (int)$id;\n }", "public function setId($id) { $this->id = $id; }", "public function setId(int $id)\n {\n }", "public function setId($id){\n $this->id = (string) $id;\n }", "public function setIdAttribute($value)\n {\n $this->attributes['id'] = $value;\n }", "public function setIdcontenu($idcontenu)\n {\n if(is_numeric($idcontenu)) {\n $this->idcontenu = (int)$idcontenu;\n }\n }", "public function setProcessing($id){\n \t\t$model = Mage::getModel(\"mprmasystem/rmarequest\")->load($id);\n \t\t$model->setStatus(\"Processing\")->save();\n \t}", "public function setId($id) \n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n if ( ! array_key_exists($this->id, static::$basket)) {\n static::$basket[$this->id] = array();\n }\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}", "public function setIdBangunan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->id_bangunan !== $v) {\n $this->id_bangunan = $v;\n $this->modifiedColumns[] = BangunanPeer::ID_BANGUNAN;\n }\n\n\n return $this;\n }", "function setId_activ($iid_activ)\n {\n $this->iid_activ = $iid_activ;\n }", "public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}", "function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}", "public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}", "function setId_situacion($iid_situacion)\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function set_id($id){\n $this->id = $id;\n }", "function setId($id)\n {\n $this->id = $id;\n }", "public function setId($_id);", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setBusinessId($id)\n {\n $this->id = $id;\n }", "public function setId($id) ;", "public function setId($Id) \n {\n $this->Id = $Id;\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "public function setVatIdNo($vatin);", "public function setID($id){\n $this->id = $id;\n }", "public function actionUpdate($id)\n {\n if (Yii::$app->user->can('paskibraupdate')) {\n $model = $this->findModel($id);\n $model->setAttribute('update_et', date(\"Y-m-d H:i:s\"));\n $model->setAttribute('user_created', Yii::$app->user->identity->getId());\n $param = Yii::$app->request->post('PaskibraModel');\n\n //skill\n $this->langskill = $param['language_skill'];\n $this->lifeskill = $param['life_skill'];\n $this->otherlifeskill = $param['otherlifeskill'];\n $this->brevetaward = $param['brevet_award'];\n\n if (null != $this->otherlifeskill) {\n $this->saveOtherLifeSkill($this->otherlifeskill);\n $this->other_skill = [$this->otherlifeskill];\n $other_skill_id = [(count($this->lifeskill) + 1) => $this->otherlifeskillid];\n array_push($this->lifeskill, $other_skill_id[(count($this->lifeskill) + 1)]);\n }\n\n if (null != $this->brevetaward) {\n $data_brevet = $model->getAllBrevetNameById($this->brevetaward);\n $model->setAttribute('brevetaward', implode(', ', $data_brevet));\n }\n\n\n if (null != $this->langskill) {\n $data_lang = $model->getAllLangSkillNameById($this->langskill);\n $model->setAttribute('languageskill', implode(', ', $data_lang));\n }\n\n if (null != $this->lifeskill) {\n $data_skill = $model->getAllSkillNameById($this->lifeskill);\n if (isset($this->other_skill[0])) {\n array_push($data_skill, $this->other_skill[0]);\n }\n $model->setAttribute('lifeskill', implode(', ', $data_skill));\n }\n\n //photo\n if (($model->front_photo != $param['front_photo']) && $param['front_photo'] != null) {\n //delte old photo\n $this->photo->deleteProntPhoto($model->front_photo);\n $this->photo->deleteProntPhotoThumb($model->front_photo);\n\n //save new photo\n $this->photo->copyProntPhoto($param['front_photo']);\n $this->photo->copyProntPhotoThumb($param['front_photo']);\n }\n\n if (($model->side_photo != $param['side_photo']) && $param['side_photo'] != null) {\n $this->photo->deleteSidePhoto($model->side_photo);\n $this->photo->copySidePhoto($param['side_photo']);\n }\n\n if (($model->identity_card != $param['identity_card']) && $param['identity_card'] != null) {\n $this->photo->deleteIdentityCardPhoto($model->identity_card);\n $this->photo->copyIdentityCardPhoto($param['identity_card']);\n }\n\n if (($model->certificate_of_organization != $param['certificate_of_organization']) && $param['certificate_of_organization'] != null) {\n $this->photo->deleteCertificatePhoto($model->certificate_of_organization);\n $this->photo->copyCertificatePhoto($param['certificate_of_organization']);\n }\n\n\n //save database\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n if (null != $this->lifeskill) {\n $data = ArrayHelper::map($model->getTaxonomiesBySkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->lifeskill, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesBySkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n if (null != $this->langskill) {\n $data = ArrayHelper::map($model->getTaxonomiesByLangSkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->langskill, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesByLangSkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n if (null != $this->brevetaward) {\n $data = ArrayHelper::map($model->getTaxonomiesByBrevet()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->brevetaward, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesByBrevet()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n return $this->redirect(['view', 'action' => 'member-ppi-view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model\n ]);\n }\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function setID($id);", "public function setID($id){\n $this->id=$id;\n }", "public function getBachilleratoId()\n\t{\n\t\treturn $this->bachilleratoId;\n\t}", "public function setId( $id )\n {\n $this->id = $id;\n }", "public function setID($id) {\n $this->id = $id; \n }", "public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}", "public function proses_ubah_ket_blok($data, $id_blok)\n {\n $this->db->where('id_blok', $id_blok);\n $this->db->update('blok', $data);\n }", "public function setIdAtelier($valeur){\n $this->idAtelier = $valeur;\n }", "function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}", "public function setId($id)\n {\n $this->_id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function setId($id)\n {\n// // Si c'en était déjà un, rien ne changera.\n// // Sinon, la conversion donnera le nombre 0 (à quelques exceptions près, mais rien d'important ici).\n// $id = (int)$id;\n//\n// // On vérifie ensuite si ce nombre est bien strictement positif.\n// if ($id > 0) {\n// // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n// $this->_id = $id;\n// }\n }", "public function cambiarId($id) {\n $this->id = $id;\n }", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "public function SetId ($id);", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }" ]
[ "0.76356494", "0.6097018", "0.58651775", "0.57700163", "0.5764101", "0.57294595", "0.5657558", "0.5611514", "0.5577207", "0.55523413", "0.5541761", "0.5527859", "0.55245644", "0.551988", "0.55164087", "0.55164087", "0.55164087", "0.55041605", "0.5477404", "0.5474623", "0.5471434", "0.546898", "0.54667896", "0.5463918", "0.54605216", "0.545498", "0.5450288", "0.5438531", "0.5434222", "0.54227287", "0.54191494", "0.5413886", "0.53964055", "0.53947407", "0.53913045", "0.5384202", "0.5375129", "0.5371568", "0.53625226", "0.5351894", "0.5348984", "0.53479135", "0.534168", "0.5337033", "0.53302073", "0.5328229", "0.5319776", "0.5313697", "0.530667", "0.5304548", "0.53009266", "0.5298092", "0.5298092", "0.52893776", "0.5281228", "0.5279853", "0.5270695", "0.52632874", "0.5262832", "0.5258701", "0.5256017", "0.5255795", "0.52537876", "0.5251678", "0.5249957", "0.5249957", "0.52453256", "0.5244643", "0.5238151", "0.52381027", "0.5232116", "0.523014", "0.52208334", "0.5220348", "0.5216758", "0.52051663", "0.52027935", "0.52007747", "0.5200041", "0.5198196", "0.51902443", "0.51901656", "0.51826483", "0.51825374", "0.51793915", "0.5178232", "0.5176376", "0.51745015", "0.5172132", "0.51606417", "0.51575", "0.51575", "0.51575", "0.51575", "0.51575", "0.51572603", "0.51572603", "0.5156296", "0.5156296", "0.5156296" ]
0.8076125
0
Display a listing of the resource.
public function index() { $webinar = Webinar::with('user')->get(); return response()->json($webinar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Store a newly created resource in storage.
public function store(AddWebinarRequest $request) { $data = $request->all(); $webinar = new Webinar(); $webinar->fill($data); $image = $request->file('image'); if($image) { $path = Storage::disk('public')->put('images', $image); $webinar->image = $path; } $webinar->save(); return response()->json([ 'status' => 200, 'webinar' => $webinar, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $webinar = Webinar::where('id', $id)->first(); return response()->json($webinar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $data = $request->all(); $webinar = Webinar::findOrFail($id); $previousImage = $webinar->image; $image = $request->file('image'); if($image) { $path = Storage::disk('public')->put('images', $image); $data['image'] = $path; if($path){ Storage::disk('public')->delete('/' . $previousImage); } } else { $webinar->image = $previousImage; } $webinar->update($data); return response()->json([ 'status' => 200, 'message' => 'Webinar was updated successfully', 'webinar' => $webinar, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424884", "0.7062319", "0.70572054", "0.6897199", "0.658233", "0.6450576", "0.6347209", "0.6211253", "0.6146092", "0.6121878", "0.6114851", "0.61005586", "0.608833", "0.60537165", "0.60196865", "0.60068345", "0.5972924", "0.594671", "0.5940615", "0.5938648", "0.58927333", "0.58618903", "0.5855116", "0.5855116", "0.58517504", "0.5816175", "0.5807103", "0.5753658", "0.5753658", "0.57354003", "0.5724066", "0.5714874", "0.56957984", "0.5692136", "0.5688278", "0.5670771", "0.5656715", "0.5651525", "0.5647887", "0.563695", "0.5635239", "0.5633743", "0.5633203", "0.56296664", "0.5622203", "0.56089646", "0.5602395", "0.55937296", "0.55837464", "0.5582684", "0.55814886", "0.5575469", "0.5572433", "0.55668694", "0.556366", "0.5562336", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.5560869", "0.55574787", "0.55562645", "0.5554329", "0.5553793", "0.5553788", "0.55448633", "0.55448294", "0.5541889", "0.55402213", "0.5537772", "0.55359083", "0.55358595", "0.55248064", "0.5520229", "0.5517453", "0.5513332", "0.5511126", "0.55085385", "0.5508433", "0.5503835", "0.5502763", "0.5501662", "0.5500294", "0.5498694", "0.5496697", "0.5496697", "0.5495247", "0.5494445", "0.5494331", "0.549349", "0.5492967", "0.5484066", "0.5480196", "0.5479421", "0.54788667", "0.546669", "0.5464114", "0.54621613", "0.5458347" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $webinar = Webinar::findOrFail($id); $image = $webinar->image; Storage::disk('public')->delete('/' .$image); $webinar->delete(); return response()->json([ 'status' => 200, 'message' => 'Webinar has been deleted successfully', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
var $db; var $table = "pengantar";
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct()\n {\n parent::__construct();\n $this->table = 'ms_pengguna';\n }", "public function table($table);", "public function table($table);", "public static function table($table)\n {\n }", "function MySQL() {\n \n }", "public function setTable($tablename){\r\n$this->tablename=$tablename;\r\n}", "public function database();", "function sql_table($name) {\n global $MYSQL_PREFIX;\n\n if ($MYSQL_PREFIX) {\n return $MYSQL_PREFIX . 'nucleus_' . $name;\n } else {\n return 'nucleus_' . $name;\n }\n}", "function prikazi_sve($nesto) {\n\n\tglobal $db;\n\n\t$komanda = \"SELECT * FROM $nesto\";\n\techo prikazi($komanda);\n\n}", "public function getTable();", "function getDatabase();", "function set_db(){\r\n\t\t$this->db=$this->db;\r\n\t}", "function set_table(){\n $this->table = 'network_posts';\n }", "function get_table($table)\n {\n return $GLOBALS ['ZUIZZ']->config->db ['prefix'] . $this->config ['tables'] [$table];\n }", "function db_table() {\n\t\t\t$vars = get_class_vars(__CLASS__);\n\t\t\treturn $vars[__FUNCTION__];\n\t\t}", "function __construct() {\n\t\t\t$this->db_name = DATABASE;\n\t\t\t//$this->table1 = TKR_TBL; \n\t\t\t//$this->table2 = DATA_TBL;\n\t\t\t\n\t\t\t}", "public function __construct() {\n global $db;\n $this->db = $db;\n }", "static function init($table = null){\n\t\tif(static::$object_inited){\n\t\t\treturn;\n\t\t}\n if(!static::$db){\n static::$db = DB::get();\n }\n\t\tif($table){\n\t\t\tstatic::$table = $table;\n\t\t}else{\n\t\t\t$class = get_called_class();\n\t\t\tstatic::$table = strtolower(preg_replace('/.+\\\\\\/si', '', $class).'s');\n\t\t}\n self::initFields();\n\t\tstatic::$object_inited = true;\n\t}", "public function __construct($table)\n {\n $this->table=$table;\n }", "public function set_db()\n{\n $this->_db =new PDO('mysql:host=localhost;dbname=pet_net;charset=utf8','lauhu','stagiaire '); ;\n\n return $this;\n}", "function setTable($table) {\r\r\n\t\t$this->table = $table;\r\r\n\t}", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function __construct()\n {\n static::$_table = 'tracking_couponing';\n }", "public function __construct($table)\n {\n $this->dbh = require __DIR__ . '\\..\\db\\init.php';\n $this->table = $table;\n }", "public function getTable()\n {\n\n }", "public function __construct (string $table) {\n\n $dsn = new db\\Database();\n $this->_pdo = $dsn->connect();\n $this->_table = $table;\n\n }", "function db_connector() {\n\t\t\trequire_once(substr(dirname(__FILE__), 0, -13).'config.php');\n\t\t\t$link = mysql_connect(DBHOST, DBUSER, DBPASS);\n\t\t\t$db = mysql_select_db(DBNAME);\n\t\t\t$table_prefix = PREFIX; //table prefix\n\t\t}", "public function __construct()\n {\n $this->db_name = 'ctrlfolios';\n }", "function get_db() :PDO\n{\n $db = new PDO('mysql:host=db;dbname=booker_winners', 'root', 'password');\n $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n}", "public function __construct() {\n parent::__construct();\n $this->tableName = \"variables2\";\n $this->table = \"erp_custom_fields\";\n }", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "function AAtribut()\r\n{\r\n\r\n$this->database = new Database();\r\n\r\n}", "public static function getTable();", "function db ( )\n{\n return $this->_db;\n}", "public function setTable(string $table);", "function make_db_current($tables = 'all')\n {\n }", "static function table($newtable = false)\n {\n static $_table;\n\n if (!empty($newtable)) $_table = $newtable;\n\t\tif (empty($_table)) $_table = 'adodb_logsql';\n return $_table;\n }", "function __construct(){\r\n $this->db=new ConnectDb();\r\n $this->connection=$this->db->open_connection();\r\n $this->db->setTable($this->tablename);\r\n}", "function chat_db_names() {\n //[primary id], [table name], [time created field name], [time modified field name]\n return null;\n}", "static function loadDb($table) {\n $tab = new self($table);\n $cols = stdDB::selectArray(\"SHOW COLUMNS FROM `$table`\");\n foreach($cols as $col)\n $tab->cols[$col['Field']] = new schemaColumn($col['Field'],$col['Type'],\n $col['Null'], $col['Default'], $col['Extra']);\n $rows = stdDB::selectArray(\"SHOW INDEX FROM `$table`\");\n $idxrow = array(); $idxs = array();\n foreach($rows as $row){\n $idxrow[$row[\"Key_name\"]][] = $row[\"Column_name\"];\n $idxs[$row[\"Key_name\"]] = $row;\n }\n foreach($idxs as $k=>$row) {\n $tab->idx[$k] = new schemaIndex($k, $idxrow[$k],\n $row['Non_unique'], $row['Sub_part']);\n }\n return $tab;\n }", "public function __construct($table)\n {\n $this->table = $table;\n }", "public function __Construct($table){\n \n //dbconnect obj instance\n //set the connection obj on $conn property\n $db=new DbConnect;\n $this->conn=$db->connect();\n //set table name that use in the query\n $this->table=$table;\n }", "public static function setTable($name = ''){\n\t\tif(! self::$db){\n\t\t\tself::setDbName();\n\t\t}\n\t\tif($name){\n\t\t\treturn self::$collection = self::$db->$name;\n\t\t}else{\n\t\t\treturn self::$collection = self::$db->$table;\n\t\t}\n\t}", "public function __construct()\n {\n //parent::__construct();\n //$this->table_name = $this->TABLE;\n }", "public function __construct($tblPrefix = \"\");", "public function __construct() {\n $this->db = \\Config\\Database::connect();\n // Wir verwenden die Query Builder Klasse über table()\n $this->reiter = $this->db->table('Reiter');\n }", "public function connect_db() {\n }", "function konek_db(){\n\t\tmysql_connect('localhost','skripsi','skripsi');\n\t\tmysql_select_db('skripsi');\n\t}", "public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }", "function Dbtable($dbhost=false, $dbuser=false, $dbpassword=false, $dbname=false){\n\t\tif($dbhost){\n\t\t\t$this->_customDb = true;\n\t\t\t$this->dbhost = $dbhost;\n\t\t\t$this->dbuser = $dbuser;\n\t\t\t$this->dbpassword = $dbpassword;\n\t\t\t$this->dbname = $dbname;\n\t\t}\n\t\t$this->qryStr = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : NULL;\n\t\tparse_str($this->qryStr, $this->qryCurr); //current url\n\t\t$this->qryUrl = $this->qryCurr;\n\t\t$this->imagePath = array();\n\t}", "function __construct(){ //fungsi yang digunakan untuk menginisialisasikan database yang digunakan\n\t\t$this->host=\"localhost\"; // variabel host diisi localhost\n\t\t$this->user=\"root\"; // variabel user diisi root\n\t\t$this->pass=\"\"; // variabel pass diisi kosong\n\t\t$this->database=\"manajemen_skripsi_prpl\"; // variabel diisi database yang digunakan yang ada dalam sever localhost yaitu manajemen_skripsi_prpl\n\t}", "function table($table)\n {\n $table = preg_replace('/\\s+/', ' ', trim($table));\n $arr = explode(' ', $table);\n $this->table_name = $arr[0];\n $this->table_alias = isset($arr[1]) ? $arr[1] : $this->table_alias;\n unset($arr);\n return $this;\n }", "public function insertIntoDB($_db){\n\n }", "function namaMahasiswa(){\n global $db; // https://stackoverflow.com/questions/3041171/php-variable-not-working-inside-of-function\n echo $db->executeGetScalar(\"SELECT nama FROM MAHASISWA WHERE NRP = '{$_SESSION['user']}'\");\n }", "public function pdo();", "public function getDatabase(): string;", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "function DB() {\r\n \t\t$this->dbh = new Mysql_db;\r\n\t}", "private function myTables(){\n }", "abstract public function getTable();", "abstract public function getTable();", "function __construct($table_name) {\n\t\t$this->table_name = $table_name;\n\t}", "public static function tableName(): string;", "function sql($table=null)\n{\n return SQL::query($table);\n}", "public function setTable($table);", "public function table_prefix(){\n return $this->db->dbprefix;\n }", "function connexionDb()\n{\n $confDb = getConfigFile()['DATABASE'];\n\n\n $type = $confDb['type'];\n $host = $confDb['host'];\n $servername = \"$type:host=$host\";\n $username = $confDb['username'];\n $password = $confDb['password'];\n $dbname = $confDb['dbname'];\n\n $db = new PDO(\"$servername;dbname=$dbname\", $username, $password);\n return $db;\n}", "public function settaDB()\n {\n include \"MySqlClass.php\";\n // istanza della classe\n $this->database = new MysqlClass();\n }", "public function getDatabaseName():string;", "abstract protected function getTable();", "public function set_table($table = NULL)\n\t{\n\t\t$this->_table = $table;\n\t}", "function __construct()\n {\n parent::__construct();\n $this->_tablename = $this->db->dbprefix('dealer');\n }", "public function getTable() {}", "public function getTable() {}", "public function getTable() {}", "function connectDB();", "public function get_database(){\n return $this->database;\n }", "function db()\r\n{\r\n global $db;\r\n return $db;\r\n}", "function __construct(){\n $this->db = new PDO('mysql:host=localhost;'.'dbname=inventario2;charset=utf8', 'root', '');\n }", "public static function connect(){\n\t\t\t$mysql = $_ENV['database']['mysql'];\n\n\t\t\t# Connect to mysql\n\t\t\tself::$con = mysql_connect($mysql['host'], $mysql['username'], $mysql['password']);\n\t\t\tmysql_select_db($mysql['dbname']);\n\n\t\t\t# Pass the table along\n\t\t\tself::$table = static::$table;\n\n\t\t\t# \n\t\t\tif (empty(self::$table)) :\n\n\t\t\t\tself::$table = strtolower(basename(str_replace(\"\\\\\", \"/\", get_called_class())));\n\n\t\t\tendif; \n\n\t\t}", "function getDatabase() {\n//override these params\n\t$host = \"localhost\";\n\t$user = \"sistemasmysql\";\n\t$password = \"17sistemassql06\";\n\t$database_name = \"reservas_disilab\";\n\t\n\t\n\treturn new MySqlDB($host, $user, $password, $database_name);\n}", "public function __construct() {\n parent::__construct();\n\n //kapcsolódás a db-hez:\n $this->db = db_connect();\t//\\Config\\Database::connect();\n $this->builder = $this->db->table(\"feladatok\");\n\n }", "public function __construct()\n { // langsung connect ke class databasenya.\n $this->db = new Database(); // instansiasi kelas database.\n }", "public function setTable( $table ) {\n\t\t$this->_table = $table;\n\t}", "public function __construct(string $table)\n {\n $this->table = $table;\n }", "function cons_todo($table){\n $result=mysql_query(\"SELECT * FROM $table\");\n return $result;\n }", "function __construct( $host = 'localhost', $user = 'root', $pass = '123456', $name = 'teste', $table = 'emails' ) {\n $this->dbhost = $host;\n $this->dbuser = $user;\n $this->dbpass = $pass;\n $this->dbname = $name;\n $this->dbtable = $table;\n }", "public function __construct($table=null,$dbUsing=null) {\n\t\tif(isset($dbUsing)){\n\t\t\tif(array_key_exists($dbUsing,Config::$baseInfos)){\n\t\t\t\t$this->dbUsing=$dbUsing;\n\t\t\t}else{\n\t\t\t\tCore::defineError(\"La base '$dbUsing' n'est pas définie dans la configuration.\");\n\t\t\t}\n\t\t}\n\t\tparent::__construct();\n\t\tif(isset($table)){ $this->table=$table; }\n\t}", "public function getTableName():string;" ]
[ "0.67128307", "0.6536057", "0.6536057", "0.64223886", "0.6401775", "0.63816965", "0.63795215", "0.6353503", "0.63432986", "0.6309436", "0.6300133", "0.62862873", "0.6280485", "0.6268039", "0.626761", "0.6256716", "0.6220726", "0.6213175", "0.6196643", "0.6190259", "0.6187563", "0.61346984", "0.613251", "0.61173844", "0.61120164", "0.6110955", "0.60975635", "0.60826087", "0.60800993", "0.60757107", "0.6059645", "0.6059645", "0.6059645", "0.6059645", "0.6059645", "0.6059645", "0.6059645", "0.605405", "0.60512954", "0.6046469", "0.6035955", "0.6032411", "0.60263497", "0.6014484", "0.60117084", "0.6005903", "0.5994123", "0.5992329", "0.5990901", "0.5984288", "0.5975109", "0.5966891", "0.5966475", "0.5962031", "0.59513533", "0.59434175", "0.59427327", "0.5941618", "0.5935748", "0.59346235", "0.5929783", "0.5925216", "0.5921254", "0.5921254", "0.5921254", "0.5921254", "0.5921254", "0.5921254", "0.5919787", "0.59175515", "0.59113085", "0.590376", "0.590376", "0.59016657", "0.5901511", "0.5898552", "0.58914644", "0.5887686", "0.5877317", "0.58706516", "0.58695626", "0.58691204", "0.58675283", "0.5862328", "0.58602256", "0.5859644", "0.58594495", "0.58582807", "0.5849038", "0.58439153", "0.5840819", "0.58406603", "0.5840073", "0.5836441", "0.58305633", "0.58286023", "0.58284444", "0.58257896", "0.58136773", "0.5812433", "0.581027" ]
0.0
-1
Gets the datasource for this connection
public function datasource() { return $this->HasMany('App\Datasource'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatasource()\n {\n return static::resolveDatasource($this->datasource);\n }", "public function getDatasource()\n {\n return $this->datasource;\n }", "public function getDatasource()\n {\n return $this->datasource;\n }", "public static function getDataSource()\n {\n return static::$_dataSource;\n }", "public function getDataSource() {\n\t\treturn $this->dataSource;\n\t}", "public function getDataSource()\n {\n return isset($this->DataSource) ? $this->DataSource : null;\n }", "public function getDataSource()\n\t{\n\t\treturn $this->dataSource;\n\t}", "public function datasource() {\n if (!isset($this->datasource)) {\n $this->datasource = search_api_get_datasource_controller($this->item_type);\n }\n return $this->datasource;\n }", "function getDataSource() { return $this->_datasource; }", "public function getDatasourceName()\n {\n return $this->datasource;\n }", "protected function getActiveDatasource()\n {\n return $this->datasources[$this->activeDatasourceKey];\n }", "function getDataSource() {return $this->_datasource;}", "function readDataSource() {return $this->_datasource;}", "public function getDatasourceRepository()\n {\n return $this->datasourceRepository;\n }", "public function getResourceDataSource()\n\t{\n\t\tif ($this->_resourceDataSource === null)\n\t\t{\n\t\t\t$this->_resourceDataSource = new Application_Model_ResourceMapper;\n\t\t}\n\t\t\n\t\treturn $this->_resourceDataSource;\n\t}", "public function getDataSource()\n {\n /** @var Model $modelClass */\n $modelClass = get_class($this);\n $parentModelName = get_parent_class($modelClass);\n\n if ($parentModelName == Model_Defined::getClass() || $parentModelName == Model_Factory::getClass()) {\n return Data_Source::getInstance(Object::getName($parentModelName) . ':model/' . $modelClass);\n }\n\n return Data_Source::getInstance($modelClass::getDataSourceKey());\n }", "public function getDatasources()\n {\n return $this->datasources;\n }", "public static function resolveDatasource($datasource = null)\n {\n return static::$resolver->datasource($datasource);\n }", "public function getDataSourceHandler()\n {\n return $this->DataSourceInstance->getDataSourceHandler();\n }", "public function getDataSourceDefinition()\n {\n return $this->data_source_definition;\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }", "public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }", "public function Source(){\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->resolver->connection();\n }", "public function getConnection() {\n return $this->objDBConnection;\n }", "public function getConnection() {\n return $this->objDBConnection;\n }", "public function getConnection() {\n return $this->connection;\n }", "public function getConnectionString()\n {\n return $this->connectionString;\n }", "public function getConnection() {\n return $this->_connection;\n }", "public static function getDataSourceKey()\n {\n return self::getConfig()->get('dataSourceKey');\n }", "public function getConnection()\n\t{\n\t\treturn static::$instances[$this->_instance];\n\t}", "public function getDSN()\n {\n return $this->dsn;\n }", "public function getConnection()\n {\n return Database::getConnection($this->connection);\n }", "public function getConnection()\n {\n return $this->_connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function getConnection()\n {\n return $this->connection;\n }", "public function GetConn() {\n\n return $this->\n config['dbconn'];\n }", "public function getDsn() {\n return $this->_dsn;\n }", "public function getConnection()\n {\n return $this->__connection;\n }", "protected function getConnection()\n {\n return $this->_connection;\n }", "public function getConnection() {\n\t\treturn $this->_connection;\n\t}", "public function getConnection()\n {\n return parent::getConnection();\n }", "public function getConnection()\n {\n return $this->db;\n }", "function getConnection() {\r\n\r\n\t\treturn $this->connection;\r\n\r\n\t}", "public function getConnection() {\n return $this->connection;\n }", "public function getConnection() {\n return $this->connection;\n }", "public static function getConnection(){\n return static::$db;\n }", "public function getConnection(){\n return $this->dbConnection;\n }", "public function getConnection(){\n\t\treturn $this->connection;\n\t}", "protected function getConnection()\n {\n return Model::getConnectionResolver()->connection();\n }", "public function getConnection()\r\n\t{\r\n\t\treturn $this->connection;\r\n\t}", "public function getConnection()\n\t{\n\t\treturn $this->connection;\n\t}", "public function getConnection()\n\t{\n\t\treturn $this->connection;\n\t}", "public static function getConnection() {\n return self::$defaultConnection;\n }", "public function getConnection(){\n\t\treturn $this->_connection;\n\t}", "public function getAdapterConnection(): string\n {\n return $this->adapter;\n }", "public function getResource()\n {\n return $this->dbh;\n }", "public function getConnection()\n {\n return $this->conn;\n }", "public function getConnection()\n {\n return $this->conn;\n }", "public function getConnection() {\n return $this->conexion;\n }", "public function getConnection() {\n\t\t\treturn $this->pdo;\n\t\t}", "protected function getConnection()\n {\n return $this->connection;\n }", "protected function getConnection()\n {\n return $this->connection;\n }", "public function getConnection() {\n return $this->connection;\n }", "public function getConnection()\n\t{\n\t\treturn empty($this->db_conn) ? Db::getConnection($this->getConnectionName()) : $this->db_conn;\n\t}", "public function _getConnection(){\n return $this->_connection;\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }", "public function getConnection()\n {\n if($this->connection === null) {\n $this->connect();\n }\n return parent::getConnection();\n }", "function connection()\n\t{\n\t\tif (isset($this->conn_name)) {\n\t\t\treturn Db::getConnection($this->conn_name);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "protected function _getConnection()\n {\n if (is_null($this->_connection)) {\n /** @var $coreResource \\Magento\\Framework\\App\\ResourceConnection */\n $coreResource = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()\n ->get('Magento\\Framework\\App\\ResourceConnection');\n $this->_connection = $coreResource->getConnection();\n }\n return $this->_connection;\n }", "public function getDataSourcesList() {\n return $this->_get(1);\n }", "public function get_connection() {\n return $this->_connection;\n }", "public function get_connection() {\n return $this->_connection;\n }", "public function get_connection()\n {\n return $this->connection();\n }", "public function getConnection() {\n if ($this->client) {\n return $this->client->getConnection();\n }\n return null;\n }", "public function getConnectionConfig() {\n return $this->connectionConfig;\n }", "public function get_connection()\n {\n return $this->connection;\n }", "public static function adapter()\n {\n return self::connectionManager()->getAdapter(static::connectionName());\n }", "public function getConnection() {\n return Database::instance();\n }", "public function getConnection()\n {\n return($this->connx);\n }", "public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }", "public function getConn() {\n\n return $this->conn;\n }", "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "public function getDataSourceType();", "public function getConn()\n {\n return $this->conn;\n }", "public function getConn()\n {\n return $this->conn;\n }", "public function getConn()\n {\n return $this->conn;\n }" ]
[ "0.80677944", "0.80668855", "0.80668855", "0.7831839", "0.77213144", "0.7670749", "0.76419246", "0.7344449", "0.73009634", "0.7198656", "0.69559574", "0.68324494", "0.6803551", "0.67411083", "0.67122364", "0.65214634", "0.6424574", "0.6386449", "0.6281664", "0.6281361", "0.62484074", "0.62484074", "0.6244304", "0.6244304", "0.6172214", "0.6142129", "0.61313766", "0.61313766", "0.6128371", "0.6123828", "0.6118408", "0.6111807", "0.6092513", "0.60782254", "0.60573417", "0.6044142", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.603923", "0.60346067", "0.60273147", "0.60207766", "0.60080177", "0.6005611", "0.60048574", "0.5986568", "0.597542", "0.59748805", "0.59748805", "0.596319", "0.5963138", "0.59503853", "0.59322554", "0.5929536", "0.5922345", "0.5922345", "0.5916023", "0.591458", "0.59111786", "0.5906289", "0.5904425", "0.5904425", "0.5901081", "0.5883914", "0.588337", "0.588337", "0.58693415", "0.5868566", "0.58639246", "0.5853446", "0.5853446", "0.5853446", "0.5853446", "0.58473164", "0.5832195", "0.5820825", "0.5782932", "0.5776633", "0.5776633", "0.5771147", "0.5763098", "0.5755204", "0.5748828", "0.57468754", "0.5746054", "0.5741847", "0.57356596", "0.57035875", "0.56908816", "0.56908816", "0.5671976", "0.56635916", "0.5658241", "0.5658241" ]
0.0
-1
get user for this connection
public function User() { return $this->belongsTo('App\User'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser() {\n\t\treturn User::newFromName( $this->params['user'], false );\n\t}", "function getUser() {\n return user_load($this->uid);\n }", "public function get_user() {\n\t\treturn $this->user;\n\t}", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function getUser()\n {\n return Session::get(self::USER);\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public static function user ()\n {\n return self::$user;\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "protected function getUser()\n {\n return $this->user;\n }", "public final function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->_user;\n }", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = CoLogin::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = Client::findByUsername($this->username);\n\n /** added login by email**/\n if($this->_user === false ){\n $this->_user = Client::findByEmail($this->username);\n }\n }\n\n return $this->_user;\n }", "protected function _user() {\n return $this->_adapter_user->user();\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Users::findByUsername($this->login);\n }\n\n return $this->_user;\n }", "public function getUser() {\n $user = $this->getSessionUser();\n\n return $user;\n }", "public function getUser()\n {\n if ($this->user === null) {\n // if we have not already determined this and cached the result.\n $this->user = $this->getUserFromAvailableData();\n }\n\n return $this->user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "static public function GetUser() {\n if (self::GetImpersonatedUser()) {\n return self::GetImpersonatedUser();\n }\n return self::GetAuthUser();\n }", "public function getUser() {\n\t\treturn $this->getTable('User')->find($this->user_id);\n\t}", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }", "public function getUser() {\n\t\treturn User::find($this->user_id);\n\t}", "public function getUser()\n {\n return $this->_user;\n }", "public function getUser()\r\n {\r\n return $this->user;\r\n }", "public static function getUser() {\n return isset($_SESSION[Security::SESSION_USER]) ? $_SESSION[Security::SESSION_USER] : NULL;\n }", "public function getUser()\n {\n RETURN $this->user;\n }", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername(Yii::$app->user->identity->username);\n }\n return $this->_user;\n }", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public function getDpsUser()\n {\n return $this->get(self::_DPS_USER);\n }", "public function getUser()\n {\n $attributes = $this->getUserAttributes();\n\n // Try to load user by ldap id attribute\n if ($this->idAttribute !== null && isset($attributes['authclient_id'])) {\n $user = User::findOne(['authclient_id' => $attributes['authclient_id'], 'auth_mode' => $this->getId()]);\n if ($user !== null) {\n return $user;\n }\n }\n\n return $this->getUserAuto();\n }", "private function getUser() {\n\t\t$account = $this->authenticationManager->getSecurityContext()->getAccount();\n\t\t$user = $account->getParty();\n\t\treturn $user;\n\t}", "public function getUser() {\r\n return $this->user;\r\n }", "public function GetUser()\n\t\t{\n\t\t\treturn $this->User;\n\t\t}", "public function getUser()\n {\n if (! $this->user) {\n $this->exchange();\n }\n\n return $this->user;\n }", "function getUser() \n {\n\t\t\treturn $this->user;\n\t\t}", "public function getUser()\n {\n return $this->user;\n }", "public static function getUser();", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findByUsername($this->username);\n }\n return $this->_user;\n }", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser() {\n\n if (isset($this->user)) {\n return $this->user;\n }\n\n return NULL;\n }", "public function user()\n {\n return $this->context-> getUser();\n }", "public function getUser(){\n\t\treturn $this->user;\n\t}", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findIdentity(Yii::$app->user->id);\n }\n\n return $this->_user;\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = \\app\\models\\User::findByUsername($this->username);\n }\n return $this->_user;\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();" ]
[ "0.8164691", "0.8164691", "0.8164691", "0.8164691", "0.79397446", "0.789546", "0.78900176", "0.78879094", "0.78050584", "0.7802587", "0.7785356", "0.77667177", "0.7756139", "0.7746232", "0.77385336", "0.77385336", "0.77347785", "0.7726845", "0.77265245", "0.77189034", "0.77031654", "0.77031654", "0.7699329", "0.7696909", "0.768051", "0.7656454", "0.76529217", "0.7650373", "0.7650373", "0.7639402", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.7635952", "0.76349014", "0.76349014", "0.76284623", "0.7615191", "0.76115346", "0.76115346", "0.76115346", "0.76115346", "0.76022553", "0.75920546", "0.7583867", "0.7578189", "0.7577424", "0.7562353", "0.7561528", "0.7559231", "0.7544577", "0.75346535", "0.75338924", "0.7531082", "0.75282145", "0.75279963", "0.7527918", "0.7526143", "0.7522558", "0.751704", "0.75143695", "0.75143695", "0.7512989", "0.75122154", "0.74954927", "0.7495332", "0.74879265", "0.7475736", "0.7465418", "0.7457113", "0.7455454", "0.7452631", "0.74418074", "0.74418074", "0.74418074", "0.74418074", "0.74418074", "0.74418074" ]
0.0
-1
Run the passed query on the database and returns result in json format
public function runquery(string $query) { // Check if SELECT is in the query if (preg_match('/SELECT/', strtoupper($query)) != 0) { // Array with forbidden query parts $disAllow = array( 'INSERT','UPDATE','DELETE','RENAME','DROP','CREATE','TRUNCATE','ALTER', 'COMMIT','ROLLBACK','MERGE','CALL','EXPLAIN','LOCK','GRANT','REVOKE', 'SAVEPOINT','TRANSACTION','SET'); $disAllow = array( 'UPDATE ','DELETE ', 'DROP ', 'TRUNCATE ', 'RENAME '); $disAllow = implode('|', $disAllow); // Check if no other harmfull statements exist if (preg_match('/('.$disAllow.')/', strtoupper($query)) == 0) { $conn=array( 'driver' => $this->dbtype, 'host' => $this->host, 'database' => $this->dbname, 'username' => $this->username, 'password' => decrypt($this->password), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '' ); if ($this->dbtype=='oracle') { $conn['database']=''; $conn['service_name']=$this->dbname; } Config::set('database.connections.'.$this->name, $conn); $DB=\DB::connection($this->name); //Connection try { \DB::connection($this->name)->getPdo(); } catch(\PDOException $e) { return $e->getMessage(); } //Query try { $ret=$DB->select($query); } catch(\PDOException $err) { return $err->getMessage(); } return collect($ret)->toJson(); } else { return 'Error: only SELECT queries area allowed. INVALID keyword included.'; } } else { return 'Error: only SELECT queries area allowed.'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fire_query_get_json() {\n $res = $this->fire_query();\n $res_arr = array();\n while($row = $res->fetch_array(MYSQL_ASSOC)) {\n $res_arr[] = $row;\n }\n return json_encode($res_arr);\n }", "public function query();", "public function query();", "public function query();", "public function queryAll()\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s FROM %s WHERE deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE);\n $req = $this->db->query($statement);\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "public function query($sql) \n {\n if (!empty($sql)) \n {\n $this->connect();\n \n //connect to database\n try\n {\n $q = $this->db->prepare($sql);\n $q->execute();\n $q->setFetchMode(PDO::FETCH_ASSOC);\n $data = $q->fetchAll();\n \n return $data;\n \n //echo json_encode($data);\n $this->disconnect();\n \n //disconnect from database\n \n \n }\n catch(PDOException $e) \n {\n return $e->getMessage();\n }\n } else\n {\n return 'No query provided';\n die;\n }\n }", "public function runQuery(){\n \n $query = $this->getQuery();\n $pager = $this->getPager();\n $modify_result = $this->getModifyResult();\n\n // set default number of results so that we don't output NULL as \n // total_results if there are errors\n $pager->setTotalResults( 0 );\n $results = array();\n \n if( !$this->getResponse()->hasErrors() ){\n \t\n \t $count_query = clone $query;\n\t $pager->setTotalResults( $count_query->count() );\n \t $pager->decorateQuery( $query );\n \n\t if( $pager->getPageSize() > 0 ){\n\t $db_results = $query->find();\n\t foreach( $db_results as $model ){\n\t $result_object = array();\n\t $modify_result( $model, $result_object );\n\t $results[] = $result_object;\n\t }\n\t }\n\t \n }\n \n $api_response_body = $this->getResponse()->getResponseBody();\n $api_response_body->setBody($results);\n \n }", "function sqlData($sql){\n // \n $result = $this->query($sql);\n //\n //\n if (!$result) {\n print \"<p>Could not retrieve data: </p>\";\n }\n while ($row = $result->fetchAll()) {\n $data = $row;\n return json_encode($data);\n }\n }", "function select($sql) {\n global $conn;\n\n if($result = $conn->query($sql)) {\n while($row = mysqli_fetch_assoc($result))\n $result_rows[] = $row;\n\n if($result_rows != null)\n DB::return_json($result_rows);\n\n else\n throw new Exception(\"no results\");\n } else\n throw new Exception(\"query failed\");\n }", "abstract public function query();", "function query() {}", "public function getJSON ( $sql, $params = array()){\r\n\t\tif (!empty($params)) {\r\n\t\t $resultArray = parent::boundQuery($sql, $params);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$resultArray = parent::query($sql);\r\n\t\t}\r\n\t\t$result = array ( 'data' => $resultArray);\r\n\t\treturn (json_encode($result));\r\n\t}", "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "public static function query();", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function customQueryJson($query, $paginate='') {\n $statement = Connect::ArangoStatementHandlerArray(\n $this->_arangoConnect, $query\n );\n // execute the statement\n $cursor = $statement->execute(); \n return $cursor = $cursor->getAll();\n }", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }", "private function executeMultiResultQuery($query){\n\t\t// Perform Query\n\t\t$result = mysql_query($query);\n\t\t\n\t\t$rows = array();\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)) {\n\t\t\t$rows[] = $row;\n\t\t}\n\t\t\n\t\t// Free the resources associated with the result set\n\t\tmysql_free_result($result);\t\n\t\n\t\treturn json_encode($rows);\n\t}", "public function query($query){\n return $this->connection->query($query);\n }", "private function executeSingleResultQuery($query){\n\t\t// Perform Query.\n\t\t$result = mysql_query($query);\n\t\t\n\t\t// Fetch row.\n\t\t$result_row = mysql_fetch_row($result);\n\t\t\n\t\t// Return theme name\n\t\treturn json_encode($result_row);\n\t}", "private function executeQuery()\n {\n // $fresults = $this->qb->getQuery()->getResult(Query::HYDRATE_ARRAY);\n $query = $this->qb->getQuery();\n $query->setHydrationMode(Query::HYDRATE_ARRAY);\n $fresults = new Paginator($query, true);\n $output = array(\"aaData\" => array());\n\n foreach ($fresults as $item) {\n $output['aaData'][] = $item;\n }\n\n $outputHeader = array(\n \"sEcho\" => $this->sEcho,\n \"iTotalRecords\" => $this->getCountAllResults(),\n \"iTotalDisplayRecords\" => $this->getCountFilteredResults()\n );\n\n $this->response = array_merge($outputHeader, $output);\n\n return $this;\n }", "public function executeGenericDQLQuery($query){\n try{\n if(!$this->db)\n {\n $this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n }\n $result = mysql_query($query, $this->db);\n /* if(mysqli_errno($con) != 0){\n throw new Exception(\"Error :\".mysqli_errno($con).\" : \".mysqli_error($con));\n } */\n $rows = array();\n while($row = mysql_fetch_array($result)){\n array_push($rows,$row);\n }\n //mysqli_close($con);\n return $rows;\n \n }\n catch(Exception $e){\n $response = array();\n $response['status'] = false;\n $response['message'] = $e->getMessage();\n $this->response($this->json($response), 200);\n }\n \n }", "public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }", "public function query($sql) {\n return $this->data($sql);\n }", "public function query()\n\t{\n\t\t\n\t}", "public function query()\n\t{\n\t\t$search = $this->input->get('query');\n\t\t\n\t\t$this->db->select('*');\n\t \t$this->db->from('drug_details');\n\t \t$this->db->like('drug_name', $search, 'both');\n\t \t$query = $this->db->get();\n\t \t$result = $query ->result();\n\n\t\techo json_encode($result);\n\t}", "public function getSimpleJSON ( $sql, $params = array() ){\r\n\t\tif (!empty($params)) {\r\n\t\t $resultArray = parent::boundQuery($sql, $params);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$resultArray = parent::query($sql);\r\n\t\t}\r\n\t\treturn (json_encode($resultArray));\r\n\t}", "public function query()\n {\n }", "public function query()\n {\n }", "public static function query($query){\n if(!self::$connection){\n self::initDb();\n }\n\n return self::$connection->query($query);\n }", "public function query($query){ \n\t\tif($r = $this->mysqli->query($query)){\n\t\t\t$rows = array();\n\t\t\twhile(is_object($r) && $row = $r->fetch_assoc()){\n\t\t\t\t$rows[]= $row;\n\t\t\t}\n\t\t\t$result = new DB_result($rows, $query);\n\t\t\treturn $result;\n\t\t}\n\t\techo $this->mysqli->error . \"<br><br>\";\n\t\tdie(\"{$query}\");\n\n\t}", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "protected function dbquery($query) {\r\n\r\n $this->query_result = $this->connection->query($query);\r\n\r\n return $this->query_result;\r\n }", "abstract public function query(Query $query): Result;", "public function query() {\n\n }", "public function execute()\n {\n $qb = $this->getBuiltQb();\n\n $query = $qb->getQuery();\n $query->setHydrationMode(Query::HYDRATE_ARRAY)->useQueryCache($this->useQueryCache);\n call_user_func_array([$query, 'useResultCache'], $this->useResultCacheArgs);\n\n return $query;\n }", "protected abstract function executeQuery(Result $result);", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "public function query($query){\n return pg_query($this -> connect(), $query);\n }", "public function getDataByQuery($query){\r\n \r\n $mmtrend_group = DB::connection(DBUtils::getDBName())->select($query);\r\n //$mmtrend_group = DB::connection('mysql_ais_47')->select($query);\r\n Log::info(json_encode($mmtrend_group));\r\n }", "function queryToJson($t_mysqli, $t_query){\n $query_res = array('errors' => array(), 'query_data' => NULL);\n \n $queryarray_res = queryToArray($t_mysqli, $t_query);\n \n $query_res['errors'] = $queryarray_res['errors'];\n $query_res['query_data'] = json_encode($queryarray_res['query_data']);\n \n return $query_res;\n}", "function executeQuery($query);", "function query() {\n }", "public function query($query);", "public function query($query);", "public function query($query);", "public function GetAll($sql) \n {\n $this->connect();\n \n //connect to database\n if (!empty($sql)) \n {\n try\n {\n $q = $this->db->prepare($sql);\n $q->execute();\n $q->setFetchMode(PDO::FETCH_ASSOC);\n $data = $q->fetchAll();\n \n return $data;\n \n //echo json_encode($data);\n \n \n }\n catch(PDOException $e) \n {\n return $e->getMessage();\n }\n } else\n {\n return 'No query provided';\n die;\n }\n \n $this->disconnect();\n \n //disconnect from database\n \n \n }", "private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }", "function createQuery() ;", "public function query($query) {\n $connection = $this -> connect();\n\n // Query the database\n $result = $connection -> query($query);\n\n return $result;\n }", "function return_json($sqlresult) {\n header(\"Content-type:application/json;charset=utf-8\");\n echo json_encode($sqlresult);\n }", "public function query($query){\n\t\t$this->lastQuery = $query;\n\t\treturn $this->connection->query($query);\n\t}", "function query($sql) {\n\t\t\treturn $this->db->query($sql);\n\t\t}", "public function executeQuery($query) {\n\t\t$query_response['status'] = \"Success\";\n\t\t$query_response['message'] = NULL;\n\t\t$query_result = mysqli_query($this->database_connection, $query);\n\t\tif (!$query_result) {\t//if failed returns error message\n\t\t\t$query_response['status'] = \"Failed\";\n\t\t\t$query_response['message'] = \"Operation Failed. please try after some time\";//.mysqli_error($this->database_connection);for db error message\n\t\t} else { //on success returns the result object in message\n\t\t\t$query_response['message'] = $query_result;\n\t\t}\n\t\treturn $query_response;\n\t}", "function queryAll() {\n\t$sql = \"select postcode,place_name,latitude,longitude FROM geo ORDER BY postcode\";\n\ttry {\n\t\t$db = getConnection();\n\t\t$stmt = $db->query($sql); \n\t\t$geoList = $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t$db = null;\n\t\techo '{\"geo\": ' . json_encode($geoList) . '}';\n\t} catch(PDOException $e) {\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n}", "abstract public function query($sql);", "public function execute()\n {\n return $this->query($this->sSql);\n }", "public function queryFormat(): string\n {\n return 'JSONEachRow';\n }", "public function query($query)\n {\n $result = $this->db->query($query);\n $result->execute();\n return $result;\n }", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "public function query($sql) {\n $this->query_result = pg_query($sql);\n return $this->query_result;\n }", "public function ExecuteQuery($query){\n\t\treturn $this->db_con->query($query);\n\t}", "public function toQuery();", "public static function query($sql);", "public function execute($query);", "protected function executeQuery() {\n return array();\n }", "public function executeCustomQuery($customQuery)\n {\n $customQuery = strtolower($customQuery);\nif (strpos($customQuery,'delete') !== false) {\n return 'true';\n}\nif (strpos($customQuery,'truncate') !== false) {\n return 'true';\n}\nif (strpos($customQuery,'update') !== false) {\n return 'true';\n}\n\n\n $conn = $this->getConnection();\n $rs = $conn->query($customQuery);\n if ($rs === false) {\n trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);\n } else {\n $rs->data_seek(0);\n $array_allMovies = array();\n while ($row = $rs->fetch_array(MYSQL_ASSOC)) {\n $array_movies = array();\n $array_movies[\"id\"] = $row[\"id\"];\n $array_movies[\"movie_name\"] = $row[\"movie_name\"];\n $array_movies[\"movie_about\"] = $row[\"movie_about\"];\n $array_movies[\"movie_year\"] = $row[\"movie_year\"];\n $array_movies[\"movie_type\"] = $row[\"movie_type\"];\n array_push($array_allMovies, $array_movies);\n }\n return (json_encode($array_allMovies));\n }\n }", "public static function query()\n {\n }", "public abstract function get_query();", "protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}", "function queryResultToJSON($qResult,$parameters=NULL,$allFields=NULL)\r\n\t{\r\n//If configuration is not defined we add the fields in the result of the query by default.\r\n\t\tif (!is_array($parameters['columns']))\r\n\t\t{\r\n\t\t\t$fieldNum = mysql_num_fields($qResult);\r\n\t\t\t$fields = array();\r\n\t\t\tfor ($i=0; $i<$fieldNum; $i++)\r\n\t\t\t\t$fields []= mysql_field_name($qResult,$i);\r\n\t\t\t$parameters['columns'] = fieldsToParams($fields);\t\r\n\t\t}\r\n\t\treturn resultToJSON($qResult,$parameters,$allFields);\r\n\t}", "public function query($query) {\n\t\t$this->set_query($query);\n\t\treturn $this->output();\n\t}", "public function executeQuery($q){ $this->makeConnection();\n //check for SQL injection\n\n //execute query\n $results = $this->connection->query($q);\n\n return $results;\n\n }", "public function _query()\n {\n }", "function fetch_json_data($db_connection, $query)\n{\n if ($result = mysqli_query($db_connection, $query)) {\n while ($row = $result->fetch_array(MYSQLI_ASSOC)) {\n $jsondata[] = $row;\n }\n return json_encode($jsondata);\n }\n}", "function query($sql) {\r\n\t\treturn $this->execute($sql);\r\n\r\n\t}", "function runQuery()\n\t{\n\t\treturn $this->query;\n\t}", "private function execute_query($sql) {\n \n // execute the query\n $result = $this->db->Execute($sql);\n // initialise the data array\n $data = array();\n // convert the resultset into a Moodle style object\n if(!empty($result)) {\n while (!$result->EOF) {\n $obj = new stdClass;\n foreach (array_keys($result->fields) as $key) {\n $obj->{$key} = $result->fields[$key];\n }\n $index = reset($result->fields);\n $data[$index] = $obj;\n $result->MoveNext();\n }\n }\n\n // return an array of objects\n return $data;\n \n }", "private function handleQuery ()\n {\n $result = $this->executeCurl();\n $httpCode = curl_getinfo($this->cURL, CURLINFO_HTTP_CODE);\n\n if ($httpCode != 200 && $httpCode != 201)\n {\n throw new HttpException($httpCode, $result);\n }\n\n return json_decode($result, true);\n }", "function executeBlock($queryVar,$collection){\n // $col = \"SaleRepInsight.\".$collection;\n // $query = new MongoDB\\Driver\\Query($queryVar); \n // $rows = $connection->executeQuery($col, $query);\n $rows = getData($queryVar,$collection);\n $data = array();\n $findCounter = 0;\n foreach ($rows as $row){\n $milliseconds = $row->date->toDateTime();\n for($i=0;$i<count($data);$i++){\n if($data[$i][\"Month\"]==$milliseconds->format('M')){ \n $findCounter = 1;\n $oldV = $data[$i][\"Count\"];\n $data[$i][\"Count\"] = $oldV+$row->Count; \n break;\n }\n }\n if($findCounter==0){\n $data[$i] = array(\"Month\"=>($milliseconds->format('M')),\"Count\"=>($row->Count));\n } else {\n $findCounter = 0;\n }\n }\n return json_encode($data);\n}", "public function query($sql) {\n return $this->_connection->query($sql);\n }", "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "function run_query($query) {\r\n\t \t$db = new Database();\r\n\t \t$queryResult = $db->run_query_internal($query);\r\n\t \treturn mysqli_query($db->getConnection(),$query);\r\n\t }", "public function execute()\n\t{\n\t\t// Use cached results if found (previous count() or other internal call)\n\t\tif($this->activeQueryResults) {\n\t\t\t$results = $this->activeQueryResults;\n\t\t} else {\n\t\t\tif($this->activeQuery instanceof phpDataMapper_Database_Query_Interface) {\n\t\t\t\t$results = $this->query($this->activeQuery->sql(), $this->activeQuery->getParameters());\n\t\t\t\t$this->activeQueryResults = $results;\n\t\t\t} else {\n\t\t\t\t$results = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "function db_execute($query)\n {\n /*\n * Execute the Query\n */\n $this->varifysql($query[\"SQL\"]);\n return $this->get_conn()->query($query[\"SQL\"], PDO::FETCH_ASSOC);\n }", "public function query($sql) {\n $this->result = $this->wjdb->query($sql);\n return $this->result;\n }", "public function executeQuery($sql){\n return DB::executeQuery($this->db, $sql);\n }", "public function query($query){\n $result = mysqli_fetch_array($this->connection->query($query));\n return $result;\n }", "public function Query() {\n \n }", "function query($query) {\n\t\treturn $this->dbcr_query( $query, true );\n\t}", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "function getDBData($query) {\n\t\trequire_once \"db.php\";\n\t\t$statement = $db->prepare($query);\n\t\t$statement->execute();\n\t\treturn $statement;\n}", "public static function viewTeenCoin(){\n try {\n $conexion = ConexionDB::conectar(\"cryptoMonedas\");\n $cursor = $conexion->monedas->find();\n $result = json_encode($cursor->toArray());\n } catch(Exception $e) {\n echo $e;\n }\n $conexion = null;\n return $result;\n}", "public function executeSelect($sql) {\r\n\r\n $res = mysql_query($sql);\r\n $this->response = $res;\r\n\r\n return $this->resultToArray($res);\r\n\r\n }", "function query($query){\n return mysql_query($query, $this->connection);\n }", "public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}", "function get_drugs(Request $request, Response $response)\n{\n $query = $request->getQueryParams();\n try {\n $sql = \"SELECT * FROM drugs\";\n $db = new db();\n $pdo = $db->connect();\n $stmt = $pdo->query($sql);\n $drugs = $stmt->fetchAll();\n $pdo = null;\n\n //This is a way to pass the body via the response object\n $resp = json_encode(\n [\n \"status\" => 1,\n \"drugs\" => $drugs\n ]\n );\n $response->getBody()->write($resp);\n \n return $response;\n } catch (\\PDOException $e) {\n $resp = json_encode(\n [\n \"status\" => 0,\n \"message\" => $e->getMessage()\n ]\n );\n $response->getBody()->write($resp);\n return $response;\n }\n}" ]
[ "0.7105816", "0.68147826", "0.68147826", "0.68147826", "0.6802983", "0.66834146", "0.6682107", "0.660833", "0.65793455", "0.65341854", "0.6501893", "0.6469688", "0.64643395", "0.6458618", "0.6392739", "0.63908637", "0.6364758", "0.63640594", "0.6341996", "0.6312305", "0.62928194", "0.6263332", "0.6197917", "0.6194135", "0.61925113", "0.6173021", "0.61704975", "0.61582005", "0.61582005", "0.6145654", "0.6133043", "0.61222917", "0.61222917", "0.61222917", "0.61222917", "0.61129385", "0.61103535", "0.61098015", "0.6094817", "0.60744387", "0.60553664", "0.6034769", "0.6032748", "0.60320276", "0.60161966", "0.601616", "0.6013231", "0.6013231", "0.6013231", "0.6012957", "0.5997655", "0.59967387", "0.5992218", "0.5989074", "0.59765357", "0.59588546", "0.5942863", "0.59418184", "0.5941064", "0.59355986", "0.5932919", "0.592453", "0.5915217", "0.5911429", "0.5904674", "0.5904474", "0.59043396", "0.5902502", "0.59021145", "0.58964473", "0.58959955", "0.58943015", "0.58839554", "0.5875237", "0.58665204", "0.584889", "0.5836548", "0.5831021", "0.58193135", "0.58074766", "0.57955223", "0.5790841", "0.5789719", "0.5786906", "0.57739186", "0.57738715", "0.57655716", "0.57554585", "0.5752292", "0.57497543", "0.57497287", "0.57453156", "0.5740737", "0.5734793", "0.5731628", "0.5726531", "0.5719207", "0.57096624", "0.5708864", "0.5706897" ]
0.60266453
44
Include the default item template
function tpl_item( $post, $include_date = true ) { tpl('item', 'default', array( 'post' => $post ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function available_items_template()\n {\n }", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "public function renderDefault() {\n\t\t$this->onlyForAdmins();\n\t\t$this->template->instances = $this->configManager->getInstances($this->fileName);\n\t}", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }", "public function renderDefault() {\r\n $this->template->title = \"ToDo-list\";\r\n\r\n $session = $this->getSession('session');\r\n\r\n if ($this->getParam(\"deleteTask\"))\r\n $this->deleteTask($_GET[\"deleteTask\"]);\r\n\r\n if ($this->getUser()->isLoggedIn()) { // přihlášení uživatelé\r\n $this->template->loggedAs = \"Přihlášen jako \" . $this->getUser()->identity->data[0] . \" (\" . $this->getUser()->identity->data[1] . \")\";\r\n\r\n\r\n $this->template->categoryList = $this->getCategoryList();\r\n $this->template->tasks = $this->listTasks($this['vp']->getPaginator());\r\n } else {\r\n $this->template->loggedAs = \"Nepřihlášen\";\r\n }\r\n $this->makeMenu($this->getUser()->isLoggedIn());\r\n }", "function items(){\n $data['content_page']='admin/items';\n $this->load->view('common/base_template',$data);\n }", "protected function showDefault()\n {\n return ViewFacade::make($this->viewPrefix.\"default.{$this->getType()}.$this->template\", [\n 'placeholder' => $this->getPlaceholderText(),\n ]);\n }", "public function renderDefault() {\t \n // get menuItem data\n $menuItem = $this->db_menuItems->getMenuItemById($this->userId, 6);\n\n if ($menuItem) {\n $this->menuItem = $menuItem;\n\n // check menuItem publish status\n if ($this->menuItem->itemPublished == 'yes') {\n $this->template->status = 1;\n \n // prepare itemContent for output\n $this->template->content = $this->menuItem->itemContent;\n $this->template->itemTitle = $this->menuItem->itemName;\n } else {\n $this->template->status = null;\n }\n } else {\n throw new \\Nette\\Application\\BadRequestException('Unable to load menuItem 6 (MainModule - menuItem6 presenter).', 404);\n } \n }", "protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "protected function content_template() {}", "protected function content_template() {}", "function get_default_items() {\n\t\t$items = array(\n\t\t\tarray(\n\t\t\t\t'_key' => 'category',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Category', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'_key' => 'title',\n\t\t\t\t'title' => __( 'Title', 'customify' ),\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'rating',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Rating', 'customify' ),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'_key' => 'price',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Price', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'description',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 0,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Short Description', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'add_to_cart',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Add To Cart', 'customify' ),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'customify/product-designer/body-items', $items );\n\t}", "protected function getDefaultTemplate()\n {\n return 'modules/CDev/FileAttachments/product.twig';\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "public function getItemTemplate()\r\n {\r\n return $this->templateConfiguration['itemTemplate'];\r\n }", "public function renderDefault() {\n\t\t$this->onlyForAdmins();\n\t\t$this->template->macros = $this->iqrfMacroManager->read();\n\t}", "abstract protected function setTemplate($item);", "protected function _content_template() { ?>\r\n <# if ( settings.list.length ) { #>\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\">\r\n <# _.each( settings.list, function( item ) { #>\t\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" {{ item.imagen.url }} \">\r\n <h5 class=\"DSMCA__item-title\"> {{{ item.titulo }}} </h5> \r\n </div>\r\n <# }); #>\t\r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n <# } #>\r\n <?php\r\n }", "protected function getDefaultTemplate()\n {\n return 'modules/XCExample/Recommendations/recommendation/body.twig';\n }", "public function renderDefault() \r\n {\r\n // Add navigation\r\n $this->addNavigation('Add new books', '');\r\n }", "protected function defaultTemplate()\n {\n return array('S3File');\n }", "protected function _content_template() {\n \n }", "public static function listItemsTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/list_items.tpl.php\"); ?>\n<?php\n }", "protected function _content_template()\n {\n\n }", "protected function content_template() {\n\t}", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "protected function _content_template() {\n\t}", "public function renderDefault()\n {\n $this->template->users = $this->users->findAll();\n }", "protected function content_template()\n\t{\n\t\t//\n\t}", "public function renderDefault()\n\t{\n\t\t$this->template->reservations = $this->reservations->findBy(array(),array('date' => 'DESC'));\n\n\t}", "public function beforeTemplate(){\n\t\t//defaults to empty\n\t}", "function no_items() {\n _e('No template found.');\n }", "public function getItemTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('item_');\n\t}", "function _spacesoghome_menu_default_items() {\n $items = array();\n\n $items[] = array(\n 'title' => 'Home',\n 'path' => 'front',\n 'weight' => '0',\n 'description' => 'A simple front page.',\n );\n // Translatables\n array(\n t('A simple front page.'),\n t('Home'),\n );\n\n\n return $items;\n}", "protected function setupTemplate() {\r\n \r\n }", "public function index()\n {\n $data['row'] = $this->items_m->get();\n $this->template->load('template', 'product/item/item_data', $data);\n }", "function _scholar_polls_menu_default_items() {\n $items = array();\n\n $items[] = array(\n 'title' => 'Polls',\n 'path' => 'polls',\n 'weight' => '0',\n 'description' => 'List of polls in my site',\n );\n // Translatables\n array(\n t('List of polls in my site'),\n t('Polls'),\n );\n\n\n return $items;\n}", "function getItemDefaultOptions();", "public function shop_item()\n {\n $this->el = new XTemplate($this->temp, $this->path);\n\n // for element that have wrapper and comment\n $this->el->assign('WRAPPER', $this->wrapper);\n $this->el->assign('LINK', $this->link);\n\n // scan all variables when using\n foreach ($this->shop_item as $key => $value) {\n\n // customize if need when more vars in html template *\n $this->el->assign('IMG', $value);\n\n // fixed loop\n $this->el->parse('shop_item');\n }\n\n // fixed out results\n echo $this->el->text('shop_item');\n\n }", "protected function getDefaultTemplate()\n {\n return 'modules/XC/Velocity/payment.tpl';\n }", "public function get_custom_templates()\n {\n }", "function template_item ($name, $content) {\n $item['name'] = $name;\n $item['content'] = $content;\n\n return $item;\n }", "function get_default_block_template_types()\n {\n }", "public function forTemplate() {\n\t\treturn; \n\t}", "public function getDefaultView()\n {\n return 'kumaPortfolioBundle:PageParts:ListPagePart/view.html.twig';\n }", "protected function _content_template() {\n ?>\n\n\n\n <section id=\"intro\">\n\n <div class=\"intro-content\">\n <h2>{{{settings.title}}}</h2>\n <div>\n <a href=\"#about\" class=\"btn-get-started scrollto\">\n {{{settings.button1_text}}}\n </a>\n <a href=\"#portfolio\" class=\"btn-projects scrollto\">\n {{{settings.button2_text}}}\n </a>\n </div>\n </div>\n\n <div id=\"intro-carousel\" class=\"owl-carousel\" >\n\n <# _.each( settings.gallery, function( image ) { #>\n\n <div class=\"item\" style=\"background-image: url('{{ image.url }}');\"></div>\n <# }); #>\n\n </div>\n\n </section><!-- #intro -->\n \n <?php\n }", "function _add_block_template_info($template_item)\n {\n }", "protected function _content_template()\n {\n ?>\n <div>\n <ul class=\"elementor-portfolio__filters cat-filter-for-{{ settings.post_id }}\">\n <li class=\"elementor-portfolio__filter elementor-active\">{{{ settings.all_text }}}</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 1</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 2</li>\n </ul>\n </div>\n<?php\n }", "public function set_default_entry_template($content = null) {\n }", "public function getViewTemplate();", "public function actionDefault()\n {\n $this->model->setBackgroundColor();\n\t \n\t $reminders = $this->model->getSortedReminders();\n\n return ['Allitems', array(\n 'reminders' => $reminders\n )];\n }", "public function getGathercontentTemplate();", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "function default_template_shipping ()\r\n{\r\n$template = '\r\n{shipping_content alias=$shipping_alias}\r\n';\r\nreturn $template;\r\n}", "public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}", "function index()\n {\n //call some deafaults not to spoil template\n $data=$this->default_data();\n $this->template($data);\n\n }", "protected function _content_template() {\n\t\t?>\n\t\t<#\n\t\tview.addInlineEditingAttributes( 'title', 'none' );\n\t\tview.addInlineEditingAttributes( 'description', 'basic' );\n\t\tview.addInlineEditingAttributes( 'content', 'advanced' );\n\t\t#>\n\t\t<h2 {{{ view.getRenderAttributeString( 'title' ) }}}>{{{ settings.title }}}</h2>\n\t\t<div {{{ view.getRenderAttributeString( 'description' ) }}}>{{{ settings.description }}}</div>\n\t\t<div {{{ view.getRenderAttributeString( 'content' ) }}}>{{{ settings.content }}}</div>\n\t\t<?php\n\t}", "public function actionDefault()\n {\n $model = new Model($this->database);\n $categories = $model->getCategories();\n $data = [];\n foreach ($categories as $key => $item) {\n $forums = $model->getForums($key);\n $data += [\n $key => [\n 'name' => $item->name,\n 'data' => $forums\n ]\n ];\n }\n\n $this->template->data = $data;\n }", "public function defaultView(){\n $this->view->render('index');\n }", "public function forTemplate()\n {\n return $this->renderWith($this->defaultTemplate());\n }", "public function initialize()\n {\n // set base template\n $this->view->setTemplateBefore('default');\n }", "function _default($tpl=null, $onlyPagination = false)\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$model = $this->getModel();\r\n\t\t$items = $model->getList();\r\n\t\t$app->input->set( 'page', 'category' ); // for \"getCartButton\"\r\n\r\n\t\t// form\r\n\t\t\t$validate = JSession::getFormToken();\r\n\t\t\t$form = array();\r\n\t\t\t$view = strtolower( $app->input->get('view') );\r\n\t\t\t$form['action'] = \"index.php?option=com_citruscart&controller={$view}&view={$view}\";\r\n\t\t\t$form['validate'] = \"<input type='hidden' name='{$validate}' value='1' />\";\r\n\t\t\t$this->assign( 'form', $form );\r\n }", "abstract protected function renderItems(): string;", "function app_template() {\n\t$template = <<<HTML\n\n\n\nHTML;\n\n $navigation = app_template_navigation();\n $dialogs = app_template_dialogs();\n\t$data['blocks'] = empty($navigation) ? array($dialogs) : array($dialogs, $navigation);\n\t$data['template'] = $template;\n\treturn $data;\n}", "protected function getDefaultView(): string\n {\n return $this->getView('//resource-page', [\n 'page_title' => $this->label(),\n 'header_actions' => $this->getCreateButton(),\n 'list_table' => $this->display()\n ]);\n }", "public function getDefaultView()\n {\n return 'PageParts/testPagePart/view.html.twig';\n }", "public function initTemplate() {}", "public function set_default_view_template($content = null) {\n if ($content === null) {\n // Notifications.\n $notifications = \\html_writer::tag('div', '##notifications##', array('class' => ''));\n\n // Add new entry.\n $addnewentry = \\html_writer::tag('div', '##addnewentry##', array('class' => 'addnewentry-wrapper'));\n\n // Filtering.\n $quickfilters = \\html_writer::tag('div', $this->get_default_filtering_template(), array('class' => 'quickfilters-wrapper'));\n\n // Paging bar.\n $pagingbar = \\html_writer::tag('div', '##paging:bar##', array('class' => ''));\n // Entries.\n $entries = \\html_writer::tag('div', '##entries##', array('class' => ''));\n\n // Set the view template.\n $exporthide = \\html_writer::tag('div', $addnewentry. $quickfilters. $pagingbar, array('class' => 'exporthide'));\n\n $content = \\html_writer::tag('div', $exporthide. $entries);\n }\n $this->section = $content;\n }", "public function content_template() { ?>\n\n\t\t<span class=\"customize-control-title\">\n\t\t<# if ( data.label ) { #>\n\t\t\t{{ data.label }}\n\t\t<# } #>\n\n\t\t<# if ( data.description ) { #>\n\t\t\t<span class=\"description customize-control-description\">{{{ data.description }}}</span>\n\t\t<# } #>\n\t\t</span>\n\n\t\t<ul>\n\n\t\t<# if ( data.family && data.family.choices ) { #>\n\n\t\t\t<li class=\"customize-control typography-font-family\">\n\n\t\t\t\t<# if ( data.family.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.family.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.family.link }}}>\n\n\t\t\t\t\t<# _.each( data.family.choices, function( label, choice ) { #>\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.family.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.weight && data.weight.choices ) { #>\n\n\t\t\t<li class=\"customize-control typography-font-weight\">\n\n\t\t\t\t<# if ( data.weight.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.weight.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.weight.link }}}>\n\n\t\t\t\t\t<# _.each( data.weight.choices, function( label, choice ) { #>\n\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.weight.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.style && data.style.choices ) { #>\n\n\t\t\t<li class=\"typography-font-style\">\n\n\t\t\t\t<# if ( data.style.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.style.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.style.link }}}>\n\n\t\t\t\t\t<# _.each( data.style.choices, function( label, choice ) { #>\n\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.style.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.size ) { #>\n\n\t\t\t<li class=\"typography-font-size\">\n\n\t\t\t\t<# if ( data.size.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.size.label }} (px)</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<input type=\"number\" min=\"1\" {{{ data.size.link }}} value=\"{{ data.size.value }}\" />\n\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.line_height ) { #>\n\n\t\t\t<li class=\"typography-line-height\">\n\n\t\t\t\t<# if ( data.line_height.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.line_height.label }} (px)</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<input type=\"number\" min=\"1\" {{{ data.line_height.link }}} value=\"{{ data.line_height.value }}\" />\n\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t</ul>\n\t<?php }", "public function get_default_additional_content()\n {\n\n return __('Hope to see you back soon.', 'subscriptio');\n }", "public function builder_template() {\n\n\t\t// function verifies the AJAX request, to prevent any processing of requests which are passed in by third-party sites or systems\n\n\t\tcheck_ajax_referer( 'mfn-builder-nonce', 'mfn-builder-nonce' );\n\n\t\t$id = intval($_POST['mfn-items-import-template'], 10);\n\n\t\tif (! $id) {\n\t\t\texit;\n\t\t}\n\n\t\t// unserialize received items data\n\n\t\t$mfn_items = get_post_meta($id, 'mfn-page-items', true);\n\n\t\tif (! $mfn_items){\n\t\t\texit;\n\t\t}\n\n\t\tif (! is_array($mfn_items)) {\n\t\t\t$mfn_items = unserialize(call_user_func('base'.'64_decode', $mfn_items));\n\t\t}\n\n\t\t// get current builder uniqueIDs\n\n\t\t$uids_row = isset($_POST['mfn-row-id']) ? $_POST['mfn-row-id'] : array();\n\t\t$uids_wrap = isset($_POST['mfn-wrap-id']) ? $_POST['mfn-wrap-id'] : array();\n\t\t$uids_item = isset($_POST['mfn-item-id']) ? $_POST['mfn-item-id'] : array();\n\n\t\t$uids = array_merge($uids_row, $uids_wrap, $uids_item);\n\n\t\t// reset uniqueID\n\n\t\t$mfn_items = Mfn_Builder_Helper::unique_ID_reset($mfn_items, $uids);\n\n\t\tif (is_array($mfn_items)) {\n\n\t\t\t$builder = new Mfn_Builder_Admin();\n\t\t\t$builder->set_fields();\n\n\t\t\tforeach ($mfn_items as $section) {\n\t\t\t\t$uids = $builder->section($section, $uids);\n\t\t\t}\n\n\t\t}\n\n\t\texit;\n\n\t}", "protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}", "public function afterTemplate(){\n\t\t//defaults to empty\n\t}", "public function initContent()\n {\n\n $shipping = $this->get_ahref('AdminFrankShipping');\n $returns = $this->get_ahref('AdminFrankReturns');\n $statics = $this->get_ahref('AdminFrankStatics');\n $settings = $this->get_ahref('AdminFrankSettings');\n parent::initContent();\n $this->context->smarty->assign(\n array(\n// 'api_statics' => $api_statics['data'],\n 'shipping' => $shipping,\n 'returns' => $returns,\n 'settings' => $settings,\n )\n );\n\n $this->setTemplate('statics.tpl');\n }", "public function renderAdd()\r\n\t{\r\n\t\t$this['itemForm']['save']->caption = 'Přidat';\r\n $this->template->titul = self::TITUL_ADD;\r\n\t\t$this->template->is_addon = TRUE;\r\n\r\n\t}", "protected function _beforeToHtml()\n {\n if (! $this->canShow()) {\n return $this;\n }\n\n if (! $this->getTemplate()) {\n $this->setTemplate('Plumrocket_Amp::catalog/product/widget/items.phtml');\n }\n\n return parent::_beforeToHtml();\n }", "public function renderTemplate();", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "protected function template() {\n\t\treturn '';\n\t}", "function page_template_dropdown($default_template = '', $post_type = 'page')\n {\n }", "private function twigDefaultContext()\n {\n // show language bar by default\n if (!isset($this->data['hideLanguageBar'])) {\n $this->data['hideLanguageBar'] = false;\n }\n // get languagebar\n $this->data['languageBar'] = null;\n if ($this->data['hideLanguageBar'] === false) {\n $languageBar = $this->generateLanguageBar();\n if (is_null($languageBar)) {\n $this->data['hideLanguageBar'] = true;\n } else {\n $this->data['languageBar'] = $languageBar;\n }\n }\n\n // assure that there is a <title> and <h1>\n if (isset($this->data['header']) && !isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = $this->data['header'];\n }\n if (!isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = 'SimpleSAMLphp';\n }\n }", "public function getTemplate() {}", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "abstract public function getTemplate();" ]
[ "0.70914614", "0.69423985", "0.6857787", "0.67445195", "0.6502809", "0.63727", "0.63441795", "0.63319206", "0.6323185", "0.631422", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6311157", "0.6292951", "0.6292951", "0.62825346", "0.62739706", "0.62541157", "0.62541157", "0.62541157", "0.62541157", "0.62541157", "0.62541157", "0.6237944", "0.6237222", "0.6231949", "0.6224625", "0.6221228", "0.6197332", "0.6175362", "0.6174988", "0.6129362", "0.61274403", "0.6126527", "0.60893035", "0.6077102", "0.6053146", "0.605237", "0.5975924", "0.59595317", "0.5955009", "0.59545994", "0.5906081", "0.58840454", "0.5842418", "0.5841074", "0.58399385", "0.58384246", "0.5824961", "0.58193505", "0.5761811", "0.5756458", "0.57297444", "0.5712827", "0.5705494", "0.5692608", "0.5685382", "0.56782925", "0.56757444", "0.5646212", "0.5645307", "0.5643928", "0.5635775", "0.5628903", "0.5619568", "0.560837", "0.56010634", "0.5598307", "0.5552909", "0.5550322", "0.55497724", "0.55490965", "0.5536849", "0.5533726", "0.5531347", "0.55268896", "0.5524508", "0.55028284", "0.54960793", "0.54958564", "0.5495419", "0.5480371", "0.5478974", "0.5461401", "0.5458196", "0.54559326", "0.5454203", "0.54513633", "0.5451143", "0.54496485", "0.5438162", "0.5421373", "0.54176146" ]
0.6812593
3
Include the default page template
function tpl_item_page( $page ) { tpl('item', 'page', array( 'page' => $page ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function page_default () {\r\n\t\t$skeleton = new xhtml ('skeleton.basic');\r\n\t\t$skeleton->load();\r\n\t\t$content=\"\";\r\n\t\t/**\r\n\t\t * Fetch the body content template\r\n\t\t */\r\n\t\tif(config::get('locale')!='') {\r\n\t\t\t$body = new xhtml ('body.vidtuts.'.config::get('locale'));\r\n\t\t} else {\r\n\t\t\t$body = new xhtml ('body.vidtuts');\r\n\t\t}\r\n\t\t$body->load();\r\n\r\n\t\t/**\r\n\t\t * Fetch the translated terms\r\n\t\t */\r\n\t\t$query = \"SELECT \";\r\n\t\t$query.= \"`html` \";\r\n\t\t$query.= \"FROM \";\r\n\t\t$query.= \"`page_terms_translations` \";\r\n\t\t$query.= \"WHERE \";\r\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\r\n\t\t$query.= \"LIMIT 1\";\r\n\r\n\t\t$result = database::query($query);\r\n\r\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\r\n\t\t\t$row = mysql_fetch_assoc($result);\r\n\r\n\t\t\t$date = date('d/m/Y');\r\n\r\n\t\t\t$content = str_replace('{{ date }}',$date,stripslashes($row['html']));\r\n\t\t}\r\n\r\n\t\t$body->assign('content',$content);\r\n \r\n\t\t/**\r\n\t\t * Fetch the page details\r\n\t\t */\r\n\t\t$page = new page('terms');\r\n\r\n\t\t/**\r\n\t\t * Build the output\r\n\t\t */\r\n\t\t$skeleton->assign (\r\n\t\t\tarray (\r\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Video Tutorials',\r\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\r\n\t\t\t\t'description'\t=> $page->description(),\r\n\t\t\t\t'body'\t\t\t=> $body\r\n\t\t\t)\r\n\t\t);\r\n \r\n\t\toutput::as_html($skeleton,true);\r\n \r\n\t}", "protected function page_default () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget');\n\n\n\t\t/**\n\t\t * Fetch the translated terms\n\t\t */\n\t\t$query = \"SELECT \";\n\t\t$query.= \"`html` \";\n\t\t$query.= \"FROM \";\n\t\t$query.= \"`page_widget_translations` \";\n\t\t$query.= \"WHERE \";\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\n\t\t$query.= \"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\n\t\t\t$row\t\t= mysql_fetch_assoc($result);\n\t\t\t$date\t\t= date('d/m/Y');\n\t\t\t$content\t= str_replace('{{ date }}',$date,stripslashes($row['html']));\n\t\t}\n\n\t\t$body->assign('content',$content);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t /*\n\t\t$page = new page('terms');\n\t\t*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "function homepage(){\n\t\trequire(TEMPLATES_PATH.\"/homepage.php\");\n\t}", "public function pagina(){\n\t\t\tinclude \"views/template.php\";\n\t\t}", "public function display(){\n\t\t$this->smarty->assign(\"main_content\",$this->template) ;\n\t\t$this->setTemplate(\"common/page.tpl\") ;\n\t\tparent::display() ;\n\t}", "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Page')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ));\n }", "public function default_page_render()\r\n {\r\n // instances page 404\r\n include $this->bootstrap->base_controller_dir . 'Wpf_page_not_found.php';\r\n $pageNotFound = new \\WPFP\\App\\Controllers\\Wpf_page_not_found();\r\n $pageNotFound->index();\r\n }", "public function showTemplate(){\n\t\tinclude \"view/template.php\";\n\t}", "public function homePage()\n {\n return $this->render(\"homePage.html.twig\");\n }", "function _home_template ($page,$contents){\n\t\t\t$this->load->view(\"client_home_header_new\",$contents);\n\t\t\t$this->load->view('user/career_event/'.$page, $contents);\n\t\t\t$this->load->view(\"client_home_footer_new\",$contents);\n\t\t}", "function index()\n {\n //call some deafaults not to spoil template\n $data=$this->default_data();\n $this->template($data);\n\n }", "function templatePage ($s_content, $s_title, $s_header='', $s_footer='') {\n\treturn template_tags (template_load ('base.html'), array (\n\t\t'TITLE' => $s_title, 'HEADER' => $s_header, 'FOOTER' => $s_footer, 'CONTENT' => $s_content\n\t));\n}", "protected function content_template() {}", "protected function content_template() {}", "public function getDefaultView()\n {\n return 'PageParts/testPagePart/view.html.twig';\n }", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "public function theme_page_output() {\n require get_theme_file_path( '/templates/theme-page.php' );\n\t}", "protected function content_template() {\n\t}", "function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }", "public function home()\n {\n $this->render('home/content');\n }", "public function render_page() {\n\t\t$this->render_template();\n\t}", "public function defaultAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "public function template()\n {\n\n include './views/template.php';\n\n }", "private function setDefaultView() {\r\n $page = 'index';\r\n\r\n if($this->getRouter()->getController() != null) {\r\n $page = $this->getRouter()->getController();\r\n }\r\n\r\n $template = Globals::getConfig()->template->path . $page;\r\n $this->_view = new View($template,null, true);\r\n\r\n try {\r\n $this->setJs();\r\n $this->setCss();\r\n } catch (Exception $e) {\r\n $this->defaultAction();\r\n }\r\n }", "public function homePage() {\n #$this->view->loadTemplate( 'elements_example');\n $this->view->loadTemplate( LNG . '/centercontent');\n $this->commitReplace($this->view->render(), '#two', true);\n }", "function index(){\n\n global $wear;\n $template = $this->loadView($wear->front . \"/index\");\n $template->set(\"page\" , SITE_NAME . \" | Home\");\n $template->render(); \n\n }", "public function wordpress_default_header(){\n\t\tif(is_home() && $this->_template_builder->get_specific_option('carousel_global')){\r\n\t\t\tif(!$this->_template_builder->get_specific_option('jumbotron')){\r\n\t\t\t\t$this->_build_header();\r\n\t\t\t}else{\r\n\t\t\t\t$this->_template_builder->render_view('jumbotron');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($this->_template_builder->get_specific_option('socialbar')){\r\n\t\t\t\t$this->_template_builder->render_view('socialbar');\t\r\n\t\t\t}\r\n\t\t}\n\t}", "public function index()\n {\n $pages = Posts::where('type', '=', 'page')->get();\n $this->layout->title = 'Page - NCCMS';\n $this->layout->with('script', 'nccms::admin.pages.scripts.index')\n ->with('style', 'nccms::admin.pages.styles.index');\n $this->layout->content = \\View::make('nccms::admin.pages.index')\n ->with('pages', $pages)\n ->with('title', 'Page');\n }", "protected function _setPageViewTemplate()\n {\n\n $fishpigWordpressModuleVersion = Mage::getConfig()->getNode('modules/Fishpig_Wordpress/version');\n\n if ($fishpigWordpressModuleVersion > 4) {\n parent::_setPageViewTemplate();\n } else {\n $page = $this->_initPage();\n\n $template = $page->getMetaValue('_wp_page_template');\n\n // This is the folder in Magento template\n $path = 'page/';\n\n //preg_match('/([^\\/]*)\\.php$/', $template, $match);\n //$filename = $path . $match[1] . '.phtml';\n // The extension is replaced with .phtml,\n // meaning that the directory structure is preserved.\n // (page-templates/templ.php will become $path . page-templates/templ.phtml)\n $filename = $path . str_replace('.php', '.phtml', $template);\n\n // This is to use Magento fallback system\n $params = array('_relative' => false);\n $area = $this->getLayout()->getBlock('root')->getArea();\n\n if ($area) {\n $params['_area'] = $area;\n }\n\n $templateName = Mage::getDesign()->getTemplateFilename($filename, $params);\n\n // If no other matches are found, Magento will eventually give a path in base/default, even if that template doesn't exist\n if (file_exists($templateName)) {\n $this->getLayout()->getBlock('root')->setTemplate($filename);\n }\n\n return $this;\n }\n }", "protected function content_template()\n\t{\n\t\t//\n\t}", "protected function _content_template()\n {\n\n }", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "public function Home()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'home');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Home')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/homepage');\n }", "public function index() {\n\t $this->registry->template->show();\n\t}", "public function page_templates()\n {\n // Single Chiro Quiz page template\n if (is_single() && get_post_type() == $this->token) {\n if (!defined('PLATFORM_FUNNEL')) {\n define('PLATFORM_FUNNEL', 'CHIRO_QUIZ');\n }\n\n include($this->template_path . 'single-quiz.php');\n exit;\n }\n }", "public function renderDefault() {\n\t\t$this->onlyForAdmins();\n\t\t$this->template->instances = $this->configManager->getInstances($this->fileName);\n\t}", "public function defaultView(){\n $this->view->render('index');\n }", "public function index() {\n\n $attr = array();\n\t\t$this->layout_lib->default_template('master/template_pola/index', $attr);\n }", "protected function _content_template() {\n\t}", "public function frontpage() {\n\t\t\n\t\t$this->set('page_title', 'Welcome'); // this is hardcoded for index page\n\t\t$this->render('index');\n\t}", "protected function _content_template() {\n \n }", "function _template ($page,$contents){\n\t\t\t$this->load->view(\"client_common_header\",$contents);\t\t\t\t\t\t\t\n\t\t\t$this->load->view('user/career_event/'.$page, $contents);\n\t\t\t$this->load->view(\"client_common_footer\",$contents);\n\t\t}", "function lb_show_make_page() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'make_page',\n\t\t\t'pages' => lb_get_all_pages_from_pages(),\n\t\t)\n\t);\n}", "public function template_include() {\n\n\t\treturn locate_template( array( 'page.php', 'single.php', 'index.php' ) );\n\t}", "function tpl_page($help = '', $title = '')\n{\n tpl_language();\n tpl_header($help, $title);\n tpl_footer();\n}", "function introduction(){\n // show the introduction page\n echo Template::instance()->render('views/introduction.php');\n}", "public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}", "function sunrise_theme_create_page()\n {\n require_once(get_template_directory().'/inc/templates/sunrise-admin.php');\n }", "function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}", "public static function switch_page_template() {\n\n global $post;\n\n $post_type = get_post_type($post->ID);\n\n if (is_page() or is_post_type_hierarchical($post_type)) {// Checks if current post type is a page, rather than a post\n $current_page_template = get_post_meta($post->ID, '_wp_page_template', true);\n $parent_page_template = get_post_meta($post->post_parent, '_wp_page_template', true);\n $parents = get_post_ancestors($post->ID);\n\n if ($parents) {\n update_post_meta($post->ID, '_wp_page_template', $parent_page_template, $current_page_template);\n }\n }// End check for page\n }", "function oneviewer_page_template( $template ) {\n if ( is_page('viewer') ) {\n $newtemplate = dirname( __FILE__ ) . '/templates/page-one-viewer.php';\n return $newtemplate ;\n }\n return $template;\n\n}", "public function home()\r\n {\r\n\r\n $view = new Template();\r\n echo $view->render('views/home.html');\r\n }", "function index_template()\n {\n return 'photocrati-nextgen_admin#nextgen_admin_page';\n }", "public function defaultAction(){\n\t\t$pseudo = \"Test\";\n\n\t\t//Affiche moi la vue home;\n\t\t$installer = new installer;\n\t\tif(!$installer->checkInstall() xor file_exists('.env.prod')){\n\t\t\theader('location: /installer');\n\t\t}else{\n\t\t$page = new Page();\n\t\t$acceuil = $page->getpageaccueil();\n\t\tif(!empty($acceuil)){\n\t\t\t$view = new View(\"page\", \"front\");\n\t\t\t$view->assign(\"page\",$acceuil[0]);\n\t\t\t$articles = $page->getArticleByIdPage($acceuil[0][\"id\"]);\n\t\t\t$view->assign('articles',$articles);\n\t\t\t$view->assign(\"title\",$acceuil[0]['slug']);\n\t\t}\n\t\telse{\n\t\t\t$view = new View();\n\t\t\t$view->assign(\"title\",\"Votre site\");\n\t\t}\n\t\t\n\t}\n\n\t\t//envoyer le pseudo à la vue\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function renderDefault() \r\n {\r\n // Add navigation\r\n $this->addNavigation('Add new books', '');\r\n }", "public function initialize()\n {\n // set base template\n $this->view->setTemplateBefore('default');\n }", "function index()\n {\n\t$data = $this->page_settings('default', NULL, NULL, 'Users', 'users');\n\t$this->templates->backend($data);\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function combineTemplate($templateName){\r\n\t\t$this -> _template -> assign_display($templateName, 'PAGE', false);\r\n\t}", "public function getDefaultView()\n {\n return 'kumaPortfolioBundle:PageParts:ListPagePart/view.html.twig';\n }", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function homeAction()\n {\n View::render('Pages/home.html.twig');\n }", "public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}", "public function renderDefault() {\n\t\t$this->onlyForAdmins();\n\t\t$this->template->macros = $this->iqrfMacroManager->read();\n\t}", "public function page(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/page', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "public function index()\n {\n $this->render('home/home');\n }", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "public function index() {\n // navbar, {body} and footer. NOTE: {body} is the view referenced in $this->uri->segment(1) \n // If no value exists we send dashboard to take us back to the index page\n $this->data['modal'] = TRUE;\n $this->load->library('template',$this->data);\n $this->template->load_page($this->data);\n }", "public function home()\n {\n global $user;\n\n // Example data to use in the home page.\n $context['user'] = $user;\n $context['allPosts'] = Post::tenMostRecent();\n $context['allComments'] = Comment::tenMostRecent();\n $context['allImages'] = Image::tenMostRecent();\n return render('views/pages/home.php', $context);\n }", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "function get_paged_template()\n {\n }", "function vodi_page_header_home_archive_templates() {\n if ( is_page() && apply_filters( 'vodi_show_site_content_page_header', true ) ) : ?>\n <header class=\"page-header\">\n <?php if ( apply_filters( 'vodi_show_site_content_page_title', true ) ) : ?>\n <h1 class=\"page-title\"><?php echo esc_html( apply_filters( 'vodi_site_content_page_title', get_the_title() ) ); ?></h1>\n <?php endif; ?>\n </header><!-- .entry-header -->\n <?php endif;\n }", "public function view() {\n\t\t// Find page by url slug\n\t\t$slug = $this->app->getSlug();\n\t\t$page = Page::findBySlug($slug);\n\t\t\n\t\t// If page exists render it, otherwise 404\n\t\tif ($page) {\n\t\t\t$this->title = $page->name;\n\t\t\t$this->pageData['page'] = $page;\n\t\t\t$this->render('view');\n\t\t} else {\n\t\t\t$this->noRoute();\n\t\t}\n\t}", "public function beforeTemplate(){\n\t\t//defaults to empty\n\t}", "public function userHome() {\n\n $this->page->getPage('userhome.tpl');\n }", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "abstract function render_page();", "protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }", "protected function _content_template() {\n ?>\n\n\n\n <section id=\"intro\">\n\n <div class=\"intro-content\">\n <h2>{{{settings.title}}}</h2>\n <div>\n <a href=\"#about\" class=\"btn-get-started scrollto\">\n {{{settings.button1_text}}}\n </a>\n <a href=\"#portfolio\" class=\"btn-projects scrollto\">\n {{{settings.button2_text}}}\n </a>\n </div>\n </div>\n\n <div id=\"intro-carousel\" class=\"owl-carousel\" >\n\n <# _.each( settings.gallery, function( image ) { #>\n\n <div class=\"item\" style=\"background-image: url('{{ image.url }}');\"></div>\n <# }); #>\n\n </div>\n\n </section><!-- #intro -->\n \n <?php\n }", "function my_page_templates_function()\r\n{\t\r\n\tinclude(TEMPL_MONETIZE_FOLDER_PATH.'templatic-generalization/general_settings.php');\r\n\t\r\n}", "public function set_default_view_template($content = null) {\n if ($content === null) {\n // Notifications.\n $notifications = \\html_writer::tag('div', '##notifications##', array('class' => ''));\n\n // Add new entry.\n $addnewentry = \\html_writer::tag('div', '##addnewentry##', array('class' => 'addnewentry-wrapper'));\n\n // Filtering.\n $quickfilters = \\html_writer::tag('div', $this->get_default_filtering_template(), array('class' => 'quickfilters-wrapper'));\n\n // Paging bar.\n $pagingbar = \\html_writer::tag('div', '##paging:bar##', array('class' => ''));\n // Entries.\n $entries = \\html_writer::tag('div', '##entries##', array('class' => ''));\n\n // Set the view template.\n $exporthide = \\html_writer::tag('div', $addnewentry. $quickfilters. $pagingbar, array('class' => 'exporthide'));\n\n $content = \\html_writer::tag('div', $exporthide. $entries);\n }\n $this->section = $content;\n }", "public function loadTemplate()\n\t\t{\n\t\t}", "public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }" ]
[ "0.71611106", "0.7046104", "0.6818574", "0.6759805", "0.67546314", "0.6731774", "0.67270565", "0.6722121", "0.6714793", "0.67102885", "0.6697808", "0.6664415", "0.66510314", "0.66510314", "0.6647876", "0.6628416", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.6621367", "0.66187155", "0.66187155", "0.66187155", "0.66187155", "0.66187155", "0.66187155", "0.65777016", "0.6571802", "0.6570336", "0.65678936", "0.65630525", "0.6546375", "0.65318304", "0.65213615", "0.65182346", "0.64977884", "0.6491128", "0.64797586", "0.6474898", "0.64737034", "0.6470079", "0.64475924", "0.6445827", "0.6445546", "0.6445297", "0.6434558", "0.64257735", "0.6417171", "0.641151", "0.63998294", "0.6394423", "0.63920057", "0.6387839", "0.6382174", "0.6380276", "0.6374325", "0.6369872", "0.63548106", "0.63502955", "0.6343861", "0.6337396", "0.6308889", "0.63046193", "0.6304258", "0.62881047", "0.6277195", "0.62564504", "0.62511224", "0.6246828", "0.6239013", "0.6238828", "0.62287545", "0.62265915", "0.62227213", "0.6206371", "0.6195364", "0.6195345", "0.6187505", "0.6184838", "0.6165273", "0.6161682", "0.616031", "0.6142106", "0.61384624", "0.6127771", "0.6112774", "0.61057514", "0.6098885", "0.6097741", "0.6086832", "0.60805976", "0.60778254", "0.6075722", "0.607482", "0.6068602" ]
0.0
-1
Include the default comment template Note, this should probably only be used as a callback for wp_list_comments()
function tpl_comment( $comment, $args, $depth ) { tpl('item', 'comment', array( 'comment' => $comment, 'args' => $args, 'depth' => $depth )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pixelgrade_comments_template() {\n\t\t// We need to pass the template path retrieved by our locate function so the component template is accounted for\n\t\t// If present in the root of the theme or child theme, `/comments.php` will take precedence.\n\t\tcomments_template( '/' . pixelgrade_make_relative_path( pixelgrade_locate_component_template( Pixelgrade_Blog::COMPONENT_SLUG, 'comments' ) ) );\n\t}", "function comments_template($template) {\n global $__FB_COMMENT_EMBED;\n global $post;\n global $comments;\n\n if (!apply_filters('fbc_force_enabled', false, $post)) {\n\n if ( is_page() && apply_filters('fbc_disable_on_pages', false) ) {\n return '';\n }\n\n if ( !( is_singular() && ( have_comments() || 'open' == $post->comment_status ) ) ) {\n return '';\n }\n\n if ( $post->post_status != 'publish' || !empty($_REQUEST['preview'])) {\n return '';\n }\n\n if ( !$this->is_enabled() ) {\n return $template;\n }\n\n }\n\n $__FB_COMMENT_EMBED = true;\n return dirname(__FILE__).'/comments.php';\n }", "function tweet_comment_comments_template( $path ) {\n\t// Override theme tempalte.\n\treturn dirname( __FILE__) . '/' . 'comments.php';\n}", "function ghostpool_comment_template( $comment, $args, $depth ) {\r\n\r\n\tswitch ( $comment->comment_type ) :\r\n\tcase 'pingback' :\r\n\tcase 'trackback' :\r\n\t\t\r\n\t?>\r\n\r\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\" itemscope itemtype=\"http://schema.org/Comment\">\r\n\r\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment_container\">\r\n\t\t\t<p><?php esc_html_e( 'Pingback:', 'socialize' ); ?> <?php comment_author_link(); ?></p>\r\n\t\t</div>\r\n\t\r\n\t<?php break; default : \r\n\t\r\n\t// Login link\r\n\tif ( ghostpool_option( 'popup_box' ) == 'enabled' ) {\r\n\t\t$login_link = '#login';\r\n\t} else {\r\n\t\t$login_link = wp_login_url( apply_filters( 'the_permalink', get_permalink() ) );\r\n\t}\r\n\t\r\n\t?>\r\n\r\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\" itemscope itemtype=\"http://schema.org/Comment\">\r\n\t\r\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment_container\">\r\n\r\n\t\t\t<?php echo get_avatar( $comment, 60 ); ?>\r\n\t\t\r\n\t\t\t<div class=\"gp-comment-content\">\r\n\t\t\t\r\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) { ?>\r\n\t\t\t\t\r\n\t\t\t\t\t<p class=\"gp-comment-meta\"><em><?php esc_html_e( 'Your comment is awaiting approval.', 'socialize' ); ?></em></p>\r\n\t\t\t\t\r\n\t\t\t\t<?php } else { ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<p class=\"gp-comment-meta\">\r\n\t\t\t\t\r\n\t\t\t\t\t\t<strong itemprop=\"author\">\t\r\n\t\t\t\t\t\t\t<?php printf( '%s', comment_author_link() ); ?>\r\n\t\t\t\t\t\t</strong>\r\n\t\t\t\r\n\t\t\t\t\t\t<time itemprop=\"datePublished\" datetime=\"<?php echo get_comment_date( 'c' ); ?>\">\r\n\t\t\t\t\t\t\t<?php comment_time( get_option( 'date_format' ) ); ?>, <?php comment_time( get_option( 'time_format' ) ); ?>\r\n\t\t\t\t\t\t</time>\r\n\r\n\t\t\t\t\t</p>\t\t\t\t\r\n\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t\r\n\t\t\t\t<div itemprop=\"description\" class=\"gp-comment-description\"><?php comment_text(); ?></div>\r\n\t\t\t\t\r\n\t\t\t\t<?php if ( ! is_user_logged_in() && get_option( 'comment_registration' ) == 1 ) { ?>\r\n\t\t\t\t\t<a href=\"<?php echo $login_link; ?>\" rel=\"nofollow\" class=\"comment-reply-login\"><?php esc_html_e( 'Log in to reply', 'socialize' ); ?></a>\r\n\t\t\t\t<?php } else { \r\n\t\t\t\t\tcomment_reply_link( array_merge( $args, array( 'reply_text' => esc_html__( 'Reply', 'socialize' ), 'add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); \r\n\t\t\t\t} ?>\r\n\r\n\t\t\t</div>\t\r\n\r\n\t\t</div>\r\n\r\n\t<?php break; endswitch;\r\n\r\n}", "function get_comments_popup_template()\n {\n }", "public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }", "function register_block_core_comment_template()\n {\n }", "function cmdeals_comments_template($template) {\n\tglobal $cmdeals;\n\t\t\n\tif(get_post_type() !== 'daily-deals') return $template;\n\t\n\tif (file_exists( STYLESHEETPATH . '/' . WPDEALS_TEMPLATE_URL . 'single-daily-deals-reviews.php' ))\n\t\treturn STYLESHEETPATH . '/' . WPDEALS_TEMPLATE_URL . 'single-daily-deals-reviews.php'; \n\telse\n\t\treturn $cmdeals->plugin_path() . '/deals-templates/single-daily-deals-reviews.php';\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <?php echo comment_placeholder($comment, $args, $depth); ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div><a name=\"comments\"></a>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div><a name=\"comments\"></a>';\n }\n}", "function thinkup_input_commenttemplate( $comment, $args, $depth ) {\n\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php esc_html_e( 'Pingback:', 'ESTSB'); ?> <?php comment_author_link(); ?><?php edit_comment_link( esc_html__( 'Edit', 'ESTSB' ), ' ' ); ?></p>\n\t<?php\n\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t\t\t<?php echo get_avatar( $comment, 70 ); ?>\n\t\t\t<header>\n\n\t\t\t\t<div class=\"comment-author\">\n\t\t\t\t\t<h4><?php printf( '%s', sprintf( '%s', get_comment_author_link() ) ); ?></h4>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em><?php esc_html_e( 'Your comment is awaiting moderation.', 'ESTSB'); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<span class=\"reply\">\n\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t</span>\n\n\t\t\t\t<div class=\"comment-meta\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php esc_attr( comment_time( 'c' ) ); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tprintf( '%1$s', get_comment_date( \"j / M / Y\" ) ); ?>\n\t\t\t\t\t</time></a>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'ESTSB' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\n\t\t\t</header><div class=\"clearboth\"></div>\n\n\t\t\t<footer>\n\n\t\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t</footer>\n\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function custom_comments($comment, $args, $depth) {\n include(locate_template('templates/comments-custom.php'));\n}", "function phptemplate_comment_wrapper($content, $type = null) {\n static $node_type;\n if (isset($type)) $node_type = $type;\n\n if (!$content || $node_type == 'forum') {\n return '<div id=\"comments\">'. $content . '</div>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div>';\n }\n}", "function thinkup_input_comments() {\n\t$args = array( \n\t\t'callback' => 'thinkup_input_commenttemplate', \n\t);\n\twp_list_comments( $args );\n}", "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "function maennaco_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">' . t('Comments') . '</h2>' . $vars['content'];\n }\n}", "function block_core_comment_template_render_comments($comments, $block)\n {\n }", "function cosmetics_comment_form() {\n\n if ( comments_open() || get_comments_number() ) :\n?>\n\n <div class=\"site-comments\">\n <?php comments_template( '', true ); ?>\n </div>\n\n<?php\n endif;\n}", "function test_rendering_comment_template() {\n\t\t$parsed_blocks = parse_blocks(\n\t\t\t'<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'\n\t\t);\n\n\t\t$block = new WP_Block(\n\t\t\t$parsed_blocks[0],\n\t\t\tarray(\n\t\t\t\t'postId' => self::$custom_post->ID,\n\t\t\t)\n\t\t);\n\n\t\t$this->assertSame(\n\t\t\tstr_replace( array( \"\\n\", \"\\t\" ), '', '<ol class=\"wp-block-comment-template\"><li id=\"comment-' . self::$comment_ids[0] . '\" class=\"comment even thread-even depth-1\"><div class=\"wp-block-comment-author-name\"><a rel=\"external nofollow ugc\" href=\"http://example.com/author-url/\" target=\"_self\" >Test</a></div><div class=\"wp-block-comment-content\"><p>Hello world</p></div></li></ol>' ),\n\t\t\tstr_replace( array( \"\\n\", \"\\t\" ), '', $block->render() )\n\t\t);\n\t}", "function theme_comments($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif (get_comment_type() == 'pingback' || get_comment_type() == 'trackback') : ?>\n\t\n\t\t<li class=\"pingback\" id=\"comment-<?php comment_ID(); ?>\">\n\n\t\t\t<article <?php comment_class('clearfix'); ?>>\n\t\t\t\n\t\t\t\t<header>\n\t\t\t\t\n\t\t\t\t\t<h4><?php _e('Pingback:', LANG ); ?></h4>\n\t\t\t\t\t<p><?php edit_comment_link(); ?></p>\n\t\t\t\t\t\n\t\t\t\t</header>\n\t\n\t\t\t\t<?php comment_author_link(); ?>\n\t\t\t\t\t\t\t\t\n\t\t\t</article>\n\t\t\n\t<?php endif; ?>\n\t\n\t<?php if (get_comment_type() == 'comment') : ?>\n\t\t<li id=\"comment-<?php comment_ID(); ?>\">\n\t\n\t\t\t<article <?php comment_class('clearfix'); ?>>\n\t\t\t\n\t\t\t\t<!-- Imagen Ávatar -->\n\t\t\t\t<figure class=\"comment-avatar\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\t$avatar_size = 70;\n\t\t\t\t\t\tif ($comment->comment_parent != 0) {\n\t\t\t\t\t\t\t$avatar_size = 60;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo get_avatar($comment, $avatar_size);\n\t\t\t\t\t?>\n\t\t\t\t</figure> <!-- /.comment-avatar -->\n\n\t\t\t\t<!-- Contenedor de Comentario Contenido -->\n\t\t\t\t<div class=\"comment__content\">\n\t\t\t\t\t<!-- Author del Comentario -->\n\t\t\t\t\t<h4><?php comment_author_link(); ?> / <?php comment_date(); ?></h4>\n\n\t\t\t\t\t<?php if ($comment->comment_approved == false ) : ?>\n\t\t\t\t\t\t<p class=\"awaiting-moderation\"><?php _e('Tu comentario está esperando moderación.', LANG ); ?></p>\n\n\t\t\t\t\t\t<!-- Texto de Comentario -->\n\t\t\t\t\t\t<?php else : comment_text() . \"-\" . comment_reply_link( array_merge( $args , array( \n\t\t\t\t\t\t\t'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); \n\t\t\t\t\t\t?>\n\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t</div> <!-- /.comment__content -->\n\t\t\t\n\t\t\t</article>\n\t\t\t\n\t<?php endif;\t\n}", "function thinkup_input_allowcomments() {\n\n\tif ( comments_open() || '0' != get_comments_number() ) {\n\t\tcomments_template( '/comments.php', true );\n\t}\n}", "function base_comment($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment; ?>\n\t <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t<div class=\"author-data\">\n\t\t\t\t<?php echo get_avatar( $comment, $size='40', $default='<path_to_url>' ); ?>\n\t\t\t\t<?php printf( __( '<h3 class=\"author\">%s</h3>' ), get_comment_author_link() );?>\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<?php printf( __('%1$s at %2$s'), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t<?php edit_comment_link( __('(Edit)'),' ',''); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t<em><?php _e('Your comment is awaiting moderation.') ?></em>\n<?php endif; ?>\n\t\t\t<div class=\"comment-entry\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</div>\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t\t</div>\n\t\t</div>\n\t</li>\n<?php\n}", "function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}", "function gravit_comment( $comment, $args, $depth ) {\r\r\n\t$GLOBALS['comment'] = $comment;\r\r\n\r\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\r\n\t\t<div class=\"comment-body\">\r\r\n\t\t\t<?php _e( 'Pingback:', 'gravit' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '<i class=\"fa fa-pencil-square-o\"></i> Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t</div>\r\r\n\r\r\n\t<?php else : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\r\n\t\t\t<footer class=\"comment-meta\">\r\r\n\t\t\t\t<div class=\"comment-author vcard\">\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>\r\r\n\r\r\n\t\t\t\t\t<div class=\"comment-name\">\r\r\n\t\t\t\t\t\t<?php printf( __( '%s', 'gravit' ), sprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ) ); ?>\r\r\n\t\t\t\t\t\t<div class=\"author-star\">\r\r\n\t\t\t\t\t\t\t<i class=\"fa fa-star\"></i>\r\r\n\t\t\t\t\t\t</div>\r\r\n\t\t\t\t\t</div>\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<div class=\"comment-metadata\">\r\r\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\r\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\r\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'gravit' ), get_comment_date(), get_comment_time() ); ?>\r\r\n\t\t\t\t\t\t</time>\r\r\n\t\t\t\t\t</a>\r\r\n\t\t\t\t\t<?php edit_comment_link( __( '| Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t\t\t\t</div><!-- .comment-metadata -->\r\r\n\r\r\n\t\t\t\t</div><!-- .comment-author -->\r\r\n\r\r\n\t\t\t\t<div class=\"comment-content\">\r\r\n\t\t\t\t\t<?php comment_text(); ?>\r\r\n\t\t\t\t</div><!-- .comment-content -->\t\t\t\t\r\r\n\r\r\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'gravit' ); ?></p>\r\r\n\t\t\t\t<?php endif; ?>\r\r\n\t\t\t</footer><!-- .comment-meta -->\t\t\t\r\r\n\r\r\n\t\t\t<?php\r\r\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\r\n\t\t\t\t\t'add_below' => 'div-comment',\r\r\n\t\t\t\t\t'depth' => $depth,\r\r\n\t\t\t\t\t'max_depth' => $args['max_depth'],\r\r\n\t\t\t\t\t'before' => '<div class=\"reply\">',\r\r\n\t\t\t\t\t'after' => '</div>',\r\r\n\t\t\t\t) ) );\r\r\n\t\t\t?>\r\r\n\r\r\n\t\t</article><!-- .comment-body -->\r\r\n\t<?php\r\r\n\tendif;\r\r\n}", "function starter_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', 'starter' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'starter' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'starter' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'starter' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t</footer><!-- .comment-meta -->\n\n\t\t\t<div class=\"comment-content\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t</div><!-- .comment-content -->\n\n\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t'after' => '</div>',\n\t\t\t\t) ) );\n\t\t\t?>\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "function comment_placeholder($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <article class=\"cf\">\n <header class=\"comment-author\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=48&d=mm&r=g\" class=\"load-gravatar avatar avatar-48 photo\" height=\"48\" width=\"48\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite>', 'bonestheme' ), get_comment_author_link() ) ?>\n <span class=\"comment-meta-divide\">·</span>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\">\n <a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time('j F Y \\a\\l\\l\\e h:m'); ?></a>\n </time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n <?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ',''); ?>\n </article><?php\n}", "function adelle_theme_comment_style($comment, $args, $depth) {\r\n$GLOBALS['comment'] = $comment; ?>\r\n<li <?php comment_class(); ?>>\r\n <article class=\"comment-content\" id=\"comment-<?php comment_ID(); ?>\">\r\n <div class=\"comment-meta\">\r\n <?php echo get_avatar($comment, $size = '32' ); ?>\r\n <?php printf(__( '<h6>%s</h6>', 'adelle-theme' ), get_comment_author_link()) ?>\r\n <small><?php printf( __( '%1$s at %2$s', 'adelle-theme' ), get_comment_date(), get_comment_time()) ?> (<?php printf( __( '%s', 'adelle-theme' ), adelle_theme_time_ago() ) ?>)</small>\r\n </div>\r\n <?php if ($comment->comment_approved == '0' ) : ?><em><?php _e( 'Your comment is awaiting moderation.', 'adelle-theme' ) ?></em><br /><?php endif; ?>\r\n <?php comment_text() ?>\r\n <?php comment_reply_link(array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\r\n </article>\r\n<?php }", "function tcf_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('media'); ?>>\n <div class=\"media-left\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php echo get_avatar($comment,40); ?>\n\n </div>\n <div class=\"media-body\">\n\t <?php if ($comment->comment_approved == '0') : ?>\n\t <div class=\"alert alert-info\">\n\t <p><?php _e( 'Your comment is awaiting moderation.') ?></p>\n\t </div>\n\t <?php endif; ?>\n\t <div class=\"comment_content\">\n\t <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s'), get_comment_author_link(), edit_comment_link(__( '(Edit)'),' ','') ) ?>\n\t <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y')); ?> </a></time>\n\t <?php comment_text() ?>\n\t </div>\n\t\t <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function my_custom_comment( $comment, $args, $depth ) {\n\t\n\t$GLOBALS['comment'] = $comment;\n\n\t// Display trackbacks differently than normal comments.\n\tswitch ( $comment->comment_type ) :\n\n\n\t\t// pingback or trackback\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t?>\n\t\t\n\t\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t<p>Pingback: <?php comment_author_link(); ?></p>\n\t\t<?php\n\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t// normal comment\n\t\tdefault :\n\t\tglobal $post;\n\t\t?>\n\t\t\n\t\t<li id=\"li-comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\t\n\t\t\t<section id=\"comment-<?php comment_ID(); ?>\" class=\"row\">\n\t\t\t\n\t\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"avatar\"><?php echo get_avatar( $comment, 60 ); ?></div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"meta comment-meta\">\n\t\n\t\t\t\t\t\t<p class=\"name\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tprintf( '<b class=\"fn\">%1$s</b> %2$s', get_comment_author_link(),\n\t\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>Post author</span>' : '' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</p>\n\t\n\t\t\t\t\t\t<p class=\"time\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( '%1$s at %2$s', get_comment_date( 'm/d/y' ), get_comment_time() ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</p>\n\t\n\t\t\t\t\t\t<?php edit_comment_link( 'Edit comment', '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t\t\t\n\t\t\t\t\t</div><!-- meta -->\n\t\t\t\t</header><!-- comment-author -->\n\t\t\t\t\n\t\t\t\t<article class=\"comment-content content\">\n\t\t\t\t\n\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( '0' == $comment->comment_approved ) echo( '<p class=\"comment-awaiting-moderation\">Your comment is awaiting moderation.</p>' );\n\t\n\t\t\t\t\t\tcomment_text();\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<p class=\"reply-link\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => 'Reply', 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t\t\t\n\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t</article><!-- .comment-content -->\n\t\n\t\n\t\t\t</section><!-- #comment-## -->\n\t\t\n\t\t<?php\n\t\tbreak;\n\t\t\n\tendswitch; // end comment_type check\n\t\n}", "function render_block_core_comment_template($attributes, $content, $block)\n {\n }", "function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}", "function tempera_list_comments() {\t\n\t\t\t\t\twp_list_comments( array( 'callback' => 'tempera_comment' ) );\n\t\t\t}", "function twentytwelve_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n switch ($comment->comment_type) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e('Pingback:', 'twentytwelve'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'twentytwelve'), '<span class=\"edit-link\">', '</span>'); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?php\n echo get_avatar($comment, 44);\n printf('<cite class=\"fn\">%1$s %2$s</cite>', get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span> ' . __('Post author', 'twentytwelve') . '</span>' : ''\n );\n printf('<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'),\n /* translators: 1: date, 2: time */ sprintf(__('%1$s at %2$s', 'twentytwelve'), get_comment_date(), get_comment_time())\n );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ('0' == $comment->comment_approved) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.', 'twentytwelve'); ?></p>\n <?php endif; ?>\n\n <section class=\"comment-content comment\">\n <?php comment_text(); ?>\n <?php edit_comment_link(__('Edit', 'twentytwelve'), '<p class=\"edit-link\">', '</p>'); ?>\n </section><!-- .comment-content -->\n\n <div class=\"reply\">\n <?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'twentytwelve'), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n }", "function phptemplate_preprocess_comment_wrapper(&$vars) {\r\n $vars['display_mode'] = COMMENT_MODE_FLAT_EXPANDED;\r\n $vars['display_order'] = COMMENT_ORDER_OLDEST_FIRST;\r\n $vars['comment_controls_state'] = COMMENT_CONTROLS_HIDDEN;\r\n}", "function tempera_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback: ', 'tempera' ); ?><?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'tempera'), ' ' ); ?></p>\n\t<?php\n\t\tbreak;\n\t\tcase '' :\n\t\tdefault : \n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author vcard\">\n\t\t\t<?php echo \"<div class='avatar-container' >\".get_avatar( $comment, 60 ).\"</div>\"; ?>\n\t\t\t<div class=\"comment-details\">\n\t\t\t\t<?php printf( '%s ', sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t<div class=\"comment-meta commentmetadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t<?php /* translators: 1: date, 2: time */\n\t\t\t\t\tprintf( '%1$s '.__('at', 'tempera' ).' %2$s', get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'tempera' ), ' ' );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta .commentmetadata -->\n\t\t\t</div> <!-- .comment-details -->\n\t\t</div><!-- .comment-author .vcard -->\n\t\t\n\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<span class=\"comment-await\"><em><?php _e( 'Your comment is awaiting moderation.', 'tempera' ); ?></em></span>\n\t\t\t<br />\n\t\t<?php endif; ?>\n\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?>\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => '<i class=\"icon-reply\"></i>'.__('Reply','tempera'), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</div>\n\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "function comment_theme($comment, $args, $depth) {\n if ( 'div' === $args['style'] ) {\n $tag = 'div';\n $add_below = 'comment';\n } else {\n $tag = 'li';\n $add_below = 'div-comment';\n }\n ?>\n <<?php echo $tag ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ) ?> id=\"comment-<?php comment_ID() ?>\">\n <?php if ( 'div' != $args['style'] ) : ?>\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n <?php endif; ?>\n <div class=\"comment-author vcard\">\n <div class=\"round_avatar\">\n <?php if ( $args['avatar_size'] != 0 ) echo get_avatar( $comment, $args['avatar_size'] ); ?></div>\n <?php printf( __( '<cite class=\"fn\">%s</cite>' ), get_comment_author_link() ); ?>\n \n </div>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.' ); ?></em>\n <br />\n <?php endif; ?>\n \n\n <div class=\"comment-meta commentmetadata\">\n <h4>&#8226;</h4>\n <a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ); ?>\">\n <?php\n \n $d = \"d.m.y\";\n /* translators: 1: date, 2: time */\n printf( __(' %1$s'), get_comment_date( $d, $comment_ID )); ?></a>\n <?php edit_comment_link( __( '(Edit)' ), ' ', '' );\n ?>\n </div>\n\n <?php comment_text(); ?>\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n <?php if ( 'div' != $args['style'] ) : ?>\n </div>\n <?php endif; ?>\n <?php\n }", "function custom_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n $GLOBALS['comment_depth'] = $depth;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author vcard\"><?php commenter_link() ?></div>\n <div class=\"comment-meta\"><?php printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'Foundation'),\n get_comment_date(),\n get_comment_time(),\n '#comment-' . get_comment_ID() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n <?php // echo the comment reply link\n if($args['type'] == 'all' || get_comment_type() == 'comment') :\n comment_reply_link(array_merge($args, array(\n 'reply_text' => __('Reply','Foundation'),\n 'login_text' => __('Log in to reply.','Foundation'),\n 'depth' => $depth,\n 'before' => '<div class=\"comment-reply-link\">',\n 'after' => '</div>'\n )));\n endif;\n ?>\n<?php }", "function starkers_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; \n\t?>\n\t<?php if ( $comment->comment_approved == '1' ): ?>\t\n\t<li>\n\t\t<article id=\"comment-<?php comment_ID() ?>\">\n\t\t\t<?php echo get_avatar( $comment ); ?>\n\t\t\t<h4><?php comment_author_link() ?></h4>\n\t\t\t<time><a href=\"#comment-<?php comment_ID() ?>\" pubdate><?php comment_date() ?> at <?php comment_time() ?></a></time>\n\t\t\t<?php comment_text() ?>\n\t\t</article>\n\t<?php endif; ?>\n\t</li>\n\t<?php \n}", "function custom_comments($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n\t $GLOBALS['comment_depth'] = $depth;\n\t ?>\n\t <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n\t <div class=\"comment-author vcard\"><img src=\"<?php echo get_template_directory_uri(); ?>/img/comments-icon.png\" alt=\"comments\" /> <strong><em>By <?php commenter_link() ?></em></strong>: <?php echo $comment->comment_content; ?></div>\n\t\t\t<div class=\"spacer\"></div>\n\t <!--<div class=\"comment-meta\"><?php //printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'hbd-theme'),\n\t // get_comment_date(),\n\t // get_comment_time(),\n\t // '#comment-' . get_comment_ID() );\n\t // edit_comment_link(__('Edit', 'hbd-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n\t\t\t\t\t\t\n\t\t\t\t-->\n\t <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'hbd-theme') ?>\n\t <!-- <div class=\"comment-content\">\n\t \n\t </div> -->\n\t <?php // echo the comment reply link\n\t //if($args['type'] == 'all' || get_comment_type() == 'comment') :\n\t // comment_reply_link(array_merge($args, array(\n\t // 'reply_text' => __('Reply','hbd-theme'),\n\t // 'login_text' => __('Log in to reply.','hbd-theme'),\n\t // 'depth' => $depth,\n\t // 'before' => '<div class=\"comment-reply-link\">',\n\t // 'after' => '</div>'\n\t // )));\n\t //endif;\n\t ?>\n\t<?php }", "function register_block_core_comment_content()\n {\n }", "function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }", "function cellar_door_preprocess_comment(&$vars) {\n /*$comment = $vars['elements']['#comment'];\n $vars['picture'] = theme('user_picture', array('account' => $comment));*/\n}", "function flawless_comment( $comment, $args, $depth ) {\r\n $GLOBALS[ 'comment' ] = $comment;\r\n switch ( $comment->comment_type ) :\r\n case '' :\r\n ?>\r\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\" data-comment_id=\"<?php comment_ID(); ?>\">\r\n <?php echo get_avatar( $comment, 80 ); ?>\r\n\r\n <div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-content\">\r\n <div class=\"comment-author vcard\">\r\n\r\n <?php printf( __( '%s', 'flawless' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\r\n <span class=\"comment-meta commentmetadata\"><a\r\n href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\n <?php\r\n /* translators: 1: date, 2: time */\r\n printf( __( '%1$s at %2$s', 'flawless' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '( Edit )', 'flawless' ), ' ' );\r\n ?>\r\n\r\n <span class=\"reply\">\r\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?>\r\n </span><!-- .reply -->\r\n </span><!-- .comment-meta .commentmetadata -->\r\n </div>\r\n <!-- .comment-author .vcard -->\r\n <?php if ( $comment->comment_approved == '0' ) : ?>\r\n <em><?php _e( 'Your comment is awaiting moderation.', 'flawless' ); ?></em>\r\n <br/>\r\n <?php endif; ?>\r\n\r\n <div class=\"comment-body\"><?php comment_text(); ?></div>\r\n </div><!-- #comment-## -->\r\n\r\n <?php\r\n break;\r\n case 'pingback' :\r\n case 'trackback' :\r\n ?>\r\n <li class=\"post pingback\">\r\n <p><?php _e( 'Pingback:', 'flawless' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '( Edit )', 'flawless' ), ' ' ); ?></p>\r\n <?php\r\n break;\r\n endswitch;\r\n }", "function tempera_comments_off() { \nif ( ! comments_open() ) : ?>\n\t<p class=\"nocomments\"><?php _e( 'Comments are closed.', 'tempera' ); ?></p>\n<?php endif; // end ! comments_open() \n}", "function td_comment( $comment, $args, $depth ) {\r\n $GLOBALS['comment'] = $comment;\r\n\r\n $td_isPingTrackbackClass = '';\r\n\r\n if($comment->comment_type == 'pingback') {\r\n $td_isPingTrackbackClass = 'pingback';\r\n }\r\n\r\n if($comment->comment_type == 'trackback') {\r\n $td_isPingTrackbackClass = 'trackback';\r\n }\r\n\r\n if (!empty($comment->comment_author_email)) {\r\n $td_comment_auth_email = $comment->comment_author_email;\r\n } else {\r\n $td_comment_auth_email = '';\r\n }\r\n\r\n $td_article_date_unix = @strtotime(\"{$comment->comment_date_gmt} GMT\");\r\n //print_r($td_article_date_unix);\r\n\r\n\r\n\t?>\r\n <li class=\"comment <?php echo $td_isPingTrackbackClass ?>\" id=\"comment-<?php comment_ID() ?>\">\r\n\t\t\t<article>\r\n\t <footer>\r\n <?php\r\n\t //echo get_template_directory_uri() . \"/images/avatar.jpg\";\r\n\t //echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . \"/images/avatar.jpg\");\r\n\t echo get_avatar($td_comment_auth_email, 50);\r\n ?>\r\n <cite><?php comment_author_link() ?></cite>\r\n\r\n <a class=\"comment-link\" href=\"#comment-<?php comment_ID() ?>\">\r\n <time pubdate=\"<?php echo $td_article_date_unix ?>\"><?php comment_date() ?> at <?php comment_time() ?></time>\r\n </a>\r\n </footer>\r\n\r\n <div class=\"comment-content\">\r\n <?php if ($comment->comment_approved == '0') { ?>\r\n <em><?php echo __td('Your comment is awaiting moderation', TD_THEME_NAME); ?></em>\r\n <?php }\r\n comment_text(); ?>\r\n </div>\r\n\r\n\t <div class=\"comment-meta\" id=\"comment-<?php comment_ID() ?>\">\r\n <?php comment_reply_link(array_merge( $args, array(\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'reply_text' => __td('Reply', TD_THEME_NAME),\r\n 'login_text' => __td('Log in to leave a comment', TD_THEME_NAME)\r\n )))\r\n ?>\r\n </div>\r\n </article>\r\n <?php\r\n\r\n}", "function hybrid_comments_callback( $comment, $args, $depth ) {\n\tglobal $hybrid;\n\t$GLOBALS['comment'] = $comment;\n\t$GLOBALS['comment_depth'] = $depth;\n\n\t/* Get the comment type of the current comment. */\n\t$comment_type = get_comment_type( $comment->comment_ID );\n\n\t/* Create an empty array if the comment template array is not set. */\n\tif ( !isset( $hybrid->comment_template) || !is_array( $hybrid->comment_template ) )\n\t\t$hybrid->comment_template = array();\n\n\t/* Check if a template has been provided for the specific comment type. If not, get the template. */\n\tif ( !isset( $hybrid->comment_template[$comment_type] ) ) {\n\n\t\t/* Create an array of template files to look for. */\n\t\t$templates = array( \"comment-{$comment_type}.php\" );\n\n\t\t/* If the comment type is a 'pingback' or 'trackback', allow the use of 'comment-ping.php'. */\n\t\tif ( 'pingback' == $comment_type || 'trackback' == $comment_type )\n\t\t\t$templates[] = 'comment-ping.php';\n\n\t\t/* Add the fallback 'comment.php' template. */\n\t\t$templates[] = 'comment.php';\n\n\t\t/* Locate the comment template. */\n\t\t$template = locate_template( $templates );\n\n\t\t/* Set the template in the comment template array. */\n\t\t$hybrid->comment_template[ $comment_type ] = $template;\n\t}\n\n\t/* If a template was found, load the template. */\n\tif ( !empty( $hybrid->comment_template[ $comment_type ] ) )\n\t\trequire( $hybrid->comment_template[ $comment_type ] );\n}", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function custom_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n $GLOBALS['comment_depth'] = $depth;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n \n \t\t<div class=\"comment-left\">\n \n <?php echo get_avatar(get_comment_author_email(), 48); ?>\n \n </div><!-- .comment-left (end) -->\n\t\t\t\t<div class=\"comment-right\">\n\t\t\t\t\t<div class=\"comment-right-inner\">\n \n \t<p style=\"margin-top: 0;\">\n \t<span class=\"name\"><?php comment_author_link(); ?></span><br />\n\t <span class=\"smaller date\"><?php echo time_ago('comment'); ?></span>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p style=\"margin-bottom: 0;\">\n \t\n \t<?php // echo the comment reply link\n\t\t\t if($args['type'] == 'all' || get_comment_type() == 'comment') :\n\t\t\t comment_reply_link(array_merge($args, array(\n\t\t\t 'reply_text' => __('Reply','themeblvd'),\n\t\t\t 'login_text' => __('Log in to reply.','themeblvd'),\n\t\t\t 'depth' => $depth,\n\t\t\t 'before' => '<span class=\"reply-link>', \n\t\t\t 'after' => '</span>'\n\t\t\t )));\n\t\t\t endif;\n\t\t\t ?>\n \t\n \t</span>\n </p>\n \n </div><!-- .comment-right-inner (end) -->\n </div><!-- .comment-right (end) -->\n\t\t\t\t\n <div class=\"clear\"></div>\n<?php }", "function theme_render_comment($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t <div class=\"comment-author vcard\">\n\t\t <?php echo get_avatar($comment, 48); ?>\n\t\t <?php comment_author_link() ?>\n\t\t <span class=\"says\">says:</span>\n\t\t </div>\n\t\t <?php if ($comment->comment_approved == '0') : ?>\n\t\t <em class=\"moderation-notice\"><?php _e('Your comment is awaiting moderation.') ?></em><br />\n\t\t <?php endif; ?>\n\t\t\n\t\t <div class=\"comment-meta\">\n\t\t \t<a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\">\n\t\t \t\t<?php comment_date() ?> at <?php comment_time() ?>\n\t\t \t</a>\n\t\t \t<?php edit_comment_link(__('(Edit)'),' ','') ?>\n\t \t</div>\n\t\t\t\n\t\t\t<div class=\"comment-text\">\n\t\t \t<?php comment_text() ?>\n\t\t </div>\n\t\n\t\t <div class=\"comment-reply\">\n\t\t <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t </div>\n\t\t</div>\n\t<?php\n}", "function custom_comments($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n\t $GLOBALS['comment_depth'] = $depth;\n\t ?>\n\t <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n\t <div class=\"comment-author vcard\"><?php commenter_link() ?></div>\n\t <div class=\"comment-meta\"><?php printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'tif-wordpress'),\n\t get_comment_date(),\n\t get_comment_time(),\n\t '#comment-' . get_comment_ID() );\n\t edit_comment_link(__('Edit', 'tif-wordpress'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n\t <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'tif-wordpress') ?>\n\t <div class=\"comment-content\">\n\t <?php comment_text() ?>\n\t </div>\n\t <?php // echo the comment reply link\n\t if($args['type'] == 'all' || get_comment_type() == 'comment') :\n\t comment_reply_link(array_merge($args, array(\n\t 'reply_text' => __('Reply','tif-wordpress'),\n\t 'login_text' => __('Log in to reply.','tif-wordpress'),\n\t 'depth' => $depth,\n\t 'before' => '<div class=\"comment-reply-link\">',\n\t 'after' => '</div>'\n\t )));\n\t endif;\n\t ?>\n\t<?php }", "function get_default_comment_status($post_type = 'post', $comment_type = 'comment')\n {\n }", "public function the_comment()\n {\n }", "function bst_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n extract($args, EXTR_SKIP);\n if ( 'div' == $args['style'] ) {\n $tag = 'div';\n $add_below = 'comment';\n } else {\n $tag = 'li';\n $add_below = 'div-comment';\n }\n?>\n<<?php echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id=\"comment-<?php comment_ID() ?>\">\n <?php if ( 'div' != $args['style'] ) : ?>\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n <?php endif; ?>\n <div class=\"comment-author vcard\">\n <ul> \n <li>by <?php comment_author(); ?> - <?php printf( __('%1$s'), get_comment_date()) ?></li>\n <li><?php $commentrating = get_comment_meta(get_comment_ID(), 'rating', true ); echo '<img src=\"'. get_site_url() .'/wp-content/themes/socrata-app-marketplace/images/'. $commentrating . 'star.png\"/>'; ?></li>\n </ul>\n <?php if ($comment->comment_approved == '0') : ?>\n <p class='alert alert-info'><em class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.') ?></em></p>\n <?php endif; ?>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <?php $commenttitle = get_comment_meta(get_comment_ID(), 'title', true ); echo '<h4>' . esc_attr( $commenttitle ) . '</h4>'; ?>\n \t<?php comment_text() ?>\n </div> \n </div>\n <div class=\"reply\">\n <?php edit_comment_link(__('<p class=\"text-right\"><span class=\"btn btn-default btn-info\">Edit</span></p>'),' ','' );\t?>\n </div>\n <?php if ( 'div' != $args['style'] ) : ?>\n </div>\n <?php endif; ?>\n<?php }", "function tz_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }", "function ivan_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\n\t\t<div class=\"comment-body\">\r\n\t\t\t<?php _e( 'Pingback:', 'ivan_domain' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t</div>\r\n\r\n\t<?php else : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\n\t\t\t<div class=\"row\">\r\n\r\n\t\t\t\t<div class=\"comment-avatar-holder\">\r\n\t\t\t\t\t<?php echo get_avatar( $comment, 100 ); ?>\r\n\t\t\t\t\t<?php if(get_the_author_meta('ID') == $comment->user_id) : ?>\r\n\t\t\t\t\t<span class=\"author-tag hidden-xs\"><?php _e(\"Author\", 'ivan_domain'); ?></span>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"comment-content-holder\">\r\n\r\n\t\t\t\t\t<footer class=\"comment-meta\">\r\n\t\t\t\t\t\t<div class=\"comment-author vcard\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<?php printf( __( '%s', 'ivan_domain' ), sprintf( '<h5 class=\"fn\">%s</h5>', get_comment_author_link() ) ); ?>\r\n\r\n\t\t\t\t\t\t\t<div class=\"comment-date\">\r\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\" class=\"comment-time\">\r\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\n\t\t\t\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'ivan_domain' ), get_comment_date(), get_comment_time() ); ?>\r\n\t\t\t\t\t\t\t\t\t</time>\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t</div><!-- .comment-author -->\r\n\r\n\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'ivan_domain' ); ?></p>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</footer><!-- .comment-meta -->\r\n\r\n\t\t\t\t\t<div class=\"comment-content\">\r\n\t\t\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t\t\t</div><!-- .comment-content -->\r\n\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\n\t\t\t\t\t\t\t'add_below' => 'div-comment',\r\n\t\t\t\t\t\t\t'depth'\t => $depth,\r\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\r\n\t\t\t\t\t\t\t'before'\t=> '<div class=\"reply\">',\r\n\t\t\t\t\t\t\t'after'\t => '</div>',\r\n\t\t\t\t\t\t\t'reply_text'=> __('Reply', 'ivan_domain'),\r\n\t\t\t\t\t\t) ) );\r\n\t\t\t\t\t?>\r\n\r\n\t\t\t\t</div><!-- .col-md-# -->\r\n\t\t\t\t<div class=\"clearfix\"></div>\r\n\t\t\t</div><!-- .row -->\r\n\t\t</article><!-- .comment-body -->\r\n\r\n\t<?php\r\n\tendif;\r\n}", "function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}", "function calvero_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li class=\"post pingback\">\n <p><?php _e( 'Pingback:', 'calvero' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'calvero' ), ' ' ); ?></p>\n <?php\n break;\n default :\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <footer>\n <div class=\"comment-author vcard\">\n <?php echo get_avatar( $comment, 40 ); ?>\n <?php printf( __( '%s <span class=\"says\">says:</span>', 'calvero' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n </div><!-- .comment-author .vcard -->\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'calvero' ); ?></em>\n <br />\n <?php endif; ?>\n \n <div class=\"comment-meta commentmetadata\">\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time pubdate datetime=\"<?php comment_time( 'c' ); ?>\">\n <?php\n /* translators: 1: date, 2: time */\n printf( __( '%1$s at %2$s', 'calvero' ), get_comment_date(), get_comment_time() ); ?>\n </time></a>\n <?php edit_comment_link( __( '(Edit)', 'calvero' ), ' ' );\n ?>\n </div><!-- .comment-meta .commentmetadata -->\n </footer>\n \n <div class=\"comment-content\"><?php comment_text(); ?></div>\n \n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n \n <?php\n break;\n endswitch;\n}", "function labs_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n<li class=\"post pingback\">\n <p>\n <?php _e( 'Pingback:', 'labs' ); ?>\n <?php comment_author_link(); ?>\n <?php edit_comment_link( __( 'Edit', 'labs' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </p>\n <?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <div class=\"comment-meta\">\n <div class=\"comment-author vcard\">\n <?php\n\t\t\t\t\t\t$avatar_size = 32;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 32;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s | %2$s <span class=\"says\">said:</span>', 'labs' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'Y-m-d' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'labs' ), get_comment_date('Y-m-d'), get_comment_time('G:i') )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n <?php edit_comment_link( __( 'Edit', 'labs' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </div>\n <!-- .comment-author .vcard -->\n \n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\">\n <?php _e( 'Your comment is awaiting moderation.', 'labs' ); ?>\n </em> <br />\n <?php endif; ?>\n </div>\n <!-- .comment-meta -->\n \n <div class=\"comment-content\">\n <?php comment_text(); ?>\n </div>\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'labs' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n <!-- .reply --> \n </article>\n <!-- #comment-## -->\n \n <?php\n\t\t\tbreak;\n\tendswitch;\n}", "function register_legacy_post_comments_block()\n {\n }", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function bones_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"help\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t\t\t// Display trackbacks differently than normal comments.\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Proceed with normal comments.\n\t\t\t\tglobal $post;\n\t\t?>\n\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t\t?>\n\t\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t\t</section><!-- .comment-content -->\n\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link(\n\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t'reply_text' => __( 'Reply', 'twentytwelve' ),\n\t\t\t\t\t\t\t'after' => ' <span>&darr;</span>',\n\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n?>\n\t\t\t\t</div><!-- .reply -->\n\t\t\t</article><!-- #comment-## -->\n\t\t<?php\n\t\t\t\tbreak;\n\t\tendswitch; // end comment_type check\n\t}", "function animo_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li <?php comment_class('comment'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div class=\"media-body\"><?php _e( 'Pingback:', 'animo' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'animo' ), ' ' ); ?></div>\n </li>\n <?php\n break;\n\n default :\n $class = array('comment_wrap');\n if ($depth > 1) {\n $class[] = 'chaild';\n }\n ?>\n <!-- Comment Item -->\n <li <?php comment_class('comment'); ?> id=\"comment-<?php comment_ID(); ?>\">\n\n <div class=\"comment-body\">\n <figure class=\"comment-avatar\">\n <?php echo get_avatar( $comment, 45 ); ?>\n </figure>\n\n <div class=\"comment-content\">\n <div class=\"comment-meta\">\n <h6><?php comment_author_link();?></h6>\n <time><?php echo comment_date(get_option('date_format')) ?>, <?php echo comment_date(get_option('time_format')) ?></time>\n </div>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'animo' ); ?></em>\n <?php endif; ?>\n <?php comment_text(); ?>\n\n <div class=\"comment-rate\">\n <a href=\"#\" class=\"up\"><i class=\"fa fa-angle-up\"></i></a>\n <a href=\"#\" class=\"down\"><i class=\"fa fa-angle-down\"></i></a>\n </div>\n <?php $reply = get_comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => 2 ) ) );\n if (!empty($reply)): ?>\n <?php echo wp_kses_post($reply); ?>\n <?php endif;\n edit_comment_link( __( 'Edit', 'animo' ), '', '' );\n ?>\n\n <!--share comment-->\n\n </div>\n </div>\n <?php\n break;\n endswitch;\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function cosmetics_comments( $cosmetics_comment, $cosmetics_comment_args, $cosmetics_comment_depth ) {\n\n if ( 'div' === $cosmetics_comment_args['style'] ) :\n\n $cosmetics_comment_tag = 'div';\n $cosmetics_comment_add_below = 'comment';\n\n else :\n\n $cosmetics_comment_tag = 'li';\n $cosmetics_comment_add_below = 'div-comment';\n\n endif;\n\n?>\n <<?php echo $cosmetics_comment_tag ?> <?php comment_class( empty( $cosmetics_comment_args['has_children'] ) ? '' : 'parent' ) ?> id=\"comment-<?php comment_ID() ?>\">\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n\n <?php endif; ?>\n\n <div class=\"comment-author vcard\">\n <?php if ( $cosmetics_comment_args['avatar_size'] != 0 ) echo get_avatar( $cosmetics_comment, $cosmetics_comment_args['avatar_size'] ); ?>\n\n </div>\n\n <?php if ( $cosmetics_comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\">\n <?php esc_html_e( 'Your comment is awaiting moderation.', 'cosmetics' ); ?>\n </em>\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\">\n <div class=\"comment-meta-box\">\n <span class=\"name\">\n <?php comment_author_link(); ?>\n </span>\n <span class=\"comment-metadata\">\n <?php comment_date(); ?>\n </span>\n\n <?php edit_comment_link( esc_html__( 'Edit ', 'cosmetics' ) ); ?>\n\n <?php comment_reply_link( array_merge( $cosmetics_comment_args, array( 'add_below' => $cosmetics_comment_add_below, 'depth' => $cosmetics_comment_depth, 'max_depth' => $cosmetics_comment_args['max_depth'] ) ) ); ?>\n\n </div>\n <div class=\"comment-text-box\">\n <?php comment_text(); ?>\n </div>\n </div>\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n </div>\n <?php endif; ?>\n\n<?php\n}", "function newrico_comment($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n?>\n \t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n \t<article id=\"comment-<?php comment_ID(); ?>\">\n\t \t\t<?php echo get_avatar( $comment, 80 ); ?>\n \t <p class=\"who-wrote\"><?php echo get_comment_author_link(); ?> wrote</p>\n \t\t<div class=\"comment-container\">\n \t\t\t<?php if ($comment->comment_approved == '0'): ?>\n \t\t\t<p><em>Your comment is awaiting moderation.</em></p>\n \t\t\t<?php endif; ?>\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t</div>\n \t\t<footer>\n \t \t<p class=\"post-meta\"><?php printf(__('%1$s'), get_comment_date('F jS, Y'), get_comment_time()) ?></p>\n\t \t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n\t \t<?php edit_comment_link('edit comment',' ',''); ?>\n \t\t</footer>\n \t</article>\n\t<?php\n\t// The trailing </li> is intentionally ommitted\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentytwelve' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function twentytwelve_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t<?php endif; ?>\n\n\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t\t</section><!-- .comment-content -->\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "function list_pings($comment, $args, $depth) {\r\n\r\n\t$GLOBALS['comment'] = $comment; ?>\r\n\t\r\n\t<li id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<span class=\"author\"><?php comment_author_link(); ?></span> - \r\n\t\t<span class=\"date\"><?php echo get_comment_date() ?></span>\r\n\t\t<span class=\"pingcontent\"><?php comment_text() ?></span>\r\n\r\n<?php \r\n}", "public function comments_template_loader( $template ) {\n\n\t\t// Bail if not viewing a product\n\t\tif ( get_post_type() !== 'product' ) {\n\t\t\treturn $template;\n\t\t}\n\n\t\t// The WooCommerce template path within the theme\n\t\t$template_path = WC()->template_path();\n\n\t\t// Our custom comments template name\n\t\t$template_name = 'single-product/contributions.php';\n\n\t\t// Look within the theme first\n\t\t$template = locate_template(\n\t\t\tarray(\n\t\t\t\ttrailingslashit( $template_path ) . $template_name,\n\t\t\t\t$template_name,\n\t\t\t)\n\t\t);\n\n\t\t// If nothing was found in the theme, look in the plugin\n \t\tif ( ! $template ) {\n\n \t\t\t// Set the path to our templates directory\n \t\t\t$plugin_path = wc_product_reviews_pro()->get_plugin_path() . '/templates/';\n\n \t\t\t// If a template is found, make it so\n \t\t\tif ( is_readable( $plugin_path . $template_name ) ) {\n \t\t\t\t$template = $plugin_path . $template_name;\n \t\t\t}\n \t\t}\n\n\t\treturn $template;\n\t}", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'your-theme'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'your-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function mpcth_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\r\n\tif(get_comment_author_email() == get_the_author_meta('email')){\r\n\t\t$author = \"comment_author\";\r\n\t} else {\r\n\t\t$author =\"\";\r\n\t}\r\n\r\n\tswitch ( $comment->comment_type ) :\r\n\t\tcase 'pingback' :\r\n\t\tcase 'trackback' :\r\n\t\t// Display trackbacks differently than normal comments.\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<p><?php _e('Pingback:', 'mpcth'); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __('(Edit)', 'mpcth'), '<span class=\"edit-link\">', '</span>' ); ?></p>\r\n\t<?php\r\n\t\t\tbreak;\r\n\t\tdefault :\r\n\r\n\t\t// Proceed with normal comments.\r\n\t\tglobal $post;\r\n\t?>\r\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\r\n\t\t\t<header class=\"comment-meta comment-author vcard\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\techo get_avatar( $comment, 80 );\r\n\t\t\t\t\tprintf('<cite>%1$s </cite>',\r\n\t\t\t\t\t\tget_comment_author_link(),\r\n\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\r\n\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __('Post author', 'mpcth') . '</span>' : ''\r\n\t\t\t\t\t);\r\n\t\t\t\t\tprintf('- <a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\r\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\r\n\t\t\t\t\t\tget_comment_time( 'c' ),\r\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\r\n\t\t\t\t\t\tsprintf( __('%1$s at %2$s', 'mpcth'), get_comment_date(), get_comment_time() )\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tcomment_reply_link( array_merge( $args, array( 'reply_text' => __('reply', 'mpcth'), 'before' => ' - ', 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\r\n\r\n\t\t\t\t\techo (($author != \"\") ? ' - <span>' . __('author', 'mpcth') . '</span>' : '');\r\n\t\t\t\t\techo '<a class=\"comment-fold mpcth-sc-icon-up-open\" href=\"#\"></a>';\r\n\r\n\t\t\t\t?>\r\n\t\t\t</header><!-- .comment-meta -->\r\n\r\n\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.', 'mpcth'); ?></p>\r\n\t\t\t<?php endif; ?>\r\n\r\n\t\t\t<section class=\"comment-content comment\">\r\n\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t\t\r\n\t\t\t</section><!-- .comment-content -->\r\n\t\t</article><!-- #comment-## -->\r\n\t<?php\r\n\t\tbreak;\r\n\tendswitch; // end comment_type check\r\n}", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'flipblog'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'flipblog'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'Foundation'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function custom_comment($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\r\n <?php if (!$comment->comment_parent) { ?>\r\n <?php $GLOBALS['comment_r_count'] = 0; ?>\r\n \t<a name=\"comment-<?php comment_ID() ?>\"></a>\r\n\t<div class=\"comment_entry <?php comment_class(); ?>\" id=\"li-comment-<?php comment_ID() ?>\">\r\n\t\t<div class=\"comments_entry_top\"></div>\r\n\t\t<div class=\"comments_entry_middle\">\r\n\t\t\t<div class=\"user_info\">\r\n\t\t\t\t<p class=\"name\"><?php the_commenter_link() ?></p>\r\n\t\t\t\t<p class=\"entry_info\"><?php echo get_comment_date() ?></p>\r\n\t\t\t</div>\r\n\t\t\t<!-- .user_info -->\r\n\r\n\r\n<?php $reply_enable = get_option('thread_comments');\r\n \r\n if( $reply_enable == 1 ) { ?>\r\n\t\t\t<div class=\"add_a_comment\">\r\n\t\t\t\t<div class=\"older_articles\">\r\n\t\t\t\t\t<div class=\"button_left\"></div>\r\n\t\t\t\t\t<div class=\"button_middle\"><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></div>\r\n\t\t\t\t\t<div class=\"button_right\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<!-- .add_a_comment -->\r\n <?php }?>\r\n\r\n\r\n\t\t\t<div class=\"clear_container\"></div>\r\n\t <?php \r\n\t //$text =get_option('thread_comments');\r\n//print_r ($text); \r\n\t \r\n\t //print_r ($comment); ?>\r\n\t\t\t<?php comment_text() ?>\r\n\t\t\t<?php if ($comment->comment_approved == '0') { ?>\r\n\t\t\t\t<p class='unapproved'><?php _e('Your comment is awaiting moderation.', 'tfuse'); ?></p>\r\n\t\t\t<?php } ?>\r\n\r\n\t\t</div>\r\n\t\t<div class=\"comments_entry_bottom\"></div>\r\n\t</div>\r\n\t<br />\r\n\t<!-- .comment_entry -->\r\n\t\r\n <?php } else { ?>\r\n <?php $GLOBALS['comment_r_count'] ++; ?>\r\n\t\t<a name=\"comment-<?php comment_ID() ?>\"></a>\r\n\t\t<?php $stylesheet = explode( '-', get_option(PREFIX.\"_alt_stylesheet\") ); if($stylesheet[0]=='light') $logofolder = 'light'; else $logofolder = 'dark'; ?>\r\n\t\t<img class=\"reply_icon\" src=\"<?php echo get_bloginfo('template_directory').'/styles/'.$logofolder ?>/images/reply_icon.gif\" alt=\"\" />\r\n\t\t<div class=\"comment_entry reply\">\r\n\t\t\t<div class=\"reply_top\"></div>\r\n\t\t\t<div class=\"reply_middle\">\r\n\t\t\t\t<div class=\"user_info\">\r\n\t\t\t\t\t<p class=\"name\"><?php the_commenter_link() ?></p>\r\n\t\t\t\t\t<p class=\"entry_info\"><?php echo get_comment_date() ?></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- .user_info -->\r\n\t\t\t\t<div class=\"clear_container\"></div>\r\n\t\t \t\t\t<?php comment_text(); ?>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"reply_bottom\"></div>\r\n\t\t</div>\r\n\t\t<!-- .comment_entry -->\r\n\t\t<div class=\"clear_container\"></div>\r\n\t\t<br />\r\n <?php } ?>\r\n\t\t\r\n<?php \r\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function pelham_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <header class=\"comment-meta comment-author vcard\">\n <?php\n echo get_avatar( $comment, 44 );\n printf( '<cite class=\"fn\">%1$s %2$s</cite>',\n get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n );\n printf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n <?php endif; ?>\n\n <section class=\"comment-content comment\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class=\"edit-link\">', '</p>' ); ?>\n </section><!-- .comment-content -->\n\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div><!-- .reply -->\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n}", "function tcsn_comment( $comment, $args, $depth ) {\n$GLOBALS['comment'] = $comment; ?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n <div id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n <div class=\"comment-author vcard\">\n <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n </div>\n <?php printf( __( '<cite class=\"fn custom-fn\">%s</cite> <span class=\"says\">says:</span>' ), get_comment_author_link() ); ?>\n <div class=\"comment-meta comment-metadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n <?php\n\t\t/* translators: 1: date, 2: time */\n\t\tprintf( __( '%1$s at %2$s', 'tcsn_theme' ), get_comment_date(), get_comment_time() ); ?>\n </a>\n <?php edit_comment_link( __( '(Edit)', 'tcsn_theme' ), '&nbsp;&nbsp;', '' );\n\t?>\n <div class=\"reply\">\n <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </div>\n <div class=\"comment-text\">\n <?php comment_text() ?>\n </div>\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\">\n <?php _e( 'Your comment is awaiting moderation.', 'tcsn_theme' ) ?>\n </p>\n <?php endif; ?>\n </div>\n <?php\n}", "function multicultural_custom_comments($comment, $args, $depth)\r\n{\r\n $GLOBALS['comment'] = $comment;\r\n $GLOBALS['comment_depth'] = $depth;\r\n ?>\r\n\r\n\r\n <div>\r\n <ul class=\"comments-list no-bullet\" id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <li>\r\n <div class=\"position-relative\">\r\n <div>\r\n <div class=\"comment-image-wrapper\">\r\n <?php echo get_avatar($id_or_email, $size, $default, $alt, $args); ?>\r\n </div>\r\n </div>\r\n <div class=\"comment-content\" style=\"margin-left: 100px;\">\r\n <div class=\"multicultural-comments\"><?php comment_text() ?></div>\r\n <ul class=\"comments-option inline-list oslo-grey-font-color px-8-font no-margin\">\r\n <li style=\"margin: 0 5px !important;\">\r\n <?php // echo the comment reply link\r\n if ($args['type'] == 'all' || get_comment_type() == 'comment') :\r\n\r\n $extraclass = 'comment-reply display-inline-block-important';\r\n echo preg_replace(\r\n '/comment-reply-link/',\r\n 'comment-reply-link ' . $extraclass,\r\n get_comment_reply_link(array_merge($args, array(\r\n 'add_below' => $add_below,\r\n 'reply_text' => __('Reply', 'eti-theme'),\r\n 'login_text' => __('Log in to reply.', 'eti-theme'),\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth']\r\n ))),\r\n 1\r\n );\r\n endif;\r\n ?>\r\n\r\n </li>\r\n <!-- <li style=\"margin: 0 5px !important;\"><a href=\"#\"><i class=\"fa fa-share\"></i>&nbsp;Share</a></li> -->\r\n </ul>\r\n </div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n<?php }", "function bones_comments($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\t<li <?php comment_class(); ?>>\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\r\n\t\t\t<header class=\"comment-author vcard\">\r\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\r\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author()) ?>\r\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\r\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\r\n\t\t\t</header>\r\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\r\n \t\t\t<div class=\"help\">\r\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\r\n \t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<section class=\"comment_content clearfix\">\r\n\t\t\t\t<?php comment_text() ?>\r\n\t\t\t</section>\r\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\r\n\t\t</article>\r\n <!-- </li> is added by wordpress automatically -->\r\n<?php\r\n}", "public function render()\n\t{\n\t\t$this->prefix = 'comment';\n\n\t\t$comments = $this->model->getComments();\n\n\t\t$this->items = $comments;\n\n\t\t$user = JFactory::getUser();\n\t\t$this->canDeleteComments = $user->authorise('comment.delete', 'com_monitor');\n\t\t$this->canEditComments = $user->authorise('comment.edit', 'com_monitor');\n\t\t$this->canEditOwnComments = $user->authorise('comment.edit.own', 'com_monitor');\n\t\t$this->canEditIssues = $user->authorise('issue.edit', 'com_monitor');\n\t\t$this->canEditOwnIssues = $user->authorise('issue.edit.own', 'com_monitor');\n\t\t$this->canEditProjects = $user->authorise('project.edit', 'com_monitor');\n\n\t\t$this->setLayout('default');\n\n\t\t$this->addToolbar();\n\n\t\treturn parent::render();\n\t}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<!-- custom gravatar call -->\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<!-- end custom gravatar call -->\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<!-- </li> is added by WordPress automatically -->\n<?php\n}", "function cmsmasters_post_comments($template_type = 'page', $show = true) {\n\t$out = '';\n\t\n\t\n\tif (comments_open()) {\n\t\tif ($template_type == 'page') {\n\t\t\t$out = cmsmasters_comments('cmsmasters_post_comments');\n\t\t} elseif ($template_type == 'post') {\n\t\t\t$cmsmasters_option = cmsmasters_get_global_options();\n\t\t\t\n\t\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_blog_post_comment']) {\n\t\t\t\t$out = cmsmasters_comments('cmsmasters_post_comments');\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\tif ($show) {\n\t\techo $out;\n\t} else {\n\t\treturn $out;\n\t}\n}", "function the_comment()\n {\n }", "function quasar_alter_default_comment_form($defaults){\n\t$fields = array('author' => '<div class=\"large-4 columns\"><input name=\"author\" id=\"author\" class=\"comments-field inputs-class\" title=\"'.__('Name :','quasar').'\" type=\"text\" value=\"'.__('Name :','quasar').'\"></div>',\n\t\t\t\t\t'email' => '<div class=\"large-4 columns\"><input name=\"email\" id=\"email\" class=\"comments-field inputs-class\" style=\"margin-right:0px;\" title=\"'.__('Email :','quasar').'\" type=\"text\" value=\"'.__('Email :','quasar').'\"></div>',\n\t\t\t\t\t'url' => '<div class=\"large-4 columns\"><input name=\"url\" id=\"url\" class=\"comments-field inputs-class\" title=\"'.__('Website :','quasar').'\" type=\"text\" value=\"'.__('Website :','quasar').'\"></div>');\n\t\n\t$defaults['fields'] = apply_filters( 'comment_form_default_fields', $fields );\n\t$defaults['title_reply'] = '<div class=\"leave-a-comment large-12 columns\">'.__('Leave a Comment','quasar').'</div>';\n $defaults['comment_notes_before'] = '';\n $defaults['comment_notes_after'] = '';\n\t$defaults['comment_field'] = '<div class=\"large-12 columns\"><textarea class=\"comments-field inputs-class\" title=\"'.__('Your Message :','quasar').'\" name=\"comment\" id=\"comment\" cols=\"45\" rows=\"45\">'.__('Your Message :','quasar').'</textarea></div>';\n\t$defaults['id_submit'] = 'comments-submit';\n\n return $defaults;\n\t//apply_filters( 'comment_form_defaults', $defaults );\n}", "function bones_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t <?php /*\n\t\t\t this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t */ ?>\n\t\t\t <!-- custom gravatar call -->\n\t\t\t <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5($bgauthemail); ?>&s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t <!-- end custom gravatar call -->\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time('F jS, Y'); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"alert info\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix comment-container\">\n\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=64\" class=\"load-gravatar avatar avatar-48 photo\" height=\"64\" width=\"64\" src=\"<?php echo get_template_directory_uri(); ?>/images/favicon.png\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t</div>\n <div class=\"comment-content\">\n <?php printf(__( '<cite class=\"fn\">%s |</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n <?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n \t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t\t<div class=\"alert alert-info\">\n \t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n \t\t\t\t</div>\n \t\t\t<?php endif; ?>\n \t\t\t<section class=\"comment_content clearfix\">\n \t\t\t\t<?php comment_text() ?>\n \t\t\t</section>\n \t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </div> <!-- END comment-content -->\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function theme_comments_render_list($callback) {\n\t?>\n\t<?php if ( have_comments() ) : ?>\n\t\t<h3><?php comments_number('No Responses', 'One Response', '% Responses' );?></h3>\n\t\t<ol class=\"commentlist\">\n\t\t\t<?php wp_list_comments('callback=' . $callback); ?>\n\t\t</ol>\n\n\t\t<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>\n\t\t\t<div class=\"navigation\">\n\t\t\t\t<div class=\"alignleft\"><?php previous_comments_link() ?></div>\n\t\t\t\t<div class=\"alignright\"><?php next_comments_link() ?></div>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t<?php else : ?>\n\t\t<?php if ( comments_open() ) : ?>\n\t <!-- If comments are open, but there are no comments. -->\n\t\t <?php else : // comments are closed ?>\n\t\t\t<p class=\"nocomments\">Comments are closed.</p>\n\t\t<?php endif; ?>\n\t<?php endif; ?>\n\t<?php\n}", "function get_ajax_comments($url) {\n\n while (have_posts()) : the_post();\n comments_template('/templates/comments.php');\n endwhile;\n}", "function twentyten_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase '' :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t<div class=\"comment-author vcard\">\n\t\t\t<?php echo get_avatar( $comment, 40 ); ?>\n\t\t\t<?php printf( __('%s <span class=\"says\">says:</span>','twentyten'), sprintf('<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t</div><!-- .comment-author .vcard -->\n\t\t<?php if ( $comment->comment_approved == '0') : ?>\n\t\t\t<em><?php _e('Your comment is awaiting moderation.','twentyten'); ?></em>\n\t\t\t<br />\n\t\t<?php endif; ?>\n\n\t\t<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t<?php\n\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tprintf( __('%1$s at %2$s','twentyten'), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __('(Edit)','twentyten'),' ');\n\t\t\t?>\n\t\t</div><!-- .comment-meta .commentmetadata -->\n\n\t\t<div class=\"comment-body\"><?php comment_text(); ?></div>\n\n\t\t<div class=\"reply\">\n\t\t\t<?php comment_reply_link( array_merge( $args, array('depth' => $depth,'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t</div><!-- .reply -->\n\t</div><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e('Pingback:','twentyten'); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)','twentyten'),' '); ?></p>\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function hermi_list_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tglobal $post;\n\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p>\n\t\t\t<?php _e( 'Pingback:', 'hermi' ); ?>\n\t\t\t<?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'hermi' ), ' ' ); ?>\n\t\t</p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\n\t\t\t<header class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<div class=\"avatar\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// Output avatar image. The size of top level and child avatars can be set independently.\n\t\t\t\t\t\t\t$avatar_size = apply_filters( 'hermi_comment_avatar_size_top_level', 60 );\n\n\t\t\t\t\t\t\tif ( '0' != $comment->comment_parent ) {\n\t\t\t\t\t\t\t\t$avatar_size = apply_filters( 'hermi_comment_avatar_size_child', 60 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .avatar -->\n\n\t\t\t\t\t<div class=\"links\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tprintf( __( '%1$s %2$s%3$s at %4$s%5$s', 'hermi' ),\n\t\t\t\t\t\t\t\tsprintf( '<div class=\"fn\">%s</div>',\n\t\t\t\t\t\t\t\t\t\t\t\t\tget_comment_author_link()\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'<a class=\"published-date\" href=\"' . esc_url( get_comment_link( $comment->comment_ID ) ) . '\">' . \n\t\t\t\t\t\t\t\t\t\t'<time pubdate datetime=\"' . esc_attr( get_comment_time( 'c' ) ) . '\">',\n\t\t\t\t\t\t\t\tesc_html( get_comment_date() ),\n\t\t\t\t\t\t\t\tesc_html( get_comment_time() ),\n\t\t\t\t\t\t\t\t'</time><i></i></a>'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// See hermi_comment_moderation_links(). We're outputting spam and delete links here too.\n\t\t\t\t\t\t\tif ( current_user_can( 'edit_post', $post->ID ) ) {\n\t\t\t\t\t\t\t\tedit_comment_link( __( 'Edit', 'hermi' ), ' ' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .links -->\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) { ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\">\n\t\t\t\t\t\t<?php _e( 'Your comment is awaiting moderation.', 'hermi' ); ?>\n\t\t\t\t\t</em><br />\n\t\t\t\t<?php } ?>\n\t\t\t</header><!-- .comment-meta -->\n\n\n\t\t\t<div class=\"comment-body\">\n\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"reply-link-wrap\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tcomment_reply_link( array_merge( $args, [\n\t\t\t\t\t\t\t'reply_text' => __( 'Reply', 'hermi' ),\n\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t\t\t] ) );\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .reply-link-wrap -->\n\t\t\t</div><!-- .comment-body -->\n\n\t\t</article><!-- #comment-## -->\n\t<!-- WordPress handles the output of the closing </li> tag -->\n\t\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "function dp_comment_source ($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n<div id=\"comment-<?php comment_ID(); ?>\">\n<div class=\"comment-author vcard clearfix\">\n<div class=\"comment-avator\"><?php echo get_avatar($comment,$size='60'); ?></div>\n<?php printf(__('<cite class=\"comment_author_name\">By %s</cite>'), get_comment_author_link()) ?>\n<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s','DigiPress'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)',''),' ','') ?><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n</div>\n</div>\n<?php if ($comment->comment_approved == '0') : ?>\n<p><?php _e('Your comment is awaiting moderation.', 'DigiPress') ?></p>\n<?php endif; ?>\n<?php comment_text() ?>\n</div>\n<?php }", "function darksnow_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'darksnow' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'darksnow' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$avatar_size = 68;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 39;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s on %2$s <span class=\"says\">said:</span>', 'darksnow' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'darksnow' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'darksnow' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'darksnow' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'darksnow' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "function custom_comments($comment, $args, $depth)\r\n{\r\n $GLOBALS['comment'] = $comment;\r\n $GLOBALS['comment_depth'] = $depth;\r\n ?>\r\n <div class=\"col-lg-12\">\r\n <ul class=\"list-unstyled\" id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <li style=\"margin-bottom: 20px;\">\r\n <div class=\"col-lg-12 comment-content-wrapper\" style=\"border-left: 2px solid #006837; padding: 5px 10px;\">\r\n <span class=\"px-14-font comment-details\"><a href=\"#\" class=\"jelly-bean-font-color proximanova-Semibold text-uppercase\"><?php comment_author(); ?></a>\r\n <span class=\"tapa-font-color \">\r\n <span>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>\r\n <?php printf(\r\n __('Posted %1$s <span class=\"meta-sep\">|</span> <a href=\"%2$s\" title=\"Permalink to this comment\">Permalink</a>', 'eti-theme'),\r\n get_comment_date(),\r\n '#comment-' . get_comment_ID()\r\n );\r\n edit_comment_link(__('Edit', 'eti-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?>\r\n </span>\r\n </span>\r\n <div class=\"comment-content\">\r\n <?php comment_text() ?>\r\n <?php // echo the comment reply link\r\n if ($args['type'] == 'all' || get_comment_type() == 'comment') :\r\n\r\n $extraclass = 'primary-font-color proximanova-semibold px-14-font right comment-reply-link';\r\n echo preg_replace(\r\n '/comment-reply-link/',\r\n 'comment-reply-link ' . $extraclass,\r\n get_comment_reply_link(array_merge($args, array(\r\n 'add_below' => $add_below,\r\n 'reply_text' => __('Reply', 'eti-theme'),\r\n 'login_text' => __('Log in to reply.', 'eti-theme'),\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth']\r\n ))),\r\n 1\r\n );\r\n endif;\r\n ?>\r\n </div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n<?php }", "function custom_pings($comment, $args, $depth)\r\n{\r\n $GLOBALS['comment'] = $comment;\r\n ?>\r\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <div class=\"comment-author\"><?php printf(\r\n __('By %1$s on %2$s at %3$s', 'eti-theme'),\r\n get_comment_author_link(),\r\n get_comment_date(),\r\n get_comment_time()\r\n );\r\n edit_comment_link(__('Edit', 'eti-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?>\r\n </div>\r\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'eti-theme') ?>\r\n <div class=\"comment-content\">\r\n <?php comment_text() ?>\r\n </div>\r\n <?php }" ]
[ "0.7894192", "0.75712", "0.7442904", "0.7241063", "0.71609265", "0.71125174", "0.7097508", "0.6934415", "0.6745412", "0.6659723", "0.6658278", "0.6638466", "0.6570929", "0.654988", "0.6520269", "0.6511005", "0.6491101", "0.6464287", "0.64412445", "0.64310646", "0.6428039", "0.6402751", "0.640171", "0.63846433", "0.6273779", "0.6272182", "0.626542", "0.6257327", "0.6196299", "0.6193071", "0.6183472", "0.617532", "0.6170672", "0.6168881", "0.61487675", "0.6146806", "0.6146617", "0.6133552", "0.6117914", "0.61132336", "0.60988474", "0.60967743", "0.6083255", "0.60818374", "0.6080746", "0.6072918", "0.6066285", "0.60484695", "0.60484695", "0.6043813", "0.6043129", "0.6041326", "0.60412264", "0.6038799", "0.6029481", "0.6019589", "0.60184944", "0.60088664", "0.6007436", "0.60050577", "0.60019356", "0.59978765", "0.5995716", "0.59944135", "0.59803575", "0.5979062", "0.59788156", "0.5977636", "0.5977352", "0.59725964", "0.5970972", "0.5970829", "0.59684473", "0.59675956", "0.59671146", "0.5955005", "0.59523064", "0.5950646", "0.5950646", "0.5950646", "0.59453976", "0.5944749", "0.5944634", "0.594351", "0.59401786", "0.59393466", "0.5937367", "0.59314436", "0.5926334", "0.5926293", "0.592401", "0.592401", "0.5915343", "0.5908778", "0.5905392", "0.590508", "0.5898616", "0.58963263", "0.58908135", "0.58886534", "0.58765846" ]
0.0
-1
Include the closing for a comment item This is only meant to be used as a callback for wp_list_comments() 'endcallback' argument
function tpl_comment_end( $comment, $args, $depth ){ echo '</li>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hybrid_comments_end_callback() {\n\techo '</li><!-- .comment -->';\n}", "function wizate_comments_close() {\n\t\techo '</div>';\n }", "function close_comment() {?>\n\t</article>\n<?php\n}", "public function renderCloseComment($node) {\n\t\tif ($node->isConditional) return parent::renderCloseComment($node);\n\t}", "function tcf_end_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n </div></div>\n<?php\n}", "function listitem_close() {\n $this->doc .= '</li>'.DOKU_LF;\n }", "function quote_close() {\n $this->doc .= '</div></blockquote>'.DOKU_LF;\n }", "function listcontent_close() {\n $this->doc .= '</div>'.DOKU_LF;\n }", "function close_comments( $open, $post_id ) {\n\tif ( DevHub\\is_parsed_post_type( get_post( $post_id )->post_type ) ) {\n\t\treturn false;\n\t}\n\n\treturn $open;\n}", "function _close_comments_for_old_post($open, $post_id)\n {\n }", "private function endItem()\n {\n if ($this->version == self::Turbo) {\n echo '</item>' . PHP_EOL;\n }\n }", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "public function close() {\n\t\t\n\t\t// Render close tag\n\t\t\n\t\t$this->_post_render();\n\t\t\n\t\techo true === $this->options['render_tag'] ? $this->_render_tag( true ) : '';\n\t\t\n\t\techo $this->options['after'];\n\t\t\n\t}", "function travomath_posted_footer(){\n\t\n\t$comments_num = get_comments_number();\n\tif( comments_open() ){\n\t\tif( $comments_num == 0 ){\n\t\t\t$comments = __('No Comments');\n\t\t} elseif ( $comments_num > 1 ){\n\t\t\t$comments= $comments_num . __(' Comments');\n\t\t} else {\n\t\t\t$comments = __('1 Comment');\n\t\t}\n\t\t$comments = '<a class=\"comments-link\" href=\"' . get_comments_link() . '\">'. $comments .' <span class=\"sunset-icon sunset-comment\"></span></a>';\n\t} else {\n\t\t$comments = __('Comments are closed');\n\t}\n\t\n\treturn '<div class=\"post-footer-container\"><div class=\"row\"><div class=\"col-xs-12 col-sm-6\">'. get_the_tag_list('<div class=\"tags-list\">', ' ', '</div>') .'</div><div class=\"col-xs-12 col-sm-6 text-right\">'. $comments .'</div></div></div>';\n}", "function lgm_theme_comments_closed( $open, $post_id ) {\n\t $post = get_post( $post_id );\n\t $open = false;\n\t return $open;\n\t}", "public function getCloseTagWrapper()\n {\n }", "private function commentEndState()\n {\n $this->char++;\n $char = $this->char();\n\n if ($char === '>') {\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } elseif ($char === '-') {\n $this->token['data'] .= '-';\n\n } elseif ($this->char === $this->EOF) {\n $this->emitToken($this->token);\n $this->char--;\n $this->state = 'data';\n\n } else {\n $this->token['data'] .= '--' . $char;\n $this->state = 'comment';\n }\n }", "function listo_close() {\n $this->doc .= '</ol>'.DOKU_LF;\n }", "private function endItem()\n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\techo '</item>' . PHP_EOL; \n\t\t} \n\t\telse if($this->version == ATOM)\n\t\t{\n\t\t\techo \"</entry>\" . PHP_EOL;\n\t\t}\n\t}", "public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}", "public function action_close()\n\t{\n\t\treturn \"</div>\\n\";\n\t}", "function end_lvl( &$output, $depth = 0, $args = array() ) { //phpcs:ignore\n\t\t\t$GLOBALS['comment_depth'] = $depth + 1; //phpcs:ignore\n\t\t\t?>\n\n\t\t\t</ul><!-- /.children -->\n\n\t\t\t<?php\n\t\t}", "private function commentEndState() {\n $this->char++;\n $char = $this->char();\n\n if($char === '>') {\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } elseif($char === '-') {\n $this->token['data'] .= '-';\n\n } elseif($this->char === $this->EOF) {\n $this->emitToken($this->token);\n $this->char--;\n $this->state = 'data';\n\n } else {\n $this->token['data'] .= '--'.$char;\n $this->state = 'comment';\n }\n }", "public function getClosingTag() {\n return $this->closingTag;\n }", "public function endContent()\n\t{\n\t\t$this->endWidget('CContentDecorator');\n\t}", "public function renderContentEnd()\n {\n echo CHtml::closeTag('div');\n }", "public function renderContentEnd()\n {\n echo CHtml::closeTag('div');\n }", "function listu_close() {\n $this->doc .= '</ul>'.DOKU_LF;\n }", "function dsq_loop_end() {\n\tglobal $wp_query;\n\t\n\twp_reset_query(); // let's go back to the original query\n\t$query = $wp_query;\n\t\n\tif ( get_option('disqus_cc_fix') == '1' || !count($query->posts) || is_single() || is_page() || is_feed() ) {\n\t\treturn;\n\t}\n\tglobal $DSQ_QUERY_POST_IDS;\n\tforeach ($query->posts as $post) {\n\t\t$loop_ids[] = intval($post->ID);\n\t}\n\t$posts_key = md5(serialize($loop_ids));\n\tif (isset($DSQ_QUERY_POST_IDS[$posts_key])) {\n\t\tdsq_output_loop_comment_js($DSQ_QUERY_POST_IDS[$posts_key]);\n\t}\n}", "function bunchy_woocommerce_sidebar_wrapper_end() {\n\t?>\n\t</div>\n\t</div><!-- .g1-row -->\n\t<?php\n}", "function showEnd()\n {\n if (Event::handle('StartCloseNoticeListItemElement', array($this))) {\n $this->out->elementEnd('li');\n Event::handle('EndCloseNoticeListItemElement', array($this));\n }\n }", "function deleted_close() {\n $this->doc .= '</del>';\n }", "public function next_comment()\n {\n }", "function bunchy_woocommerce_content_wrapper_end() {\n\t?>\n\t</div><!-- .g1-column -->\n\t<?php\n}", "function honeycomb_primary_navigation_wrapper_close() {\n\t\techo '</div>';\n\t}", "function end_proposals_div(){ ?>\n </ul>\n </div>\n </div>\n\n<?php }", "public static function close() {\r\n\r\n echo '</div>';\r\n\r\n }", "function tempera_comments_off() { \nif ( ! comments_open() ) : ?>\n\t<p class=\"nocomments\"><?php _e( 'Comments are closed.', 'tempera' ); ?></p>\n<?php endif; // end ! comments_open() \n}", "function print_blockclose(){\n\t\techo '</div></div>';\n\t}", "function scribbles_nav_wrapper_close(){\n\n\techo '</div><!-- .main-navigation-wrapper -->';\n\n\tget_template_part('templates/parts/nav-border');\n\n}", "public function slcr_comment_after() {\n if ( class_exists( 'WooCommerce' )) {\n if ( !is_product() ){\n echo '\n <div class=\"col-md-12 col-sm-12 col-xs-12\">\n <h5 class=\"font-700 mb-30 sub-heading single\">' . esc_html__('Write a comment','moppers') . '</h5>\n </div>\n ';\n }\n }\n }", "function _addQuoteClose() {\n $this->ayCacheQuoteClose[count($this->ayCacheQuoteClose)+1] = true;\n $intCountQuote = count($this->ayCacheQuoteClose);\n\n return \"[/quote:\".$intCountQuote.\"]\";\n }", "public function swc_scroll_wrapper_close() {\n\t\t$infinite_scroll = get_theme_mod( 'swc_infinite_scroll', false );\n\n\t\tif ( true == $infinite_scroll ) {\n\t\t\techo '</div>';\n\t\t}\n\t}", "private function close() {\n echo \"</{$this->name}>\\n\";\n }", "function section_close() {\n $this->doc .= DOKU_LF.'</div>'.DOKU_LF;\n }", "public function closeTag()\n {\n return '</span>';\n }", "function _close_comments_for_old_posts($posts, $query)\n {\n }", "function end_el( &$output, $item, $depth = 0, $args = [], $id = 0 ) {\n\t\t$output .= '</li>';\n\t\treturn;\n\t}", "function end_el( &$output, $item, $depth = 0, $args = array() ) {\n $output .= \"</li>\\n\";\n }", "function end_el( &$output, $item, $depth = 0, $args = array() ) {\r\n\t\t\t$output .= \"</li>\\n\";\r\n\t\t}", "public function makeClosingTag()\n {\n if ($this->selfClosing) {\n return '';\n }\n\n return '</'.$this->name.'>';\n }", "function cera_grimlock_footer_callback() {\n\t\t?>\n\t\t<div class=\"region__row\">\n\t\t\t<?php\n\t\t\t$sidebar_active = false;\n\t\t\tfor ( $i = 1; $i <= 4; $i++ ) :\n\t\t\t\tif ( is_active_sidebar( \"footer-{$i}\" ) ) :\n\t\t\t\t\t$sidebar_active = true; ?>\n\t\t\t\t\t<div class=\"<?php echo esc_attr( \"region__col region__col--{$i} widget-area\" ); ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( \"footer-{$i}\" ); ?>\n\t\t\t\t\t</div><!-- .region__col -->\n\t\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\tendfor;\n\n\t\t\tif ( ! $sidebar_active ) : ?>\n\t\t\t\t<div class=\"site-info text-center w-100\" role=\"contentinfo\">\n\t\t\t\t\t<?php bloginfo( 'title' ); ?><span class=\"sep\"> | </span><?php bloginfo( 'description' ); ?>\n\t\t\t\t</div><!-- .site-info -->\n\t\t\t\t<?php\n\t\t\tendif; ?>\n\t\t</div><!-- .region__row -->\n\t\t<?php\n\t}", "public function closeTag(): string\n {\n return $this->templateCloseTag;\n }", "function print_close(){\n\t\techo '</div>';\n\t}", "function lastcomments_block() {\r\n\r\n\tglobal $template;\r\n\t// Action if sidepanel is enabled\r\n\tif (pluginGetVariable('lastcomments', 'sidepanel')) {\r\n\t\t$template['vars']['plugin_lastcomments'] = lastcomments();\r\n\t} else {\r\n\t\t$template['vars']['plugin_lastcomments'] = \"\";\r\n\t}\r\n}", "protected function end() {\n // must have space after it\n return 'END ';\n }", "function end_no_proposals_div(){ ?>\n </div>\n<?php }", "public function closing_tags()\r\n\t{\r\n\t\treturn $this->closing_tags;\r\n\t}", "public function the_comment()\n {\n }", "function rss_enclosure()\n {\n }", "public function blockEnd() {\n $this->outputEditmode('</div>');\n }", "function the_comment()\n {\n }", "function inline_content_structure_end() {\n\n\t\techo '</div><!--end #content-->';\n\t\t\t\n\t\tdo_action( 'inline_after_content' );\n\t\t\t\n\t\techo '</div><!--end .content-sidebar-wrapper-->';\n\t\t\n\t\tdo_action( 'inline_after_content_sidebar_wrapper' );\n\t\t\n\techo '</div><!--end #main-content .wrap-->';\necho '</div><!--end #main-content-->';\n\n}", "function end_received_or_sent_proposals_div(){ ?>\n </div>\n\n<?php }", "public static function second_column_close() {\r\n\r\n echo '</div>';\r\n\r\n }", "function close_tag($tag, $pref, $nl)\n{\n tag($tag, 'close', $pref, $nl) ;\n}", "function poco_product_columns_wrapper_close() {\n echo '</div>';\n }", "private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }", "function daily_cooking_custom_entry_footer() {\n if ( 'post' == get_post_type() ) {\n $categories_list = get_the_category_list( __( ', ', 'dailycooking-custom' ) );\n if ( $categories_list &&\n daily_cooking_custom_categorized_blog() ) {\n printf( '<span class=\"cat-links\">' . __( 'Posted in %1$s',\n 'daily-cooking-custom' ) . '</span>', $categories_list );\n }\n $tags_list = get_the_tag_list( '', __( ', ', 'daily-cookingcustom' ) );\n if ( $tags_list ) {\n printf( '<span class=\"tags-links\">' . __( 'Tagged %1$s',\n 'daily-cooking-custom' ) . '</span>', $tags_list );\n }\n }\n if ( ! is_single() && ! post_password_required() && (\n comments_open() || get_comments_number() ) ) {\n echo '<span class=\"comments-link\">';\n comments_popup_link(__('Leave a comment', 'daily-cookingcustom'), __('1 Comment', 'daily-cooking-custom'), __('%\n Comments', 'daily-cooking-custom'));\n echo '</span>';\n }\n edit_post_link( __( 'Edit', 'daily-cooking-custom' ), '<span\n class=\"edit-link\">', '</span>' );\n}", "public static function template_container_end() {\n\t\techo '</div>';\n\t}", "function CloseTag() {\n\t\tif (!empty($this->tag)) {\n\t\t\tfor ($in=0;$in<$this->indent; $in++) {\n\t\t\t\t$this->outputCode.=\"\";\n\t\t\t}\n\t\t\tif (!empty($this->tag))\n\t\t\t$this->outputCode.=\"</\".$this->tag.\">\";\n\t\t}\n\t\t//$this->outputCode.=\"\\n\";\n\t\t$this->indent--;\n\t}", "public function _end_block()\n\t{\n\t\t//echo '</table>';\n\t}", "function newsdot_entry_footer() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\n\t\tedit_post_link(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Edit <span class=\"screen-reader-text\">%s</span>', 'newsdot' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\twp_kses_post( get_the_title() )\n\t\t\t),\n\t\t\t'<span class=\"edit-link\">',\n\t\t\t'</span>'\n\t\t);\n\t}", "function inline_archive_right_column_end() {\n\n\techo '</div><!--end .right-->';\n\t\n}", "public function shop_toolbar_elements_ends_wrapper() {\n\t\t\t?>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function cinerama_edge_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\t\n\t\tglobal $post;\n\t\t\n\t\t$is_pingback_comment = $comment->comment_type == 'pingback';\n\t\t$is_author_comment = $post->post_author == $comment->user_id;\n\t\t\n\t\t$comment_class = 'edgtf-comment clearfix';\n\t\t\n\t\tif ( $is_author_comment ) {\n\t\t\t$comment_class .= ' edgtf-post-author-comment';\n\t\t}\n\t\t\n\t\tif ( $is_pingback_comment ) {\n\t\t\t$comment_class .= ' edgtf-pingback-comment';\n\t\t}\n\t\t?>\n\t\t\n\t\t<li>\n\t\t<div class=\"<?php echo esc_attr( $comment_class ); ?>\">\n\t\t\t<?php if ( ! $is_pingback_comment ) { ?>\n\t\t\t\t<div class=\"edgtf-comment-image\"> <?php echo cinerama_edge_kses_img( get_avatar( $comment, 'thumbnail' ) ); ?> </div>\n\t\t\t<?php } ?>\n\t\t\t<div class=\"edgtf-comment-text\">\n\t\t\t\t<div class=\"edgtf-comment-date\"><?php comment_time( get_option( 'date_format' ) ); ?></div>\n\t\t\t\t<div class=\"edgtf-comment-info\">\n\t\t\t\t\t<h5 class=\"edgtf-comment-name vcard\">\n\t\t\t\t\t\t<?php if ( $is_pingback_comment ) {\n\t\t\t\t\t\t\tesc_html_e( 'Pingback:', 'cinerama' );\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t<?php echo wp_kses_post( get_comment_author_link() ); ?>\n\t\t\t\t\t</h5>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( ! $is_pingback_comment ) { ?>\n\t\t\t\t\t<div class=\"edgtf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'reply_text' => esc_html__( 'reply', 'cinerama' ),\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t) ) );\n\t\t\t\tedit_comment_link( esc_html__( 'edit', 'cinerama' ) );\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php //li tag will be closed by WordPress after looping through child elements ?>\n\t\t<?php\n\t}", "function register_legacy_post_comments_block()\n {\n }", "function end_el( &$output, $item, $depth = 0, $args = array() ) {\n\t\tif ( $depth != 0 && $this->is_mega ) {\n\t\t\t$output .= '';\n\t\t} else {\n \t\t\t$output .= '</li>';\n \t\t}\n\t}", "public function closeTag()\n {\n return '</form> </div></div>';\n }", "protected function _renderPaginationEnd()\n {\n return '</ul></div>';\n }", "function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}", "function register_block_core_latest_comments()\n {\n }", "public function woocommerce_order_review_end() {\n\t\t\techo '</div>';\n\t\t}", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <?php echo comment_placeholder($comment, $args, $depth); ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function starter_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', 'starter' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'starter' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'starter' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'starter' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'starter' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\t\t\t</footer><!-- .comment-meta -->\n\n\t\t\t<div class=\"comment-content\">\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t</div><!-- .comment-content -->\n\n\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t'after' => '</div>',\n\t\t\t\t) ) );\n\t\t\t?>\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "function gravit_comment( $comment, $args, $depth ) {\r\r\n\t$GLOBALS['comment'] = $comment;\r\r\n\r\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\r\n\t\t<div class=\"comment-body\">\r\r\n\t\t\t<?php _e( 'Pingback:', 'gravit' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '<i class=\"fa fa-pencil-square-o\"></i> Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t</div>\r\r\n\r\r\n\t<?php else : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\r\n\t\t\t<footer class=\"comment-meta\">\r\r\n\t\t\t\t<div class=\"comment-author vcard\">\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>\r\r\n\r\r\n\t\t\t\t\t<div class=\"comment-name\">\r\r\n\t\t\t\t\t\t<?php printf( __( '%s', 'gravit' ), sprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ) ); ?>\r\r\n\t\t\t\t\t\t<div class=\"author-star\">\r\r\n\t\t\t\t\t\t\t<i class=\"fa fa-star\"></i>\r\r\n\t\t\t\t\t\t</div>\r\r\n\t\t\t\t\t</div>\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<div class=\"comment-metadata\">\r\r\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\r\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\r\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'gravit' ), get_comment_date(), get_comment_time() ); ?>\r\r\n\t\t\t\t\t\t</time>\r\r\n\t\t\t\t\t</a>\r\r\n\t\t\t\t\t<?php edit_comment_link( __( '| Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t\t\t\t</div><!-- .comment-metadata -->\r\r\n\r\r\n\t\t\t\t</div><!-- .comment-author -->\r\r\n\r\r\n\t\t\t\t<div class=\"comment-content\">\r\r\n\t\t\t\t\t<?php comment_text(); ?>\r\r\n\t\t\t\t</div><!-- .comment-content -->\t\t\t\t\r\r\n\r\r\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'gravit' ); ?></p>\r\r\n\t\t\t\t<?php endif; ?>\r\r\n\t\t\t</footer><!-- .comment-meta -->\t\t\t\r\r\n\r\r\n\t\t\t<?php\r\r\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\r\n\t\t\t\t\t'add_below' => 'div-comment',\r\r\n\t\t\t\t\t'depth' => $depth,\r\r\n\t\t\t\t\t'max_depth' => $args['max_depth'],\r\r\n\t\t\t\t\t'before' => '<div class=\"reply\">',\r\r\n\t\t\t\t\t'after' => '</div>',\r\r\n\t\t\t\t) ) );\r\r\n\t\t\t?>\r\r\n\r\r\n\t\t</article><!-- .comment-body -->\r\r\n\t<?php\r\r\n\tendif;\r\r\n}", "function header_box_close() { ?>\n\n\t\t</div>\n\t</div>\n\n<?php }", "function nc__dlg__end(){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__end');\n\n\t\t\t\t\t\t//end dialog for content body (starts in another function)\n\t\t\t\t\t\techo \"</div>\" .\n\n\t\t\t\t\t//end dialog content window (starts in another function)\n\t\t\t\t\t\"</div>\" .\n\n\t\t\t\t//end dialog body (starts in another function)\n\t\t\t\t\"</div>\" .\n\n\t\t\t//end end dialog bounding DIV (starts in another function)\n\t\t\t\"</div>\";\n\n\t}", "function emphasis_close() {\n $this->doc .= '</em>';\n }", "public function sticky_content_wrapper_end() {\n\t\t\techo '</div>';\n\t\t}", "function doublequoteclosing() {\n global $lang;\n $this->doc .= $lang['doublequoteclosing'];\n }", "function animo_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li <?php comment_class('comment'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div class=\"media-body\"><?php _e( 'Pingback:', 'animo' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'animo' ), ' ' ); ?></div>\n </li>\n <?php\n break;\n\n default :\n $class = array('comment_wrap');\n if ($depth > 1) {\n $class[] = 'chaild';\n }\n ?>\n <!-- Comment Item -->\n <li <?php comment_class('comment'); ?> id=\"comment-<?php comment_ID(); ?>\">\n\n <div class=\"comment-body\">\n <figure class=\"comment-avatar\">\n <?php echo get_avatar( $comment, 45 ); ?>\n </figure>\n\n <div class=\"comment-content\">\n <div class=\"comment-meta\">\n <h6><?php comment_author_link();?></h6>\n <time><?php echo comment_date(get_option('date_format')) ?>, <?php echo comment_date(get_option('time_format')) ?></time>\n </div>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'animo' ); ?></em>\n <?php endif; ?>\n <?php comment_text(); ?>\n\n <div class=\"comment-rate\">\n <a href=\"#\" class=\"up\"><i class=\"fa fa-angle-up\"></i></a>\n <a href=\"#\" class=\"down\"><i class=\"fa fa-angle-down\"></i></a>\n </div>\n <?php $reply = get_comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => 2 ) ) );\n if (!empty($reply)): ?>\n <?php echo wp_kses_post($reply); ?>\n <?php endif;\n edit_comment_link( __( 'Edit', 'animo' ), '', '' );\n ?>\n\n <!--share comment-->\n\n </div>\n </div>\n <?php\n break;\n endswitch;\n}", "public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }", "function cera_grimlock_after_posts() {\n\t\t?>\n\t\t</div><!-- #posts -->\n\t\t<?php\n\t}", "function showEnd( $appctx )\n\t{\n\t\t$appctx->Indent() ; echo( \"</span>\\n\") ;\n\t\t$appctx->Moins() ;\n\t}", "public function createEndClassDeclaration() \n\t{\n\t\treturn \" }\\n?>\\n\";\n\t}", "function singlequoteclosing() {\n global $lang;\n $this->doc .= $lang['singlequoteclosing'];\n }", "function end_tag() {\r\n\t\t$this->push_nodelist();\r\n\t\t\r\n\t}", "function twentyeleven_comment( $comment, $args, $depth ) {\n\t\n\t$GLOBALS['comment'] = $comment;\n\t\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :?>\n\t\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t\n\t<li <?php comment_class('cf'); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\n\t\t<div class=\"comment-meta\">\t\t\n\t\t<?php $avatar_size = 120; if ( '0' != $comment->comment_parent ) $avatar_size = 120;\n\t\t\techo get_avatar( $comment, $avatar_size );?>\n\t\t\t<div class=\"author-link\"><?php echo get_comment_author_link();?></div>\n\t\t\t\n\t\t\t<div class=\"date\"><?php echo get_comment_date('F j');?></div>\n\t\t\t<!--<div class=\"adminIcon\">ADMIN</div>-->\n\t\t</div><!--end commentMeta-->\n\t\n\t\t<div class=\"comment-body\">\n\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t<em class=\"comment-awaiting-moderation\">\n\t\t\t\t<?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>\n\t\t\t<br />\n\t\t\t<?php endif; ?>\n\t\t\t<?php comment_text(); ?>\n\t\t\t<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?>\t\t\t\t\t\n\t\t\n\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'REPLY', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\n\t\t</div>\n</li>\n\t<?php\n\t\tbreak;\n\tendswitch;\n}", "function cosmetics_comments( $cosmetics_comment, $cosmetics_comment_args, $cosmetics_comment_depth ) {\n\n if ( 'div' === $cosmetics_comment_args['style'] ) :\n\n $cosmetics_comment_tag = 'div';\n $cosmetics_comment_add_below = 'comment';\n\n else :\n\n $cosmetics_comment_tag = 'li';\n $cosmetics_comment_add_below = 'div-comment';\n\n endif;\n\n?>\n <<?php echo $cosmetics_comment_tag ?> <?php comment_class( empty( $cosmetics_comment_args['has_children'] ) ? '' : 'parent' ) ?> id=\"comment-<?php comment_ID() ?>\">\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n\n <?php endif; ?>\n\n <div class=\"comment-author vcard\">\n <?php if ( $cosmetics_comment_args['avatar_size'] != 0 ) echo get_avatar( $cosmetics_comment, $cosmetics_comment_args['avatar_size'] ); ?>\n\n </div>\n\n <?php if ( $cosmetics_comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\">\n <?php esc_html_e( 'Your comment is awaiting moderation.', 'cosmetics' ); ?>\n </em>\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\">\n <div class=\"comment-meta-box\">\n <span class=\"name\">\n <?php comment_author_link(); ?>\n </span>\n <span class=\"comment-metadata\">\n <?php comment_date(); ?>\n </span>\n\n <?php edit_comment_link( esc_html__( 'Edit ', 'cosmetics' ) ); ?>\n\n <?php comment_reply_link( array_merge( $cosmetics_comment_args, array( 'add_below' => $cosmetics_comment_add_below, 'depth' => $cosmetics_comment_depth, 'max_depth' => $cosmetics_comment_args['max_depth'] ) ) ); ?>\n\n </div>\n <div class=\"comment-text-box\">\n <?php comment_text(); ?>\n </div>\n </div>\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n </div>\n <?php endif; ?>\n\n<?php\n}" ]
[ "0.8140795", "0.78549004", "0.70392954", "0.6702649", "0.6558431", "0.6345414", "0.61633116", "0.6061738", "0.6051477", "0.5999857", "0.59105116", "0.58853954", "0.58633614", "0.5835095", "0.5825912", "0.5816918", "0.57893574", "0.5773253", "0.5766595", "0.57573164", "0.57453907", "0.57273465", "0.56991225", "0.5696127", "0.5645126", "0.5592947", "0.5592947", "0.5577254", "0.5564292", "0.5549389", "0.55438066", "0.55390507", "0.55352825", "0.54973316", "0.54941446", "0.54853916", "0.5484897", "0.54552734", "0.5441978", "0.54322207", "0.54206836", "0.5387685", "0.5385731", "0.53816485", "0.53715897", "0.5355471", "0.53513545", "0.53319305", "0.5328799", "0.5315007", "0.5309185", "0.5299498", "0.5285895", "0.5260435", "0.5243244", "0.52415067", "0.5238555", "0.52384746", "0.5236738", "0.52343225", "0.5231591", "0.52274543", "0.52273816", "0.52172035", "0.5216782", "0.52014583", "0.5198021", "0.51951164", "0.5193654", "0.5188903", "0.5188809", "0.5183129", "0.51762223", "0.5174954", "0.51703715", "0.5170176", "0.5169174", "0.51665825", "0.5139605", "0.5128587", "0.5127643", "0.5126085", "0.51229405", "0.51218873", "0.5111593", "0.5099722", "0.5076482", "0.507038", "0.50681055", "0.50675184", "0.5064278", "0.506282", "0.5058192", "0.50539374", "0.50537485", "0.50531095", "0.50472194", "0.5036224", "0.5026545", "0.50241065" ]
0.6995325
3
Kontrollerar textfilen gentemot kakornas tid.
public function validateExpirationTime() { // Variabel som ska innehålla tiden från filen. $correctTime = ""; // Öppnar filen, läser igenom den och sparar värdet i $correctTime, för att sedan stänga filen. $file = fopen('cookieExpirationTime.txt','r'); while ($line = fgets($file)) { $correctTime = $line; } fclose($file); // Om tiden från filen är större än just precis nu... if(intval($correctTime) > time()) { // Returnera true, kakan är fortfarande giltig. return true; } else { // Annars kalla på felmeddelandet, kakans levnadstid är över. $this->cookieException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function difundir() {\n $frase = $this->obtener_frase();\n echo $frase;\n }", "public function get_text()\n {\n }", "public function tes()\n\t{\n\t\t$tes = \"^ & %aku% ak4 $ 12 Trilyun2 Enak2 banget2 ya Tragedi ular kembali memakan korban. Kali ini seorang bocah laki2 di Bandung tewas setelah dipatuk ular weling.--Insiden itu menimpa Andi Ramdani (11), bocah asal Jalan Nagrog, Gang Keramat RT 04/09, Kelurahan Pasirjati, Kecamatan Ujungberung, Kota Bandung. Andi tewas saat dilarikan ke rumah sakit umum daerah (RSUD) Bandung pada Rabu (23/1) siang.--Bagaimana awal mula kejadiannya? Simak selengkapnya di link yang ada di stories!--Sumber: detiknews--#detikcom #ularweling #dipatukular\";\n\t\t$tes1 = \"'DANAR' Dono y nyiyir gak ga adalah..,./ seorang...!! @mahasiswa2%&& :D z!! @mas danar_dono\";\n\t\t$cek = $this->case_folding($tes);\n\t\t$cek = $this->cleansing($cek);\n\t\t$cek = $this->stemmer($cek);\n\t\t$cek = $this->stopword($cek);\n\t\t$cek = preg_split('/ /',$cek);\n\t\t$count = count($cek);\n\t\tfor($i=0;$i<$count;$i++){\n\t\t\t$cek[$i] = $this->hilangkan_kataberulang($cek[$i]);\n\t\t}\n\t}", "public function actionMasaze_i_tretmani()\n\t{\n\t $this->getLang();\n\t\t$this->base('masaze_i_tretmani');\n $this->naslovStranice = 'Masaže i Tretmani';\n\t\t$this->render('clanak');\n \n\t}", "function getTextInside(){\n\t $myfile = fopen($this->pathFile, \"r\") or die(\"Unable to open file!\");\t\t//membuka file\n\t $this->textInside = fread($myfile, filesize($this->pathFile));\t\t\t\t//menyimpan text yang ada dalam file ke textInside\n\t fclose($myfile);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//menutup file\n\t}", "public function Documentos()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}", "public function index()\n {\n $cta = new ContentTextArea;\n $fcta = array();\n //dd($cta->all());\n $hashmap = array();\n $v = 1;\n while($v < 264) {\n if (array_key_exists(($v-1), $cta->all())) {\n $s = 'title'.(string)$v;\n $hashmap[$s] = $cta->all()[($v-1)]->text; \n }else {\n $s = 'title'.(string)$v;\n $hashmap[$s] = ' '; \n }\n \n $v++;\n }\n\n\n\n return view('admin.text_management', ['hashmap'=>$hashmap]);\n\n\n }", "public function text() {}", "public function text() {}", "public function text() {}", "public function actionTermag_novi_dio()\n\t{\n\t\t$this->getLang();\n\t\t$this->base('termag-novi-dio');\n $this->naslovStranice = \"Termag novi dio\";\n\t\t$this->render('clanak');\n \n\t}", "function _ktext($string) {\n $Random = rand(1,10000000);\n\n //> Html- Muster für geöffnete Tags mit Titel.\n $HeaderTitel = \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"\".$this->info['KtextTabelleBreite'].\"\\\" align=\\\"center\\\">\"\n .\"<tr><td><a href=\\\"javascript:Klapptext('__ID__')\\\">\"\n .\"<img src=\\\"include/images/icons/plus.gif\\\" id=\\\"image___ID__\\\" border=0 alt=\\\"Aus/Ein-klappen\\\" title=\\\"Aus/Ein-klappen\\\"> \";\n\n $FooterTitel = \"</a></td></tr>\"\n .\"<tr><td><div id=\\\"layer___ID__\\\" style=\\\"display:none;border:1px \".$this->info['KtextRandFormat'].\" \".$this->info['KtextRandFarbe'].\";\\\">\";\n\n //> Html- Muster für geschlossene Tags.\n $KtextClose = \"</div></td></tr></table>\\n\";\n\n //> Geöffnete Tags umwandeln.\n for($c=1;$c <= count($this->ayCacheKtextOpen);$c++) {\n if(count($this->ayCacheKtextClose) == count($this->ayCacheKtextOpen)) {\n //> Format: [ktext=xxx]\n $this->ktext_pattern[] = \"%\\[ktext:\".$c.\"=([^]]*)\\]%siU\";\n $this->ktext_replace[] = str_replace(\"__ID__\",$c.\"@\".$Random,$HeaderTitel).\"\\$1\".str_replace(\"__ID__\",$c.\"@\".$Random,$FooterTitel);\n //> Format: [/ktext]\n $this->ktext_pattern[] = \"%\\[/ktext:\".$c.\"\\]%siU\";\n $this->ktext_replace[] = $KtextClose;\n } else {\n //> Format: [ktext=xxx]xxx[/ktext]\n $this->ktext_pattern[] = \"%\\[ktext:([0-9]*)=([^]](.*)\\[/ktext:([0-9]*)\\]%siU\";\n $this->ktext_replace[] = str_replace(\"__ID__\",\"\\$1@\".$Random,$HeaderTitel).\"\\$2\".str_replace(\"__ID__\",\"\\$1@\".$Random,$FooterTitel).\"\\$3\".$KtextClose;\n }\n }\n\n //> Nicht gefundene Paare wieder darstellen.\n //> Format: [ktext=xxx]\n $this->ktext_pattern[] = \"%\\[ktext:([0-9]*)=([^[/]*)\\]%siU\";\n $this->ktext_replace[] = \"[ktext=\\$1]\";\n\n //> Format: [/ktext]\n $this->ktext_pattern[] = \"%\\[/ktext:([0-9]*)\\]%siU\";\n $this->ktext_replace[] = \"[/ktext]\";\n\n //> String parsen\n $string = preg_replace($this->ktext_pattern,$this->ktext_replace,$string);\n\n\n return $string;\n }", "function textus_get_control()\n{\n global $urllink;\n\n if (is_server()) {\n \n // Load the relevant controller that contains the methods/\n \n switch($_SERVER['REQUEST_METHOD']) {\n case 'GET':\n $request = new get_text_controller();\n //$parse = parse_parameters();\n if ( $_GET['type'] == 'annotation' ) {\n if (intval($_GET['text'])) {\n return_response(textus_get_annotations($_GET['text']));\n #return_response(array(\"status\"=>200, \"notes\"=>textus_get_annotations($_GET['text'])));\n } else {\n return_response(array(\"status\" => 403, \"error\"=>\"You need to specify a text\"));\n }\n }\n break;\n case 'POST':\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n if (isset($textid['textid'])) {\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n\t\t $current_user = wp_get_current_user();\n\t\t $noteid = textus_insert_annotation(\n\t\t $current_user->ID, $textid['textid'], \n\t\t $textid['start'], $textid['end'], \n\t\t $textid['private'], \n\t\t $textid['payload']['language'], $textid['payload']['text']\n\t\t );\n\n\t\t if (intval($noteid) > 0) {\n\t\t return_response(array(\"status\" => 200, \"note\"=>\"The note has been stored\" + intval($noteid)));\n\t\t } else {\n\t\t return_response(array(\"status\" => 403, \"note\"=>\"The note could not updated\"));\n\t\t }\n\t\t \n\t\t break;\n }\n } else {\n break;\n }\n case 'PUT':\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n print \"PUT\";\n if (isset($textid['textid'])) {\n\t\t // returns the new noteid\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n $current_user = wp_get_current_user();\n\t\t $noteid = textus_updates_annotation(\n\t\t $current_user->ID, $textid['textid'], \n\t\t $textid['start'], $textid['end'], \n\t\t $textid['private'], \n\t\t $textid['payload']['language'], $textid['payload']['text'], $textid['id']);\n\t\t \n\t\t if (intval($noteid) > 0 ) {\n\t\t return_response(array(\"status\"=> 200, \"notes\" => $textid['id'] + \" has been updated\"));\n\t\t }\n\t\t break;\n }\n } else {\n break;\n }\n case 'DELETE':\n \n //@todo get the vars which the textus viewer sets\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n $current_user = wp_get_current_user();\n\t\t $noteid = textus_delete_annotation($textid['id']);\n\t\t if (intval($noteid) > 0 ) {\n\t\t return_response(array(\"status\"=> 200, \"notes\" => $textid['id'] + \" has been deleted\"));\n\t\t }\n\t\t break;\n }\n\n default:\n $parse = parse_parameters();\n if ($parse['action'] == 'json') {\n return wp_send_json( array ('error' => 'Method is unsupported') );\n }\n break;\n }\n }\n}", "function Contenido($imagenlogo) {\n \t$this->SetMargins(10,10,151.5);\n\n \t//declaramos las fuentes a usar o tentativamente a usar ya que no sabemos cual es la original\n\t $this->AddFont('Gotham-B','','gotham-book.php');\n\t $this->AddFont('Gotham-B','B','gotham-book.php');\n\t $this->AddFont('Gotham-M','','gotham-medium.php');\n\t $this->AddFont('Helvetica','','helvetica.php');\n\n //variables locales\n $numero_de_presidiums=6;\n\n $presidium_orden=\"1\";\n $presidium_nombre=\"Cesar Gibran Cadena Espinosa de los Monteros\";\n $presidium_cargo=\"Dirigente de Redes y Enlaces \";\n\n \t//la imagen del PVEM\n \t$this->Image($imagenlogo, $this->GetX()+10, $this->GetY()+10, 100,40);\n\n \t//el primer espacio\n \t$this->Ln(3);\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(35, 5,utf8_decode(\"Distribución Logística:\"), 0,0, 'C', 1);\n\n $this->setY($this->GetY()+45);\n $this->Ln();\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(40, 5,utf8_decode(\"Presídium (Primera Fila):\"), 0,0, 'C', 1);\n\n $this->Ln(); \n $this->Ln(); \n\n $this->SetFillColor(160,68,68); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetTextColor(255); //color gris para las letras\n $tamano= ($numero_de_presidiums*7.5)/2;\n $this->setX((120/2)-$tamano);\n\n if ( ($numero_de_presidiums) % 2 ==1){ //es impar\n $candidato=($numero_de_presidiums/2)+.5;\n }else{\n $candidato=($numero_de_presidiums/2)+1;\n }\n\n for($i=0;$i<=$numero_de_presidiums;$i++){\n\n if ( ($i+1) == $candidato ){\n $this->Cell(7, 7,utf8_decode(\"*\"), 1, 0, 'C', 1);\n }else{\n $this->Cell(7, 7,utf8_decode(\"\"), 1, 0, 'C', 1); \n }\n }\n $this->Ln(); \n $this->Ln(5); \n\n\n //CONFIGURACION DE COLOR VERDE CON BLANCO\n $this->SetFont('Gotham-B','',6.5);\n $this->SetFillColor(73, 168, 63);\n $this->SetTextColor(255);\n $this->Cell(9, 5,utf8_decode(\"Orden\"), 'LR', 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode(\"Nombre\"), 'LR', 0, 'C', 1);\n $this->Cell(0, 5,utf8_decode(\"Cargo\"), 'LR', 0, 'C', 1);\n\n\n $this->Ln(); \n\n\n //CONFIGURACION SIN COLOR de fondo\n $this->SetFont('Helvetica', '', 6.5); //font de cuando se va a rellenar la informacion\n $this->SetFillColor(255, 255, 255);\n $this->SetTextColor(0);\n\n\n //ESTO ES LO QUE IRIA EN UN FOR\n for($i=0;$i<=7;$i++){\n \n $this->Cell(9, 5,utf8_decode($presidium_orden), 1, 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode($presidium_nombre), 1, 0, 'C', 1);\n $this->MultiCell(0, 5,utf8_decode($presidium_cargo), 1, 'C', 1);\n $this->Ln(1);\n } \n \n }", "function text_arabic($sura,$aya,$text){\n\t\t$table_per_kata\t= get_table(\"SELECT * FROM terjemah_kata WHERE sura='$sura' \n\t\t\t\t\t\t\t\t\tAND aya='$aya'\");\n\t\t// inisialisasi\n\t\t$arr_terjemah = array();\n\t\tforeach($table_per_kata as $j => $row_per_kata){\n\t\t\t$m = $j+1;\n\t\t\t$arr_terjemah[$m] \t\t= $row_per_kata[indonesia]; \n\t\t\t$arr_arab_harokat[$m] \t= $row_per_kata[arab_harokat]; \n\t\t}\n\t\t\n\t\t// explode aya text into word\n\t\t$arr_kata_arab\t= explode(\" \",$text);\n\t\t\n\t\t//menampilkan tiap kata beserta terjemahnya\n\t\t/*echo \"\n\t\t<pre>\n\t\t$sura:$aya \";*/\n\t\t\n\t\t$m = 1;\n\t\tforeach($arr_kata_arab as $k => $kata_arab){\n\t\t\t$event_aya_word =\"\";\n\t\t\t//menampilkan terjemahan per kata\n\t\t\t//echo \"$kata_arab {$arr_arab[$m]}<br>\";\n\t\t\tif($kata_arab==$arr_arab_harokat[$m] ){\n\t\t\t\t$output .= \"\n\t\t\t\t<span id='terjemah_{$sura}_{$aya}_{$m}' \n\t\t\t\t\tstyle='visibility:hidden;position:absolute;width:0px;height:0px;' >\n\t\t\t\t\t{$arr_terjemah[$m]}\n\t\t\t\t</span>\n\t\t\t\t\";\n\t\t\t\t$event_aya_word =\"\n\t\t\t\tonmousemove='move_terjemah($sura,$aya,$m,event)' \n\t\t\t\tonmouseout='hide_terjemah($sura,$aya,$m)'\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$id_kata = \"kata_{$sura}_{$aya}_{$m}\";\n\t\t\t\t$m++;\n\t\t\t}\n\t\t\t//menampilkan kata arab\n\t\t\t$output .= \"\n\t\t\t<span \n\t\t\t\tid='$id_kata'\n\t\t\t\tclass='aya_word'\n\t\t\t\t$event_aya_word >\n\t\t\t\t\".repair_ar($kata_arab).\"\n\t\t\t</span>\n\t\t\t\";\n\t\t}\n\t\treturn $output;\n\t}", "public function avaliation_texts()\n {\n $avaliation_texts = new Avaliation_Text();\n $avaliation_texts->select(\"*\")->select_func(\"DATE_FORMAT\", array(\"@create_date\", '[,]', '%d/%m/%Y'), 'create_date')\n ->order_by('avaliation')\n ->get();\n\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => '#',\n 'Textos de avaliação' => site_url('admin/curadoria/avaliation_texts')\n );\n\n $toview['avaliation_texts'] = $avaliation_texts;\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/avaliation_texts', $toview);\n }", "function ImprimirTexto($file){\n \t$txt = file_get_contents($file);\n \t\t $this->SetFont('Arial','',12);\n \t//Se imprime\n \t$this->MultiCell(0,5,$txt);\n \t}", "public function setTexto($txt) {\n $this->texto = Funciones::gCodificar($txt);\n }", "public static function generateTxt(){\n $archivo = fopen('documents/proveedores.txt','a');\n //------- Creamos el Encabepado --------\n fputs($archivo,\"codigo_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"descripcion_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"tipo_de_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"rif\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"otra_descripcion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"direccion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"telefono\");\n\n fputs($archivo,\"\\n\");\n\n //--------------------------------\n\n //----------- --------------------------\n $rows=Proveedores::find()->all();\n foreach($rows as $row)\n {\n fputs($archivo,$row->codigo);\n fputs($archivo,\";\");\n fputs($archivo,Proveedores::getSubString($row->razon,100));\n fputs($archivo,\";\");\n fputs($archivo,$row->tipo);\n fputs($archivo,\";\");\n fputs($archivo,$row->cedrif);\n fputs($archivo,\";\");\n fputs($archivo,'XXX');\n fputs($archivo,\";\");\n if (is_null($row->direccion)) fputs($archivo,'XXX'); else fputs($archivo,$row->direccion);\n fputs($archivo,\";\");\n if (($row->telefono==\"\")) fputs($archivo,'XXX'); else fputs($archivo,$row->telefono);\n fputs($archivo,\"\\n\");\n\n\n\n }\n fclose($archivo);\n\n\n }", "public function text_advertising()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('text_advertising_model', 'tam');\n\t\t\t$data['text_ads'] = $this->tam->get_all();\n\t\t\t$this->load->view('text_advertising-admin', $data);\n\t\t}", "public function executeLoadText(sfWebRequest $request) {\n $result = AdditionalTextTable::instance()->findSingleTextById($request->getParameter('id'));\n $this->renderText('{\"result\":'.json_encode($result[0]->toArray()).'}');\n return sfView::NONE;\n }", "function do_text_text_content($textid, $only_body=true): void\n{\n // Text settings\n $record = get_text_data($textid);\n $title = $record['TxTitle'];\n $langid = (int)$record['TxLgID'];\n $ann = $record['TxAnnotatedText'];\n $pos = $record['TxPosition'];\n \n // Language settings\n $record = get_language_settings($langid);\n $wb1 = isset($record['LgDict1URI']) ? $record['LgDict1URI'] : \"\";\n $wb2 = isset($record['LgDict2URI']) ? $record['LgDict2URI'] : \"\";\n $wb3 = isset($record['LgGoogleTranslateURI']) ? $record['LgGoogleTranslateURI'] : \"\";\n $textsize = $record['LgTextSize'];\n $removeSpaces = $record['LgRemoveSpaces'];\n $rtlScript = (bool)$record['LgRightToLeft'];\n \n // User settings\n $showAll = getSettingZeroOrOne('showallwords', 1);\n $showLearning = getSettingZeroOrOne('showlearningtranslations', 1);\n \n /**\n * @var int $mode_trans \n * Annotation position between 0 and 4\n */\n $mode_trans = (int) getSettingWithDefault('set-text-frame-annotation-position');\n /**\n * @var bool $ruby \n * Ruby annotations\n */\n $ruby = $mode_trans==2 || $mode_trans==4;\n\n if (!$only_body) {\n // Start the page with a HEAD and opens a BODY tag \n pagestart_nobody($title);\n }\n ?>\n <script type=\"text/javascript\" src=\"js/jquery.hoverIntent.js\" charset=\"utf-8\"></script>\n <?php \n $visit_status = getSettingWithDefault('set-text-visit-statuses-via-key');\n if ($visit_status == '') {\n $visit_status = '0';\n }\n $var_array = array(\n // Change globals from jQuery hover\n 'ANN_ARRAY' => json_decode(annotation_to_json($ann)),\n 'DELIMITER' => tohtml(\n str_replace(\n array('\\\\',']','-','^'), \n array('\\\\\\\\','\\\\]','\\\\-','\\\\^'), \n getSettingWithDefault('set-term-translation-delimiters')\n )\n ),\n 'WBLINK1' => $wb1,\n 'WBLINK2' => $wb2,\n 'WBLINK3' => $wb3,\n 'RTL' => $rtlScript,\n 'TID' => $textid,\n 'ADDFILTER' => makeStatusClassFilter((int)$visit_status),\n 'JQ_TOOLTIP' => getSettingWithDefault('set-tooltip-mode') == 2 ? 1 : 0,\n // Add new globals\n 'ANNOTATIONS_MODE' => $mode_trans,\n 'POS' => $pos\n );\n do_text_text_javascript($var_array);\n do_text_text_style($showLearning, $mode_trans, $textsize, strlen($ann) > 0);\n ?>\n\n <div id=\"thetext\" <?php echo ($rtlScript ? 'dir=\"rtl\"' : '') ?>>\n <p style=\"margin-bottom: 10px;\n <?php echo $removeSpaces ? 'word-break:break-all;' : ''; ?>\n font-size: <?php echo $textsize; ?>%; \n line-height: <?php echo $ruby?'1':'1.4'; ?>;\"\n >\n <!-- Start displaying words -->\n <?php main_word_loop($textid, $showAll); ?></span>\n </p>\n <p style=\"font-size:<?php echo $textsize; ?>%;line-height: 1.4; margin-bottom: 300px;\">&nbsp;</p>\n </div>\n <?php \n if (!$only_body) { \n pageend(); \n }\n flush();\n}", "protected function onImageText() {\n\t\tif (!$this->post = $this->loadPost()) {\n\t\t\treturn null;\n\t\t}\n\t\t$titles = post('ititle');\n\t\t$descriptions = post('idescription');\n\n\t\tforeach ($this->post->featured_images()->get() as $image) {\n\n\t\t\t$image->title = $titles[$image->id];\n\t\t\t$image->description = $descriptions[$image->id];\n\t\t\t$image->save();\n\t\t}\n\t}", "public function actionKontaktirajte_nas()\n\t{\n\t\t$this->getLang();\n\t\t$this->base('kontaktirajte_nas');\n $this->naslovStranice = 'Kontakt Info';\n\t\t$this->render('clanak');\n \n\t}", "public function sobrenos() {\n $this->load_template('sobrenos');\n }", "public function readerAction()\n {\n //Skrypt otwiera plik przesłany przez użytkownika i czyta po jednym znaku. Następnie dokleja go do zmiennej $tekst\n //Jeżeli przeczytanym znakiem będzie spacja (koniec słowa), następuje sprawdzenie czy ilość słów podanych w formularzu\n //przez użytkownika odpowiada ilości spacji (ilości słów) w zmiennej $tekst(jedna spacja to jedno słowo, dwie spacje to dwa słowa itd.)\n //Jeżeli równość jest prawdziwa tworzony jest nowy element span z zawartością zmiennej $tekst\n\n if (isset($_POST['zatwierdz'])) {\n //Pobranie pliku, ilości słów oraz czasu potrzebnego na odczytanie\n $form = (new FormBuilder())\n ->addFile('plik')\n ->addSizeOfEyeshot($_POST['ileSlow'])\n ->addTimeOfRead($_POST['ileCzasu'])\n ->buildForm();\n\n //Obiek przetwarza plik\n $reader = new Reader($form->getFile());\n $reader->generateText($form->getsizeOfEyeshot());\n }\n\n if (isset($reader)) {\n //Przekazanie do pliku widoku całego tekstu podzielonego na elementy span\n //z określoną ilością słów\n View::render('Skils/readerview.php', ['calyTekst' => @$reader->getWholeText(), 'error' => $form->getError()]);\n } else {\n View::render('Skils/readerview.php');\n }\n }", "function ToonFormulierAfspraak()\n{\n\n}", "public function passo1() {\n $this->Traducao->import('default.pot');\n }", "function cl_db_layouttxtgeracao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_layouttxtgeracao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function like_text() {\n\t\trequire HS_DOCS_API_DIR_PATH . 'admin/views/like-box.php';\n\t}", "public function mata_kuliah_jurusan(){\n\t\t\t$data['content'] = \"mk_jurusan/mata_kuliah_jurusan\";\n\t\t\t$mk = \"t_mk\";\n\t\t\t$data['mk'] = $this->m_aka->get_all($mk);\n\t\t\t$this->load->view(\"content\", $data);\n\t\t}", "public function mostrar(){\n\t\t\t\techo \"<p> Hola soy un $this->marca, modelo $this->modelo</php> \";\n\t\t\t}", "public function EditaTexto($parametros)\n\t{\n\t\t//Inclui a biblioteca do JSON\n\t\tLibFactory::getInstance(null,null,'Zend/Json.php');\n\n\t\t//Instancia o componente de validação\n\t\t$ComponenteValidacao = getComponent('validacoes/textoslayout.validacao','TextoslayoutValidacao');\n\n\t\t//total de idiomas \n\t\t$total = count(TableFactory::getInstance('WebsiteIdiomas')->getIdiomas());\n\t\t\n\t\t//Executa a Validação\n\t\t$resultado_validacao = $ComponenteValidacao->validar($parametros, $total);\n\n\t\t//Verifica o resultado da validação\n\t\tif(count($resultado_validacao) == 0)\n\t\t{\n\t\t\t//Instanciando a tabela de TextosLayouAdmin\n\t\t\t$mensagem = TableFactory::getInstance('TextosLayoutAdmin')->getLayoutTexts();\n\t\t\t$contar = 0;\n\t\t\t\n\t\t\t//Trata os dados antes de gravar no banco de dados\n\t\t\t$parametros = HelperFactory::getInstance()->TrataValor($parametros,null,null,null,true);\n\t\t\t\n\t\t\tfor($i = 1; $i <= $total; $i++)\n\t\t\t{\n\t\t\t\tif(TableFactory::getInstance('TextosLayout')->EditaTextoLayout($parametros, $i) === true)\n\t\t\t\t{\n\t\t\t\t\t$contar++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($contar == $total)\n\t\t\t{\n\t\t\t\t//Mensagem de confirmação\n\t\t\t\t$_SESSION['view_data'] = array('mensagem_confirmacao' => $mensagem[35], 'sucesso' => true);\n\t\t\t\t\t\n\t\t\t\t//Retorna para o javascript\n\t\t\t\techo Zend_Json::encode(array(\"1\"));\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Mensagem de erro\n\t\t\t\t$_SESSION['view_data'] = array('mensagem_confirmacao' => $mensagem[90], 'erro' => true);\n\t\t\t\t\n\t\t\t\t//Retorna para o javascript\n\t\t\t\techo Zend_Json::encode(array(\"1\"));\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\t\n\t\t\t//Retorna os erros da validação\n\t\t\techo Zend_Json::encode($resultado_validacao);\n\t\t}\n\t}", "public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\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\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}", "public function Teksti2(){\n\t\t$this->teksti2=(\"sot po mbahet provimi ne lenden\");\n\t\techo $this->teksti2;\n\t}", "function areatext($text,$type)\n {\n\tif($text!=null)\n\t{\n\t\tif($type='edit')\n\t\t{\n\t\t\t$valeur = htmlspecialchars(bbcodereverse(remplacer($text)));\n\t\t}\n\t\t\n\t\tif($type ='quote')\n\t\t{\n\t\t\t$valeur =\"[quote]\";\n\t\t\t$valeur .=htmlspecialchars(bbcodereverse(remplacer($text)));\n\t\t\t$valeur .=\"[/quote]\";\n\t\t}\n\t}\n\t\t\t\t\t$textarea .='<tr class=\"title2\">';\n\t\t\t\t\t$textarea .='<td colspan=\"2\" height=\"25px\">';\n\t\t\t\t\t$textarea .='<ul class=\"balise\">';\n\t\t\t\t\t//\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[b]cry[/b]')\\\"><b>G</b></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[u]cry[/u]')\\\"><span style=\\\"text-decoration:underline;\\\">S</span></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[s]cry[/s]')\\\"><span style=\\\"text-decoration: line-through;\\\">S</span></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[i]cry[/i]')\\\"><i>I</i></div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[url]adresse de l url[/url]')\\\">insérer une adresse url</div></li>\";\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[image]adresse de l image[/image]')\\\">insérer une image</div></li>\";\n\t\t\t\t\t//les couleurs\n\t\t\t\t\t$textarea .=\"<li>\";\n\t\t\t\t\t$textarea .=\"<select>\";\n\t\t\t\t\t$textarea .=\"<OPTION VALUE=\\\"rouge\\\" onClick=\\\"addForum('[color=red]cry[/color]')\\\"><span style=\\\"color:red;\\\">rouge</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"bleu\\\" onClick=\\\"addForum('[color=blue]cry[/color]')\\\"><span style=\\\"color:blue;\\\">bleu</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"vert\\\" onClick=\\\"addForum('[color=green]cry[/color]')\\\"><span style=\\\"color:green;\\\">vert</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"lime\\\" onClick=\\\"addForum('[color=lime]cry[/color]')\\\"><span style=\\\"color:lime;\\\">lime</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"jaune\\\" onClick=\\\"addForum('[color=jaune]cry[/color]')\\\"><span style=\\\"color:yellow;\\\">jaune</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"orange\\\" onClick=\\\"addForum('[color=orange]cry[/color]')\\\"><span style=\\\"color:orange;\\\">orange</span></OPTION>\n\t\t\t\t\t\t\t\t\t<OPTION VALUE=\\\"autres\\\" onClick=\\\"addForum('[color=#]cry[/color]')\\\">Autres</OPTION>\";\n\t\t\t\t\t// $textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[color]votre texte[/color]')\\\">couleur</div></li>\";\n\t\t\t\t\t$textarea .=\"</select>\";\n\t\t\t\t\t$textarea .=\"</li>\";\n\t\t\t\t\t//fin des couleurs\n\t\t\t\t\t$textarea .=\"<li><div class=\\\"balise\\\" onClick=\\\"addForum('[list][*][*][*][/list]')\\\">insérer une list</div></li>\";\n\t\t\t\t\t//\n\t\t\t\t\t$textarea .='</ul>';\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='</tr>';\n\t\t\t\t\t$textarea .= $error2;\n\t\t\t\t\t$textarea .='<tr>';\n\t\t\t\t\t$textarea .='<td>';\n\t\t\t\t\t$textarea .='<h2>Smiley</h2>';\n\t\t\t\t\t$textarea .=\"<p><table>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/cry.png\\\" alt=\\\"pleuré\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]cry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/dangerous.png\\\" alt=\\\"Dangereux\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]dangerous[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/evil.png\\\" alt=\\\"demon\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]evil[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>cry</td>\n\t\t\t\t\t\t\t\t\t\t<td>dangerous</td>\n\t\t\t\t\t\t\t\t\t\t<td>evil</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/gomennasai.png\\\" alt=\\\"gomennasai\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]gomennasai[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/hoho.png\\\" alt=\\\"hoho\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]hoho[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/nyu.png\\\" alt=\\\"nyu\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]nyu[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>gomennasai</td>\n\t\t\t\t\t\t\t\t\t\t<td>hoho</td>\n\t\t\t\t\t\t\t\t\t\t<td>nyu</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/reallyangry.png\\\" alt=\\\"en colere\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]reallyangry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/shamed.png\\\" alt=\\\"géné\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]shamed[/smiley]')\\\" /></td>\t\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/socute.png\\\" alt=\\\"adoré\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]socute[/smiley]')\\\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>reallyangry</td>\n\t\t\t\t\t\t\t\t\t\t<td>shamed</td>\t\n\t\t\t\t\t\t\t\t\t\t<td>socute</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/sorry.png\\\" alt=\\\"désolé\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]sorry[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/what.png\\\" alt=\\\"quoi\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]what[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td><img src=\\\"images/Games/emoticones/xd.png\\\" alt=\\\"xd\\\" width=\\\"50\\\" height=\\\"50\\\" onClick=\\\"addForum('[smiley]xd[/smiley]')\\\" /></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>sorry</td>\n\t\t\t\t\t\t\t\t\t\t<td>what</td>\n\t\t\t\t\t\t\t\t\t\t<td>xd</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table></p>\";\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='<td>';\n\t\t\t\t\t$textarea .='<h2>message</h2>';\n\t\t\t\t\t$textarea .='<p><TEXTAREA name=\"messages\" id=\"messages\" rows=20 COLS=80>'.$valeur.'</TEXTAREA></p>';\n\t\t\t\t\t$textarea .='</td>';\n\t\t\t\t\t$textarea .='</tr>';\n\t\t\t\t\t\n\treturn $textarea;\n}", "function viewAction(){\r\n\t\t//$iUnitId = Sys_Publib_Library::_getItemAttrById($_SESSION['arr_all_staff'],$_SESSION['staff_id'],'unit_id');\r\n\t\t//Lay ID phong ban cua NSD dang nhap hien thoi\r\n\t\t$pUrl = $_SERVER['REQUEST_URI'];\r\n\t\t$objFunction =\tnew\tSys_Function_DocFunctions()\t;\r\n\t\t$objFilter = new Zend_Filter();\t\t\t\r\n\t\t// Tieu de man hinh danh sach\r\n\t\t$this->view->docInfo \t\t= \"THÔNG TIN VĂN BẢN\";\r\n\t\t$sDocumentId = $this->_request->getParam('hdn_object_id','');\r\n\t\t$sType\t\t = $this->_request->getParam('hdn_type','');\r\n\t\t//Lay cac hang so dung chung\r\n\t\t$arrConst = Sys_Init_Config::_setProjectPublicConst();\r\n\t\t$this->view->arrConst = $arrConst;\r\n\t\t// Tao doi tuong Zend_Filter\r\n\t\t$objFilter = new Zend_Filter();\r\n\t\t$ojbSysLib = new Sys_Library();\r\n\t\t$objFullTextSearch = new fulltextsearch_modFulltextsearch();\r\n\t\t//Lay thong tin trong danh muc\r\n\t\t$arrDocSingle = $objFullTextSearch->DocFullTextSearchDocGetSingle($sDocumentId, $sType);\t\t\t\r\n\t\t$this->view->arrDocSingle = $arrDocSingle;\r\n\t\t//Lay gia tri tim kiem tren form\r\n\t\t\t$sfullTextSearch \t= $this->_request->getParam('txtfullTextSearch','');\r\n\t\t\t$iYear\t \t\t\t= $this->_request->getParam('year','');\r\n\t\t\t$iCurrentPage\t\t= $this->_request->getParam('hdn_current_page',0);\t\r\n\t\t\tif ($iCurrentPage <= 1){\r\n\t\t\t\t$iCurrentPage = 1;\r\n\t\t\t}\r\n\t\t\t$iNumRowOnPage = $this->_request->getParam('cbo_nuber_record_page',0);\r\n\t\t\tif ($iNumRowOnPage == 0)\r\n\t\t\t\t$iNumRowOnPage = 15;\r\n\t\t\t$arrParaSet = array(\"trangHienThoi\"=>$iCurrentPage, \"soBanGhiTrenTrang\"=>$iNumRowOnPage,\"chuoiTimKiem\"=>$sfullTextSearch,\"Nam\"=>$iYear);\r\n\t\t\t$_SESSION['seArrParameter'] = $arrParaSet;\t\r\n\t\t\r\n\t}", "public function getTextEntity();", "public function verAction()\n {\n $view = new ViewModel();\n \n $this->layout()->clase = 'buscar';\n $filtered = $this->params()->fromQuery('q');\n $paginas = $this->params()->fromQuery('page');\n $valor = explode(\" \", $filtered);\n //var_dump($valor);exit;\n if($valor[0]=='restaurante:')\n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3].' '.$valor[4]; \n $texto = $valor[0].'\"'.$buscar.'\"';\n $distrito = '';\n $ruta = $this->_options->data->busqueda .'/busqueda_movil.txt';\n $fp = fopen($ruta,\"a\");\n fwrite($fp, \"$buscar , $distrito\" . PHP_EOL);\n fclose($fp); } \n elseif($valor[0]=='tag:') \n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3];\n $texto = $valor[0].'\"'.$buscar.'\"';}\n elseif($valor[0]=='name:')\n {$buscar = $valor[1].' '.$valor[2].' '.$valor[3].' '.$valor[4];\n $texto = $valor[0].'\"'.$buscar.'\"'; }\n else{ $filtered = strtoupper($filtered);\n $filter = new \\Zend\\I18n\\Filter\\Alnum(true);\n $text = trim($filter->filter($filtered));\n $text = preg_replace('/\\s\\s+/', ' ', $text);\n $busqueda = explode(\" EN \", $text);\n if($this->getRestauranteTable()->ubigeototal2($busqueda[1])>0){\n $distrito=$busqueda[1]; \n }\n\n \n $texto = $busqueda[0];\n $ruta = $this->_options->data->busqueda .'/busqueda_movil.txt';\n $fp = fopen($ruta,\"a\");\n fwrite($fp, \"$texto , $distrito\" . PHP_EOL);\n fclose($fp);\n }\n if($distrito=='LIMA' or $distrito=='lima')\n {$limite = 10;\n if($paginas=='')\n {$start = 0;}\n else{$start=($paginas-1)*10;}\n $resultados = false;\n $buscarsolar= '(('.$texto.') AND en_destaque:si)^100 OR ('.$texto.')';\n $palabraBuscar = isset($buscarsolar) ? $buscarsolar : false;\n $fd = array(\n 'fq' => 'en_estado:activo AND restaurant_estado:activo AND departamento:' .$distrito,\n );\n if ($palabraBuscar == '') {\n $this->redirect()->toUrl('/');\n }\n \n \n if ($palabraBuscar) {\n $solar = \\Classes\\Solr::getInstance()->getSolr();\n if (get_magic_quotes_gpc() == 1) {\n $palabraBuscar = stripslashes($palabraBuscar);\n }\n try {\n $resultados = $solar->search($palabraBuscar,$start, $limite, $fd);\n } catch (Exception $e) {\n $this->redirect()->toUrl('/');\n }\n }\n\n }\n else\n {\n $limite = 10;\n if($paginas=='')\n {$start = 0;}\n else{$start=($paginas-1)*10;}\n $resultados = false;\n $buscarsolar= '(('.$texto.') AND en_destaque:si)^100 OR ('.$texto.')';\n $palabraBuscar = isset($buscarsolar) ? $buscarsolar : false;\n $distrito = ($distrito) ? ' AND distrito:' . $distrito : '';\n $fd = array(\n 'fq' => 'en_estado:activo AND restaurant_estado:activo' . $distrito\n );\n if ($palabraBuscar == '') {\n $this->redirect()->toUrl('/');\n }\n \n \n if ($palabraBuscar) {\n $solar = \\Classes\\Solr::getInstance()->getSolr();\n if (get_magic_quotes_gpc() == 1) {\n $palabraBuscar = stripslashes($palabraBuscar);\n }\n try {\n $resultados = $solar->search($palabraBuscar,$start, $limite, $fd);\n } catch (Exception $e) {\n $this->redirect()->toUrl('/');\n }\n }\n\n \n } \n \n \n \n $form = new Formularios();\n \n if($valor[0]=='restaurante:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n elseif($valor[0]=='tag:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n elseif($valor[0]=='name:')\n {\n $form->get('q')->setValue($filtered);\n $valores = $buscar;\n }\n else {setcookie('q', $text);\n $form->get('q')->setValue($text);\n $valores = $texto;\n }\n $form->get('submit')->setValue('Buscar');\n $paginator = new \\Zend\\Paginator\\Paginator(new \\Zend\\Paginator\\Adapter\\ArrayAdapter($resultados->response->docs));\n $paginator->setCurrentPageNumber((int) $this->params()\n ->fromQuery('page', 1));\n $paginator->setItemCountPerPage($limite);\n \n if($_GET['callback'])\n {\n $view = new ViewModel();\n header('Content-type: application/x-javascript');\n header(\"Status: 200\");\n echo \"jsonpCallback(\".$resultados->getRawResponse().\")\";\n\n exit();\n $view->setTerminal(true);\n return $view;\n }\n \n if ($resultados)\n {\n $total = (int) $resultados->response->numFound;\n $end = count($resultados->response->docs)+$start;\n $inicio = $start+1; \n } \n if ($total <= 10) {\n //$mostrar = 'Mostrando ' . $inicio . ' - ' . $end . ' de ' . $total . ' resultados';\n $mostrar = $total . ' resultados';\n } else {\n // $mostrar = 'Mostrando ' . $inicio . ' - ' . $end . ' de ' . $total . ' resultados';\n $mostrar = $total . ' resultados';\n }\n $listatot = $this->getConfigTable()->cantComentxPlato();\n $listatot = $listatot->toArray();\n \n foreach ($listatot as $key => $value) {\n if ($key < 3) {\n $listades[] = $listatot[$key];\n } else {\n $listadeseg[] = $listatot[$key];\n }\n }\n $view->setVariables(array(\n 'total' => $total,\n 'lista' => $listades,\n 'destacados' => $results,\n 'general' => $paginator,\n 'form' => $form,\n 'nombre' => $text,\n 'masplatosdestacados'=>$consultafinal,\n 'plato' => $valores,\n 'mostrar' => $mostrar,\n 'plat'=>$filtered\n \n ));\n return $view;\n }", "function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }", "public function tutti()\n {\n\n $utentiDao = new AutoreDao();\n $res = $utentiDao->read();\n\n $view = new ViewCore();\n echo $view->render(\n 'gestione_utenti\\tutti_gli_utenti.html',\n ['autori' => $res]\n );\n\n\n\n //print_r($twig);\n }", "public function waktu_nilai(){\n\t\t$t_waktu = \"t_waktu_nilai\";\n\t\t$data['waktu'] = $this->m_aka->get_all($t_waktu);\n\t\t$data['content'] = \"mahasiswa/waktu_nilai\";\n\t\t$this->load->view(\"content\", $data);\n\t}", "public function getTiposDoc(){\n $params->Auth->Token = $this->TA->credentials->token;\n $params->Auth->Sign = $this->TA->credentials->sign;\n $params->Auth->Cuit = self::CUIT;\n $results = $this->client->FEParamGetTiposDoc($params);\n \n $e = $this->_checkErrors($results, 'FEParamGetTiposDoc');\n echo $e;\n $X=$results->FEParamGetTiposDocResult;\n $Texto=\" comprobantes\";\n //$fh=fopen(\"TiposDoc.txt\",\"w\");\n foreach ($X->ResultGet->DocTipo AS $Y) {\n //fwrite($fh,sprintf(\"%5s %-30s\\n\",$Y->Id, $Y->Desc));\n $Texto .= $Y->Id .' '.$Y->Desc;\n }\n //fclose($fh);\n return $Texto;\n }", "private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}", "function textus_get_text($id, $type) {\n $request = new get_text_controller();\n $text = $request->ol_get_text($id, $type);\n\n if ($text['error']) {\n return $text['error'];\n }\n else{\n return $text['data'];\n }\n}", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "public function show():string {\n //// vsechna data sablony budou globalni\n global $tplData;\n $tplData = [];\n/*\n echo $this->idclanky;\n print_r($_POST);\n print_r($_FILES);\n*/\n if(isset($_POST[\"ulozit\"])){ //ukládání | update\n\n if(isset($_FILES[\"soubor\"]) && !empty($_FILES[\"soubor\"][\"name\"])){\n $nahrani = nahrani_souboru($_FILES[\"soubor\"]);\n }else{\n $nahrani[\"hlaska\"] = \"\";\n $nahrani[\"jak\"] = true;\n $nahrani[\"nazev_souboru\"] = \"\";\n }\n\n strip_tags($nahrani[\"nazev_souboru\"]);\n strip_tags($_POST[\"titulek\"]);\n\n if($nahrani[\"jak\"]){\n if($this->idclanky == 0){\n $nahrani[\"jak\"] = $this->db->insertClanek($nahrani[\"nazev_souboru\"], $_POST[\"titulek\"], $_POST[\"text\"], $this->iduzivatele);\n }else{\n $nahrani[\"jak\"] = $this->db->updateClanek($nahrani[\"nazev_souboru\"], $_POST[\"titulek\"], $_POST[\"text\"], $this->idclanky);\n }\n }\n\n if($nahrani[\"jak\"]){\n $nahrani[\"hlaska\"] .= \"Úspěšně uloženo\";\n }\n }\n\n\n $tplData['clanek'] = $this->db->getClanky($this->idclanky);\n\n if(array_key_exists('clanek', $tplData) && !empty($tplData['clanek']) && !empty($tplData['clanek'][0]['idclanky']) ) {\n $update = true;\n }else{\n $update = false;\n }\n\n if($this->login->isUserLoged() && aktualni_prava(array(2), $this->db, $this->login)){\n $editable = true;\n if($update && $tplData['clanek'][0]['autor'] != $this->iduzivatele ){\n $editable = false;\n }\n }else{\n $editable = false;\n }\n\n $uzivatel_muze_pridat_recenci = false;\n if(!$editable && !empty($this->idclanky)){\n $uzivatel_muze_pridat_recenci = $this->db->muzeUzivatelPridatRecenzi($this->iduzivatele, $this->idclanky);\n\n $tplData[\"hodnoceni\"] = $this->db->getHodnoceniByIdclanky($this->idclanky);\n $tplData['recenzenti'] = $this->db->getUzivateleByPravo(3);\n }\n\n ob_start();\n if($editable)\n require(DIRECTORY_VIEWS .\"/ClanekEditTemplate.tpl.php\");\n else\n require(DIRECTORY_VIEWS .\"/ClanekDetailTemplate.tpl.php\");\n $obsah = ob_get_clean();\n\n // vratim sablonu naplnenou daty\n return $obsah;\n }", "public function index()\n {\n \t//Obtenemos todos los archivos almacenados\n $archivos = Storage::disk('local')->files();\n //Filtramos los archivos, y nos quedamos sólo con los txt\n $archivos_txt = array_filter($archivos, function ($item) {return strpos($item, 'txt');});\n //Les quitamos la extensión\n $archivos_txt = array_map(function ($item){return substr($item,0, -4);}, $archivos_txt);\n //Mostramos la vista\n return View::make(\"listTxt\", compact('archivos_txt'));\n }", "function index() {\n \n $this->view->set('textData', $this->model->textData());\n\t\t$this->view->render('index/index');\n\t}", "public function p_add_text(){\n\t\t$_POST['uploaded_by'] = $this->user->user_id;\t\t\n\t\t# Create created and modified timestamps\n\t\t$_POST['date_uploaded'] = Time::now();\n\t\t$time_added = $_POST['date_uploaded'];\n\t\t$ext = $_POST['extension'];\n\t\tDB::instance(DB_NAME)->insert('photos', $_POST);\t\t\n\t\t$where_condition = \"SELECT photo_id FROM photos WHERE date_uploaded =\".$time_added;\n\t\t\n\t\t$last_photo = DB::instance(DB_NAME)->select_field($where_condition);\n\t\t$old_name = \"uploads/images/temp.\".$ext;\n\t\t$new_name = \"uploads/images/\".$last_photo.\".\".$ext;\t\n\t\trename($old_name, $new_name);\t\t\t\t\n\t\tunlink(\"uploads/images/temp.\".$ext);\n\t\t/*$thumb_nail = \"uploads/thumbnails/\".$last_photo.\".\".$ext;\n\t\tcopy($new_name, $thumb_nail);\n\t\tsave_image($thumb_nail, \"10\");*/\n\t\t\n\t}", "public function executeLoadAllText(sfWebRequest $request) {\n $addTextObj = new AddText();\n $result = AdditionalTextTable::instance()->getAllAdditionalTextes();\n $json_result = $addTextObj->buildAllText($result, $this->getContext());\n $this->renderText('{\"result\":'.json_encode($json_result).'}');\n return sfView::NONE;\n }", "public function editaTexto($parametros)\n\t{\n\t\tLibFactory::getInstance(null,null,'Zend/Json.php');\n\n\t\t//Instancia o componente de validação\n\t\t$ComponenteValidacao = getComponent('validacoes/textos.validacao','TextosValidacao');\n\n\t\t//total de idiomas\n\t\t$total = count(TableFactory::getInstance('WebsiteIdiomas')->getIdiomas());\n\n\t\t//Executa a Validação\n\t\t$resultado_validacao = $ComponenteValidacao->validar($parametros, $total);\n\n\t\t//Verifica o resultado da validação\n\t\tif(count($resultado_validacao) == 0)\n\t\t{\n\t\t\t//Trata os dados antes de gravar no banco de dados\n\t\t\t$parametros = HelperFactory::getInstance()->TrataValor($parametros,null,null,null,true);\n\t\t\t\t\n\t\t\tfor($i = 1; $i <= $total; $i++)\n\t\t\t{\n\t\t\t\t//salva os dados atualizados\n\t\t\t\tTableFactory::getInstance('Textos')->ExecuteEditaTexto($parametros, $i);\n\t\t\t}\n\t\t\t\t\n\t\t\t//Busca os textos de erro\n\t\t\t$erro = TableFactory::getInstance('TextosLayoutAdmin')->getLayoutTexts();\n\t\t\t\t\n\t\t\t//Mensagem de confirmação via SESSION(usar sempre o indice view_data)\n\t\t\t$_SESSION['view_data'] = array('mensagem_confirmacao' => $erro[35]);\n\n\t\t\t//Retorna o resultado da atualização do texto\n\t\t\techo Zend_Json::encode(array(\"1\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Retorna os erros da validação\n\t\t\techo Zend_Json::encode($resultado_validacao);\n\t\t}\n\t}", "public function contato() {\n $this->load_template('contato');\n }", "public function create_avaliation_text()\n {\n\n # The form was submitted?\n if( $this->input->post() )\n {\n $avaliation_text = new Avaliation_Text();\n $avaliation_text->avaliation = $this->input->post('avaliation');\n $avaliation_text->text = $this->input->post('text');\n\n # The data was saved?\n if( $avaliation_text->save() )\n {\n $this->session->set_flashdata('success', 'Salvo com sucesso');\n redirect(\"admin/curadoria/edit_avaliation_text/{$avaliation_text->id}\");\n }else{\n $this->session->set_flashdata('error', $avaliation_text->error->transaction);\n redirect(site_url('admin/curadoria/create_avaliation_text'));\n }\n }else{\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => '#',\n 'Textos de avaliação' => site_url('admin/curadoria/avaliation_texts'),\n 'Editar' => '#'\n );\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/create_avaliation_text');\n }\n }", "public function edit_toko(){\n\t}", "public function masodik()\n {\n }", "public function print()\n {\n \t$id = request()->input('id');\n\n \t//ambil data pendaftaran kp dengan id tersebut\n \t$ujian_skripsi = ujian_skripsi::find($id);\n\n $templateProcessor = new \\PhpOffice\\PhpWord\\TemplateProcessor(\n storage_path('app\\public\\form\\ujian_skripsi.docx')\n );\n $pathSaveFile = storage_path('app\\public\\results\\ujian_skripsi-'.$ujian_skripsi->user->npm.'.docx');\n\n $templateProcessor->setValue('nama', $ujian_skripsi->user->nama);\n $templateProcessor->setValue('npm', $ujian_skripsi->user->npm);\n $templateProcessor->setValue('dosen_pa', $ujian_skripsi->user->dosen->nama);\n $templateProcessor->setValue('nip_pa', $ujian_skripsi->user->nip);\n\n $templateProcessor->setValue('judul', $ujian_skripsi->judul);\n $templateProcessor->setValue('ketua_penguji', $ujian_skripsi->ketua_penguji);\n $templateProcessor->setValue('nip_ketua_penguji', $ujian_skripsi->nip_ketua_penguji);\n $templateProcessor->setValue('status_dosen2', $ujian_skripsi->status_dosen2);\n $templateProcessor->setValue('nama_dosen2', $ujian_skripsi->nama_dosen2);\n $templateProcessor->setValue('nip_dosen2', $ujian_skripsi->nip_dosen2);\n $templateProcessor->setValue('penguji', $ujian_skripsi->penguji);\n $templateProcessor->setValue('nip_penguji', $ujian_skripsi->nip_penguji);\n $templateProcessor->setValue('tanggal_berkas ', $ujian_skripsi->tanggal_berkas );\n $templateProcessor->setValue('hari', $ujian_skripsi->hari);\n $templateProcessor->setValue('tanggal', $ujian_skripsi->tanggal);\n $templateProcessor->setValue('pukul', $ujian_skripsi->pukul);\n $templateProcessor->setValue('ruang', $ujian_skripsi->ruang);\n $templateProcessor->saveAs($pathSaveFile);\n\n \treturn response()->download($pathSaveFile)->deleteFileAfterSend(true);\n }", "public static function text() {}", "public function luu_tt_sanpham()\n\t\t{\n\t\t\t//lay du lieu tu view \n\t\t\tif (isset($_POST['tensanpham'])&& isset($_POST['tenloaisanpham'])&& isset($_POST['img'])&& isset($_POST['mota'])&& isset($_POST['baohanh'])&& isset($_POST['gia'])){\n\t\t\t\t//goi ham luu data cua model san pham\n\t\t\t\t$this->tensanpham = $_POST['tensanpham'];\n\t\t\t\t$this->id_loaisp = $_POST['tenloaisanpham'];\n\t\t\t\t$this->img = $_POST['img'];\n\t\t\t\t$this->mota = $_POST['mota'];\n\t\t\t\t$this->baohanh = $_POST['baohanh'];\n\t\t\t\t$this->gia = $_POST['gia'];\n\t\t\t\t//goi ham luu data cua model sanpham\n\t\t\t\t$kq = $this->sanpham_model->insert_sanpham($this->tensanpham,$this->id_loaisp,$this->img,$this->mota,$this->baohanh,$this->gia);\n\t\t\t\tif ($kq) {\n\t\t\t\t\techo 'luu du lieu thanh cong -- sanphamcontroller';\n\t\t\t\t} else {\n\t\t\t\t\techo'luu du lieu that bai -- sanphamcontroller';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo 'ban chua nhap du lieu -- sanphamcontroller';\n\t\t\t}\t\t\t\n\t\t}", "public function Television() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Service-Co');\n\t\t\t$plantilla->Parametro('avisos', array_chunk($this->Modelo->avisos(), 4));\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Television.html')));\n\t\t}", "protected function editar()\n {\n }", "function TablaVentasGeneral()\n {\t\n\t //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE VENTAS',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(27,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(27,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(52,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(27,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n\t\n }", "public function enviarRecomendacion()\n {\n\n $cuerpo=$_POST['textarea'];\n $datos=$this->modelo->guardarRecomendacion($cuerpo);\n \n }", "function negrita($text){\r\n return \"<strong>$text</strong>\";\r\n }", "private function obter_texto_secao()\n\t{\n\t\t$id = $this->request->param('id_secao_texto');\n\n\t\t$texto_secao = ORM::factory('Secao_Texto', $id);\n\t\tif ( ! $texto_secao->loaded()) {\n\t\t\tthrow new RuntimeException('Texto da Seção inválida');\n\t\t}\n\t\tif ($texto_secao->id_secao != $this->request->param('id_secao')) {\n\t\t\tthrow new RuntimeException('Texto nao pertence à seção informada.');\n\t\t}\n\t\tif ($texto_secao->secao->id_aula != $this->request->param('id_aula')) {\n\t\t\tthrow new RuntimeException('Seção nao pertence à aula informada.');\n\t\t}\n\t\t/*\n\t\tif ($texto_secao->secao->aula->id_usuario != Auth::instance()->get_user()->pk()) {\n\t\t\tthrow new RuntimeException('Aula nao pertence ao usuario logado');\n\t\t}\n\t\t*/\n\t\treturn $texto_secao;\n\t}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "function TablaVentasFechas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO DE VENTAS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"].'',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(27,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarVentasFechas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(27,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(52,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(27,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function setText($text)\r\n {\r\n $this->text = nl2br($text);\r\n $this->wordCount = str_word_count($text);\r\n }", "public function hacer(){\n // renderizamos vista\n require_once 'views/pedido/hacer.php';\n }", "public function Preferiti() {\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ut = $pm->loadById(\"utente\", $idutente);\n $ricette = $ut->getPreferiti();\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non hai ricette preferite\";\n }\n $view = new VPreferiti();\n $view->mostraPreferiti($ricette, $msg);\n\n } else {\n header('Location: /myRecipes/web/Utente/Login');\n }\n }", "public function execIndexFulltext() {\n\t\t$pdf = escapeshellarg($this->getPdfPath());\n\t\t$len = 0;\n\n\t\tfor($p=1; $p<=$this->pocet_stran; $p++)\n\t\t{\n\t\t\t$outputarr = array();\n\t\t\texec(\"pdftotext -f $p -l $p $pdf -\", $outputarr, $returnval);\n\t\t\t$output = implode(\"\\n\", $outputarr);\n\n\t\t\t//save only meaningful content AND title page for note=already indexed\n\t\t\tif(trim($output) OR $p==1){\n\t\t\t\tdibi::query('REPLACE INTO `fulltext`', array('cislo_id' => $this->id, 'strana'=>$p, 'text'=>trim($output)));\n\t\t\t\t$len += strlen($output);\n\t\t\t}\n\t\t}\n\t\treturn $len;\n\t}", "public function tampil()\n\t{\t\n\t\t\n\t\t$this->session->set_userdata(\"judul\",\"Data Master\");\n\t\t$ba = [\n\t\t'judul' => \"Data Master\",\n\t\t'subjudul' => \"Pasien\",\n\t\t];\n\t\t$d = [\n\t\t'gelar' => $this->pasien->get_enum(\"srk_pasien\", \"psn_gelar\"),\n\t\t'jk' => $this->pasien->get_enum(\"srk_pasien\", \"psn_jk\"),\n\t\t'jkitas' => $this->pasien->get_enum(\"srk_pasien\", \"psn_jkitas\"),\n\t\t];\n\t\t$this->load->helper('url');\n\t\t$this->load->view('background_atas', $ba);\n\t\t$this->load->view('pasien',$d);\n\t\t$this->load->view('background_bawah');\n\t}", "public function dokumen($teks)\n {\n $teks = strtolower($teks);\n\n //bersihkan tanda baca, ganti dengan space \n $teks = str_replace(\".\", \" \", $teks);\n $teks = str_replace(\",\", \" \", $teks); \n $teks = str_replace(\"/\", \" \", $teks);\n $teks = str_replace(\"}\", \" \", $teks); \n $teks = str_replace(\"{\", \" \", $teks); \n $teks = str_replace(\"]\", \" \", $teks);\n $teks = str_replace(\"[\", \" \", $teks); \n $teks = str_replace(\":\", \" \", $teks);\n $teks = str_replace(\"=\", \" \", $teks); \n $teks = str_replace('\"', \" \", $teks); \n $teks = str_replace(\"+\", \" \", $teks);\n $teks = str_replace(\"-\", \" \", $teks); \n $teks = str_replace(\"?\", \" \", $teks); \n $teks = str_replace(\"!\", \" \", $teks);\n $teks = str_replace(\"$\", \" \", $teks);\n $teks = str_replace(\"(\", \" \", $teks);\n $teks = str_replace(\")\", \" \", $teks);\n $teks = trim($teks);\n\n //mengecek abstrak yang mengandung stoplist dari database 'stopwords'\n $astoplist = Stopword::all();\n \n foreach ($astoplist as $word) {\n //cara cek nya yaitu tiap kalimat di abstrak di potong per-string (pake fungsi rtrim)\n $word = rtrim($word->stoplist);\n //kalo udah di trim, kata stoplist yang terbaca diganti dengan white space\n $teks = preg_replace(\"/\\b$word\\b/i\", \" \", $teks);\n }\n\n $teks = trim(preg_replace('/[^a-zA-Z0-9 -]/', '', $teks));\n $teks = trim(preg_replace('/[0-9]/', '', $teks));\n $teks = trim(preg_replace('/\\s\\s+/', ' ', str_replace(\"\\n\", \" \", $teks)));\n // <([0-9a-f]{4})>\\s+<([0-9a-f]{4})>\\s+<([0-9a-f]{4})>\n // $teks = trim(preg_replace('//', '', $teks));\n // $teks = preg_replace('/[^a-zA-Z0-9 -]/', '', $teks);\n // $teks = trim(preg_replace('/\\b(\\w+)\\s+\\1\\b/', \" \", $teks));\n\n // foreach ($teks as $jajan) {\n // $teks = preg_replace('/(\\w{2,})(?=.*?\\\\1)\\W*/', '', $jajan);\n // }\n\n \n $teks = $this->porterstemmer_process($teks);\n return $teks;\n }", "public function isi_t_kuota_matkul_pilihan(){\n\t\t$kode = $this->uri->segment(3);\n\t\t$data['data']= $this->m_aka->isi_t_edit_kuota_matkul_pilihan();\t\t\n\t\t$data['kelas'] = $this->m_aka->kelas();\t\t\n\t\t$data['content'] = 'mata_kuliah/isi_kuota_mata_kuliah_pilihan';\n\t\t$this->load->view('content',$data);\t\t\n\t}", "function dire($texte,$signature='', $voice='')\n { \n if ($signature != '') {\n $this->url .='&tts='.rawurlencode('Message de '.stripslashes(trim($signature)).' : ').rawurlencode(stripslashes(trim($texte)));\n } else {\n $this->url .='&tts='.rawurlencode(stripslashes(trim($texte)));\n }\n //Pour le francais on ne prends pas la voix par defaut (preference personnelle ;)\n if ($voice == '' && $this->lang==\"fr\") $voice='claire22k';\n if ($voice == '' && $this->lang==\"us\") $voice='heather22k';\n \n if ($voice != '') {\n $this->url .='&voice='.$voice;\n }\n }", "function mots_indexation_ext($texte, $min_long = 3) {\n\tinclude_spip('inc/charsets');\n\tinclude_spip('inc/texte');\n\n\t// Point d'entree pour traiter le texte avant indexation\n\t$texte = pipeline('pre_indexation', $texte);\n\n\t// Recuperer les parametres des modeles\n\t$texte = traiter_modeles($texte, true);\n\t\n\t// Supprimer les tags HTML\n\t$texte = preg_replace(',<.*>,Ums',' ',$texte);\n\n\t// Translitterer (supprimer les accents, recuperer les &eacute; etc)\n\t// la translitteration complexe (vietnamien, allemand) duplique\n\t// le texte, en mettant bout a bout une translitteration simple +\n\t// une translitteration riche\n\tif ($GLOBALS['translitteration_complexe'])\n\t\t$texte_c = ' '.translitteration_complexe ($texte, 'AUTO', true);\n\telse\n\t\t$texte_c = '';\n\t$texte = translitteration($texte);\n\tif($texte!=trim($texte_c)) $texte .= $texte_c;\n\t# NB. tous les caracteres non translitteres sont retournes en utf-8\n\n\t// OPTIONNEL // Gestion du tiret '-' :\n\t// \"vice-president\" => \"vice\"+\"president\"+\"vicepresident\"\n#\t$texte = preg_replace(',(\\w+)-(\\w+),', '\\1 \\2 \\1\\2', $texte);\n\n\t// Supprimer les caracteres de ponctuation, les guillemets...\n\t$e = \"],:;*\\\"!\\r\\n\\t\\\\/)}{[|@<>$%'`?\\~.^(\";\n\t$texte = strtr($texte, $e, ereg_replace('.', ' ', $e));\n\n\t//eliminare +\\- non all'inizio di una parola\n\t$texte = preg_replace(\",(?:\\S)[\\-+],\",\" \",$texte);\n\t// Cas particulier : sigles d'au moins deux lettres\n\t$texte = preg_replace(\"/ ([A-Z][0-9A-Z]{1,\".($min_long - 1).\"}) /\",\n\t\t' \\\\1___ ', $texte.' ');\n\n\t// Tout passer en bas de casse\n\t$texte = strtolower($texte);\n\n\t// Retourner sous forme de table\n\treturn preg_split(\"/ +/\", trim($texte));\n}", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "function TablaVentasDiariasAdmin()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO DE VENTAS GENERAL DEL DIA '.date(\"d-m-Y\"),0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentasDiarias();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$PagototalCompras=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago'];\n $PagototalCompras+=$reg[$i]['totalpago2']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n\t$UtilidadBruto= $Pagototal-$PagototalCompras;\n\t$MargenBruto = ( $UtilidadBruto == '' ? \"0.00\" : number_format($UtilidadBruto/$PagototalCompras, 2, '.', ','));\n\t\n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n\t$this->Cell(35,5,'',0,0,'C');\n\t$this->Cell(15,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(22,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(37,5,\"TOTAL GANANCIAS\",1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(30,5,utf8_decode(number_format($MargenBruto*100, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function escreverTexto($sText) {\n\n /**\n * Aplicando negrito\n */\n $sText = str_replace(\"<b>\", chr(27) . chr(69), $sText);\n $sText = str_replace(\"</b>\", chr(27) . chr(70), $sText);\n /**\n * Aplicando italico\n */\n $sText = str_replace(\"<i>\", chr(27) . chr(52), $sText);\n $sText = str_replace(\"</i>\", chr(27) . chr(53), $sText);\n /**\n * Aplicando sublinhado\n */\n $sText = str_replace(\"<s>\", chr(27) . chr(45) . \"1\", $sText);\n $sText = str_replace(\"</s>\", chr(27) . chr(45) . \"0\", $sText);\n \n // $sText = $this->truncarLinhas($sText,48);\n $sText = $this->strToAsc($sText);\n \n $sComando = chr(27) . str_replace(\"\\n\", chr(10), $sText);\n parent::addComando($sComando);\n \n }", "public function lerArquivoLog(){\n $ponteiro = fopen(\"C:\\\\temp\\\\teste2.txt\", \"r\");\n\n //Abre o aruqivo .txt\n while(!feof($ponteiro)) {\n $linha = fgets($ponteiro, 4096);\n //Imprime na tela o resultado\n $this->pulaLinha();\n }\n //Fecha o arquivo\n fclose($ponteiro);\n }", "function tampil(){\n\t\t $this->session->unset_userdata('cari');\n\t\t $this->session->set_userdata('cari', $this->input->post('table_search'));\n\t\t/*$a['data']\t= $this->mgajipokok->tampil()->result_object();*/\n\t\t$a['page']\t= \"gajipokok\";\n\t\t\n\t\t$this->load->view('admin/index', $a);\n\t}", "public function nahrajObrazkyVyhledavac($textHledani){\t\t\t\n\t\t\t$dotaz = \"SELECT obrazekID,filepath,tabObrazky.uzivatelID,uzivatelJmeno FROM tabObrazky \n\t\t\t\t\tJOIN tabUzivatele ON tabUzivatele.uzivatelID = tabObrazky.uzivatelID WHERE filepath LIKE \".'\"%' . $textHledani.'%\"';\n\t\t\t\n\t\t\t\t//echo \"X \".$dotaz .\" X\";\n\t\t\t\n\t\t\t$vysledek = mysqli_query($this -> pripojeni,$dotaz);\n\t\t\t$vratit = array();\n\t\t\t\n\t\t\tif($vysledek == false){\n\t\t\t\techo(\"During data upload an error occured!\" . mysqli_error($this->pripojeni) );\n\t\t\t}\n\t\telse{\n\t\t\t//case result is mysqli_result\n\t\t\t$pole = $vysledek->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach($pole as $radek ){\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tforeach($radek as $x => $x_value) {\n\t\t\t\t\techo \"Key=\" . $x . \", Value=\" . $x_value;\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$obrazekID = $radek[\"obrazekID\"];\n\t\t\t\t$filePath = $radek[\"filepath\"];\n\t\t\t\t$uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t$jmenoUzivateleCoNahral = $radek[\"uzivatelJmeno\"];\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\techo $obrazekID;\n\t\t\t\techo $filePath;\n\t\t\t\techo $uzivatelID;\n\t\t\t\t*/\n\t\t\t\t//echo '*'.$jmenoUzivateleCoNahral.'*';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$obrazek = new obrazekObjekt($obrazekID, $filePath,$uzivatelID,$jmenoUzivateleCoNahral);\n\t\t\t\t\n\t\t\t\t//echo $obrazek->filePath;\n\t\t\t\t//echo $obrazek->jmenoUzivateleCoNahral;\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$obrazek); \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\treturn\t$vratit;\t\t\n\t\t\n\t}", "private function najitNavstevu(){\n $this->tpl = \"konec-navstevy\";\n }", "function cortar_titulo_de_post($texto,$tamano) {\n $texto = htmlspecialchars($texto);\n if (strlen($texto) > $tamano) {\n $texto = substr($texto, 0, $tamano);\n $texto .= \" ...\";\n }\n return $texto;\n }", "public function textKontrolEt($veri)\r\n{\r\n \r\n $ifade = '/[a-zA-ZçığöşüÇĞİÖŞÜ ]+$/i'; //Türkçe Uyumlu\r\n $islem= preg_match($ifade, $veri);\r\n return $islem;\r\n \r\n}", "public function tampilDataGalang(){\n\t\t\n\t}", "function filtrar($texto){\n\t\t$texto = htmlentities(strip_tags(trim($texto)));\n\t\t$texto = strtolower($texto);\n\t\treturn $texto;\n\t}", "public function data_motif_kejahatan()\n\t{\n\t\t$data = array(\n\t\t\t'data_motif_kejahatan' => $this->master_motif_kejahatan_model->select_master_motif_kejahatan(), \n\t\t);\n\n\t\t$this->load->view('data_motif_kejahatan_content', $data, FALSE);\n\t}", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "public function BestellingOverzichtView() {\r\n include_once('/var/www/filmpje.nl/backend/Stoelen.php');\r\n include_once('/var/www/filmpje.nl/backend/TotaalPrijsCalculatie.php');\r\n }", "public function daftarPengurusKT()\n {\n admin_logged_in();\n $data['title'] = 'Karang Taruna';\n $data['user'] = $this->SA->getSession();\n $data['rows'] = $this->db->get('kt')->result_array();\n\n $this->load->view('templates/admin/header', $data);\n $this->load->view('templates/admin/sidebar', $data);\n $this->load->view('templates/admin/topbar', $data);\n $this->load->view('super_admin/daftar_kt', $data);\n $this->load->view('templates/admin/footer', $data);\n }", "public function run()\n {\n $this->loadTextFile($this->text_file);\n }", "public function postavi_pitanje() {\n echo view(\"postavi_pitanje\");\n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function getTextTutorials()\n {\n $posts = TextPost::paginate(10);\n return view('text.list', ['posts' => $posts]);\n }", "public function AggiornaPrezzi(){\n\t}", "function documenti_gest($id_imm=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\t$q_doc=\"SELECT * FROM imm_doc JOIN documento on documento.id_doc=imm_doc.id_doc WHERE imm_doc.id_imm =$id_imm\";\n\t$r_doc=$db->query($q_doc);\n\t\n\tif (!$r_doc) {\n\t\t$str.=\"<center>Nessun documento disponibile disponibile per l'immobile</center><br>\";\n\t\t$str.=\"<b><a href=\\\"immobile_show.php?id_imm=$id_imm\\\"><img src=\\\"images/freccia.gif\\\"/>Torna all'immobile</a></b>\";\n\t}else {\n\t\t$str.= \"<div class=\\\"clienti\\\">\";\n\t\t$str.= \"<TABLE id=\\\"clienti\\\">\\n\";\n\t\t$str.=\"<tr>\\n\";\n\t\t$str.=\"<td colspan=\\\"2\\\" class=\\\"clienti_header\\\">\\n\";\n\t\t$str.=\"Documenti dell'immobile $id_imm\";\n\t\t$str.=\"</td>\\n\";\n\t\t$str.=\"</tr>\\n\";\n\t\t\n\t\twhile ($ro_doc=mysql_fetch_array($r_doc)) {\n\t\t\t$str.= \"<TR>\\n\";\n\t\t\t$str.= \"<TD class=\\\"foto_gest_header\\\">\\n\";\n\t\t\t$str.= $ro_doc['nome_file'] .\": \".$ro_doc['note'];\n\t\t\t$str.= \"</TD>\\n\";\n\t\t\t$str.= \" <TD class=\\\"foto_opzioni\\\">\\n\";\n\t\t\t$str.=\"<a target=\\\"_black\\\" href=\\\"\".$ro_doc['path'].\"\";\n\t\t\t$str.=\"\\\">\";\n\t\t\t$str.= \"Visualizza\";\n\t\t\t$str.=\"</a>\";\n\t\t\t$str.=\"<br><br>\";\n\t\t\t$str.=\"<a href=\\\"documento_add.php?azione=mod&id_doc=\";\n\t\t\t$str.= $ro_doc['id_doc'];\n\t\t\t$str.=\"\\\">\";\n\t\t\t$str.= \"Modifica\";\n\t\t\t$str.=\"</a>\";\n\t\t\t$str.=\"<br><br>\";\n\t\t\t$str.=\"<a href=\\\"documento_del.php?id_imm=$id_imm&id_doc=\";\n\t\t\t$str.= $ro_doc['id_doc'];\n\t\t\t$str.=\"\\\" onclick=\\\"NewWindow(this.href,'pg_center','500','350','no');return false;\\\">\";\n\t\t\t$str.=\"Cancella\";\n\t\t\t$str.=\"</a>\";\n\t\t\t$str.= \"</TD>\\n\";\n\t\n\t\t\t$str.= \"</TR>\\n\";\n\t\t}\n\t\t$str.= \"</TABLE>\";\n\t\t\n\t\t$str.=\"</div>\";\n\n\t}\n\t\n\treturn $str;\n}", "public function run()\n {\n Text::create([\n 'title_en' => 'OBSERVATION',\n 'title_ru' => 'НАБЛЮДЕНИЯ',\n ]);\n Text::create([\n 'title_en' => 'OF DEEP SKY OBJECTS',\n 'title_ru' => 'ОБЪЕКТОВ ГЛУБОКОГО КОСМОСА',\n ]);\n Text::create([\n 'title_en' => 'AT «GLUBOKAYA» STATION',\n 'title_ru' => 'НА ГЛУБОКОЙ',\n ]);\n Text::create([\n 'title_en' => 'About us',\n 'title_ru' => 'О нас',\n 'text_en' => 'The Irkutsk Planetarium has been conducting deep sky observations through a telescope near the village of Glubokaya since August 2015',\n 'text_ru' => 'Иркутский планетарий проводит выездные наблюдения в телескоп в районе села Глубокая с августа 2015 года',\n ]);\n Text::create([\n 'title_en' => 'About us #2',\n 'title_ru' => 'О нас #2',\n 'text_en' => 'We need a dark sky without light and the Moon: observations are conducted in a few days before and after the empty Moon period.',\n 'text_ru' => 'Нам нужно тёмное небо без фонарей и Луны: наблюдения проводятся за несколько дней до новолуния и несколько дней после.',\n ]);\n Text::create([\n 'title_en' => 'What do we observe*',\n 'title_ru' => 'Что мы наблюдаем*',\n 'text_en' => 'We observe galaxies, nebulae, star clusters, double stars, as well as planets of the solar system and comets.',\n 'text_ru' => 'Мы наблюдаем: галактики, туманности, звёздные скопления, двойные звёзды, а также планеты Солнечной системы и кометы.',\n ]);\n Text::create([\n 'title_en' => 'How to participate',\n 'title_ru' => 'Как поучаствовать',\n 'text_en' => 'Meeting place: \"Karetnyi dvor\" cafe, \"Bolshaya Glubokaya\" village. Observations are carried out on the observation deck in the taiga.',\n 'text_ru' => 'Место встречи: кафе \"Каретный двор\", Култукский тракт, Большая Глубокая. Наблюдения проводятся на площадке в тайге.',\n ]);\n Text::create([\n 'title_en' => 'Observation participation fees:',\n 'title_ru' => 'Стоимость участия в наблюдениях:',\n 'text_en' => 'Adults - 1000 RUB <br> Schoolchildren - 500 RUB',\n 'text_ru' => 'Взрослый - 1000 рублей <br> Школьник - 500 рублей',\n ]);\n Text::create([\n 'title_en' => 'Discounts',\n 'title_ru' => 'Скидки',\n 'text_en' => 'Discount for groups of 4 peoples or more - 20%',\n 'text_ru' => 'Группам от 4 человек скидка - 20%',\n ]);\n }", "public function getText();" ]
[ "0.62134343", "0.6045996", "0.6007843", "0.5896323", "0.58933234", "0.5884074", "0.5824838", "0.5816255", "0.57773316", "0.57773316", "0.57773316", "0.5774886", "0.5768003", "0.5756065", "0.5753877", "0.5709279", "0.5709178", "0.56730694", "0.56618184", "0.56615835", "0.56427175", "0.5612644", "0.56088126", "0.55857944", "0.55797213", "0.5556412", "0.5544087", "0.5543659", "0.55399156", "0.55315036", "0.552833", "0.55222523", "0.55101025", "0.55057794", "0.5500246", "0.54928386", "0.54869837", "0.548461", "0.5482458", "0.5480961", "0.5480177", "0.54720896", "0.5449036", "0.54381675", "0.5434414", "0.54160964", "0.54088414", "0.5408258", "0.5393007", "0.5390956", "0.5382922", "0.53809327", "0.53708833", "0.53688467", "0.53647244", "0.5362867", "0.5359843", "0.5359737", "0.5353012", "0.53491074", "0.53383976", "0.53287137", "0.5322997", "0.53106415", "0.5306555", "0.5300926", "0.529974", "0.52951145", "0.52909505", "0.52863246", "0.5285227", "0.5283066", "0.5282972", "0.52806807", "0.52777356", "0.5277588", "0.52749354", "0.52696", "0.5266801", "0.5266295", "0.52623546", "0.52563226", "0.5254655", "0.52532524", "0.5246874", "0.52451557", "0.5243381", "0.52432805", "0.52426654", "0.52387637", "0.5238332", "0.52364045", "0.5234081", "0.5233459", "0.52331537", "0.5229928", "0.5228082", "0.5224904", "0.52241385", "0.5219298", "0.5217318" ]
0.0
-1
Returns the order mapper
public function getOrderMapper() { if($this->orderMapper == null) { throw new \Exception('Please set the order mapper'); } return $this->orderMapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_order() {\n return $this->get_mapped_property('order');\n }", "public function generateOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_DicionarioDadosAssocclFkMapper');\n\t}", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "function getOrder();", "public function getMapper(){ \n $mapper = new Wf_Model_WfProcesso_Mapper();\n return $mapper;\n }", "protected function getMapper()\n {\n return $this->mapper;\n }", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_MetodoValidacaoMapper');\n\t}", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_FormularioDecoratorGrupoMapper');\n\t}", "public function getOrder()\n {\n //Note: order by parts are not \"named\" so it's all or nothing\n return $this->_get('_order');\n }", "function getMapper() {\n return $this->mapper;\n }", "protected function get_rel_mapper() {\n\t\t$rel_mapper = array();\n\n\t\t/*\n\t\t * replies\n\t\t * @link https://indieweb.org/in-reply-to\n\t\t */\n\t\t$rel_mapper['in-reply-to'] = 'comment';\n\t\t$rel_mapper['reply-of'] = 'comment';\n\n\t\t/*\n\t\t * bookmarks\n\t\t * @link https://microformats.org/wiki/rel-design-pattern#rel.3D.22bookmark.22\n\t\t */\n\t\t$rel_mapper['bookmark'] = 'bookmark';\n\n\t\t/*\n\t\t * tags\n\t\t * @link https://microformats.org/wiki/rel-tag\n\t\t */\n\t\t$rel_mapper['tag'] = 'tag';\n\n\t\treturn apply_filters( 'webmention_mf2_rel_mapper', $rel_mapper );\n\t}", "public function getMapper()\n\t{\n\t\t\n\t\treturn $this->__mapper;\n\t\t\n\t}", "public static function getInstance() {\n if (self::$instance == null) {\n self::$instance = new OrderMapper();\n }\n return self::$instance;\n }", "function get_mapper()\n {\n return $this->_mapper;\n }", "public static function getOrder(): int;", "public function getTransformer()\n {\n return new OrderTransformer();\n }", "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 110;\n }", "public function getMapper()\n {\n return $this->proxyBase\n ->getMapper();\n }", "public function getMapper()\n {\n if (null === $this->_mapper) {\n $this->setMapper(new Petolio_Model_PoDiaryRecordRightsMapper());\n }\n return $this->_mapper;\n }", "public function get_column_mapper_instance() {\n\n\t\t_deprecated_function( 'wc_customer_order_csv_export()->get_admin_instance()->get_column_mapper_instance()',\n\t\t\t'4.1.0',\n\t\t\t'wc_customer_order_csv_export()->get_admin_instance()->get_custom_format_builder_instance()'\n\t\t);\n\n\t\treturn $this->get_custom_format_builder_instance();\n\t}", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "public function getMapper ()\r\n {\r\n if (null === $this->_mapper) {\r\n $this->setMapper(new Tnp_Model_Mapper_Company());\r\n }\r\n return $this->_mapper;\r\n }", "public function &getOrderBy();", "public function getMapper()\n {\n $map = $this->getMap();\n\n return function ($path) use ($map) {\n foreach ($map as $item) {\n foreach ($item as $match => $replace) {\n if (empty($match)) {\n return $replace . $path;\n } elseif (0 === strpos($path, $match)) {\n return preg_replace(\n '/^' . preg_quote($match, '/') . '/',\n $replace,\n $path\n );\n }\n }\n }\n\n return null;\n };\n }", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_MensagemAssocEmailMapper');\n\t}", "function getOrdering() {\n return $this->ordering;\n }", "public function getMapper()\n {\n if ($this->_mapper === null) {\n\n \\Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true);\n\n if (class_exists('\\Atezate\\Mapper\\Sql\\Cubos')) {\n\n $this->setMapper(new \\Atezate\\Mapper\\Sql\\Cubos);\n\n } else {\n\n new \\Exception(\"Not a valid mapper class found\");\n }\n\n \\Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(false);\n }\n\n return $this->_mapper;\n }", "public function getOrder()\n {\n if (array_key_exists(\"order\", $this->_propDict)) {\n return $this->_propDict[\"order\"];\n } else {\n return null;\n }\n }", "public function getOrder()\n {\n if (array_key_exists(\"order\", $this->_propDict)) {\n return $this->_propDict[\"order\"];\n } else {\n return null;\n }\n }", "public function prefixOrderProperty() {\n\t\tif (is_string($this->order)) {\n\t\t\t$this->order = $this->prefixAlias($this->order);\n\t\t}\n\t\tif (is_array($this->order)) {\n\t\t\tforeach ($this->order as $key => $value) {\n\t\t\t\tif (is_numeric($key)) {\n\t\t\t\t\t$this->order[$key] = $this->prefixAlias($value);\n\t\t\t\t} else {\n\t\t\t\t\t$newKey = $this->prefixAlias($key);\n\t\t\t\t\t$this->order[$newKey] = $value;\n\t\t\t\t\tif ($newKey !== $key) {\n\t\t\t\t\t\tunset($this->order[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getOrder()\n {\n return 101;\n }", "private function _getMapper()\n {\n if (is_null($this->_mapper)) {\n $this->_mapper = new CommentMapper($this->db());\n }\n\n return $this->_mapper;\n }", "function get_field_order_mapping2($name, $reorderArr = '', $exclude = true, $forFieldName = true)\n{\n // define the ordering of fields, note that the key value is what is important, and should be the db field name\n $field_order_array = array();\n $field_order_array['accounts'] = array('name'=>'Name', 'id'=>'ID', 'website'=>'Website', 'email1' =>'Email Address',\n 'phone_office' =>'Office Phone', 'phone_alternate' => 'Alternate Phone', 'phone_fax' => 'Fax',\n 'billing_address_street' => 'Billing Street', 'billing_address_city' => 'Billing City',\n 'billing_address_state' => 'Billing State', 'billing_address_postalcode' => 'Billing Postal Code',\n 'billing_address_country' => 'Billing Country', 'shipping_address_street' => 'Shipping Street',\n 'shipping_address_city' => 'Shipping City', 'shipping_address_state' => 'Shipping State',\n 'shipping_address_postalcode' => 'Shipping Postal Code', 'shipping_address_country' => 'Shipping Country',\n 'description' => 'Description', 'account_type' => 'Type', 'industry' =>'Industry',\n 'annual_revenue' => 'Annual Revenue', 'employees' => 'Employees', 'sic_code' => 'SIC Code',\n 'ticker_symbol' => 'Ticker Symbol', 'parent_id' => 'Parent Account ID', 'ownership' =>'Ownership',\n 'campaign_id' =>'Campaign ID', 'rating' =>'Rating', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id' =>'Assigned User ID', 'team_id' =>'Team Id', 'team_name' =>'Teams',\n 'team_set_id' =>'Team Set ID', 'date_entered' =>'Date Created', 'date_modified' =>'Date Modified',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' =>'Modified By',\n 'created_by_name' => 'Created By Name', 'created_by' =>'Created By', 'deleted' =>'Deleted');\n\n $field_order_array['contacts'] = array('first_name' => 'First Name', 'last_name' => 'Last Name', 'id'=>'ID',\n 'salutation' => 'Salutation', 'title' => 'Title', 'department' => 'Department',\n 'account_name' => 'Account Name', 'email_address' => 'Email Address', 'phone_mobile' => 'Phone Mobile',\n 'phone_work' => 'Phone Work', 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other',\n 'phone_fax' => 'Phone Fax', 'primary_address_street' => 'Primary Address Street',\n 'primary_address_city' => 'Primary Address City', 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alternate Address Street',\n 'alt_address_city' => 'Alternate Address City', 'alt_address_state' => 'Alternate Address State',\n 'alt_address_postalcode' => 'Alternate Address Postal Code',\n 'alt_address_country' => 'Alternate Address Country', 'description' => 'Description',\n 'birthdate' => 'Birthdate', 'lead_source' => 'Lead Source', 'campaign_id' => 'campaign_id',\n 'do_not_call' => 'Do Not Call', 'portal_name' => 'Portal Name', 'portal_active' => 'Portal Active',\n 'portal_password' => 'Portal Password', 'portal_app' => 'Portal Application',\n 'reports_to_id' => 'Reports to ID', 'assistant' => 'Assistant', 'assistant_phone' => 'Assistant Phone',\n 'picture' => 'Picture', 'assigned_user_name' => 'Assigned User Name', 'assigned_user_id' => 'Assigned User ID',\n 'team_name' => 'Teams', 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified' =>'Date Modified', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' =>'Modified By', 'created_by_name' => 'Created By Name', 'created_by' =>'Created By',\n 'deleted' =>'Deleted');\n\n $field_order_array['leads'] = array('first_name' => 'First Name', 'last_name' => 'Last Name', 'id'=>'ID',\n 'salutation' => 'Salutation', 'title' => 'Title', 'department' => 'Department',\n 'account_name' => 'Account Name', 'account_description' => 'Account Description',\n 'website' => 'Website', 'email_address' => 'Email Address', 'phone_mobile' => 'Phone Mobile',\n 'phone_work' => 'Phone Work', 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other',\n 'phone_fax' => 'Phone Fax', 'primary_address_street' => 'Primary Address Street',\n 'primary_address_city' => 'Primary Address City', 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alt Address Street',\n 'alt_address_city' => 'Alt Address City', 'alt_address_state' => 'Alt Address State',\n 'alt_address_postalcode' => 'Alt Address Postalcode', 'alt_address_country' => 'Alt Address Country',\n 'status' => 'Status', 'status_description' => 'Status Description', 'lead_source' => 'Lead Source',\n 'lead_source_description' => 'Lead Source Description', 'description'=>'Description',\n 'converted' => 'Converted', 'opportunity_name' => 'Opportunity Name',\n 'opportunity_amount' => 'Opportunity Amount', 'refered_by' => 'Referred By',\n 'campaign_id' => 'campaign_id', 'do_not_call' => 'Do Not Call', 'portal_name' => 'Portal Name',\n 'portal_app' => 'Portal Application', 'reports_to_id' => 'Reports To ID', 'assistant' => 'Assistant',\n 'assistant_phone' => 'Assistant Phone', 'birthdate'=>'Birthdate', 'contact_id' => 'Contact ID',\n 'account_id' => 'Account ID', 'opportunity_id' => 'Opportunity ID',\n 'assigned_user_name' => 'Assigned User Name', 'assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams',\n 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created',\n 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['opportunities'] = array('name' => 'Opportunity Name', 'id'=>'ID',\n 'amount' => 'Opportunity Amount', 'currency_id' => 'Currency',\n 'date_closed' => 'Expected Close Date', 'sales_stage' => 'Sales Stage', 'probability' => 'Probability (%)',\n 'next_step' => 'Next Step', 'opportunity_type' => 'Opportunity Type', 'account_name' => 'Account Name',\n 'description' => 'Description', 'amount_usdollar' => 'Amount', 'lead_source' => 'Lead Source',\n 'campaign_id' => 'campaign_id', 'assigned_user_name' => 'Assigned User Name',\n 'assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams', 'team_id' => 'Team id',\n 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created', 'date_modified' => 'Date Modified',\n 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['notes'] = array('name' => 'Name', 'id'=>'ID', 'description' => 'Description',\n 'filename' => 'Attachment', 'parent_type' => 'Parent Type', 'parent_id' => 'Parent ID',\n 'contact_id' => 'Contact ID', 'portal_flag' => 'Display in Portal?', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id' => 'assigned_user_id', 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID',\n 'date_entered' => 'Date Created', 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name',\n 'created_by' => 'Created By ID', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted' );\n\n $field_order_array['bugs'] = array('bug_number' => 'Bug Number', 'id'=>'ID', 'name' => 'Subject',\n 'description' => 'Description', 'status' => 'Status', 'type' => 'Type', 'priority' => 'Priority',\n 'resolution' => 'Resolution', 'work_log' => 'Work Log', 'found_in_release' => 'Found In Release',\n 'fixed_in_release' => 'Fixed In Release', 'found_in_release_name' => 'Found In Release Name',\n 'fixed_in_release_name' => 'Fixed In Release', 'product_category' => 'Category', 'source' => 'Source',\n 'portal_viewable' => 'Portal Viewable', 'assigned_user_id' => 'Assigned User ID',\n 'assigned_user_name' => 'Assigned User Name', 'team_name'=>'Teams', 'team_id' => 'Team id',\n 'team_set_id' => 'Team Set ID', 'date_entered' =>'Date Created', 'date_modified' =>'Date Modified',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' =>'Modified By',\n 'created_by_name' => 'Created By Name', 'created_by' =>'Created By', 'deleted' =>'Deleted');\n\n $field_order_array['tasks'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description','status'=>'Status',\n 'date_start'=>'Date Start', 'date_due'=>'Date Due','priority'=>'Priority', 'parent_type'=>'Parent Type',\n 'parent_id'=>'Parent ID', 'contact_id'=>'Contact ID', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id'=>'Assigned User ID', 'team_name'=>'Teams', 'team_id'=>'Team id',\n 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created', 'date_modified'=>'Date Modified',\n 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['calls'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description',\n 'status'=>'Status', 'direction'=>'Direction', 'date_start'=>'Date', 'date_end'=>'Date End',\n 'duration_hours'=>'Duration Hours', 'duration_minutes'=>'Duration Minutes', 'reminder_time'=>'Reminder Time',\n 'parent_type'=>'Parent Type', 'parent_id'=>'Parent ID', 'outlook_id'=>'Outlook ID',\n 'assigned_user_name' =>'Assigned to', 'assigned_user_id'=>'Assigned User ID', 'team_name'=>'Teams',\n 'team_id'=>'Team id', 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified'=>'Date Modified', 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['meetings'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description',\n 'status'=>'Status', 'location'=>'Location', 'date_start'=>'Date', 'date_end'=>'Date End',\n 'duration_hours'=>'Duration Hours', 'duration_minutes'=>'Duration Minutes', 'reminder_time'=>'Reminder Time',\n 'type'=>'Meeting Type', 'external_id'=>'External ID', 'password'=>'Meeting Password', 'join_url'=>'Join Url',\n 'host_url'=>'Host Url', 'displayed_url'=>'Displayed Url', 'creator'=>'Meeting Creator',\n 'parent_type'=>'Related to', 'parent_id'=>'Related to', 'outlook_id'=>'Outlook ID',\n 'assigned_user_name' =>'Assigned to','assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams',\n 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created',\n 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['cases'] = array('case_number'=>'Case Number', 'id'=>'ID', 'name'=>'Subject',\n 'description'=>'Description', 'status'=>'Status', 'type'=>'Type', 'priority'=>'Priority',\n 'resolution'=>'Resolution', 'work_log'=>'Work Log', 'portal_viewable'=>'Portal Viewable',\n 'account_name'=>'Account Name', 'account_id'=>'Account ID', 'assigned_user_id'=>'Assigned User ID',\n 'team_name'=>'Teams', 'team_id'=>'Team id', 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified'=>'Date Modified', 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['prospects'] = array('first_name'=>'First Name', 'last_name'=>'Last Name', 'id'=>'ID',\n 'salutation'=>'Salutation', 'title'=>'Title', 'department'=>'Department', 'account_name'=>'Account Name',\n 'email_address'=>'Email Address', 'phone_mobile' => 'Phone Mobile', 'phone_work' => 'Phone Work',\n 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other', 'phone_fax' => 'Phone Fax',\n 'primary_address_street' => 'Primary Address Street', 'primary_address_city' => 'Primary Address City',\n 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alternate Address Street',\n 'alt_address_city' => 'Alternate Address City', 'alt_address_state' => 'Alternate Address State',\n 'alt_address_postalcode' => 'Alternate Address Postal Code',\n 'alt_address_country' => 'Alternate Address Country', 'description' => 'Description',\n 'birthdate' => 'Birthdate', 'assistant'=>'Assistant', 'assistant_phone'=>'Assistant Phone',\n 'campaign_id'=>'campaign_id', 'tracker_key'=>'Tracker Key', 'do_not_call'=>'Do Not Call', 'lead_id'=>'Lead Id',\n 'assigned_user_name'=>'Assigned User Name', 'assigned_user_id'=>'Assigned User ID', 'team_id' =>'Team Id',\n 'team_name' =>'Teams', 'team_set_id' =>'Team Set ID', 'date_entered' =>'Date Created',\n 'date_modified' => 'Date Modified', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' =>'Modified By', 'created_by_name' => 'Created By Name', 'created_by' =>'Created By',\n 'deleted' =>'Deleted');\n\n $field_order_array['forecastworksheet'] = array('commit_stage' => 'Commit Stage', 'name' => 'Name',\n 'date_closed' => 'Expected Close', 'sales_stage' => 'Stage', 'probability' => 'Probability',\n 'likely_case' => 'Likely Case', 'best_case' => 'Best Case', 'worst_case' => 'Worst Case', 'id' => 'ID',\n 'product_id' => 'Product ID', 'assigned_user_id' => 'Assigned To', 'amount' => 'Amount',\n 'worksheet_id' => 'Worksheet ID', 'currency_id' => 'Currency ID', 'base_rate' => 'Base Rate');\n\n $field_order_array['forecastmanagerworksheet'] = array('name' => 'Name', 'quota' => 'Quota',\n 'likely_case' => 'Likely Case', 'likely_case_adjusted' => 'Likely Adjusted',\n 'best_case' => 'Best Case', 'best_case_adjusted' => 'Best Adjusted', 'worst_case' => 'Worst Case',\n 'worst_case_adjusted' => 'Worst Adjusted', 'amount' => 'Amount', 'quota_id' => 'Quota ID',\n 'forecast_id' => 'Forecast ID', 'worksheet_id' => 'Worksheet ID', 'currency_id' => 'Currency ID',\n 'base_rate' => 'Base Rate', 'show_opps' => 'Show Opps', 'timeperiod_id' => 'Timeperiod ID',\n 'user_id' => 'User ID', 'date_modified' => 'Date Modified');\n\n $fields_to_exclude = array();\n $fields_to_exclude['accounts'] = array('account_name');\n $fields_to_exclude['cases'] = array('modified_by_name', 'modified_by_name_owner',\n 'modified_by_name_mod', 'created_by_name', 'created_by_name_owner', 'created_by_name_mod',\n 'assigned_user_name', 'assigned_user_name_owner', 'assigned_user_name_mod', 'team_count', 'team_count_owner',\n 'team_count_mod', 'team_name_owner', 'team_name_mod', 'account_name_owner', 'account_name_mod',\n 'modified_user_name', 'modified_user_name_owner', 'modified_user_name_mod');\n $fields_to_exclude['notes'] = array('first_name', 'last_name', 'file_mime_type', 'embed_flag');\n $fields_to_exclude['tasks'] = array('date_start_flag', 'date_due_flag');\n $fields_to_exclude['forecastworksheet'] = array('version'=>'version');\n $fields_to_exclude['forecastmanagerworksheet'] = array('version'=>'version', 'label'=>'label');\n\n if (!empty($name) && !empty($reorderArr) && is_array($reorderArr)) {\n // make sure reorderArr has values as keys, if not then iterate through and assign the value as the key\n $newReorder = array();\n foreach ($reorderArr as $rk => $rv) {\n if (is_int($rk)) {\n $newReorder[$rv]=$rv;\n } else {\n $newReorder[$rk]=$rv;\n }\n }\n\n // if module is not defined, let's default the order to another module of the same type\n // this would apply mostly to custom modules\n if (!isset($field_order_array[strtolower($name)]) && !empty($name)) {\n if ($name == 'ProspectLists') {\n return $newReorder;\n }\n\n // get an instance of the bean\n $focus = BeanFactory::newBean($name);\n\n // set the name based on the module type. default to basic ('notes')\n if ($focus instanceof Person) {\n $name = 'contacts';\n } elseif ($focus instanceof Company) {\n $name = 'accounts';\n } elseif ($focus instanceof Sale) {\n $name = 'opportunities';\n } elseif ($focus instanceof Issue) {\n $name = 'bugs';\n } else {\n $name = 'notes';\n }\n\n }\n\n // let's iterate through and create a reordered temporary array using\n // the newly formatted copy of the passed in array\n $temp_result_arr = array();\n $lname = strtolower($name);\n if (isset($field_order_array[$lname])) {\n foreach ($field_order_array[$lname] as $fk => $fv) {\n // if the value exists as a key in the passed in array, add to temp array and remove from reorder array.\n // Do not force into the temp array as we don't want to violate acl's\n if (array_key_exists($fk, $newReorder)) {\n $temp_result_arr[$fk] = $newReorder[$fk];\n unset($newReorder[$fk]);\n } else {\n if ($forFieldName) {\n $temp_result_arr[$fk] = $fk;\n } else {\n $temp_result_arr[$fk] = '';\n }\n }\n }\n }\n\n // add in all the leftover values that were not in our ordered list\n foreach ($newReorder as $nrk => $nrv) {\n $temp_result_arr[$nrk] = $nrv;\n }\n\n if ($exclude) {\n // Some arrays have values we wish to exclude\n if (isset($fields_to_exclude[$lname])) {\n foreach ($fields_to_exclude[$lname] as $exclude_field) {\n unset($temp_result_arr[$exclude_field]);\n }\n }\n }\n\n return $temp_result_arr;\n }\n\n // if no array was passed in, pass back either the list of ordered columns by module, or the entire order array\n if (empty($name)) {\n return $field_order_array;\n } else {\n return $field_order_array[strtolower($name)];\n }\n}", "public function getOrder()\n {\n\n }", "public function getOrder(): array;", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function _getOrder() {\n $order = [];\n if (($this->getSidx() !== null && $this->getSidx() != '') && ($this->getSord() !== null)) {\n if (is_array($this->getSidx())) {\n $orderArr = [];\n $sord = strtoupper($this->getSord());\n /** @var array $sidxF */\n $sidxF = $this->getSidx();\n foreach ($sidxF as $index => $sidx) {\n $orderRule = $sord;\n if (is_array($sord) && isset($sord[$index])) {\n $orderRule = $sord[$index];\n }\n $orderArr[] = [$sidx => $orderRule];\n }\n $order = $orderArr;\n } else {\n $order = [$this->getSidx() => strtoupper($this->getSord())];\n }\n }\n return $order;\n }", "public function getOrder()\n {\n return 120;\n }", "public function getOrder()\n {\n return 120;\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function setOrderingValues()\n {\n $ordering = [\n 'id' => 'ID',\n 'p_no' => 'Patient No',\n 'name' => 'Name',\n 'date' => 'Register Date',\n 'age' => 'Age',\n 'dob' => 'Date of birth',\n 'gender' => 'Gender',\n 'Blood' => 'Blood'\n ];\n\n return $ordering;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }" ]
[ "0.6431113", "0.58484906", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58290136", "0.5786071", "0.5786071", "0.5786071", "0.5775523", "0.57736933", "0.5729906", "0.56842107", "0.56812525", "0.5652704", "0.5636372", "0.5636219", "0.56357247", "0.5615454", "0.5598317", "0.55869514", "0.5575028", "0.55346555", "0.55244035", "0.55244035", "0.55244035", "0.55244035", "0.55184805", "0.5513075", "0.54941154", "0.54940116", "0.5488501", "0.54817206", "0.54817206", "0.54723406", "0.54712224", "0.5465141", "0.5445815", "0.5417592", "0.5412501", "0.5411092", "0.5411092", "0.54091346", "0.54082155", "0.5399864", "0.5369137", "0.5354283", "0.53474975", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.53225005", "0.5322332", "0.5322332", "0.5321878", "0.5321878", "0.5321878", "0.53198725", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551" ]
0.7406881
0
Create a new controller instance.
public function __construct () { $this->middleware( 'auth' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application dashboard.
public function index ( Request $request, $event_instance_name ) { $event_instance = SocialWallScreenSettingController::GetEventInstanceByName( $event_instance_name ); $screen_settings = SocialWallScreenSetting::where( 'event_instance_id', '=', $event_instance->id ) ->orderBy( 'id', 'ASC' ) ->get(); return( view( 'dashboard.index' ) ->with( [ 'event_instance_name' => $event_instance_name, 'settings' => $screen_settings ] ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function show()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77845055", "0.7759553", "0.75615275", "0.75149643", "0.74643844", "0.74642456", "0.7364247", "0.73505014", "0.7346846", "0.73411953", "0.7326109", "0.73154867", "0.7306794", "0.7287334", "0.72823006", "0.7272898", "0.7272898", "0.7272898", "0.7272898", "0.7251149", "0.7251149", "0.7251149", "0.7251149", "0.7251149", "0.72407955", "0.723657", "0.72350687", "0.72175324", "0.71982723", "0.7198151", "0.71906996", "0.7178409", "0.71698093", "0.7157068", "0.7145901", "0.71325856", "0.7132011", "0.7128996", "0.71233934", "0.7120204", "0.711678", "0.7109153", "0.7107863", "0.71064323", "0.7096738", "0.7080262", "0.70763993", "0.7074988", "0.7063381", "0.7054148", "0.7053587", "0.7050827", "0.7047432", "0.70428807", "0.70390075", "0.70195466", "0.70173585", "0.7013498", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.6991156", "0.69789124", "0.6973553", "0.69731396", "0.69678116", "0.6967306", "0.6966836", "0.6964248", "0.6957916", "0.69446516", "0.6942682", "0.69421005", "0.6941928", "0.694065", "0.6938673", "0.69377136", "0.6936547", "0.6936547", "0.6926636", "0.6920605", "0.69066715", "0.69013566", "0.6881035", "0.6868616", "0.6866877", "0.6854833", "0.6846794", "0.6845246", "0.68394417", "0.6838777", "0.6832904", "0.6832319", "0.6830359", "0.6826521", "0.68126726" ]
0.0
-1
Add a boolean param
public function addBoolean(string $name, bool $default = false) { $this->add('boolean', $name, func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setBoolean($name, $value) {}", "public function set_add($param)\n\t{\n\t\t$this->add = (bool)$param;\n\t\treturn $this;\n\t}", "public function putBool(string $name, ?bool $value, bool $mandatory = false): string;", "public function setBoolean($trueFalse);", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "public static function boolean() {}", "protected function addBoolProperty(\n SerializationVisitorInterface $visitor,\n string $prop,\n ?bool $value,\n bool $insertUnderscore = true): void\n {\n $visitor->visitProperty(\n new StaticPropertyMetadata('boolean', $this->propertyName($prop, $insertUnderscore), null),\n $value\n );\n }", "function &bool(bool $value, string $namespace = 'default'): bool\n{\n $var = new Variable\\BoolVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function booleanValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function getBool(): bool;", "private static function getBool($param)\n {\n if ('true' == $param) {\n return true;\n }\n\n if ('false' == $param) {\n return false;\n }\n\n return (bool) $param;\n }", "protected function _setBooleanValue($key, $value) {}", "public function AddBoolData ($key, $bool_value) {\n\t\t$this->data[$key] = $bool_value ? \"true\" : \"false\";\n\t}", "public function updateBoolean( Inx_Api_Recipient_Attribute $attr, $blValue );", "function rest_is_boolean($maybe_bool)\n {\n }", "public function testBindBoolParameterNull()\n {\n self::$database->runTransaction(function (Transaction $t) {\n $t->executeUpdate(\n 'INSERT INTO ' . self::TABLE_NAME . '(id, name, registered, rating, age) '\n . 'VALUES($1, $2, $3, $4, $5)',\n [\n 'parameters' => [\n 'p1' => 3,\n 'p2' => 'Rock',\n 'p3' => null,\n 'p4' => 5.0,\n 'p5' => 26\n ],\n 'types' => [\n 'p3' => Database::TYPE_BOOL\n ]\n ]\n );\n $t->commit();\n });\n\n $res = self::$database->execute('SELECT * FROM ' . self::TABLE_NAME . ' WHERE registered IS NULL');\n\n $this->assertCount(1, iterator_to_array($res));\n }", "function PrepBool(&$bool,$blnNullable = true) {\n $bool = (integer)$bool;\n }", "public function setInternal($bool)\n {\n $this->arguments['internal'] = (bool) $bool;\n }", "abstract public function escapeBoolean($bool);", "public static function and_() {\n $result = new qti_variable('single', 'boolean', array('value' => true));\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\n if (!$param->value) {\n $result->value = false;\n return $result;\n }\n }\n return $result;\n }", "public function isBoolean();", "public function SetBool(string $key, bool $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "public function hasParam($name);", "function wpsl_bool_check( $atts ) {\n\n foreach ( $atts as $key => $val ) {\n if ( in_array( $val, array( 'true', '1', 'yes', 'on' ) ) ) {\n $atts[$key] = true;\n } else if ( in_array( $val, array( 'false', '0', 'no', 'off' ) ) ) {\n $atts[$key] = false;\n }\n }\n\n return $atts;\n}", "public function showInformation($bool) {$this->_information = (bool) $bool;return $this;}", "function pseudoTypeFalseAndBool(bool|false $var = false) {}", "public function hasParameter($name);", "public function hasParameter($name);", "public function hasParamValue(string $name): bool;", "public static function or_() {\n $result = new qti_variable('single', 'boolean', array('value' => false));\r\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\r\n if ($param->value) {\r\n $result->value = true;\r\n return $result;\r\n }\r\n }\r\n return $result;\n }", "function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\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 setBool($key, $value)\n {\n if (empty($value)) {\n $this->set($key, false);\n } else if (is_string($value)) {\n $this->set(\n $key,\n in_array(strtolower(trim($value)), self::$_booleans)\n );\n } else {\n $this->set($key, $value === true || $value === 1);\n }\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function convertirCheckBox($param='') {\n if($param == \"on\" || $param == 1) {\n $param = \"S\";\n } else {\n $param = \"N\";\n }\n return $param;\n }", "function wp_validate_boolean($value)\n {\n }", "function rt_button_boolean($target,$title = 'enable')\n{\n return rt_ui_button($title, $target, 'check');\n}", "public function __construct(?bool $returnValue = true)\n {\n $this->_returnValue = $returnValue;\n }", "function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}", "function assertTrue($bool){\r\n $this->log($bool);\r\n if($bool){\r\n $status = \"passed\";\r\n }\r\n else{\r\n $status = \"failed\";\r\n }\r\n \r\n $this->updateStatus($status);\r\n $this->updateAction(__FUNCTION__);\r\n \r\n }", "function serendipity_ini_bool($var) {\n return ($var === 'on' || $var == '1');\n}", "function enable($bool, $precision)\n {\n $this->enabled = $bool;\n $this->precision = $precision;\n }", "public function hasParameters(){\n return $this->_has(2);\n }", "public function setBoolean(?bool $boolean): void\n {\n $this->boolean['value'] = $boolean;\n }", "function rest_sanitize_boolean($value)\n {\n }", "function mm_auto_update_make_bool( $value, $default = true ) {\n\tif ( 'false' === $value ) { $value = false; }\n\tif ( 'true' === $value ) { $value = true; }\n\tif ( true !== $value && false !== $value ) { $value = $default; }\n\treturn $value;\n}", "public function showPagination($bool) {$this->_pagination = (bool) $bool;return $this;}", "public static function static_parseBoolean($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "function isEnabled ();", "public function addToBool(BuilderInterface $builder, ?string $boolType = null, mixed $key = null): mixed;", "function isEnabled($name);", "function to_boolean($val);", "public function isOpenParameter()\n\t{\n\t\treturn $this->_value == '...';\n\t}", "public function setRequired(?bool $bool = null): void\n {\n $this->required = $bool ?? true;\n }", "protected function _extractBoolParam(array $params, $key, $default = false)\n {\n return (isset($params[$key]) ? (bool) $params[$key] : $default);\n }", "function isEnabled();", "function isEnabled();", "public function hasSwitchParam(): bool\n {\n return $this->request && $this->request->query->has($this->switchParam);\n }", "private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public function setIsAccepted(bool $isAccepted);", "public function setAllowedOptionsBool (...$options);", "private function boolArg($value)\n {\n return ($value ? 1 : null);\n }", "public function annotMethod($annot, $bool)\n {\n }", "public function setOwner($bool)\r\n {\r\n $this->owner = (bool) $bool;\r\n }", "public static function setBoolean(string $key, $value) {\n\t\treturn self::$sessionInstance->set ( $key, UString::isBooleanTrue ( $value ) );\n\t}", "public function setRequired($bool)\n {\n $this->required = (boolean) $bool;\n\n return $this;\n }", "public function setIsWebRequest($val)\r\n\t{\r\n\t\tif (!is_bool($val))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Invalid value');\r\n\t\t}\r\n\t\t$this->isWebRequest = $val;\r\n\t}", "function setCheckboxParameter($value)\r\n {\r\n if (isset($_POST[$value]))\r\n return 1;\r\n else\r\n return 0;\r\n }", "public function has_param($key)\n {\n }", "public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}", "public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}", "public function getBoolean($i);", "public function boolean(string $column): ColumnDefinition\n {\n return $this->addColumn('boolean', $column);\n }", "public function getManBool(string $name, ?bool $default = null): bool;", "public function setFlag($flag);", "public function getBool(): ?BoolQuery;", "public function setTrue() {\n $this->estado = TRUE;\n }", "public function enableCache($bool) {\n\t\t$this->useCache = (bool)$bool;\t//Cast flexform integer (0/1) to bool\n\t}", "public function boolean($name, $options = [])\n {\n $field = new BooleanField($name);\n $this->fields[$name] = $this->setFields($field, $options);\n }", "public function setVideo($bool){\n\t\t$status = ($bool == true) ? 1 : 0;\n\t\t//return $this->setVideo($status);\n\t\treturn $this->_sendPacketToController(self::VIDEO, pack('C', $status));\n\t}", "public function setApproved($bool)\r\n {\r\n $this->isApproved = $bool;\r\n }", "public function isMethodParameter() {}", "public function hasBoolValue(){\n return $this->_has(3);\n }" ]
[ "0.6995609", "0.6974047", "0.6896783", "0.6663273", "0.6496533", "0.6441607", "0.641299", "0.63380754", "0.6304253", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6253668", "0.6182342", "0.61822045", "0.6175959", "0.61320627", "0.6130263", "0.6117875", "0.6063973", "0.600367", "0.59770596", "0.59707224", "0.59494096", "0.59247255", "0.5896289", "0.58552545", "0.58213496", "0.58130264", "0.58102614", "0.58102614", "0.57850343", "0.57781464", "0.5777693", "0.57663333", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5746186", "0.573128", "0.57217634", "0.5703789", "0.56997097", "0.56938964", "0.56825686", "0.5672771", "0.567099", "0.566252", "0.5658141", "0.56383955", "0.56372637", "0.5634507", "0.56308275", "0.5629258", "0.5623645", "0.5605073", "0.55913985", "0.55866843", "0.5582689", "0.55725986", "0.55586064", "0.55586064", "0.5556888", "0.55519396", "0.5533353", "0.5531199", "0.55308867", "0.5528517", "0.55274326", "0.55140615", "0.5508551", "0.5507466", "0.55024785", "0.54993445", "0.5489262", "0.54821604", "0.54821604", "0.5479514", "0.5477864", "0.5477552", "0.5467784", "0.5465317", "0.54589754", "0.5452575", "0.54479307", "0.5447508", "0.5433137", "0.5425326", "0.5423351" ]
0.70515066
0
Add an integer param
public function addInteger(string $name, bool $short = false, int $length = 0, bool $unsigned = false, int $default = 0) { $this->add('integer', $name, func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function appendParamsInt($value)\n {\n return $this->append(self::PARAMS_INT, $value);\n }", "public function integerMethod($integer)\n {\n }", "private function int ($param)\n {\n $this->type = 'int';\n $this->value = (int)$this->value;\n return true;\n }", "public function addParam($name,$value)\n\t\t{\n\t\t\t$this->param[$name] = $value;\n\t\t}", "public function param($id, $value)\n\t{\n\t\t$this->params[$id] = $value;\n\t}", "public function addParam($key, $value)\n {\n $this->_params[$key] = $value;\n }", "public function AddParam(Param $param){\r\n\t\t$this->params[] = $param;\r\n\t}", "public function addParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function setParam($param, $value);", "public function addParam($value, $type = null)\n {\n $this->_params[] = $value;\n if (null === $type) {\n // Detect type if not provided explicitly\n if ($value instanceof Zend_XmlRpc_Value) {\n $type = $value->getType();\n } else {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($value);\n $type = $xmlRpcValue->getType();\n }\n }\n $this->_types[] = $type;\n $this->_xmlRpcParams[] = ['value' => $value, 'type' => $type];\n }", "public function addParameter(string $name, $value): self;", "function addParam($name, $value) {\n if (!isset($this->params[$name])) {\n $this->setParam($name, $value);\n }\n else {\n $oldParam = $this->getParam($name);\n if (!is_array($oldParam)) {\n $oldParam = array($oldParam);\n }\n array_push($oldParam, $value);\n $this->setParam($name, $oldParam);\n }\n }", "function post_int($integer_name) {\n\t$integer = $_POST[$integer_name];\n\tsettype($integer, \"integer\");\n\treturn $integer;\n}", "protected function addParameter($value)\n {\n static $count = 1;\n \n static $id;\n \n if(null === $id)\n {\n $id = md5_file(__FILE__);\n }\n\n $service_id = $id . '_' . $count;\n \n $this->container->setParameter($service_id, $value);\n \n $count ++;\n \n return $service_id;\n }", "function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\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 updateInteger( Inx_Api_Recipient_Attribute $attr, $iValue );", "public function setParam($key, $value);", "public function setParam($name, $value);", "public function addParameter(mixed $value): ParametersInterface;", "public function writeInt($num){ }", "static function checkInteger($param) {\n \n if(isset($param) && is_numeric($param)) { \n return true;\n } else {\n return false;\n }\n }", "public function setAge(int $age): ParamsInterface;", "public function add_parameter( $param_id, $type, $heading = NULL, $note = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // add timezone info to the note if the parameter is a time or datetime\n if( 'time' == $type || 'datetime' == $type )\n {\n // build time time zone help text\n $date_obj = $util_class_name::get_datetime_object();\n $time_note = sprintf( 'Time is in %s\\'s time zone (%s)',\n lib::create( 'business\\session' )->get_site()->name,\n $date_obj->format( 'T' ) );\n $note = is_null( $note ) ? $time_note : $time_note.'<br>'.$note;\n }\n\n $this->parameters[$param_id] = array( 'type' => $type );\n if( !is_null( $heading ) ) $this->parameters[$param_id]['heading'] = $heading;\n if( !is_null( $note ) ) $this->parameters[$param_id]['note'] = $note;\n }", "public function addParam($param, $value){\n\t\t\tif(is_string($param)){\n\t\t\t\t$this->parameters[$param] = $value;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function setParameter(int $parameter): void\n {\n $this->parameter = $parameter;\n }", "function &int(int $value, string $namespace = 'default'): int\n{\n $var = new Variable\\IntVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "function number_int( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_NUMBER,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_INTEGER\n );\n\t}", "public function AddIntData ($key, $int_value) {\n\t\t$this->data[$key] = strval($int_value);\n\t}", "public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }", "public function addTransactionParam($name, $value)\n {\n newrelic_add_custom_parameter($name, $value);\n }", "public function addParam($value, $type = null) {\n\t\tif (is_null($type)) {\n\t\t\t$type = $this->_typecast($value);\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$t = $this->_typecast($v);\n\t\t\t\t$value[$k] = array('value' => $v, 'type' => $t);\n\t\t\t}\n\t\t}\n\t\t$this->_data[] = array('type' => $type, 'value' => $value);\n\t}", "function addParameter($name, $value) {\n\t\t$this->link->addParameter($name, $value);\n\t}", "function simple_set_int( $pFeature, $pPackageName = NULL ) {\n\tglobal $_REQUEST, $gBitSystem, $gBitSmarty;\n\tif ( isset( $_REQUEST[$pFeature] ) && is_numeric( $_REQUEST[$pFeature] ) ) {\n\t\t$gBitSystem->storeConfig( $pFeature, $_REQUEST[$pFeature], $pPackageName );\n\t\t$gBitSmarty->assign( $pFeature, $_REQUEST[$pFeature] );\n\t}\n}", "function addNumbers($num1, $num2 = 11) { // params\n echo $num1 + $num2 . \"<br>\";\n }", "function addValues($setVal,$tableName,$idColumn,$colValToInc){\n \n if(isset($_GET[$setVal])){\n $setVal = filterStr($_GET[$setVal]);\n $page = filterStr($_GET['yaw']);\n $directPage = $page.\".php\";\n $result = query(\"update {$tableName} set $colValToInc = $colValToInc+1 where {$idColumn} = {$setVal}\");\n show_error($result);\n header(\"Location: ../$directPage\"); \n }\n \n}", "private function setParamType($val) {\n if (is_int($val)) {\n return \\PDO::PARAM_INT;\n } else {\n return \\PDO::PARAM_STR;\n }\n }", "public static function int() {}", "function add(){\n \t $args = func_num_args();\n \t $sum = 0;\n \t $i = 0;\n\n \t for ($i; $i < $args; $i++) { \n \t \t is_int(func_get_arg($i)) ? $sum += func_get_arg($i) : die(\"only integers , por favor\");\n \t }\n \n return $sum;\n }", "public function parameter(string $paramName, $paramValue);", "function ibase_param_info($query, $param_number)\n{\n}", "public function putInt(string $name, ?int $value): string;", "public function add(IModel $model):int\n {\n }", "function Addnumber(int $x,int $y)\n{\n return $x + $y; \n}", "function add($num = \"\")\n{\n\t\n$internalnum = 10;\t\nreturn array($num,$internalnum );\t\n}", "public function getIdParameter(): string;", "public static function GetInt($param, $default = 0, $source = null) {\r\n $source = $source ?: $_GET;\r\n return isset($source[$param]) && is_numeric($source[$param]) ? intVal($source[$param]) : $default;\r\n }", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "public function putParam($key, $value)\n {\n $this->params[$key] = $value;\n }", "public function setValue($value)\n\t{\t\t\n\t\tif(!is_numeric($value))\n\t\t{\n\t\t\tthrow(new ArghException('IntegerParameter values must be numeric'));\n\t\t}\n\t\t\n\t\t$this->value = intval($value);\n\t}", "function get_param_integer($name, $default = false, $not_string_ok = false)\n{\n $m_default = ($default === false) ? false : (isset($default) ? (($default === 0) ? '0' : strval($default)) : '');\n $ret = __param($_GET, $name, $m_default, true); // do not set $ret to mixed(), breaks bootstrapping\n if ((!isset($default)) && ($ret === '')) {\n return null;\n }\n if (!is_numeric($ret)) {\n if (substr($ret, -1) === '/') {\n $ret = substr($ret, 0, strlen($ret) - 1);\n }\n if (!is_numeric($ret)) { // Bizarre situation (bug in IIS?)\n $matches = array();\n if (preg_match('#^(\\d+)\\#[\\w]*$#', $ret, $matches) !== 0) {\n $ret = $matches[1];\n } else {\n if ($not_string_ok) {\n return $default;\n }\n require_code('failure');\n $ret = _param_invalid($name, $ret, false);\n }\n }\n }\n if ($ret === '0') {\n return 0;\n }\n if ($ret === '1') {\n return 1;\n }\n $reti = intval($ret);\n $retf = floatval($reti);\n if (($retf > 2147483647.0) || ($retf < -2147483648.0)) { // TODO: #3046 in tracker\n require_code('failure');\n _param_invalid($name, null, false);\n }\n return $reti;\n}", "function param($param, $type = null) {\n\t\tif ($param instanceof ExpressibleInterface) {\n\t\t\t$param = $param->get();\n\t\t}\n\t\tif ($param instanceof Expr) {\n\t\t\treturn (string) $param;\n\t\t}\n\t\t\n\t\t$this->params[] = $param;\n\t\t$this->types[] = $type;\n\t\t\n\t\treturn \"\\$\".count($this->params);\n\t}", "public function add($request_param, $name) \n {\n $this->filters[$request_param] = $name;\n }", "public function addCustomEventParam(string $name, string $value): ParamsInterface;", "public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}", "public function setParam($param, $value)\n {\n $this->params[$param] = $value;\n }", "private static function _intVal($int)\n {\n return $int + 0;\n }", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/add');\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n\n return 'Sucsess';\n }", "public function addNodeParams($id, $params = array())\n {\n $this->_tree->addNodeParams($id, $params);\n }", "function addPrivateParam($name, $value) {\n\t\t$this->privateParams[$name] = $value;\n\t}", "function either_param_integer($name, $default = false)\n{\n $ret = __param(array_merge($_POST, $_GET), $name, ($default === false) ? $default : (($default === null) ? '' : strval($default)), true, null); // $_REQUEST contains cookies too, so can't use\n if (($default === null) && ($ret === '')) {\n return null;\n }\n if (!is_numeric($ret)) {\n require_code('failure');\n $ret = _param_invalid($name, $ret, true);\n }\n $reti = intval($ret);\n if (($reti > 2147483647) || ($reti < -2147483648)) { // TODO: #3046 in tracker\n require_code('failure');\n _param_invalid($name, null, true);\n }\n return $reti;\n}", "public function __construct(int $value = 0) {}", "public static function integer(?string $valueType = null);", "public function set_param($key, $value)\n {\n }", "protected function generate_arg($number, $type)\n {\n $arg = \"arg\" . $number;\n\n $this->xml->startElement($arg);\n $this->xml->writeAttribute(\"type\", $type);\n $this->xml->text($this->token);\n\n $this->xml->endElement();\n }", "public function addParameterByName(string $name, mixed $value): ParametersInterface;", "public function addParam($param, $raw = true)\n {\n if ($param instanceof PMA_Message) {\n $this->_params[] = $param;\n } elseif ($raw) {\n $this->_params[] = htmlspecialchars($param);\n } else {\n $this->_params[] = PMA_Message::notice($param);\n }\n }", "public function intValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function setParam($param, $value)\n {\n $this->_params[$param] = $value;\n }", "public function setParameter($param, $value)\n {\n $this->params[$param] = $value;\n }", "public function AddParameter($value)\n {\n throw new \\ErrorException('Parameters not suppered for groups. It is only for single directives.');\n }", "public function getParam($param);", "public function offsetSet($name, $value)\n {\n if (is_int($name)) {\n parent::offsetSet($name, $value);\n // @codeCoverageIgnoreStart\n // This will never be reached, because an exception is always\n // thrown.\n return;\n // @codeCoverageIgnoreEnd\n }\n\n $param = new Parameter($this->root, $name, $value);\n $this->parameters[$param->name] = $param;\n }", "function param(string $name, string $value, string $type = 'ref', string $attributes = ''): string\n {\n return '<param name=\"' . $name\n . '\" type=\"' . $type\n . '\" value=\"' . $value\n . '\" ' . $attributes . _solidus() . '>';\n }", "protected function addParam($key, $value, $method = self::SET_VALUE)\n {\n switch ($method) {\n case self::SET_VALUE:\n $this->params[$key] = $value;\n break;\n case self::ADD_VALUE:\n if (isset($this->params[$key])) {\n $this->params[$key] = array_merge_recursive($this->params[$key], $value);\n } else {\n $this->params[$key] = $value;\n }\n break;\n default:\n throw new InvalidArgumentException('Unknown method type.');\n }\n }", "function addExtraParameter($name) {\n\t\t$this->addParameter($name, Request::getParameter($name));\n\t}", "public function setParam($key, $val) {\n $this->params[$key] = $val;\n }", "function add(int $x, int $y): int {\n return $x + $y;\n }", "public function addParameter(string $id, $parameter): void\n {\n $this->addDefinition($id, $parameter, [], self::DEFINITION_PARAMETER);\n }", "function actionaddFunctionParameter($fn_id, $id=NULL) {\n\t\t\n $this->isLogin();\n $Api_function_paramObj = new ApiFunctionParam();\n $Api_functionObj = new ApiFunction();\n $functions = $Api_functionObj->getFunctions();\n\t\t$result=array();\n $title = 'Add Parameter';\n if ($id != NULL) {\n $title = 'Edit Parameter';\n $result = $Api_function_paramObj->getParameter($id);\n $fn_id = $result['fn_id'];\n\t\t\t$_POST['id'] = $result['id'];\n }\n if (isset($_POST['FormSubmit'])) {\n $id = NULL;\n $paramArray['fnParamName'] = $_POST['fnParamName'];\n $paramArray['fnParamDescription'] = $_POST['fnParamDescription'];\n $paramArray['example'] = $_POST['example'];\n $paramArray['uiValidationRule'] = $_POST['uiValidationRule'];\n $paramArray['fn_id'] = $_POST['fn_id'];\n $paramArray['ParamType'] = isset($_POST['ParamType']) ? $_POST['ParamType'] : 1;\n $paramArray['published'] = isset($_POST['published']) ? $_POST['published'] : 1;\n\n if (isset($_POST['id']) && $_POST['id'] != '') {\n $paramArray['id'] = $_POST['id'];\n $paramArray['modifiedAt'] = 'now()';\n $id = $_POST['id'];\n } else {\n $paramArray['createdAt'] = 'now()';\n }\n\t\t\tif(isset($id) && $id!=NULL)\n\t\t\t{\n\t\t\t\t$Api_function_paramObj->setData($paramArray);\n\t\t\t\t$Api_function_paramObj->insertData($id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Api_function_paramObj->setData($paramArray);\n\t\t\t\t$insertedId= $Api_function_paramObj->insertData();\n\t\t\t}\n if(isset($insertedId) && $insertedId > 0) {\n\t\t\t\tYii::app()->user->setFlash('success', \"Parameter added successfully.\");\n header('location:' . Yii::app()->params->base_path . 'admin/functionParametes/&fn_id=' . $fn_id);\n exit;\n } else {\n\t\t\t\tYii::app()->user->setFlash('success', \"Parameter updated successfully.\");\n header('location:' . Yii::app()->params->base_path . 'admin/functionParametes/&fn_id=' . $fn_id);\n exit;\n }\n\t\t\t\n }\n\t\t\n\t\t$data=array('result'=>$result,'functions'=>$functions,'fun_ref_id'=>$fn_id,'advanced'=>\"Selected\",'title'=>$title);\n\t\tYii::app()->session['current'] = 'apiFunctions';\n\t\t$this->render('add-function-parameter',$data);\n\t\t\n }", "public function setParam($name, $val) {\n $this->params[$name]= $val;\n }", "public function queryParam($name);", "public function setParameter($name, $value);", "public function addParam (string $key, $value)\n {\n if (!$this->paramExists($key))\n $this->params[$key] = $value;\n\n $this->save();\n\n return $this;\n }", "public function test ($param = null) {\n }", "public function setInputParam($key, $value)\n {\n $this->inputParams[$key] = $value;\n }", "function setParam($var, $val) {\n\t\t\t$this->obj[$var] = $val;\n\t\t}", "public function testIncreaseWithInteger()\n {\n $box = $this->box->increase(20);\n static::assertEquals(120, $box->getHeight());\n static::assertEquals(120, $box->getWidth());\n }", "protected function add_parameter($name, $details)\n\t{\n\t\t$this->P->add_parameter($name, $details);\n\t}", "public function setNumberOfOptionalParameters(int $number): void;", "private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}", "private function regParam($param) {\n array_unshift($this->getRegistredParams(), $param); //reg param\n \n //exclude param from array if in it\n $req_array = $this->getRequiredParams();\n\n if (in_array(strtolower($param), $req_array))\n {\n $srchd_key = array_search(strtolower($param), $req_array);\n unset($this->requiredParams[$srchd_key]);\n }\n }", "public function writeInt32($num){ }", "public function getInt($i);", "public function putId(string $name, ?int $value, string $label): string;", "protected function bindParam($value): string\n {\n // Value already defined?\n $index = array_search($value, $this->Parameters, true);\n if ($index !== false) {\n return $index;\n } else if (is_int($value) || is_float($value)) {\n return $value;\n } else {\n // get the next parameter index and count up\n $index = ':param' . $this->ParameterIndex++;\n\n // save value\n $this->Parameters[$index] = $value;\n\n // return index\n return $index;\n }\n }", "public function setParam(string $name, $value): void\n {\n $this->params[$name] = $value;\n }", "function new_parameters() {\r\n\r\n }", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/address/add\");\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n return \"Sucsess\";\n }", "function getInteger($input) : int {\n return $input;\n}", "public function addValue($value);" ]
[ "0.6848231", "0.6306623", "0.63048005", "0.6080029", "0.60794723", "0.59684604", "0.59131795", "0.5753972", "0.5719734", "0.5709594", "0.57089746", "0.56803775", "0.56742334", "0.5605312", "0.55938256", "0.5566804", "0.55602235", "0.553378", "0.5533093", "0.5506475", "0.5492381", "0.54794836", "0.5463932", "0.5441349", "0.54367125", "0.543452", "0.5416431", "0.5415164", "0.54116833", "0.5409307", "0.54039", "0.54037833", "0.53920346", "0.5389075", "0.538666", "0.5378656", "0.53770417", "0.5365051", "0.53645605", "0.53616524", "0.53432953", "0.5341649", "0.53376466", "0.5327572", "0.5317944", "0.5317702", "0.5314431", "0.5293284", "0.52925277", "0.5266657", "0.5257527", "0.5249527", "0.5246383", "0.52306926", "0.5229699", "0.52295095", "0.52265877", "0.52187675", "0.52121824", "0.52058506", "0.5203195", "0.5201492", "0.51948875", "0.51776665", "0.5176538", "0.5172136", "0.5171141", "0.5168102", "0.5165827", "0.51494086", "0.51445967", "0.51440716", "0.51405543", "0.51165324", "0.51165277", "0.5114745", "0.5111749", "0.5104438", "0.51006055", "0.5094545", "0.5091419", "0.5091147", "0.50874406", "0.5079435", "0.50771844", "0.50753963", "0.5069494", "0.5066439", "0.5060035", "0.5056693", "0.5051496", "0.5047338", "0.50462073", "0.50451505", "0.5042911", "0.5041586", "0.5034942", "0.5033941", "0.5028693", "0.5025835" ]
0.60169417
5
Add a textual param
public function addTextual(string $name, bool $short = true, int $length = 0, bool $binary = false, string $default = '') { $this->add('textual', $name, func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_text($text)\n {\n }", "function addText($text);", "function add()\n{\n\t$args = func_get_args();\n\t$string = array_shift($args);\n\tSystem::InterfaceHandler()->content(vsprintf($string, $args));\n}", "public function addParam($param, $raw = true)\n {\n if ($param instanceof PMA_Message) {\n $this->_params[] = $param;\n } elseif ($raw) {\n $this->_params[] = htmlspecialchars($param);\n } else {\n $this->_params[] = PMA_Message::notice($param);\n }\n }", "public function addParameter(string $name, $value): self;", "public function addParam($name,$value)\n\t\t{\n\t\t\t$this->param[$name] = $value;\n\t\t}", "function param(string $name, string $value, string $type = 'ref', string $attributes = ''): string\n {\n return '<param name=\"' . $name\n . '\" type=\"' . $type\n . '\" value=\"' . $value\n . '\" ' . $attributes . _solidus() . '>';\n }", "function addParameter($name, $value) {\n\t\t$this->link->addParameter($name, $value);\n\t}", "function addText($key, $text);", "public function add_parameter( $param_id, $type, $heading = NULL, $note = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // add timezone info to the note if the parameter is a time or datetime\n if( 'time' == $type || 'datetime' == $type )\n {\n // build time time zone help text\n $date_obj = $util_class_name::get_datetime_object();\n $time_note = sprintf( 'Time is in %s\\'s time zone (%s)',\n lib::create( 'business\\session' )->get_site()->name,\n $date_obj->format( 'T' ) );\n $note = is_null( $note ) ? $time_note : $time_note.'<br>'.$note;\n }\n\n $this->parameters[$param_id] = array( 'type' => $type );\n if( !is_null( $heading ) ) $this->parameters[$param_id]['heading'] = $heading;\n if( !is_null( $note ) ) $this->parameters[$param_id]['note'] = $note;\n }", "function param($param, $type = null) {\n\t\tif ($param instanceof ExpressibleInterface) {\n\t\t\t$param = $param->get();\n\t\t}\n\t\tif ($param instanceof Expr) {\n\t\t\treturn (string) $param;\n\t\t}\n\t\t\n\t\t$this->params[] = $param;\n\t\t$this->types[] = $type;\n\t\t\n\t\treturn \"\\$\".count($this->params);\n\t}", "protected function add_parameter($name, $details)\n\t{\n\t\t$this->P->add_parameter($name, $details);\n\t}", "public function addParam($param, $value){\n\t\t\tif(is_string($param)){\n\t\t\t\t$this->parameters[$param] = $value;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function addParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function addTransactionParam($name, $value)\n {\n newrelic_add_custom_parameter($name, $value);\n }", "public function AddParam(Param $param){\r\n\t\t$this->params[] = $param;\r\n\t}", "public function addTplParam($sPara, $sValue)\n {\n $this->_aViewData[$sPara] = $sValue;\n }", "private function AddOptionalParamsField()\n {\n $name = 'OptionalParameters';\n $field = new Textarea($name, $this->OptionalParamsText());\n $this->AddField($field);\n $this->SetTransAttribute($name, 'placeholder');\n }", "public function setParameters($text, $attributes=array()){\n\t\t$this->_text = $text;\n\t\t$this->_attributes = $attributes;\n\t}", "function addExtraParameter($name) {\n\t\t$this->addParameter($name, Request::getParameter($name));\n\t}", "function add_param($link, $param_name, $value) {\n\t$newlink = \"\";\n\t//verifica se ja existe ?\n\tif(stripos($link,\"?\")) {\n\t\t$newlink = $link.\"&\".$param_name.\"=\".$value;\n\t} else {\n\t\t$newlink = $link.\"?\".$param_name.\"=\".$value;\n\t}\n\treturn $newlink;\n}", "function addParam($name, $value) {\n if (!isset($this->params[$name])) {\n $this->setParam($name, $value);\n }\n else {\n $oldParam = $this->getParam($name);\n if (!is_array($oldParam)) {\n $oldParam = array($oldParam);\n }\n array_push($oldParam, $value);\n $this->setParam($name, $oldParam);\n }\n }", "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "public function parameter(string $paramName, $paramValue);", "public function add()\n\t{\n\t\tPhpfox::getComponent('language.admincp.phrase.add', array('sReturnUrl' => $this->get('return'), 'sVar' => $this->get('phrase'), 'bNoJsValidation' => true), 'controller');\n\t}", "public function addParam($key, $value)\n {\n $this->_params[$key] = $value;\n }", "public function add($name, $value = null)\n {\n $noName = false;\n if (null === $name) {\n $name = Parameter::guessParameterNameByValue($value);\n $noName = true;\n }\n\n if (isset($this->parameters[strtoupper($name)])) {\n $this->parameters[strtoupper($name)]->addValue($value);\n } else {\n $param = new Parameter($this->root, $name, $value);\n $param->noName = $noName;\n $this->parameters[$param->name] = $param;\n }\n }", "public function setParam($name, $value);", "public function addServiceExtensionParameter($keyword, $value = null)\n\t{\n\t\t$this->_extparams[$keyword] = $value;\n\t}", "public function addParam($value, $type = null) {\n\t\tif (is_null($type)) {\n\t\t\t$type = $this->_typecast($value);\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$t = $this->_typecast($v);\n\t\t\t\t$value[$k] = array('value' => $v, 'type' => $t);\n\t\t\t}\n\t\t}\n\t\t$this->_data[] = array('type' => $type, 'value' => $value);\n\t}", "public function setParam($param, $value);", "public function setTranslationParam(string $name, $value) : self;", "public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }", "private function addParameterInSql($sql, $paramName, $paramValue) {\n//\n// if (array_key_exists($parameter->name, $this->parameters)) {\n// $value = $this->parameters[$parameter->name];\n// } else {\n// $value = trim(str_replace($toReplace, \"\", $parameter->defaultValueExpression->content));\n// }\n\n $sql = str_replace(\"\\$P{\" . $paramName . \"}\", $paramValue, $sql);\n\n return $sql;\n }", "public function addParam($value, $type = null)\n {\n $this->_params[] = $value;\n if (null === $type) {\n // Detect type if not provided explicitly\n if ($value instanceof Zend_XmlRpc_Value) {\n $type = $value->getType();\n } else {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($value);\n $type = $xmlRpcValue->getType();\n }\n }\n $this->_types[] = $type;\n $this->_xmlRpcParams[] = ['value' => $value, 'type' => $type];\n }", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "public function addCustomEventParam(string $name, string $value): ParamsInterface;", "public function addInput($LableText = null, $NewLine = false , $InputPrams = array(), $InputValue = array()) \n{\n $this->showElment($this->processInput($LableText, $NewLine, $InputPrams, $InputValue ));\n}", "public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}", "public function add ($elType, $param = NULL, $place = 'head');", "public function addQuerystringParameter($key, $value)\n {\n $this->querystringParams[$key] = $value;\n }", "function addTitle($parameter)\n\t\t{\n\t\t\t$patterns = array(' ','\\'','_','-');\n\t\t\t$replacement = array('%20','%27','%5F','%2D');\n\t\t\t$parameter = str_replace($patterns, $replacement, $parameter);\n\t\t\t$request = $_SESSION['mac'].\" playlist add %2Fvar%2Fwww%2Fmedia%2Fmusic%2F$parameter\\n\";\n\t\t\treturn $request;\n\t\t}", "public final function addParameter($arg1, $arg2=null)\n {\n $this->setParameter($arg1, $arg2, false);\n }", "public function setParameter($name, $value);", "function pushText($key, $text, $scope = null);", "public function addParameter(string $id, $parameter): void\n {\n $this->addDefinition($id, $parameter, [], self::DEFINITION_PARAMETER);\n }", "function addBr($monParametre = \"\") {\n echo $monParametre;\n echo \"<br>\";\n}", "protected function formatParam( $str )\n\t{\n\t\treturn \"__\".$str.\"__\";\n\t}", "public function setPlaceholderText($text);", "protected function _addParamToImage($img, $name, $text)\r\n\t{\r\n\t\t$config = $this->getConfig()->getChildren(\"image\")->getChildren($name);\r\n\t\tif(!$config->getInteger(\"show\"))\r\n\t\t{\r\n\t\t\treturn $img;\r\n\t\t}\r\n\t\t$color = $this->getColor($name, $img);\r\n\t\t$shColor = $this->getShadowColor($name, $img);\r\n\t\tif($config->getInteger(\"show\") && $config->getInteger(\"shadow\"))\r\n\t\t{\r\n\t\t\timagettftext($img, $config->getInteger(\"size\"), 0, $this->getShadowCoord(\"x\", $config), $this->getShadowCoord(\"y\", $config), $shColor, $this->getFont($config), $text);\r\n\t\t}\r\n\t\timagettftext($img, $config->getInteger(\"size\"), 0, $config->getInteger(\"x\"), $config->getInteger(\"y\"), $color, $this->getFont($config), $text);\r\n\t\treturn $img;\r\n\t}", "public function addParameterByName(string $name, mixed $value): ParametersInterface;", "protected function add_parameters($params = array())\n\t{\n\t\tforeach ($params as $param)\n\t\t{\n\t\t\t$this->add_parameter($param['name'], $param);\n\t\t}\n\t}", "public function setParam($name, $val) {\n $this->params[$name]= $val;\n }", "public function addDefaultParam(string $templateName, string $param, $value): void\n {\n }", "function addText($name,$display=null,$value=null, $disabled=null, $maxlength=null, $class=null, $id=null){\r\n\t\t\t$this->formFields[$name] = array(\r\n\t\t\t\t\t\"name\" => $name,\r\n\t\t\t\t\t\"type\" => \"text\", //defines the type of the input\r\n\t\t\t\t\t\"label\" => $display,\r\n\t\t\t\t\t\"value\" => $value,\r\n\t\t\t\t\t\"disabled\" => $disabled,\r\n\t\t\t\t\t\"maxlength\" => $maxlength,\r\n\t\t\t\t\t\"class\" => $class,\r\n\t\t\t\t\t\"id\" => $id\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t//add class if null\r\n\t\t\tif($class == null){\r\n\t\t\t\t$this->formFields[$name][\"class\"] = \"c\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add id\r\n\t\t\tif($id == null){\r\n\t\t\t\t$this->formFields[$name][\"id\"] = \"i\" . $name;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add display\r\n\t\t\tif($display == null){\r\n\t\t\t\t$this->formFields[$name][\"label\"] = ucfirst($name) . \":\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "function addPrivateParam($name, $value) {\n\t\t$this->privateParams[$name] = $value;\n\t}", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/add');\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n\n return 'Sucsess';\n }", "function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\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 setParam(string $name, $value): void\n {\n $this->params[$name] = $value;\n }", "public function addParameter(mixed $value): ParametersInterface;", "public function setText($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = text');\n \n $this->text = $value;\n }", "public function AddParameter($value)\n {\n throw new \\ErrorException('Parameters not suppered for groups. It is only for single directives.');\n }", "public function setParameter(string $paramName, $paramValue = NULL);", "public function param($id, $value)\n\t{\n\t\t$this->params[$id] = $value;\n\t}", "public function addParam($name, $value){\n $obj = $this->root->appendChild(new FianetXMLElement('obj'));\n $obj->appendChild(new FianetXMLElement('name', $name));\n $obj->appendChild(new FianetXMLElement('value', $value));\n return $obj;\n }", "function appendText ($text) {\r\n $this->content .= $text;\r\n }", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "public function addVariable($tv);", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/address/add\");\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n return \"Sucsess\";\n }", "public function addTextflow($textflow, $title, $optlist = null);", "public function setText(string $input) {\n $this->inputText = $input;\n }", "private function createParameter($name, $value)\n {\n $origValue = $value;\n\n $encoded = false;\n // Allow room for parameter name, indices, \"=\" and DQUOTEs\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'=*N\"\";') - 1;\n $firstLineOffset = 0;\n\n // If it's not already a valid parameter value...\n if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {\n // TODO: text, or something else??\n // ... and it's not ascii\n if (!preg_match('/^[\\x00-\\x08\\x0B\\x0C\\x0E-\\x7F]*$/D', $value)) {\n $encoded = true;\n // Allow space for the indices, charset and language\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'*N*=\"\";') - 1;\n $firstLineOffset = \\strlen(\n $this->getCharset().\"'\".$this->getLanguage().\"'\"\n );\n }\n }\n\n // Encode if we need to\n if ($encoded || \\strlen($value) > $maxValueLength) {\n if (isset($this->paramEncoder)) {\n $value = $this->paramEncoder->encodeString(\n $origValue, $firstLineOffset, $maxValueLength, $this->getCharset()\n );\n } else {\n // We have to go against RFC 2183/2231 in some areas for interoperability\n $value = $this->getTokenAsEncodedWord($origValue);\n $encoded = false;\n }\n }\n\n $valueLines = isset($this->paramEncoder) ? explode(\"\\r\\n\", $value) : [$value];\n\n // Need to add indices\n if (\\count($valueLines) > 1) {\n $paramLines = [];\n foreach ($valueLines as $i => $line) {\n $paramLines[] = $name.'*'.$i.\n $this->getEndOfParameterValue($line, true, 0 == $i);\n }\n\n return implode(\";\\r\\n \", $paramLines);\n } else {\n return $name.$this->getEndOfParameterValue(\n $valueLines[0], $encoded, true\n );\n }\n }", "function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }", "function add($str) {\n\t $this->xml .= $str;\n\t}", "public function add($request_param, $name) \n {\n $this->filters[$request_param] = $name;\n }", "public function set_label($param)\n\t{\n\t\t$this->params->label = $param; return $this;\n\t}", "public function setParam($title, $value)\n {\n $this->getParams[$title] = $value;\n }", "public function setParameter($param, $value)\n {\n $this->params[$param] = $value;\n }", "public function setParam($name, $value) {\n $this->parameter[$name] = $value;\n }", "function addText()\r\n {\r\n return null; //PEAR::raiseError(\"No addText method exists\", true);\r\n }", "public function test ($param = null) {\n }", "public function setParam($paramName, $value){\n\t\t\tparent::setParam($paramName, $value, self::NAG_OBJ_NAME_PARAM, self::$stringListParams);\n\n\t\t\tif(!array_key_exists($paramName, self::$stringListExclude) && !is_array($value)){\n\t\t\t\t$value = $this->convertStringListToArray($value);\n\t\t\t}\n\n\t\t\t$this->params[$paramName] = $value;\n\t\t}", "public function parameter($value): string\n {\n $name = 'p' . count($this->parameters);\n $this->parameters[ $name ] = $value;\n return \":{$name}\";\n }", "protected abstract function addString($string);", "public function parameterize():String {\n\n\t\treturn http_build_query($this->data);\n\n\t}", "public function inputlabel (\\stdClass $param);", "public function addParams($data) {\n\t\tif (!is_array($data)) {\n\t\t\tthrow new \\InvalidArgumentException(\"Array required, got: \" . gettype($data));\n\t\t}\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->params[$key] = (string)$value;\n\t\t}\n\t}", "function addMessage($txt = \"\"){\t$this->mMessages\t.= $txt;\t}", "public function setParam($param, $value)\n {\n $this->params[$param] = $value;\n }", "public function addParam($name, $value){\r\n $obj = $this->root->appendChild(new KwixoXMLElement('obj'));\r\n $obj->appendChild(new KwixoXMLElement('name', $name));\r\n $obj->appendChild(new KwixoXMLElement('value', $value));\r\n return $obj;\r\n }", "function addMethodArg($actMethod, $type, $name) {\n\t\tif ($type == \"void\" || (empty($type) && empty($name) ))\n\t\t\treturn;\n\t\t$methodIndex = $this->getLastMethodIndex();\n\n\t\t// Vytvoreni pole pokud jeste neexistuje\n\t\tif (!is_array(@$this->argsMethodArray[$methodIndex]))\n\t\t\t$this->argsMethodArray[$methodIndex] = array();\n\n\t\tarray_push($this->argsMethodArray[$methodIndex], array(\"name\" => $name, \"type\" => $type));\n\t}", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function setParameter($name, $value) {\n $this->parameters[$name]= $value;\n }", "public static function initParam($paramName, $type, $isRequired = false, $regexp = '', $default = null, $isPost = false) { // ak je regexp posielany sem v dvojitych uvodzovkach, musia sa escape znaky este raz escapovat !\n\n global $_PARAMS;\n\n $tmp = self::getParamByName($paramName, $type, $isRequired, $regexp, $default, $isPost);\n\n $_PARAMS[$paramName] = $tmp;\n }", "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "public function setText($text) {\n\t\t$this->data[\"text\"] = $text;\n\t}", "private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}", "public function setParam($key, $value);", "public function addData(string $data);", "public function addTexte( $lang, $texte )\n\t{\n\t\t$this->textes[$lang] = $texte ;\n\t}" ]
[ "0.6921021", "0.6892538", "0.6789542", "0.65996337", "0.6599433", "0.65875435", "0.65344065", "0.6451737", "0.6430316", "0.63584936", "0.6349766", "0.6296022", "0.6162246", "0.61600465", "0.6099131", "0.60867304", "0.6077351", "0.6003899", "0.5994574", "0.5954804", "0.595036", "0.59315336", "0.59306604", "0.59086657", "0.5902288", "0.5900057", "0.57999563", "0.5730439", "0.5652634", "0.5649839", "0.56456935", "0.56424135", "0.56423795", "0.5611522", "0.5606765", "0.5599211", "0.55991554", "0.55817205", "0.5577443", "0.55731523", "0.55711985", "0.5563398", "0.55590343", "0.55482936", "0.55419546", "0.55402565", "0.5538957", "0.55323917", "0.55315846", "0.5512635", "0.5511187", "0.54897255", "0.5482315", "0.54810834", "0.54775965", "0.5465329", "0.54613924", "0.5453911", "0.5448026", "0.54466075", "0.54433674", "0.54401404", "0.54080003", "0.54050046", "0.54028994", "0.5398807", "0.53894824", "0.5370657", "0.53643674", "0.5362647", "0.53540796", "0.53482985", "0.5348283", "0.53467953", "0.5343775", "0.5340509", "0.5337889", "0.5313612", "0.5308256", "0.53031135", "0.5301739", "0.5299337", "0.52982396", "0.5282454", "0.5281105", "0.52809906", "0.52806234", "0.52784246", "0.5260356", "0.52567863", "0.5255146", "0.5248757", "0.5245155", "0.5243532", "0.5242113", "0.52376074", "0.52269787", "0.5226905", "0.52193856", "0.5218652" ]
0.54115295
62
Get the secure params list (includes every param except of long textuals)
public function getSecure() : array { return $this->secure; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PKG_listParams($paramStr)\n{\n\t$params = explodeAssoc(\"?#*\",$paramStr);\n\n\t$out = \"\";\n\n\t$keys = array_keys($params);\n\n\tfor ($i=0; $i < count($keys); $i++)\n\t\tif ((strlen($keys[$i]) > 0) && (strlen($params[$keys[$i]]) > 0))\n\t\t$out.=wordwrap($keys[$i].\": \".$params[$keys[$i]].\"<br>\",60);\n\n\treturn($out);\n}", "private function getAllInputParameters () {\n// \t\t$params = $this->getInputParameters();\n\t\t$params = array();\n\t\t$catalogId = $this->session->getCourseCatalogId();\n\t\tif (!$catalogId->isEqual($this->session->getCombinedCatalogId()))\n\t\t\t$params[':catalog_id'] = $this->session->getCatalogDatabaseId($catalogId);\n\t\t\n\t\t$params[':subj_code'] = $this->session->getSubjectFromCourseId($this->courseId);\n\t\t$params[':crse_numb'] = $this->session->getNumberFromCourseId($this->courseId);\n\t\t\n\t\treturn $params;\n\t}", "private function getParameters()\n {\n $inputParametersStr = \"\";\n\n foreach ($_GET as $key => $input) {\n\n if(empty($input)){\n continue ; //ignore empty field \n }\n $inputParametersStr .= \"$key=\" . urlencode($input) . \"&\"; // convert string into url syntax.\n\n }\n $inputParametersStr = trim($inputParametersStr, '&'); // separate parameters by \"&\" .\n\n return $inputParametersStr ;\n }", "function get_list_params()\n\t{\n\t\treturn '';\n\t}", "public function getParameters()\n {\n $parameters = \"\";\n \n foreach($this->params as $param => $value)\n {\n $parameters .= urlencode($param.\"=\".$value).\";\"; \n }\n \n $parameters = trim($parameters, \";\");\n \n return($parameters);\n }", "protected function _getParams()\n {\n $aResult = array();\n $aParams = (array)$this->_getContainer()->getConfig()->getRequestParameter('aParams');\n\n foreach ($aParams as $sKey => $sValue) {\n $aResult[html_entity_decode($sKey)] = html_entity_decode($sValue);\n }\n\n return $aResult;\n }", "private static function ParamList ()\n {\n return array (\n \"a\" => array (\n \"charset\", \"coords\", \"href\",\n \"hreflang\", \"name\", \"rel\",\n \"rev\", \"shape\", \"target\",\n \"style\",\n ),\n \"button\" => array (\n \"disabled\", \"name\", \"type\",\n \"value\", \"accesskey\", \"class\",\n \"dir\", \"id\", \"lang\", \"style\",\n \"tabindex\", \"title\", \"xml:lang\",\n ),\n );\n }", "public function getParametersList(){\n return $this->_get(2);\n }", "public function getParams()\n {\n $shift = array('CONTROLLER', 'ROUTE_CONTROLLER', 'ACTION', 'ROUTE_ACTION');\n $values = array();\n foreach ($this->joUrl as $key => $value) {\n if (!in_array($key, $shift)) {\n $values[] = self::setAntiInjection($value);\n }\n }\n return $values;\n }", "function get_signable_parameters($params){\n $sorted = $params;\n ksort($sorted);\n\n $total = array();\n foreach ($sorted as $k => $v) {\n if ($k == 'oauth_signature') {\n continue;\n }\n\n $total[] = rawurlencode($k) . '=' . rawurlencode($v);\n }\n return implode('&', $total);\n }", "public function get_signable_parameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n if (isset($params['oauth_signature']))\n unset($params['oauth_signature']);\n\n // Urlencode both keys and values\n $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));\n $values = OAuthUtil::urlencode_rfc3986(array_values($params));\n $params = array_combine($keys, $values);\n\n // Sort by keys (natsort)\n uksort($params, 'strcmp');\n\n // Generate key=value pairs\n $pairs = array();\n foreach ($params as $key=>$value )\n {\n if (is_array($value))\n {\n // If the value is an array, it's because there are multiple\n // with the same key, sort them, then add all the pairs\n natsort($value);\n foreach ($value as $v2)\n $pairs[] = $key . '=' . $v2;\n }\n else\n $pairs[] = $key . '=' . $value;\n }\n\n // Return the pairs, concated with &\n return implode('&', $pairs);\n }", "function allowed_get_params($allowed_params = []){\r\n //$allowed_array will contain only allowed url parameters\r\n $allowed_array = [];\r\n foreach($allowed_params as $param){\r\n if(isset($_GET[$param])){\r\n $allowed_array[$param] = $_GET[$param];\r\n }else{\r\n $allowed_array[$param] = NULL;\r\n }\r\n }\r\n return $allowed_array;\r\n\r\n}", "protected function filterParams()\n {\n }", "protected function clean_params($params)\n\t{\n\t\tif(!self::$blacklist) return $params;\n\n\t\tforeach ($params as $key => $value) {\n\t\t\tif(preg_match(\"/(\" . implode(\")|(\", self::$blacklist) . \")/i\", $key)) {\n\t\t\t\t$params[$key] = '[FILTERED]';\n\t\t\t}else if(is_array($value)){\n\t\t\t\t$params[$key] = $this->clean_params($value);\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "final public static function getParams()\n {\n $param = self::getUrl();\n\n $y=0;while($y <= 2){\n unset($param[$y]);\n $y++;\n }\n\n foreach($param as $t ){\n $p[] = array($t);\n }\n\n $r=0;\n while($r <= count($p)){\n\n $par[$p[$r][0]] = $p[$r + 1][0];\n\n $r += 2;\n }\n\n return array_filter($par);\n }", "protected function compileParameterNames()\n {\n preg_match_all('/\\{(.*?)\\}/', $this->getDomain() . $this->uri, $matches);\n\n return array_map(function ($m) {\n return trim($m, '?');\n }, $matches[1]);\n }", "private function getParameters() {\n $raw_parameters = $this->routeMatch->getRawParameters();\n $parameters = $this->routeMatch->getParameters();\n\n $return_params = [];\n foreach ($parameters as $key => $value) {\n if ($raw_value = $raw_parameters->get($key)) {\n $return_params[$key] = $raw_value;\n continue;\n }\n\n $return_params[$key] = $parameters->get($key);\n }\n\n return $return_params;\n }", "function Secure()\r\n\t{\r\n\t\tarray_walk($_GET, array($this, 'secureGET'));\r\n\t\tarray_walk($_POST, array($this, 'securePOST'));\r\n\t}", "public function params()\n\t{\n\t\t$r = array();\n\t\tforeach (func_get_args() as $name)\n\t\t\t$r[] = @$this->params[$name];\n\t\treturn $r;\n\t}", "public function parameters()\n\t{\n\t\tglobal $scripturl, $txt;\n\n\t\t$shoutboxes = sportal_get_shoutbox();\n\t\t$in_use = array();\n\n\t\t$request = $this->_db->query('', '\n\t\t\tSELECT\n\t\t\t\tid_block, value\n\t\t\tFROM {db_prefix}sp_parameters\n\t\t\tWHERE variable = {string:name}',\n\t\t\tarray(\n\t\t\t\t'name' => 'shoutbox',\n\t\t\t)\n\t\t);\n\t\twhile ($row = $this->_db->fetch_assoc($request))\n\t\t{\n\t\t\tif (empty($_REQUEST['block_id']) || $_REQUEST['block_id'] != $row['id_block'])\n\t\t\t{\n\t\t\t\t$in_use[] = $row['value'];\n\t\t\t}\n\t\t}\n\t\t$this->_db->free_result($request);\n\n\t\t// Load up all the shoutboxes that are NOT being used\n\t\tforeach ($shoutboxes as $shoutbox)\n\t\t{\n\t\t\tif (!in_array($shoutbox['id'], $in_use))\n\t\t\t{\n\t\t\t\t$this->block_parameters['shoutbox'][$shoutbox['id']] = $shoutbox['name'];\n\t\t\t}\n\t\t}\n\n\t\tif (empty($this->block_parameters['shoutbox']))\n\t\t{\n\t\t\tthrow new Elk_Exception(allowedTo(array('sp_admin', 'sp_manage_shoutbox')) ? $txt['error_sp_no_shoutbox'] . '<br />' . sprintf($txt['error_sp_no_shoutbox_sp_moderator'], $scripturl . '?action=admin;area=portalshoutbox;sa=add') : $txt['error_sp_no_shoutbox_normaluser'], false);\n\t\t}\n\n\t\treturn $this->block_parameters;\n\t}", "public function params($params) {\n if(is_array($params)) return $params;\n $result = array();\n foreach(explode('|', $params) as $param) {\n $pos = strpos($param, ':');\n $result[trim(substr($param, 0, $pos))] = trim(substr($param, $pos+1));\n }\n return $result;\n }", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "private function OptionalParamsText()\n {\n $params = $this->params;\n foreach ($this->oblParams as $name)\n {\n unset($params[$name]);\n }\n return $this->serializer->ArrayToLines($params);\n }", "public function getQueryStrParams ()\n {\n return $this->getParams(\"string\");\n }", "public function getParams() {\n\n parse_str($this->params, $return);\n return $return;\n }", "public function get_signable_parameters() {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n // Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n if (isset($params['oauth_signature'])) {\n unset($params['oauth_signature']);\n }\n\n return OAuthUtil::build_http_query($params);\n }", "public function getUrlParams() {\n\t\t\n\t\t$consumerParams = $this->getConsumerParams();\n\t\t$params = array();\n\t\t\n\t\tif (!empty($consumerParams)) {\n\t\t\t$wrapper = RublonSignatureWrapper::wrap(\n\t\t\t\t$this->getRublon()->getSecretKey(),\n\t\t\t\t$consumerParams\n\t\t\t);\n\t\t\t$params[self::FIELD_CONSUMER_PARAMS] = $wrapper;\n\t\t}\n\t\t\n\t\treturn $params;\n\t\t\n\t}", "function getParams()\n {\n $params = array();\n $params['username'] = array('label' => _(\"Username\"), 'type' => 'text');\n $params['password'] = array('label' => _(\"Password\"), 'type' => 'text');\n $params['unicode'] = array('label' => _(\"Unicode message flag\"), 'type' => 'int');\n $params['max_length'] = array('label' => _(\"Maximum messages to be sent at once\"), 'type' => 'int');\n\n return $params;\n }", "public function getAllowedParams() {\n return array(\n 'id' => array (\n ApiBase::PARAM_TYPE => 'integer',\n ApiBase::PARAM_REQUIRED => true\n ),\n 'comment'=>array(\n ApiBase::PARAM_TYPE => 'text',\n ApiBase::PARAM_REQUIRED => true\n )\n );\n }", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "private static function getParams(): array\n {\n $getParams = [];\n\n if (!empty($_GET)) {\n $getParams = filter_input_array(INPUT_GET, FILTER_DEFAULT);\n }\n\n return $getParams;\n }", "public function authorization_parameters($params){\n $params['client_secret'] = DIV\\services\\helper::decrypt($this->client_secret);\n return $params;\n }", "public function getParams() {}", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "public function getSignableParameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n // Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n if (isset($params['oauth_signature'])) {\n unset($params['oauth_signature']);\n }\n\n return Utils::buildHttpQuery($params);\n }", "function cemhub_get_allowed_external_campaign_parameters() {\n $possible_parameters = variable_get('cemhub_external_campaign_parameters');\n\n return explode(\"\\n\", $possible_parameters);\n}", "protected function getOptionalParameters(): array\n {\n preg_match_all('/\\{(\\w+?)\\?\\}/', $this->route->message(), $matches);\n\n return isset($matches[1]) ? array_fill_keys($matches[1], null) : [];\n }", "function set_allowed_uri_params_list()\r\n{\r\n //allowed params disabled. All allowed\r\n//\tif ($ar_params = func_get_args())\r\n//\t{\r\n//\t\tglobal $tpl_allowed_uri_params_list;\r\n//\r\n//\t\tif (is_array($tpl_allowed_uri_params_list))\r\n//\t\t{\r\n//\t\t\tforeach ($ar_params as $val)\r\n//\t\t\t{\r\n//\t\t\t\t$tpl_allowed_uri_params_list[] = $val;\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\telse\r\n//\t\t{\r\n//\t\t\t$tpl_allowed_uri_params_list = $ar_params;\r\n//\t\t}\r\n//\t}\r\n}", "public function getUriParams()\n {\n $values = array();\n $string = parse_url(filter_input(INPUT_SERVER, 'REQUEST_URI'));\n if (isset($string['query'])) {\n $exp = explode('&', $string['query']);\n $count = count($exp);\n for ($i = 0; $i < $count; $i++) {\n $value = explode('=', $exp[$i]);\n $values[$value[0]] = self::setAntiInjection($value[1]);\n }\n }\n return $values;\n }", "private function readKioskParams() {\n $res = array();\n foreach (glob(\"kiosks/*.params\") as $filename) {\n $kiname = explode('.',$filename);\n $kid = $kiname[0];\n $res[] = str_replace('kiosks/kiosk', '', $kid);\n }\n return $res;\n }", "protected function getParamList()\n {\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$query = \"SELECT DISTINCT PARAMETER_ID, LONG_NAME, SHORT_NAME, MADRIGAL_NAME FROM tbl_parameter_code\" ;\n\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function getRequestParams();", "protected function getQueryParameters(): array\n {\n return [\n // not hidden.\n 'H' => false,\n // add, not only generate hash.\n 'n' => false,\n // no progress.\n 'p' => false,\n // pin file\n 'pin' => true,\n // not recursive (single file).\n 'r' => false,\n // no tickle\n 't' => false,\n // no wrap.\n 'w' => false,\n ];\n }", "private static function stripPrivate (array $requestParams) {\n\t\t$filtered = array();\n\t\t$instance = self::instance();\n\t\tforeach ($requestParams as $key => $val) {\n\t\t\tif (preg_match('/password/i', $key))\n\t\t\t\t$filtered[$key] = 'VALUE_FILTERED_IN_LOG';\n\t\t\telse if (in_array($key, $instance->privateRequestItems))\n\t\t\t\t$filtered[$key] = 'VALUE_FILTERED_IN_LOG';\n\t\t\telse\n\t\t\t\t$filtered[$key] = $val;\n\t\t}\n\t\treturn $filtered;\n\t}", "private function getParams()\n {\n $queryParams = $this->request->getQueryParams();\n\n $params = [\n 'openid.assoc_handle' => array_get($queryParams,self::OPENID_ASSOC_HANDLE),\n 'openid.signed' => array_get($queryParams,self::OPENID_SIGNED),\n 'openid.sig' => array_get($queryParams,self::OPENID_SIG),\n 'openid.ns' => self::OPENID_NS,\n 'openid.mode' => 'check_authentication',\n ];\n\n $signedParams = explode(',', array_get($queryParams,self::OPENID_SIGNED));\n\n foreach ($signedParams as $item) {\n $value = array_get($queryParams,'openid_'.str_replace('.', '_', $item));\n $params['openid.'.$item] = $value;\n }\n\n return $params;\n }", "private static function filter_params($path){\n\t\tforeach($path as $key => $value){\n\t\t\tif(strpos($path[$key],\"?\") !== false) $path[$key] = substr($path[$key],0,strpos($path[$key],\"?\"));\n\t\t\tif(empty($path[$key])){ \n\t\t\t\tunset($path[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "public function get_signable_parameters() {\n\t\t// Grab all parameters\n\t\t$params = $this->params;\n\n\t\t// Remove oauth_signature if present\n\t\t// Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n\t\tif ( isset( $params[ static::prefix . 'signature' ] ) ) {\n\t\t\tunset( $params[ static::prefix . 'signature' ] );\n\t\t}\n\n\t\treturn \\OAuthSignature::build_http_query( $params );\n\t}", "public function getParams()\n {\n $data = $this->_data['params'];\n $data = unserialize($data);\n return $data;\n }", "protected function mollieGetAdditionalParameters()\n {\n $oRequest = Registry::getRequest();\n $oSession = Registry::getSession();\n\n $sAddParams = '';\n\n foreach ($this->aMollieUrlCopyParameters as $sParamName) {\n $sValue = $oRequest->getRequestEscapedParameter($sParamName);\n if (!empty($sValue)) {\n $sAddParams .= '&'.$sParamName.'='.$sValue;\n }\n }\n\n $sSid = $oSession->sid(true);\n if ($sSid != '') {\n $sAddParams .= '&'.$sSid;\n }\n\n if (!$oRequest->getRequestEscapedParameter('stoken')) {\n $sAddParams .= '&stoken='.$oSession->getSessionChallengeToken();\n }\n $sAddParams .= '&ord_agb=1';\n $sAddParams .= '&rtoken='.$oSession->getRemoteAccessToken();\n\n return $sAddParams;\n }", "protected function getRestParams() {\n\t\t$result = array();\n\t\tif (function_exists('mb_parse_str')) {\n\t\t\tmb_parse_str(file_get_contents('php://input'), $result);\n\t\t} else {\n\t\t\tparse_str(file_get_contents('php://input'), $result);\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function find_courses_parameters() {\n return new external_function_parameters(\n array(\n 'search' => new external_value(PARAM_CLEAN, 'search'),\n )\n );\n }", "private function cleanParams(){\n $brokenUrl = explode(\"&\", iWeb::currentUrl());\n unset($brokenUrl[0]);\n $brokenUrl = array_values($brokenUrl);\n foreach ($brokenUrl as $param){\n $paramaters = explode(\"=\",$param);\n $this->params[$paramaters[0]] = $paramaters[1];\n }\n\n }", "public function get_significant_params() {\n $params = array();\n\n if (isset($this->studentid)) {\n $params['studentid'] = $this->studentid;\n }\n if ($this->mode != self::MODE_THIS_COURSE) {\n $params['mode'] = $this->mode;\n }\n if ($this->groupby != 'course') {\n $params['groupby'] = $this->groupby;\n }\n if ($this->sesscourses != 'current') {\n $params['sesscourses'] = $this->sesscourses;\n }\n\n return $params;\n }", "public function limpiarParametros($params){\n $parametros = array();\n foreach($params as $param => $val){\n $parametros [$param] = htmlentities(addslashes($val)); \n }\n return $parametros;\n }", "public function all() {\n foreach ($this->params as $key => $value) {\n $this->decryptedParams[$key] = $this->get($key);\n }\n\n return $this->decryptedParams;\n }", "public function get_params($xss = TRUE)\n\t{\n\t\t$CI =& get_instance();\n\t\t$get = $CI->input->get(NULL, $xss) ? $CI->input->get(NULL, $xss) : array();\n\t\t$post = $CI->input->post(NULL, $xss) ? $CI->input->post(NULL, $xss) : array();\n\t\t$params = array_merge(array_merge($get, $post), $_FILES);\n\n\t\treturn $params;\n\t}", "public static function parameters()\n {\n $fields = array('name', 'amount');\n return array_intersect_key(self::fields(), array_flip($fields));\n }", "public function getParamKeys()\n {\n $array = array(\n \"controller\" => array(\n \"def_value\" => null,\n \"allow_null\" => false,\n \"filter\" => new PHPFrame_StringFilter(array(\n \"min_length\" => 2,\n \"max_length\" => 50\n ))\n ),\n \"action\" => array(\n \"def_value\" => null,\n \"allow_null\" => true,\n \"filter\" => new PHPFrame_StringFilter(array(\n \"min_length\" => 2,\n \"max_length\" => 50\n ))\n ),\n \"params\" => array(\n \"def_value\" => null,\n \"allow_null\" => true,\n \"filter\" => new PHPFrame_StringFilter()\n )\n );\n\n return array_merge(parent::getParamKeys(), $array);\n }", "private function getParams($accept=null)\n\t{\n\t\t$result = [];\n\t\t$arr = explode(';', $accept);\n\t\tforeach ($arr as $k=>$v)\n\t\t{\n\t\t\t$arr2 = explode('=', $v);\n\t\t\tif ($arr2[0]) $result[$arr2[0]] = $arr2[1];\n\t\t}\n\t\treturn $result;\n\t}", "function getParams()\n{\n $queryParams = array();\n $params = filter_input_array(INPUT_GET);\n if ($params) {\n foreach (array('page', 'pageSize', 'orderBy', 'fields', 'searchId') as $term) {\n if (filter_input(INPUT_GET, $term)) {\n $queryParams[$term] = filter_input(INPUT_GET, $term);\n unset($params[$term]);\n }\n }\n \n $queryParams['filter'] = http_build_query($params, null, ':');\n }\n \n return $queryParams;\n}", "protected function getUserParams()\n {\n $params = [\n 'pid_list' => $this->pidList,\n 'generate_weapp_webview' => $this->generateWeappWebView,\n 'multi_group' => $this->multiGroup,\n 'custom_parameters' => $this->customParameters,\n 'generate_we_app' => $this->generateWeApp,\n 'generate_schema_url' => $this->generateSchemaUrl,\n 'generate_qq_app' => $this->generateQQApp\n ];\n return array_filter($params);\n }", "function tep_get_all_get_params($exclude_array = '') {\n\tglobal $HTTP_GET_VARS;\n\tif (!is_array($exclude_array)) $exclude_array = array();\n\t$get_url = '';\n\tif (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {\n\t\treset($HTTP_GET_VARS);\n\t\twhile (list($key, $value) = each($HTTP_GET_VARS)) {\n\t\t\tif ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) {\n\t\t\t\t$get_url .= rawurlencode(stripslashes($key)) . '=' . rawurlencode(stripslashes($value)) . '&';\n\t\t\t}\n\t\t}\n\t}\n\treturn $get_url;\n}", "public function get_additional_login_parameters() {\n return [];\n }", "public static function getURLParams()\n\t{\n\t\t$params = [];\n\t\t$urlParams = self::getAllURLParams();\n\t\tfor ($i = contrlPos + 2; $i < count($urlParams); $i++) {\n\t\t\t$params[] = $urlParams[$i];\n\t\t}\n\t\treturn $params;\n\t}", "private static function getGetParams()\n\t{\n\t\treturn $_GET;\n\t}", "protected function getHttpParameters() {\n $glue = '&';\n $htmlParams = '';\n\n $parameters = $this->getParameters();\n foreach ($parameters as $name => $value) {\n $htmlParams .= $name . '=' . str_replace(' ', '+', $value) . $glue;\n }\n\n return substr($htmlParams, 0, -strlen($glue));\n }", "public function getParameters()\n {\n return array();\n }", "function parse_params() {\n\t$params = array();\n\t\n\tif(ini_get('magic_quotes_gpc') == 1){\n\t\tif(!empty($_POST)){\n\t\t\t$params = array_merge($params, stirpspalshes_deep($_POST));\n\t\t}\n\t}else{\n\t\t\t$params = array_merge($params, $_POST);\n\t\t}\n\t\n\tif(ini_get('magic_quotes_gpc') == 1){\n\t\tif(!empty($_GET)){\n\t\t\t$params = array_merge($params, stirpspalshes_deep($_GET));\n\t\t}\n\t}else{\n\t\t\t$params = array_merge($params, $_GET);\n\t\t}\n\tif(!empty($_FILES['public_files'])){\n\t\tif(ini_get('magic_quotes_gpc') == 1){\n\t\t\tif(!empty($_FILES['public_files'])){\n\t\t\t\t$params = array_merge($params, stirpspalshes_deep($_FILES['public_files']));\n\t\t\t}\n\t\t}else{\n\t\t\t\t$params = array_merge($params, $_FILES['public_files']);\n\t\t\t}\n\t}\t\n\t\n\tif(!empty($_FILES['tickets'])){\n\t\tif(ini_get('magic_quotes_gpc') == 1){\n\t\t\tif(!empty($_FILES['tickets'])){\n\t\t\t\t$params = array_merge($params, stirpspalshes_deep($_FILES['tickets']));\n\t\t\t}\n\t\t}else{\n\t\t\t\t$params = array_merge($params, $_FILES['tickets']);\n\t\t\t}\n\t}\t\n\t\t\n\treturn $params;\n}", "public function processParams($params)\n {\n GeneralUtility::logDeprecatedFunction();\n $paramArr = [];\n $lines = GeneralUtility::trimExplode(LF, $params, true);\n foreach ($lines as $val) {\n $pair = explode('=', $val, 2);\n $key = trim($pair[0]);\n if ($key[0] !== '#' && $key[0] !== '/') {\n $paramArr[$key] = trim($pair[1]);\n }\n }\n return $paramArr;\n }", "public function getParams(): array;", "protected function filterParams($params)\n\t{\n\t\treturn $params;\n\t}", "public function getAdditionalParams()\n {\n return array_filter($this->additionalParams);\n }", "public static function validateParameters(array $params) {\n $allowed = self::ALLOWED_PARAMETERS;\n $prepared = [];\n foreach($params as $key => $value) {\n if(in_array($key, $allowed)) {\n $prepared[$key] = $value;\n }\n }\n return $prepared;\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "function getParams($input) {\n $allowedFields = ['post_id', 'user_name', 'content'];\n $filterParams = [];\n foreach($input as $param => $value){\n if(in_array($param, $allowedFields)){\n $filterParams[] = \"$param=:$param\";\n }\n }\n return implode(\", \", $filterParams);\n}", "private function collectRequiredParams() {\n $dst = array();\n foreach ($this->getAllOptions() as $param) \n {\n if ($this->paramIsRequired($param) === true) \n {\n $dst[] = $this->clearParam($param); \n }\n \n }\n\n return $dst;\n }", "public function getOptionalParameters();", "public function getAllParameters()\n\t{\n\t\t// Collect parameters used in template\n\t\t$params = [];\n\t\tforeach ($this->configurator->tags as $tag)\n\t\t{\n\t\t\tif (isset($tag->template))\n\t\t\t{\n\t\t\t\tforeach ($tag->template->getParameters() as $paramName)\n\t\t\t\t{\n\t\t\t\t\t$params[$paramName] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Merge defined parameters and those collected from templates. Defined parameters take\n\t\t// precedence\n\t\t$params = iterator_to_array($this->parameters) + $params;\n\n\t\t// Sort parameters by name for consistency\n\t\tksort($params);\n\n\t\treturn $params;\n\t}", "function getParams()\n {\n }", "private function getParams (Request $request)\n {\n // Step 1: Filter\n $datas = array_filter($request->getParsedBody(), function ($key) {\n return in_array($key, ['username', 'password']);\n }, ARRAY_FILTER_USE_KEY);\n return $datas;\n }", "public function getParams() :array;", "public function getRawParameters(): array;", "private function getParameterSet() // {{{\n {\n $parameters = array();\n foreach ($this->m_entries as $bibtex_name => $bibtex_entry)\n {\n $entry_params = array_keys($bibtex_entry);\n $parameters = array_merge($parameters, $entry_params);\n }\n $unique_parameters = array_unique($parameters);\n return $unique_parameters;\n }", "private function compileParameters()\n {\n $params = [\n 'queueName' => property_exists($this, 'queueName') ? $this->queueName : null,\n 'exchangeName' => property_exists($this, 'exchangeName') ? $this->exchangeName : null,\n 'exchangeType' => property_exists($this, 'exchangeType') ? $this->exchangeType : null,\n 'passive' => property_exists($this, 'passive') ? $this->passive : null,\n 'durable' => property_exists($this, 'durable') ? $this->durable : null,\n 'autoDelete' => property_exists($this, 'autoDelete') ? $this->autoDelete : null,\n 'deliveryMode' => property_exists($this, 'deliveryMode') ? $this->deliveryMode : null,\n ];\n\n return array_filter($params);\n }", "public static function get_parameters() { \r\n $retVal = array_merge(\r\n parent::get_parameters(),\r\n array(\r\n array(\r\n 'name' => 'square_location_type_id',\r\n 'caption' => 'Square location type id',\r\n 'description' => 'ID of the NPMS square location type.',\r\n 'type'=>'string',\r\n 'group' => 'IDs',\r\n ),\r\n array(\r\n 'name' => 'user_square_attr_id',\r\n 'caption' => 'User square attr id',\r\n 'description' => 'ID of the person attribute that holds user square allocations.',\r\n 'type'=>'string',\r\n 'group' => 'IDs',\r\n ),\r\n )\r\n );\r\n return $retVal;\r\n }", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();" ]
[ "0.68041766", "0.63572526", "0.62716115", "0.62243575", "0.6221891", "0.6175087", "0.61143017", "0.60476387", "0.6029033", "0.60233516", "0.59914386", "0.5951765", "0.5941729", "0.5909978", "0.58895934", "0.5818779", "0.58046275", "0.57841", "0.57818466", "0.57809836", "0.5774043", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5763393", "0.5739019", "0.5714058", "0.57082856", "0.56885076", "0.56865215", "0.56838405", "0.5677133", "0.5669853", "0.56675434", "0.5654615", "0.56456244", "0.56455135", "0.56446433", "0.56329226", "0.5622605", "0.5621445", "0.5619356", "0.55990684", "0.55940545", "0.55892557", "0.55847335", "0.55845994", "0.5580662", "0.5571239", "0.5562964", "0.5544418", "0.5529618", "0.5527135", "0.55169123", "0.551307", "0.55113435", "0.5508934", "0.55080277", "0.5501147", "0.5498364", "0.5497862", "0.54963547", "0.5469981", "0.54676986", "0.5466472", "0.54607487", "0.54375356", "0.54357433", "0.5430299", "0.5428464", "0.54260385", "0.54035234", "0.53995246", "0.5398763", "0.5397568", "0.5393139", "0.538502", "0.538502", "0.53748536", "0.53748536", "0.5366268", "0.5359834", "0.5357971", "0.5339529", "0.533379", "0.5331694", "0.5328959", "0.53221446", "0.5320886", "0.5315672", "0.5313228", "0.5308563", "0.5308563", "0.5308563", "0.5308563" ]
0.0
-1
funzione che elimina cartella prop e files al suo interno
function delete_files($target) { if(is_dir($target)){ //GLOB_MARK adds a slash to directories returned $files = glob( $target . '*', GLOB_MARK ); foreach( $files as $file ) { delete_files( $file ); } rmdir( $target ); } elseif(is_file($target)) { unlink( $target ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function purgeAllClone($stri_extra_id='')\n {\n $stri_file_name=serialisable::constructFileName($stri_extra_id);\n $stri_user_temp_path=serialisable::constructUserTempPath();\n $stri_file=$stri_user_temp_path.\"/\".$stri_file_name;\n $lenght = strlen($stri_file)-4;//calcule la taille de la chaine -4 (qui correspond a l'extension .slz)\n \n $obj_dir_reader=new file_reader_writer($stri_user_temp_path);\n $arra_file=$obj_dir_reader->readDirectory();\n \n foreach($arra_file as $stri_file2)//parcours le repertoire\n {\n $va=substr_compare($stri_file,$stri_file2,'0',$lenght);\n \n if($va==0)\n { unlink($stri_file2);\n //echo $stri_file.\" \".$stri_file2.\" \".$va.\"<br />\";\n }\n }\n \n return false; \n }", "private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "private function processarParametros() {\n\n $this->aArquivos = array();\n $aArquivosParaRemover = $this->oInput->getArgument('arquivos');\n\n foreach ($aArquivosParaRemover as $sArquivo) {\n\n $sArquivo = realpath($sArquivo);\n\n $this->aArquivos[$sArquivo] = array(\n 'file' => $sArquivo\n );\n }\n }", "private static function toDelete(){\n $filesNotToDelete = [];\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n\n // izbacivanje assets foldera, .. i .\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n unset($filesInPublicFolder[$key]);\n }\n }\n // dd($filesInPublicFolder);\n $images = [];\n $collectionsOfObjectsWithImages = [Product::all(), ProductGroup::all(), Manufacturer::all(),\n Suggestion::all(), ImageSuggestion::all(), MainAd::all(),SecondAd::all()];\n\n foreach ($collectionsOfObjectsWithImages as $collection) {\n foreach ($collection as $object) {\n if($object->images->count()){\n foreach ($object->images as $image) {\n $images[] = $image->name;\n }\n }\n }\n }\n\n // dd($images);\n // dd(array_diff($filesInPublicFolder, $images));\n // dd($filesNotToDelete, $filesInPublicFolder);\n return $toDelete = array_diff($filesInPublicFolder, $images); //za fju array_dif vazan je redoslijed argumenata\n\n }", "public function file_cleanup(){\n\t\t$query = $this->db->get('carousels');\n\t\t$map = directory_map('./carousel/', 1);\n\t\t$g = \"x\";\n\t\tforeach($map as $file)\n\t\t{\n\t\t\t\t\t\t\t\n\t\t\t//return $query->result();\n\t\t\t$g = $g . \"--\";\n\t\t\t$x = 0;\n\t\t\t$soundfile=\"\";\n\t\t\tforeach($query->result() as $row){\n\t\t\t\t//return $row;\n\t\t\t\t$picture = $row->image;\n\t\t\t\t$g = $g . \"<\" . $soundfile . \"-\" . $file . \">\";\n\t\t\t\tif ($file==$picture)\t{\n\t\t\t\t\t$g = $g . \"files are the same\";\n\t\t\t\t\t$x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($x==0 )\n\t\t\t{\n\t\t\t \t$g = $g . \"we're in the loop\";\n\t\t\t\tunlink(\"./carousel/\" . $file);\n\t\t\t\t\t$g = $g . \" removed: \" . \"./carousel/\" . $file . \" - \";\n\t\t\t\t\n\t\t\t}\n\t\t\tif (strlen($g) > 700)\n \t\t\t\t$g = substr($g, 0, 700);\n\t\t}\n\t\t//return $g;\n\t\t//$this->session->set_flashdata('carousel_saved', $file . \"--\" . $soundfile );\n\t}", "function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "function eliminarImagenCarpeta($campo, $tabla, $idAsignacion, $carpeta)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$carpeta/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function borrar ($arrayLineas,$id,$foto){\n $valorRetornado=false; \n foreach ($arrayLineas as $key => $value) {\n $auxArray= (array)$value; \n if($auxArray){\n if($auxArray[\"patente\"] === $id){\n var_dump($foto[\"name\"]);\n var_dump($auxArray[\"foto\"]);\n if($foto[\"name\"] !== $auxArray[\"foto\"] ){\n var_dump(\"./imagenes/\".$auxArray[\"foto\"]);\n //cambia de directorio la imagen vieja a backUpFotos, pero no la conserva.\n //rename(\"./imagenes/\".$auxArray[\"foto\"], './backUpFotos/'.$auxArray[\"patente\"].$auxArray[\"foto\"]);\n //cambia de directorio la imagen vieja a backUpFotos, pero la conserva en ambos directorios.\n copy(\"./imagenes/\".$auxArray[\"foto\"], './backUpFotos/'.$auxArray[\"patente\"].$auxArray[\"foto\"]);\n }\n unset($arrayLineas[$key]);\n $valorRetornado=true;\n break;\n }\n } \n } \n if($valorRetornado){\n echo(\"Se Removio: \".$id.\"\\n\\n\");\n }\n else{\n echo('No se encontro'.\"\\n\\n\");\n $arrayLineas=null;\n } \n return $arrayLineas;\n}", "public function EliminarDetallesVentasPedidosProductos()\n{\t\t\n\tself::SetNames();\n\t$sql = \" select * from detalleventas where codventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num > 1)\n\t{\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n\n\n\t\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = $row[\"preciocompra\"];\n\t\t$importeiva = $row[\"importe\"];\n\t\t$importe2iva = $row[\"importe2\"];\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($rov = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $rov;\n\t\t\t}\n\t\t$preciocompra = $rov[\"preciocompra\"];\n\t\t$importe = $rov[\"importe\"];\n\t\t$importe2 = $rov[\"importe2\"];\n\t\t\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" totalpago2= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotalivasive);\n\t\t$stmt->bindParam(2, $subtotalivanove);\n\t\t$stmt->bindParam(3, $totaliva);\n\t\t$stmt->bindParam(4, $totaldescuentove);\n\t\t$stmt->bindParam(5, $total);\n\t\t$stmt->bindParam(6, $total2);\n\t\t$stmt->bindParam(7, $codventa);\n\t\t\n\t\t$subtotalivasive= rount($importeiva,2);\n\t\t$subtotalivanove= rount($importe,2);\n $totaliva= rount($subtotalivasive*$iva,2);\n\t\t$tot= rount($subtotalivasive+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentove,2);\n\t\t$total2= rount($preciocompra,2);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\n\t\t\t\t\t\tunset($_SESSION[\"CarritoVentas\"]);\n\n\t?>\n\t\t<script type='text/javascript' language='javascript'>\n\t alert('EL PEDIDO DE PRODUCTOS FUE ELIMINADOS, \\nDE LA MESA EXITOSAMENTE') \n </script> \n\t\t<?php \n\t\t\texit;\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t\t$stmt->execute();\n\n\t\t }\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\t\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$codventa = base64_decode($_GET[\"codventa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t\t$stmt->execute();\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t\t$sql = \" update mesas set \"\n\t\t\t.\" statusmesa = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codmesa = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $statusmesa);\n\t\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t\t$statusmesa = strip_tags('0');\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n?>\n\t\t<script type='text/javascript' language='javascript'>\n\t alert('LOS PEDIDOS DE PRODUCTOS HAN SIDO ELIMINADOS, \\nDE LA MESA EXITOSAMENTE') \n </script> \n\t\t<?php \n\t\texit;\n\t}\n}", "protected function removeFiles() {}", "function removeProcessoPronto(){\n\tunset($_SESSION['fila'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['fila'] = array_values($_SESSION['fila']);\n}", "function eliminarImagenArreglo($campo, $tabla, $llavePrimaria, $campoLlave)\n {\n $data=$this->analisisRiesgo->getNombreImagenTabla($campo, $tabla, $llavePrimaria, $campoLlave);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagenTabla($borrar, $tabla, $llavePrimaria, $campoLlave);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$campo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "private function removeFilmsSinFuncionesDePeliculaxgenero(){\n \n $query = \n \"DELETE pg\n FROM peliculaxgenero pg\n LEFT JOIN funciones f\n ON pg.id_pelicula = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "function qform_remove_item($def, $cfg)\n{\n global $config, $db_prefix;\n\n // do\n $primary_val = get_param('primary_val');\n $idx = get_param('idx');\n\n // remove_item can also remove multiple items, simple use: $_GET['primary_val'] = '1,2,3,4,5,6...';\n $pv_arr = explode(',', $primary_val);\n if (empty($pv_arr)) {\n $pv_arr = array($primary_val);\n }\n\n // get data\n foreach ($pv_arr as $primary_val) {\n $res = sql_query(\"SELECT * FROM $cfg[table] WHERE $cfg[primary_key] = '$primary_val' LIMIT 1\");\n $old_values = $row = sql_fetch_array($res);\n\n // remove files\n foreach ($def as $key=>$val) {\n @$fn = $row[$val['field']];\n if ($val['type'] == 'file') {\n @unlink($cfg['file_folder'].'/'.$fn);\n }\n if (($val['type'] == 'img') || ($val['type'] == 'image') || ($val['type'] == 'img_resize') || ($val['type'] == 'image_resize')) {\n @unlink($cfg['img_folder'].'/'.$fn);\n }\n if ($val['type'] == 'thumb') {\n @unlink($cfg['img_folder'].'/'.$fn);\n @unlink($cfg['thumb_folder'].'/'.$fn);\n }\n if (($val['type'] == 'img_series') || ($val['type'] == 'img_set')) {\n $ok = false;\n $i = 0;\n while (!$ok) {\n $i++;\n $fn = $val['prefix'].'_'.$primary_val.'_'.$i;\n if (!file_exists(\"$cfg[img_folder]/$fn.jpg\")) {\n $ok = true;\n } else {\n unlink(\"$cfg[img_folder]/$fn.jpg\");\n unlink(\"$cfg[thumb_folder]/$fn.jpg\");\n }\n }\n }\n }\n\n // remove from table...\n $old = sql_qquery(\"SELECT * FROM $cfg[table] WHERE $cfg[primary_key]='$primary_val' LIMIT 1\");\n\n if (!empty($cfg['enable_log'])) {\n $log_info = sql_qquery(\"SELECT $cfg[log_title] FROM $cfg[table] WHERE $cfg[primary_key] = '$primary_val' LIMIT 1\");\n }\n sql_query(\"DELETE FROM $cfg[table] WHERE $cfg[primary_key] = '$primary_val' LIMIT 1\");\n if (!empty($cfg['enable_log'])) {\n $new = array();\n qform_log($primary_val, $log_info[0], LOG_DEL, $old, $new, $cfg['table']);\n }\n\n // remove permalink\n if (!empty($cfg['permalink_script'])) {\n sql_query(\"DELETE FROM \".$db_prefix.\"permalink WHERE target_script='$cfg[permalink_script]' AND target_idx='$primary_val' LIMIT 1\");\n }\n }\n\n // cache\n if (!empty($cfg['auto_recache']) || !empty($cfg['recache']) || !empty($cfg['rebuild_cache'])) {\n qcache_clear();\n }\n\n // hurray! done!\n $strip = array('qform_cmd', 'id', 'primary_val');\n $url = str_replace('&amp;', '&', urldecode(clean_get_query($strip)));\n\n if (empty($cfg['post_process'])) {\n msg_die($cfg['msg']['ok'], $url);\n } else {\n if (function_exists($cfg['post_process'])) {\n call_user_func($cfg['post_process'], $cfg['cmd'], $primary_val, false, $old_values, $old_values, false);\n } else {\n redir($cfg['post_process'].\"&qform_cmd=$cfg[cmd]&qform_id=$primary_val\");\n }\n }\n}", "function remove($rowindex) {\r\n assert($this->ds->_rowid[$rowindex] != '');\r\n # before deleting row, check if there's a file field, and its value is exist, then delete the assocaiated file first\r\n $um = NULL;\r\n $row = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n # populate this row first (just once, in case there is more than 1 file field)\r\n if (!$row)\r\n $row = $this->get_row(array('rowid'=>$this->ds->_rowid[$rowindex]));\r\n if (!$row) continue;\r\n $file_id = $row[$col->colname];\r\n if (!$um)\r\n $um = instantiate_module('upload_manager');\r\n $um->del_file($file_id); # del the file\r\n }\r\n }\r\n\r\n $sql = 'delete from `'.$this->db_table.'` where rowid='.$this->ds->_rowid[$rowindex].' limit 1'; # with safeguard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "protected function removeFile($field) {\n $utilArbo = new ServiceArborescence();\n $utilFichier = new UtilFichier();\n $strNomImageThumb = nomImageThumbnail($utilArbo->getRepertoireDossiersMIP() . $this->getObject()->getPhotographie());\n $utilFichier->supprimerFichier($strNomImageThumb);\n\n parent::removeFile($field);\n }", "abstract public function mass_remove();", "static function deleteFiles($pool) {\n $path = JPATH_COMPONENT.DS.\"data\".DS.$pool;\n system(\"rm -rf \".$path);\n $path = JPATH_COMPONENT.DS.\"private\".DS.$pool;\n system(\"rm -rf \".$path);\n }", "function eliminar_procesos_produccion($producto){\n\t\t$sql = \"DELETE FROM prd_productos_procesos WHERE id_producto = \" . $producto;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "function qform_remove_file($def, $cfg)\n{\n global $config;\n if ($config['demo_mode']) {\n msg_die($cfg['msg']['ok']);\n }\n\n $field = get_param('field');\n $primary_val = get_param('primary_val');\n $idx = get_param('idx');\n\n // get field type\n foreach ($def as $t) {\n if ($t['field'] == $field) {\n $type = $t['type'];\n $prefix = (!empty($t['prefix'])) ? $t['prefix'] : '';\n }\n }\n\n // get filename\n $res = sql_query(\"SELECT $field FROM $cfg[table] WHERE $cfg[primary_key] = '$primary_val' LIMIT 1\");\n $row = sql_fetch_array($res);\n\n if (!empty($row[$field]) || ($type == 'img_series') || ($type == 'img_set')) {\n $fn = $row[$field];\n\n // remove file\n $fn = $row[$field];\n if ($type == 'file') {\n @unlink($cfg['file_folder'].'/'.$fn);\n }\n if (($type == 'img') || ($type == 'image') || ($type == 'img_resize') || ($type == 'image_resize')) {\n @unlink($cfg['img_folder'].'/'.$fn);\n }\n if ($type == 'thumb') {\n @unlink($cfg['img_folder'].'/'.$fn);\n @unlink($cfg['thumb_folder'].'/'.$fn);\n }\n if (($type == 'img_series') || ($type == 'img_set')) {\n $x = get_param('idx');\n $ok = false;\n $i = $x;\n $fn = $prefix.'_'.$primary_val.'_'.$i;\n unlink(\"$cfg[img_folder]/$fn.jpg\");\n unlink(\"$cfg[thumb_folder]/$fn.jpg\");\n\n while (!$ok) {\n $i++;\n $fn_old = $prefix.'_'.$primary_val.'_'.$i;\n $fn_new = $prefix.'_'.$primary_val.'_'.($i - 1);\n\n if (file_exists(\"$cfg[img_folder]/$fn_old.jpg\")) {\n rename(\"$cfg[img_folder]/$fn_old.jpg\", \"$cfg[img_folder]/$fn_new.jpg\");\n rename(\"$cfg[thumb_folder]/$fn_old.jpg\", \"$cfg[thumb_folder]/$fn_new.jpg\");\n } else {\n $ok = true;\n }\n }\n }\n\n // update db\n $old = sql_qquery(\"SELECT * FROM $cfg[table] WHERE $cfg[primary_key]='$primary_val' LIMIT 1\");\n sql_query(\"UPDATE $cfg[table] SET $field='' WHERE $cfg[primary_key] = '$primary_val' LIMIT 1\");\n if (!empty($cfg['enable_log'])) {\n // create log - get new values\n $new = sql_qquery(\"SELECT * FROM $cfg[table] WHERE $cfg[primary_key]='$primary_val' LIMIT 1\");\n if ($old != $new) {\n if (empty($cfg['detailed_log'])) {\n $foo = $old[$cfg['log_title']];\n $old = $new = '';\n $old[$cfg['log_title']] = $foo;\n }\n qform_log($primary_val, $old[$cfg['log_title']], LOG_DEL_FILE, $old, $new, $cfg['table']);\n }\n }\n }\n\n msg_die($cfg['msg']['ok']);\n}", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\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\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "public function deleteUnusedFiles(){\n \n }", "function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "private function removeFilmsSinFuncionesDePeliculas(){\n \n $query = \n \"DELETE p\n FROM \" . $this->tableName . \" p\n LEFT JOIN funciones f\n ON p.id = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "function remover($arquivo,$local){\n if($arquivo == ''){\n return;\n }\n $deletar = $local.$arquivo;\n unlink($deletar);\n }", "public function cleanup()\n {\n // Remove old parts without binaries \n $this->removePartsWithoutBinary();\n \n // Remove parts where the binary is missing\n $this->removePartsWithMissingBinary();\n \n // Remove binaries without parts\n $this->removeBinariesWithoutParts();\n }", "function delete_usager() {\r\n\t\t\t\r\n\t\tglobal $LEA_REP;\r\n\t\t\t\r\n\t\t$this->set_detail();\r\n\t\t\t\r\n\t\tif($this->profil == 'app') {\r\n\t\t\t$apprenti = new Apprenti($this->id_usager);\r\n\t\t\t$apprenti->set_detail();\r\n\t\t\t$apprenti->delete_parent();\r\n\t\t\t$apprenti->delete_documents_apprenti();\r\n\r\n\t\t}\r\n\t\t\t\r\n\t\t// suppression de fichiers joints avec les message de cet usager\r\n\r\n\t\t$sql = \"SELECT fichier_joint\r\n\t\t\t\tFROM\tles_messages\r\n\t\t\t WHERE id_usager = '$this->id_usager'\"; \t\t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\twhile($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\tif(file_exists($LEA_REP.'documents/fichiers_joints_msg/'.$ligne['fichier_joint']))\r\n\t\t\t@unlink($LEA_REP.'documents/fichiers_joints_msg/'.$ligne['fichier_joint']);\r\n\r\n\t\t}\r\n\t\t\t\r\n\t\t// suppression de son images d'accueil\r\n\r\n\t\t$sql = \"SELECT img_accueil\r\n\t\t\t\tFROM\tles_usagers\r\n\t\t\t WHERE id_usager = '$this->id_usager'\"; \t\t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\tif($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\tif(file_exists($LEA_REP.'images/img_accueil/'.$ligne['img_accueil']))\r\n\t\t\t@unlink($LEA_REP.'images/img_accueil/'.$ligne['img_accueil']);\r\n\r\n\t\t}\r\n\t\t\t\r\n\t\t// suppression de ses documents partagés\r\n\r\n\t\t$sql = \"SELECT id_espace_partage, nom_fichier , lien_id_espace\r\n\t\t\t\tFROM\tespace_partage\r\n\t\t\t WHERE \tid_auteur_espace_partage = '$this->id_usager'\"; \t\t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\twhile($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\t$fichier = $ligne['lien_id_espace'].'_'.$ligne['id_espace_partage'].'_'.$ligne['nom_fichier'];\r\n\r\n\t\t\tif(file_exists($LEA_REP.'espace_de_partage/fichiers/'.$fichier))\r\n\t\t\t@unlink($LEA_REP.'espace_de_partage/fichiers/'.$fichier);\r\n\r\n\t\t}\r\n\t\t\t\r\n\t\t// suppression de l'usager\r\n\t\t$sql = \"DELETE FROM les_usagers where id_usager='$this->id_usager'\";\r\n\t\t$result = $this->bdd->executer($sql);\r\n\r\n\t}", "function Delete($id_fichero,$inmueble)\n { \n\t\t// Consulta para obtener el nombre de la fichero\n\t\t$sql_atribs=\"SELECT * FROM ficheros_inmuebles WHERE inmueble=\".$inmueble.\" AND id_fichero=\".$id_fichero;\n\t\t$atribs = $this->Execute($sql_atribs) or die($this->ErrorMsg());\n\t\t$num_atribs = $atribs->RecordCount();\n\t\t$atrib = $atribs->FetchRow();\n\t\t// Finalmente borra la ficherografía\n\t\t$sql = sprintf(\"DELETE FROM ficheros_inmuebles WHERE inmueble=%s AND id_fichero=%s\",\n\t\t\t\t\t\t\tGetSQLValueString($inmueble, \"int\"),\n\t\t\t\t\t\t\tGetSQLValueString($id_fichero, \"int\"));\n\t\t$this->Execute($sql) or die($this->ErrorMsg());\n\t\t// Según el tipo de fichero se borrará de una determinada carpeta\n\t\tswitch($atrib['tipo_fichero'])\n\t\t{\n\t\t\tcase '1': $nombre_carpeta=\"adjuntos\"; break;\n\t\t\tcase '2': $nombre_carpeta=\"fotos\"; break;\n\t\t\tcase '3': $nombre_carpeta=\"planos\"; break;\n\t\t\tcase '4': $nombre_carpeta=\"videos\"; break;\n\t\t\tcase '5': $nombre_carpeta=\"cert_energetica\"; break;\n\t\t}\n\t\t// Borramos la ficheros asociadas\n\t\t$path_fichero=PATHINCLUDE_FRAMEWORK_DOC . \"inmuebles/inmueble_\".$inmueble.\"/\".$nombre_carpeta.\"/\".$atrib['fichero'];\n\t\tunlink($path_fichero);\n }", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "function clean_up1($res, $obj)\n{\n\t$res = $obj->query1(\"delete from reg_pro where pro_id in (\n'###############',\n'################',\n'##################',\n'**************',\n'****************')\");\n\twhile(odbc_fetch_row($res)){\n\t\techo 'deleted';\n\t}\t\t\n}", "function borrarProducto ($nombreproducto){\r\n $enc = false;\r\n for ($i = 0; $i < count ($this->productos) && ($enc == false); $i++){\r\n if ($this->productos[$i]->getNombre() == $nomproducto){\r\n $this->productos[$i] = null;\r\n $enc = true;\r\n }\r\n }\r\n }", "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function supprimerProduit($code) {\n\t // echo \"<p> supprimer $code </p>\";\n\t \n\t /* on verifie si le produit est dans le panier */\n\t if ( isset($this->lignes[$code]) ) {\n\t /* il y est, donc on retrouve la ligne de panier */\n\t $lp = $this->lignes[$code] ;\n\t \n\t /* on supprime 1 de la quantite */\n\t $lp->qte = $lp->qte - 1 ; \n\t \n\t // echo \"<p> nouvelle qte : \" . $lp->qte . \"</p>\" ;\n\t \n\t /* si qte<1, on supprime toute la ligne du tableau */\n\t if ( $lp->qte < 1) {\n\t unset($this->lignes[$code]);\n\t // echo \"<p> produit $code supprime \" . count($this->lignes) . \"</p>\";\n\t \n\t /* on enleve un produit de nbProduits */\n\t $this->nbProduits = $this->nbProduits - 1;\n\t }\n\t }\t \n\t }", "function deleteAttribute(){\n\n\t//Database connection\n\tglobal $mysqli;\n\t\n\t//Hrefs\n\tglobal $cms_continent;\n\tglobal $cms_deleteAttribute;\n\n\t//Selected continent and attribute\n\t$continent_id=$_GET[\"continent_id\"];\n\t$attribute_id=$_GET[\"attribute_id\"];\n\t\n\t//Selection of the paths of the files to delete\n\t$sql_itemFiles=\"SELECT * FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\"; \";\n\t$res_itemFiles=mysqli_query($mysqli, $sql_itemFiles);\n\t$sql_attributeFiles=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\" LIMIT 1;\";\n\t$res_attributeFiles=mysqli_query($mysqli, $sql_attributeFiles);\n\n\t//Deletion of the item files\n//\tif($res_itemFiles){\n\n\t//\twhile($itemFile=$res_itemFiles->fetch_assoc()){\n\n\t//\t\tunlink(\"\".$itemFile[\"image_path\"].\"\");\n\t//\t\tunlink(\"\".$itemFile[\"description_path\"].\"\");\n\n\t//\t}\n\n//\t}\n\n\t//Deletion of the attribute files\n//\tif($res_attributeFiles){\n\n//\t\twhile($attributeFile=$res_attributeFiles->fetch_assoc()){\n\n//\t\t\tunlink(\"\".$attributeFile[\"image_path\"].\"\");\n//\t\t\tunlink(\"\".$attributeFile[\"description_path\"].\"\");\n\n//\t\t}\n\n//\t}\n\n\n\t//Deletion of the associated rows from the database\n\t$sql_deleteAttributeItems=\"DELETE FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttributeItems=mysqli_query($mysqli, $sql_deleteAttributeItems);\n\t$sql_deleteAttribute=\"DELETE FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttribute=mysqli_query($mysqli, $sql_deleteAttribute);\n\n\tif($res_deleteAttributeItems && $res_deleteAttribute){\n\n\t\tpage_redirect(\"\".$cms_continent.\"?continent_id=\".$continent_id.\"\");\n\n\t}else{\n\n\t\tpage_redirect(\"\".$cms_deleteAttribute.\"?continent_id=\".$continent_id.\"&attribute_id=\".$attribute_id.\"\");\n\n\t}\n if($res_itemFiles){\n \n $res_itemFiles->close(); \n \n }\n\tif($res_attributeFiles){\n\t \n\t $res_attributeFiles->close(); \n\t \n\t}\n\t\n\tif($res_deleteAttributeItems){\n\t \n\t $res_deleteAttributeItems->close(); \n\t \n\t}\n\tif($res_deleteAttribute){\n\t \n\t $res_deleteAttribute->close(); \n\t \n\t}\n\t$mysqli->close();\n\n}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "function removeProcessoPronto(){\n\tunset($_SESSION['processosProntos'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['processosProntos'] = array_values($_SESSION['processosProntos']);\n}", "public function remove($table = NULL, $id_field = NULL) {\n\t\t$file_remove = $this->value();\n\t\t$file_remove = $file_remove['removed'];\n\n\t\t$ids = Array();\n\t\t$files = Array();\n\t\tforeach ($file_remove as $file_IN) {\n\t\t\tif (@unlink($file_IN->dir.$file_IN->filename)) {\n\t\t\t\t$ids []= (int)$file_IN->id;\n\t\t\t}\n\t\t}\n\t\tif ($table !== NULL && $ids) {\n\t\t\t$sql = 'DELETE FROM '.$table.' WHERE '.$id_field.' IN ('.join(', ', $ids).')';\n\t\t\ttep_db_query($sql);\n\t\t}\n\t}", "public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}", "public function deleteEntries(){\r\n\t\t global $xname;\r\n\t\t \r\n\t\t \r\n\t\t // First we get an array of the XML property xml_id's\r\n\t\t $xmlIdXmlArray = array();\r\n\t\t foreach ($this->xml->property as $vivienda){\r\n\t\t\t $xmlIdXmlArray[] = (string) $vivienda->id;\r\n\t\t }\r\n\t\t \r\n\t\t $databaseIdXmlQuery = \"SELECT id_xml FROM {$xname}_viviendas WHERE agente = '{$this->agent}'\";\r\n\t\t $databaseIdSql\t = $this->query($databaseIdXmlQuery);\r\n\t\t $databaseIdXmlArray = array();\r\n\t\t while ($databaseIdXml = $databaseIdSql->fetch_row()) {\r\n\t\t\t $databaseIdXmlArray[]\t= $databaseIdXml[0];\r\n\t\t\t \r\n\t\t }\r\n\t\t\t\r\n\t\t // And we check to see if the database entry is in the XML file, if not, we delete it\r\n\t\t foreach ($databaseIdXmlArray as $databaseIdXml){\r\n\t\t\t if (!in_array($databaseIdXml,$xmlIdXmlArray)) {\r\n\t\t\t\t $this->log->write(Logger::WARNING,'Deleting: '.$databaseIdXml);\r\n\t\t\t\t // Delete entry\r\n\t\t\t\t $deleteQuery = \"DELETE FROM {$xname}_viviendas WHERE id_xml = '{$databaseIdXml}'\";\r\n\t\t\t\t $this->query($deleteQuery);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "function eliminarPoi($id) {\n $sql = \"DELETE FROM poi WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "private function deleteUnexistingFiles() {\n\t\t$files = array (\n\t\t\t\t// Release 2.0\n\t\t\t\t'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',\n\t\t\t\t'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-j4.php',\n\t\t\t\t'/components/com_clm_turnier/helpers/html/clm_turnier.php',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/media/com_clm_turnier/js/sonderranglisten-j4.php'\n\t\t);\n\n\t\t$folders = array (\n\t\t\t\t// Release 3.0\n\t\t\t\t'/components/com_clm_turnier/includes',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers/html',\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/components/com_clm_turnier/classes/'\n\t\t);\n\n\t\tjimport('joomla.filesystem.file');\n\t\tforeach ($files as $file) {\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) &&\n\t\t\t\t\t! JFile::delete(JPATH_ROOT . $file)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file), 'warning');\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\t\tforeach ($folders as $folder) {\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) &&\n\t\t\t\t\t! JFolder::delete(JPATH_ROOT . $folder)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder), 'warning');\n\t\t\t}\n\t\t}\n\t}", "public function excluirImagemGaleria(){ \n\t\t\n\t\t//deleta a imagem da pasta\n\t\tinclude_once(\"../funcoes/geral.php\");\n\t\t$sql = \"\n\t\t\tSELECT thumb\n\t\t\tFROM programa_imagem\n\t\t\"; \n\t\tif($this->idImagem)\n\t\t\t$sql .=\" WHERE id = '$this->idImagem'\";\n\n\t\t$this->sql = $sql;\n\t\t$this->qr = self::execSql($this->sql);\t\n\t\t$qtRegistros = $this->getQuantidadeData($sql); // retorna a quantidade de registro\t \n\t\tif($qtRegistros > 0){\n\t\t\twhile($lista = self::resultsAll($this->qr)){\n\n\t\t\t\tdeletaImagem($lista[\"thumb\"]);//deleto a imagem do arquivo\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public function removeRegisteredFiles() {}", "function removePreLoadedProperties(\\OxidEsales\\Eshop\\Application\\Model\\Article $product) : void\n{\n unset(\n $product->oxarticles__oxshopid,\n $product->oxarticles__oxnid,\n $product->oxarticles__oxstockflag,\n $product->oxarticles__oxvarstock,\n $product->oxarticles__oxvarcount,\n $product->oxarticles__oxvarstock,\n $product->oxarticles__oxvarminprice,\n $product->dabsimagedir,\n $product->ssl_dimagedir,\n $product->nossl_dimagedir,\n $product->oxarticles__oxparentid,\n );\n}", "public function removeAllDependency($id)\n {\n $propertyValues = PropertyValue::where(\"property_id\", $id)->get();\n\n foreach($propertyValues as $value) {\n ProductProperty::where(\"property_value_id\",$value->id)->delete();\n PropertyValue::whereId($value->id)->delete();\n }\n\n }", "function DeleteUnwantedFile($SPOOLPATH, $OrderNumber) {\n\t#example \"/apache/htdocs/myfile.pdf\" ( not \"http:xyz.com/myfile.pdf\" )\n\n\t# delete file if exists\n\t$DeleteTransitgraphFile = sprintf(\"%s/%d.transitgraph.pdf\", $SPOOLPATH, $OrderNumber);\n\t$DeleteWheelFile = sprintf(\"%s/%d.wheel.pdf\", $SPOOLPATH, $OrderNumber);\n\t$DeleteBundleFile = sprintf(\"%s/%d.bundle.pdf\", $SPOOLPATH, $OrderNumber);\n\n\tif (file_exists($DeleteTransitgraphFile)) {\n\t\t@unlink ($DeleteTransitgraphFile);\n\t}\n\n\tif (file_exists($DeleteWheelFile)) {\n\t\t@unlink ($DeleteWheelFile);\n\t}\n\n\tif (file_exists($DeleteBundleFile)) {\n\t\t@unlink ($DeleteBundleFile);\n\t}\n}", "function supprimerArticle($id_produit){\n //Si le panier existe\n if (creating_cart())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n\t $tmp['id_produit'] = array();\n $tmp['nom_produit'] = array();\n $tmp['prix_produit'] = array();\n $tmp['qte_produit'] = array();\n $tmp['desc_produit'] = array();\n\t $tmp['img_produit'] = array();\n\t $tmp['ptsfid_produit'] = array();\n\n\n\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n if ($_SESSION['panier']['id_produit'][$i] !== $id_produit)\n {\n array_push( $tmp['id_produit'],$_SESSION['panier']['id_produit'][$i]);\n array_push( $tmp['nom_produit'],$_SESSION['panier']['nom_produit'][$i]);\n array_push( $tmp['prix_produit'],$_SESSION['panier']['prix_produit'][$i]);\n array_push( $tmp['qte_produit'],$_SESSION['panier']['qte_produit'][$i]);\n array_push( $tmp['desc_produit'],$_SESSION['panier']['desc_produit'][$i]);\n\t\t\tarray_push( $tmp['img_produit'],$_SESSION['panier']['img_produit'][$i]);\n\t\t\tarray_push( $tmp['ptsfid_produit'],$_SESSION['panier']['ptsfid_produit'][$i]);\n\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['panier'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n\t \theader(\"Location: panier.php\");\n\t\tdie();\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "function excluir($id) {\n\t\n\t\t$nomeModel = $this->nomeModel;\n\t\t$this->load->model('administracao/'.$this->nomeModel);\n\t\t\n\t\tif($this->temFoto){\n\t\t\t//busca as fotos da tabela para deletar da pasta\n\t\t\t$this->db->where($this->idFoto, $id);\n\t\t\t$query = $this->db->get($this->tabelaFoto);\n\t\t\t\n\t\t\t$dados['foto'] = $query->result();\n\t\t\t\n\t\t\tif($dados['foto']){\n\t\t\tforeach($dados['foto'] as $foto): // percorre todas as fotos com o id_produto\n\t\t\t\tunlink('imgs/' . $foto->nome);\n\t\t\tendforeach;\n\t\t\t}\n\t\t\t\n\t\t if (!$this->$nomeModel->fotoexcluir($id)){ // deleta foto do banco\n\t\t\t\techo \"Erro ao excluir Foto do produto\";\n\t\t\t}\n\t\t}\n \n if ($this->$nomeModel->excluir($id)) { // deleta arquivo do banco\n \n redirect('administracao/'.$this->nomeController.'/listar/', 'refresh');\n } else {\n echo \"erro ao excluir o Produto.\";\n }\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function EliminarProductos($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $producto_id) {\n if ($producto_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) == 0) {\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n }\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los productos, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los productos asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }", "function deleteSymboly($q) {\n\n\t// hodnoty parametru pro produkt\n\t$v111 = my_DB_QUERY($q,__LINE__,__FILE__);\n\twhile ($z111 = mysql_fetch_array($v111)) {\n\t\n\t\tunlink(IMG_I_S.$z111['img']);\n\t\tunlink(IMG_I_O.$z111['img']);\n\t\n\t}\n\n}", "public function eliminar($objeto){\r\n\t}", "public function Eliminar($id)\n\t{\n\t\ttry \n\t\t{\n\t\t\t$stm = $this->pdo\n\t\t\t ->prepare(\"DELETE FROM properties WHERE id = ?\");\t\t\t \n\n\t\t\t$stm->execute(array($id));\n\t\t} catch (Exception $e) \n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public static function fileRm($pCondId, $pCompId, $pArtId, $pNameList) {\n //$where['contid'] = $pCondId;\n\n $pathPrefix = self::getPath($pCompId, $pCondId, $pArtId);\n\n $fileDistPath = dirFunc::getSiteUploadPathData() . $pathPrefix;\n $filePreviewPath = dirFunc::getPreviewImgPath($pathPrefix);\n $fileResizePath = dirFunc::getSiteImgResizePath() . $pathPrefix;\n\n foreach ($pNameList as $name) {\n fileValid::isSafe($name, new \\Exception('Неверное имя файла', 234));\n\n //$where['md5'] = md5_file($pathDist.$name);\n //$contFile->delete($where);\n\n filesystem::unlink($fileDistPath . $name);\n filesystem::unlink($filePreviewPath . $name);\n //filesystem::rUnlink($filePreviewPath, filesystem::ALL_NO_FILTER_FOLDER, $name);\n filesystem::rUnlink($fileResizePath, filesystem::ALL_NO_FILTER_FOLDER, $name);\n }\n // func. fileRm\n }", "public function galeriasExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(2));\n\t\t$resultado = $bd->read(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tunlink('uploads/img_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/tb_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/destaque_'.$resultado[0]['imagem']);\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tHTML::certo('Imagem exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreImagemGaleria\",\"#imagens\");</script>');\n\t}", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "function deleteProductMediasById($id) {\r\n //On supprime physiquement les medias avant de les retirer de la base\r\n $medias = getProductMediasById($id);\r\n foreach ($medias as $media) {\r\n unlink($media->mediaSource);\r\n }\r\n\r\n $dbc = connection();\r\n $table = 'medias';\r\n $dbc->quote($table);\r\n\r\n $req = \"DELETE FROM $table \"\r\n . \"WHERE id IN (\"\r\n . \"SELECT pm.id_medias \"\r\n . \"FROM products_has_medias \"\r\n . \"AS pm \"\r\n . \"WHERE pm.id_products = $id)\";\r\n\r\n $requPrep = $dbc->prepare($req); // on prépare notre requête\r\n $requPrep->execute();\r\n $data = $requPrep->fetchAll(PDO::FETCH_OBJ);\r\n $requPrep->closeCursor();\r\n}", "function photo_cache_cleanup_by_id($id)\n{\n\t$result=$GLOBALS['db']->Execute(\"SELECT filename FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n\n\twhile($row=$result->FetchRow())\n\t{\n\t\t$file2del = get_full_path($row[0]);\n\t\tif(!@unlink($file2del)) {\n\t\t\tif(file_exists($file2del)) {\n\t\t\t\terror_log(\"photo_cache_cleanup_by_id unable to delete file: \".$file2del);\n\t\t\t}\n\t\t}\n\t}\n\t$GLOBALS['db']->Execute(\"DELETE FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n}", "function destructor()\n\t{\n\t\tunset($Resources,$FileName,$FileType,$FileSize,$NumRes,$FileVersion,$Description,$DataOffset);\n\t}", "function _delete_photo($file){\n\t\t@unlink('web/upload/'.image_small($file));\n\t\t@unlink('web/upload/'.image_large($file));\n\t}", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function deduct_file($no,$p_tupe)\n\t{\n\t\t$qry1=\"select * from photo_dir where dir_type='$p_tupe'\";\n\t\t$rs1=mysql_query($qry1);\n\t\t$row=mysql_fetch_array($rs1);\n\t\t$old_no=$row[\"files\"];\n\t\t$new_no=$old_no-$no;\t\t\n\t\t$qry2=\"update photo_dir set files=\".$new_no.\" where dir_type='$p_tupe'\";\n\t\t$rs2=mysql_query($qry2);\n\t}", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "public function remove($files)\r\n {\r\n if (is_array($files)) {\r\n /* percorre o array escluindo os arquivos */\r\n foreach ($files as $file) {\r\n @unlink($this->_destination . $file);\r\n }\r\n } else if (is_string($files)) {\r\n /* excluir o arquivo passado */\r\n @unlink($this->_destination . $files);\r\n }\r\n }", "function deleteConf($id, $file=CONFERENCES){\n\t$confs = getJSON($file);\n\t$index = searchIndex($confs, $id);\n\tarray_splice($confs, $index, 1);\n\t\n\texport($confs, $file);\n}", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "private function _prune()\n {\n if (empty($this->_files) && empty($this->_subdirectories)) {\n $this->_element->delete();\n if ($this->_parent instanceOf Horde_Pear_Package_Xml_Directory) {\n $this->_parent->_deleteSubdirectory($this->_element->getName());\n }\n }\n }", "public function EliminarProducto($producto_id)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) > 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar el producto, porque tiene cotizaciones asociadas\";\n return $resultado;\n }\n\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n\n $em->flush();\n $resultado['success'] = true;\n } else {\n $resultado['success'] = false;\n $resultado['error'] = \"No existe el registro solicitado\";\n }\n\n return $resultado;\n }", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "function borrar_opciones(){\n $tuplas = $this->references(\"opcion\");\n foreach($tuplas as $valor){\n $eliminar=$this->Connection->DB->get_object_by_id(\"opcion\", $valor->id_opcion);\n $eliminar->delete();\n }\n }", "public function ViderDossierCache()\n\t\t{\n\t\t\t$fichiers_en_cache = scandir($this->chemin_dossier_cache);\n\t\t\tforeach ($fichiers_en_cache as $key => $fichier) {\n\t\t\t\tif($fichier=='.'||$fichier=='..'||$fichier=='.htaccess') { continue; }\n\t\t\t\t\tdelete($fichier);\n\t\t\t}\n\t\t}", "function suppProduit($id_produit) // example ref 30\n{\n //on transmet à la foncton predefini araay_search l'id_produit du produit en rupture de stock\n // array_search() retourne l'indice du tableau ARRAY auquel se trouve l'id_produit à supprimer\n\n //recupere l'indice du tableau afin de pouvoir supprime tt les lignes du tableau panier\n $positionProduit = array_search($id_produit, $_SESSION['panier']['id_produit']); //[1] example car produit rupture de stock\n\n\n //si la valeur de $positionProduit est different de FALSE, cela veut dire que l'id produit a supprimer a bien été trouvé\n //dans le panier de la session\n if ($positionProduit !== false) {\n\n\n //array_splice() permet de supprimer des elements d'un tableay ARRAY\n //on supprime chaque ligne dans les tableaux ARRAY du produit en rupture de stock\n //array_splice() re organise les tableaux ARRAY, c'est à dire que tout les elements aux indices inférieur\n //remontent aux indices superieur, le produit stocké à l'indice 3 du teableau ARRAY remonte à l'indice 2 du tableau ARRAY\n\n\n // supprimer dans tab photo ==> indice $positionproduit et 1 correspond à 1 element\n array_splice($_SESSION['panier']['id_produit'], $positionProduit, 1);\n array_splice($_SESSION['panier']['photo'], $positionProduit, 1);\n array_splice($_SESSION['panier']['reference'], $positionProduit, 1);\n array_splice($_SESSION['panier']['titre'], $positionProduit, 1);\n array_splice($_SESSION['panier']['quantite'], $positionProduit, 1);\n array_splice($_SESSION['panier']['prix'], $positionProduit, 1);\n }\n}", "public function remove()\n\t{\n\t\t$photosTable = PTA_DB_Table::get('Catalog_Product_Photo');\n\t\t$photos = (array)$photosTable->getPhotos($this->_id);\n\n\t\tif (parent::remove()) {\n\t\t\t$photoFileField = $photosTable->getFieldByAlias('photo');\n\t\t\tforeach ($photos as $photo) {\n\t\t\t\tPTA_Util::unlink(PTA_CONTENT_PATH . '/' . $photo[$photoFileField]);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function vaciar_temporales()\n\t{\n\t\t$directorio = $_SERVER['DOCUMENT_ROOT'].Yii::app()->request->baseUrl.\"/images/tmp/\"; \n\t\t/**\n\t\t*\tRecorre el directorio y borra los archivos que contiene\n\t\t*/\n\t\t$handle = opendir($directorio); \n\t\twhile ($file = readdir($handle)) { \n\t\t\tif (is_file($directorio.$file)) { \n\t\t\t\tunlink($directorio.$file); \n\t\t\t}\n\t\t}\n\t}", "function removeLicense($extrainfo = array ())\n\t{\n\t\t// clean from old values\n\t\t$this->dao->cleanArchive(null, null, $extrainfo['module']);\n\n\t\treturn $extrainfo;\n\t}", "function RemoveLayout($layout_id){\n\t//Making a query to get the location of the file\t\n\t$stringBuilder = \"SELECT l.default_background, fdb.location AS backgroundLocation, l.logo, flogo.location AS logoLocation \";\n\t$stringBuilder .= \"FROM layout l \";\n\t$stringBuilder .= \"INNER JOIN `file` fdb ON fdb.file_id=l.default_background \";\n\t$stringBuilder .= \"INNER JOIN `file` flogo ON flogo.file_id=l.logo \";\n\t$stringBuilder .= \"WHERE l.layout_id=? \";\n\t\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(array($layout_id)); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\n\tforeach ($result as $row) {\n\t\t//Putting the name together\n\t\t$default_background = $row[\"default_background\"];\n\t\t$default_background_location = $_SERVER[\"DOCUMENT_ROOT\"] . $row[\"backgroundLocation\"];\n\t\t$logo = $row[\"logo\"];\n\t\t$logo_location = $_SERVER[\"DOCUMENT_ROOT\"] . $row[\"logoLocation\"];\n\n\t\tif (unlink($default_background_location) && unlink($logo_location)){ //Removing the files\n\t\t\t//Making the delete query\n\t\t\t$stringBuilder = \"DELETE FROM layout WHERE layout_id=? \";\n\t\t\t//preparing the query\n\t\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t\t\tif($query->execute(array($layout_id))){\n\n\t\t\t\t$stringBuilder = \"DELETE FROM `file` WHERE file_id=? \";\n\t\t\t\t//preparing the query\n\t\t\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\n\t\t\t\tif($query->execute(array($default_background)) && $query->execute(array($logo))){\n\t\t\t\t\techo \"<div class=\\\"alert alert-success alert-dismissible fade show\\\" role=\\\"alert\\\"><button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-label=\\\"Close\\\"><span aria-hidden=\\\"true\\\">&times;</span></button>De opmaak is verwijderd</div>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<div class=\\\"container-fluid\\\"><div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Er is iets fout gegaan</div></div>\";\n\t\t}\n\t}\n}", "public function cancella($cartella){\n\t\n\t\tif(substr($cartella, -1)!='/'){\n\t\t\t$cartella=$cartella.'/';\n\t\t}\n\t\tif($cartella[0]!='/'){\n\t\t\t$cartella='/'.$cartella;\n\t\t}\n\n\t\t$cartella2=$_SERVER['DOCUMENT_ROOT'].$cartella;\n\n\t\tif (is_dir($cartella2)) { \n\t\t$objects = scandir($cartella2); \n\t\tforeach ($objects as $object) { \n\t\t\tif ($object != \".\" && $object != \"..\") { \n\t\t\t\tif (filetype($cartella2.\"/\".$object) == \"dir\") $this->cancella($cartella.\"/\".$object); else unlink($cartella2.\"/\".$object); \n\t\t\t\t} \n\t\t\t} \n\t\t\treset($objects); \n\t\t\trmdir($cartella2);\n\t\t} \n\t}", "function remove(){\n tep_db_query(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }", "public function excluirAnuncio($id){\n global $pdo;\n $sql = $pdo->prepare(\"DELETE FROM anuncios_imagens WHERE id_anuncio = :id_anuncio\"); // vai remover o registro de imagens\n $sql->bindValue(\":id_anuncio\", $id);\n $sql->execute(); \n\n $sql = $pdo->prepare(\"DELETE FROM anuncios WHERE id = :id\"); \n $sql->bindValue(\":id\", $id);\n $sql->execute(); \n\n \n\n\n\n }", "function remove() {\n $keys = \"\";\n $keys_array = $this->keys();\n for ($i = 0; $i < sizeof($keys_array); $i ++) {\n $keys .= \"'\" . $keys_array[$i] . \"',\";\n }\n $keys = substr($keys, 0, - 1);\n \n if (MODULE_PAYMENT_CGP_DROP_TABLE === 'True') {\n tep_db_query(\"DROP TABLE IF EXISTS `CGP_orders_table`\");\n }\n \n tep_db_query(\"DELETE FROM \" . TABLE_CONFIGURATION . \" WHERE configuration_key IN (\" . $keys . \")\");\n }", "public function removeTemporary();", "public function eliminaPedido($codpedido) {\n $sql = \"SELECT elementoPedido_elementoPedido_id\n FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result = $this->bd->query($sql);\n $numfilas = $result->num_rows;\n /* Elimino las asociaciones del pedido con sus elementos */\n $sql2 = \"DELETE FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result2 = $this->bd->query($sql2);\n /* Elimino los elementos del pedido, con sus elementos de cola y asociaciones */\n for($i=0; $i<$numfilas ; $i++) {\n $row = $result->fetch_assoc();\n $cod = $row[\"elementoPedido_elementoPedido_id\"];\n $sql3 = \"DELETE FROM asociaPlato\n WHERE elementoColaCocina_elementoPedido_elementoPedido_id = $cod\";\n $sql4 = \"DELETE FROM asociaBebida\n WHERE elementoColaBar_elementoPedido_elementoPedido_id = $cod\";\n $sql5 = \"DELETE FROM elementoColaCocina\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql6 = \"DELETE FROM elementoColaBar\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql7 = \"DELETE FROM elementoPedido\n WHERE elementoPedido_id = $cod\";\n $result3 = $this->bd->query($sql3);\n $result4 = $this->bd->query($sql4);\n $result5 = $this->bd->query($sql5);\n $result6 = $this->bd->query($sql6);\n $result7 = $this->bd->query($sql7);\n }\n /* Elimino el pedido y */\n $sql8 = \"DELETE FROM facturaPedido\n WHERE pedido_pedido_id = $codpedido\";\n// $sql9 = \"DELETE FROM pedido\n// WHERE pedido_id = $codpedido\";\n\n $result8 = $this->bd->query($sql8);\n// $result9 = $this->bd->query($sql9);\n }", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "public function EliminarPromociones($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $promocion_id) {\n if ($promocion_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Promocion')\n ->find($promocion_id);\n if ($entity != null) {\n\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/promociones/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n\n // Quitar descuento a los productos relacionados\n $productos = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosDePromocion($promocion_id);\n foreach ($productos as $producto) {\n $producto->setPrecioEspecial(null);\n $producto->setPromocion(null);\n $producto->setPorciento(NULL);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los promociones, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los promociones asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "public function clearProperties();", "public function galeriaExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(3));\n\t\t$resultado = $bd->read(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\tforeach($resultado as $dados){\n\t\t\tunlink('uploads/img_'.$dados['imagem']);\n\t\t\tunlink('uploads/tb_'.$dados['imagem']);\n\t\t\tunlink('uploads/destaque_'.$dados['imagem']);\n\t\t}\n\t\t$bd->delete(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\t$bd = new Galerias_Model();\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\tHTML::certo('Galeria exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreGaleriasListar\",\"#galerias\");</script>');\n\t}", "public function EliminarProductos()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" select codproducto from detalleventas where codproducto = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from productos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" delete from kardexproductos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: productos?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: productos?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t} else {\n\n\t\theader(\"Location: productos?mesage=3\");\n\t\texit;\n\t}\t\n}", "public static function deletaProdutoCarrinho(){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $expPro = explode(';',self::$carrinho->produto_id);\n $expQuant = explode(';',self::$carrinho->quantidade);\n unset($expPro[self::$posicao]);\n unset($expQuant[self::$posicao]);\n\n //VERIFICA SE TEM PRODUTOS NO CARRINHO\n if($expPro and $expQuant !== ''){\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n $query = 'UPDATE carrinhos SET produto_id=:pro, quantidade=:qnt, idCliente=:idC WHERE id=:id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,$impPro);\n $stmt->bindValue(2,$impQuant);\n $stmt->bindValue(3,self::$carrinho->idCliente);\n $stmt->bindValue(4,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n return true;\n }throw new \\Exception(\"Erro ao Deletar Produto\");\n\n //SE O CARRINHO ESTIVER VAZIO SERA DELETADO\n }else{\n $query = 'DELETE FROM carrinhos WHERE carrinhos.id LIKE :id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n $_SESSION['user']['carrinhoId'] = NULL;\n\n return true;\n }throw new \\Exception(\"Erro ao Deletar Carrinho\");\n }\n }", "function file_deleteData($vPageID) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## data connection\n\t$db_connectionMain = new DB_Sql();\n\t$f = new file_object(); \n\t\n\t## first we need to get the files in order to delete them from the filesystem- then remove\n\t## them from the db\n\t$pageData = array();\n\tfile_getData($vPageID,$pageData);\n\n\tforeach($pageData as $current_file) {\n\t\t## remove the file\n\t\t$f->delete_file(MATRIX_UPLOADDIR_DOCS.$current_file['filename']);\n\t}\n\n\t## finally delete all files\n\t$query = \"DELETE FROM \".PAGE_FILE.\" WHERE page_id='$vPageID' and client_id='$client_id'\";\n\t$result_pointer = $db_connectionMain->query($query);\n}", "function convertizer_remove() {\ndelete_option('convertizer_data');\n}" ]
[ "0.6425457", "0.6214671", "0.61338115", "0.6123779", "0.61083204", "0.60348797", "0.59706146", "0.59237784", "0.583745", "0.583333", "0.58218706", "0.5782317", "0.57731783", "0.57566667", "0.5748633", "0.5732352", "0.5731475", "0.57248944", "0.5724773", "0.57100385", "0.5707863", "0.57018346", "0.5693744", "0.5682011", "0.56621885", "0.56569046", "0.5653776", "0.56496966", "0.5634263", "0.5634003", "0.5626218", "0.56238157", "0.5605061", "0.55991423", "0.55971116", "0.5595735", "0.55658215", "0.5564552", "0.55634767", "0.5551295", "0.554554", "0.55400467", "0.5539673", "0.55296963", "0.5529002", "0.5517957", "0.55157083", "0.5508055", "0.5502244", "0.5493736", "0.5456341", "0.54543394", "0.54407537", "0.5435798", "0.54330635", "0.54287857", "0.54287785", "0.542447", "0.54187614", "0.54135215", "0.54080844", "0.5407673", "0.54061675", "0.54043776", "0.539852", "0.5392561", "0.5387334", "0.538395", "0.53829855", "0.5380064", "0.5374696", "0.5372769", "0.53672004", "0.53648144", "0.5364452", "0.5362345", "0.53530014", "0.53518295", "0.53487515", "0.53474647", "0.534705", "0.53452134", "0.53433424", "0.53416336", "0.5341302", "0.534041", "0.5337119", "0.5335672", "0.53340286", "0.5328477", "0.53277314", "0.53195953", "0.5313962", "0.5309485", "0.53087443", "0.52924806", "0.52924216", "0.5291848", "0.529063", "0.5289381", "0.5288413" ]
0.0
-1
TODO: add to frontier ccording to priority
function add2Front($url, $priority){ global $frontier; $frontier->insert($url,$priority); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "protected function setPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority()\n {\n }", "public function current_priority()\n {\n }", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority()\n {\n return 75;\n }", "public function priority() : int;", "function getPresetsOrderedByPriority() ;", "public function getPriority() : int;", "public function getPriority()\n {\n return 80;\n }", "public function getPriority()\n {\n return 10;\n }", "static public function getPriority() {\n return 0;\n }", "function priority($demand_id, $sort)\n {\n }", "abstract protected function priorityHandlerReturnValue();", "public function getPriority(): int\n {\n return -15;\n }", "public function getPriority(): int;", "public function getPriority(): int;", "public function getPriority(): int\n {\n return 4;\n }", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "function action_sort($a, $b) {\r return $a['priority'] > $b['priority'] ? 1 : -1;\r}", "function getPriority()\n {\n return $this->instance->getPriority();\n }", "function getExecutionPriority() ;", "function woocommerce_change_actions_priorities() {\n $actions = array(\n array(\n 'tag' => 'woocommerce_after_shop_loop_item_title',\n 'action' => 'woocommerce_template_loop_price',\n 'priority' => 10,\n 'priority_to_set' => 10\n ),\n array(\n 'tag' => 'woocommerce_after_shop_loop_item_title',\n 'action' => 'woocommerce_template_loop_rating',\n 'priority' => 5,\n 'priority_to_set' => 11\n )\n );\n \n foreach($actions as $action) {\n //actions which priorities needs to be changed\n remove_action($action['tag'], $action['action'], $action['priority']);\n \n //new priorities\n add_action($action['tag'], $action['action'], $action['priority_to_set']);\n }\n }", "protected function preProcess() {}", "public function getPriority(): int\n {\n return 98;\n }", "public function getPriority(): int\n {\n return 0;\n }", "function set_priority($ID, $dir, /*optional from here */ $whereFilter='', $absolute=0,$options=array()){\n\tglobal $set_priority, $qr, $qx, $fl, $ln;\n\t//reset\n\t$set_priority=array();\n\textract($options);\n\tif(!$priorityTable)$priorityTable='finan_items';\n\tif(!$priorityField)$priorityField='Priority';\n\tif(!$whereFilter)$whereFilter=1;\n\tif(!$cnx)$cnx=$qx['defCnxMethod'];\n\t//better query\n\t$data=q(\"SELECT COUNT(DISTINCT Priority) AS 'Distinct', COUNT(*) AS Count, MIN($priorityField) AS min, MAX($priorityField) AS max FROM $priorityTable WHERE $whereFilter\", O_ROW);\n\tif($debug)prn($qr);\n\textract($data);\n\tif($Distinct==$max && $Count==$max && $min==1){\n\t\t//sequence is clean\n\t\t//echo 'ok';\n\t}else{\n\t\t//clean sequence\n\t\t$ids=q(\"SELECT ID FROM $priorityTable WHERE $whereFilter ORDER BY $priorityField\", O_COL);\n\t\tif($debug)prn($qr);\n\t\tforeach($ids as $v){\n\t\t\t$e++;\n\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$e WHERE ID='$v'\");\n\t\t\tif($debug)prn($qr);\n\t\t}\n\t\t$max=$e;\n\t}\n\tif($thispriority=q(\"SELECT $priorityField FROM $priorityTable WHERE ID='$ID'\", O_VALUE)){\n\t\tif($debug)prn($qr);\n\t\tif($dir==1 && $thispriority>1){\n\t\t\t//i.e. move product up\n\t\t\tif($absolute){\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$priorityField+1 WHERE $whereFilter AND $priorityField<$thispriority\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=1 WHERE ID=$ID\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t}else{\n\t\t\t\t//swap\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$priorityField+1 WHERE $whereFilter AND $priorityField+1=$thispriority\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$thispriority-1 WHERE ID=$ID\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t}\n\t\t}else if($dir==-1 && $thispriority<$max){\n\t\t\t//move product down\n\t\t\tif($absolute){\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$priorityField-1 WHERE $whereFilter AND $priorityField>$thispriority\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$max WHERE ID=$ID\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t}else{\n\t\t\t\t//swap\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$priorityField-1 WHERE $whereFilter AND $priorityField-1=$thispriority\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t\tq(\"UPDATE $priorityTable SET $priorityField=$priorityField+1 WHERE ID=$ID\", $cnx);\n\t\t\t\tif($debug)prn($qr);\n\t\t\t}\n\t\t}else{\n\t\t\t$set_priority['notice']='no move needed';\n\t\t}\n\t}else{\n\t\t$set_priority['error']='id of target record not found in group';\n\t}\n\tif($debug)prn($set_priority);\n}", "abstract protected function _preProcess();", "public function getPriority(): int\n {\n return -1;\n }", "public function get_priority() {\n\t\treturn 5;\n\t}", "function requirement_get_priority() {\n\n\treturn array( \"High\",\n\t\t\t\t \"Medium\",\n\t\t\t\t \"Low\",\n\t\t\t\t \"\" );\n\n}", "public function getPresetsOrderedByPriority() {}", "public function getPriority(): int\n {\n return 56;\n }", "public function priority()\n {\n return 'high';\n }", "public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}", "static function add_r_priority(): void {\r\n\t\tself::add_acf_inner_field(self::roles, self::r_priority, [\r\n\t\t\t'label' => 'Priority',\r\n\t\t\t'type' => 'number',\r\n\t\t\t'instructions' => 'Lower = more important.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '25',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'default_value' => 1,\r\n\t\t\t'min' => 1,\r\n\t\t\t'max' => '99',\r\n\t\t\t'step' => 1,\r\n\t\t]);\r\n\t}", "private function findPriority(): void {\n $priority = $this->get(\"x_priority\");\n\n $priority = match ((int)\"$priority\") {\n IMAP::MESSAGE_PRIORITY_HIGHEST => IMAP::MESSAGE_PRIORITY_HIGHEST,\n IMAP::MESSAGE_PRIORITY_HIGH => IMAP::MESSAGE_PRIORITY_HIGH,\n IMAP::MESSAGE_PRIORITY_NORMAL => IMAP::MESSAGE_PRIORITY_NORMAL,\n IMAP::MESSAGE_PRIORITY_LOW => IMAP::MESSAGE_PRIORITY_LOW,\n IMAP::MESSAGE_PRIORITY_LOWEST => IMAP::MESSAGE_PRIORITY_LOWEST,\n default => IMAP::MESSAGE_PRIORITY_UNKNOWN,\n };\n\n $this->set(\"priority\", $priority);\n }", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "function wp_high_priority_element_flag($value = \\null)\n {\n }", "public function AggiornaPrezzi(){\n\t}", "static function add_d_priority(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::d_priority, [\r\n\t\t\t'label' => 'Priority',\r\n\t\t\t'type' => 'number',\r\n\t\t\t'instructions' => 'Lower = more important.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '30',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'default_value' => 1,\r\n\t\t\t'min' => 1,\r\n\t\t\t'max' => '99',\r\n\t\t\t'step' => 1,\r\n\t\t]);\r\n\t}", "public function getPriority(): int\n {\n }", "public function priority()\n {\n return 5;\n }", "function wpseo_metabox_prio( $priority )\n {\n return 'low';\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getPriority() {\n\t\treturn $this->data_array['priority'];\n\t}", "function _pre() {\n\n\t}", "function enqueue_action($action_name, $func_name, $priority = 0, $num_para = 0){\n if(empty($action_name) || empty($func_name)) return false;\n global $_lms_action_arr;\n $_lms_action_arr[$action_name][$priority] = array(\n 'name' => $func_name, 'num_para' => $num_para,\n );\n ksort($_lms_action_arr[$action_name]);\n}", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "public function preDispatch() {\n\t\t\n\t\t}", "function tac_seo_metabox_priority() {\n\t// Accepts 'high', 'default', 'low'. Default is 'high'.\n\treturn 'low';\n}", "function getPriority() {\t\t\n\t\tif(!$this->owner->getField('Priority')) {\n\t\t\t$parentStack = $this->owner->parentStack();\n\t\t\t$numParents = is_array($parentStack) ? count($parentStack) - 1: 0;\n\t\t\treturn max(0.1, 1.0 - ($numParents / 10));\n\t\t} elseif($this->owner->getField('Priority') == -1) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn $this->owner->getField('Priority');\n\t\t}\n\t}", "public function getHandlerPriority(): int;", "function getOrder()\n {\n return 2;\n }", "public function preAction()\n {\n }", "public function Low_reorder()\n {\n\t\t$this->__construct();\n\t}", "public function getPriority()\r\n {\r\n return $this->priority;\r\n }", "public function preProcess();", "public function preProcess();", "public function getPriority()\n\t{\n\t\treturn $this->_priority;\n\t}", "public function getPriority()\n\t{\n\t\treturn $this->_priority;\n\t}", "public function __construct() {\t\t\n\t\n\t\t$ci = get_instance();\n\t\t\n\t\t$ci->event->register('red.flare',function(&$input) {\n\t\t\t$input .= ' add some content to $input';\n\t\t});\n\t\t\n\n\t\t/* this is registered first but has a priority of 0 default */\n\t\t$ci->event->register('priority.example',function(&$input) {\n\t\t\t$input .= ' priority.example priority 0 - i\\'m just the default level<br>';\n\t\t}); /* the default is 0 */\n\n\t\t/* this is registered second but has a priority of 10 lower (unix style levels) */\n\t\t$ci->event->register('priority.example',function(&$input) {\n\t\t\t$input .= ' priority.example priority 10 I should go last :( <br>';\n\t\t},10);\n\n\t\t/* this is registered last but has a priority of -23 higher (unix style levels) */\n\t\t$ci->event->register('priority.example',function(&$input) {\n\t\t\t$input .= ' priority.example priority -23 I should get to go first :) !<br>';\n\t\t},-23);\n\n\t\t/*\n\t\tthis is registered first but has a priority of 0 default\n\t\tso this actually goes last\n\t\t*/\n\t\t$ci->event->register('math.boom',function(&$a,&$b,&$c) {\n\t\t\t$c = '$a('.$a.') + $b('.$b.') = '.($a + $b);\t\t\t\n\t\t}); /* the default is 0 */\n\n\t\t/*\n\t\tthis is registered last but has a priority of -23 higher (unix style levels)\n\t\tso remember it goes first\n\t\t*/\n\t\t$ci->event->register('math.boom',function(&$a,&$b,&$c) {\n\t\t\t$c = '$a('.$a.') * $b('.$b.') = '.($a * $b);\t\t\t\n\t\t},-999);\n\n\t\t\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"100\"'; },100);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"-100\"'; },-100);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"23\"'; },23);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"-23\"'; },-23);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"0\"'; },0);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"10\"'; },10);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"-17\"'; },-17);\n\t\t$ci->event->register('orders',function(&$a) { $a .= ' add \"23\"'; },23);\n\t\t\n\t\t\n\t\t/*\n\t\tif you don't set a priority then it is set to 0\n\t\tand the events are triggered in \n\t\tthe order they are registered\n\t\t*/\n\t\t\n\t\t$ci->event->register('user.login',function(&$user_name,&$user_id,&$user_email) {\n\t\t\t$user_name = $user_id.' '.$user_email;\n\t\t});\n\t\t\n\t}", "public function preExecute(){\n\n\t\n\t}", "public function getPriority()\n\t{\n\t\treturn $this->priority;\n\t}", "function getOrder()\n {\n return 3;\n }" ]
[ "0.69260234", "0.69260234", "0.69260234", "0.6924646", "0.6924646", "0.6924646", "0.69245905", "0.6853707", "0.64298135", "0.64298135", "0.64298135", "0.64298135", "0.64298135", "0.6428831", "0.6428831", "0.6428831", "0.6428794", "0.6428794", "0.6428794", "0.6428794", "0.6428794", "0.6428794", "0.64287037", "0.64287037", "0.64287037", "0.64287037", "0.64287037", "0.6350733", "0.6331096", "0.61256754", "0.61256754", "0.61256754", "0.61256754", "0.61256754", "0.61256754", "0.61256754", "0.61125976", "0.6093124", "0.60563195", "0.60096836", "0.5916023", "0.59155905", "0.5897803", "0.5844482", "0.5814035", "0.57986015", "0.57775134", "0.57775134", "0.5751357", "0.5748297", "0.5747629", "0.57367384", "0.5711234", "0.5688799", "0.5686526", "0.56776917", "0.5658835", "0.5657231", "0.56190157", "0.5617786", "0.5605592", "0.5565715", "0.55169433", "0.55140424", "0.5508846", "0.5479705", "0.54755473", "0.5472001", "0.5463591", "0.5424151", "0.53979003", "0.5392592", "0.5389415", "0.5384616", "0.5374894", "0.5358863", "0.5358863", "0.5358863", "0.5358863", "0.5339421", "0.5339039", "0.53045607", "0.5299094", "0.5299094", "0.5297203", "0.52934915", "0.5259429", "0.52515125", "0.52485275", "0.52336156", "0.5225617", "0.5224483", "0.5222203", "0.5222203", "0.521554", "0.521554", "0.5214357", "0.52034664", "0.5198332", "0.51795465" ]
0.5690033
53
Get a list of members of a particular chamber in a particular Congress
public function listMembers(int $congress, string $chamber) { $this->congressValidator->isValidChamber($chamber); switch ($chamber) { case 'senate': $earliestCongress = 80; break; case 'house': default: $earliestCongress = 102; break; } $this->congressValidator->isValidCongress($congress, $earliestCongress); $uriStub = "{$congress}/{$chamber}/members.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChamberMembers($chamberID) {\r\n $sql = $this->db->prepare(\"SELECT UserID, firstname, lastname, email, businessname, expiry, archived, type\r\n FROM USER LEFT OUTER JOIN BUSINESS ON USER.businessID=BUSINESS.businessID WHERE USER.chamberID=:chamber_id\r\n ORDER BY lastname;\");\r\n if ($sql->execute(array(\r\n 'chamber_id' => $chamberID,\r\n ))) {\r\n return $sql->fetchall(PDO::FETCH_ASSOC);\r\n }\r\n return $chamberID;\r\n }", "function get_Child_Chambers($chamber){\r\n $sql = $this->db->prepare(\"SELECT chamberID from CHAMBER where parent_id=:myChamber;\");\r\n\r\n $result = $sql->execute(array(\r\n \"myChamber\" => $chamber\r\n ));\r\n\r\n if ($result){\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "function getMemberListAdmin() {\n $sql = \"SELECT d.*\n FROM admin_building a,\n condo_building b,\n member_condo c,\n member d \n WHERE a.admin_id=? AND a.building_id = b.building_id AND b.condo_id= c.condo_id AND c.member_id = d.id AND b.building_id=? ORDER BY d.id ASC\";\n \n return getAll($sql, [getLogin()['uid'], getLogin()['bid']]);\n}", "public function getMemberList()\n {\n $memberList = '';\n foreach($this->Residents as $resident) {\n $memberList .= (string)$resident->get('Rooms') . ', ';\n //$memberList .= (string)$resident . ', ';\n }\n $memberList = substr($memberList, 0,-2);\n\n return $memberList;\n }", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "function get_Chamber_Emails($chamber){\r\n $sql = $this->db->prepare(\"SELECT email FROM USER WHERE chamberID = :chamberID;\");\r\n\r\n $result = $sql->execute(array(\r\n \"chamberID\" => $chamber\r\n ));\r\n\r\n if ($result){\r\n return $sql->fetchAll(PDO::FETCH_NUM);\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "function getMembers()\r\n {\r\n // define the query\r\n $sql = \"SELECT * FROM member ORDER BY lname\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // execute statement\r\n $statement->execute();\r\n // get result\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function getGroups($chamberId) {\r\n $sql = $this->db->prepare(\"SELECT groupID, name, mailchimp_list_id FROM GROUPS WHERE chamberID=:chamberID ORDER BY name\");\r\n if ($sql->execute(array(\r\n \"chamberID\" => $chamberId\r\n ))) {\r\n $row = $sql->fetchAll(PDO::FETCH_ASSOC);\r\n return $row;\r\n }\r\n return false;\r\n }", "function getMembers(){\n\t\treturn $this->members;\n\t}", "public function Roommates()\n\t{\n\t\t$res = $this->Residence();\n\t\t$roommates = array();\n\n\t\tif ($this->HasCustomResidence())\n\t\t{\n\t\t\t$addr = $res->Address;\n\t\t\t$city = $res->City;\n\t\t\t$state = $res->State;\n\t\t\t$zip = $res->PostalCode;\n\t\t\t$r = DB::Run(\"SELECT Members.ID FROM Members INNER JOIN Residences \".\n\t\t\t\t\t\t\"ON Members.ResidenceID=Residences.ID WHERE Residences.Address='$addr' \".\n\t\t\t\t\t\t\"AND Residences.City='$city' AND Residences.State='$state' \".\n\t\t\t\t\t\t\"AND Residences.PostalCode='$zip'\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$r = DB::Run(\"SELECT ID FROM Members WHERE ResidenceID='{$this->ResidenceID}' AND Apartment='{$this->Apartment}' LIMIT 9\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\n\t\treturn $roommates;\n\t}", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "function getMembers()\n {\n // define the query\n $sql = \"SELECT * FROM member ORDER BY lname, fname\";\n\n // prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n // no params to bind\n\n // execute the statement\n $statement->execute();\n\n // get the result\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getMemberList($firstname, $surname, $address, $phonenum)\n {\n $firstname = db::escapechars(trim($firstname));\n $surname = db::escapechars(trim($surname));\n $address = db::escapechars(trim($address));\n $phonenum = db::escapechars(trim($phonenum));\n \n \n $sql = \"SELECT * FROM churchmembers WHERE 1=1 \";\n if($firstname != \"\"){\n $sql .= \"AND firstname LIKE '%$firstname%' \";\n }\n if($surname != \"\"){\n $sql .= \"AND surname LIKE '%$surname%' \";\n }\n if($address != \"\"){\n $sql .= \"AND ((address1 LIKE '%$address%') OR (address2 LIKE '%$address%') OR (address3 LIKE '%$address%') OR (address4 LIKE '%$address%')) \";\n }\n if($phonenum != \"\"){\n $sql .= \"AND phonenum LIKE '%$phonenum%' \";\n }\n \n $sql .= \"ORDER BY surname ASC, firstname ASC \";\n \n $result = db::returnallrows($sql);\n return $result;\n \n }", "function GetMembers()\n\t{\t$members = array();\n\t\t$where = array();\n\t\t$tables = array('students');\n\t\t\n\t\tif ($_GET['morf'])\n\t\t{\t$where[] = 'students.morf=\"' . $this->SQLSafe($_GET['morf']) . '\"';\n\t\t}\n\t\n\t\tif ($_GET['ctry'])\n\t\t{\t$where[] = 'students.country=\"' . $this->SQLSafe($_GET['ctry']) . '\"';\n\t\t}\n\t\t\n\t\tif ($name = $this->SQLSafe($_GET['name']))\n\t\t{\t$where[] = '(CONCAT(students.firstname, \" \", students.surname, \"|\", students.username) LIKE \"%' . $name . '%\")';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT students.* FROM ' . implode(',', $tables);\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' GROUP BY students.userid ORDER BY students.surname, students.firstname LIMIT 0, 1000';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif (!$row[\"country\"] || $this->user->CanAccessCountry($row[\"country\"]))\n\t\t\t\t{\t$members[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $members;\n\t}", "function getChamber($user) {\r\n $sql = $this->db->prepare(\"SELECT chamberID FROM USER WHERE email='$user'\");\r\n if ($sql->execute()) {\r\n $result = $sql->fetch(PDO::FETCH_ASSOC);\r\n return $result['chamberID'];\r\n }\r\n return false;\r\n }", "public function getCurrentMembersByStateOrStateAndDistrict(string $chamber, string $state, int $district = null)\n {\n $this->congressValidator->isValidChamber($chamber);\n $this->stateValidator->isValidStateAbbreviation($state);\n\n $uriStub = \"members/{$chamber}/{$state}/\";\n\n if (! is_null($district)) {\n $uriStub .= \"{$district}/\";\n }\n\n $uriStub .= 'current.json';\n\n return $this->performApiRequest($uriStub);\n }", "function getOrganismsList();", "public function index()\n {\n $chambers=Chamber::where('doctor_id',Auth::guard('doctor')->user()->id)->get();\n return view('doctor.chamber.index',compact('chambers'));\n }", "public function get_members()\n\t{\n\t\treturn $this->members;\n\t}", "public function GetAllMembers()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembers();\n }", "public function getMembers() {\n return $this->parseData($this->sql['mem']);\n }", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT organiserID FROM tournamentOrganisers WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "public function get_members(){\n return $this->connected_clients;\n }", "public function compactList(){\n $output = array();\n $members = $this->members;\n foreach ($members as $value) {\n $member = array(\n 'id' => $value['id'],\n 'name' => $value['firstName'] . \" \" . $value['lastName'],\n 'num_boats' => count($value['boats'])\n );\n array_push($output, $member);\n }\n return $output;\n }", "function getMembers()\r\n {\r\n $sql = \"SELECT * FROM member\r\n ORDER BY lname, fname ASC\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //3. Bind the parameter\r\n\r\n //4. Execute the statement\r\n $statement->execute();\r\n\r\n //5. Get the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "function get_chamber_business(){\r\n $sql = $this->db->prepare(\"SELECT businessID, businessname FROM BUSINESS WHERE chamberID = :chamberid;\");\r\n\r\n $result = $sql->execute(array(\r\n \"chamberid\" => $_SESSION['chamber'],\r\n ));\r\n\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }", "function getGroupData($chamberId) {\r\n $sql = $this->db->prepare(\"SELECT DISTINCT(g.groupID), g.name, g.mailchimp_list_id, COUNT(gm.groupID) FROM GROUPS AS g LEFT OUTER JOIN GROUPMEMBERS as gm ON g.groupID = gm.groupID WHERE g.chamberID=:chamber_id GROUP BY g.groupID ORDER BY COUNT(gm.groupID) DESC\");\r\n if ($sql->execute(array(\r\n \"chamber_id\" => $chamberId\r\n ))) {\r\n $groups = $sql->fetchAll(PDO::FETCH_ASSOC);\r\n return $groups;\r\n }\r\n return false;\r\n }", "public function getMembersLeavingOffice(int $congress, string $chamber)\n {\n $earliestCongress = 111;\n\n $this->congressValidator->isValidCongress($congress, $earliestCongress);\n $this->congressValidator->isValidChamber($chamber);\n\n $uriStub = \"{$congress}/{$chamber}/members/leaving.json\";\n\n return $this->performApiRequest($uriStub);\n }", "function getMembers()\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT * FROM Members ORDER BY lname\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //4.Execute statement\r\n $statement->execute();\r\n\r\n //5. Return the results\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n }", "public function memberships_get()\n {\n\n $em = $this->doctrine->em;\n\n $maembershipRepo = $em->getRepository('Entities\\Membership');\n $memberships = $maembershipRepo->findAll();\n $result[\"desc\"] = \"Listado de membresias\";\n $result[\"data\"] = $memberships;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function findmembers($searchTerm, $campus)\n {\n // Search the members and display output\n $sql = \"SELECT * FROM churchmembers WHERE \n (\";\n \n $splitSearch = split(' ',trim($searchTerm));\n if(count($splitSearch) > 1){\n $sql .=\"firstname LIKE '%\".$splitSearch[0].\"%'\";\n \n if(count($splitSearch) > 2){ \n $sql .= \"AND middlename LIKE '%\".$splitSearch[1].\"%'\n AND surname LIKE '%\".$splitSearch[2].\"%')\";\n $searchcriteria = \"<p>Discovered a first name , middle name and surname possibility - searching specifically</p>\";\n }\n else{\n $sql .= \" AND surname LIKE '%\".$splitSearch[1].\"%')\";\n $searchcriteria = \"<p>Discovered a first name and surname possibility - searching specifically</p>\";\n }\n \n }\n else{\n $sql .=\"\n firstname LIKE '%$searchTerm%'\n OR\n middlename LIKE '%$searchTerm%'\n OR \n surname LIKE '%$searchTerm%'\n OR \n address1 LIKE '%$searchTerm%'\n OR \n address2 LIKE '%$searchTerm%'\n OR \n address4 LIKE '%$searchTerm%'\n OR\n postcode LIKE '%$searchTerm%'\n OR\n homephone LIKE '%$searchTerm%'\n OR \n mobilephone LIKE '%$searchTerm%'\n OR\n email LIKE '%$searchTerm%'\n OR \n medicalInfo LIKE '%$searchTerm%'\n OR\n memberStatus LIKE '%$searchTerm%'\n OR \n workphonenumber LIKE '%$searchTerm%'\n OR \n workemail LIKE '%$searchTerm%'\n OR\n occupation LIKE '%$searchTerm%'\n OR\n employer LIKE '%$searchTerm%'\n )\";\n $searchcriteria = \"<p>Searching broad-term on members area</p>\";\n }\n \n \n if($campus !=''){\n $sql .= \" AND campusid='\".db::escapechars($campus).\"'\";\n }\n $sql .= \"\n ORDER BY surname ASC, firstname ASC\n \";\n \n // Output the table\n $numentities = 0;\n $numentities = db::getnumrows($sql);\n print \"<p>\" . $numentities . \" discovered in members.</p>\";\n if($numentities > 0)\n {\n print \"<h2>Member Results</h2>\";\n print $searchcriteria;\n print \"<p><table class=\\\"searchtable\\\">\";\n print \"<tr><th>Surname</th><th>Firstname</th><th>Address 1</th><th>Postcode</th><th>Action</th></tr>\";\n $data = db::returnallrows($sql);\n foreach($data as $result)\n {\n // Display the member information\n print \"<tr>\";\n print \"<td>\" . $result['surname'] . \"</td>\";\n print \"<td>\" . $result['firstname'] . \"</td>\";\n print \"<td>\" . $result['address1'] . \"</td>\";\n print \"<td>\" . $result['postcode'] . \"</td>\";\n print \"<td><a href=\\\"index.php?mid=225&m=\" . $result['memberID'] . \"\\\">View</a></td>\";\n print \"</tr>\";\n }\n print \"</table>\";\n print \"</p>\";\n }\n \n \n \n return true;\n }", "public function getChampions(){\n\t\treturn $this->_makeCall('champions?');\n\t}", "public function getMembers($group_id);", "function getHouseholdMembers($pdo){\n\t\t$getMembers =\n\t\t$pdo->prepare('SELECT UserID FROM hhm_users WHERE HouseholdID =:householdid');\n\t\t$getMembers->execute(array('householdid'=>\"$this->householdId\"));\n\t\t$info = $getMembers->fetchAll(PDO::FETCH_COLUMN);\n\t\t$members =[];\n\t\tforeach ($info as $key => $id){\n\t\t\t$member = new Member($id, $pdo);\n\t\t\tarray_push($members, $member);\n\t\t}\n\t\n\t\t$this->members = $members;\n\t}", "function islandora_ethnography_get_dept_members($dept, $pid) {\n $params = array(\n 'fl' => array('MADS_title_ms PID'),\n );\n $query = \"MADS_organization_ms:\\\"$dept\\\" AND -PID:\\\"$pid\\\"\";\n $url = parse_url(variable_get('islandora_solr_url', 'localhost:8080/solr'));\n $solr = new Apache_Solr_Service($url['host'], $url['port'], $url['path'] . '/');\n $solr->setCreateDocuments(FALSE);\n try {\n $results = $solr->search($query, 0, 1000, $params);\n $json = json_decode($results->getRawResponse(), TRUE);\n }\n catch (Exception $e) {\n watchdog_exception('Islandora Entities', $e, 'Got an exception while searching entities for callback.', array(), WATCHDOG_ERROR);\n }\n $colleages = array();\n foreach ($json['response']['docs'] as $choice) {\n if (isset($choice['MADS_title_ms'])) {\n foreach ($choice['MADS_title_ms'] as $candidate) {\n $colleages[$choice['PID']] = $candidate;\n }\n }\n }\n return $colleages;\n}", "public function buildRecipientList() {\n $actors = $this->loadAllActors();\n $actors = $this->filterDeliverableActors($actors);\n return mpull($actors, 'getPHID');\n }", "public function members()\n\t{\n\t\treturn $this->members;\n\t}", "function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}", "public function members()\n {\n return $this->hasMany(MemberParliament::class);\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "public function get_competitors(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT competitorID FROM tournamentCompetitors WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "function getSpecificMember($name, $email) {\r\n try {\r\n $mam = getAllMembers();\r\n var_dump($mam);\r\n $user = searchUsers($mam, $email);\r\n print_r($user);\r\n if ($user) {\r\n \r\n }\r\n } catch (Exception $exc) {\r\n echo $exc->getTraceAsString();\r\n }\r\n}", "public function court_members()\n {\n\n $query = \"SELECT * FROM users join users_court on users.id = users_court.user_id WHERE users_court.court1_id = $this->thiscourt or users_court.court2_id = $this->thiscourt\";\n $cart_result = @mysqli_query($this->dbc, $query) or die(\"Couldn't ViewSql users lists:(\" . mysqli_error($this->dbc));\n $this->num_rows = mysqli_num_rows($cart_result);\n\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n $court_in_list .= $row['user_id'] . \", \";\n\n $this->userlist .= \"<li><a href='users-details.php?user_id=\" . $row['user_id'] . \"'> \" . openssl_decrypt(clean($row['firstname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) . \" \" .\n openssl_decrypt(clean($row['lastname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) .\n \" (\" .$row['status'] .\n \")</a></li>\";\n }\n\n $court_in_list = rtrim($court_in_list, \", \");\n $this->court_in = \"(\" . $court_in_list . \")\";\n\n }", "public function getMembers()\n {\n if (!$this->has('memberList')) {\n throw new NoMemberListException('Clan instance has no memberlist property.');\n } else {\n return $this->get('memberList');\n }\n }", "public function getMembers()\n {\n if (!is_null($this->members_relation)) {\n return array_keys($this->members_relation);\n }\n\n if ($this->members_objs == null) {\n // load members\n $response = Helper::get('group/'.$this->unique_id);\n if (isset($response->body['result']['members'])) {\n $this->__construct($response->body['result']);\n }\n }\n\n if ($this->members_objs != null) {\n $list = array();\n foreach ($this->members_objs as $user) {\n $list[] = $user instanceof User ? $user->username : $user;\n }\n\n return $list;\n }\n }", "function membersemailist($memberquery){\n\t$f3=$this->f3;\n\t$members =\tnew Member($this->db);\n\t$memblist=$members->load();\n\t$membemails= $this->db->exec('SELECT distinct(email) as unqemail from members where u3ayear = '.'\"2015-2016\"'. ' and status =\"Active\" and email <> \"\" ' .$memberquery.' order by unqemail;');\n\t$output = iterator_to_array(new RecursiveIteratorIterator(\n new RecursiveArrayIterator($membemails)), FALSE);\n\treturn array_values($output);\n\t\n\t\n}", "public function getBcc(): iterable;", "function getBandMembers($conn, $bandID) {\n // use this to index $memberArray\n $memberCount = 0;\n $memberArray = array();\n \n //TODO add validation to ensure that bandID is actually a band\n $query = \"SELECT solo_id FROM band_membership WHERE band_id = ${bandID}\";\n $result = mysqli_query($conn, $query);\n if ($result) {\n while ($row = mysqli_fetch_assoc($result)) {\n $memberArray[$memberCount] = $row['solo_id'];\n $memberCount++;\n }\n return $memberArray;\n } else {\n return NULL;\n } \n }", "public function getMembers(){\n $this->db->select('*');\n $this->db->from('users');\n $query = $this->db->get();\n \n return $query->result_array();\n\t\t}", "public function getCharacters(): array\n {\n $chars = [];\n $raw = \\json_decode($this->fetch($this->getUrl('members')), true);\n if (!($raw['members'] ?? false)) {\n $this->log('BattleNet.getCharacters', 'fail. No members found (Check battle.net api key)');\n\n return [];\n }\n foreach ($raw['members'] as $member) {\n // filter mermbers by level and ranks\n if (\n \\in_array($member['rank'], $this->filters['ranks'], true)\n && $member['character']['level'] >= $this->filters['level']\n ) {\n $chars[] = $member['character']['name'];\n }\n }\n \\sort($chars);\n $this->log('BattleNet.getCharacters', 'success');\n\n return $chars;\n }", "function get_list_members($listid, $action = 'members')\n\t{\n\t\t$xml = $this->load_url(\"lists/$listid/$action\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$contacts = array();\n\t\t$_members = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\n\t\tif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'first'):\n\t\t\t$this->member_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->member_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->member_meta_data->next_page = '';\n\t\telseif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'next'):\n\t\t\t$this->member_meta_data->next_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->member_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->member_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['4_attr']['href']);\n\t\tendif;\n\n\t\tif(is_array($_members)):\n\t\t\tif(isset($_members[0]['link_attr']['href'])):\n\t\t\t\tforeach($_members as $k => $v):\n\t\t\t\t\t$EmailAddress = $v['content']['ContactListMember']['EmailAddress'];\n\t\t\t\t\t$Name = $v['content']['ContactListMember']['Name'];\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\n\t\t\t\t\t$contact = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'EmailAddress' => $EmailAddress,\n\t\t\t\t\t\t'Name' => $Name,\n\t\t\t\t\t);\n\t\t\t\t\t$contacts[] = $contact;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$EmailAddress = $_members['content']['ContactListMember']['EmailAddress'];\n\t\t\t\t$Name = $_members['content']['ContactListMember']['Name'];\n\t\t\t\t$id = $this->get_id_from_link($_members['link_attr']['href']);\n\n\t\t\t\t$contact = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'EmailAddress' => $EmailAddress,\n\t\t\t\t\t'Name' => $Name,\n\t\t\t\t);\n\t\t\t\t$contacts[] = $contact;\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn $contacts;\n\t}", "public function getAllMemberCards()\n {\n \n $query = \"SELECT MID, LoyaltyCardNumber FROM transactionsummary ORDER BY LoyaltyCardNumber ASC\";\n \n return parent::RunQuery($query);\n }", "function getChamberSpecificDetail($memberID, $dataID, $column, $table) {\r\n $queryString = \"SELECT $table.answer FROM $table JOIN BUSINESS ON $table.BUSINESSID=BUSINESS.businessID JOIN USER ON USER.businessID=BUSINESS.businessID WHERE USER.UserID='$memberID' AND $table.DataID=$dataID\";\r\n $sql = $this->db->prepare($queryString);\r\n if ($sql->execute()) {\r\n return $sql->fetch();\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "function lobby_membersapi_getMemberships($args)\r\n{\r\n\t$uid = (int)$args['uid'];\r\n\tif ($uid == 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t \t$tables = pnDBGetTables();\r\n\t \t$column = $tables['lobby_members_column'];\r\n\t \t$where = $column['uid'].\" = '\".$uid.\"'\";\r\n\t\t$result = DBUtil::selectObjectArray('lobby_members',$where);\r\n\t\t$r = array();\r\n\t\tforeach ($result as $item) {\r\n\t\t\t$r[]=$item['gid'];\r\n\t\t}\r\n\t\treturn $r;\r\n\t}\r\n}", "function getAgentsInfo() {\n\t\tglobal $dbh;\n\t\t$agents = array();\n\t\t\n\t\t\n\t\t$sql = \"SELECT A.*, (SELECT B.AgncyCity FROM Agencies AS B WHERE B.AgencyId=A.AgencyId) as AgencyName\n\t\t\t\tFROM agents AS A\";\n\n\t\ttry {\n\t\t\tgetDBConnection();\n\t\t\t\n\t\t\t$result = mysqli_query($dbh, $sql);\n\t\t\t\n\t\t\tif(!$result) {\n\t\t\t\tprint(\"Query failed: \" . mysqli_errno($dbh) . \"--\" . mysqli_error($dbh) . \"<br/>\");\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t\twhile ($values = mysqli_fetch_object($result)) {\n\t\t\t\t$agent = new Agent();\n\t\t\t\t$agent -> setAgent($values);\n\t\t\t\tarray_push($agents, $agent);\n\t\t\t}\n\n\t\t\treturn $agents;\n\t\t\t\n\t\t} catch (Exception $e){\n\t\t\tprint \"<br/> $e\";\n\t\t} finally {\n\t\t\tcloseDBConnection();\n\t\t}\n\t}", "public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}", "static function getMembersFromQuery($query)\n\t{\n\t if(!isset(self::$library)){\n\t self::$library = new Library();\n\t }\n \n\t\t$query = new Query($query);\n\t\tif ($query->numRows >= 1) {\n\t\t\t$array = array();\n\t\t\twhile($row = $query->nextRow())\n\t\t\t{\n\t\t\t\t$member;\n if (self::$library->exists($row['ID'])){\n $member = self::$library->get($row['ID']);\n } else {\n switch ($row['type']) {\n case 'AM':\n $member = new AM($row);\n break;\n case 'BROTHER':\n $member = new Brother($row);\n break;\n case 'ALUM':\n $member = new Alumni($row);\n break;\n default:\n throw new Exception(\"Member type not defined\");\n }\n $member->start();\n }\n \n\t\t\t\t$array[] = $member;\n\t\t\t\tunset($member);\n\t\t\t}\n\t\t\treturn $array;\n\t\t} else {\n\t\t\tthrow new Exception();\n\t\t}\n\t}", "function allMembers()\r\n {\r\n\n $select = 'SELECT member_id, username, firstname, lastname email, password, image FROM atlas_members ORDER BY member_id';\r\n\n $results = $this->_pdo->query($select);\r\n \r\n $resultsArray = array();\r\n \r\n //map each pet id to a row of data for that pet\r\n while ($row = $results->fetch(PDO::FETCH_ASSOC)) {\r\n $resultsArray[$row['member_id']] = $row;\r\n }\r\n \r\n return $resultsArray;\r\n }", "public function getListByMember($member_id)\n {\n $where = array(\n 'member_id' => $member_id,\n 'is_del' => 1,\n 'status' => 1\n );\n\n return $this->where($where)->relation(true)->Select();\n }", "public function getParticipants(): Collection;", "public function getLeveledCharacters(): array\n {\n $chars = [];\n $raw = \\json_decode($this->fetch($this->getUrl('members')), true);\n if (!($raw['members'] ?? false)) {\n $this->log('BattleNet.getLeveledCharacters', 'fail. No members found (Check battle.net api key)');\n\n return [];\n }\n foreach ($raw['members'] as $member) {\n // filter mermbers by level and ranks\n if ($member['character']['level'] >= $this->filters['level']) {\n $chars[] = $member['character']['name'];\n }\n }\n \\sort($chars);\n $this->log('BattleNet.getLeveledCharacters', 'success');\n\n return $chars;\n }", "public function get_all()\n {\n // Array untuk data member\n $member = array();\n // Siapkan SQL\n $sql = \"SELECT *\n FROM member\n ORDER BY id DESC\";\n // Query data member\n $res = mysqli_query($this->db, $sql);\n // Ambil data satu persatu\n while ($r = mysqli_fetch_assoc($res)) {\n $member[] = $r;\n }\n // Return data member\n return $member;\n }", "function flashcard_get_participants($flashcardid) {\n global $DB;\n\n $sql = \"\n SELECT DISTINCT\n userid,\n userid\n FROM\n {flashcard_card}\n WHERE\n flashcardid = ?\n \";\n $userids = $DB->get_records_sql_menu($sql, array('flashcardid' => $flashcardid));\n if ($userids) {\n $users = $DB->get_records_list('user', 'id', array_keys($userids));\n }\n\n if (!empty($users)) {\n return $users;\n }\n\n return false;\n}", "public function getCohortMembers(): array\n {\n $members = [];\n foreach ($this->getCohorts() as $cohort) {\n $id = $cohort[\"id\"];\n $members[] = $this->request(\"core_cohort_get_cohort_members\", [\"cohortids\" => [0 => $id]])[0];\n }\n\n return $members;\n }", "public function getContacts();", "public function getMemberObjs()\n {\n if (!empty($this->members_objs) && ($this->members_objs[0] instanceof User)) {\n return $this->members_objs;\n }\n }", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "public function getListWithFacilities()\n {\n $buildings = $this->all(['address', 'village_id', 'id']);\n $list = [];\n\n foreach ($buildings as $key => $building) {\n $list[$building->village_id][$building->id] = str_replace('\"', '', $building->address);\n\n }\n return $list;\n }", "public function readCanceledMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from members, memberstatus where members.MemberID = memberstatus.MemberID and StatusCode = \"C\"');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "function getMemberWithinGroupInfo() {\n global $inputs;\n\n $res = getAll(\"SELECT a.*, b.id as member_groupId FROM `member` a, member_group b WHERE b.group_id = ? AND b.member_id=a.id\", [$inputs['id']]);\n formatOutput(true, 'success', $res);\n}", "public function members()\n {\n \treturn $this->hasMany('App\\Member');\n }", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "protected function getMemberNames()\n {\n $arrMembers = array();\n\n $objMembers = $this->Database\n ->execute(\"SELECT id, username, firstname, lastname\n\t\t\t FROM tl_member\n\t\t\t WHERE login = 1\"\n );\n\n while ($objMembers->next()) {\n $varId = $objMembers->id;\n $varName = $objMembers->firstname . ' ' . $objMembers->lastname;\n\n $arrMembers[$varId] = $varName;\n }\n\n return $arrMembers;\n }", "private function collectAllKnownMembers()\n {\n return $this->getDoctrine()->getRepository(Board::class)->findAllKnownMembers($this->getUser());\n }", "public function getMemberList() {\n\t\tif ( !is_object($this->memberList) ) {\n\t\t\t$this->memberList = t3lib_div::makeInstance('tx_passwordmgr_model_groupMemberList');\n\t\t\t$this->memberList->init($this['uid']);\n\t\t}\n\t\treturn($this->memberList);\n\t}", "public function listMembers() {\n\t\t/*\n\t\t\tActions should be added to the array like so:\n\t\t\t\t[actions] =>\n\t\t\t\t\t\t[n]\n\t\t\t\t\t\t\t[title] => action title\n\t\t\t\t\t\t\t[controller] => action controller\n\t\t\t\t\t\t\t[action] => action name\n\t\t\t\t\t\t\t[params] => array of params\n\t\t*/\n\t\t$this->__paginateMemberList($this->Member->getMemberSummaryAll(true));\n\t}", "function getAffilliateSubscribers($affID)\n\t\t{\t\t\t\t\n\t\t\t\n\t\t\t$query = \"SELECT member_id from tbl_member m \n\t\t\t\tleft join tbl_affiliate aff \n\t\t\t\twhere (member_type='subscriber' and `isActive` !='d')\n\t\t\t\n\t\t\tselect m.member_id \n\t\t\tfrom tbl_member m \n\t\t\tleft join tbl_affiliate aff\n\t\t\ton m.member_id = aff.affiliate_id\n\t\t\twhere m.member_type = 'affiliate' and m.isActive != 'd'\t\t\t\n\t\t\torder by aff.organisation_name asc\";\t\t\t\n\t\t \n\t\t \n\t \n\t\t\t\n\t\t\t$query = \"select m.member_id \n\t\t\tfrom tbl_member m\n\t\t\tleft join tbl_affiliate aff\n\t\t\ton m.member_id = aff.affiliate_id\n\t\t\twhere m.member_type = 'affiliate' and m.isActive != 'd'\t\t\t\n\t\t\torder by aff.organisation_name asc\";\t\t\t\n\t\t \n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}", "public function getAllMembers($Club){\n\n\t\t$MembersList = array();\n\n\n\t\t$Club_ID = $Club->getID();\n\n\n\t\t$this->_DB->doQuery(\"SELECT * FROM cbms_club_member WHERE ClubID ='$Club_ID'\");\n\n\t\t$rows = $this->_DB->getAllRows();\n\n\t\tfor($i = 0; $i < sizeof($rows); $i++) {\n\t\t\t$row = $rows[$i];\n\t\t\t$this->_Members = new Members();\n\n\t\t $this->_Members->setClubID( $row['ClubID']);\n\t\t $this->_Members->setMemberID( $row['MemberID']);\n\t\t $this->_Members->setName( $row['Name'] );\n\t\t\t$this->_Members->setDesignation( $row['Designation']);\n\n\t\t $MembersList[]=$this->_Members;\n \n\t\t}\n\n\t\t//todo: LOG util with level of log\n\n\n\t\t$Result = new Result();\n\t\t$Result->setIsSuccess(1);\n\t\t$Result->setResultObject($MembersList);\n\n\t\treturn $Result;\n\t}", "public function getMembers($request, $response) {\n // Get Room\n $room = Room::find($request->getParam('roomId'));\n\n return $response->withJson($room->members()->get());\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "public function getGeorgeSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '108'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function memberList($eid = 1) {\n $config = $this->config('simple_conreg.settings.'.$eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::badgeTypes($eid, $config);\n $digits = $config->get('member_no_digits');\n\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'Name':\n $order = 'name';\n break;\n case 'Country':\n $order = 'country';\n break;\n case 'Type':\n $order = 'badge_type';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content = array();\n\n //$content['#markup'] = $this->t('Unpaid Members');\n\n $content['message'] = array(\n '#cache' => ['tags' => ['simple-conreg-member-list'], '#max-age' => 600],\n '#markup' => $this->t('Members\\' public details are listed below.'),\n );\n\n $rows = [];\n $headers = [\n 'member_no' => ['data' => t('Member No'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'member_name' => ['data' => t('Name'), 'field' => 'name'],\n 'badge_type' => ['data' => t('Type'), 'field' => 'm.badge_type', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_country' => ['data' => t('Country'), 'field' => 'm.country', 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],\n ];\n $total = 0;\n\n foreach ($entries = SimpleConregStorage::adminPublicListLoad($eid) as $entry) {\n // Sanitize each entry.\n $badge_type = trim($entry['badge_type']);\n $member_no = sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n $member = ['member_no' => $badge_type . $member_no];\n switch ($entry['display']) {\n case 'F':\n $fullname = trim(trim($entry['first_name']) . ' ' . trim($entry['last_name']));\n if ($fullname != trim($entry['badge_name']))\n $fullname .= ' (' . trim($entry['badge_name']) . ')';\n $member['name'] = $fullname;\n break;\n case 'B':\n $member['name'] = trim($entry['badge_name']);\n break;\n case 'N':\n $member['name'] = t('Name withheld');\n break;\n }\n $member['badge_type'] = trim(isset($types[$badge_type]) ? $types[$badge_type] : $badge_type);\n $member['country'] = trim(isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country']);\n\n // Set key to field to be sorted by.\n if ($order == 'member_no')\n $key = $member_no;\n else\n $key = $member[$order] . $member_no; // Append member number to ensure uniqueness.\n if (!empty($entry['display']) && $entry['display'] != 'N' && !empty($entry['country'])) {\n $rows[$key] = $member;\n }\n $total++;\n }\n\n // Sort array by key.\n if ($direction == 'DESC')\n krsort($rows);\n else\n ksort($rows);\n\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n //'#footer' => array(t(\"Total\")),\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n\n $content['summary_heading'] = [\n '#markup' => $this->t('Country Breakdown'),\n '#prefix' => '<h2>',\n '#suffix' => '</h2>',\n ];\n\n $rows = array();\n $headers = array(\n t('Country'),\n t('Number of members'),\n );\n $total = 0;\n foreach ($entries = SimpleConregStorage::adminMemberCountrySummaryLoad($eid) as $entry) {\n if (!empty($entry['country'])) {\n // Sanitize each entry.\n $entry['country'] = trim($countryOptions[$entry['country']]);\n $rows[] = $entry;\n $total += $entry['num'];\n }\n }\n //Add a row for the total.\n $rows[] = array(t(\"Total\"), $total);\n $content['summary'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n\n return $content;\n }", "public function getContactsList() {\n return $this->_get(6);\n }", "public function scopeSearchChamber($query, string $scope = 'where', $chamber)\n {\n return $query->$scope('companyActivity', 'LIKE', '%'.$chamber.'%'); \n }", "public function fetch_web_managers($member_deg_id, $admin_id ) {\r\n \r\n $statement = $this->db->query('SELECT member_user_id, `member_fname`, `member_lname` FROM `team_members` \r\n LEFT JOIN admin_user ON admin_user.admin_user_id= team_members.`admin_user_id`\r\n WHERE `member_deg_id` = '.$member_deg_id.' AND team_members.`admin_user_id` = '.$admin_id.' '); \r\n\t\t\t\t\t\t\t\t\t \r\n \t $statement->setFetchMode(PDO::FETCH_ASSOC);\t\t \r\n\t\t $clients = array(); \r\n\t\t if ($statement->rowCount() > 0) {\t \r\n \r\n while( $row = $statement->fetch() ) { \r\n $clients[] = $row; \r\n \r\n }\r\n return $clients; \r\n } else {\r\n\t\treturn FALSE;\r\n\t\t}\r\n }", "public function members()\n\t{\n\t\treturn $this -> hasMany(__CLASS__.'\\Member', 'participant_team_id');\n\t}", "public function cardList()\n {\n // $pageIndex = 0;\n // $pageSize = 20;\n $pageIndex = I('get.pageIndex');\n $pageSize = I('get.pageSize');\n $where = I('get.where');\n $orderBy = I('get.orderBy');\n\n $where = htmlspecialchars_decode($where);\n\n $data = array(\n \"userAccount\" => self::USERACCOUNT,\n \"pageIndex\" => $pageIndex,\n \"pageSize\" => $pageSize,\n \"where\" => $where,\n \"orderBy\" => $orderBy,\n );\n $response_data = $this->client->CallHttpPost(\"Get_MembersPagedV2\", $data);\n $this->ajaxReturn($response_data);\n }", "function getChambreListId(){\n try {\n $sql = 'select id_chambre, numero_chambre from chambre_hospitalisation order by id_chambre desc';\n $resilt = $this->executeRequete($sql)->fetchAll();\n return $resilt;\n //var_dump($resilt);\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n }", "public function memberIdList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "public function readActiveMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \"A\"');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "public function getMembers() {\r\n\r\n //statement of resources\r\n $user = array();\r\n\r\n //sql connection\r\n $connect = connection::getInstance();\r\n\r\n //user sql request\r\n $sql = \"SELECT* FROM users\";\r\n //sending request\r\n\r\n\r\n\r\n $req = mysql_query($sql) or die('Erreur SQL !<br>' . $sql . '<br>' . mysql_error());\r\n\r\n while ($data = mysql_fetch_assoc($req)) {\r\n //scenario creation\r\n $data['nameU'] = Users::secure($data['nameU']);\r\n $data['IDU'] = Users::secure($data['IDU']);\r\n $data['typeU'] = Users::secure($data['typeU']);\r\n $data['admin'] = Users::secure($data['admin']);\r\n $data['password'] = Users::secure($data['password']);\r\n\r\n $users[] = new User($data['nameU'], $data['IDU'], $data['typeU'], $data['admin'], $data['password']);\r\n }\r\n\r\n return $users;\r\n }", "public function members()\n {\n return $this->hasMany('App\\Member');\n }", "function getAllMembers() {\r\n $api = new wlmapiclass($api_adres, $api_m);\r\n $api->return_format = 'php'; // <- value can also be xml or json\r\n\r\n $data = array();\r\n// $data['user_login'] = $name;\r\n// $data['user_email'] = $email;\r\n// // $data['custom_exp_date']=$expDate;\r\n $response = $api->get('/members');\r\n $response = unserialize($response);\r\n\r\n // $response = $api->post('/levels',$data)\r\n\r\n if (secssesResponce($response)) {\r\n\r\n $mem = $response['members']['member']; //hold array of all members \r\n\r\n return($mem);\r\n }\r\n}", "public function getMembers()\n {\n \t$companyId = session('company_id');\n \t$userRepo = $this->em->getRepository('App\\Entity\\Management\\User');\n \t$users = $userRepo->getUsersByCompany($companyId);\n\n echo json_encode($users);\n\n }", "public function filterMembers()\n {\n return $this->team->where('id', Auth::user()->getTeam()->id)->with([\n 'members' => function ($query) {\n $query->where('slug', 'like', '%' . $this->request->get('q') . '%');\n },\n ])->first()->members;\n }", "public function organizers()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ORGANIZER)->get();\n }", "private function getMClist()\n {\n return DB::table('absence')->join('teacher', 'absence.short_name', '=', 'teacher.short_name')\n ->get();\n// return Teacher::whereIn('short_name',Absence::where('date','=',new DateTime('today'))->lists('short_name'))->has('absence')->get();\n }" ]
[ "0.73190004", "0.6645987", "0.62595874", "0.59774035", "0.59544647", "0.5867948", "0.5847275", "0.5789874", "0.57801473", "0.5643668", "0.5597109", "0.55882555", "0.5572076", "0.5558976", "0.5558413", "0.55562127", "0.5533526", "0.55256444", "0.5503543", "0.550002", "0.5487516", "0.5478856", "0.546519", "0.5395297", "0.5318942", "0.5306312", "0.53052443", "0.5297382", "0.5268687", "0.5231279", "0.52273005", "0.5225918", "0.520393", "0.52019733", "0.51990014", "0.51980984", "0.5188413", "0.5187746", "0.51851827", "0.51776874", "0.5177051", "0.5170865", "0.5165419", "0.51536715", "0.51388377", "0.5137564", "0.51314926", "0.5127042", "0.50753695", "0.5073766", "0.5071135", "0.50682086", "0.50631446", "0.5054413", "0.50383973", "0.5028785", "0.5009504", "0.5005648", "0.50040317", "0.50011915", "0.49949476", "0.49917343", "0.49897", "0.49848798", "0.4978085", "0.4977484", "0.4963654", "0.49612126", "0.49585846", "0.49585846", "0.49556112", "0.49501973", "0.49476808", "0.49411365", "0.49408352", "0.494037", "0.4937489", "0.4928747", "0.4926326", "0.4910883", "0.49045056", "0.48936665", "0.48924848", "0.4887413", "0.48830724", "0.48778746", "0.48765755", "0.4872488", "0.48723486", "0.4870911", "0.48708805", "0.48701006", "0.48694864", "0.48679373", "0.48664114", "0.48602027", "0.48599648", "0.485428", "0.48501518", "0.48414052" ]
0.6867929
1
Get biographical and congressional role information for a particular member of Congress
public function getSpecificMember(string $memberId) { $this->formatValidator->isValidMemberIdFormat($memberId); $uriStub = "members/{$memberId}.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRole() {}", "public function getRole();", "public function getRole();", "public function getRole() : string;", "function getRole() {\n\t\treturn 1;\n\t}", "public function get_role()\n {\n }", "protected function _getRole(){\n\t$user = new Pas_User_Details();\n $person = $user->getPerson();\n if($person){\n \treturn $person->role;\n } else {\n \treturn false;\n }\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function getRole(){\n return $this->role; \n }", "public function getRole() \n {\n return $this->_fields['Role']['FieldValue'];\n }", "public function get_role($role)\n {\n }", "public function getRole() {\n $user = new Pas_User_Details();\n $person = $user->getPerson();\n if ($person) {\n $this->_role = $person->role;\n } \n return $this->_role;\n }", "public function getRoleMemberInfo()\n {\n if (array_key_exists(\"roleMemberInfo\", $this->_propDict)) {\n if (is_a($this->_propDict[\"roleMemberInfo\"], \"\\Beta\\Microsoft\\Graph\\Model\\Identity\") || is_null($this->_propDict[\"roleMemberInfo\"])) {\n return $this->_propDict[\"roleMemberInfo\"];\n } else {\n $this->_propDict[\"roleMemberInfo\"] = new Identity($this->_propDict[\"roleMemberInfo\"]);\n return $this->_propDict[\"roleMemberInfo\"];\n }\n }\n return null;\n }", "public function roleNameC(): string\n {\n $roles = $this->getRoleNames()->all();\n foreach ([\"Admin\", \"Volunteer\", \"Donor\"] as $item) {\n if (in_array($item, $roles)) {\n return $item;\n }\n }\n return \"No Role\";\n }", "public function getRole()\n {\n return $this->access_level;\n }", "abstract protected function getRoles();", "function getRoleByUserId($server, $args) {\n \n global $tm;\n $tm->tv(\"Made It To ROLE BY USER Functionality\");\n $tm->tv(\"ARGS: \".print_r($args, true));\n \n // get args\n list($e_name, $idstr) = $args;\n \n $tm->tv(\"IDSTR: \".$idstr);\n $tm->tv(\"E NAME: \".$e_name);\n \n $personnel =& PersonnelDB::getInstance();\n $store_name = getEntityStore(strtolower($e_name));\n $entities = array();\n \n \n $tm->tv(\"STORE NAME: \".$store_name);\n \n \n // get entity objects for set of ids passed\n $ids = array_unique(explode(',', $idstr)); \n foreach ($ids as $id) {\n //$entity = $personnel->$store_name->getByUserId($id);\n\t//$tm->tv(\"USER ENTITY (SINGULAR): \".print_r($entity, true));\n if ($entity = $personnel->$store_name->getByUserId($id)) {\n $tm->tv(\"USER ENTITY (SINGULAR): \".print_r($entity, true));\n $entities[] = $entity;\n }\n }\n\n $tm->tv(\"USER ENTITIES: \".print_r($entities, true));\n \n $tm->tv(\"USER ENTITIES1: \".$entity->personID);\n \n $r_type = 'nsf';\n $entity_id = $entity->personID;\n $entities = array();\n \n $entities = $personnel->RoleStore->getByFilter(array('personID' => $entity_id));\n \n //$store_name = 'RoleStore';\n \n //foreach ($ids as $id) {\n // if ($entity = $personnel->$store_name->getRoles()) {\n // $entities[] = $entity;\n // }\n //}\n\t\n //$entities = getRoles();\n\n // return serialized output\n return serializeEntities($entities, $server->contentType);\n \n \n //// get entity objects for set of ids passed\n //$ids = array_unique(explode(',', $idstr)); \n //foreach ($ids as $id) {\n // if ($entity = $personnel->$store_name->getByUserId($id, $r_type)) {\n // $entities[] = $entity;\n // }\n //}\n //\n //// return serialized output\n //return serializeEntities($entities, $server->contentType);\n}", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "protected function get_roles_data()\n {\n }", "public function getCanary();", "public static function getRole(){\n $role = Auth::user()->role_id ;\n switch($role){\n case 1 :\n return \"admin\";\n break;\n case 2 :\n return \"khateeb\";\n break ;\n case 3 :\n return \"ad\";\n break;\n default:\n return \"false\";\n }\n }", "function get_member( $member )\n {\n // TODO Determine role.is_admin in a better way\n\n $get_member_query = <<<SQL\n select m.first_name,\n m.last_name,\n m.gatech_email_address,\n m.display_email_address,\n to_char( m.paid_dues_date, 'MM/DD/YYYY' ) as paid_dues_date,\n to_char( m.paid_locker_date, 'MM/DD/YYYY' ) as paid_locker_date,\n to_char( m.paid_practice_date, 'MM/DD/YYYY' ) as paid_practice_date,\n to_char(\n m.paid_locker_date + ( m.locker_months * interval '1 month' ),\n 'MM/DD/YYYY'\n ) as locker_end_date,\n m.locker_number,\n m.profile_photo_path,\n m.personal_website,\n m.is_available_for_collaboration,\n m.biography,\n m.first_name || ' ' || m.last_name as name,\n r.is_admin\n from tb_member m\n join tb_member_role mr\n on m.member = mr.member\n join tb_role r\n on mr.role = r.role\n where m.member = ?member?\norder by r.rank\n limit 1\nSQL;\n\n $params = [ 'member' => $member ];\n $result = query_execute( $get_member_query, $params );\n\n return query_success( $result ) ? query_fetch_one( $result ) : false;\n }", "public function get_role_caps()\n {\n }", "public function getRole(){\r\n\t\t\treturn $this->role;\r\n\t\t}", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "public function getRole() \n {\n return $this->role;\n }", "public function & GetRoles ();", "abstract public function getCruser();", "function getRole()\n {\n return $this->role;\n }", "public function getMemberInfo() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n // Get the member by the membership number\n $GLOBALS[\"member\"] = $memberModel->getOneByMemberNumber($_SESSION[\"MembershipNumber\"]);\n }", "function cjpopups_user_role($user_info_or_id){\n\tglobal $wpdb, $wp_roles;\n\tif(is_array($user_info_or_id)){\n\t\t$uid = cjpopups_user_info($user_info_or_id, 'ID');\n\t}else{\n\t\t$uid = $user_info_or_id;\n\t}\n\t$user = get_userdata( $uid );\n\tif($user && !empty($user->roles)){\n\t\t$capabilities = $user->{$wpdb->prefix . 'capabilities'};\n\t\tif ( !isset( $wp_roles ) ){\n\t\t\t$wp_roles = new WP_Roles();\n\t\t}\n\t\tforeach ( $wp_roles->role_names as $role => $name ){\n\t\t\tif ( array_key_exists( $role, $capabilities ) ){\n\t\t\t\treturn $role;\n\t\t\t}\n\t\t}\n\t}else{\n\t\treturn 'non-user';\n\t}\n}", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "function getMemberCondoInfo() {\n return getAll(\"SELECT b.name,\n b.area,\n b.cost \n FROM member_condo a \n INNER JOIN condo b \n ON a.condo_id = b.id\n WHERE a.member_id = ?\",\n [getLogin()['mid']]);\n}", "function dir_link_roles_entity_property_info() {\n $info = array();\n $entity_info = entity_get_info('dir_role');\n foreach ($entity_info['bundles'] as $bundle => $bundle_info) {\n $info[$bundle] = array(\n 'label' => $bundle_info['label'],\n 'description' => t('@role is a role of link.', array('@role' => $bundle_info['label'])),\n 'type' => 'dir_role',\n );\n }\n\n return $info;\n}", "public function getShort(string $role): string;", "public function getRoleName()\n {\n return $this->isPrimary ? 'Client' : 'Joint';\n }", "public function get_authenty()\r\n {\r\n //right column defines how to treat each role for guessing the owner of the resource\r\n $roles=array(\r\n 'custodian' => 'owner',\r\n 'resourceProvider' => 'distributor',\r\n 'owner' => 'owner',\r\n 'user' => 'distributor',\r\n 'distributor' => 'distributor',\r\n 'originator' => 'owner',\r\n 'pointOfContact' => 'owner',\r\n 'principalInvestigator' => 'owner',\r\n 'processor' => 'owner',\r\n 'pubisher' => 'owner',\r\n 'author' => 'owner' \r\n );\r\n \r\n \r\n $countries=array();\r\n\r\n //check the ident_contact\r\n $contacts=$this->get_key_value('ident_contacts');\r\n \r\n if ($contacts)\r\n {\r\n foreach($contacts as $contact)\r\n {\r\n $role=NULL;\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n $meta_contacts=$this->get_key_value('metadata_contacts');\r\n \r\n if ($meta_contacts)\r\n {\r\n foreach($meta_contacts as $contact)\r\n {\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n return NULL;\r\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "public function getRole()\n {\n return $this->role;\n }", "protected function get_authority()\n {\n }", "function groups_calculate_role_people($rs,$context) {\n global $CFG;\n if(!$rs) {\n return false;\n }\n \n $roles = get_records_menu('role', null, 'name', 'id, name');\n $aliasnames = role_fix_names($roles, $context);\n\n // Array of all involved roles\n $roles=array();\n // Array of all retrieved users\n $users=array();\n // Fill arrays\n while($rec=rs_fetch_next_record($rs)) {\n // Create information about user if this is a new one\n if(!array_key_exists($rec->userid,$users)) {\n // User data includes all the optional fields, but not any of the\n // stuff we added to get the role details\n $userdata=clone($rec);\n unset($userdata->roleid);\n unset($userdata->roleshortname);\n unset($userdata->rolename);\n unset($userdata->userid);\n $userdata->id=$rec->userid;\n\n // Make an array to hold the list of roles for this user\n $userdata->roles=array();\n $users[$rec->userid]=$userdata;\n }\n // If user has a role...\n if(!is_null($rec->roleid)) {\n // Create information about role if this is a new one\n if(!array_key_exists($rec->roleid,$roles)) {\n $roledata=new StdClass;\n $roledata->id=$rec->roleid;\n $roledata->shortname=$rec->roleshortname;\n if(array_key_exists($rec->roleid,$aliasnames)) {\n $roledata->name=$aliasnames[$rec->roleid];\n } else {\n $roledata->name=$rec->rolename;\n }\n $roledata->users=array();\n $roles[$roledata->id]=$roledata;\n }\n // Record that user has role\n $users[$rec->userid]->roles[] = $roles[$rec->roleid];\n }\n }\n rs_close($rs);\n\n // Return false if there weren't any users\n if(count($users)==0) {\n return false;\n }\n\n // Add pseudo-role for multiple roles\n $roledata=new StdClass;\n $roledata->name=get_string('multipleroles','role');\n $roledata->users=array();\n $roles['*']=$roledata;\n\n // Now we rearrange the data to store users by role\n foreach($users as $userid=>$userdata) {\n $rolecount=count($userdata->roles);\n if($rolecount==0) {\n debugging(\"Unexpected: user $userid is missing roles\");\n } else if($rolecount>1) {\n $roleid='*';\n } else {\n $roleid=$userdata->roles[0]->id;\n }\n $roles[$roleid]->users[$userid]=$userdata;\n }\n\n // Delete roles not used\n foreach($roles as $key=>$roledata) {\n if(count($roledata->users)===0) {\n unset($roles[$key]);\n }\n }\n\n // Return list of roles containing their users\n return $roles;\n}", "protected function get_authority()\n {\n }", "public function getRole() {\n return($this->role);\n }", "static function getRole(&$rsData)\n {\n return $rsData['role'];\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getRole() : string\n {\n return $this->role;\n }", "function getProfileInfo($member)\n\t\t{\n\t\n\t\t $query = \"SELECT * FROM tbl_member WHERE `user_name` = '\".$member.\"'\";\n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}", "function ipts_recount_clovek_role($clovek_id, $role) {\n\tipts_recount_clovek($clovek_id);\n}", "function group_get_role_info($groupid) {\n $roles = get_records_sql_assoc('SELECT role, edit_views, see_submitted_views, gr.grouptype FROM {grouptype_roles} gr\n INNER JOIN {group} g ON g.grouptype = gr.grouptype\n WHERE g.id = ?', array($groupid));\n foreach ($roles as $role) {\n $role->display = get_string($role->role, 'grouptype.'.$role->grouptype);\n $role->name = $role->role;\n }\n return $roles;\n}", "function egsr_custom_site_roles(){\n\n return Array ( \n // STAFF_ROLE => Array (\n // 'label' => STAFF_ROLE_LABEL,\n // 'caps' => egsr_staff_cap(),\n // ),\n GROUP_EDITOR_ROLE => Array (\n 'label' => GROUP_EDITOR_ROLE_LABEL,\n 'caps' => egsr_group_editor_cap(),\n ),\n GROUP_ADMIN_ROLE => Array (\n 'label' => GROUP_ADMIN_ROLE_LABEL,\n 'caps' => egsr_group_admin_cap(),\n ),\n );\n\n}", "public function __toString()\n {\n return (string) $this->role;\n }", "public function getRole()\n {\n return $this->getName();\n }", "public function getAuthenticatedRole();", "public static function getProjectRole(){\n\t\t$db = DemoDB::getConnection();\n $sql = \"SELECT name\n FROM project_role\n\t\t\tWHERE name != 'Owner'\";\n $stmt = $db->prepare($sql);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\t}", "function is_accountant($user)\n{\n return is_array($user->roles) && in_array('accountant', $user->roles);\n}", "function eman_roles( $type='turner' )\n{\n\tswitch ( $type )\n\t{\n\t\tcase 'owner' :\n\t\t\treturn array('owner','owners_rep','consultant');\n\t\t\tbreak;\n\t\tcase 'sub' :\n\t\t\treturn array('subcontractor');\n\t\t\tbreak;\n\t\tcase 'pending' :\n\t\t\treturn array('subscriber');\n\t\t\tbreak;\n\t\tcase 'turner' :\n\t\t\treturn array('administrator','editor');\n\t\t\tbreak;\n\t}\n}", "function op_api_member($member)\n{\n if (!$member)\n {\n return null;\n }\n\n $viewMemberId = sfContext::getInstance()->getUser()->getMemberId();\n\n $memberImageFileName = $member->getImageFileName();\n if (!$memberImageFileName)\n {\n $memberImage = op_image_path('no_image.gif', true);\n }\n else\n {\n $memberImage = sf_image_path($memberImageFileName, array('size' => '48x48'), true);\n }\n\n $relation = null;\n if ((string)$viewMemberId !== (string)$member->getId())\n {\n $relation = Doctrine::getTable('MemberRelationship')->retrieveByFromAndTo($viewMemberId, $member->getId());\n }\n\n $selfIntroduction = $member->getProfile('op_preset_self_introduction', true);\n\n return array(\n 'id' => $member->getId(),\n 'profile_image' => $memberImage,\n 'screen_name' => $member->getConfig('op_screen_name', $member->getName()),\n 'name' => $member->getName(),\n 'profile_url' => op_api_member_profile_url($member->getId()),\n 'friend' => $relation ? $relation->isFriend() : false,\n 'blocking' => $relation ? $relation->isAccessBlocked() : false,\n 'self' => $viewMemberId === $member->getId(),\n 'friends_count' => $member->countFriends(),\n 'self_introduction' => $selfIntroduction ? (string)$selfIntroduction : null,\n );\n}", "function get_roles_with_capability($capability, $permission=NULL, $context='') {\n\n global $CFG;\n\n if ($context) {\n if ($contexts = get_parent_contexts($context)) {\n $listofcontexts = '('.implode(',', $contexts).')';\n } else {\n $sitecontext = get_context_instance(CONTEXT_SYSTEM);\n $listofcontexts = '('.$sitecontext->id.')'; // must be site\n }\n $contextstr = \"AND (rc.contextid = '$context->id' OR rc.contextid IN $listofcontexts)\";\n } else {\n $contextstr = '';\n }\n\n $selectroles = \"SELECT r.*\n FROM {$CFG->prefix}role r,\n {$CFG->prefix}role_capabilities rc\n WHERE rc.capability = '$capability'\n AND rc.roleid = r.id $contextstr\";\n\n if (isset($permission)) {\n $selectroles .= \" AND rc.permission = '$permission'\";\n }\n return get_records_sql($selectroles);\n}", "private function _getRole()\n {\n //return role\n if(false/*logged_in*/){\n\n }else{\n $this->load->Model('user_roles/Mdl_roles');\n return $this->Mdl_roles->getRolesName();\n }\n }", "function DoctorAppointment_role_caps() {\n $roles = array('receptionist');\n \n // Loop through each role and assign capabilities\n foreach($roles as $the_role) { \n\n $role = get_role($the_role);\n \n $role->add_cap( 'read' );\n $role->add_cap( 'read_DoctorAppointment');\n $role->add_cap( 'read_private_DoctorAppointments' );\n $role->add_cap( 'edit_DoctorAppointment' );\n $role->add_cap( 'edit_DoctorAppointments' );\n $role->add_cap( 'edit_others_DoctorAppointments' );\n $role->add_cap( 'edit_published_DoctorAppointments' );\n $role->add_cap( 'publish_DoctorAppointments' );\n $role->add_cap( 'delete_others_DoctorAppointments' );\n $role->add_cap( 'delete_private_DoctorAppointments' );\n $role->add_cap( 'delete_published_DoctorAppointments' );\n \n \n \n }\n}", "function getUserRoleName()\n{\n return array_flip(getConfig('role'))[Auth::user()->role_id];\n}", "public function getCandidateDetails($userdata){\t\r\n\t $this->db->select('*');\r\n\t $this->db->from('jh_registration');\r\n\t $this->db->where('role','candidate');\r\n\t $query=$this->db->get();\r\n\t //echo $this->db->last_query(); exit;\r\n\t $results = $query->result();\r\n\t return $results;\r\n\t}", "abstract protected function rolePerms($role);", "function getHouseholdAdmin(){\n\t\t$members = $this->getMembers();\n\t\tforeach ($members as $member) {\n\t\t\t$level = $member->getUserLevel();\n\t\t\tif($level == 'admin'){\n\t\t\t\t$admin = $member;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $admin;\n\t}", "public function getUserRole() {\n return view('backend.acl.user_role');\n }", "public function getRole() {\n return $this->role;\n }", "public function roles()\n {\n return [\n 'traveller', 'sender'\n ];\n }", "public function getDesiredRole()\n {\n if (array_key_exists(\"desiredRole\", $this->_propDict)) {\n if (is_a($this->_propDict[\"desiredRole\"], \"\\Beta\\Microsoft\\Graph\\Model\\MultiTenantOrganizationMemberRole\") || is_null($this->_propDict[\"desiredRole\"])) {\n return $this->_propDict[\"desiredRole\"];\n } else {\n $this->_propDict[\"desiredRole\"] = new MultiTenantOrganizationMemberRole($this->_propDict[\"desiredRole\"]);\n return $this->_propDict[\"desiredRole\"];\n }\n }\n return null;\n }", "function product_line_roles_fun() {\r\n return array(\r\n 'Ventilation' => 'permissiondata',\r\n 'Compression' => 'permissiondata',\r\n 'Infrastructure' => 'permissiondata',\r\n 'Stapling' => 'vlex_permissiondata',\r\n 'Patient Monitoring' => 'vlex_permissiondata',\r\n 'Ablation' => 'vlex_permissiondata',\r\n 'Vessel Sealing' => 'vlex_permissiondata',\r\n );\r\n}", "static function group(): string { return 'roles'; }", "function getChamberSpecificDetail($memberID, $dataID, $column, $table) {\r\n $queryString = \"SELECT $table.answer FROM $table JOIN BUSINESS ON $table.BUSINESSID=BUSINESS.businessID JOIN USER ON USER.businessID=BUSINESS.businessID WHERE USER.UserID='$memberID' AND $table.DataID=$dataID\";\r\n $sql = $this->db->prepare($queryString);\r\n if ($sql->execute()) {\r\n return $sql->fetch();\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "public function getRoles(): array;", "function rets_bsf_loadroles () {\n\n $role = array();\n $ary = user_roles();\n foreach ($ary as $key => $value) {\n\tswitch ($value) {\n\t case ('basic membership') :\n $role[$key] = 'Basic';\n\t break;\n\t case ('gold membership') :\n\t $role[$key] = 'Gold';\n\t break;\n case ('platinum membership') :\n $role[$key] = 'Platinum';\n\t break;\n case ('team membership') :\n $role[$key] = 'Team';\n\t break;\n\t\tcase ('Agent') :\t\t\t\t\t\t// agent sites only have \"agents\"\n \t$role[$key] = 'Agent';\n\t break;\n\t}\n }\n return $role;\n}", "function cs_get_user_role() {\n\tglobal $current_user;\n\t$user_roles = $current_user->roles;\n\t$user_role = array_shift($user_roles);\n\treturn $user_role;\n}", "function user_role_need ($role) {\r\n\t$info = user_info();\r\n\treturn ($info[3] == $role ? true : false);\r\n}", "function rets_bsf_ismember ($roles, $agent1, $agency1, $agent2, $agency2) {\n\n $ismember1 = rets_bsf_ismember_agent ($roles, $agent1);\n $ismember2 = rets_bsf_ismember_agent ($roles, $agent2);\n\n if ($ismember1 == 'No' && $ismember2 == 'No') {\n return 'No';\n }\n\n // Set the variables for TYPE and UID so we don't error out\n if ($ismember1 == 'No') {\n $type1 = '';\n $uid1 = '';\n } else {\n $type1 = $ismember1[0];\n $uid1 = $ismember1[1];\n }\n if ($ismember2 == 'No') {\n $type2 = '';\n $uid2 = '';\n } else {\n $type2 = $ismember2[0];\n $uid2 = $ismember2[1];\n }\n \n $IsMember = array( \n 'ListAgentID' => $agent1,\n 'ListOfficeID' => $agency1,\n 'ListAgentType' => $type1,\n 'ListAgentUID' => $uid1,\n 'CoListAgentID' => $agent2,\n 'CoListOfficeID' => $agency2,\n 'CoListAgentType' => $type2,\n 'CoListAgentUID' => $uid2,\n );\n\n if ($ismember1 == 'No') {\n $IsMember['ListAgentID'] = $agent2;\n $IsMember['ListOfficeID'] = $agency2;\n $IsMember['ListAgentType'] = $type2;\n $IsMember['ListAgentUID'] = $uid2;\n $ismember2 = 'No';\n } \n if ($ismember2 == 'No') {\n $IsMember['CoListAgentID'] = '';\n $IsMember['CoListOfficeID'] = '';\n $IsMember['CoListAgentType'] = '';\n $IsMember['CoListAgentUID'] = '';\n\t$TeamMember = rets_bsf_get_teammember($roles,$IsMember['ListAgentUID']);\n\tif ($TeamMember<>'No') {\n\t $IsMember['CoListAgentID'] = $TeamMember[0];\n\t $IsMember['CoListOfficeID'] = $TeamMember[1];\n\t $IsMember['CoListAgentType'] = $TeamMember[2];\n\t $IsMember['CoListAgentUID'] = $TeamMember[3];\n\t}\n }\n return $IsMember;\n \n}", "public static function getUserRole(){\n\t\t$db = DemoDB::getConnection();\n $sql = \"SELECT *\n FROM user_role\";\n $stmt = $db->prepare($sql);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\t}", "function getRole()\n\t{\n\t\tif (($role = $this->getState('__role')) !== null)\n\t\t\treturn $this->role;\n\t\telse\n\t\t\treturn 0;\n\t}", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "function get_user_role($u_id){\n\t\t$this->db->select($this->flexi_auth->db_column('user_acc', 'group_id'));\t\n\t\t$this->db->where($this->flexi_auth->db_column('user_acc', 'id'),$u_id);\t\n\t\t$qres=$this->db->get($this->auth->tbl_user_account);\n\t\tif ($qres->num_rows() > 0) {\n\t\t\t$row=$qres->row_array();\n\t\t\t//$this->firephp->log($row['uacc_group_fk'].\"for email=\".$email);\n\t\t\tswitch ($row['uacc_group_fk']){\n\t\t\t\tcase (1):\n\t\t\t\t\treturn \"Parent\";\n\t\t\t\tcase (2):\n\t\t\t\t\treturn \"Student\";\n\t\t\t\tcase (3):\n\t\t\t\t\treturn \"Admin\";\n\t\t\t\tdefault:\n\t\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}", "function groups_get_potential_members($courseid, $roleid = null, $orderby = 'lastname,firstname') {\n global $CFG;\n\n $context = get_context_instance(CONTEXT_COURSE, $courseid);\n $sitecontext = get_context_instance(CONTEXT_SYSTEM);\n $rolenames = array();\n $avoidroles = array();\n\n if ($roles = get_roles_used_in_context($context, true)) {\n\n $canviewroles = get_roles_with_capability('moodle/course:view', CAP_ALLOW, $context);\n $doanythingroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext);\n\n foreach ($roles as $role) {\n if (!isset($canviewroles[$role->id])) { // Avoid this role (eg course creator)\n $avoidroles[] = $role->id;\n unset($roles[$role->id]);\n continue;\n }\n if (isset($doanythingroles[$role->id])) { // Avoid this role (ie admin)\n $avoidroles[] = $role->id;\n unset($roles[$role->id]);\n continue;\n }\n $rolenames[$role->id] = strip_tags(role_get_name($role, $context)); // Used in menus etc later on\n }\n }\n\n $select = 'SELECT u.id, u.username, u.firstname, u.lastname, u.idnumber ';\n $from = \"FROM {$CFG->prefix}user u INNER JOIN\n {$CFG->prefix}role_assignments r on u.id=r.userid \";\n\n if ($avoidroles) {\n $adminroles = 'AND r.roleid NOT IN (';\n $adminroles .= implode(',', $avoidroles);\n $adminroles .= ')';\n } else {\n $adminroles = '';\n }\n\n // we are looking for all users with this role assigned in this context or higher\n if ($usercontexts = get_parent_contexts($context)) {\n $listofcontexts = '('.implode(',', $usercontexts).')';\n } else {\n $listofcontexts = '('.$sitecontext->id.')'; // must be site\n }\n\n if ($roleid) {\n $selectrole = \" AND r.roleid = $roleid \";\n } else {\n $selectrole = \" \";\n }\n\n $where = \"WHERE (r.contextid = $context->id OR r.contextid in $listofcontexts)\n AND u.deleted = 0 $selectrole\n AND u.username != 'guest'\n $adminroles \";\n $order = \"ORDER BY $orderby \";\n\n return(get_records_sql($select.$from.$where.$order));\n\n}", "public function getRolePermissions()\n {\n $headers = ['Ability', 'Role'];\n\n $role_name = $this->argument('needle');\n\n $role = $this->permission->findBy('role_name', $role_name);\n if ($role) {\n $permissions = json_to_array($role->permission);\n\n if (!is_array($permissions)) {\n $permissions = [];\n }\n\n foreach ($permissions as $module=>$permission) {\n $this->warn(\"\\n\" . strtoupper($module));\n $data = [];\n\n foreach ($permission as $ability=>$perm) {\n $vals = [$module, $ability];\n if (is_bool($perm)) {\n if ($perm) {\n $vals[] = 'true';\n } else {\n $vals[] = 'false';\n }\n }\n if (is_string($perm)) {\n $vals[] = $perm;\n }\n $data[] = $vals;\n }\n $this->table($headers, $data);\n }\n\n } else {\n $this->error(\"No role found!\");\n }\n }", "private static function getUserRole(): array\n\t{\n\t return self::getUser()->roles;\n\t}", "function get_user_role() {\n global $current_user;\n $user_roles = $current_user->roles;\n $user_role = array_shift($user_roles);\n return $user_role; // return translate_user_role( $user_role );\n}", "protected abstract function getAllowedRoles();", "public function findRoles() {\n\t\t\n\t}", "public function getRole()\n {\n return $this->getPredisClient()->role();\n }", "public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}" ]
[ "0.615511", "0.60776645", "0.60776645", "0.6030217", "0.599632", "0.59461206", "0.5719794", "0.5646128", "0.56439006", "0.5550596", "0.5517149", "0.5516284", "0.5493032", "0.54811007", "0.54803157", "0.5402824", "0.53978205", "0.53936833", "0.5384679", "0.53741974", "0.5372134", "0.5369316", "0.5368601", "0.53584695", "0.5341519", "0.5341519", "0.5341519", "0.5341519", "0.5328112", "0.5327982", "0.5313296", "0.5304936", "0.52971005", "0.52743477", "0.5271544", "0.52654177", "0.5256661", "0.5250406", "0.52429694", "0.5230283", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52257997", "0.52256787", "0.5225414", "0.5225055", "0.52071124", "0.5202812", "0.5202032", "0.5195681", "0.5178021", "0.5169036", "0.5153799", "0.5141778", "0.51413965", "0.5137821", "0.5135682", "0.51338077", "0.51334405", "0.51323813", "0.513161", "0.5127716", "0.512635", "0.5123293", "0.51160014", "0.51154876", "0.51094806", "0.51087177", "0.5108113", "0.5103806", "0.5096417", "0.50941503", "0.5092327", "0.5085213", "0.50782216", "0.50654215", "0.50636613", "0.5061944", "0.5053995", "0.50527483", "0.5039121", "0.5031318", "0.5029307", "0.5029307", "0.5029307", "0.5021919", "0.50099796", "0.5001295", "0.5000954", "0.49933538", "0.49903804", "0.4989571", "0.49824026", "0.49807367" ]
0.0
-1
Get a list of the most recent new members of the current Congress
public function getNewMembers() { $uriStub = 'members/new.json'; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewMembers($limit = 10, $offset = -1)\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"superuser <> 1\";\n\t\t$criteria->limit = $limit;\n\t\t$criteria->offset = $offset;\n\t\t$criteria->order = \"created DESC\";\n\t\t$newMembers = ZoneUser::model()->findAll($criteria);\n\n\t\t// get info new member\n\t\t$arrayNewMember = array();\n\t\tif(!empty($newMembers)){\n\t\t\tforeach ($newMembers as $key => $user) {\n\t\t\t\tif ($user->id !== -1) {\n\t\t\t\t\t$user->setExtraInfo();\n\t\t\t\t\t$userInfo = ZoneApiResourceFormat::formatData('user', $user->toArray(true));\n\t\t\t\t\t$userInfo['stats'] = $user->stats;\n\t\t\t\t\tunset($userInfo['email']);\n\t\t\t\t\tunset($userInfo['location']);\n\t\t\t\t}\n\t\t\t\t$arrayNewMember[] = $userInfo;\n\t\t\t}\n\t\t}\n\t\treturn $arrayNewMember;\n\t}", "public function readNewMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \"A\" and DateNew = CURDATE()');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "public function getListRecents(){\n\t\t$resultsUsers = [];\n\t\t$q = $this->pdo->query('SELECT * FROM utilisateur ORDER BY dateCreation DESC LIMIT 4');\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$resultsUsers[] = new Utilisateur($donnee);\n\t\t}\n\t\treturn $resultsUsers;\n\t}", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function getExpiringMembers() {\n\t\t$date = new DateTime();\n\t\t$end = $date->setTimestamp(strtotime('+30 days'));\n\n\t\treturn Member::get()->filter(array(\n\t\t\t'MembershipStatus' => 'Verified',\n\t\t\t'ExpiryDate:LessThan' => $end->format('Y-m-d H:i:s'),\n\t\t\t'Notified' => 0\n\t\t));\n\t}", "public function get_recent_doctors(){\n $query = $this->m->port->p->query('SELECT * FROM quickblox WHERE regid !=\" '. $this->m->user_value('regid').'\" and role =\"'.M::ROLE_DOCTOR. '\" and (lastlogin>date_sub(now(), Interval 11 second) OR logout_time>date_sub(now(),Interval 10 second))');\n $doctors = array();\n $temp = array();\n foreach ($query->result() as $row){\n $temp['id'] = $row->id;\n $temp['regid'] = $row->regid;\n $temp['name'] = $row->name;\n $temp['status'] = $row->status;\n array_push($doctors, $temp);\n }\n return $doctors;\n }", "public function get_members(){\n return $this->connected_clients;\n }", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "public function getRecentCreatedUsers()\n {\n $result = $this\n ->_model\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $result;\n }", "public function compactList(){\n $output = array();\n $members = $this->members;\n foreach ($members as $value) {\n $member = array(\n 'id' => $value['id'],\n 'name' => $value['firstName'] . \" \" . $value['lastName'],\n 'num_boats' => count($value['boats'])\n );\n array_push($output, $member);\n }\n return $output;\n }", "public function actionLastMembers()\n {\n $dataProvider = new ActiveDataProvider(\n [\n 'query' => Member::getMembersWhoWaitingForConfirmEmail(),\n 'pagination' => [\n 'pageSize' => 0,\n ]\n ]);\n\n return $this->render('last-members', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "private function getLastUsers() {\n $last_five_users = array();\n $result = db_select('users_field_data', 'u')\n ->fields('u', array('uid', 'name', 'mail', 'created'))\n ->condition('u.created', REQUEST_TIME - 3600, '>')\n ->orderBy('created', 'DESC')\n ->range(0, 15)\n ->execute();\n\n $count = 0;\n foreach ($result as $record) {\n $last_five_users[$count]['uid'] = $record->uid;\n $last_five_users[$count]['name'] = $record->name;\n $last_five_users[$count]['email'] = $record->mail;\n $last_five_users[$count]['created'] = $record->created;\n $count++;\n }\n\n return $last_five_users;\n }", "function getFriendLastedPosting() {\n $sql = \"SELECT b.*,\n c.name \n FROM member_posting a\n INNER JOIN posting b \n ON b.id = a.posting_id\n INNER JOIN member c \n ON c.id = a.member_id\n WHERE a.member_id IN (\n SELECT friend_id FROM member_friend WHERE member_id = ?)\n ORDER BY b.last_update_time DESC LIMIT 10\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function getTopMembers(): array\n {\n $statement = \"SELECT * FROM \" . $this->table . \" ORDER BY id LIMIT \".self::MEMBERLIMIT;\n return $this->pdo->query($statement)->fetchAll();\n }", "public function findLastRegistered()\n {\n $qb = $this->createQueryBuilder('u')\n ->select('u')\n ->orderBy('u.createdAt', 'DESC')\n ->setMaxResults(4);\n\n return $qb->getQuery()->getResult();\n }", "public function getlatestCompanies()\n {\n $AdminDashboardModel = $this->model('AdminDashboardModel');\n $this->latestCompanies = $AdminDashboardModel->getLatestCompanies();\n }", "public static function latest($limit = 60){\n $key = self::$prefix['list'].\"latest\";\n $cartoons = [];\n if(Cache::exists($key)){\n $list = Cache::fetch($key);\n }else {\n $list = Functions::api_fetch(\"/cartoon/latest\");\n Cache::save($key, $list, RECENT_UPDATE_TIME);\n }\n $list = array_slice($list->cartoons,0,$limit);\n foreach ($list as $cartoon){\n $cartoons[] = Cartoon::get($cartoon->id);\n }\n return $cartoons;\n }", "public function verboseList(){\n $output = array();\n foreach ($this->members as $value) {\n }\n foreach ($this->members as $value) {\n $member = array(\n 'id' => $value['id'],\n 'firstName' => $value['firstName'],\n 'lastName' => $value['lastName'],\n 'birthNumber' => $value['birthNumber'],\n 'name' => $value['firstName'] . \" \" . $value['lastName'],\n 'boats' => $value['boats']\n );\n array_push($output, $member);\n }\n return $output;\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "function getMembers(){\n\t\treturn $this->members;\n\t}", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "function getMembers()\r\n {\r\n // define the query\r\n $sql = \"SELECT * FROM member ORDER BY lname\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // execute statement\r\n $statement->execute();\r\n // get result\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function getCreated_byList() {\n if ($this->cached['Created_by']) return array_values($this->cache['Created_by']);\n return XPClass::forName('de.uska.db.Player')\n ->getMethod('getPeer')\n ->invoke()\n ->doSelect(new Criteria(\n array('player_id', $this->getCreated_by(), EQUAL)\n ));\n }", "function membersemailist($memberquery){\n\t$f3=$this->f3;\n\t$members =\tnew Member($this->db);\n\t$memblist=$members->load();\n\t$membemails= $this->db->exec('SELECT distinct(email) as unqemail from members where u3ayear = '.'\"2015-2016\"'. ' and status =\"Active\" and email <> \"\" ' .$memberquery.' order by unqemail;');\n\t$output = iterator_to_array(new RecursiveIteratorIterator(\n new RecursiveArrayIterator($membemails)), FALSE);\n\treturn array_values($output);\n\t\n\t\n}", "public function iN_NewRegisteredUsers() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_users ORDER BY iuid DESC LIMIT 5\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function countNewMembers()\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"superuser <> 1\";\n\t\t$criteria->order = \"created DESC\";\n\t\t$count = ZoneUser::model()->count($criteria);\n\t\treturn $count;\n\t}", "function fillMembers() \n\t{\n\t\t//\tselect members list\t\t\n\t\t$trs = db_query(\"select , from `ugmembers` order by ,\",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->members[] = array($tdata[1],$tdata[0]);\n\t\t}\n\t}", "function getRecent($limit) {\n $PDO = &DB::$PDO;\n static $recent;\n if (!$recent) {\n $mem = new cache;\n $mem->key = 'Recent';\n if (!$data = $mem->get()) {\n $rec = $PDO->query('SELECT u.username, u.country, a.time, a.size, c.name, c.id, a.passed, a.executed, c.active \n FROM attempts a, users u, challenges c \n WHERE a.user_id = u.id AND c.id=a.challenge_id AND active=\\'1\\'\n ORDER BY a.id DESC LIMIT 100');\n \n while (list($username,$country,$time,$size,$challenge_name,$challenge_id,$passed,$executed,$active)=$rec->fetch()) {\n if ($executed == 0) {\n $passed = 'pending';\n }\n else {\n $passed = $passed ? 'valid' : 'invalid';\n }\n $list[] = array('username' => $username,\n 'country' => $country,\n 'challenge_name' => $challenge_name,\n 'challenge_id' => $challenge_id,\n 'result' => $passed,\n 'time' => $time,\n 'size' => $size,\n 'challenge_active' => $active);\n \n }\n $mem->set(0,$list,MEMCACHE_COMPRESSED,1800);\n } else {\n $list = $data;\n $recent = $list;\n }\n } else {\n $list = $recent;\n }\n $list = array_slice($list,0,$limit,true);\n return $list;\n}", "private function makeActiveMemeberships() {\n\t\t$roles = array ();\n\t\t\n\t\tif ($this->memberships)\n\t\t\tforeach ( $this->memberships as $membership ) {\n\t\t\t\tif ($membership->end_date > time ())\n\t\t\t\t\t$roles [] = $membership->role;\n\t\t\t}\n\t\t\n\t\treturn $roles;\n\t}", "public function getRecentCreatedCourses()\n {\n $result = $this\n ->_model\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $result;\n }", "public function getRecent($limit = 5)\n {\n $announcements = [];\n\n $select = \"SELECT * FROM announcements ORDER BY announced DESC LIMIT :limit\";\n\n $statement = $this->db->prepare($select);\n $statement->bindParam('limit', $limit);\n\n $statement->execute();\n\n $data = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as $row) {\n $announcements[] = new Announcement($row['site'], $row['filename'], $row['size'], $row['tth'], new\\DateTime($row['announced']));\n }\n\n return $announcements;\n\n }", "abstract public function listNewCustomersSince($datetime);", "function get_all_online_contacts() {\n //get the table and select everything.\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.status != 0')\n ->andWhere('user.status != 3')\n ->andWhere('user.timedout != 1');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n\n foreach ($contacts as $key => $contact) {\n //if the contacts username is not set then get it from Zikula\n if (!isset($contact['uname']) || empty($contact['uname'])) {\n $contacts[$key]['uname'] = UserUtil::getVar('uname', $contact['uid']);\n }\n }\n\n //return the array of contacts\n return $contacts;\n }", "private function collectAllKnownMembers()\n {\n return $this->getDoctrine()->getRepository(Board::class)->findAllKnownMembers($this->getUser());\n }", "public function memberList($eid = 1) {\n $config = $this->config('simple_conreg.settings.'.$eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::badgeTypes($eid, $config);\n $digits = $config->get('member_no_digits');\n\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'Name':\n $order = 'name';\n break;\n case 'Country':\n $order = 'country';\n break;\n case 'Type':\n $order = 'badge_type';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content = array();\n\n //$content['#markup'] = $this->t('Unpaid Members');\n\n $content['message'] = array(\n '#cache' => ['tags' => ['simple-conreg-member-list'], '#max-age' => 600],\n '#markup' => $this->t('Members\\' public details are listed below.'),\n );\n\n $rows = [];\n $headers = [\n 'member_no' => ['data' => t('Member No'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'member_name' => ['data' => t('Name'), 'field' => 'name'],\n 'badge_type' => ['data' => t('Type'), 'field' => 'm.badge_type', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_country' => ['data' => t('Country'), 'field' => 'm.country', 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],\n ];\n $total = 0;\n\n foreach ($entries = SimpleConregStorage::adminPublicListLoad($eid) as $entry) {\n // Sanitize each entry.\n $badge_type = trim($entry['badge_type']);\n $member_no = sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n $member = ['member_no' => $badge_type . $member_no];\n switch ($entry['display']) {\n case 'F':\n $fullname = trim(trim($entry['first_name']) . ' ' . trim($entry['last_name']));\n if ($fullname != trim($entry['badge_name']))\n $fullname .= ' (' . trim($entry['badge_name']) . ')';\n $member['name'] = $fullname;\n break;\n case 'B':\n $member['name'] = trim($entry['badge_name']);\n break;\n case 'N':\n $member['name'] = t('Name withheld');\n break;\n }\n $member['badge_type'] = trim(isset($types[$badge_type]) ? $types[$badge_type] : $badge_type);\n $member['country'] = trim(isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country']);\n\n // Set key to field to be sorted by.\n if ($order == 'member_no')\n $key = $member_no;\n else\n $key = $member[$order] . $member_no; // Append member number to ensure uniqueness.\n if (!empty($entry['display']) && $entry['display'] != 'N' && !empty($entry['country'])) {\n $rows[$key] = $member;\n }\n $total++;\n }\n\n // Sort array by key.\n if ($direction == 'DESC')\n krsort($rows);\n else\n ksort($rows);\n\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n //'#footer' => array(t(\"Total\")),\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n\n $content['summary_heading'] = [\n '#markup' => $this->t('Country Breakdown'),\n '#prefix' => '<h2>',\n '#suffix' => '</h2>',\n ];\n\n $rows = array();\n $headers = array(\n t('Country'),\n t('Number of members'),\n );\n $total = 0;\n foreach ($entries = SimpleConregStorage::adminMemberCountrySummaryLoad($eid) as $entry) {\n if (!empty($entry['country'])) {\n // Sanitize each entry.\n $entry['country'] = trim($countryOptions[$entry['country']]);\n $rows[] = $entry;\n $total += $entry['num'];\n }\n }\n //Add a row for the total.\n $rows[] = array(t(\"Total\"), $total);\n $content['summary'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n\n return $content;\n }", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "public function getCachedTeamMembersAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':team_members', 10, function () {\n return $this->teamMembers()->latest()->get();\n });\n }", "function GetMembers()\n\t{\t$members = array();\n\t\t$where = array();\n\t\t$tables = array('students');\n\t\t\n\t\tif ($_GET['morf'])\n\t\t{\t$where[] = 'students.morf=\"' . $this->SQLSafe($_GET['morf']) . '\"';\n\t\t}\n\t\n\t\tif ($_GET['ctry'])\n\t\t{\t$where[] = 'students.country=\"' . $this->SQLSafe($_GET['ctry']) . '\"';\n\t\t}\n\t\t\n\t\tif ($name = $this->SQLSafe($_GET['name']))\n\t\t{\t$where[] = '(CONCAT(students.firstname, \" \", students.surname, \"|\", students.username) LIKE \"%' . $name . '%\")';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT students.* FROM ' . implode(',', $tables);\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' GROUP BY students.userid ORDER BY students.surname, students.firstname LIMIT 0, 1000';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif (!$row[\"country\"] || $this->user->CanAccessCountry($row[\"country\"]))\n\t\t\t\t{\t$members[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $members;\n\t}", "function getRecents() {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"SELECT * FROM urls ORDER BY id DESC LIMIT 30;\");\n\t\t$preparedStatement->execute(array());\n\t\treturn parseFullResults($preparedStatement->fetchAll());\n\t}", "function members() {\n $results = null;\n pagination::init()->paginator('SELECT * FROM `users` ORDER BY `id` DESC', null, 20, 5, null);\n $results .= '<div class=\"members-header\">Members</div>';\n $results .= '<div class=\"members-content\">';\n if(pagination::init()->count() > 0):\n foreach(pagination::init()->result() as $user):\n $results .= '('.$user->id.') - '.sanitize($user->username).'<hr class=\"members-list-hr\"/>';\n endforeach;\n endif;\n $results .= '</div>';\n $results .= '<div class=\"members-content-pagination\">'.pagination::init()->links().'</div>';\n return $results;\n }", "public function GetNewestMobiduls()\n {\n $newestMobiduls = Mobidul::pub()->newestFirst()->basicInformation()->get();\n\n $mobiuser = User::where('username', '=', 'mobiuser')\n ->select('id')\n ->first();\n\n $mobiuserMobiduls = DB::table('user2mobidul')\n ->where('userId', $mobiuser->id)\n ->select('mobidulId')\n ->get();\n\n $filteredNewestMobiduls = [];\n foreach ($newestMobiduls as $mobidul) {\n $mobidulId = $mobidul['id'];\n $foundMobidul = false;\n\n foreach ($mobiuserMobiduls as $muMobidul) {\n if ( $mobidulId === $muMobidul->mobidulId ) {\n $foundMobidul = true;\n break;\n }\n }\n\n if ( ! $foundMobidul ) {\n $filteredNewestMobiduls[] = $mobidul;\n }\n }\n\n return $filteredNewestMobiduls;\n }", "public function GetAllMembers()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembers();\n }", "function get_all_teammember()\n {\n $this->db->order_by('TeamMemberId', 'desc');\n return $this->db->get('TeamMember')->result_array();\n }", "function getMembers($type, $num) {\r\n\t\tin_array($type, array(\r\n\t\t\t'new',\r\n\t\t\t'old'\r\n\t\t)) || $type = 'new';\r\n\t\t$num = intval($num) ? intval($num) : $this->cachenum;\r\n\t\t$order = $type == 'new' ? 'DESC' : '';\r\n\t\t$sql = \"SELECT uid,username FROM pw_members ORDER BY id $order\" . S::sqlLimit($num);\r\n\t\t$member = array();\r\n\t\t$query = $this->db->query($sql);\r\n\t\twhile ($rt = $this->db->fetch_array($query)) {\r\n\t\t\t$tem = array();\r\n\t\t\t$tem['url'] = USER_URL . $rt['uid'];\r\n\t\t\t$tem['title'] = $rt['username'];\r\n\t\t\t$tem['value'] = '';\r\n\t\t\t$tem['image'] = '';\r\n\t\t\t$tem['addition'] = $rt;\r\n\t\t\t$member[] = $tem;\r\n\t\t}\r\n\t\treturn $member;\r\n\t}", "public function get_members()\n\t{\n\t\treturn $this->members;\n\t}", "public function getMemberList()\n {\n $memberList = '';\n foreach($this->Residents as $resident) {\n $memberList .= (string)$resident->get('Rooms') . ', ';\n //$memberList .= (string)$resident . ', ';\n }\n $memberList = substr($memberList, 0,-2);\n\n return $memberList;\n }", "function Members_List_user_viewlast10($args)\n{\n // User functions of this type can be called by other modules. If this\n // happens then the calling module will be able to pass in arguments to\n // this function through the $args parameter. Hence we extract these\n // arguments *after* we have obtained any form-based input through\n // pnVarCleanFromInput().\n extract($args);\n\t\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n\t$pnRender =& new pnRender('Members_List');\n\n\t// set the cache id\n\t$pnRender->cache_id = pnUserLoggedIn();\n\n\t// check out if the contents are cached.\n\t// If this is the case, we do not need to make DB queries.\n\t// Note that we print out \"cached:\" in front of a chached output --\n\t// of course, this is here to illustrate caching and needs to be removed!\n\tif ($pnRender->is_cached('memberslist_user_viewlast10.htm')) {\n\t\treturn $pnRender->fetch('memberslist_user_viewlast10.htm');\n\t}\n\n // get last 10 user id's\n $users = pnModAPIFunc('Members_List',\n 'user',\n 'getall',\n array('sortby' => 'user_regdate',\n 'numitems' => 10,\n 'sortorder' => 'DESC'));\n\t\t\t\t\t\t\t\t \n // Is current user online\n\t$pnRender->assign('loggedin', pnUserLoggedIn());\n\n $pagedusers = array();\n foreach($users as $userid) {\n\n $user = pnUserGetVars($userid['uid']);\n $isonline = pnModAPIFunc('Members_List',\n 'user',\n 'isonline',\n array('userid' => $userid['uid']));\n\n // display online status\n if ($isonline){\n\t\t $user['onlinestatus'] = 1;\n } else {\n\t\t $user['onlinestatus'] = 0;\n }\n\n // display registration date\n $user['pn_user_regdate'] = ml_ftime(_DATEBRIEF, $user['pn_user_regdate']);\n\t\t\n $pagedusers[] = $user;\n }\n $pnRender->assign('users', $pagedusers);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('memberslist_user_viewlast10.htm');\n\n}", "public function get_all()\n {\n // Array untuk data member\n $member = array();\n // Siapkan SQL\n $sql = \"SELECT *\n FROM member\n ORDER BY id DESC\";\n // Query data member\n $res = mysqli_query($this->db, $sql);\n // Ambil data satu persatu\n while ($r = mysqli_fetch_assoc($res)) {\n $member[] = $r;\n }\n // Return data member\n return $member;\n }", "private function getLastNodes() {\n $last_five_nodes = array();\n if (\\Drupal::moduleHandler()->moduleExists('node')) {\n $result = db_select('node_field_data', 'n')\n ->fields('n', array('title', 'type', 'nid', 'created', 'langcode'))\n ->condition('n.created', REQUEST_TIME - 3600, '>')\n ->orderBy('n.created', 'DESC')\n ->range(0, 15)\n ->execute();\n\n $count = 0;\n foreach ($result as $record) {\n $last_five_nodes[$count]['url'] = \\Drupal::service('path.alias_manager')\n ->getAliasByPath('/node/' . $record->nid, $record->langcode);\n $last_five_nodes[$count]['title'] = $record->title;\n $last_five_nodes[$count]['type'] = $record->type;\n $last_five_nodes[$count]['created'] = $record->created;\n $count++;\n }\n }\n\n return $last_five_nodes;\n }", "public function getPopularCourses()\n {\n\n // SAME HERE ---- TRYING TO GET ANYTHING TEACHER-RELATED BECAUSE THERE ARE VERY FEW INSTRUCTORS BUT LOOKS BETTER IF SHOWING MORE ON DASHBOARD\n\n $instructors = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n $editTeachers = Role::where('shortname', 'editingteacher')->first()->users()->take(4)->get();\n $courseCreators = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n\n $t = $this->coursesForRecents($instructors);\n $et = $this->coursesForRecents($editTeachers);\n $cr = $this->coursesForRecents($courseCreators);\n\n return collect(array_merge($t->toArray(), $et->toArray(), $cr->toArray()))->sortBy('timecreated')->take(5);\n }", "function getMembers()\n {\n // define the query\n $sql = \"SELECT * FROM member ORDER BY lname, fname\";\n\n // prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n // no params to bind\n\n // execute the statement\n $statement->execute();\n\n // get the result\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function getMemberNames()\n {\n $arrMembers = array();\n\n $objMembers = $this->Database\n ->execute(\"SELECT id, username, firstname, lastname\n\t\t\t FROM tl_member\n\t\t\t WHERE login = 1\"\n );\n\n while ($objMembers->next()) {\n $varId = $objMembers->id;\n $varName = $objMembers->firstname . ' ' . $objMembers->lastname;\n\n $arrMembers[$varId] = $varName;\n }\n\n return $arrMembers;\n }", "public function getByMostRecent()\n\t{\n\t\t$sql = \"SELECT * FROM \".TABLE_PREFIX.\"courses \n\t\t WHERE access='public'\n\t\t ORDER BY modified_date DESC, created_date DESC\";\n\t\treturn $this->execute($sql);\n\t}", "function getMembers()\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT * FROM Members ORDER BY lname\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //4.Execute statement\r\n $statement->execute();\r\n\r\n //5. Return the results\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n }", "public function getLastCountsList(){\n return $this->_get(8);\n }", "public function get_members()\n {\n return $this->connection->query_select_value('users', 'COUNT(*)') - 1;\n }", "function cns_cache_member_details($members)\n{\n require_code('cns_members');\n\n $member_or_list = '';\n foreach ($members as $member) {\n if ($member_or_list != '') {\n $member_or_list .= ' OR ';\n }\n $member_or_list .= 'm.id=' . strval($member);\n }\n if ($member_or_list != '') {\n global $TABLE_LANG_FIELDS_CACHE;\n $member_rows = $GLOBALS['FORUM_DB']->query('SELECT m.*,f.* FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_members m LEFT JOIN ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_member_custom_fields f ON f.mf_member_id=m.id WHERE ' . $member_or_list, null, null, false, true);\n global $TABLE_LANG_FIELDS_CACHE;\n $member_rows_g = $GLOBALS['FORUM_DB']->query('SELECT gm_group_id,gm_member_id FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_group_members WHERE gm_validated=1 AND (' . str_replace('m.id', 'gm_member_id', $member_or_list) . ')', null, null, false, true);\n global $MEMBER_CACHE_FIELD_MAPPINGS, $SIGNATURES_CACHE;\n $found_groups = array();\n foreach ($member_rows as $row) {\n $GLOBALS['CNS_DRIVER']->MEMBER_ROWS_CACHED[$row['id']] = $row;\n\n if (!cns_is_ldap_member($row['id'])) {\n // Primary\n $pg = $GLOBALS['CNS_DRIVER']->get_member_row_field($row['id'], 'm_primary_group');\n $found_groups[$pg] = true;\n }\n\n // Signature\n if ((get_page_name() != 'search') && (!is_null($row['m_signature'])) && ($row['m_signature'] !== '') && ($row['m_signature'] !== 0)) {\n $just_row = db_map_restrict($row, array('id', 'm_signature'));\n $SIGNATURES_CACHE[$row['id']] = get_translated_tempcode('f_members', $just_row, 'm_signature', $GLOBALS['FORUM_DB']);\n }\n\n $MEMBER_CACHE_FIELD_MAPPINGS[$row['mf_member_id']] = $row;\n }\n foreach ($member_rows_g as $row) {\n if (!cns_is_ldap_member($row['gm_member_id'])) {\n $found_groups[$row['gm_group_id']] = true;\n }\n }\n\n require_code('cns_groups');\n cns_ensure_groups_cached(array_keys($found_groups));\n }\n}", "public function latest();", "function get_memberlist($order = ID, $pagenum = 1, $usercount = 10) {\r\n\tglobal $bbdb, $bb;\r\n\tif ( isset($_GET['page']) )\r\n\t\t$page = ($_GET['page'] - 1) * $usercount;\r\n\telse\r\n\t\t$page = ($pagenum - 1) * $usercount;\r\n\tif ( $bb->wp_table_prefix ) {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM \".$bb->wp_table_prefix.\"posts RIGHT JOIN \".$bb->wp_table_prefix.\"users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM \".$bb->wp_table_prefix.\"users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t} else {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM $bbdb->posts RIGHT JOIN $bbdb->users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t}\r\n\treturn $result;\r\n}", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "final public function getParticipants() {\n\n\t\t// all events\n\t\t$search = new MetaSearch($config);\n\t\t$search->setWebNameFilter('Main');\n\t\t$search->setFormNameFilter('EventForm');\n\t\t$search->executeQuery();\n\n\t\t$this->config->pushStrictMode(false);\n\t\tforeach($search->getResults() as $eventTopicName) {\n\t\t\t$topic = $this->topicFactory->loadTopicByName($eventTopicName);\n\t\t\t$event = new CiantEvent($topic);\n\n\t\t\t$collaborators = $event->getCollaborators();\n\t\t}\n\t\t$this->config->popStrictMode();\n\n//\t\t$list = array();\n//\t\tforeach($search->getResults() as $topicName) {\n//\t\t\t$topic = $db->loadTopicByName($topicName);\n//\t\t\t$event = new CiantEvent($topic);\n//\t\t\t$collab = $event->getCollaborators();\n//\t\t\tforeach($collab as $user) {\n//\t\t\t\tif($user instanceof CiantUser) {\n//\t\t\t\t\t$list[spl_object_hash($user)] = $user;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\tforeach($list as $idx => $user) {\n//\t\t\tassert($user instanceof CiantUser);\n//\t\t\techo $user->getName().\", \";\n//\t\t}\n\t}", "function getMemberListAdmin() {\n $sql = \"SELECT d.*\n FROM admin_building a,\n condo_building b,\n member_condo c,\n member d \n WHERE a.admin_id=? AND a.building_id = b.building_id AND b.condo_id= c.condo_id AND c.member_id = d.id AND b.building_id=? ORDER BY d.id ASC\";\n \n return getAll($sql, [getLogin()['uid'], getLogin()['bid']]);\n}", "public function index()\n {\n return MembersResource::collection(Member::latest()->get());\n }", "function get_all()\n\t\t\t{\n\t\t\t\treturn $this->db->order_by('registerDate DESC')->get('cabal_hackuser_list');\n\t\t\t}", "function getLittles() {\n $members = Member::getMembersFromQuery(sprintf(\"SELECT * FROM `users` WHERE `big`= %d ORDER BY `pi` DESC;\"),$this->id);\n }", "public function getPersonsList($hint, $uacc_uid=''){\r\n\t\t//format datetime into \"time ago\"\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select('people_id,first_name,last_name,company_id')->like(\"first_name\", $hint)->or_like(\"last_name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0))->order_by(\"company_id\", \"desc\")->get(\"sc_people\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"people_id,first_name,last_name,company_id\")->like(\"first_name\", $hint)->or_like(\"last_name\", $hint)->where(\"deleted\",0)->order_by(\"company_id\", \"desc\")->get(\"sc_people\");\r\n\r\n\t\t$this->load->model(\"general\");\r\n\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\t\t\t\t$company_name = $this->general->getAccountName($row->company_id);\r\n\t\t\t\tif($company_name != \"\" && $company_name != \" - \")\r\n\t\t\t\t\t$list[] = array(\"name\"=>$row->first_name . \" \" . $row->last_name . \" (\" . $company_name . \")\", \"label\"=>$row->first_name . \" \" . $row->last_name . \" (\" . $company_name . \")\", \"id\"=>$row->people_id);\r\n\t\t\t\telse\r\n\t\t\t\t\t$list[] = array(\"name\"=>$row->first_name . \" \" . $row->last_name, \"label\"=>$row->first_name . \" \" . $row->last_name, \"id\"=>$row->people_id);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "function retrieve_top_profile_visitors(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_top_profile_visitors($this->promoter->pt_id);\n\t\t\n\t}", "public function getPopularInstructors()\n {\n\n // TRYING TO GET ANYTHING TEACHER-RELATED BECAUSE THERE ARE VERY FEW INSTRUCTORS BUT LOOKS BETTER IF SHOWING MORE ON DASHBOARD\n $teachers = Role::where('shortname', 'teacher')->first()->users()->take(5)->get();\n $editTeachers = Role::where('shortname', 'editingteacher')->first()->users()->take(5)->get();\n\n\n $t = $this->getInstructorsForRecents($teachers);\n $et = $this->getInstructorsForRecents($editTeachers);\n\n return collect(array_merge($t->toArray(), $et->toArray()))->sortBy('lastaccess')->take(5);\n\n\n }", "function hpm_last_mutation_ids() {\n global $wpdb;\n $table = $wpdb->prefix . 'hpm_persons';\n $results = $wpdb->get_results( \"SELECT id, last_mutation_id FROM $table WHERE role != 'client';\" );\n $arr = [];\n foreach ($results as $result) {\n $arr[$result->id] = $result->last_mutation_id;\n }\n return (object) $arr;\n}", "public function getRecent(): CompanyCollection\n {\n return $this->recent;\n }", "public function last3Registers(){\n $mysql= $this->database->databaseConnect();\n $sql = 'SELECT * FROM (\n SELECT * FROM client ORDER BY id DESC LIMIT 3\n ) as r ORDER BY name';\n $query = mysqli_query($mysql, $sql) or die(mysqli_connect_error());\n $this->database->databaseClose();\n\n while($row = mysqli_fetch_assoc($query)){\n $this->last_registers[] = $row;\n }\n\n return $this->last_registers;\n }", "public static function retrieveRecentNews() {\n return R::findAll( 'news' , ' ORDER BY date_added DESC LIMIT 10 ' );\n }", "function search_connected_users() {\n global $DB;\n $sql = \"SELECT CURRENT_TIMESTAMP() AS fecha, COUNT(*) AS usuarios_conectados FROM {user}\n WHERE lastaccess > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MINUTE));\";\n $connecteduser = $DB->get_records_sql($sql);\n foreach ($connecteduser as $connection) {\n $actualdate = new DateTime($connection->fecha);\n $timestamp = $actualdate->getTimestamp();\n $connection->fecha = $timestamp;\n }\n return $connecteduser;\n}", "public function getMembers() {\n return $this->parseData($this->sql['mem']);\n }", "public function OrganisationMembers() {\n\t\t$memberIDs = $this->RelatedMembers()\n\t\t\t->filter(['Type.Code' => ['MJO', 'MRO', 'MEM', 'MCO']])\n\t\t\t->column('FromModelID');\n\n\t\t$uniquemembers = Member::get()->filter(['ID' => $memberIDs])->distinct(true)->setQueriedColumns(array('ID'));\n\n\t\treturn $uniquemembers;\n\t}", "public function members_list() {\n\t\tif (!in_array($this->type, $this->membership_types)) {\n\t\t\tredirect(base_url('members/list/active'));\n\t\t}\n\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\t\t$data['user_mode'] = $this->session->userdata('mode');\n\t\t$data['members'] = $this->get_members($this->type);\n\t\t$data['api_ver_url'] = FINGERPRINT_API_URL . \"?action=verification&member_id=\";\n\t\t$data['total_count'] = count($this->get_members($this->type));\n\n\t\t$this->breadcrumbs->set([ucfirst($data['type']) => 'members/list/' . $data['type']]);\n\n\t\tif ($this->type === 'guest') {\n\t\t\t$data['guests'] = $this->get_guests();\n\t\t}\n\n\t\t$this->render('list', $data);\n\t}", "function getAllMembers() {\r\n $api = new wlmapiclass($api_adres, $api_m);\r\n $api->return_format = 'php'; // <- value can also be xml or json\r\n\r\n $data = array();\r\n// $data['user_login'] = $name;\r\n// $data['user_email'] = $email;\r\n// // $data['custom_exp_date']=$expDate;\r\n $response = $api->get('/members');\r\n $response = unserialize($response);\r\n\r\n // $response = $api->post('/levels',$data)\r\n\r\n if (secssesResponce($response)) {\r\n\r\n $mem = $response['members']['member']; //hold array of all members \r\n\r\n return($mem);\r\n }\r\n}", "public function actionNewmembers()\n\t{\t\t\n\t\t$this->layout='front_layout';\n\t\tYii::app()->clientScript->registerCoreScript('jquery');\n\t\t$allusersphotos = array();\n\t\t$criteria = new CDbCriteria();\n\t\t$country = Yii::app()->user->getState('usercountry');\t\t\n\t\t$criteria->group = 'user.user_id';\t\t\t\n\t\tif(!empty($country)){\n\t\t\t//Show Only User's Country\n\t\t\t$criteria->condition = \"userLocation.user_location_country='$country' AND userDetails.user_unique_url<>'poslyadmin'\";\t\t\t\n\t\t\t$criteria->order = 'userDetails.user_details_created_date DESC';\n\t\t\t$criteria->limit=$this->cartlimit;\n\t\t\t$allusersphotos=Photos::model()->with('user', 'user.userDetails','user.userLocation')->findAll($criteria);\n\t\t} else{\n\t\t\t$criteria->condition = 'exists(select * from photos where user_id=t.user_id) AND userDetails.user_unique_url<>\"poslyadmin\"';\n\t\t\t$criteria->order = 'userDetails.user_details_created_date DESC';\n\t\t\t$criteria->limit=$this->cartlimit;\n\t\t\t$allusersphotos=Photos::model()->with('user', 'user.userDetails')->findAll($criteria);\t\t\t\t\n\t\t}\t\t\t\t\n\t\tunset($criteria);\t\t\t\t\n\t\t//Get Hash Tags Listings for sidebar, this action define in Controller class\n\t\t$limit = (Yii::app()->user->isGuest)?9:6; //HashTag Limit\t\n\t\t$hash_tags = $this->actionHashtaglist($limit);\t\t\n\t\t$this->render('index', array('photos'=>$allusersphotos,'hash_tags'=>$hash_tags,'menulink'=>'newmember'));\t\t\n\t\n\t}", "public function recentVisits_get()\n {\n $em = $this->doctrine->em;\n $morevisitsRepo = $em->getRepository('Entities\\Service');\n $morevisits = $morevisitsRepo->findBy(array(), array('visit_at' => 'DESC'), 4);\n\n foreach ($morevisits as $service) {\n $service->loadRelatedData(null, null, site_url());\n }\n\n if ($morevisits) {\n $response[\"desc\"] = \"Servicios mas visitados\";\n $response[\"count\"] = count($morevisits);\n $response[\"data\"] = $morevisits;\n } else {\n $response[\"desc\"] = 'No existen servicios mas visitados';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }", "function new_since_last_visit() {\n $this->skip_layout = $this->request->isAsyncCall();\n\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n\n list($objects, $pagination) = ProjectObjects::paginateNew($this->logged_user, $page, 10);\n\n $this->smarty->assign(array(\n 'objects' => $objects,\n 'pagination' => $pagination,\n ));\n }", "public function getMembersTagsList()\r\n {\r\n \t$tmpUser = new Warecorp_User();\r\n \t$EntityTypeId = $tmpUser->EntityTypeId;\r\n \t$EntityTypeName = $tmpUser->EntityTypeName;\r\n \tunset($tmpUser);\r\n\r\n \t$group = Warecorp_Group_Factory::loadById($this->getGroupId());\r\n \t$members = $group->getMembers()->setAssocValue('zua.id')->returnAsAssoc()->getList();\r\n\r\n $query = $this->_db->select();\r\n if ( $this->isAsAssoc() ) {\r\n $fields = array();\r\n $fields[] = ( $this->getAssocKey() === null ) ? 'ztd.id' : $this->getAssocKey();\r\n $fields[] = ( $this->getAssocValue() === null ) ? 'ztd.name' : $this->getAssocValue();\r\n $query->from(array('ztr' => 'zanby_tags__relations'), $fields);\r\n } else {\r\n $query->from(array('ztr' => 'zanby_tags__relations'), new Zend_Db_Expr('DISTINCT ztd.id'));\r\n }\r\n $query->joininner(array('ztd' => 'zanby_tags__dictionary'), 'ztr.tag_id = ztd.id');\r\n\r\n if ( $this->getWhere() ) $query->where($this->getWhere());\r\n $query->where('entity_type_id = ?', $EntityTypeId);\r\n $query->where('entity_id IN (?)', $members);\r\n $query->where('ztr.status IN (?)', $this->getTagStatus());\r\n\r\n if ( $this->getCurrentPage() !== null && $this->getListSize() !== null ) {\r\n $query->limitPage($this->getCurrentPage(), $this->getListSize());\r\n }\r\n if ( $this->getOrder() !== null ) $query->order($this->getOrder());\r\n else $query->order('ztd.name');\r\n\r\n\t\t$items = $this->getTagListFromSQL($query, false);\r\n return $items;\r\n }", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "function getMembers()\r\n {\r\n $sql = \"SELECT * FROM member\r\n ORDER BY lname, fname ASC\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //3. Bind the parameter\r\n\r\n //4. Execute the statement\r\n $statement->execute();\r\n\r\n //5. Get the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "function retrieve_recent_profile_views(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_recent_profile_views($this->promoter->pt_id);\n\t\t\n\t}", "public function getMemberList() {\n\t\tif ( !is_object($this->memberList) ) {\n\t\t\t$this->memberList = t3lib_div::makeInstance('tx_passwordmgr_model_groupMemberList');\n\t\t\t$this->memberList->init($this['uid']);\n\t\t}\n\t\treturn($this->memberList);\n\t}", "protected function getUpdatedFollowers() {\n $followersSavedTimestamp = Setting::get('followers_updated', 0);\n \n if ($followersSavedTimestamp && time() - $followersSavedTimestamp > $this->cacheExpire * 60) {\n $latestFollowers = $this->loadFollowersFromRemote();\n $this->saveProfiles($latestFollowers, static::PROFILE_TYPE_FOLLOWER);\n // Setting is a vendor package for storing variables.\n Setting::set('followers_updated', time());\n Setting::save();\n return $latestFollowers;\n }\n \n return array();\n }", "public function court_members()\n {\n\n $query = \"SELECT * FROM users join users_court on users.id = users_court.user_id WHERE users_court.court1_id = $this->thiscourt or users_court.court2_id = $this->thiscourt\";\n $cart_result = @mysqli_query($this->dbc, $query) or die(\"Couldn't ViewSql users lists:(\" . mysqli_error($this->dbc));\n $this->num_rows = mysqli_num_rows($cart_result);\n\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n $court_in_list .= $row['user_id'] . \", \";\n\n $this->userlist .= \"<li><a href='users-details.php?user_id=\" . $row['user_id'] . \"'> \" . openssl_decrypt(clean($row['firstname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) . \" \" .\n openssl_decrypt(clean($row['lastname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) .\n \" (\" .$row['status'] .\n \")</a></li>\";\n }\n\n $court_in_list = rtrim($court_in_list, \", \");\n $this->court_in = \"(\" . $court_in_list . \")\";\n\n }", "function getMostRecentCourses(){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT id, name, author, image FROM Course ORDER BY creationDate LIMIT 3\";\n\n\t\t$result = $conn->query($query);\n\n\t\treturn fetch_all($result);\n\t}", "public function NotificationRecipients() {\n\t\t$members = new ArrayList();\n\t\t$members->merge($this->NotifyMembers());\n\t\t/** @var \\Group $group */\n\t\tforeach ($this->NotifyGroups() as $group) {\n\t\t\t$members->merge($group->Members());\n\t\t}\n\t\t$members->removeDuplicates();\n\t\treturn $members;\n\t}", "function getChallRecent($challenge_id,$limit) {\n $PDO = &DB::$PDO;\n static $recent;\n $challenges = challenges(true);\n if (!$challenges[$challenge_id]) {\n return false;\n }\n if (!$recent[$challenge_id]) {\n $mem = new cache;\n $mem->key = \"Recent_$challenge_id\";\n if (!$data = $mem->get()) {\n $rec = $PDO->query(\"SELECT u.username, u.country, a.time, a.size, c.name, a.passed, a.executed \n FROM attempts a, users u, challenges c \n WHERE a.challenge_id = '$challenge_id' AND a.user_id = u.id AND c.id = a.challenge_id \n ORDER BY a.id DESC LIMIT 100\");\n while (list($username,$country,$time,$size,$challenge_name,$passed,$executed)=$rec->fetch()) {\n if ($executed == 0) {\n $passed = 'pending';\n } \n else {\n $passed = $passed ? 'valid' : 'invalid';\n }\n $list[] = array('username' => $username,\n 'country' => $country,\n 'challenge_name' => $challenge_name,\n 'challenge_id' => $challenge_id,\n 'result' => $passed,\n 'size' => $size,\n 'time' => $time);\n $mem->set(0,$list,MEMCACHE_COMPRESSED,1800);\n }\n } else {\n $list = $data;\n $recent[$challenge_id] = $list;\n }\n } else {\n $list = $recent[$challenge_id];\n }\n if(count($list) > 0) {\n $list = array_slice($list,0,$limit,true);\n } else {\n $list = array();\n }\n return $list;\n}", "function get_children_graduated_list()\r\n {\r\n $this->db->from($this->table);\r\n $this->db->where('graduated','1');\r\n $this->db->where('removed', '0');\r\n $this->db->order_by('lastname', 'asc');\r\n $query = $this->db->get();\r\n\r\n return $query->result();\r\n }", "private function contributors()\n {\n $contributors = array();\n \n if (isset($this->article->AuthorList->Author)) {\n foreach ($this->article->AuthorList->Author as $author) {\n if (isset($author->CollectiveName)) {\n $category = 5; // corporate author\n $name = (string)$author->CollectiveName;\n } else {\n $category = 1; //primary (human) author\n $lastname = (string)$author->LastName;\n if (isset($author->ForeName)) {\n $name = $lastname . ', ' . (string)$author->ForeName;\n } elseif (isset($author->FirstName)) {\n $name = $lastname . ', ' . (string)$author->FirstName;\n } elseif (isset($author->Initials)) {\n $name = $lastname . ', ' . (string)$author->Initials;\n }\n }\n $contributors[$category][] = array('name' => $name);\n }\n }\n \n return $contributors;\n }", "function mentor_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT u.id,u.firstname,u.lastname,u.email,u.city,u.picture,u.department FROM {user} u left join {user_info_data} ud on ud.userid=u.id \";\n\t$sql.=\"WHERE ud.data='mentor data' and ud.acceptterms=1 and u.deleted=0 $condition order by u.timemodified desc limit $start,$limit\";\n\t//echo $sql;die;\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $mentordata)\n\t\t{\n\t\t\t$user = new stdClass();\n\t\t\t$user->id = $mentordata->id;\n\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\" >'.$usrimg.'</a></div>'; \n\t\t\t$mentordata->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}", "public function getCachedContributionsAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':contributions', 10, function () {\n return $this->contributions()->latest()->get();\n });\n }", "private function getUsersMailist() {\n $param = array(\n 'where' => 'registered = 1'\n );\n\n $users = $this->mailist->gets($param);\n\n return $users;\n }", "function monitor_list_owners() {\n $query = \"select distinct(`wf_owner`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_owner'];\n }\n return $ret;\n }", "function get_subscriberList(){\n return selectQuery(TAB_SUBSCRIBERS, \"\", \"id DESC\");\n}", "public function listMembers() {\n\t\t/*\n\t\t\tActions should be added to the array like so:\n\t\t\t\t[actions] =>\n\t\t\t\t\t\t[n]\n\t\t\t\t\t\t\t[title] => action title\n\t\t\t\t\t\t\t[controller] => action controller\n\t\t\t\t\t\t\t[action] => action name\n\t\t\t\t\t\t\t[params] => array of params\n\t\t*/\n\t\t$this->__paginateMemberList($this->Member->getMemberSummaryAll(true));\n\t}", "public function participants()\n { \n // $date = explode(\" \", $this->created_at)[0];\n $date = $this->created_at;\n $matches = Match::whereDate('created_at', $date )\n ->where('location_id', $this->location_id)->get();\n $participants = collect([]);\n foreach ($matches as $m) {\n $participants->push($m->user);\n }\n return $participants;\n }" ]
[ "0.627372", "0.61850905", "0.6174401", "0.6114995", "0.6100552", "0.597774", "0.59293956", "0.5919237", "0.58966655", "0.5890074", "0.5864995", "0.5856403", "0.5777726", "0.5777397", "0.5717376", "0.57084703", "0.56799996", "0.56646717", "0.56153995", "0.5609165", "0.5596281", "0.55864877", "0.5570252", "0.55625904", "0.55567974", "0.54960907", "0.5484327", "0.5468498", "0.54673916", "0.5439153", "0.5416546", "0.5406125", "0.5404743", "0.53848296", "0.53814083", "0.5380944", "0.5375215", "0.53662896", "0.5362517", "0.5341938", "0.5336903", "0.5335617", "0.5333152", "0.5323283", "0.53205514", "0.5312429", "0.5305454", "0.5299651", "0.52858233", "0.5285145", "0.526921", "0.5264387", "0.5256169", "0.5256047", "0.5250771", "0.5249708", "0.52492833", "0.52365613", "0.5236451", "0.5230087", "0.52266103", "0.52245915", "0.5223561", "0.5212393", "0.52085733", "0.5205759", "0.52037895", "0.5203774", "0.5201966", "0.51978135", "0.51866484", "0.5179125", "0.51743406", "0.5162495", "0.5148434", "0.513139", "0.51202774", "0.5119321", "0.51093763", "0.5108025", "0.5105463", "0.51036686", "0.51036686", "0.50973505", "0.5096399", "0.5095848", "0.5094501", "0.5093372", "0.5093045", "0.50916225", "0.50908786", "0.50871706", "0.5086219", "0.5081503", "0.5080646", "0.507887", "0.5073225", "0.5067806", "0.5066726", "0.5061336" ]
0.63905877
0
Get current senators by state or current representatives by state and district
public function getCurrentMembersByStateOrStateAndDistrict(string $chamber, string $state, int $district = null) { $this->congressValidator->isValidChamber($chamber); $this->stateValidator->isValidStateAbbreviation($state); $uriStub = "members/{$chamber}/{$state}/"; if (! is_null($district)) { $uriStub .= "{$district}/"; } $uriStub .= 'current.json'; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function seniorContributors()\n {\n $query = \"SELECT identifier FROM \".$this->_name.\" WHERE status='Active' AND profile_type='senior'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n for($i=0; $i<count($result); $i++)\n {\n $result[$i]= $result[$i]['identifier'];\n }\n return $result;\n }\n else\n return \"NO\";\n }", "public static function getSeniorStaff(){\n $senior = YumUser::model()->findAll('id IN (1,8,11)');\n return CHtml::listData($senior, 'id', 'username');\n }", "public function getSeniorContributors()\n {\n $query=\"select identifier FROM \".$this->_name.\" WHERE profile_type ='senior' AND status = 'Active'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "public function talentOpportunities($state=null,$institution_type=null,$gender=null,$sport_type=null,$country = null)\n {\n $talent_management_level = Session::get(SiteSessions::USER_MANAGEMENT_LEVEL);\n $managers = null;\n\n switch($talent_management_level)\n {\n case SiteConstants::USER_TALENT_MANAGEMENT_LEVEL_STUDENT:\n\n //Management level and Gender requested by the user.\n $managerManagementLevel = null;\n\n //If Institution type is \"High School\"\n if($institution_type == 1)\n {\n $managerManagementLevel=SiteConstants::USER_MANAGER_MANAGEMENT_LEVEL_HIGH_SCHOOL;\n }\n //If Institution type is \"University\"\n else if($institution_type == 2)\n {\n $managerManagementLevel=SiteConstants::USER_MANAGER_MANAGEMENT_LEVEL_UNIVERSITY;\n }\n\n $managers = ManagersDatabase::managerType(SiteConstants::USER_MANAGER_COACH)\n ->managementLevel($managerManagementLevel)\n ->state($state)\n ->sportGender($gender)\n ->sport($sport_type)\n ->paginate(25);\n\n\n break;\n\n\n case SiteConstants::USER_TALENT_MANAGEMENT_LEVEL_ASPIRING_PRO:\n\n $managers = ManagersDatabase::country($country)\n ->sport($sport_type)\n ->sportGender($gender)\n ->whereIn('management_level',[SiteConstants::USER_MANAGER_MANAGEMENT_LEVEL_AMATEUR,SiteConstants::USER_MANAGER_MANAGEMENT_LEVEL_PRO,SiteConstants::USER_MANAGER_MANAGEMENT_LEVEL_SEMI_PRO])\n ->paginate(25);\n break;\n }\n\n\n $managers_already_contacted = DB::table(\"managers_contacted\")->where('user_id','=',Session::get(SiteSessions::USER_ID))->lists('manager_id');\n\n\n $userProfile=UserProfile::find(Session::get(SiteSessions::USER_ID));\n $userProfile->getMutatedData = false;\n $sport_gender = array_map('ucfirst',array_merge(['0'=>'-- Select Option --'],SportsRepository::getSportsGender()));\n $state = array_map('ucfirst',array_merge(['0' => \"-- Select State --\"],BasicSiteRepository::getAmericanState()));\n $institution_type = array_map('ucfirst',UserProfileRepository::getInstituteType());\n $country = array_map('ucfirst',BasicSiteRepository::getListOfCountries());\n\n\n return view('database.talent_database_search_result',compact('managers','managers_already_contacted','userProfile','sport_gender','state','institution_type','country'));\n }", "public function getDonors()\n {\n $group = Request::get('group');\n \t$city = Request::get('city');\n \t$state = Request::get('state');\n \t$conditions = [ 'is_donor' => '1' ];\n\n \tif(isset($group)) $conditions = array_add($conditions, 'group', $group);\n \tif(isset($city) ) $conditions = array_add($conditions, 'city', $city);\n \tif(isset($state) ) $conditions = array_add($conditions, 'state', $state);\n \treturn User::where($conditions)->get();\n }", "public function getOrgInfoList($state = null)\n {\n $this->db->select(\"toh_org_code,\n toh_org_desc,\n toh_address,\n toh_postcode,\n toh_city,\n toh_state,\n toh_country,\n toh_external_agency,\n toh_state||' - '||sm_state_desc toh_state_desc,\n toh_country||' - '||cm_country_desc toh_country_desc,\n sm_state_desc,\n cm_country_desc\");\n $this->db->from(\"ims_hris.training_organizer_head\");\n $this->db->join(\"ims_hris.state_main\", \"toh_state = sm_state_code\", \"LEFT\");\n $this->db->join(\"ims_hris.country_main\", \"toh_country = cm_country_code\", \"LEFT\");\n $this->db->where(\"COALESCE(toh_external_agency,'N') = 'Y'\");\n\n if(!empty($state)) \n {\n $this->db->where(\"toh_state\", $state);\n }\n\n $this->db->order_by(\"toh_state\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "public function index()\n {\n $user = SiwesCordinator::Where('institution_id',auth()->user()->institution[0]->id)->latest()->get();\n return $this->showAll(SiwesCordinatorResource::collection($user));\n }", "public static function getCurrentInternships($student_id){\n #1:\n $results = DB::table(\"internships\")\n ->join(\"users\",\"users.id\",\"=\",\"internships.framer\")\n ->join(\"managers\",\"managers.id\",\"=\",\"internships.company_framer\")\n ->join(\"companies\",\"managers.company\",\"=\",\"companies.id\")\n ->join(\"registrations\",\"registrations.id\",\"=\",\"internships.student\")\n ->join(\"users as students\",\"students.id\",\"=\",\"registrations.student\")\n ->where(\"students.id\",\"=\",$student_id)\n ->orderBy(\"id\", \"desc\")\n ->select(\"users.firstname\",\"users.lastname\",\"internships.start_date\",\"end_date\",\"managers.name\",\"internships.state\",\"internships.type\",\"companies.name as company_name\",\"internships.id\")\n ->get()->first();\n\n\n // $Intern = array();\n // foreach($results as $res){\n // $startYearIntern = explode(\"-\",$res->start_date)[0];\n // if($startYearIntern == Carbon::now()->year)\n // array_push($Intern,$res);\n // }\n // return $Intern;\n if($results != null) {\n $startYearIntern = explode(\"-\",$results->start_date)[0];\n if($startYearIntern == Carbon::now()->year){\n return array($results);\n }\n }\n return [];\n\n\n }", "public static function onlineStudent(){\n $students = Roll::join('admissions','admissions.id', '=' , 'rolls.student_id' )\n ->where(['username' => Session::get('studentSession')])->first();\n \n return $students;// we will join the student with admission okay to have all his/her data's\n }", "private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}", "public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }", "function get_all_data_active($institution_id){\n\t\t$sql = \"SELECT a.*, b.priviledge_name as akses FROM endusers as a\n\t\t\t\tLEFT JOIN priviledge_list as b \n\t\t\t\tON (a.pvg_id = b.id)\n\t\t\t\tWHERE a.status = 'A' AND user_group_id ='1'\n\t\t\t\tORDER BY id DESC\";\n\t\t$query = $this->db->query($sql)->result();\n\t\treturn $query;\n\t}", "public function get_authenty()\r\n {\r\n //right column defines how to treat each role for guessing the owner of the resource\r\n $roles=array(\r\n 'custodian' => 'owner',\r\n 'resourceProvider' => 'distributor',\r\n 'owner' => 'owner',\r\n 'user' => 'distributor',\r\n 'distributor' => 'distributor',\r\n 'originator' => 'owner',\r\n 'pointOfContact' => 'owner',\r\n 'principalInvestigator' => 'owner',\r\n 'processor' => 'owner',\r\n 'pubisher' => 'owner',\r\n 'author' => 'owner' \r\n );\r\n \r\n \r\n $countries=array();\r\n\r\n //check the ident_contact\r\n $contacts=$this->get_key_value('ident_contacts');\r\n \r\n if ($contacts)\r\n {\r\n foreach($contacts as $contact)\r\n {\r\n $role=NULL;\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n $meta_contacts=$this->get_key_value('metadata_contacts');\r\n \r\n if ($meta_contacts)\r\n {\r\n foreach($meta_contacts as $contact)\r\n {\r\n if (array_key_exists($contact['role'],$roles)){\r\n $role=$roles[$contact['role']];\r\n }\r\n \r\n if ($role=='owner' && isset($contact['org_name'])) {\r\n return $contact['org_name'];\r\n }\r\n }\r\n }\r\n \r\n return NULL;\r\n }", "public function getSchool();", "public function searchDistricts(string $districtName, string $stateName, int $pageIndex, int $pageSize): array;", "public static function get_facilities_which_are_online($county_id){\n$q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAll(\"SELECT facility_code, facility_name,f.district\nFROM facilities f, districts d\nWHERE f.district = d.id\nAND d.id =$county_id\nAND UNIX_TIMESTAMP( `date_of_activation` ) >0\nORDER BY `facility_name` ASC \");\nreturn $q;\t\n}", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT organiserID FROM tournamentOrganisers WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "public function getDistricts()\n\t{\t\n\t\t# get all the districts from the database\n\t\t$districts = App::make('Apiv1\\Repositories\\Districts\\DistrictsRepository')->getDistricts();\n\n\t\t# transform them and send them back. This process sets an 'isPromoted' flag against each\n\t\treturn App::make('Apiv1\\Transformers\\DistrictPreferenceTransformer')->transformCollection($districts->toArray(), $this->user);\n\t}", "public function studentSesisList($do_action, $id_county, $id_district)\n {\n//select name_district,id_district from iep_district where id_county='11'\n//select id_school,name_school from iep_school where id_district=.0014. and id_count='11'\n\n\n $db = Zend_Registry::get('db');\n\n if ($do_action == \"district\" && $id_county != \"\") {\n $select = $db->select()\n ->from( array('p' => 'iep_district') , array('p.name_district', 'p.id_district'))\n ->where('p.id_county = ?', $id_county)\n ->order('p.name_district asc');\n } else if ($do_action == \"school\" && $id_county != \"\" && $id_district != \"\"){\n $select = $db->select()\n ->from( array('p' => 'iep_school') , array('p.id_school', 'p.name_school'))\n ->where('p.id_district = ?', $id_district)\n ->where('p.id_county = ?', $id_county)\n ->order('p.name_school asc');\n } else {\n $select = $db->select()\n ->from( array('p' => 'iep_county') , array('p.id_county', 'p.name_county'))\n ->order('p.name_county asc');\n } \n\n $result = $db->fetchAll($select);\n\n return array($result);\n }", "public function nsdDgdpNsdTenders($date=null){\n\n $zone = \\Request::segment(3);\n $organization = \\Request::segment(4);\n $lastUpldatedDateTime = $date;\n\n $zoneInfo = Zone::where('alise','=',$zone)->first();\n $navalLocation = NsdName::where('alise','=',$organization)->orderBy('id')->first();\n\n \n $data['zone'] = $zone;\n $data['organization'] = $organization;\n $data['date'] = $date;\n\n $data['tenders'] = DB::table($zoneInfo->alise.'_tenders')\n // ->where('status_id','=',1)\n ->where('nsd_id','=',$navalLocation->id)\n ->where(function($query) use ($lastUpldatedDateTime){\n $query->whereDate('created_at','>',$lastUpldatedDateTime);\n $query->orWhereDate('updated_at', '>', $lastUpldatedDateTime);\n })->get();\n\n return $data;\n\n }", "public function getCoordinator() \n {\n $this->db->select(\"sm_staff_id, sm_staff_id ||' - '|| sm_staff_name as sm_staff_id_name\");\n $this->db->from('ims_hris.staff_main, ims_hris.staff_status');\n $this->db->where(\"sm_staff_status = ss_status_code\");\n $this->db->where(\"ss_status_sts = 'ACTIVE'\");\n $this->db->where(\"sm_staff_type = 'STAFF'\");\n $this->db->order_by('sm_staff_name');\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "public function get_students_list(){\n return $this->n->get_list_from_db();\n }", "function getCitiesBehalfState($stateId) {\n $myModel = new My_Model();\n $whereArray = [\n \"state_id\" => $stateId\n ];\n $result = $myModel->select('cities', \"*\", $whereArray);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"cities list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no city available\",\n \"data\" => \"null\"\n ];\n }\n }", "function getCustomerEngRegion($customer_id)\n {\n /* @changes: intersect of region\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $user=DB::query(\"SELECT r.region FROM \" . CFG::$tblPrefix . \"user AS r WHERE active='1' and r.id=%d\",$_SESSION['user_login']['id']);\n $cust=DB::query(\" SELECT c.region_id as cregion FROM \" . CFG::$tblPrefix . \"user_region AS c WHERE c.user_id=%d\",$customer_id);\n foreach($cust as $k=>$v){\n $abc.=$cust[$k]['cregion'].',';\n }\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region r WHERE status='1' and FIND_IN_SET( r.id, '$abc') order by name asc\");\n } else {\n \n \n// pre($abc);exit;\n $userexp= explode(',',$user[0]['region']);\n $custexp= explode(',',$abc);\n \n// pre($cust);exit;\n $result=array_intersect($userexp,$custexp);\n $resimp= implode(',', $result);\n// pre($cust);exit;\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r WHERE FIND_IN_SET( r.id, '$resimp')\"); \n }\n /*return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id); */\n \n }", "public function allDistrict(){\n $str = '';\n $this->CI->load->model('supervisor');\n $value = $this->CI->supervisor->getDistrict();\n foreach($value as $val):\n $str.=$val->districtId . ') '. $val->districtName.'<br>';\n endforeach;\n return $str;\n }", "public function nsdKhulnaNsdTenders($date=null){\n\n $zone = \\Request::segment(3);\n $organization = \\Request::segment(4);\n $lastUpldatedDateTime = $date;\n\n $zoneInfo = Zone::where('alise','=',$zone)->first();\n $navalLocation = NsdName::where('alise','=',$organization)->orderBy('id')->first();\n\n \n $data['zone'] = $zone;\n $data['organization'] = $organization;\n $data['date'] = $date;\n\n $data['tenders'] = DB::table($zoneInfo->alise.'_tenders')\n // ->where('status_id','=',1)\n ->where('nsd_id','=',$navalLocation->id)\n ->where(function($query) use ($lastUpldatedDateTime){\n $query->whereDate('created_at','>',$lastUpldatedDateTime);\n $query->orWhereDate('updated_at', '>', $lastUpldatedDateTime);\n })->get();\n\n return $data;\n\n }", "public function nsdDhakaNsdTenders($date=null){\n\n $zone = \\Request::segment(3);\n $organization = \\Request::segment(4);\n $lastUpldatedDateTime = $date;\n\n $zoneInfo = Zone::where('alise','=',$zone)->first();\n $navalLocation = NsdName::where('alise','=',$organization)->orderBy('id')->first();\n\n \n $data['zone'] = $zone;\n $data['organization'] = $organization;\n $data['date'] = $date;\n\n $data['tenders'] = DB::table($zoneInfo->alise.'_tenders')\n // ->where('status_id','=',1)\n ->where('nsd_id','=',$navalLocation->id)\n ->where(function($query) use ($lastUpldatedDateTime){\n $query->whereDate('created_at','>',$lastUpldatedDateTime);\n $query->orWhereDate('updated_at', '>', $lastUpldatedDateTime);\n })->get();\n\n return $data;\n\n }", "public function get_session_wise_student() {\n\t\t$checker = array(\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\treturn $this->db->get_where('enrols', $checker);\n\t}", "function get_user_state_cities($state_id){\n\t\t$this->db->select('name,id');\n\t $this->db->where('state_id',$state_id);\n\t $result = $this->db->get('cities');\n\t \n\t\tif ($result->num_rows()>0) {\n\t return $result->result_array();\n\t } else {\n\t return false;\n\t } \n\t}", "function viewStudentAdvisor( $sessionID, $studentID ) {\r\n\t\tif( $this->userCanViewStudent( $sessionID )) {\r\n\t\t\t$query = \"SELECT ADVISOR FROM X_PNSY_STUDENT WHERE ID = '$studentID'\";\r\n\t\t\t$result = mysql_fetch_assoc(mysql_query($query));\r\n\t\t\textract($result);\r\n\t\t\r\n\t\t\t$query = \"SELECT FIRST_NAME, LAST_NAME, WOOSTER_EMAIL FROM X_PNSY_FACULTY WHERE ID = '$ADVISOR'\";\r\n\t\t\t$result = mysql_fetch_assoc(mysql_query($query));\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t}", "public function show()\n\t{\n\t\ttry {\n\n\t\t$state_id = Input::get('state_id');\n\t\t$township_id = Input::get('township_id');\n\t\t$academic_year = Input::get('academic_year');\n\t\t\t\n\t\tif(isset($township_id)) {\n\n\t\t\t$q = \"SELECT *\";\n\t\t\n\t\t} else {\n\t\t\n\t\t\t$q = \"SELECT state_id,state_division\";\n\t\t\n\t\t}\n\n\t\t$q .= \" FROM v_state_township WHERE state_id = \".$state_id.\" AND (township_id = '\".$township_id.\"' OR '' = '\".$township_id.\"') GROUP BY state_id\";\n\n\t\t$region = DB::select(DB::raw($q));\n\n\t\t$dtSchool=DB::select(\"SELECT SUM(student_intake.total_boy)+SUM(student_intake.total_girl) AS total_students,student_intake.grade,v_school.school_no,v_school.school_name,v_school.location,v_school.school_level,teacher_count.primary_no,teacher_count.jat_no,teacher_count.sat_no,teacher_count.head_no,teacher_count.office_staff_no FROM v_school LEFT JOIN student_intake ON v_school.school_id=student_intake.school_id and v_school.school_year=student_intake.school_year LEFT JOIN teacher_count ON v_school.school_id=teacher_count.school_id AND v_school.school_year=teacher_count.school_year WHERE (v_school.state_divsion_id = '\".$state_id.\"' OR ''='\".$state_id.\"') AND (v_school.township_id ='\".$township_id.\"' OR ''='\".$township_id.\"') AND (student_intake.school_year='\".$academic_year.\"' OR ''='\".$academic_year.\"') GROUP BY v_school.school_no,student_intake.grade \");\n\n\t\t\tfor($i = 0; $i < count($dtSchool); $i++) {\n\n\t\t\tif($dtSchool[$i]->location == \"Rural\") {\n\t\t\t\t$rural_level[] = $dtSchool[$i]->school_level;\n\t\t\t}\n\n\t\t\tif($dtSchool[$i]->location == \"Urban\") {\n\t\t\t\t$urban_level[] = $dtSchool[$i]->school_level;\n\t\t\t}\n\n\t\t}\n\t\t$rural_levels = array_values(array_unique($rural_level));\n\t\t$urban_levels = array_values(array_unique($urban_level));\n\t\tfor($row=0;$row<count($rural_levels);$row++){\n\t\t\t///rural\n\t\t\t$pri_count=0;$mid_count=0;$high_count=0;$pri_count25=0;$mid_count25=0;$high_count25=0;$pri_count30=0;$mid_count30=0;$high_count30=0;$pri_count35=0;$mid_count35=0;$high_count35=0; $pri_count40=0;$mid_count40=0;$high_count40=0;$pri_count45=0;$mid_count45=0;$high_count45=0;$pri_count50=0;$mid_count50=0;$high_count50=0;$pri_count60=0;$mid_count60=0;$high_count60=0;\n\t\t\t///urban\n\n\t\t\tfor($a=0;$a<count($dtSchool);$a++)\n\t\t\t{\n\t\t\t\tif($dtSchool[$a]->school_level == $rural_levels[$row] && $dtSchool[$a]->location==\"Rural\") \n\t\t\t\t{\n\t\t\t\t\t $j=$a;$total5=\"\";$total9=\"\";$total11=\"\";$pri_ratio=\"\";$mid_ratio=\"\";$high_ratio=\"\";\n\n\t\t\t\t\t\t$school_location=$dtSchool[$a]->location;\n\t\t\t\t\t\t$school_level=$dtSchool[$a]->school_level;\n\n\t\t\t\t\t\t$g1=\"\";$g2=\"\";$g3=\"\";$g4=\"\";$g5=\"\";\n\t\t\t\t\t\t\tif($dtSchool[$a]->grade=='01') {\n\t\t\t\t\t\t\t\t$g1=$dtSchool[$a]->total_students;\n\t\t\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='02') {\n\t\t\t\t\t\t$g2=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='03') {\n\t\t\t\t\t\t$g3=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='04') {\n\t\t\t\t\t\t$g4=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($dtSchool[$a]->grade=='05') {\n\t\t\t\t\t\t$g5=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$total5=$g1+$g2+$g3+$g4+$g5;\n\n\t\t\t\tif ($dtSchool[$j]->primary_no!=0 && $dtSchool[$j]->primary_no!='' && $total5!=0) \n\t\t\t\t{\n\t\t\t\t\t$pri_ratio=$total5/$dtSchool[$j]->primary_no+$dtSchool[$j]->head_no;\n\t\t\t\t\t$pri_ratio;\n\t\t\t\t}\n\t\t\t\t$g6=\"\";$g7=\"\";$g8=\"\";$g9=\"\";\n\t\t\t\t\tif($dtSchool[$a]->grade=='06') {\n\t\t\t\t\t\t$g6=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='07') {\n\t\t\t\t\t\t$g7=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='08') {\n\t\t\t\t\t\t$g8=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='09') {\n\t\t\t\t\t\t$g9=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t $total9=$g6+$g7+$g8+$g9;\n\t\t\t\tif ($dtSchool[$j]->jat_no!=0 && $dtSchool[$j]->jat_no!='' && $total9!=0) \n\t\t\t\t{\n\t\t\t\t\t$mid_ratio=$total9/$dtSchool[$j]->jat_no+$dtSchool[$j]->sat_no;\n\t\t\t\t\t$pri_mid=$pri_ratio+$mid_ratio;\n\t\t\t\t}\n\n\t\t\t\t$g10=\"\";$g11=\"\";\n\t\t\t\t\tif($dtSchool[$a]->grade=='10') {\n\t\t\t\t\t\t$g10=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$a]->grade=='11') {\n\t\t\t\t\t\t$g11=$dtSchool[$a]->total_students;\n\t\t\t\t\t\tif ($a!=count($dtSchool)-1 && $dtSchool[$a+1]->school_no==$dtSchool[$a]->school_no) {\n\t\t\t\t\t\t\t$a+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$total11=$g10+$g11;\n\t\t\t\t\tif ($dtSchool[$j]->sat_no!=0 && $dtSchool[$j]->sat_no!='' && $total11!=0) \n\t\t\t\t\t{\n\t\t\t\t\t\t$high_ratio=$total11/$dtSchool[$j]->sat_no+$dtSchool[$j]->sat_no;\n\t\t\t\t\t\t$pri_mid_high=$pri_ratio+$mid_ratio+$high_ratio;\n\t\t\t\t\t}\n\n\t\t\t\t\tif($pri_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count=$pri_count+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count=$mid_count+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count=$high_count+1;\n\t\t\t\t\t}\n\t\t\t\t\t///25\n\t\t\t\t\tif($pri_ratio>0 && $pri_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count25=$pri_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>0 && $mid_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count25=$mid_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>0 && $high_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count25=$high_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\t////30\n\t\t\t\t\tif($pri_ratio>25 && $pri_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count30=$pri_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>25 && $mid_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count30=$mid_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>25 && $high_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count30=$high_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\t////35\n\t\t\t\t\tif($pri_ratio>30 && $pri_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count35=$pri_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>30 && $mid_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count35=$mid_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>30 && $high_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count35=$high_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\t///40\n\t\t\t\t\tif($pri_ratio>35 && $pri_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count40=$pri_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>35 && $mid_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count40=$mid_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>35 && $high_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count40=$high_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\t///45\n\t\t\t\t\tif($pri_ratio>40 && $pri_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count45=$pri_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>40 && $mid_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count45=$mid_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>40 && $high_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count45=$high_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\t///50\n\t\t\t\t\tif($pri_ratio>45 && $pri_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count50=$pri_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>45 && $mid_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count50=$mid_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>45 && $high_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count50=$high_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\t////>50\n\t\t\t\t\tif($pri_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count60=$pri_count60+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count60=$mid_count60+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count60=$high_count60+1;\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t$arr_rural[]=array(\n\t\t\t\t\t'location' => 'Rural',\n\t\t\t\t\t'school_level' => $rural_levels[$row],\n\t\t\t\t\t'ratio0' => 'Ratio 0',\n\t\t\t\t\t'pri_count' => $pri_count,\n\t\t\t\t\t'mid_count' => $mid_count,\n\t\t\t\t\t'high_count' => $high_count,\n\t\t\t\t\t'ratio25' => 'Ratio Between 0 and 25',\n\t\t\t\t\t'pri_count25' => $pri_count25,\n\t\t\t\t\t'mid_count25' => $mid_count25,\n\t\t\t\t\t'high_count25' => $high_count25,\n\t\t\t\t\t'ratio30' => 'Ratio Between 25 and 30',\n\t\t\t\t\t'pri_count30' => $pri_count30,\n\t\t\t\t\t'mid_count30' => $mid_count30,\n\t\t\t\t\t'high_count30' => $high_count30,\n\t\t\t\t\t'ratio35' => 'Ratio Between 30 and 35',\n\t\t\t\t\t'pri_count35' => $pri_count35,\n\t\t\t\t\t'mid_count35' => $mid_count35,\n\t\t\t\t\t'high_count35' => $high_count35,\n\t\t\t\t\t'ratio40' => 'Ratio Between 35 and 40',\n\t\t\t\t\t'pri_count40' => $pri_count40,\n\t\t\t\t\t'mid_count40' => $mid_count40,\n\t\t\t\t\t'high_count40' => $high_count40,\n\t\t\t\t\t'ratio45' => 'Ratio Between 40 and 45',\n\t\t\t\t\t'pri_count45' => $pri_count45,\n\t\t\t\t\t'mid_count45' => $mid_count45,\n\t\t\t\t\t'high_count45' => $high_count45,\n\t\t\t\t\t'ratio50' => 'Ratio Between 45 and 50',\n\t\t\t\t\t'pri_count50' => $pri_count50,\n\t\t\t\t\t'mid_count50' => $mid_count50,\n\t\t\t\t\t'high_count50' => $high_count50,\n\t\t\t\t\t'ratio60' => 'Ratio > 50',\n\t\t\t\t\t'pri_count60' => $pri_count60,\n\t\t\t\t\t'mid_count60' => $mid_count60,\n\t\t\t\t\t'high_count60' => $high_count60\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}///end rural loop\n\n\t\t///start urban loop\n\t\tfor($u=0;$u<count($urban_levels);$u++){\n\t\t\t///rural\n\t\t\t$pri_count=0;$mid_count=0;$high_count=0;$pri_count25=0;$mid_count25=0;$high_count25=0;$pri_count30=0;$mid_count30=0;$high_count30=0;$pri_count35=0;$mid_count35=0;$high_count35=0; $pri_count40=0;$mid_count40=0;$high_count40=0;$pri_count45=0;$mid_count45=0;$high_count45=0;$pri_count50=0;$mid_count50=0;$high_count50=0;$pri_count60=0;$mid_count60=0;$high_count60=0;\n\n\n\t\t\tfor($su=0;$su<count($dtSchool);$su++)\n\t\t\t{\n\t\t\t\tif($dtSchool[$su]->school_level == $urban_levels[$u] && $dtSchool[$su]->location==\"Urban\") \n\t\t\t\t{\n\t\t\t\t\t $j=$su;$total5=\"\";$total9=\"\";$total11=\"\";$pri_ratio=\"\";$mid_ratio=\"\";$high_ratio=\"\";\n\n\t\t\t\t\t\t$school_location=$dtSchool[$su]->location;\n\t\t\t\t\t\t$school_level=$dtSchool[$su]->school_level;\n\n\t\t\t\t\t\t$g1=\"\";$g2=\"\";$g3=\"\";$g4=\"\";$g5=\"\";\n\t\t\t\t\t\t\tif($dtSchool[$su]->grade=='01') {\n\t\t\t\t\t\t\t\t$g1=$dtSchool[$su]->total_students;\n\t\t\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='02') {\n\t\t\t\t\t\t$g2=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='03') {\n\t\t\t\t\t\t$g3=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='04') {\n\t\t\t\t\t\t$g4=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($dtSchool[$su]->grade=='05') {\n\t\t\t\t\t\t$g5=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$total5=$g1+$g2+$g3+$g4+$g5;\n\n\t\t\t\tif ($dtSchool[$j]->primary_no!=0 && $dtSchool[$j]->primary_no!='' && $total5!=0) \n\t\t\t\t{\n\t\t\t\t\t$pri_ratio=$total5/$dtSchool[$j]->primary_no+$dtSchool[$j]->head_no;\n\t\t\t\t\t$pri_ratio;\n\t\t\t\t}\n\t\t\t\t$g6=\"\";$g7=\"\";$g8=\"\";$g9=\"\";\n\t\t\t\t\tif($dtSchool[$su]->grade=='06') {\n\t\t\t\t\t\t$g6=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='07') {\n\t\t\t\t\t\t$g7=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='08') {\n\t\t\t\t\t\t$g8=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='09') {\n\t\t\t\t\t\t$g9=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t $total9=$g6+$g7+$g8+$g9;\n\t\t\t\tif ($dtSchool[$j]->jat_no!=0 && $dtSchool[$j]->jat_no!='' && $total9!=0) \n\t\t\t\t{\n\t\t\t\t\t$mid_ratio=$total9/$dtSchool[$j]->jat_no+$dtSchool[$j]->sat_no;\n\t\t\t\t\t$pri_mid=$pri_ratio+$mid_ratio;\n\t\t\t\t}\n\n\t\t\t\t$g10=\"\";$g11=\"\";\n\t\t\t\t\tif($dtSchool[$su]->grade=='10') {\n\t\t\t\t\t\t$g10=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($dtSchool[$su]->grade=='11') {\n\t\t\t\t\t\t$g11=$dtSchool[$su]->total_students;\n\t\t\t\t\t\tif ($su!=count($dtSchool)-1 && $dtSchool[$su+1]->school_no==$dtSchool[$su]->school_no) {\n\t\t\t\t\t\t\t$su+=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$total11=$g10+$g11;\n\t\t\t\t\tif ($dtSchool[$j]->sat_no!=0 && $dtSchool[$j]->sat_no!='' && $total11!=0) \n\t\t\t\t\t{\n\t\t\t\t\t\t$high_ratio=$total11/$dtSchool[$j]->sat_no+$dtSchool[$j]->sat_no;\n\t\t\t\t\t\t$pri_mid_high=$pri_ratio+$mid_ratio+$high_ratio;\n\t\t\t\t\t}\n\n\t\t\t\t\tif($pri_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count=$pri_count+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count=$mid_count+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count=$high_count+1;\n\t\t\t\t\t}\n\t\t\t\t\t///25\n\t\t\t\t\tif($pri_ratio>0 && $pri_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count25=$pri_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>0 && $mid_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count25=$mid_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>0 && $high_ratio<25)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count25=$high_count25+1;\n\t\t\t\t\t}\n\t\t\t\t\t////30\n\t\t\t\t\tif($pri_ratio>25 && $pri_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count30=$pri_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>25 && $mid_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count30=$mid_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>25 && $high_ratio<30)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count30=$high_count30+1;\n\t\t\t\t\t}\n\t\t\t\t\t////35\n\t\t\t\t\tif($pri_ratio>30 && $pri_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count35=$pri_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>30 && $mid_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count35=$mid_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>30 && $high_ratio<35)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count35=$high_count35+1;\n\t\t\t\t\t}\n\t\t\t\t\t///40\n\t\t\t\t\tif($pri_ratio>35 && $pri_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count40=$pri_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>35 && $mid_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count40=$mid_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>35 && $high_ratio<40)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count40=$high_count40+1;\n\t\t\t\t\t}\n\t\t\t\t\t///45\n\t\t\t\t\tif($pri_ratio>40 && $pri_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count45=$pri_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>40 && $mid_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count45=$mid_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>40 && $high_ratio<45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count45=$high_count45+1;\n\t\t\t\t\t}\n\t\t\t\t\t///50\n\t\t\t\t\tif($pri_ratio>45 && $pri_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count50=$pri_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>45 && $mid_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count50=$mid_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>45 && $high_ratio<50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count50=$high_count50+1;\n\t\t\t\t\t}\n\t\t\t\t\t////>50\n\t\t\t\t\tif($pri_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$pri_count60=$pri_count60+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($mid_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mid_count60=$mid_count60+1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($high_ratio>50)\n\t\t\t\t\t{\n\t\t\t\t\t\t$high_count60=$high_count60+1;\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t$arr_urban[]=array(\n\t\t\t\t\t'location' => 'Urban',\n\t\t\t\t\t'school_level' => $urban_levels[$u],\n\t\t\t\t\t'ratio0' => 'Ratio 0',\n\t\t\t\t\t'pri_count' => $pri_count,\n\t\t\t\t\t'mid_count' => $mid_count,\n\t\t\t\t\t'high_count' => $high_count,\n\t\t\t\t\t'ratio25' => 'Ratio Between 0 and 25',\n\t\t\t\t\t'pri_count25' => $pri_count25,\n\t\t\t\t\t'mid_count25' => $mid_count25,\n\t\t\t\t\t'high_count25' => $high_count25,\n\t\t\t\t\t'ratio30' => 'Ratio Between 25 and 30',\n\t\t\t\t\t'pri_count30' => $pri_count30,\n\t\t\t\t\t'mid_count30' => $mid_count30,\n\t\t\t\t\t'high_count30' => $high_count30,\n\t\t\t\t\t'ratio35' => 'Ratio Between 30 and 35',\n\t\t\t\t\t'pri_count35' => $pri_count35,\n\t\t\t\t\t'mid_count35' => $mid_count35,\n\t\t\t\t\t'high_count35' => $high_count35,\n\t\t\t\t\t'ratio40' => 'Ratio Between 35 and 40',\n\t\t\t\t\t'pri_count40' => $pri_count40,\n\t\t\t\t\t'mid_count40' => $mid_count40,\n\t\t\t\t\t'high_count40' => $high_count40,\n\t\t\t\t\t'ratio45' => 'Ratio Between 40 and 45',\n\t\t\t\t\t'pri_count45' => $pri_count45,\n\t\t\t\t\t'mid_count45' => $mid_count45,\n\t\t\t\t\t'high_count45' => $high_count45,\n\t\t\t\t\t'ratio50' => 'Ratio Between 45 and 50',\n\t\t\t\t\t'pri_count50' => $pri_count50,\n\t\t\t\t\t'mid_count50' => $mid_count50,\n\t\t\t\t\t'high_count50' => $high_count50,\n\t\t\t\t\t'ratio60' => 'Ratio > 50',\n\t\t\t\t\t'pri_count60' => $pri_count60,\n\t\t\t\t\t'mid_count60' => $mid_count60,\n\t\t\t\t\t'high_count60' => $high_count60\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\t/// end urban loop\t\n\t\t\t$state_name=DB::select(DB::raw(\"SELECT state_division FROM state_division WHERE id=\".Input::get('state_id')));\n\n\t\t\tif($township_id){\n\t\t\t\t$township_name=DB::select(DB::raw(\"SELECT township_name FROM township WHERE id=\".Input::get('township_id')));\n\t\t\t}\n\n\t\t\t$request_input=array($state_name[0]->state_division,isset($township_name[0]->township_name)? $township_name[0]->township_name:'ALL',Input::get('academic_year'));\t\n\n\t\t\t//print_r($arr_rural);\n\t\t\tExcel::create('Pupil Teacher Ratio', function($excel) use($rural_levels,$urban_levels,$arr_urban,$arr_rural,$request_input) {\n\n\t\t\t$excel->sheet('PupilTeacherTownshipRatio', function($sheet) use($rural_levels,$urban_levels,$arr_rural,$arr_urban,$request_input){\n\n\t $sheet->prependRow(array('Township Education Management Information System'))->mergeCells('A1:D1',function($cells){\n\t \t\t\t\t$cells->setFontSize(18);\n\t \t\t\t\t$cells->setAlignment('center');\n\t \t\t\t\t$cells->setValignment('middle');\n\t \t\t\t});\n\t \t\t$sheet->appendRow(array('Pupil Teacher Ratio By Township Report'))->mergeCells('A2:D2',function($cells){\n\t \t\t\t\t\n\t \t\t\t\t$cells->setFontSize(18);\n\t \t\t\t\t$cells->setAlignment('center');\n\t \t\t\t\t $cells->setValignment('middle');\n\t \t\t\t});\n\t \t\t$sheet->appendRow(array('Division : '.$request_input[0]))->mergeCells('A3:D3',function($cells){\n\t \t\t\t\n\t \t\t\t\t$cells->setFontSize(18);\n\t \t\t\t\t$cells->setAlignment('left');\n\t \t\t\t\t $cells->setValignment('middle');\n\t \t\t});\n\t \t\t$sheet->appendRow(array('Township : '.$request_input[1]))->mergeCells('A4:D4',function($cell){\n\t \t\t\t\n\t \t\t\t\t$cell->setFontSize(11);\n\t \t\t\t\t$cell->setAlignment('right');\n\t \t\t\t\t$cell->setValignment('middle');\n\t \t\t});\n\t \t\t$sheet->appendRow(array('Academic Year :'.$request_input[2]))->mergeCells('A5:D5',function($cell){\n\t \t\t\t\n\t \t\t\t$cell->setFontSize(18);\n\t \t\t\t$cell->setAlignment('left');\n\t \t\t\t$cell->setValignment('middle');\n\t \t\t});\n\n\t \t\t\n\n\t///////////////// Start Rural\n\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->appendRow(array('Location : Rural'))->mergeCells('A'.$count.':D'.$count,function($cell){\n\t\t\t\t\t$cell->setFontWeight('bold');\n\t\t \t\t$cell->setFontSize(18);\n\t\t \t\t$cell->setAlignment('left');\n\t\t \t\t$cell->setValignment('middle');\n\t\t\t\t});\n\t\t\t\tfor($row=0;$row<count($rural_levels);$row++)\n\t\t\t\t{ \n\t\t\t\n\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->appendRow(array('School Level :'.$rural_levels[$row]))->mergeCells('A'.$count.':D'.$count,function($cell){\n\t\t\t\t\t$cell->setFontWeight('bold');\n\t\t \t\t$cell->setFontSize(18);\n\t\t \t\t$cell->setAlignment('left');\n\t\t \t\t$cell->setValignment('middle');\n\t\t\t\t});\n\n\t\t\t\t$sheet->appendRow(array('Ratio','Primary Ratio','Middle Ratio','High Ratio'));\n\n\t\t\t\tfor($i=0;$i<count($arr_rural);$i++)\n\t\t\t\t{\t\n\t\t\t\tif($arr_rural[$i]['school_level'] == $rural_levels[$row] && $arr_rural[$i]['location']==\"Rural\")\n\t\t\t\t{\n\t\t\t\t\t///ratio 0\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue('Ratio 0');\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 25\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count25']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 30\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count30']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 35\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count35']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 40\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count40']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 45\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count45']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 50\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count50']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 60\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['ratio60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_rural,$i){\n\t \t\t\t\t$cell->setValue($arr_rural[$i]['pri_count60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_rural,$i){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_rural[$i]['mid_count60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_rural,$i){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_rural[$i]['high_count60']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t\n\t\t\t\t}\n \t\t\t} \n\t\t\t\t\n\t\t}\t\t\n\n\t//////////////// End Rural\n\n\t/////////////// Start Urban\n\n\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->appendRow(array('Location : Urban'))->mergeCells('A'.$count.':D'.$count,function($cell){\n\t\t\t\t\t$cell->setFontWeight('bold');\n\t\t \t\t$cell->setFontSize(18);\n\t\t \t\t$cell->setAlignment('left');\n\t\t \t\t$cell->setValignment('middle');\n\t\t\t\t});\n\t\t\t\tfor($ur=0;$ur<count($urban_levels);$ur++)\n\t\t\t\t{ \n\t\t\t\n\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->appendRow(array('School Level :'.$urban_levels[$ur]))->mergeCells('A'.$count.':D'.$count,function($cell){\n\t\t\t\t\t$cell->setFontWeight('bold');\n\t\t \t\t$cell->setFontSize(18);\n\t\t \t\t$cell->setAlignment('left');\n\t\t \t\t$cell->setValignment('middle');\n\t\t\t\t});\n\n\t\t\t\t$sheet->appendRow(array('Ratio','Primary Ratio','Middle Ratio','High Ratio'));\n\n\t\t\t\tfor($au=0;$au<count($arr_urban);$au++)\n\t\t\t\t{\t\n\t\t\t\tif($arr_urban[$au]['school_level'] == $urban_levels[$ur] && $arr_urban[$au]['location']==\"Urban\")\n\t\t\t\t{\n\t\t\t\t\t///ratio 0\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue('Ratio 0');\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 25\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count25']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count25']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 30\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count30']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count30']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 35\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count35']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count35']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 40\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count40']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count40']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 45\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count45']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count45']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t///ratio 50\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count50']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count50']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t////ratio 60\n\t\t\t\t\t$count=$sheet->getHighestRow()+1;\n\t\t\t\t\t$sheet->cell('A'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['ratio60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('B'.$count,function($cell) use($arr_urban,$au){\n\t \t\t\t\t$cell->setValue($arr_urban[$au]['pri_count60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t \t$sheet->cell('C'.$count,function($cell) use($arr_urban,$au){\n\t\t\t \t\t\n\t\t \t\t\t\t$cell->setValue($arr_urban[$au]['mid_count60']);\n\t\t\t \t\t$cell->setFontSize(12);\n\t\t\t \t\t$cell->setAlignment('left');\n\t\t\t \t\t$cell->setValignment('middle');\n\t\t\t \t});\n\t\t\t\t\t$sheet->cell('D'.$count,function($cell) use($arr_urban,$au){\n\t\t\t\t\t\n\t\t\t \t\t$cell->setValue($arr_urban[$au]['high_count60']);\n\t\t\t\t\t $cell->setFontSize(12);\n\t\t\t\t\t $cell->setAlignment('left');\n\t\t\t\t\t $cell->setValignment('middle');\n\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t////////////// End Urban\n\t\t\t\t$sheet->setBorder('A1'.':D'.$sheet->getHighestRow(), 'thin');\t\t\n\t \t});\n\n\t\t\t})->download('xlsx');\n\t\t\t$err = \"There is no data.\";\n\t\t\tthrow new Exception($err);\n\t\t\t\n\t\t} catch (Exception $e) {\n\n\t\t\t$error = \"There is no data.\";\n\t\t\treturn view('teacher_report.teacher_ratio_township', compact('error'));\n\n\t\t}\n\t}", "public function getnurses(){\n\t\treturn new manytomany_link($this, 'staff', 'doctornurse', 'staff_id','nurse_id');\n\t}", "public function approvedStudentSearch(){\n\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$input = Request::all();\n\n\t\tif (!isset($input['term']) || empty($input['term'])) {\n\t\t\treturn json_encode($term);\n\t\t}\n\n\t\t$term = $input['term'];\n\n\t\tif (isset($data['agency_collection'])) {\n\n\t\t\t$rec = DB::connection('bk')->table('users as u')\n\t\t\t\t\t->join('agency_recruitment as r', 'r.user_id', '=', 'u.id')\n\t\t\t\t\t->where('r.status', 1)\n\t\t\t\t \t->where('r.agency_recruit', 1)\n\t\t\t\t \t->where('r.user_recruit', 1)\n\t\t\t\t \t->where('r.agency_id', $data['agency_collection']->agency_id)\n\t\t\t\t \t->select('u.id')\n\t\t\t\t ->where(DB::raw('CONCAT(fname, lname)'), 'LIKE', '%'.$term.'%' )\n\t\t\t\t \t->groupBy('u.id');\n\t\t}else{\n\t\t\t$rec = DB::connection('bk')->table('users as u')\n\t\t\t\t\t->join('recruitment as r', 'r.user_id', '=', 'u.id')\n\t\t\t\t\t->where('r.status', 1)\n\t\t\t\t \t->where('r.college_recruit', 1)\n\t\t\t\t \t->where('r.user_recruit', 1)\n\t\t\t\t \t->where('r.college_id', $data['org_school_id'])\n\t\t\t\t \t->select('u.id')\n\t\t\t\t ->where(DB::raw('CONCAT(fname, lname)'), 'LIKE', '%'.$term.'%' )\n\t\t\t\t \t->groupBy('u.id');\n\t\t}\n\t\t\n\t\t\n\t\tif (isset($input['user_ids']) && !empty($input['user_ids'])) {\n\t\t\t\n\t\t\t$user_ids = $input['user_ids'];\t\n\t\t\t$arr = array();\n\t\t\tforeach ($user_ids as $key => $value) {\n\t\t\t\t$arr[] = Crypt::decrypt($value);\n\t\t\t}\n\n\t\t\t$rec = $rec->whereNotIn('u.id', $arr);\n\t\t}\n\n\t\t$rec = $rec->get();\n\n\t\tif (empty($rec)) {\n\t\t\treturn json_encode($rec);\n\t\t}\n\n\t\t$rec_arr = array();\n\n\t\tforeach ($rec as $key) {\n\t\t\t$rec_arr[] = $key->id;\n\t\t}\n\t\t\n\t\t$rec_arr = implode(\",\", $rec_arr);\n\n\t\t$ret = array();\n\t\t\n\t\t$tmp = $this->getRecipientName($data, $rec_arr);\n\n\t\tforeach ($tmp as $key) {\n\t\t\t$arr = array();\n\t\t\t$arr['user_id'] =Crypt::encrypt($key['user_id']);\n\t\t\t$arr['fname'] = $key['fname'];\n\t\t\t$arr['lname'] = $key['lname'];\n\t\t\t$arr['json'] = json_encode($key);\n\t\t\t$arr['json'] = str_replace(\"'\", \"&lsquo;\", $key);\n\t\t\t$arr['json'] = json_encode($arr['json']);\n\n\t\t\t$ret[] = $arr;\n\t\t}\n\n\n\t\treturn $ret;\n\t}", "function getStatesOfCntry($country_id,$customer_id=null,$post_back_state_id=null){\t\r\n\t\t$this->db->select('id,title,is_default');\r\n\t\t$this->db->where(array('mst_countries_id'=>$country_id,'is_active'=>true));\r\n\t\t$this->db->order_by('title','asc');\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$states=$recordSet->result();\r\n\t\t\r\n\t/*\tif($customer_id!=''){\r\n\t\t\t$this->db->select('mst_states_id');\r\n\t\t\t$this->db->where(array('id'=>$customer_id));\r\n\t\t\t$recordSet = $this->db->get(TBL_CUSTOMERS);\r\n\t\t\t$data=$recordSet->result();\r\n\t\t\t$state_customer=$data[0]->mst_states_id;\r\n\t\t\tforeach($states as $row){\r\n\t\t\t\tif($state_customer==$row->id){\r\n\t\t\t\t\techo $xmlinner=\"<option value='$row->id' selected='selected'>$row->title</option>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}*/\r\n\t\techo $xmlinner=\"<option value=''>Please Select State</option>\";\r\n\t\tforeach($states as $row){\r\n\t\t\tif($row->id==$post_back_state_id){\r\n\t\t\t\t$selected='selected=selected';\r\n\t\t\t}else{\r\n\t\t\t\t$selected='';\r\n\t\t\t}\r\n\t\t\techo $xmlinner=\"<option value='$row->id' $selected>$row->title</option>\";\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "public function states()\n\t{\n\t\t$states = State::all();\n\t\treturn StudentResource::collection($states);\n\t}", "private function get_admins_info() {\n $stm=$this->uSup->get_com_admins_to_notify_about_requests(\"user_id\",$this->company_id);\n\n $q_user_id=\"(1=0 \";\n /** @noinspection PhpUndefinedMethodInspection */\n while($admin=$stm->fetch(PDO::FETCH_OBJ)) {\n $q_user_id.=\" OR u235_users.user_id='\".$admin->user_id.\"' \";\n }\n $q_user_id.=\")\";\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT DISTINCT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n \" .$q_user_id. \" AND \n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "public function getStudents($params = array())\n {\n $sql = 'select * from engine4_users where user_id in (\n SELECT item_id FROM `engine4_user_fields_values` where field_id=1 and value=4\n )';\n \n $table = Engine_Api::_()->getDbtable('users', 'user')->getAdapter();\n $select = $table->query($sql)->fetchAll(); \n\n return $select;\n }", "public function getUsersWithinTenant(){\n\n\t\t$userTypes = Input::get('userTypes');\n\n\t\t$collegeId = Input::get('collegeId');\n\n\t\t$collegeDeptId = Input::get('departmentId');\n\n\t\tif (Cache::has('college_users_managed_cache'))\n\t\t{\n\t\t\t$users = Cache::get('college_users_managed_cache');\n\n\t\t}else {\n\n\t\t\t$college = College::findorFail($collegeId);\n\n\t\t\t$users = DB::table('users')\n\t\t\t\t->join('colleges', 'users.collegeId', '=', 'colleges.collegeId')\n\t\t\t\t->join('collegedepartments', 'collegedepartments.collegeId', '=', 'colleges.collegeId')\n\t\t\t\t->join('permission_user','permission_user.userId', '=', 'users.userId')\n\t\t\t\t->join('permissions', 'permissions.permissionId', '=', 'permission_user.permissionId')\n\t\t\t\t->join('roles','users.roleId', '=', 'roles.roleId')\n\t\t\t\t->select('users.firstName', 'users.lastName', 'users.userId', 'users.roleId', 'users.avatarUrl'\n\t\t\t\t\t,'permissions.permissionName','permission_user.isEnabled')\n\t\t\t\t->whereIn('users.roleId', array($userTypes))\n\t\t\t\t->where('colleges.collegeId', $collegeId)\n\t\t\t\t->where('collegedepartments.collegeDeptId', $collegeDeptId)\n\t\t\t\t->distinct()\n\t\t\t\t->get();\n\t\t\tdd($users);\n\n\t\t\t$users = $college->users()->get(['users.firstName', 'users.lastName', 'users.userId', 'users.roleId', 'users.avatarUrl']);\n\n\t\t\tCache::add('college_users_managed_cache', $users, 60);\n\t\t}\n\t\treturn response()->json([\n\t\t\t'totalItems'=>$users->count(),\n\t\t\t'items' => $users,\n\t\t],\n\t\t\t200\n\t\t);\n\t}", "public function getUniversity();", "public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}", "function getCustomerRegion($customer_id)\n {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id);\n }", "function get_doctors(){\n\t$conn = connect();\n\t$sql = \"select u.person_id, first_name, last_name from persons p join users u on p.person_id=u.person_id where u.CLASS='d'\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$count = 0;\n\n\twhile($row = oci_fetch_assoc($statement)){\n\t\t$ret[$count] = $row;\n\t\t$count = $count + 1; \n\t}\n\toci_free_statement($statement);\n\toci_close($conn);\n\treturn $ret;\n}", "public function getSenalamientos()\n {\n return $this->senalamientos;\n }", "public function stateAndCity()\n {\n $state = DB::table('states')\n // ->where('country_id', 231)\n // ->where('country_id','232')\n // ->where('country_id','38')\n ->get();\n // $city = DB::table('cities')->get();\n return response()->json([\n 'message' => 'found!',\n 'state' => $state,\n // 'city' => $city,\n 'success' => true,\n ], 200);\n }", "function getStatesOfCntryAgent($country_id,$agent_id=null){\t\t\r\n\t\t$this->db->select('id,title');\r\n\t\t$this->db->where(array('mst_countries_id'=>$country_id));\r\n\t\t$this->db->order_by('title','asc');\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$states=$recordSet->result();\r\n\t\t\r\n\t\tif($agent_id!=''){\r\n\t\t\t$this->db->select('mst_states_id');\r\n\t\t\t$this->db->where(array('id'=>$agent_id));\r\n\t\t\t$recordSet = $this->db->get(TBL_AGENTS);\r\n\t\t\t$data=$recordSet->result();\r\n\t\t\t$state_agent=$data[0]->mst_states_id;\r\n\t\t\tforeach($states as $row){\r\n\t\t\t\tif($state_agent==$row->id){\r\n\t\t\t\t\techo $xmlinner=\"<option value='$row->id' selected='selected'>$row->title</option>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $xmlinner=\"<option value=''>Please Select State</option>\";\r\n\t\tforeach($states as $row){\r\n\t\t\techo $xmlinner=\"<option value='$row->id'>$row->title</option>\";\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "public function byState($state,$db)\n {\n\n \t$q = \"SELECT UNITID,INSTNM FROM colleges WHERE STABBR = '$state' \";\n\n\t\t$statement = $db->prepare($q);\n\t\t$statement->execute();\n\n\n\t\t//table start\n\t\tprint \"<table class='table table-hover'>\";\n\n\t\t//generate html from query\n\t\tforeach ($statement->fetchAll() as $row) {\n\t\t\t$id = $row[0];\n\t\t\t$school = $row[1];\n\t\t\tprint( \"<tr><td><a href='details.php?id=\" . $id .\"'>\". $school .\"</a></td></tr>\");\n\t\t} \n\n\t\tprint '</table>' ;\n\n }", "public static function userInstitutions()\n {\n return DB::table('institution_users')\n ->select(DB::raw('DISTINCT(`institution_id`) as id, name'))\n ->join('institutions','institution_users.institution_id',\n '=','institutions.id')\n ->orderBy('name')\n ->get();\n }", "function getUserOfSide_ctc($sid){\n\tglobal $db;\n\t$sql = \"SELECT\n\t\t\t\t\t\twg_users.username,\n\t\t\t\t\t\twg_users.id\n\t\t\t\t\tFROM\n\t\t\t\t\t\twg_users ,\n\t\t\t\t\t\twg_villages ,\n\t\t\t\t\t\twg_ctc_troops\n\t\t\t\t\tWHERE\n\t\t\t\t\t\twg_users.id = wg_villages.user_id AND\n\t\t\t\t\t\twg_villages.id = wg_ctc_troops.village_id AND\n\t\t\t\t\t\twg_users.phe_id = '$sid'\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\twg_users.id\";\n\t$db->setQuery($sql);//die($sql);\n\treturn $db->loadObjectList();\n}", "public function getAction($state = array(Dto_ChatRoomUser::STATE_JOIN, Dto_ChatRoomUser::STATE_INVITED))\n {\n $query = $this->getRequest()->getQuery();\n $query['room_id'] = $this->_getRoomId();\n $query['state'] = $state;\n \n $members = $this->chatRoomUserDao->fetchAll($this->chatRoomUserDao->doFilter($query));\n \n $this->success(array('members' => $members->toEndUserArray()));\n }", "public function getAllStations() {\n $result=$this->con->query(\"SELECT * FROM station;\");\n \n return $result;\n }", "public function getSeniorFrContributors($lang)\n {\n $query=\"select u.identifier FROM \".$this->_name.\" u INNER JOIN Contributor c ON u.identifier=c.user_id WHERE u.profile_type ='senior' AND u.status = 'Active' AND c.language='\".$lang.\"'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "function get_emp_by_territory_and_town($invoices)\r\n\t{\r\n\t\t$sql=\"(select distinct a.invoice_no,c.town_id,d.town_name,c.territory_id,f.territory_name,c.franchise_name,emp.name,emp.job_title2,emp.contact_no,emp.employee_id,emp.send_sms\r\n\t\t\t\t\tfrom king_invoice a\r\n\t\t\t\t\tjoin king_transactions b on b.transid = a.transid\r\n\t\t\t\t\tjoin pnh_m_franchise_info c on c.franchise_id = b.franchise_id\r\n\t\t\t\t\tjoin pnh_towns d on d.id=c.town_id \r\n\t\t\t\t\tjoin pnh_m_territory_info f on f.id = c.territory_id\r\n\t\t\t\t\tjoin m_town_territory_link e on e.town_id=c.town_id and e.is_active=1\r\n\t\t\t\t\tjoin m_employee_info emp on emp.employee_id = e.employee_id and emp.job_title2 in (4,5)\r\n\t\t\t\twhere a.invoice_no in ($invoices) and is_pnh = 1 and emp.is_suspended=0\r\n\t\t\t\tgroup by emp.employee_id\r\n\t\t\t)union(\r\n\t\t\t\tselect distinct a.invoice_no,c.town_id,d.town_name,c.territory_id,f.territory_name,c.franchise_name,emp.name,emp.job_title2,emp.contact_no,emp.employee_id,emp.send_sms\r\n\t\t\t\t\tfrom king_invoice a\r\n\t\t\t\t\tjoin king_transactions b on b.transid = a.transid\r\n\t\t\t\t\tjoin pnh_m_franchise_info c on c.franchise_id = b.franchise_id\r\n\t\t\t\t\tjoin pnh_towns d on d.id=c.town_id \r\n\t\t\t\t\tjoin pnh_m_territory_info f on f.id = c.territory_id\r\n\t\t\t\t\tjoin m_town_territory_link e on e.territory_id=c.territory_id and e.is_active=1\r\n\t\t\t\t\tjoin m_employee_info emp on emp.employee_id = e.employee_id and emp.job_title2 in (4)\r\n\t\t\t\twhere a.invoice_no in ($invoices) and is_pnh = 1 and emp.is_suspended=0\r\n\t\t\t\tgroup by emp.employee_id\r\n\t\t)\";\r\n\t\t\r\n\t\treturn $this->db->query($sql)->result_array();\r\n\t}", "function getCity($state_id=null){\r\n\t\tif($state_id==null)return false;\r\n\t\t$this->db->select('id');\r\n\t\t$this->db->where(array('mst_states_id'=>$state_id));\r\n\t\t$this->db->where(array(TBL_MST_CITIES.'.added_by'=>ADMIN_NAME));\r\n\t\t$recordSet = $this->db->get(TBL_MST_CITIES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data;\r\n\t}", "public function fetchStudents()\n {\n //1st method to get all the record\n\n $students = Student::all();\n return $students;\n\n //2nd method to use where class mean to get a specific record\n\n // $students = Student::where('id', 33)->get();\n // return $students;\n\n //3rd method to select a range and get a specific records\n // $students = Student::whereBetween('id', [33, 44])->get();\n // return $students;\n\n //4th method to order by AScending or descending the with id base\n\n // $students = Student::whereBetween('id', [33, 44])->orderBy('id', 'DESC')->get();\n // return $students;\n\n }", "private function getCourseEditors()\n {\n return $this->entityManager->createQueryBuilder()\n ->select('customer')\n ->from(Customer::class, 'customer')\n ->innerJoin(ActionLog::class, 'log', Expr\\Join::WITH, 'customer.id = log.user')\n ->where('customer.id in (:ids)')\n ->setParameter('ids', $this->getAvailableCustomersIds())\n ->getQuery()->getResult();\n }", "private function get_consultant_info() {\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n u235_users.user_id=:user_id AND\n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':user_id', $this->cons_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('90'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "function &getObligatoryStates()\n\t{\n\t\tglobal $ilDB;\n\t\t$obligatory_states = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_qst_oblig WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\tif ($result->numRows())\n\t\t{\n\t\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t\t{\n\t\t\t\t$obligatory_states[$row[\"question_fi\"]] = $row[\"obligatory\"];\n\t\t\t}\n\t\t}\n\t\treturn $obligatory_states;\n\t}", "function client_select_all($salesperson_id)\n{\n $conn = db_connect();\n\n // Prepared statement for selecting all clients from the database if user has admin privileges\n if ($salesperson_id == \"all\") {\n $client_select_all_stmt = pg_prepare($conn, \"client_select_all_stmt\", \"SELECT * FROM clients\");\n $result = pg_execute($conn, \"client_select_all_stmt\", array());\n\n // Prepared statement for selecting clients associated with the logged in salespersons account\n } else {\n $client_select_all_stmt = pg_prepare($conn, \"client_select_all_stmt\", \"SELECT * FROM clients WHERE salesperson_id = $1\");\n $result = pg_execute($conn, \"client_select_all_stmt\", array($salesperson_id));\n }\n\n // Fetch all rows from query results\n $rows = pg_fetch_all($result);\n\n // Check for a result after querying database and if one exists, save it as an array to return user data\n if ($rows) {\n return $rows;\n }\n\n return false;\n}", "public function getEnseignants(){\n return DB::table('users')->join('course_user','course_user.user_id', '=', 'users.id')\n ->join('courses','course_user.course_id', '=', 'courses.id')\n ->select('users.id','users.user_name', 'users.user_contact',\n 'users.user_last_name', 'courses.course_name'\n )->get();\n\n \n }", "public function findCitiesByStateParent($parent)\n\t{\n\t\tif($parent->getLevel()=='country')\n\t\t\treturn $this->findCitiesByCode($parent->getCc1());\n\t\tif($parent->getLevel()=='region')\n\t\t\treturn $this->findCitiesByCode($parent->getCc1(),$parent->getADMCODE());\n\t\tif($parent->getLevel()=='departement')\n\t\t\treturn $this->findCitiesByCode($parent->getCc1(),$parent->getADMPARENT(),$parent->getADMCODE());\n\t\tif($parent->getLevel()=='district')\n\t\t\treturn $this->findCitiesByCode($parent->getCc1(),null,$parent->getADMPARENT(),$parent->getADMCODE());\n\t\tif($parent->getLevel()=='division')\n\t\t\treturn $this->findCitiesByCode($parent->getCc1(),null,null,$parent->getADMPARENT(),$parent->getADMCODE());\n\t\t\n\t}", "public function getDuties2($creator)\n {\n $datas = DB::select(\"SELECT DISTINCT\n\tduties.*\nFROM\n\tduties\n\tINNER JOIN users ON duties.creator = users.id\n\tINNER JOIN priorities ON duties.priority = priorities.id\n\tINNER JOIN groups ON duties.`group` = groups.id\n\tINNER JOIN user_duty ON duties.id = user_duty.duty \n\tOR user_duty.`user` = users.id \nWHERE\n\tduties.creator = $creator \n\tOR user_duty.`user` = $creator\");\n\n return $datas;\n\n\n }", "function getCustomerData()\n {\n if(isset($_SESSION['user_login']) && $_SESSION['user_login']['roll_id']==6)\n {\n /* @changes: all customer display if all_region=1\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n } else {\n $customer_array=array();\n //$query=\"SELECT GROUP_CONCAT(DISTINCT(ID)) as id FROM \" . CFG::$tblPrefix . \"region WHERE find_in_set('\".$_SESSION['user_login']['id'].\"',engineer) <> 0\";\n $query=\"SELECT region as id FROM \" . CFG::$tblPrefix . \"user WHERE id=\".$_SESSION['user_login']['id'];\n \n $result=DB::query($query);\n \n if(count($result) > 0)\n {\n foreach($result as $key=>$value)\n {\n $region=explode(\",\",$value[\"id\"]);\n for($i=0;$i<count($region);$i++)\n {\n $customer_query=\"SELECT u.id, u.name\n FROM \" . CFG::$tblPrefix . \"user AS u\n WHERE active='1' and FIND_IN_SET( u.id, (\n\n SELECT GROUP_CONCAT( DISTINCT (\n ID\n ) ) AS id\n FROM \" . CFG::$tblPrefix . \"user\n WHERE find_in_set( '\".$region[$i].\"', region ) <>0 )\n ) and roll_id=7 \";\n \n $customer_result=DB::query($customer_query);\n if(count($customer_result) > 0)\n {\n foreach($customer_result as $ckey=>$cvalue)\n {\n \n array_push($customer_array,$cvalue);\n }\n } \n }\n }\n $customer_unique_array = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $customer_array)));\n \n return $customer_unique_array;\n }\n }\n \n }\n else \n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n }", "public function getCityLocation($state){\r\n\t $select=\"SELECT DISTINCT(`town`) FROM locations Where `state`='$state' ORDER BY town\";\r\n\t global $pdo;\r\n\t $stmt = $pdo->query($select);\r\n\t\t$params = array();\r\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC)){\r\n\t\t\t$params[] = $row;\r\n\t\t}\r\n\t\treturn $params;\r\n\t}", "public function m_get_supervisor_data() {\n $this->db->select('*');\n $this->db->from('users u');\n $this->db->join('supervisor s','u.Id = s.UsersId','inner');\n $query = $this->db->get();\n return $query->result_array();\n }", "function get_indian_states(){\n\t\t$this->db->cache_on();\n\t\t\n\t\t$this->db->select('id, name');\n\t\t$this->db->where_in('country_id', '101');\n\t\t$this->db->order_by('name');\n\t\t$q = $this->db->get('states');\n\t\tif ($q->num_rows()>0) {\n\t\t\treturn $q->result_array();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getStudents($univid) { //$univid is formal Argument\r\n\t\t//2. Build The Query\r\n\t\t\r\n $this->db->select('student_name,stu_enroll_no')->from('students');\r\n \r\n $this->db->where('university_id', $univid);\r\n \r\n\t\t//3. Execute the query\r\n $query = $this->db->get();\r\n\t\t\r\n\t\t//4. Return the result\r\n return $query->result_array(); \r\n }", "function getStudentByInstitutionValidate(){\n\t\t \n\t\tif(@$this->country == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the country and institution are required!\", \"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->getStudentByInstitution( $this->sanitize($this->institution), $this->sanitize($this->country) );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function querySupervisors(\n $onlyServerState = null,\n $pageSize = null,\n array $body\n )\n {\n return $this->_QuerySupervisors_operation->call([\n 'onlyServerState' => $onlyServerState,\n 'pageSize' => $pageSize,\n 'body' => $body\n ]);\n }", "function client_index($clientId=null)\n\t{\n\t\tif($clientId == ''){\n\t\t\t// Get the logged-in client ID\n\t\t\t$clientId = $this->Auth->user('id');\n\t\t\t$this->set('chain_user','0');\n\t\t}else{\n\t\t\t$this->set('chain_user','1');\n\t\t}\n\n\t\t$clientArray = $this->User->getChildHotelsArray($clientId);\n\t\t$clientStr = implode(',', $clientArray);\n\t\t\n\t\tif ($this->data['User']['value']) {\n\t\t\t//debug($this->data);\n\t\t\t$search = trim($this->data['User']['value']);\n\n\t\t\t$this->set('search',$search);\n\n\t\t\t$condition = \"((User.username LIKE '%$search%') OR (User.firstname LIKE '%$search%') OR (User.lastname LIKE '%$search%')) AND (User.client_id IN ($clientStr) and User.status='1')\";\n\t\t\t$conditions = array(\n\t\t\t\t\t\t\t'OR' => array('User.username LIKE' => \"%$search%\", 'User.firstname LIKE' => \"%$search%\", 'User.lastname LIKE' => \"%$search%\"), \n\t\t\t\t\t\t\t'AND' => array('User.client_id IN' => $clientId)\n\t\t\t\t\t\t );\n\t\t} else {\n\t\t\t$condition = \"User.client_id IN ($clientStr) and User.status='1'\";\n\t\t\t$conditions = array('User.client_id IN' => $clientId);\n\t\t}\n\t\t// Find the paginated list of users\n\t\t$this->User->recursive = -1;\n $this->paginate['conditions'] = $condition;\n $users = $this->paginate();\n \n $child_data = $this->User->Client->find('list',\n array('conditions'=>\n array('OR'=>array('Client.parent_id'=>$clientId,'Client.id'=>$clientId),'Client.status'=>1)\n ,'fields'=>'id,hotelname','recursive'=>'0'));\n\n\t if(!empty($users)){\n\t\t$dep_user_obj = ClassRegistry::init('DepartmentsUser');\n\t\tfor($i=0;$i<count($users);$i++){\n\t\t $dept_data = $dep_user_obj->find('all',array('fields'=>'DepartmentsUser.department_name','conditions'=>array('DepartmentsUser.user_id'=>$users[$i]['User']['id'])));\n\t\t foreach($dept_data as $dept){\n\t\t\t $users[$i]['Department'][] = $dept['DepartmentsUser']['department_name'];\n\t\t }\t\t \n\t\t}\n\t }\n\n\t\t$this->set(compact('users','child_data'));\n\t}", "function getStudentAgents($campusId, $fd, $td) {\n $this->db->where('tipo_pax', 'STD');\n $this->db->where('plused_book.id_centro', $campusId);\n $this->db->where(\"((data_arrivo_campus >= '\" . $fd . \"' AND data_arrivo_campus <= '\" . $td . \"') OR (data_partenza_campus >= '\" . $fd . \"' AND data_partenza_campus <= '\" . $td . \"'))\"); //data_partenza_campus\n $this->db->select('data_arrivo_campus,data_partenza_campus,plused_book.id_centro,agenti.id as agent_id,businessname as agent_businessname');\n $this->db->join('plused_book', 'plused_rows.id_book = plused_book.id_book');\n $this->db->join('agenti', 'plused_book.id_agente = agenti.id');\n //su_survey_status\n //$this->db->join('plused_survey_users','plused_rows.id_prenotazione = plused_survey_users.su_group_leader_id','left');\n $this->db->group_by('agenti.id');\n $result = $this->db->get(\"plused_rows\");\n if ($result->num_rows()) {\n return $result->result_array();\n } else\n return 0;\n }", "function get_smsstudents($inputarray = array()) {\n $college_id = isset($inputarray['college_id']) ? $inputarray['college_id'] : '';\n $course_id = isset($inputarray['course_id']) ? $inputarray['course_id'] : '';\n $branch_id = isset($inputarray['branch_id']) ? $inputarray['branch_id'] : '';\n $semister_id = isset($inputarray['semister_id']) ? $inputarray['semister_id'] : '';\n $section_id = isset($inputarray['section_id']) ? $inputarray['section_id'] : '';\n $religion = isset($inputarray['religion']) ? strtolower($inputarray['religion']) : '';\n\n $sql = \" select sr.*, users.users_type_id, users.username, users.`password` , users.email, users.id as users_id ,users.status\n\t\t\t from users\n\t\t\t inner join student_records as sr on sr.user_id=users.id\n\t\t\t inner join student_semisters as ss on ss.user_id=sr.user_id\n\t\t\t where users.users_type_id='1' and users.status='1' and ss.is_current='1' and sr.college_id = '\" . $college_id . \"' \n\t\t\t and sr.course_id = '\" . $course_id . \"' and sr.branch_id = '\" . $branch_id . \"' and ss.semister_id = '\" . $semister_id . \"'\n\t\t\t and sr.section_id='\" . $section_id . \"' \";\n if (!empty($religion)) {\n $sql .= \" and sr.religion='\" . $religion . \"' \";\n }\n\n $sql .= \" ORDER BY username \";\n\n $res = $this->db->query($sql);\n return $res->result();\n }", "public function getCitiesInState($state) {\n return $this->createQuery()\n ->select(\"DISTINCT c.city AS city\")\n ->from(\"Companies_Model_Company c\")\n ->where(\"c.state = ? AND c.local_business\", mb_strtoupper($state, \"UTF-8\"))\n ->andWhereIn(\"c.status\", Companies_Model_Company::getActiveStatuses())\n ->orderBy(\"city ASC\")\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n }", "public function getStaff()\n {\n\n $staffID = get_staff_user_id();\n $this->db->where('Staff_ID', $staffID);\n $result = $this->db->get('staffs')->row();\n\n switch ($result->S_IsAdmin) {\n case 0:\n $this->db->order_by('Staff_ID', 'DESC');\n $result1 = $this->db->get('staffs')->result_array();\n break;\n case 1:\n $this->db->where('Area', $result->Area);\n $this->db->where('S_IsAdmin', '2');\n\n $this->db->order_by('Staff_ID', 'DESC');\n $result1 = $this->db->get('staffs')->result_array();\n break;\n// case 2:\n// $this->db->where('S_IsAdmin !=', '1');\n// //$this->db->where('S_Status', 2);\n// $this->db->where('Area', $result->Area);\n//\n// $this->db->order_by('Staff_ID','DESC');\n// $result1= $this->db->get('staffs')->result_array();\n// break;\n//\n }\n\n $whatisthequery = $this->db->last_query();\n return $result1;\n }", "public function get_student_list_of_logged_in_parent() {\n\t\t$parent_id = $this->session->userdata('user_id');\n\t\t$parent_data = $this->db->get_where('parents', array('user_id' => $parent_id))->row_array();\n\t\t$checker = array(\n\t\t\t'parent_id' => $parent_data['id'],\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\t$students = $this->db->get_where('students', $checker)->result_array();\n\t\tforeach ($students as $key => $student) {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $student['id'],\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student['user_id']))->row_array();\n\t\t\t$students[$key]['student_id'] = $student['id'];\n\t\t\t$students[$key]['name'] = $user_details['name'];\n\t\t\t$students[$key]['email'] = $user_details['email'];\n\t\t\t$students[$key]['role'] = $user_details['role'];\n\t\t\t$students[$key]['address'] = $user_details['address'];\n\t\t\t$students[$key]['phone'] = $user_details['phone'];\n\t\t\t$students[$key]['birthday'] = $user_details['birthday'];\n\t\t\t$students[$key]['gender'] = $user_details['gender'];\n\t\t\t$students[$key]['blood_group'] = $user_details['blood_group'];\n\t\t\t$students[$key]['class_id'] = $enrol_data['class_id'];\n\t\t\t$students[$key]['section_id'] = $enrol_data['section_id'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$students[$key]['class_name'] = $class_details['name'];\n\t\t\t$students[$key]['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $students;\n\t}", "public static function getCurrentLoggedInNurse(){\n $user = LoginHelper::getCurrentUser();\n $nurse = Nurse::all()->where('user_id', $user->id)->first();\n return $nurse;\n }", "public function index(): JsonResponse\n {\n $item = Staff::with('district')->get();\n return custom_response($item);\n }", "public function state($state = null)\n {\n $q = \\App\\Event::with('venue.city.states')\n ->whereHas('venue.city.states', function ($query) use ($state) {\n $query->where('abbr', strtoupper($state));\n });\n $q = $this->handleRequest($q);\n\n return $q->orderby('start_date', 'asc')\n ->paginate($this->paginate)->appends(request($this->params));\n }", "function emarking_get_enroled_students_sql()\n{\n $query = 'SELECT u.*\n\t\t\tFROM {user_enrolments} ue\n\t\t\tJOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = ?)\n\t\t\tJOIN {context} c ON (c.contextlevel = 50 AND c.instanceid = e.courseid)\n\t\t\tJOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.roleid = 5 AND ra.userid = ue.userid)\n\t\t\tJOIN {user} u ON (ue.userid = u.id)\n\t\t\tGROUP BY u.id';\n \n return $query;\n}", "public function getNursings()\n {\n $db = PDOController::getInstance();\n $req = $db->prepare('SELECT lastname, firstname, email, role ,id \n FROM persons \n WHERE role =?');\n $req->execute([1]);\n return $req->fetchAll();\n }", "function getStateFromCity($ids){\r\n\r\n\t$ci \t= & get_instance();\r\n\r\n \t$ci->db->select('state_id');\r\n\r\n\t$ci->db->where_in('city_id',$ids);\r\n\r\n\t$query = $ci->db->get('tbl_city');\r\n\r\n \t$res = $query->result_array();\r\n\r\n \t//echo $ci->db->last_query();exit;\r\n\r\n \treturn $res; \r\n\r\n }", "function sidsearch($sid){\r\n\t\tif ($this->db->get_where('user',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t$uid = end($this->db->get_where('user',array('member_id'=>$sid))->result())->id;\r\n\t\t\t$user_info = $this->db->get_where('user_info',array('uid'=>$uid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//generate output\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\t//get unregistered user information\r\n\t\telseif ($this->db->get_where('user_veri',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t//get app\r\n\t\t\t$user_info = $this->db->get_where('user_veri',array('member_id'=>$sid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$output = array('msg' => \"Not yet matched\",\r\n\t\t\t\t\t\t\t'code' => 100\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function searchCurrentStudent($data) {\n\n $this->db->select('stu.*,stu_info.*,prg.*');\n $this->db->from('student stu');\n $this->db->join('programoffer prg', 'prg.programOfferId=stu.programOfferId');\n $this->db->join('studentinfo stu_info', 'stu_info.applicationId=stu.applicationId');\n $this->db->where('stu.programOfferId', $data['programOfferId']);\n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "public function getCoordinatorSec() \n {\n $this->db->select(\"tsl_code, tsl_code ||' - '|| tsl_desc as tsl_code_desc\");\n $this->db->from('ims_hris.training_sector_level');\n\t\t$this->db->where(\"COALESCE(tsl_status,'N') = 'Y'\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "public function getUsersDeatils() {\n $select = $this->select()\n ->from(array('u' => 'users'))\n ->setIntegrityCheck(false)\n ->joinLeft(array('ctry' => 'countries'), 'u.country_id=ctry.country_id', array(\"ctry.country_name\"))\n ->joinLeft(array('st' => 'states'), 'u.state_id=st.id', array(\"st.name\"));\n// ->where('u.role != 2');\n\n $result = $this->getAdapter()->fetchAll($select);\n if ($result) :\n return $result;\n endif;\n }", "function fetch_district() //get all records from database \n\t{\n\t $result;\n\t $csrf_token=$this->security->get_csrf_hash();\n\t $this->load->model('Sup_admin');\n\t $query=$this->Sup_admin->fetch_district();\n\t\t $res=$query->result();\n\t if($res){\n\t\t $data;\n\t\t $i = 0;\n\t \t foreach($res as $r){\n\t\t\t $code = $r->location_code;\n\t\t\t $type = $r->district_name;\n\t\t\t $data[$i] = array('code'=>$code,'type'=>$type);\n\t\t\t $i = $i+1;\n\t\t }\n\t\t $result = array('status'=>1,'message'=>'data found','data'=>$data,'csrf_token'=>$csrf_token);\n\t }else{\n\t\t $result = array('status'=>0,'message'=>'no data found','csrf_token'=>$csrf_token);\n\n\t }\n\t echo json_encode($result);\n\t }", "function findInstructor($unformattedName){\r\n\r\n if(empty($unformattedName)) return false;\r\n\r\n // remove commas, periods, and such\r\n $toRemove = array(\".\",\",\");\r\n $name = str_replace($toRemove, \"\", $unformattedName);\r\n\r\n // split name into words\r\n $name = explode(' ',$name);\r\n \r\n // remove titles\r\n $titles = array(\"Dr\",\"dr\",\"Prof\",\"prof\",\"\");\r\n $name = array_diff($name,$titles);\r\n\r\n // reset indices\r\n $name = array_values($name);\r\n\r\n // with any luck, our array only contains the first and last names, and maybe middle\r\n $subQuery = \"SELECT DISTINCT `ID`, `FIRST_NAME`, `MIDDLE_NAME`, `LAST_NAME`, `WOOSTER_EMAIL` FROM `X_PNSY_FACULTY` WHERE \";\r\n\r\n if(count($name) < 2) return false;\r\n if(count($name) > 1){\r\n // FIRST LAST\r\n $query1 = \"\".$subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `LAST_NAME`='\".$name[1].\"'\";\r\n\r\n // LAST FIRST\r\n $query2 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n if(count($name) > 2){\r\n // FIRST MIDDLE LAST\r\n $query3 = $subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `MIDDLE_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[2].\"'\";\r\n\r\n // LAST FIRST MIDDLE\r\n $query4 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `MIDDLE_NAME`='\".$name[2].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n\r\n // make queries\r\n $result = mysql_query($query1);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n $result = mysql_query($query2);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n if(!empty($query3)){\r\n $result = mysql_query($query3);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n if(!empty($query4)){\r\n $result = mysql_query($query4);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n\r\n // return false if nothing works\r\n return false; \r\n }", "function get_list_states($preselect = null){\n $states = array('AL'=>\"Alabama\",\n 'AK'=>\"Alaska\",\n 'AZ'=>\"Arizona\",\n 'AR'=>\"Arkansas\",\n 'CA'=>\"California\",\n 'CO'=>\"Colorado\",\n 'CT'=>\"Connecticut\",\n 'DE'=>\"Delaware\",\n 'DC'=>\"District Of Columbia\",\n 'FL'=>\"Florida\",\n 'GA'=>\"Georgia\",\n 'HI'=>\"Hawaii\",\n 'ID'=>\"Idaho\",\n 'IL'=>\"Illinois\",\n 'IN'=>\"Indiana\",\n 'IA'=>\"Iowa\",\n 'KS'=>\"Kansas\",\n 'KY'=>\"Kentucky\",\n 'LA'=>\"Louisiana\",\n 'ME'=>\"Maine\",\n 'MD'=>\"Maryland\",\n 'MA'=>\"Massachusetts\",\n 'MI'=>\"Michigan\",\n 'MN'=>\"Minnesota\",\n 'MS'=>\"Mississippi\",\n 'MO'=>\"Missouri\",\n 'MT'=>\"Montana\",\n 'NE'=>\"Nebraska\",\n 'NV'=>\"Nevada\",\n 'NH'=>\"New Hampshire\",\n 'NJ'=>\"New Jersey\",\n 'NM'=>\"New Mexico\",\n 'NY'=>\"New York\",\n 'NC'=>\"North Carolina\",\n 'ND'=>\"North Dakota\",\n 'OH'=>\"Ohio\",\n 'OK'=>\"Oklahoma\",\n 'OR'=>\"Oregon\",\n 'PA'=>\"Pennsylvania\",\n 'RI'=>\"Rhode Island\",\n 'SC'=>\"South Carolina\",\n 'SD'=>\"South Dakota\",\n 'TN'=>\"Tennessee\",\n 'TX'=>\"Texas\",\n 'UT'=>\"Utah\",\n 'VT'=>\"Vermont\",\n 'VA'=>\"Virginia\",\n 'WA'=>\"Washington\",\n 'WV'=>\"West Virginia\",\n 'WI'=>\"Wisconsin\",\n 'WY'=>\"Wyoming\");\n foreach ($states as $key=>$val) {\n if ($preselect == $key) {\n $selected = 'selected';\n } else {\n $selected = null;\n }\n echo '<option value=\"' . $key . '\" ' . $selected . '>' . $val . '</option>';\n }\n }", "public function getMineListSupervisors()\n {\n $users = DB::table('mine_supervision_list')\n ->where('userId', '=', \\Auth::user()->id)\n ->join('users', 'mine_supervision_list.supervision_id', '=', 'users.id')\n ->join('user_information', 'mine_supervision_list.supervision_id', '=', 'user_information.user_id')\n ->join('users_address', 'mine_supervision_list.supervision_id', '=', 'users_address.user_id')\n ->join('supervision_speciality', 'mine_supervision_list.supervision_id', '=', 'supervision_speciality.user_id')\n ->join('users_educations', 'mine_supervision_list.supervision_id', '=', 'users_educations.user_id')\n ->select('users.name', 'users.surname', 'user_information.special_preparation', 'user_information.city', 'user_information.trained_leader',\n 'user_information.avatar_path','user_information.age', 'user_information.version', 'mine_supervision_list.created_at',\n 'user_information.user_id', 'supervision_speciality.Eksistentiel_humanistisk', 'supervision_speciality.Kognitiv_adfærdsterapeutisk',\n 'users_educations.primary_education', 'users_educations.secondary_education', 'users_educations.third_education',\n 'supervision_speciality.Psykodynamisk_psykoanalytisk', 'supervision_speciality.Systemisk_strukturel', 'users_address.address_name', 'users_address.road_name', 'users_address.post_number')\n ->get();\n $registerPsychology = DB::table('mine_supervision_list_psychologist')\n ->where('userId', '=', \\Auth::user()->id)\n ->join('psychologist_supervision', 'mine_supervision_list_psychologist.supervision_id', '=', 'psychologist_supervision.id')\n ->select('psychologist_supervision.name', 'psychologist_supervision.surname', 'psychologist_supervision.city', 'psychologist_supervision.special_preparation', 'psychologist_supervision.id', 'mine_supervision_list_psychologist.created_at', 'psychologist_supervision.supervisor_selected')\n ->get();\n // TODO change user_id in register_psychology on id because customer need hot fix\n $registerPsychology->each(function ($item) {\n $item->user_id = $item->id;\n });\n// TODO NEED REFACTORING THIS DATA TO PUSH IN SOME METHODS :D\n $responseData = [];\n $users = $users->merge($registerPsychology);\n $totalSupervisionHours = $this->registerSupervisionModel->calculateTotalHoursSupervision();\n $responseData['supervisors'] = $users;\n $responseData['totalHoursSession'] = $totalSupervisionHours;\n\n return $responseData;\n }", "private function returnCountriesForUser()\n {\n\n $tableCountryExt = CountryExt::tablename();\n $tableCountry = Country::tablename();\n\n /* $role=Yii::$app->user->getIdentity()->role;\n //If I'm admin just get all countries\n if($role==User::ROLE_ADMIN || $role==User::ROLE_SUPERADMIN || $role==User::ROLE_MARKETER)\n {\n $countries = Country::listAllCountries();\n }\n //otherwise find all countries where specific lanuage(language of current user is) is spoken\n else\n {\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n } */\n\n //return countries per language\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n return $countries;\n }", "function get_all_states()\n{\n\t\t$states = array(\n\t\t\t\"Alabama\" => \"Alabama\",\n\t\t\t\"Alaska\" => \"Alaska\",\n\t\t\t\"Arizona\" => \"Arizona\",\n\t\t\t\"Arkansas\" => \"Arkansas\",\n\t\t\t\"California\" => \"California\",\n\t\t\t\"Colorado\" => \"Colorado\",\n\t\t\t\"Connecticut\" => \"Connecticut\",\n\t\t\t\"Delaware\" => \"Delaware\",\n\t\t\t\"District of Columbia\" => \"District of Columbia\",\n\t\t\t\"Florida\" => \"Florida\",\n\t\t\t\"Georgia\" => \"Georgia\",\n\t\t\t\"Hawaii\" => \"Hawaii\",\n\t\t\t\"Idaho\" => \"Idaho\",\n\t\t\t\"Illinois\" => \"Illinois\",\n\t\t\t\"Indiana\" => \"Indiana\",\n\t\t\t\"Iowa\" => \"Iowa\",\n\t\t\t\"Kansas\" => \"Kansas\",\n\t\t\t\"Kentucky\" => \"Kentucky\",\n\t\t\t\"Louisiana\" => \"Louisiana\",\n\t\t\t\"Maine\" => \"Maine\",\n\t\t\t\"Maryland\" => \"Maryland\",\n\t\t\t\"Massachusetts\" => \"Massachusetts\",\n\t\t\t\"Michigan\" => \"Michigan\",\n\t\t\t\"Minnesota\" => \"Minnesota\",\n\t\t\t\"Mississippi\" => \"Mississippi\",\n\t\t\t\"Missouri\" => \"Missouri\",\n\t\t\t\"Montana\" => \"Montana\",\n\t\t\t\"Nebraska\" => \"Nebraska\",\n\t\t\t\"Nevada\" => \"Nevada\",\n\t\t\t\"New Hampshire\" => \"New Hampshire\",\n\t\t\t\"New Jersey\" => \"New Jersey\",\n\t\t\t\"New Mexico\" => \"New Mexico\",\n\t\t\t\"New York\" => \"New York\",\n\t\t\t\"North Carolina\" => \"North Carolina\",\n\t\t\t\"North Dakota\" => \"North Dakota\",\n\t\t\t\"Ohio\" => \"Ohio\",\n\t\t\t\"Oklahoma\" => \"Oklahoma\",\n\t\t\t\"Oregon\" => \"Oregon\",\n\t\t\t\"Pennsylvania\" => \"Pennsylvania\",\n\t\t\t\"Rhode island\" => \"Rhode island\",\n\t\t\t\"South Carolina\" => \"South Carolina\",\n\t\t\t\"South Dakota\" => \"South Dakota\",\n\t\t\t\"Tennessee\" => \"Tennessee\",\n\t\t\t\"Texas\" => \"Texas\",\n\t\t\t\"Utah\" => \"Utah\",\n\t\t\t\"Vermont\" => \"Vermont\",\n\t\t\t\"Virgin Islands\" => \"Virgin Islands\",\n\t\t\t\"Virginia\" => \"Virginia\",\n\t\t\t\"Washington\" => \"Washington\",\n\t\t\t\"West Virginia\" => \"West Virginia\",\n\t\t\t\"Wisconsin\" => \"Wisconsin\",\n\t\t\t\"Wyoming\" => \"Wyoming\",\n\t\t\t\"Alberta\" => \"Alberta\",\n\t\t\t\"Nova Scotia\" => \"Nova Scotia\",\n\t\t\t\"British Columbia\" => \"British Columbia\",\n\t\t\t\"Ontario\" => \"Ontario\",\n\t\t\t\"Manitoba\" => \"Manitoba\",\n\t\t\t\"Prince Edward Island\" => \"Prince Edward Island\",\n\t\t\t\"New Brunswick\" => \"New Brunswick\",\n\t\t\t\"Quebec\" => \"Quebec\",\n\t\t\t\"Newfoundland\" => \"Newfoundland\",\n\t\t\t\"Saskatchewan\" => \"Saskatchewan\",\n\t\t\t\"Northwest Territories\" => \"Northwest Territories\",\n\t\t\t\"Yukon Territory\" => \"Yukon Territory\",\n\t\t\t\"Nunavut\" => \"Nunavut\",\n\t\t\t\"American Samoa\" => \"American Samoa\",\n\t\t\t\"Guam\" => \"Guam\",\n\t\t\t\"Marshall Islands\" => \"Marshall Islands\",\n\t\t\t\"Micronesia (Federated States of)\" => \"Micronesia (Federated States of)\",\n\t\t\t\"Palau\" => \"Palau\",\n\t\t\t\"Puerto Rico\" => \"Puerto Rico\",\n\t\t\t\"U.S. Minor Outlying Islands\" => \"U.S. Minor Outlying Islands\",\n\t\t\t\"Northern Mariana Islands\" => \"Northern Mariana Islands\",\n\t\t\t\"Armed Forces Africa\" => \"Armed Forces Africa\",\n\t\t\t\"Armed Forces Americas AA (except Canada)\" => \"Armed Forces Americas AA (except Canada)\",\n\t\t\t\"Armed Forces Canada\" => \"Armed Forces Canada\",\n\t\t\t\"Armed Forces Europe AE\" => \"Armed Forces Europe AE\",\n\t\t\t\"Armed Forces Middle East AE\" => \"Armed Forces Middle East AE\",\n\t\t\t\"Armed Forces Pacific AP\" => \"Armed Forces Pacific AP\",\n\t\t\t\"Foreign\" => \"Foreign\",\n\t\t\t\"Others Not Listed above\" => \"Others Not Listed above\"\n\t\t);\n\treturn $states;\n}", "public function getUsersByCity()\n {\n $conn = Connection::getInstance();\n\n $sql = \"select s.id as state_id, s.name as state_name, s.initials,\n c.id as city_id, c.name as city_name,\n count(u.id) as qtd\n FROM state s inner join city c on (c.state_id = s.id)\n inner join address a on (a.city_id = c.id)\n inner join user u on (u.address_id = a.id) \" .\n ($this->id > 0 ? \" where c.id = :id \" : \"\") .\n \" GROUP BY s.id, s.name, s.initials, c.id, c.name \" .\n \" ORDER BY s.id, c.id \";\n\n $rs = $conn->prepare($sql);\n\n if ($this->id > 0) {\n $rs->bindValue(':id', $this->id, PDO::PARAM_INT);\n }\n\n $rs->execute();\n\n $arrayCity = array();\n\n while ($row = $rs->fetch(PDO::FETCH_OBJ)) {\n\n if ($this->id > 0) {\n\n $this->name = $row->city_name;\n $this->countUsers = $row->qtd;\n $this->setState(new State($row->state_id, $row->state_name, $row->initials));\n\n return;\n }\n\n $newCity = new CityReport($row->city_id, $row->city_name, $row->qtd);\n $newCity->setState(new State($row->state_id, $row->state_name, $row->initials));\n\n array_push($arrayCity, $newCity->returnArray());\n\n }\n\n // se chegar ate aqui, quer dizer que nao localizou a cidade\n if ($this->id > 0) {\n throw new Exception('Cidade não localizada!');\n }\n\n return $arrayCity;\n }", "static function get_states() {\r\n // https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations\r\n $states = [];\r\n $states['AL'] = 'Alabama';\r\n $states['AK'] = 'Alaska';\r\n $states['AZ'] = 'Arizona';\r\n $states['AR'] = 'Arkansas';\r\n $states['CA'] = 'California';\r\n $states['CO'] = 'Colorado';\r\n $states['CT'] = 'Connecticut';\r\n $states['DE'] = 'Delaware';\r\n $states['DC'] = 'District of Columbia';\r\n $states['FL'] = 'Florida';\r\n $states['GA'] = 'Georgia';\r\n $states['HI'] = 'Hawaii';\r\n $states['ID'] = 'Idaho';\r\n $states['IL'] = 'Illinois';\r\n $states['IN'] = 'Indiana';\r\n $states['IA'] = 'Iowa';\r\n $states['KS'] = 'Kansas';\r\n $states['KY'] = 'Kentucky';\r\n $states['LA'] = 'Louisiana';\r\n $states['ME'] = 'Maine';\r\n $states['MD'] = 'Maryland';\r\n $states['MA'] = 'Massachusetts';\r\n $states['MI'] = 'Michigan';\r\n $states['MN'] = 'Minnesota';\r\n $states['MS'] = 'Mississippi';\r\n $states['MO'] = 'Missouri';\r\n $states['MT'] = 'Montana';\r\n $states['NE'] = 'Nebraska';\r\n $states['NV'] = 'Nevada';\r\n $states['NH'] = 'New Hampshire';\r\n $states['NJ'] = 'New Jersey';\r\n $states['NM'] = 'New Mexico';\r\n $states['NY'] = 'New York';\r\n $states['NC'] = 'North Carolina';\r\n $states['ND'] = 'North Dakota';\r\n $states['OH'] = 'Ohio';\r\n $states['OK'] = 'Oklahoma';\r\n $states['OR'] = 'Oregon';\r\n $states['PA'] = 'Pennsylvania';\r\n $states['RI'] = 'Rhode Island';\r\n $states['SC'] = 'South Carolina';\r\n $states['SD'] = 'South Dakota';\r\n $states['TN'] = 'Tennessee';\r\n $states['TX'] = 'Texas';\r\n $states['UT'] = 'Utah';\r\n $states['VT'] = 'Vermont';\r\n $states['VA'] = 'Virginia';\r\n $states['WA'] = 'Washington';\r\n $states['WV'] = 'West Virginia';\r\n $states['WI'] = 'Wisconsin';\r\n $states['WY'] = 'Wyoming';\r\n $states['AS'] = 'American Samoa';\r\n $states['GU'] = 'Guam';\r\n $states['MP'] = 'Northern Mariana Islands';\r\n $states['PR'] = 'Puerto Rico';\r\n $states['VI'] = 'U.S. Virgin Islands';\r\n $states['UM'] = 'U.S. Minor Outlying Islands';\r\n $states['FM'] = 'Micronesia';\r\n $states['MH'] = 'Marshall Islands';\r\n $states['PW'] = 'Palau';\r\n natsort($states);\r\n return $states;\r\n }", "public function index(Request $request)\n { \n if($request->has('district_name') || $request->has('state_id')){\n return $this->collection(Districts::where('district_name','LIKE', \"%\".$request->get('district_name').\"%\")\n ->where('state_id',$request->get('state_id'))\n ->get(), new DistrictsTransformer);\n //return $this->collection(Districts::where('district_name','TTDI')->get(), new DistrictsTransformer);\n } else {\n return $this->collection(Districts::all(), new DistrictsTransformer);\n }\n }", "public function get_logged_in_student_details() {\n\t\t$user_id = $this->session->userdata('user_id');\n\t\t$student_data = $this->db->get_where('students', array('user_id' => $user_id))->row_array();\n\t\t$student_details = $this->get_student_details_by_id('student', $student_data['id']);\n\t\treturn $student_details;\n\t}", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function getListOfSupervisors(\n $onlyServerState = null,\n $continuationToken = null,\n $pageSize = null\n )\n {\n return $this->_GetListOfSupervisors_operation->call([\n 'onlyServerState' => $onlyServerState,\n 'continuationToken' => $continuationToken,\n 'pageSize' => $pageSize\n ]);\n }", "function getstate_get(){\n\n $countryID = $this->uri->segment(4);\n\n $countryID = isset($countryID) ? $countryID : \"\";\n\n if ($countryID == FALSE) {\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country id should not be empty.'\n );\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n \n $from = 'states';\n $where = array('country_id' => $countryID);\n $select = '*';\n $records = 2;\n\n $states = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($states) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'States found successfully.',\n 'result' => $states);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function getStudent()\r\n {\r\n $sql=\"SELECT * FROM users WHERE role_id=2\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "public function getCitiesByStateAction() {\n\n // Verifica a chave de comunicacao da API\n if(!parent::checkApi()) {\n // Retorna erro 400 na requisição se a chave não estiver correta\n return http_response_code(400);\n } else {\n // Descriptografa os dados vindos por POST\n $this->post = parent::checkApi();\n }\n\n // \n if(!isset($this->post->stateId)) {\n $this->response->errorCode = 1;\n $this->response->errorMessage = 'Falta o ID do estado';\n return $this->return();\n }\n\n try {\n \n // Busca o estado \n $cities = GeoCity::find([ \n 'CityUF = :stateId:',\n 'bind' => [\n 'stateId' => parent::sanitize($this->post->stateId, 'int')\n ]\n ]);\n\n if(!count($cities) > 0) {\n\n throw new Exception(\"Nenhum registro encontrado\");\n } else {\n\n $this->response->data = $cities;\n return $this->return();\n }\n\n } catch (Exception $e) {\n \n // Resposta da API\n $this->response->errorCode = 1;\n $this->response->errorMessage = $e->getMessage();\n return $this->return();\n }\n }", "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }" ]
[ "0.56107414", "0.5576005", "0.55233175", "0.5217713", "0.5198404", "0.51926404", "0.51031095", "0.49812588", "0.49535838", "0.49093494", "0.49017674", "0.4883469", "0.48760858", "0.48672482", "0.4866077", "0.48542807", "0.485303", "0.48505163", "0.48368448", "0.48238772", "0.48095077", "0.47977412", "0.47962427", "0.4786727", "0.47762433", "0.47758257", "0.4773017", "0.4761407", "0.47491902", "0.4738288", "0.4731972", "0.46982324", "0.46926916", "0.4683875", "0.46786243", "0.4644134", "0.46332055", "0.4630418", "0.46222013", "0.4616742", "0.46152827", "0.46139395", "0.45989725", "0.45965743", "0.45902652", "0.45863673", "0.45839274", "0.45813185", "0.4568887", "0.45609996", "0.4556181", "0.4552656", "0.45522094", "0.4535844", "0.4529009", "0.45244458", "0.45199388", "0.45175773", "0.4516623", "0.45148224", "0.45113313", "0.45015398", "0.45010954", "0.44989324", "0.44824764", "0.44789672", "0.4478285", "0.4477116", "0.44754207", "0.44733402", "0.44731545", "0.44676667", "0.44655234", "0.44514173", "0.44508716", "0.44423506", "0.44391975", "0.44376257", "0.44375697", "0.44361955", "0.44352263", "0.44350058", "0.4434197", "0.4418744", "0.44180122", "0.44089115", "0.44088328", "0.44080856", "0.4406126", "0.44045272", "0.44044164", "0.44043055", "0.440235", "0.43999967", "0.43975708", "0.43951076", "0.43949375", "0.4392671", "0.43851689", "0.4380784" ]
0.53161716
3
Get a list of members who have left the Senate or House or have announced plans to do so
public function getMembersLeavingOffice(int $congress, string $chamber) { $earliestCongress = 111; $this->congressValidator->isValidCongress($congress, $earliestCongress); $this->congressValidator->isValidChamber($chamber); $uriStub = "{$congress}/{$chamber}/members/leaving.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "public function getMemberList()\n {\n $memberList = '';\n foreach($this->Residents as $resident) {\n $memberList .= (string)$resident->get('Rooms') . ', ';\n //$memberList .= (string)$resident . ', ';\n }\n $memberList = substr($memberList, 0,-2);\n\n return $memberList;\n }", "public function Roommates()\n\t{\n\t\t$res = $this->Residence();\n\t\t$roommates = array();\n\n\t\tif ($this->HasCustomResidence())\n\t\t{\n\t\t\t$addr = $res->Address;\n\t\t\t$city = $res->City;\n\t\t\t$state = $res->State;\n\t\t\t$zip = $res->PostalCode;\n\t\t\t$r = DB::Run(\"SELECT Members.ID FROM Members INNER JOIN Residences \".\n\t\t\t\t\t\t\"ON Members.ResidenceID=Residences.ID WHERE Residences.Address='$addr' \".\n\t\t\t\t\t\t\"AND Residences.City='$city' AND Residences.State='$state' \".\n\t\t\t\t\t\t\"AND Residences.PostalCode='$zip'\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$r = DB::Run(\"SELECT ID FROM Members WHERE ResidenceID='{$this->ResidenceID}' AND Apartment='{$this->Apartment}' LIMIT 9\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\n\t\treturn $roommates;\n\t}", "public function check_online_members(){\n \t$this->load->model(\"portalmodel\");\n \t\n \t$project_id = $this->input->post('project_id');\n \t\n \t$final_names = \"\";\n \t\n \t// get list of current online members\n \t$tmp_online_member_ids = $this->portalmodel->list_select1(\"onlinemembers\");\n \t$online_member_ids = array();\n \tforeach ($tmp_online_member_ids as $eachid){\n \t\t$online_member_ids[]=$eachid->user_id;\n \t}\n \t\n \t$associated_members_ids = $this->portalmodel->list_select(\"project\",\"id\",$project_id);\n \t$tmp_members_ids = implode(\",\", array($associated_members_ids[0]['accountmanager'],$associated_members_ids[0]['projectmanager'],$associated_members_ids[0]['developer']));\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$tmp_members_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$final_names = implode(\", \", $associated_member_names);\n \t\n \t// now get the customer member list\n \t$already_member_ids = $this->portalmodel->list_select(\"chat_project_members\",\"fk_project_id\",$project_id);\n \t$arr_already_member_ids = array();\n \tforeach ($already_member_ids as $eachrecord){\n \t\t$arr_already_member_ids[]=$eachrecord['fk_user_id'];\n \t}\n \t$arr_already_member_ids[]=1001; // here we are adding 1001 for the admin, because he doesn't need to be selected\n \t$in_already_member_ids = implode(\",\", $arr_already_member_ids);\n \t\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$in_already_member_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$associated_member_names = implode(\", \", $associated_member_names);\n \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_member_names:$associated_member_names;\n \t\n \t// online customers\n \t$associated_customer_id = $this->portalmodel->select_name('project', 'customerid', \"id='\".$project_id.\"'\");\n \tif(!empty($associated_customer_id)){\n \t\t$associated_customer_name = $this->portalmodel->select_name('customer', 'companyname', \"customerid='\".$associated_customer_id.\"'\");\n \t\t\n \t\t// also get list of onlinecustomers to highlight\n\t \t$tmp_online_user_ids = $this->portalmodel->list_select1(\"onlinecustomers\");\n\t \t$online_customer_ids = array();\n\t \tforeach ($tmp_online_user_ids as $eachid){\n\t \t\t$online_customer_ids[]=$eachid->customer_id;\n\t \t}\n\t \t\n\t \tif (in_array($associated_customer_id, $online_customer_ids)){\n\t \t\t$associated_customer_name = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$associated_customer_name;\n\t \t}\n\t \t\n\t \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_customer_name:$associated_customer_name;\n \t}\n \t\n \t// online customer users\n \t$tmp_online_customer_user_ids = $this->portalmodel->list_select1(\"online_customer_users\");\n \t$online_customer_user_ids = array();\n \tforeach ($tmp_online_customer_user_ids as $eachid){\n \t\t$online_customer_user_ids[]=$eachid->customer_user_id;\n \t}\n \t\n \t$associated_users = $this->portalmodel->select_where('', '', 'customer_user_project_chat', \"FIND_IN_SET( $project_id, project_ids )\");\n \t$arr_associated_users = array();\n \tforeach ($associated_users as $each_associated_user){\n \t\tif(in_array($each_associated_user->id, $online_customer_user_ids)){\n \t\t\t$arr_associated_users[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$each_associated_user->first_name;\n \t\t}else{\n \t\t\t$arr_associated_users[] = $each_associated_user->first_name;\n \t\t}\n \t}\n \t\n \t$associated_member_names = implode(\",\", $arr_associated_users);\n \t\n \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_member_names:$associated_member_names;\n \t\n \techo $final_names;\n }", "function getMemberListAdmin() {\n $sql = \"SELECT d.*\n FROM admin_building a,\n condo_building b,\n member_condo c,\n member d \n WHERE a.admin_id=? AND a.building_id = b.building_id AND b.condo_id= c.condo_id AND c.member_id = d.id AND b.building_id=? ORDER BY d.id ASC\";\n \n return getAll($sql, [getLogin()['uid'], getLogin()['bid']]);\n}", "public function getExpiringMembers() {\n\t\t$date = new DateTime();\n\t\t$end = $date->setTimestamp(strtotime('+30 days'));\n\n\t\treturn Member::get()->filter(array(\n\t\t\t'MembershipStatus' => 'Verified',\n\t\t\t'ExpiryDate:LessThan' => $end->format('Y-m-d H:i:s'),\n\t\t\t'Notified' => 0\n\t\t));\n\t}", "function listMemberStatus() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\n\n\t\t// only show orders if user has access\n\t\tif($page->validatePath(\"/janitor/admin/user/members/list\")) {\n\n\t\t\tinclude_once(\"classes/users/superuser.class.php\");\n\t\t\t$model = new SuperUser();\n\t\t\t$IC = new Items();\n\n\t\t\t$memberships = $IC->getItems(array(\"itemtype\" => \"membership\", \"status\" => 1, \"extend\" => true));\n\n\t\t\t$_ .= '<div class=\"members\">';\n\t\t\t$_ .= '<h2>Member status</h2>';\n\n\t\t\tif($memberships) {\n\t\t\t$_ .= '<ul class=\"members\">';\n\t\t\t\tforeach($memberships as $membership) {\n\t\t\t\n\t\t\t\t\t$_ .= '<li class=\"'.superNormalize($membership[\"name\"]).'\">';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '<a href=\"/janitor/admin/user/members/list/'.$membership[\"id\"].'\">'.$membership[\"name\"].'</a> ';\n\t\t\t\t\t$_ .= '<span class=\"count\">'.$model->getMemberCount(array(\"item_id\" => $membership[\"id\"])).'</span>';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\t\t\t}\n\n\t\t\t$_ .= '</div>';\n\n\t\t}\n\n\t\treturn $_;\n\t}", "function GetMembers()\n\t{\t$members = array();\n\t\t$where = array();\n\t\t$tables = array('students');\n\t\t\n\t\tif ($_GET['morf'])\n\t\t{\t$where[] = 'students.morf=\"' . $this->SQLSafe($_GET['morf']) . '\"';\n\t\t}\n\t\n\t\tif ($_GET['ctry'])\n\t\t{\t$where[] = 'students.country=\"' . $this->SQLSafe($_GET['ctry']) . '\"';\n\t\t}\n\t\t\n\t\tif ($name = $this->SQLSafe($_GET['name']))\n\t\t{\t$where[] = '(CONCAT(students.firstname, \" \", students.surname, \"|\", students.username) LIKE \"%' . $name . '%\")';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT students.* FROM ' . implode(',', $tables);\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' GROUP BY students.userid ORDER BY students.surname, students.firstname LIMIT 0, 1000';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif (!$row[\"country\"] || $this->user->CanAccessCountry($row[\"country\"]))\n\t\t\t\t{\t$members[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $members;\n\t}", "public function viewMembers()\n {\n\n //get approved members\n $members = Member::where('approved', '1')\n ->with('position', 'status')\n ->orderBy('created_at', 'desc')\n ->get();\n\n //get pending members\n $Pmembers = Member::where('approved', '0')\n ->orderBy('created_at', 'desc')\n ->with('position', 'status')\n ->get();\n //Calculate number of days to automatically set status value to alumni\n $today = Carbon::today();\n foreach($members as $member)\n {\n $joined = Carbon::parse($member->created_at);\n $difference = $joined->diffInMonths($today, false);\n\n //Check the difference\n if($difference >= 7 AND $member->status_id == '2')\n {\n $member->fill([\n 'status_id' => '4'\n ]);\n $member->save();\n\n $member->status_id;\n }elseif ($difference >= 7 AND $member->status_id == '1')\n {\n $member->fill([\n 'status_id' => '3'\n ]);\n $member->save();\n\n $member->status_id;\n }\n }\n\n //Return members view\n return view('members.viewMembers')\n ->with(['members' => $members, 'Pmembers' => $Pmembers]);\n }", "public function members()\n {\n return $this->hasMany(MemberParliament::class);\n }", "public function killCheck()\n\t\t{\n\t\t\t$checkLeader = false;\n\t\t\t$diedList = array();\n\t\t\tforeach($this->_members as $body)\n\t\t\t{\n\t\t\t\tif($body->_alive)\n\t\t\t\t{\n\t\t\t\t\tif($body->_health <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$checkLeader = true;\n\t\t\t\t\t\t$body->_alive = false;\n\t\t\t\t\t\t$body->_health = 0;\n\t\t\t\t\t\t$this->_livingMembers-=1;\n\t\t\t\t\t\tarray_push($diedList, $body->_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($checkLeader)\n\t\t\t{\n\t\t\t\tforeach($this->_members as $body)\n\t\t\t\t{\n\t\t\t\t\tif($body->_alive)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_leader = $body->_name;\n\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\treturn $diedList;\n\t\t}", "public function search_members(Request $request) {\n\n \t$name = $request->name;\n \t$from_ranking = ($request->from_ranking != 'from') ? $request->from_ranking : null;\n \t$to_ranking = ($request->to_ranking != 'to') ? $request->to_ranking : null;\n \t$from_birth_date = ($request->from_birth_year != 'from') ? $request->from_birth_year . '-01-01 00:00:00' : null;\n \t$to_birth_date = ($request->to_birth_year != 'to') ? $request->to_birth_year . '-12-31 23:59:59' : null;\n \t$search_results = User::orderBy('last_name')->orderBy('first_name');\n\n //search by name: first name, last name, first name + last name, last name + first name\n \tif($name) {\n \t\t$search_results = $search_results->where(function($query) use ($name) {\n $query->where('first_name', 'like', '%'.$name.'%')\n ->orWhere('last_name', 'like', '%'.$name.'%')\n ->orWhere(DB::raw(\"CONCAT(`first_name`, ' ', `last_name`)\"), 'like', '%'.$name.'%')\n ->orWhere(DB::raw(\"CONCAT(`last_name`, ' ', `first_name`)\"), 'like', '%'.$name.'%');\n });\n \t}\n \tif($from_ranking && $to_ranking) {\n \t\t$from_passed = false;\n \t\t$to_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif($ranking == $from_ranking) {\n \t\t\t\t$from_passed = true;\n \t\t\t}\n \t\t\tif($from_passed && !$to_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t\tif($ranking == $to_ranking) {\n \t\t\t\t$to_passed = true;\n \t\t\t}\n \t\t}\n \t}\n \telseif($from_ranking) {\n \t\t$from_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif($ranking == $from_ranking) {\n \t\t\t\t$from_passed = true;\n \t\t\t}\n \t\t\tif($from_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t}\n \t}\n \telseif($to_ranking) {\n \t\t$to_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif(!$to_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t\tif($ranking == $to_ranking) {\n \t\t\t\t$to_passed = true;\n \t\t\t}\n \t\t}\n \t}\n \tif(isset($allowed_rankings)) {\n \t\t$search_results = $search_results->where(function($query) use ($allowed_rankings) {\n $query->where(function($query) use ($allowed_rankings) {\n\t $query->whereIn('ranking_singles', $allowed_rankings);\n\t })\n\t ->orWhere(function($query) use ($allowed_rankings) {\n\t $query->whereIn('ranking_doubles', $allowed_rankings);\n\t });\n });\n \t}\n \tif($from_birth_date && $to_birth_date) {\n \t\t$search_results = $search_results->whereBetween('birth_date', [$from_birth_date, $to_birth_date]);\n \t}\n \telseif($from_birth_date) {\n \t\t$search_results = $search_results->where('birth_date', '>', $from_birth_date);\n \t}\n \telseif($to_birth_date) {\n \t\t$search_results = $search_results->where('birth_date', '<', $to_birth_date);\n \t}\n\n \t$search_results = $search_results->paginate(50)->appends(['name' => $request->name,\n 'from_ranking' => $request->from_ranking,\n 'to_ranking' => $request->to_ranking,\n 'from_birth_year' => $request->from_birth_year,\n 'to_birth_year' => $request->to_birth_year,\n 'searching' => $request->searching]);\n\n return $search_results;\n }", "public function members(): BelongsToMany\n {\n return $this->belongsToMany(User::class)->whereNull('class_standing_user.deleted_at')->withTimestamps();\n }", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT organiserID FROM tournamentOrganisers WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "private function makeActiveMemeberships() {\n\t\t$roles = array ();\n\t\t\n\t\tif ($this->memberships)\n\t\t\tforeach ( $this->memberships as $membership ) {\n\t\t\t\tif ($membership->end_date > time ())\n\t\t\t\t\t$roles [] = $membership->role;\n\t\t\t}\n\t\t\n\t\treturn $roles;\n\t}", "public function filterMembers()\n {\n return $this->team->where('id', Auth::user()->getTeam()->id)->with([\n 'members' => function ($query) {\n $query->where('slug', 'like', '%' . $this->request->get('q') . '%');\n },\n ])->first()->members;\n }", "public function organizers()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ORGANIZER)->get();\n }", "private function registeredEvents($event, $household_id, $member_id)\n {\n $timeslot = $event->getTimeslots();\n\n foreach( $timeslot as $t)\n {\n $participants = $t->getParticipants();\n $participants = ControllerHelper::formatMember($participants);\n\n if(!is_null($participants))\n {\n foreach( $participants as $p )\n { \n if( $p[\"household_id\"] == $household_id ) //and $p[\"member-id\"] == $member_id \n return \"Registered\";\n }\n }\n }\n return \"Unregistered\";\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function getLeaders()\n {\n return $this->getMembers()->filter(\n function ($member, $key) {\n return $member->role == 'leader' || $member->role == 'coLeader';\n }\n );\n }", "function rets_bsf_ismember ($roles, $agent1, $agency1, $agent2, $agency2) {\n\n $ismember1 = rets_bsf_ismember_agent ($roles, $agent1);\n $ismember2 = rets_bsf_ismember_agent ($roles, $agent2);\n\n if ($ismember1 == 'No' && $ismember2 == 'No') {\n return 'No';\n }\n\n // Set the variables for TYPE and UID so we don't error out\n if ($ismember1 == 'No') {\n $type1 = '';\n $uid1 = '';\n } else {\n $type1 = $ismember1[0];\n $uid1 = $ismember1[1];\n }\n if ($ismember2 == 'No') {\n $type2 = '';\n $uid2 = '';\n } else {\n $type2 = $ismember2[0];\n $uid2 = $ismember2[1];\n }\n \n $IsMember = array( \n 'ListAgentID' => $agent1,\n 'ListOfficeID' => $agency1,\n 'ListAgentType' => $type1,\n 'ListAgentUID' => $uid1,\n 'CoListAgentID' => $agent2,\n 'CoListOfficeID' => $agency2,\n 'CoListAgentType' => $type2,\n 'CoListAgentUID' => $uid2,\n );\n\n if ($ismember1 == 'No') {\n $IsMember['ListAgentID'] = $agent2;\n $IsMember['ListOfficeID'] = $agency2;\n $IsMember['ListAgentType'] = $type2;\n $IsMember['ListAgentUID'] = $uid2;\n $ismember2 = 'No';\n } \n if ($ismember2 == 'No') {\n $IsMember['CoListAgentID'] = '';\n $IsMember['CoListOfficeID'] = '';\n $IsMember['CoListAgentType'] = '';\n $IsMember['CoListAgentUID'] = '';\n\t$TeamMember = rets_bsf_get_teammember($roles,$IsMember['ListAgentUID']);\n\tif ($TeamMember<>'No') {\n\t $IsMember['CoListAgentID'] = $TeamMember[0];\n\t $IsMember['CoListOfficeID'] = $TeamMember[1];\n\t $IsMember['CoListAgentType'] = $TeamMember[2];\n\t $IsMember['CoListAgentUID'] = $TeamMember[3];\n\t}\n }\n return $IsMember;\n \n}", "public function members()\n\t{\n\t\treturn $this -> hasMany(__CLASS__.'\\Member', 'participant_team_id');\n\t}", "public function getMembers() {\n\n\t\t$order = ((Request::has('order')) ? Request::get('order') : 'id');\n\t\t$dir = ((Request::has('dir')) ? Request::get('dir') : 'asc');\n\n\t\t$users = User::orderBy($order, $dir);\n\n\t\t$filterable_fields = ['level', 'location', 'q'];\n\n\t\tforeach ($filterable_fields as $f) {\n\t\t\tif (Request::has($f)) {\n\t\t\t\tif ($f == 'q') {\n\t\t\t\t\t$users->where('username', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('first_name', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('last_name', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('email', 'LIKE', '%' . Request::get($f) . '%');\n\t\t\t\t} else {\n\t\t\t\t\t$users->where($f, 'LIKE', '%' . Request::get($f) . '%');\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn response()->app(200, 'admin.members.index', ['members' => $users->paginate(30), 'filters' => Request::all()]);\n\n\t}", "private function showPremiumMembers() {\n $query = \"SELECT DISTINCT u.id, n.nhc_pin, u.user_login, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um ON um.user_id = u.id AND um.meta_key = 'member_level' AND um.meta_value IN ('paid-75', 'paid-95')\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um7 ON um7.user_id = u.id AND um7.meta_key = 'expiration_date' AND um7.meta_value {$this->expireDateClause}\n ORDER BY um.meta_value\";\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n foreach($membersArr as $key => $m) {\n $tmp = get_user_meta($m['id']);\n $membersArr[$key]['addr1'] = $tmp['addr1'][0];\n $membersArr[$key]['addr2'] = $tmp['addr2'][0];\n $membersArr[$key]['city'] = $tmp['city'][0];\n $membersArr[$key]['thestate'] = $tmp['thestate'][0];\n $membersArr[$key]['zip'] = $tmp['zip'][0];\n $membersArr[$key]['country'] = $tmp['country'][0];\n $membersArr[$key]['level'] = $tmp['member_level'][0];\n }\n \n $this->showResults($membersArr, 'premium', true);\n }", "public function memberIdList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "function MaintainMembers()\n{\n\tglobal $context, $txt;\n\n\t// Get membergroups - for deleting members and the like.\n\t$result = wesql::query('\n\t\tSELECT id_group, group_name\n\t\tFROM {db_prefix}membergroups'\n\t);\n\t$context['membergroups'] = array(\n\t\tarray(\n\t\t\t'id' => 0,\n\t\t\t'name' => $txt['maintain_members_ungrouped']\n\t\t),\n\t);\n\twhile ($row = wesql::fetch_assoc($result))\n\t{\n\t\t$context['membergroups'][] = array(\n\t\t\t'id' => $row['id_group'],\n\t\t\t'name' => $row['group_name']\n\t\t);\n\t}\n\twesql::free_result($result);\n\n\tif (isset($_GET['done']) && $_GET['done'] == 'recountposts')\n\t\t$context['maintenance_finished'] = $txt['maintain_recountposts'];\n}", "public function members() {\n return $this->belongsToMany('Rockit\\Models\\Member', 'staffs');\n }", "public function members()\n {\n // Team trỏ về bảng member lấy thông tin của của tất cả member trong team thông qua bảng trung gian TeamMember\n return $this->belongsToMany(Member::class, TeamMember::class, 'team_id', 'member_id');\n }", "public function members()\n {\n return $this->hasMany('App\\Member');\n }", "function getMembers()\r\n {\r\n // define the query\r\n $sql = \"SELECT * FROM member ORDER BY lname\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // execute statement\r\n $statement->execute();\r\n // get result\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function members()\n {\n \treturn $this->hasMany('App\\Member');\n }", "private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\n }", "public function court_members()\n {\n\n $query = \"SELECT * FROM users join users_court on users.id = users_court.user_id WHERE users_court.court1_id = $this->thiscourt or users_court.court2_id = $this->thiscourt\";\n $cart_result = @mysqli_query($this->dbc, $query) or die(\"Couldn't ViewSql users lists:(\" . mysqli_error($this->dbc));\n $this->num_rows = mysqli_num_rows($cart_result);\n\n while ($row = mysqli_fetch_assoc($cart_result)) {\n\n $court_in_list .= $row['user_id'] . \", \";\n\n $this->userlist .= \"<li><a href='users-details.php?user_id=\" . $row['user_id'] . \"'> \" . openssl_decrypt(clean($row['firstname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) . \" \" .\n openssl_decrypt(clean($row['lastname']), ENCRYPTION_METHOD, ENCRYPTION_KEY) .\n \" (\" .$row['status'] .\n \")</a></li>\";\n }\n\n $court_in_list = rtrim($court_in_list, \", \");\n $this->court_in = \"(\" . $court_in_list . \")\";\n\n }", "public function isMember()\n {\n return $this->affiliation != self::AFFILIATION_OUTCAST;\n }", "public function members_list() {\n\t\tif (!in_array($this->type, $this->membership_types)) {\n\t\t\tredirect(base_url('members/list/active'));\n\t\t}\n\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\t\t$data['user_mode'] = $this->session->userdata('mode');\n\t\t$data['members'] = $this->get_members($this->type);\n\t\t$data['api_ver_url'] = FINGERPRINT_API_URL . \"?action=verification&member_id=\";\n\t\t$data['total_count'] = count($this->get_members($this->type));\n\n\t\t$this->breadcrumbs->set([ucfirst($data['type']) => 'members/list/' . $data['type']]);\n\n\t\tif ($this->type === 'guest') {\n\t\t\t$data['guests'] = $this->get_guests();\n\t\t}\n\n\t\t$this->render('list', $data);\n\t}", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "public static function get_event_member_list($pid, $eid, $limit = 12, $start = 0) {\n\t\t\t// #1 default value\n\t\t\t$member_list = array(\n\t\t\t\t\t\t\t\t 'admins' => array(),\n\t\t\t\t\t\t\t\t 'members' => array(\n\t\t\t\t\t\t\t\t \t\t\t\t\t'female' => array(),\n\t\t\t\t\t\t\t\t \t\t\t\t\t'male' => array()\n\t\t\t\t\t\t\t\t \t\t\t\t\t)\n\t\t\t\t\t\t\t\t );\n\t\t\t\n\t\t\t// #2 fill admins\n\t\t\t$member_id_list = array();\n\t\t\t$pid_list = PeopleDAO::get_pid_list_event($eid, Role::Owner);\n\t\t\t$member_id_list = array_merge($member_id_list, $pid_list);\n\t\t\t$pid_list = PeopleDAO::get_pid_list_event($eid, Role::Admin);\n\t\t\t$member_id_list = array_merge($member_id_list, $pid_list);\n\t\t\t$role = PeopleDAO::get_event_role_pid($pid, $eid);\n\t\t\tforeach ($member_id_list as $tpid) \n\t\t\t{\n\t\t\t\t$admin = PeopleDAO::get_people_basic_pid($tpid);\n\t\t\t\t$admin['action'] = array();\n\t\t\t\t$trole = PeopleDAO::get_event_role_pid($tpid, $eid);\n\t\t\t\tif ($role == Role::Owner && $trole == Role::Admin) {\n\t\t\t\t\t$admin['action'][0] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'title' => '取消管理员',\n\t\t\t\t\t\t\t\t\t\t\t\t'class' => 'degrade',\n\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'emember_oper('.$pid.','.$tpid.','.$eid.'\\'degrade\\')'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$admin['action'][1] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'title' => '删除成员',\n\t\t\t\t\t\t\t\t\t\t\t\t'class' => 'delete',\n\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'emember_oper('.$pid.','.$tpid.','.$eid.'\\'delete\\')'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tarray_push($member_list['admins'], $admin);\n\t\t\t}\n\t\t\t\n\t\t\t// #3 fill members\n\t\t\t$member_id_list = PeopleDAO::get_pid_list_event($eid, Role::Member);\n\n\t\t\tif ($limit > 0) {\n\t\t\t\t$member_id_list['female'] = array_slice($member_id_list['female'], $start, $limit);\n\t\t\t\t$member_id_list['male'] = array_slice($member_id_list['male'], $start, $limit);\n\t\t\t}\n\n\t\t\tforeach ($member_id_list as $gender => $gender_id_list)\n\t\t\t{\n\t\t\t\tforeach ($gender_id_list as $tpid) \n\t\t\t\t{\n\t\t\t\t\t$member = PeopleDAO::get_people_basic_pid($tpid);\n\t\t\t\t\t$member['action'] = array();\n\t\t\t\t\t$trole = PeopleDAO::get_event_role_pid($tpid, $eid);\n\t\t\t\t\t\n\t\t\t\t\tif ($role == Role::Owner && $trole == Role::Member) \n\t\t\t\t\t{\n\t\t\t\t\t\t$member['action'][0] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'title' => '升级管理员',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'class' => 'upgrade',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'emember_oper('.$pid.','.$tpid.','.$eid.'\\'upgrade\\')'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$member['action'][1] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'title' => '删除成员',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'class' => 'delete',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'emember_oper('.$pid.','.$tpid.','.$eid.'\\'delete\\')'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($role == Role::Admin && $trole == Role::Member) \n\t\t\t\t\t{\n\t\t\t\t\t\t$member['action'][0] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'title' => '删除成员',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'class' => 'delete',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'emember_oper('.$pid.','.$tpid.','.$eid.'\\'delete\\')'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif( $gender == 'female' )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($member_list['members']['female'], $member);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($member_list['members']['male'], $member);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\treturn $member_list;\n\t\t}", "public function showMembers() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n // Get all of the members from the db.\n $included_members = $memberModel->getAll();\n $data = array(\"included_members\" => $included_members);\n return $this->render(\"listMembers\", $data);\n }", "public function ApproverMembers() {\n\t\tif ($this->owner->CanApproveType == 'OnlyTheseUsers') {\n\t\t\t$groups = $this->owner->ApproverGroups();\n\t\t\t$members = new DataObjectSet();\n\t\t\tif($groups) foreach($groups as $group) {\n\t\t\t\t$members->merge($group->Members());\n\t\t\t}\n\t\t\t\n\t\t\t// Default to ADMINs, if something goes wrong\n\t\t\tif(!$members->Count()) {\n\t\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\t\t$members = $group->Members();\n\t\t\t}\n\t\t\t\n\t\t\treturn $members;\n\t\t} elseif($this->owner->CanApproveType == 'LoggedInUsers') {\n\t\t\treturn Permission::get_members_by_permission('CMS_ACCESS_CMSMain');\n\t\t} else {\n\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\treturn $group->Members();\n\t\t}\n\t}", "public function fetch_web_managers($member_deg_id, $admin_id ) {\r\n \r\n $statement = $this->db->query('SELECT member_user_id, `member_fname`, `member_lname` FROM `team_members` \r\n LEFT JOIN admin_user ON admin_user.admin_user_id= team_members.`admin_user_id`\r\n WHERE `member_deg_id` = '.$member_deg_id.' AND team_members.`admin_user_id` = '.$admin_id.' '); \r\n\t\t\t\t\t\t\t\t\t \r\n \t $statement->setFetchMode(PDO::FETCH_ASSOC);\t\t \r\n\t\t $clients = array(); \r\n\t\t if ($statement->rowCount() > 0) {\t \r\n \r\n while( $row = $statement->fetch() ) { \r\n $clients[] = $row; \r\n \r\n }\r\n return $clients; \r\n } else {\r\n\t\treturn FALSE;\r\n\t\t}\r\n }", "public function findmembers($searchTerm, $campus)\n {\n // Search the members and display output\n $sql = \"SELECT * FROM churchmembers WHERE \n (\";\n \n $splitSearch = split(' ',trim($searchTerm));\n if(count($splitSearch) > 1){\n $sql .=\"firstname LIKE '%\".$splitSearch[0].\"%'\";\n \n if(count($splitSearch) > 2){ \n $sql .= \"AND middlename LIKE '%\".$splitSearch[1].\"%'\n AND surname LIKE '%\".$splitSearch[2].\"%')\";\n $searchcriteria = \"<p>Discovered a first name , middle name and surname possibility - searching specifically</p>\";\n }\n else{\n $sql .= \" AND surname LIKE '%\".$splitSearch[1].\"%')\";\n $searchcriteria = \"<p>Discovered a first name and surname possibility - searching specifically</p>\";\n }\n \n }\n else{\n $sql .=\"\n firstname LIKE '%$searchTerm%'\n OR\n middlename LIKE '%$searchTerm%'\n OR \n surname LIKE '%$searchTerm%'\n OR \n address1 LIKE '%$searchTerm%'\n OR \n address2 LIKE '%$searchTerm%'\n OR \n address4 LIKE '%$searchTerm%'\n OR\n postcode LIKE '%$searchTerm%'\n OR\n homephone LIKE '%$searchTerm%'\n OR \n mobilephone LIKE '%$searchTerm%'\n OR\n email LIKE '%$searchTerm%'\n OR \n medicalInfo LIKE '%$searchTerm%'\n OR\n memberStatus LIKE '%$searchTerm%'\n OR \n workphonenumber LIKE '%$searchTerm%'\n OR \n workemail LIKE '%$searchTerm%'\n OR\n occupation LIKE '%$searchTerm%'\n OR\n employer LIKE '%$searchTerm%'\n )\";\n $searchcriteria = \"<p>Searching broad-term on members area</p>\";\n }\n \n \n if($campus !=''){\n $sql .= \" AND campusid='\".db::escapechars($campus).\"'\";\n }\n $sql .= \"\n ORDER BY surname ASC, firstname ASC\n \";\n \n // Output the table\n $numentities = 0;\n $numentities = db::getnumrows($sql);\n print \"<p>\" . $numentities . \" discovered in members.</p>\";\n if($numentities > 0)\n {\n print \"<h2>Member Results</h2>\";\n print $searchcriteria;\n print \"<p><table class=\\\"searchtable\\\">\";\n print \"<tr><th>Surname</th><th>Firstname</th><th>Address 1</th><th>Postcode</th><th>Action</th></tr>\";\n $data = db::returnallrows($sql);\n foreach($data as $result)\n {\n // Display the member information\n print \"<tr>\";\n print \"<td>\" . $result['surname'] . \"</td>\";\n print \"<td>\" . $result['firstname'] . \"</td>\";\n print \"<td>\" . $result['address1'] . \"</td>\";\n print \"<td>\" . $result['postcode'] . \"</td>\";\n print \"<td><a href=\\\"index.php?mid=225&m=\" . $result['memberID'] . \"\\\">View</a></td>\";\n print \"</tr>\";\n }\n print \"</table>\";\n print \"</p>\";\n }\n \n \n \n return true;\n }", "function members() {\n $results = null;\n pagination::init()->paginator('SELECT * FROM `users` ORDER BY `id` DESC', null, 20, 5, null);\n $results .= '<div class=\"members-header\">Members</div>';\n $results .= '<div class=\"members-content\">';\n if(pagination::init()->count() > 0):\n foreach(pagination::init()->result() as $user):\n $results .= '('.$user->id.') - '.sanitize($user->username).'<hr class=\"members-list-hr\"/>';\n endforeach;\n endif;\n $results .= '</div>';\n $results .= '<div class=\"members-content-pagination\">'.pagination::init()->links().'</div>';\n return $results;\n }", "public function getMemberList($firstname, $surname, $address, $phonenum)\n {\n $firstname = db::escapechars(trim($firstname));\n $surname = db::escapechars(trim($surname));\n $address = db::escapechars(trim($address));\n $phonenum = db::escapechars(trim($phonenum));\n \n \n $sql = \"SELECT * FROM churchmembers WHERE 1=1 \";\n if($firstname != \"\"){\n $sql .= \"AND firstname LIKE '%$firstname%' \";\n }\n if($surname != \"\"){\n $sql .= \"AND surname LIKE '%$surname%' \";\n }\n if($address != \"\"){\n $sql .= \"AND ((address1 LIKE '%$address%') OR (address2 LIKE '%$address%') OR (address3 LIKE '%$address%') OR (address4 LIKE '%$address%')) \";\n }\n if($phonenum != \"\"){\n $sql .= \"AND phonenum LIKE '%$phonenum%' \";\n }\n \n $sql .= \"ORDER BY surname ASC, firstname ASC \";\n \n $result = db::returnallrows($sql);\n return $result;\n \n }", "function roshine_get_participants($roshineid) {\n return false;\n}", "function get_members($gid, $limit = NULL, $approved = NULL) {\n global $db;\n\n $app_query = \"\";\n if ($approved)\n $app_query = \" AND \" . tbl($this->gp_mem_tbl) . \".active='$approved'\";\n\n //List of fields we need from a user table\n $user_fields = get_user_fields();\n\n $user_fields = apply_filters($user_fields, 'get_group_members');\n\n $fields_query = '';\n\n foreach ($user_fields as $field)\n $fields_query .= ',' . tbl('users') . '.' . $field;\n\n $result = $db->select(tbl($this->gp_mem_tbl)\n . \" LEFT JOIN \" . tbl('users')\n . \" ON \" . tbl($this->gp_mem_tbl)\n . \".userid=\" . tbl('users') . \".userid\"\n , tbl($this->gp_mem_tbl) . \".*\" . $fields_query\n , \" group_id='$gid' $app_query\", $limit);\n\n\n\n if ($db->num_rows > 0)\n return $result;\n else\n return false;\n }", "public function isMember()\n {\n if ($this->hasRole('ROLE_ADMIN')) {\n return true;\n }\n\n return $this->getEndDate() > new \\DateTime();\n }", "public function pastManagers()\n {\n return $this->managers()->wherePivot('fired_on', '!=', null);\n }", "public function members()\n {\n return $this->belongsToMany('\\App\\Model\\User', 'joined', 'idproject', 'iduser')->withPivot('role')->orderBy('role', 'ASC');\n }", "public function tournamentsReady()\n {\n $tournaments = $this->tournaments()->get();\n $tournamentsReady = array();\n foreach ($tournaments as $tournament) {\n //if tournament pools ins't empty\n if ($tournament->poolsReady()->toArray()) {\n $tournamentsReady[] = $tournament;\n }\n }\n return $tournamentsReady;\n }", "public function admins()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ADMIN)->get();\n }", "public function listMembers() {\n\t\t/*\n\t\t\tActions should be added to the array like so:\n\t\t\t\t[actions] =>\n\t\t\t\t\t\t[n]\n\t\t\t\t\t\t\t[title] => action title\n\t\t\t\t\t\t\t[controller] => action controller\n\t\t\t\t\t\t\t[action] => action name\n\t\t\t\t\t\t\t[params] => array of params\n\t\t*/\n\t\t$this->__paginateMemberList($this->Member->getMemberSummaryAll(true));\n\t}", "function get_list_members($course, &$nonmembers, &$listgroups)\r\n{\r\n/// First, get everyone into the nonmembers array\r\n if ($students = get_course_students($course->id)) {\r\n foreach ($students as $student) {\r\n $nonmembers[$student->id] = fullname($student, true);\r\n }\r\n unset($students);\r\n }\r\n\r\n if ($teachers = get_course_teachers($course->id)) {\r\n foreach ($teachers as $teacher) {\r\n $prefix = '- ';\r\n if (isteacheredit($course->id, $teacher->id)) {\r\n $prefix = '# ';\r\n }\r\n $nonmembers[$teacher->id] = $prefix.fullname($teacher, true);\r\n }\r\n unset($teachers);\r\n }\r\n\r\n/// Pull out all the members into little arrays\r\n\t$groups = get_groups($course->id);\r\n if ($groups) {\r\n foreach ($groups as $group) {\r\n $countusers = 0;\r\n $listmembers[$group->id] = array();\r\n if ($groupusers = get_group_users($group->id)) {\r\n foreach ($groupusers as $groupuser) {\r\n $listmembers[$group->id][$groupuser->id] = $nonmembers[$groupuser->id];\r\n //unset($nonmembers[$groupuser->id]);\r\n $countusers++;\r\n }\r\n natcasesort($listmembers[$group->id]);\r\n }\r\n $listgroups[$group->id] = $group->name.\" ($countusers)\";\r\n }\r\n natcasesort($listgroups);\r\n }\r\n\r\n natcasesort($nonmembers);\r\n\tif (empty($selectedgroup)) { // Choose the first group by default\r\n if (!empty($listgroups) && ($selectedgroup = array_shift(array_keys($listgroups)))) {\r\n $members = $listmembers[$selectedgroup];\r\n }\r\n } else {\r\n $members = $listmembers[$selectedgroup];\r\n }\r\n\treturn $listmembers;\r\n}", "function getActiveMembershipPlans($userId = 0) {\r\n\t\t$activePlans = array();\r\n\t\t$activePlans[] = 0 ;\r\n\t\tif (!$userId) {\r\n\t\t\t$user = & JFactory::getUser() ;\r\n\t\t\t$userId = $user->get('id');\r\n\t\t}\t\t\r\n\t\tif ($userId > 0) {\t\t\t\r\n\t\t\t$db = & JFactory::getDBO() ;\r\n\t\t\t$sql = 'SELECT plan_id FROM #__osmembership_subscribers WHERE user_id='.$userId.' AND DATE(from_date) <= CURDATE() AND DATE(to_date) >= CURDATE() and published=1';\r\n\t\t\t$db->setQuery($sql);\r\n\t\t\tif (version_compare(JVERSION, '3.0', 'ge'))\r\n\t\t\t\t$activePlans = array_merge($activePlans, $db->loadColumn()) ;\r\n\t\t\telse\r\n\t\t\t\t$activePlans = array_merge($activePlans, $db->loadResultArray()) ;\r\n\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\treturn $activePlans ;\r\n\t}", "public function participants()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_PARTICIPANT)->get();\n }", "public function show_memberships()\n {\n $this->show_objects('Booking_membership');\n }", "public function filtermember() {\n $response = $this->Allusers_model->filtermember();\n return $response;\n }", "function isLeagueMember(\n $user_id,\n $change_to_league, \n &$ref_status_text = ''\n){\n $mysql = \"\n select 88 as ismember\n from users\n where id = ?\n and league_id like concat('%-',?,'-%')\";\n \n $junk = 0;\n $is_member = false;\n $ref_status_text = '';\n while (1) {\n if (!$ans = runSql($mysql, array(\"ii\",$user_id, $change_to_league), 0, $ref_status_text)) {\n if ($ans === false) {\n break;\n }\n if ($ans === null) {\n $is_member = null;\n break;\n }\n }\n\n if (sizeof($ans) == 1) {\n $junk = $ans[0]['ismember'];\n $is_member = ($junk == 88) ? true : false;\n }\n \n $status = 1;\n break;\n }\n return $is_member;\n}", "function getChamberMembers($chamberID) {\r\n $sql = $this->db->prepare(\"SELECT UserID, firstname, lastname, email, businessname, expiry, archived, type\r\n FROM USER LEFT OUTER JOIN BUSINESS ON USER.businessID=BUSINESS.businessID WHERE USER.chamberID=:chamber_id\r\n ORDER BY lastname;\");\r\n if ($sql->execute(array(\r\n 'chamber_id' => $chamberID,\r\n ))) {\r\n return $sql->fetchall(PDO::FETCH_ASSOC);\r\n }\r\n return $chamberID;\r\n }", "public function remainingKnights()\n {\n return array_diff($this->guestList, $this->seated);\n }", "public function members()\n {\n return $this->belongsToMany(Member::class, 'event_members')->withPivot('role');\n }", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "function isMember ($name) {\n\tglobal $MEMBERS; return in_array (strtolower ($name), array_map ('strtolower', $MEMBERS));\n}", "function getCompatibleCandidates($searchee = array(), $criteria=array(), $limit=-1){\t\r\n\t\t$action=\"profile_search\";\r\n\t\t$registered_date=null;\r\n\t\tforeach($criteria as $key=>$value){ //plugs variables to place\r\n\t\t\tif ($key==\"action\"){\r\n\t\t\t\t$action = $value;\r\n\t\t\t}else if ($key==\"registered_date\"){\r\n\t\t\t\t$registered_date = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($action==\"searchbydateprofile\"){\r\n\t\t\t\r\n\t\t\t$condition = array(\"DATE(Member.created) = '\".$registered_date.\"'\",\r\n\t\t\t\t\t\t\t\t \"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\t\r\n\t\t}else if ($action==\"all\"){\r\n\t\t\t$condition = array(\"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t$this->controller->Member->unbindModel(array(\"hasMany\"=>array(\"GiftAvailTransaction\", \"Notification\", \"CreditCard\", \"PrivateMessage\", \"SentGift\", \"SubscriptionTransaction\", \"MemberProfileAnswer\", \"Album\", \"InMyOwnWordsAnswer\", \"MembersInterest\", \"Connection\", \"ReceiveMessage\", \"ShoppedItem\")));\r\n\t\tif ($limit==-1){ \r\n\t\t\t$members = $this->controller->Member->find(\"all\", \r\n\t\t\t\t\t\tarray(\"conditions\"=>$condition));\r\n\t\t}else{\r\n\t\t\t$members = $this->controller->Member->find(\"all\", array(\"conditions\"=>$condition, \"limit\"=>$limit));\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$matches = array();\r\n\t\tforeach ($members as $member){\r\n\r\n\t\t\t$passed = true;\r\n\t\t\tif (isset($searchee[\"MemberSetting\"])){\r\n\t\t\t\tif ($this->validAge($searchee,$member)&&$this->validDistance($searchee,$member)){\r\n\t\t\t\t\t$passed = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$passed = true;\r\n\t\t\t}\r\n\t\t\tif ($passed){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t$data[\"Match\"][\"matched_id\"] = $member[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"member_id\"] = $searchee[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"compatibility\"] = $this->getCompatibilityByWeight ($searchee, $member);\r\n\t\t\t\tif ($data[\"Match\"][\"compatibility\"]!=0){\r\n\t\t\t\t\t$matches[] = $this->controller->Match->save_match($data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $matches;\t\r\n\t\t\r\n\t}", "function showUnmarried(){\n $members= Member::where('status', 0)->get();\n return view('Showpage', compact('members'));\n }", "public function all_about_us_member_info_for_admin(){\r\n $query = \"SELECT * FROM tbl_aboutus_team ORDER BY team_member_id DESC\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function members()\n\t{\n return $this->belongsToMany('App\\Models\\User', 'team_user')\n ->withPivot(['is_admin']);\n\t}", "public function memberList($eid = 1) {\n $config = $this->config('simple_conreg.settings.'.$eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::badgeTypes($eid, $config);\n $digits = $config->get('member_no_digits');\n\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'Name':\n $order = 'name';\n break;\n case 'Country':\n $order = 'country';\n break;\n case 'Type':\n $order = 'badge_type';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content = array();\n\n //$content['#markup'] = $this->t('Unpaid Members');\n\n $content['message'] = array(\n '#cache' => ['tags' => ['simple-conreg-member-list'], '#max-age' => 600],\n '#markup' => $this->t('Members\\' public details are listed below.'),\n );\n\n $rows = [];\n $headers = [\n 'member_no' => ['data' => t('Member No'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'member_name' => ['data' => t('Name'), 'field' => 'name'],\n 'badge_type' => ['data' => t('Type'), 'field' => 'm.badge_type', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_country' => ['data' => t('Country'), 'field' => 'm.country', 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],\n ];\n $total = 0;\n\n foreach ($entries = SimpleConregStorage::adminPublicListLoad($eid) as $entry) {\n // Sanitize each entry.\n $badge_type = trim($entry['badge_type']);\n $member_no = sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n $member = ['member_no' => $badge_type . $member_no];\n switch ($entry['display']) {\n case 'F':\n $fullname = trim(trim($entry['first_name']) . ' ' . trim($entry['last_name']));\n if ($fullname != trim($entry['badge_name']))\n $fullname .= ' (' . trim($entry['badge_name']) . ')';\n $member['name'] = $fullname;\n break;\n case 'B':\n $member['name'] = trim($entry['badge_name']);\n break;\n case 'N':\n $member['name'] = t('Name withheld');\n break;\n }\n $member['badge_type'] = trim(isset($types[$badge_type]) ? $types[$badge_type] : $badge_type);\n $member['country'] = trim(isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country']);\n\n // Set key to field to be sorted by.\n if ($order == 'member_no')\n $key = $member_no;\n else\n $key = $member[$order] . $member_no; // Append member number to ensure uniqueness.\n if (!empty($entry['display']) && $entry['display'] != 'N' && !empty($entry['country'])) {\n $rows[$key] = $member;\n }\n $total++;\n }\n\n // Sort array by key.\n if ($direction == 'DESC')\n krsort($rows);\n else\n ksort($rows);\n\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n //'#footer' => array(t(\"Total\")),\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n\n $content['summary_heading'] = [\n '#markup' => $this->t('Country Breakdown'),\n '#prefix' => '<h2>',\n '#suffix' => '</h2>',\n ];\n\n $rows = array();\n $headers = array(\n t('Country'),\n t('Number of members'),\n );\n $total = 0;\n foreach ($entries = SimpleConregStorage::adminMemberCountrySummaryLoad($eid) as $entry) {\n if (!empty($entry['country'])) {\n // Sanitize each entry.\n $entry['country'] = trim($countryOptions[$entry['country']]);\n $rows[] = $entry;\n $total += $entry['num'];\n }\n }\n //Add a row for the total.\n $rows[] = array(t(\"Total\"), $total);\n $content['summary'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n\n return $content;\n }", "public function OrganisationMembers() {\n\t\t$memberIDs = $this->RelatedMembers()\n\t\t\t->filter(['Type.Code' => ['MJO', 'MRO', 'MEM', 'MCO']])\n\t\t\t->column('FromModelID');\n\n\t\t$uniquemembers = Member::get()->filter(['ID' => $memberIDs])->distinct(true)->setQueriedColumns(array('ID'));\n\n\t\treturn $uniquemembers;\n\t}", "function showMarried(){\n $members= Member::where('status', 1)->get();\n return view('Showpage', compact('members'));\n }", "function stop_members_from_renewing($okay)\n{\n global $current_user;\n // If something else isn't okay, stop from running this code further.\n if (!$okay) {\n return $okay;\n }\n // If the user doesn't have a membership level carry on with checkout.\n if (!pmpro_hasMembershipLevel()) {\n return true;\n }\n // Check if the user's current membership level is the same for checking out.\n if (pmpro_hasMembershipLevel($_REQUEST['level'])) { // Change level ID to a different level.\n pmpro_setMessage('This is your current membership level. Please select a different membership level.', 'pmpro_error');\n return false;\n }\n if (PMPro_Alveoles::has_commitment_level()) {\n $user_id = $current_user->ID;\n $membership_levels = pmpro_getMembershipLevelsForUser( $user_id );\n /** @var PMPro_Membership_Level $level */\n foreach ($membership_levels as $l) {\n if (PMPro_Alveoles::is_with_commitment($l->ID)) {\n if ($date = PMPro_Alveoles::contracted($l->ID)) { //still engaged\n pmpro_setMessage(PMPro_Alveoles::getContractedMessage($date,$l->ID), 'pmpro_error');\n return false;\n }\n }\n }\n }\n return true;\n}", "function get_member_names()\n {\n \t//-----------------------------------------\n \t// INIT\n \t//-----------------------------------------\n \t\n \t$name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) );\n \t\n \t//--------------------------------------------\n\t\t// Load extra db cache file\n\t\t//--------------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );\n\t\t\n \t//-----------------------------------------\n \t// Check length\n \t//-----------------------------------------\n \t\n \tif ( strlen( $name ) < 3 )\n \t{\n \t\t$this->return_null();\n \t}\n \t\n \t//-----------------------------------------\n \t// Try query...\n \t//-----------------------------------------\n \t\n \t$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n \t//-----------------------------------------\n \t// Got any results?\n \t//-----------------------------------------\n \t\n \tif ( ! $this->ipsclass->DB->get_num_rows() )\n \t\t{\n \t\t$this->return_null();\n \t}\n \t\n \t$names = array();\n\t\t$ids = array();\n\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$names[] = '\"'.$r['members_display_name'].'\"';\n\t\t\t$ids[] = intval($r['id']);\n\t\t}\n\t\t\n\t\t$this->print_nocache_headers();\n\t\t@header( \"Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}\" );\n\t\tprint \"returnSearch( '\".str_replace( \"'\", \"\", $name ).\"', new Array(\".implode( \",\", $names ).\"), new Array(\".implode( \",\", $ids ).\") );\";\n\t\texit();\n }", "public function availablePlans()\n {\n return Spark::teamPlans();\n }", "function getMembers(){\n\t\treturn $this->members;\n\t}", "function render_active_members($sql){\n $members = $sql->QueryItem(\n \"select count(*) from ppl_online where member = true AND activity > (now() - CAST('30 minutes' AS interval))\");\n $membersTotal = $sql->QueryItem(\"select count(*) from ppl_online where member = true\");\n return\n \"<div class='active-members-count'>\n Active Members: \".($members?$members : '0').\" / \".($membersTotal?$membersTotal : '0').\"\n </div>\";\n}", "function getMembers()\n {\n // define the query\n $sql = \"SELECT * FROM member ORDER BY lname, fname\";\n\n // prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n // no params to bind\n\n // execute the statement\n $statement->execute();\n\n // get the result\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getActiveMemberships()\n\t{\n\t\tif (!Yum::hasModule('membership'))\n\t\t\treturn array();\n\n\t\tYii::import('application.modules.role.models.*');\n\t\tYii::import('application.modules.membership.models.*');\n\n\t\t$roles = array();\n\n\t\tif ($this->memberships)\n\t\t\tforeach ($this->memberships as $membership) {\n\t\t\t\tif ($membership->end_date > time())\n\t\t\t\t\t$roles[] = $membership->role;\n\t\t\t}\n\n\t\treturn $roles;\n\t}", "public function testListMembers()\n {\n }", "public function getListMemberLeftRight(){\n $this->setPageHeader('All Member', 'All Member with left and right');\n if (!$this->user->hasAccessRoute('admin.member.leftright')) return view('404');\n return view('admin.member.leftright');\n }", "public function testHasMany()\n {\n $plan = $this->factory(Plan::class)->create();\n\n $this->factory(Member::class, 3)\n ->state(PremiumMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->factory(Member::class)\n ->state(RegularMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->assertCount(3, $plan->members->filter(function ($member) {\n return $member instanceof PremiumMember;\n }));\n\n $this->assertCount(1, $plan->members->filter(function ($member) {\n return $member instanceof RegularMember;\n }));\n }", "static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }", "public function applicants()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_APPLICANT)->get();\n }", "protected function getMemberNames()\n {\n $arrMembers = array();\n\n $objMembers = $this->Database\n ->execute(\"SELECT id, username, firstname, lastname\n\t\t\t FROM tl_member\n\t\t\t WHERE login = 1\"\n );\n\n while ($objMembers->next()) {\n $varId = $objMembers->id;\n $varName = $objMembers->firstname . ' ' . $objMembers->lastname;\n\n $arrMembers[$varId] = $varName;\n }\n\n return $arrMembers;\n }", "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === '[email protected]') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "function cs_is_member($users_id)\r\n{\r\n\tsettype($users_id, 'integer');\r\n\t\r\n\tif ($users_id <= 0)\r\n\t\treturn false;\r\n\t\r\n\t$where = 'm.users_id = '.$users_id.' AND us.users_delete = 0 AND us.users_active = 1 AND sq.clans_id = 1';\r\n\t$count = cs_sql_count(__FILE__, 'members m LEFT JOIN {pre}_users us ON m.users_id = us.users_id LEFT JOIN {pre}_squads sq ON m.squads_id = sq.squads_id', $where);\r\n\t\r\n\tif ($count > 0)\r\n\t\treturn true;\r\n\t\r\n\treturn false;\r\n}", "function getHouseholdAdmin(){\n\t\t$members = $this->getMembers();\n\t\tforeach ($members as $member) {\n\t\t\t$level = $member->getUserLevel();\n\t\t\tif($level == 'admin'){\n\t\t\t\t$admin = $member;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $admin;\n\t}", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( \"core\",\"members\" );\n\t}", "public function readActiveMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \"A\"');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "public function judges()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_JUDGE)->get();\n }", "public function getStaffMembers()\n\t{\n\t\treturn $this->staff->members();\n\t}", "public function getNursings()\n {\n $db = PDOController::getInstance();\n $req = $db->prepare('SELECT lastname, firstname, email, role ,id \n FROM persons \n WHERE role =?');\n $req->execute([1]);\n return $req->fetchAll();\n }", "function getElectedOfficials($member_id)\n\t\t{ \n\t\t\t$query = 'select * from tbl_elected_officials \n\t\t\twhere ElectedOfficialID \n\t\t\tin (select ElectedOfficialID from tbl_subscriber_elected_officer where subscriber_id = \"'.$member_id.'\")';\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\treturn $this->_getPageArray($rs, 'Member');\n\t\t}", "public function members(){\n return $this->hasMany('App\\Member');\n }", "public function readCanceledMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from members, memberstatus where members.MemberID = memberstatus.MemberID and StatusCode = \"C\"');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "function getMembers()\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT * FROM Members ORDER BY lname\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //4.Execute statement\r\n $statement->execute();\r\n\r\n //5. Return the results\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n }", "public static function onlineStudent(){\n $students = Roll::join('admissions','admissions.id', '=' , 'rolls.student_id' )\n ->where(['username' => Session::get('studentSession')])->first();\n \n return $students;// we will join the student with admission okay to have all his/her data's\n }", "public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}", "function lobby_membersapi_getMemberships($args)\r\n{\r\n\t$uid = (int)$args['uid'];\r\n\tif ($uid == 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t \t$tables = pnDBGetTables();\r\n\t \t$column = $tables['lobby_members_column'];\r\n\t \t$where = $column['uid'].\" = '\".$uid.\"'\";\r\n\t\t$result = DBUtil::selectObjectArray('lobby_members',$where);\r\n\t\t$r = array();\r\n\t\tforeach ($result as $item) {\r\n\t\t\t$r[]=$item['gid'];\r\n\t\t}\r\n\t\treturn $r;\r\n\t}\r\n}", "public function getMembers()\n {\n if (!$this->has('memberList')) {\n throw new NoMemberListException('Clan instance has no memberlist property.');\n } else {\n return $this->get('memberList');\n }\n }", "public function RoomsAvailablesSearchManger($start,$end,$max_person)\n\t\t{\n\t\t\t\t$sql = \"Select rooms.room_id, rooms.room_name,rooms.max_person,rooms.end_date\n\t\t\t\t\t\t\t\tFrom rooms\n\t\t\t\t\t\t\t\tWhere rooms.max_person >= '$max_person' AND rooms.room_id Not In (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect room_ids\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFrom bookings\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWhere booking_start_date <= '$end'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAnd DATE_ADD( booking_end_date, INTERVAL -1 DAY ) >= '$start'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tOrder By rooms.room_id\";\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result_array();\n\n \t\t}" ]
[ "0.5922946", "0.5792282", "0.57002634", "0.5632166", "0.55439156", "0.54254216", "0.53389496", "0.5336526", "0.52803427", "0.52668625", "0.5257534", "0.5208803", "0.5185166", "0.5182264", "0.51785356", "0.5159715", "0.51547617", "0.51544523", "0.51538944", "0.5151475", "0.51299846", "0.50901276", "0.50855684", "0.50793946", "0.5077028", "0.5063036", "0.5054307", "0.5050418", "0.5036016", "0.50304705", "0.5027825", "0.5025931", "0.5020867", "0.5020085", "0.50076735", "0.50032806", "0.50025135", "0.5000412", "0.49979994", "0.49899516", "0.4976744", "0.49759725", "0.49704754", "0.49674016", "0.4943243", "0.49343157", "0.49329716", "0.49305803", "0.49281752", "0.49259225", "0.48989493", "0.48962694", "0.48804748", "0.4879897", "0.48791417", "0.4878905", "0.48737994", "0.48716423", "0.48639596", "0.48494297", "0.4845482", "0.48407102", "0.48366904", "0.4821405", "0.48197782", "0.4816411", "0.4809215", "0.48055315", "0.4801541", "0.48013276", "0.479689", "0.47883502", "0.47879383", "0.4782516", "0.4778054", "0.47775626", "0.4775975", "0.47743052", "0.47604284", "0.4758519", "0.47484046", "0.47483522", "0.47480577", "0.47445086", "0.47426736", "0.47415662", "0.47365692", "0.4734286", "0.47253564", "0.47231716", "0.47231176", "0.47180817", "0.47150058", "0.47018734", "0.46966535", "0.46906656", "0.46899453", "0.46856874", "0.46854958", "0.46794558", "0.4674333" ]
0.0
-1
Get the most recent vote positions for a specific member of the House of Representatives or Senate
public function getSpecificMemberVotePositions(string $memberId) { $this->formatValidator->isValidMemberIdFormat($memberId); $uriStub = "{$memberId}/votes.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFriendLastedPosting() {\n $sql = \"SELECT b.*,\n c.name \n FROM member_posting a\n INNER JOIN posting b \n ON b.id = a.posting_id\n INNER JOIN member c \n ON c.id = a.member_id\n WHERE a.member_id IN (\n SELECT friend_id FROM member_friend WHERE member_id = ?)\n ORDER BY b.last_update_time DESC LIMIT 10\";\n return getAll($sql, [getLogin()['mid']]);\n}", "function getVotingMember() {\n\t\treturn Member::get()->byID($this->MemberID);\n\t}", "function getDocumentVotedMemberList()\n\t{\n\t\t$args = new stdClass;\n\t\t$document_srl = Context::get('document_srl');\n\t\tif(!$document_srl) return new Object(-1,'msg_invalid_request');\n\n\t\t$point = Context::get('point');\n\t\tif($point != -1) $point = 1;\n\n\t\t$oDocumentModel = getModel('document');\n\t\t$columnList = array('document_srl', 'module_srl');\n\t\t$oDocument = $oDocumentModel->getDocument($document_srl, false, false, $columnList);\n\t\t$module_srl = $oDocument->get('module_srl');\n\t\tif(!$module_srl) return new Object(-1, 'msg_invalid_request');\n\n\t\t$oModuleModel = getModel('module');\n\t\t$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);\n\t\tif($point == -1)\n\t\t{\n\t\t\tif($document_config->use_vote_down!='S') return new Object(-1, 'msg_invalid_request');\n\t\t\t$args->below_point = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($document_config->use_vote_up!='S') return new Object(-1, 'msg_invalid_request');\n\t\t\t$args->more_point = 0;\n\t\t}\n\n\t\t$args->document_srl = $document_srl;\n\n\t\t$output = executeQueryArray('document.getVotedMemberList',$args);\n\t\tif(!$output->toBool()) return $output;\n\n\t\t$oMemberModel = getModel('member');\n\t\tif($output->data)\n\t\t{\n\t\t\tforeach($output->data as $k => $d)\n\t\t\t{\n\t\t\t\t$profile_image = $oMemberModel->getProfileImage($d->member_srl);\n\t\t\t\t$output->data[$k]->src = $profile_image->src;\n\t\t\t}\n\t\t}\n\n\t\t$this->add('voted_member_list',$output->data);\n\t}", "function mostUpvotedPosts(object $pdo): array\n{\n\n $statement = $pdo->prepare('SELECT posts.*, upvotes.post_id \n FROM posts INNER JOIN upvotes \n ON posts.id = upvotes.post_id \n GROUP BY post_id ORDER BY COUNT(*) DESC');\n $statement->execute();\n\n $posts = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $posts;\n}", "public function getLatest()\n\t{\n\t\t$query = $this->getEntityManager()->createQuery('\n\t\t\tSELECT e\n\t\t\tFROM Btw\\Bundle\\PersistenceBundle\\Entity\\Election e\n\t\t\tORDER BY e.date DESC');\n\n\t\t$query->setMaxResults(1);\n\t\t$results = $query->getResult();\n\t\treturn is_array($results) ? $results[0] : null;\n\t}", "public function ShowPois($db, $bounds){\n $stmt = $db->prepare(\"SELECT pois.*, users.f_name, users.s_name\n FROM pois, users\n WHERE pois.user_id = users.user_id AND\n longitude < :east AND longitude > :west AND\n latitude > :south AND latitude < :north\n ORDER BY votes DESC\n LIMIT 3\"); \n $stmt->bindParam(':north',$bounds[\"north\"]);\n $stmt->bindParam(':east',$bounds[\"east\"]);\n $stmt->bindParam(':south',$bounds[\"south\"]);\n $stmt->bindParam(':west',$bounds[\"west\"]);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n //return $bounds[\"north\"];\n }", "function getVotes(){\n\t\t\t$date = date(\"Y-m-d\", strtotime(\"-1 day\"));\n\t\t\t$url = \"https://www.govtrack.us/api/v2/vote?created__gt=$date\";\n return json_decode(file_get_contents($url));\n }", "static function fetchTopFiveMostVisited($pdo){\n\n try {\n $sql = \"select product_real_id , count(_id) as instance from (\n select _id,concat(cast(company_id as CHARACTER(30)) ,\n cast(product_id as CHARACTER(30))) as product_real_id \n from Tracking) as innerTable\n group by product_real_id\n order by instance desc\n limit 5\";\n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll();\n }catch (PDOException $e) {\n\n return null;\n }\n }", "public static function juniorCandidate()\n {\n echo json_encode(\\Models\\Member::juniorCandidate( ));\n //echo json_encode( $members );\n //var_dump($idJunior);\n }", "public function getVotes() {\n\n\t\t//DataBase connection & query\n\t\t$db = Dbconn::getDB();\n\t\t$query = \"SELECT * FROM votes\";\n\t\t$result = $db->query($query);\n\n\t\t$votes = array();\n\n\t\tforeach ($result as $row)\n\t\t{\n\t\t\t$vote = new Vote(\n\t\t\t\t\t\t\t$row['vote_id'],\n\t\t\t\t\t\t\t$row['caselaw_id'],\n\t\t\t\t\t\t\t$row['votes_up'],\n\t\t\t\t\t\t\t$row['votes_down'],\n\t\t\t\t\t\t\t$row['user_id']\n\t\t\t\t\t\t\t);\n\t\t\t$votes[] = $vote;\n\t\t}\n\n\t\treturn $votes;\n\t}", "function xstats_getLastShipOwnerIndexAtTurn( $gameId, $shipId ) {\n $query = \"SELECT ownerindex FROM skrupel_xstats_shipowner WHERE gameid=\".$gameId.\" AND shipid=\".$shipId.\" ORDER BY turn DESC\";\n $result = @mysql_query($query) or die(mysql_error());\n if( mysql_num_rows($result)>0 ) {\n $result = @mysql_fetch_array($result);\n return( $result['ownerindex']);\n }\n}", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "function loadPos($pdo, $profile_id) {\n $stmt = $pdo->prepare('SELECT * FROM Position \n WHERE profile_id = :prof ORDER BY rank');\n $stmt->execute(array( ':prof' => $profile_id));\n $positions = array();\n while ( $row = $stmt->fetch(PDO::FETCH_ASSOC) ) {\n $positions[] = $row;\n }\n return $positions;\n}", "function getVotes($pdo) {\n\t$statement = $pdo->prepare\n\t(\"SELECT vote_id, post_id, user_id\n\tFROM votes\n\tWHERE post_id = post_id\");\n\n\t$statement->execute();\n\t$votes = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tif (!$statement) {\n\t\t\tdie(var_dump($pdo->errorInfo()));\n\t\t}\n\n\treturn $votes;\n}", "function getHouseholdMembers($pdo){\n\t\t$getMembers =\n\t\t$pdo->prepare('SELECT UserID FROM hhm_users WHERE HouseholdID =:householdid');\n\t\t$getMembers->execute(array('householdid'=>\"$this->householdId\"));\n\t\t$info = $getMembers->fetchAll(PDO::FETCH_COLUMN);\n\t\t$members =[];\n\t\tforeach ($info as $key => $id){\n\t\t\t$member = new Member($id, $pdo);\n\t\t\tarray_push($members, $member);\n\t\t}\n\t\n\t\t$this->members = $members;\n\t}", "public function getTopMembers(): array\n {\n $statement = \"SELECT * FROM \" . $this->table . \" ORDER BY id LIMIT \".self::MEMBERLIMIT;\n return $this->pdo->query($statement)->fetchAll();\n }", "public function Roommates()\n\t{\n\t\t$res = $this->Residence();\n\t\t$roommates = array();\n\n\t\tif ($this->HasCustomResidence())\n\t\t{\n\t\t\t$addr = $res->Address;\n\t\t\t$city = $res->City;\n\t\t\t$state = $res->State;\n\t\t\t$zip = $res->PostalCode;\n\t\t\t$r = DB::Run(\"SELECT Members.ID FROM Members INNER JOIN Residences \".\n\t\t\t\t\t\t\"ON Members.ResidenceID=Residences.ID WHERE Residences.Address='$addr' \".\n\t\t\t\t\t\t\"AND Residences.City='$city' AND Residences.State='$state' \".\n\t\t\t\t\t\t\"AND Residences.PostalCode='$zip'\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$r = DB::Run(\"SELECT ID FROM Members WHERE ResidenceID='{$this->ResidenceID}' AND Apartment='{$this->Apartment}' LIMIT 9\");\n\t\t\twhile ($row = mysql_fetch_array($r))\n\t\t\t\tif ($row['ID'] != $this->ID)\n\t\t\t\t\tarray_push($roommates, Member::Load($row['ID']));\n\t\t}\n\n\t\treturn $roommates;\n\t}", "protected function getMostPopulatedTowns()\n {\n $lViewData = $this->getDoctrine()->getManager()\n ->getRepository(\"WegeooDataLayerBundle:City\")->getCitiesFromPopulation(48);\n\n return $lViewData;\n }", "public function findByMember( $member )\n\t{\n\t\treturn \\IPS\\Db::i()->select( 'ip_address AS ip, 1 AS count, joined AS first, joined AS last', 'core_members', array( 'member_id=?', $member->member_id ) )->setKeyField( 'ip' );\n\t}", "public function getFirstLvPoint()\n {\n $sql = \"SELECT max(point) FROM casino_user_point \";\n return $this->_rdb->fetchOne($sql);\n }", "public function getLast2Opinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n ORDER BY o.pubDate LIMIT 2;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "public function get_competitors(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT competitorID FROM tournamentCompetitors WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "function getCompatibleCandidates($searchee = array(), $criteria=array(), $limit=-1){\t\r\n\t\t$action=\"profile_search\";\r\n\t\t$registered_date=null;\r\n\t\tforeach($criteria as $key=>$value){ //plugs variables to place\r\n\t\t\tif ($key==\"action\"){\r\n\t\t\t\t$action = $value;\r\n\t\t\t}else if ($key==\"registered_date\"){\r\n\t\t\t\t$registered_date = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($action==\"searchbydateprofile\"){\r\n\t\t\t\r\n\t\t\t$condition = array(\"DATE(Member.created) = '\".$registered_date.\"'\",\r\n\t\t\t\t\t\t\t\t \"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\t\r\n\t\t}else if ($action==\"all\"){\r\n\t\t\t$condition = array(\"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t$this->controller->Member->unbindModel(array(\"hasMany\"=>array(\"GiftAvailTransaction\", \"Notification\", \"CreditCard\", \"PrivateMessage\", \"SentGift\", \"SubscriptionTransaction\", \"MemberProfileAnswer\", \"Album\", \"InMyOwnWordsAnswer\", \"MembersInterest\", \"Connection\", \"ReceiveMessage\", \"ShoppedItem\")));\r\n\t\tif ($limit==-1){ \r\n\t\t\t$members = $this->controller->Member->find(\"all\", \r\n\t\t\t\t\t\tarray(\"conditions\"=>$condition));\r\n\t\t}else{\r\n\t\t\t$members = $this->controller->Member->find(\"all\", array(\"conditions\"=>$condition, \"limit\"=>$limit));\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$matches = array();\r\n\t\tforeach ($members as $member){\r\n\r\n\t\t\t$passed = true;\r\n\t\t\tif (isset($searchee[\"MemberSetting\"])){\r\n\t\t\t\tif ($this->validAge($searchee,$member)&&$this->validDistance($searchee,$member)){\r\n\t\t\t\t\t$passed = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$passed = true;\r\n\t\t\t}\r\n\t\t\tif ($passed){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t$data[\"Match\"][\"matched_id\"] = $member[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"member_id\"] = $searchee[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"compatibility\"] = $this->getCompatibilityByWeight ($searchee, $member);\r\n\t\t\t\tif ($data[\"Match\"][\"compatibility\"]!=0){\r\n\t\t\t\t\t$matches[] = $this->controller->Match->save_match($data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $matches;\t\r\n\t\t\r\n\t}", "public function findByMember( $member )\n\t{\n\t\t$class = $this->class;\n\t\t\n\t\tif ( ! \\IPS\\Application::appIsEnabled( $class::$application ) )\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\tif( !isset( $class::$databaseColumnMap['ip_address'] ) OR !$class::$databaseColumnMap['ip_address'] )\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\treturn \\IPS\\Db::i()->select( \"{$class::$databasePrefix}{$class::$databaseColumnMap['ip_address']} AS ip, COUNT(*) AS count, MIN({$class::$databasePrefix}{$class::$databaseColumnMap['date']}) AS first, MAX({$class::$databasePrefix}{$class::$databaseColumnMap['date']}) AS last\", $class::$databaseTable, array( \"{$class::$databasePrefix}{$class::$databaseColumnMap['author']}=?\", $member->member_id ), NULL, NULL, \"{$class::$databasePrefix}{$class::$databaseColumnMap['ip_address']}\" )->setKeyField( 'ip' );\n\t}", "public function getPostsVotadosPositivos()\n {\n return $this->getPostsVotados()->joinWith('votos')->where(['positivo' => true, 'votos.usuario_id' => $this->id])->orderBy('created_at desc');\n }", "function show_most_viewed()\n\t{\n\t\tglobal $required_position, $userdata, $template, $db, $SID, $lang, $phpEx, $garage_config, $board_config;\n\t\n\t\tif ( $garage_config['mostviewed_on'] != TRUE )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$template_block = 'block_'.$required_position;\n\t\t$template_block_row = 'block_'.$required_position.'.row';\n\t\t$template->assign_block_vars($template_block, array(\n\t\t\t'BLOCK_TITLE' => $lang['Most_Viewed_Vehicle'],\n\t\t\t'COLUMN_1_TITLE' => $lang['Vehicle'],\n\t\t\t'COLUMN_2_TITLE' => $lang['Owner'],\n\t\t\t'COLUMN_3_TITLE' => $lang['Views'])\n\t\t);\n\t\n\t // What's the count? Default to 10\n\t $limit = $garage_config['mostviewed_limit'] ? $garage_config['mostviewed_limit'] : 10;\n\t \t\t \t\t\n\t \t$sql = \"SELECT g.id, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle, \n\t g.member_id, g.views AS POI, m.username \n\t FROM \" . GARAGE_TABLE . \" AS g \n\t LEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id \n\t LEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n\t LEFT JOIN \" . USERS_TABLE . \" AS m ON g.member_id = m.user_id\n\t\t\tWHERE makes.pending = 0 AND models.pending = 0\n\t ORDER BY POI DESC LIMIT $limit\";\n\t \t\t \n\t \tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, \"Could not query vehicle information\", \"\", __LINE__, __FILE__, $sql);\n\t\t}\n\t \t\t \n\t \twhile ( $vehicle_data = $db->sql_fetchrow($result) )\n\t \t{\n\t\t\t$template->assign_block_vars($template_block_row, array(\n\t\t\t\t'U_COLUMN_1' => append_sid(\"garage.$phpEx?mode=view_vehicle&amp;CID=\".$vehicle_data['id'].\"\"),\n\t\t\t\t'U_COLUMN_2' => append_sid(\"profile.$phpEx?mode=viewprofile&amp;\".POST_USERS_URL.\"=\".$vehicle_data['member_id'].\"\"),\n\t\t\t\t'COLUMN_1_TITLE' => $vehicle_data['vehicle'],\n\t\t\t\t'COLUMN_2_TITLE' => $vehicle_data['username'],\n\t\t\t\t'COLUMN_3' => $vehicle_data['POI'])\n\t\t\t);\n\t \t}\n\t\n\t\t$required_position++;\n\t\treturn ;\n\t}", "public function getTopCitation() {\n $sql = \"SELECT c.cit_num, c.per_num, c.per_num_etu, c.per_num_valide, c.cit_libelle, c.cit_valide, c.cit_date, c.cit_date_depo, c.cit_date_valide FROM citation c JOIN vote v ON v.cit_num=c.cit_num WHERE cit_valide=1 AND cit_date_valide IS NOT NULL GROUP BY c.cit_num HAVING AVG(vot_valeur) >=ALL (SELECT AVG(vot_valeur) as Moyenne FROM citation c JOIN vote v ON v.cit_num=c.cit_num WHERE cit_valide=1 AND cit_date_valide IS NOT NULL GROUP BY c.cit_num )\";\n $requete = $this->db->prepare($sql);\n\n $requete->execute();\n\n $tmp = $requete->fetch(PDO::FETCH_OBJ);\n $tmp ? $resultat = new Citation($tmp) : $resultat = null;\n return $resultat;\n }", "function get_best_polls_reviewer($reviewer, $limit)\n{\n $reviewer = (int)$reviewer;\n $query = mysql_query(\"SELECT ID, Reviewee, Score FROM candidate_poll WHERE Reviewer=$reviewer ORDER BY Score DESC LIMIT $limit\");\n //$query = mysql_query(\"SELECT ID, Reviewee, Score FROM candidate_poll WHERE Reviewer=$reviewer ORDER BY Score DESC\");\n if (!$query || mysql_num_rows($query) <= 0) {\n echo mysql_error();\n return false;\n } else {\n while ($row = mysql_fetch_assoc($query)) {\n $polls[] = array(\n 'ID' => $row['ID'],\n 'Reviewee' => $row['Reviewee'],\n 'Score' => $row['Score']\n );\n }\n return $polls;\n }\n}", "function getposition($pdo,$profile_id) {\n $stmt = $pdo->prepare(\"SELECT * FROM position WHERE profile_id = :profile_id\");\n $stmt->execute(array(\":profile_id\" => $profile_id));\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "function xstats_getShipOwnerIndexAtTurn( $gameId, $shipId, $turn ) {\n $query = \"SELECT ownerindex FROM skrupel_xstats_shipowner WHERE gameid=\".$gameId.\" AND shipid=\".$shipId.\" AND turn=\".$turn;\n $result = @mysql_query($query) or die(mysql_error());\n if( mysql_num_rows($result)>0 ) {\n $result = @mysql_fetch_array($result);\n return( $result['ownerindex']);\n }\n}", "public function getMonthEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// sorts the events by number of votes\n\t\t$voteCount = array_column($events, 'vote_count');\n\t\tarray_multisort($voteCount, SORT_DESC, $events);\n\n\t\t// returns the event which have the most vote\n\t\treturn array_shift($events);\n\t}", "function getPublishedPositions()\n{\n $posts = get_posts([\n 'post_type' => 'hr-position',\n 'post_status' => 'publish',\n 'numberposts' => -1,\n ]);\n $result = [];\n foreach ($posts as $post) {\n $originalId = get_post_meta($post->ID, 'HRManagerId', true);\n $result[$originalId] = (object) [\n 'postId' => $post->ID,\n ];\n }\n return $result;\n}", "function getVotes() {\n\t\tif ($this->votes !== false) {\n\t\t\treturn $this->votes;\n\t\t}\n\n\t\t$voters = $this->ArtifactType->getVoters();\n\t\tunset($voters[0]);\t/* just in case */\n\t\tunset($voters[100]);\t/* need users */\n\t\tif (($numvoters = count($voters)) < 1) {\n\t\t\t$this->votes = array(0, 0, 0);\n\t\t\treturn $this->votes;\n\t\t}\n\n\t\t$res = db_query_params('SELECT COUNT(*) AS count FROM artifact_votes WHERE artifact_id=$1 AND user_id=ANY($2)',\n\t\t\t\t\tarray($this->getID(), db_int_array_to_any_clause($voters)));\n\t\t$db_count = db_fetch_array($res);\n\t\t$numvotes = $db_count['count'];\n\n\t\t/* check for invalid values */\n\t\tif ($numvotes < 0 || $numvoters < $numvotes) {\n\t\t\t$this->votes = array(-1, -1, 0);\n\t\t} else {\n\t\t\t$this->votes = array($numvotes, $numvoters,\n\t\t\t\t(int)($numvotes * 100 / $numvoters + 0.5));\n\t\t}\n\t\treturn $this->votes;\n\t}", "public function getScoreBoardData() {\n $participations = $this->participations;\n foreach ($participations as $p) {\n $p->final_points = $p->user->score($this);\n $p->final_latest_submit = $p->user->getLatestSubmitTime($this);\n }\n // $participations = $participations\n // ->sortBy('final_latest_submit')\n // ->sortByDesc('final_points');\n\n\n $participations = $participations->sort(function($a, $b) {\n if($a->final_points === $b->final_points) {\n if($a->final_latest_submit === $b->final_latest_submit) {\n return 0;\n }\n return $a->final_latest_submit < $b->final_latest_submit ? -1 : 1;\n } \n return $a->final_points < $b->final_points ? 1 : -1;\n });\n\n $i = 1;\n foreach ($participations as $p) {\n $p->final_position = $i++;\n }\n\n return $participations;\n }", "function galaxy_show_ranking_ally() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval, $pub_suborder;\n\n\tif (!check_var($pub_order_by, \"Char\") || !check_var($pub_date, \"Num\") || !check_var($pub_interval, \"Num\") || !check_var($pub_suborder, \"Char\")) {\n\t\tredirection(\"index.php?action=message&id_message=errordata&info\");\n\t}\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (isset($pub_suborder) && $pub_suborder == \"member\") $pub_order_by2 = \"points_per_member desc\";\n\telse $pub_order_by2 = \"rank\";\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by \".$pub_order_by2;\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $ally;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where ally = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $ally;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "function teamPoint($user_id, $nomId, $invoice)\n {\n if (!empty($user_id) && !empty($nomId)) {\n $sqlteam = mysql_query(\"select sum(manage_bv_history.tbpv) as tbpv from manage_bv_history where manage_bv_history.down_id='\" . $user_id . \"' and income_id='\" . $nomId . \"' and invoice='\" . $invoice . \"'\");\n $fetchteam = mysql_fetch_assoc($sqlteam);\n if (mysql_num_rows($sqlteam) > 0 && !empty($fetchteam['tbpv'])) {\n return $fetchteam['tbpv'];\n } else {\n return \"0\";\n }\n \n }\n \n }", "function get_member( $member )\n {\n // TODO Determine role.is_admin in a better way\n\n $get_member_query = <<<SQL\n select m.first_name,\n m.last_name,\n m.gatech_email_address,\n m.display_email_address,\n to_char( m.paid_dues_date, 'MM/DD/YYYY' ) as paid_dues_date,\n to_char( m.paid_locker_date, 'MM/DD/YYYY' ) as paid_locker_date,\n to_char( m.paid_practice_date, 'MM/DD/YYYY' ) as paid_practice_date,\n to_char(\n m.paid_locker_date + ( m.locker_months * interval '1 month' ),\n 'MM/DD/YYYY'\n ) as locker_end_date,\n m.locker_number,\n m.profile_photo_path,\n m.personal_website,\n m.is_available_for_collaboration,\n m.biography,\n m.first_name || ' ' || m.last_name as name,\n r.is_admin\n from tb_member m\n join tb_member_role mr\n on m.member = mr.member\n join tb_role r\n on mr.role = r.role\n where m.member = ?member?\norder by r.rank\n limit 1\nSQL;\n\n $params = [ 'member' => $member ];\n $result = query_execute( $get_member_query, $params );\n\n return query_success( $result ) ? query_fetch_one( $result ) : false;\n }", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function getVotes($username, $ip)\n {\n $username = $this->uri->segment(2);\n $ip = $this->uri->segment(3);\n $ip = str_replace('_', '.',$ip);\n $voteRec = $this->VoteModel->getVoteTimesFromUser($username);\n if ($voteRec === null || sizeof($voteRec) === 0) {\n $voteRec =$this->VoteModel->newVotingAccount($username,$ip);\n }\n $now = $this->millitime();\n return $this->jsonIFy(array(\n 'data' => array(\n (($now - (double)$voteRec->gtopDate) >= 86400000),\n (($now - (double)$voteRec->topgDate) >= 43200000),\n (($now - (double)$voteRec->xtremeDate) >= 43200000)\n )\n ),200);\n }", "function get_best_polls_reviewee($reviewee, $limit)\n{\n $reviewee = (int)$reviewee;\n $query = mysql_query(\"SELECT ID, Reviewer, Score FROM candidate_poll WHERE Reviewee=$reviewee ORDER BY Score DESC LIMIT $limit\");\n //$query = mysql_query(\"SELECT ID, Reviewer, Score FROM candidate_poll WHERE Reviewee=$reviewee ORDER BY Score DESC\");\n if (!$query || mysql_num_rows($query) <= 0) {\n echo mysql_error();\n return false;\n } else {\n while ($row = mysql_fetch_assoc($query)) {\n $polls[] = array(\n 'ID' => $row['ID'],\n 'Reviewer' => $row['Reviewer'],\n 'Score' => $row['Score']\n );\n }\n return $polls;\n }\n}", "protected function getCaseWithOppositionDates()\n {\n // get the case with opposition dates\n $paramProvider = new GenericItem(['id' => 'case']);\n $paramProvider->setParams($this->plugin('params'));\n\n $params = $paramProvider->provideParameters();\n $query = CasesWithOppositionDatesDto::create($params);\n\n $response = $this->handleQuery($query);\n\n if ($response->isOk()) {\n $caseWithOppositionDates = $response->getResult();\n }\n\n return $caseWithOppositionDates;\n }", "public function getLeagueMemberPosCount()\n {\n return $this->count(self::LEAGUE_MEMBER_POS);\n }", "public function top_members($chapter_id, $sort = 'hours', $period = NULL, $limit = 50, $offset = 0) {\n $period = $this->parse_period($period);\n $site_ids = ORM::factory('site')->where('chapter_id', $chapter_id)->find_keys();\n return $this->with('event')->with('site')\n ->select('service_hours.*, SUM(hours) AS hours, SUM(dollars) AS dollars')\n ->in('service_hours.site_id', $site_ids)\n ->where('event.date >=', $period['start'])\n ->where('event.date <=', $period['end'])\n ->groupby('service_hours.user_id')\n ->orderby($sort, 'DESC')\n ->find_all($limit, $offset);\n }", "private function mostPopularViaDistance($seachDepth, $distance)\n\t{\n\t\t$userLat = Auth::user()->e_lat;\n\t\t$userLng = AutH::user()->e_lng;\n\t\tif ( abs($userLat) == 0 && abs($userLng) == 0 ) return array();\n\n\n\t\t# We get the most popular events in the database\n\t\t$popularEvents = DB::table('joined_events')\n\t\t\t\t\t\t\t->select(DB::raw(\"event_id, count('event_id') as event_count\"))\n\t\t\t\t\t\t\t->groupBy('host_id')\n\t\t\t\t\t\t\t->orderBy('event_count', 'DESC')\n\t\t\t\t\t\t\t->take($seachDepth)\n\t\t\t\t\t\t\t->get();\n\n\n\t\t# Then we create a named array to sort later ( O(n) )\n\t\tforeach ($popularEvents as $event )\n\t\t{\n\t\t\t$eventCount[$event->event_id] = 0; \n\t\t}\n\n\n\t\t# Then for each of the most popular events, we get the locations \n\t\t# of all the attendees to that event ( O(n^2) )\n\t\tforeach ($popularEvents as $event )\n\t\t{\n\n\t\t\t# We join the joined_events table to the users table, \n\t\t\t# and grap the lat and long of each user\n\t\t\t$attendees = DB::table('joined_events')\n\t\t\t\t\t\t\t->where('event_id', '=', $event->event_id)\n\t\t\t\t\t\t\t->join('users', 'joined_events.attendee_id', '=', 'users.id')\n\t\t\t\t\t\t\t->select('users.e_lat', 'users.e_lng')\n\t\t\t\t\t\t\t->get();\n\n\n\t\t\t# Next we see if they are in range of the current user, \n\t\t\t# i.e if they are in the local area of the user\n\t\t\tforeach($attendees as $attendee)\n\t\t\t{\n\n\t\t\t\t# If the user is in local range\n\t\t\t\tif ( $this->distance($userLat, $attendee->e_lat, $userLng, $attendee->e_lng, \"K\") <= $distance )\n\t\t\t\t{\n\n\t\t\t\t\t# Then we add one to the event count\n\t\t\t\t\t$eventCount[$event->event_id] += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\n\t\t# Then we check the array and sort it\n\t\tif ( !empty($popularEvents) ) \n\t\t{\n\t\t\tarsort($popularEvents);\n\t\t}\n\n\n\n\t\t# Finally we return that array ( O(N) + O(N^2) = O(N^2) ) :'(\n\t\treturn $eventCount;\n\n\t}", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function findSecondLastTournament()\n {\n return $this->createQueryBuilder('u')\n ->orderBy('u.id', 'DESC')\n ->setFirstResult(1)\n ->setMaxResults(1)\n ->getQuery()\n ->getOneOrNullResult()\n ;\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function hpm_last_mutation_ids() {\n global $wpdb;\n $table = $wpdb->prefix . 'hpm_persons';\n $results = $wpdb->get_results( \"SELECT id, last_mutation_id FROM $table WHERE role != 'client';\" );\n $arr = [];\n foreach ($results as $result) {\n $arr[$result->id] = $result->last_mutation_id;\n }\n return (object) $arr;\n}", "function getVotes($id, $reverse = false){\n $con = make_mysql_connection();\n\n $query = \"SELECT id, fightid, vote, timestamp FROM votes\n WHERE fightid LIKE ?\";\n if($reverse) $query .= \" ORDER BY timestamp DESC \";\n else $query .= \" ORDER BY timestamp ASC \";\n\n //Fetch the spells from the database\n $sql = $con->prepare($query);\n $sql->bind_param(\"i\", $id);\n $sql->execute();\n\n $votes = array();\n $result = $sql->get_result();\n while($row = $result->fetch_array(MYSQLI_ASSOC)) {\n $votes[] = $row;\n }\n $con->close();\n\n return $votes;\n}", "public function find_vote($event_id, $user_id);", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "function openskydora_get_most_viewed_authors($count=5, $weeks_ago=5) {\n // (could we narrow to articles?)\n $views = openskydora_get_most_viewed (10000, $weeks_ago);\n dsm ('processing '. count($views) . ' hits');\n dsm($views);\n $query = implode (array_map ('pid_query_clause', array_keys($views)), ' OR ');\n $solr_fields = array(\n 'PID',\n 'fgs_createdDate_dt',\n 'fgs_label_s',\n 'mods_extension_collectionKey_ms',\n 'RELS_EXT_isMemberOfCollection_uri_s',\n 'RELS_EXT_hasModel_uri_s',\n 'mods_name_personal_author_nameIdentifier_UPID_ms'\n );\n $params = array(\n 'fl'=>implode($solr_fields, ','),\n 'sort'=>'fgs_createdDate_dt desc',\n 'solrLimit'=>$count,\n );\n \n $query_results = openskydora_solr_search($query, $params);\n dsm(\"results\");\n dsm ($query_results);\n}", "function get_memberlist($order = ID, $pagenum = 1, $usercount = 10) {\r\n\tglobal $bbdb, $bb;\r\n\tif ( isset($_GET['page']) )\r\n\t\t$page = ($_GET['page'] - 1) * $usercount;\r\n\telse\r\n\t\t$page = ($pagenum - 1) * $usercount;\r\n\tif ( $bb->wp_table_prefix ) {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM \".$bb->wp_table_prefix.\"posts RIGHT JOIN \".$bb->wp_table_prefix.\"users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM \".$bb->wp_table_prefix.\"users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t} else {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM $bbdb->posts RIGHT JOIN $bbdb->users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t}\r\n\treturn $result;\r\n}", "public function userVotes(): array {\n $key = sprintf(self::VOTED_USER, $this->user->id());\n $votes = self::$cache->get_value($key);\n if ($votes === false) {\n self::$db->prepared_query(\"\n SELECT GroupID,\n CASE WHEN Type = 'Up' THEN 1 ELSE 0 END AS vote\n FROM users_votes\n WHERE UserID = ?\n \", $this->user->id()\n );\n $votes = self::$db->to_pair('GroupID', 'vote', false);\n self::$cache->cache_value($key, $votes);\n }\n return $votes;\n }", "function retrieve_top_profile_visitors(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_top_profile_visitors($this->promoter->pt_id);\n\t\t\n\t}", "function getOtherPeoplesVisits() {\n\t\t$arr = array();\n\t\t$startTime = 0;\n\t\t$endTime = 0;\n\t\t$startMinute = 0;\n\t\t$endMinute = 0;\n\t\t$startType = 0;\n\t\t$endType = 0;\n\t\t$sql = \"SELECT `uid`, `dateTime`, `minute`, `event_type`, `charFK` FROM `loc_log` WHERE `charFK`<>$this->uid AND \" . $this->getCoordsForSQL2() . \" ORDER BY `charFK`, `uid` DESC\";\n\t\t$result = $this->mysqli->query($sql);\n\t\tif (mysqli_num_rows($result)) {\n\t\t\twhile ($row = mysqli_fetch_row($result)) {\n\t\t\t\tif ($row[3]<3) {\n\t\t\t\t\t//startTime\n\t\t\t\t\t$startTime = $row[1];\n\t\t\t\t\t$startMinute = $row[2];\n\t\t\t\t\t$startType = $row[3];\n\t\t\t\t}\n\t\t\t\tif ($row[3]>2) {\n\t\t\t\t\t//endTime always comes first except when the person is staying\n\t\t\t\t\t$endTime = $row[1];\n\t\t\t\t\t$endMinute = $row[2];\n\t\t\t\t\t$endType = $row[3];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($startTime>0) {\n\t\t\t\t\t$arr[] = array($startTime, $endTime, $row[4], $startMinute, $endMinute, $startType, $endType);//every visit has a start time whether it's arrival or birth, but they might not have an end if it's the most recent one\n\t\t\t\t\t$startTime = 0;\n\t\t\t\t\t$endTime = 0;\n\t\t\t\t\t$startMinute = 0;\n\t\t\t\t\t$endMinute = 0;\n\t\t\t\t\t$startType = 0;\n\t\t\t\t\t$endType = 0;\n\t\t\t\t\t//the last value can never be end because the log is in reverse order\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}\n\t\telse return -1;\n\t}", "function getLastVotes($start = 0, $limit = 0)\n\t{\n\t\t$tbl_datas = array();\n\t\t$criteria = new Criteria('vote_ratingid', 0, '<>');\n\t\t$criteria->setLimit($limit);\n\t\t$criteria->setStart($start);\n\t\t$criteria->setSort('vote_ratingtimestamp');\n\t\t$criteria->setOrder('DESC');\n\t\t$tbl_datas = $this->getObjects($criteria, true);\n\t\treturn $tbl_datas;\n\t}", "function fetchJudgeRoundCompletePublicVoters($condition = \"\",$order = \"voter_id\")\n\t{\n\t\t$arrlist = array();\n\t\t$i = 0;\n\t\n\t\t$condition = explode(\"||##||\",$condition);\n\t\n\t\t$sQuery = \"select v.voter_id,v.client_id,v.voter_username,v.voter_firstname,v.voter_lastname,v.voter_email from \".DB_PREFIX.\"voter v WHERE 1 AND user_type_id='\".USER_TYPE_PUBLIC_VOTER_USER.\"' \" . $condition[0] . \" AND v.voter_id in (select voter_id from \".DB_PREFIX.\"vote vt WHERE 1 \" . $condition[1] . \" ) ORDER BY \".$order;\n\t\t\n\t\t$rs = $this->runquery($sQuery);\n\n\t\treturn $rs;\n\t}", "public function viewPendingVotes()\r\n {\r\n // array que contindrà les votacions amb els seus usuaris a avaluar\r\n $voting = array();\r\n // actualitza els pesos de tots els usuaris\r\n $this->weightCalculation();\r\n // obté l'usuari actual\r\n $currentUser = $this->getUser();\r\n // obté les votacions pendents per a l'usuari\r\n $votes = $this->votingModel->getPendingVotes($currentUser['id']);\r\n \r\n // recorre cada votació pendent\r\n foreach ($votes as $vote) {\r\n // carrega a l'array la votació i l'usuari a avaluar\r\n $voting[$vote['id']] = array(\r\n 'vote' => $vote,\r\n 'owner' => $this->userModel->getById($vote['evaluated_user_id'])\r\n );\r\n }\r\n \r\n // mostra la vista amb la llista de votacions\r\n $this->response->html($this->helper->layout->app('Voting:view/votingList', array(\r\n 'voting' => $voting,\r\n 'user' => $currentUser\r\n )));\r\n }", "public function show_qualified_candidate(){\r\n\t\tif(function_exists('date_default_timezone_set')) {\r\n\t\t\tdate_default_timezone_set(\"Asia/Kolkata\");\r\n\t\t}\r\n\t\t$date = date(\"Y-m-d\");\r\n\t\t$query = $this->conn->query(\"select candidate.cnum, candidate.name, candidate.department, candidate.profile, candidate.register_time from candidate\r\n\t\tinner join interview\r\n\t\ton (candidate.cnum=interview.cnum and interview.recomendation = 'proceed' and candidate.register_date = '$date')\");\r\n\t\t\r\n\t\twhile($row = $query->fetch_array(MYSQLI_ASSOC)){\r\n\t\t\t$this->candidate[] = $row;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $this->candidate;\r\n\t\t\r\n\t}", "function getHouseholdAdmin(){\n\t\t$members = $this->getMembers();\n\t\tforeach ($members as $member) {\n\t\t\t$level = $member->getUserLevel();\n\t\t\tif($level == 'admin'){\n\t\t\t\t$admin = $member;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $admin;\n\t}", "function getCurrentCategoryVotes($conn, $id_user, $category)\n{\n\t//Retrieve current size\n $selectQuery = \"SELECT ? \n FROM [Nominee] \n WHERE User_id_user = ?;\";\n $selectStatement = sqlsrv_query($conn, $selectQuery, array($category, $id_user));\n if ($selectStatement===false)\n {\n echo \"error NomineeScript.php : current votes query fail -> \";\n \tdie(print_r(sqlsrv_errors(),true));\n }\n $categoryVotes = sqlsrv_fetch_array($selectStatement);\n sqlsrv_free_stmt($selectStatement);\n return $categoryVotes[0];\n}", "function zg_ai_find_players_to_debate($bot, $num = 99) {\n global $game;\n include drupal_get_path('module', 'zg') . '/includes/' . $game . '_defs.inc';\n $num = min($num, $bot->actions);\n\n // $debate_wait_time = 1200;\n // $zombie_debate_wait = 300;\n $sql = 'SELECT users.id, users.username, users.meta\n FROM users\n LEFT OUTER JOIN clan_members ON clan_members.fkey_users_id = users.id\n LEFT OUTER JOIN clans ON clan_members.fkey_clans_id = clans.id\n WHERE users.id <> %d\n AND (clans.id <> %d OR clans.id IS NULL OR users.meta = \"zombie\")\n AND username <> \"\"\n AND (debates_last_time < \"%s\" OR\n (users.meta = \"zombie\" AND debates_last_time < \"%s\"))\n AND users.meta NOT like \"ai_%\"\n AND users.level > %d\n AND users.level < %d\n ORDER BY abs(users.experience - %d) ASC\n LIMIT %d;';\n\n $result = db_query($sql, $bot->id, $bot->fkey_clans_id,\n date('Y-m-d H:i:s', REQUEST_TIME - $debate_time),\n date('Y-m-d H:i:s', REQUEST_TIME - $zombie_debate_wait),\n $bot->level - 15, $bot->level + 15, $bot->experience, $num);\n $data = [];\n while ($item = db_fetch_object($result)) {\n $data[] = $item;\n }\n return zg_ai_data_type($data);\n}", "function getMembersActivity(){\n $this->db->select('COUNT(user_id), author');\n $this->db->from('posts');\n $this->db->group_by('author');\n $this->db->limit(3);\n $this->db->order_by('COUNT(user_id) DESC');\n $query = $this->db->get();\n\n return $query->result_array();\n }", "public function getActives()\n {\n $condition = \"since <= '\" . date(\"Y-m-d H:i:s\") . \"' AND until > '\" . date(\"Y-m-d H:i:s\") . \"' OR permanent\";\n return parent::get($condition, \"position\", false);\n }", "public function addVotes ()\n {\n $query = \"\";\n\n // insert SQL command for inserting data to $query\n foreach ($this->votes as $vote)\n {\n $query .= \"INSERT INTO Sabat_proposal_votes\n SET member_ID=\".$this->memberID.\",\n sabat_proposal_ID=\".$vote->proposal_ID.\",\n created_at=\\\"\".$this->createdAt.\"\\\",\n value=\".$vote->value.\";\";\n }\n\n if (!$this->canVote($this->votes[0]->proposal_ID))\n {\n return array(\n \"status\" => 503,\n \"statusMsg\" => \"Service unavailable\",\n \"data\" => array(\"message\" => \"Hlasování není povoleno.\")\n );\n }\n else if ($this->hasNotVoted($this->votes[0]->proposal_ID))\n {\n $stmt = $this->conn->prepare($query);\n\n if ($stmt->execute())\n return array(\n \"status\" => 201,\n \"statusMsg\" => \"Created\",\n \"data\" => array(\"message\" => \"Hlas(y) byl(y) úspěšně zaznamenán(y).\")\n );\n else\n return array(\n \"status\" => 503,\n \"statusMsg\" => \"Service unavailable\",\n \"data\" => array(\"message\" => \"Nepodařilo se zaznamenat hlas(y).\")\n );\n }\n else\n return array(\n \"status\" => 503,\n \"statusMsg\" => \"Service unavailable\",\n \"data\" => array(\"message\" => \"Už si volil. Pozdě měnit svá rozhodnutí.\")\n );\n\n }", "static function getArgForView($slug, $type)\n {\n// ->orderBy('open_date', 'desc')\n// ->take(30)\n// ->get();\n\n// foreach($rankObjs as $obj) {\n// \t$objId[] = $obj->post_id;\n// //$rankObj[] = $this->articlePost->find($obj->post_id);\n// }\n// \n// \t$ranks = $this->articlePost ->find($objId)->where('open_status', 1)->take(20);\n \n //非Openのグループidを取る\n// $tgIds = TagGroup::where('open_status', 0)->get()->map(function($tg){\n// return $tg->id;\n// })->all();\n// \n// //人気タグ\n// $tagLeftRanks = Tag::whereNotIn('group_id', $tgIds)->where('view_count','>',0)->orderBy('view_count', 'desc')->take(10)->get();\n// \n// //Category\n// $cateLeft = Category::all(); //open_status\n\t\t\n $rightRanks = '';\n \n //TOP20\n if($type == 'tag') {\n \t$tag = Tag::where('slug', $slug)->first();\n $atclIds = TagRelation::where('tag_id', $tag->id)->get()->map(function($tr){\n \t$atcl = Article::find($tr->atcl_id);\n if($atcl) {\n if($atcl->open_status && ! $atcl->del_status && $atcl->owner_id > 0) {\n return $tr->atcl_id;\n }\n }\n })->all();\n \n $rightRanks = TotalizeAll::whereIn('atcl_id', $atclIds)->orderBy('total_count', 'desc')->take(20)->get();\n\n }\n else if($type == 'cate') {\n \t$cate = Category::where('slug', $slug)->first();\n \t\n $atclIds = Article::where(['open_status'=>1, 'del_status'=>0, 'cate_id'=>$cate->id])->whereNotIn('owner_id', [0])\n ->get()->map(function($al){\n return $al->id;\n })->all();\n \n $rightRanks = TotalizeAll::whereIn('atcl_id', $atclIds)->orderBy('total_count', 'desc')->take(20)->get();\n \n }\n else { //all\n $atclIds = Article::where([\n ['open_status','=',1], ['del_status', '=', '0'], ['owner_id', '>', '0']\n ])\n ->get()->map(function($al){\n return $al->id;\n })->all();\n \n $rightRanks = TotalizeAll::whereIn('atcl_id', $atclIds)->orderBy('total_count', 'desc')->take(20)->get();\n\n }\n \n //return compact('tagLeftRanks', 'cateLeft', 'rightRanks');\n return $rightRanks;\n }", "public static function getCurrent() {\n\t\t$vote=Vote::findOneBy(array(\n\t\t\t\"ip\"=>$_SERVER[\"REMOTE_ADDR\"],\n\t\t\t\"valid\"=>TRUE\n\t\t));\n\n\t\treturn $vote;\n\t}", "public function findViewest(): array\n {\n\n return $this->createQueryBuilder('p')\n ->where('p.isOnline = true')\n ->orderBy('p.views', 'DESC')\n ->setMaxResults(6)\n ->getQuery()\n ->getResult();\n }", "function retrieve_recent_profile_views(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_recent_profile_views($this->promoter->pt_id);\n\t\t\n\t}", "public function get_deal_partner_members($deal_id,$deal_partner_id,$num_to_fetch,&$deal_partner_team_data_arr,&$deal_partner_team_data_count){\n \n }", "function mapit_get_voting_areas_by_location($coordinate, $method, $types = null, $generation = null) {\n global $mapit_client;\n $params = func_get_args();\n $result = $mapit_client->call('MaPit.get_voting_areas_by_location', $params);\n return $result;\n}", "private function newSortVectorForOwnerPHID($owner_phid) {\n // \"User\" object, move them to the bottom. We can only sort these by the\n // PHID.\n return array(\n 2,\n $owner_phid,\n );\n }", "public function getUsersWithMostPoints(){\n $this->loadModel('Competition');\n $data = $this->getRequest()->getData();\n $rallyId = $data['rally_id'];\n $maxPoints = $data['max_points'];\n $isActive = $data['is_active'];\n\n if ($isActive == 1){\n $competitionStatistics = $this->CompetitionStatistics->find('all', [\n 'fields' => [\n 'totalUsers' => 'COUNT( DISTINCT CompetitionStatistics.user_id)',\n ],\n 'conditions' => [\n 'CompetitionStatistics.competition_id IN' => $this->Competition->find('all', [\n 'fields' => ['Competition.id'],\n 'conditions' => [\n 'Competition.rally_id' => $rallyId,\n 'Competition.is_active' => 1\n ]\n ]),\n 'CompetitionStatistics.points' => $maxPoints\n ]\n ]);\n } else {\n $competitionStatistics = $this->CompetitionStatistics->find('all', [\n 'fields' => [\n 'totalUsers' => 'COUNT( DISTINCT CompetitionStatistics.user_id)',\n ],\n 'conditions' => [\n 'CompetitionStatistics.competition_id IN' => $this->Competition->find('all', [\n 'fields' => ['Competition.id'],\n 'conditions' => [\n 'Competition.rally_id' => $rallyId,\n ]\n ]),\n 'CompetitionStatistics.points' => $maxPoints\n ]\n ]);\n }\n\n $this->set('competitionStatistics', $competitionStatistics->toList());\n $this->render('/CompetitionStatistics/json/template');\n }", "function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "public function judges()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_JUDGE)->get();\n }", "function op_api_member($member)\n{\n if (!$member)\n {\n return null;\n }\n\n $viewMemberId = sfContext::getInstance()->getUser()->getMemberId();\n\n $memberImageFileName = $member->getImageFileName();\n if (!$memberImageFileName)\n {\n $memberImage = op_image_path('no_image.gif', true);\n }\n else\n {\n $memberImage = sf_image_path($memberImageFileName, array('size' => '48x48'), true);\n }\n\n $relation = null;\n if ((string)$viewMemberId !== (string)$member->getId())\n {\n $relation = Doctrine::getTable('MemberRelationship')->retrieveByFromAndTo($viewMemberId, $member->getId());\n }\n\n $selfIntroduction = $member->getProfile('op_preset_self_introduction', true);\n\n return array(\n 'id' => $member->getId(),\n 'profile_image' => $memberImage,\n 'screen_name' => $member->getConfig('op_screen_name', $member->getName()),\n 'name' => $member->getName(),\n 'profile_url' => op_api_member_profile_url($member->getId()),\n 'friend' => $relation ? $relation->isFriend() : false,\n 'blocking' => $relation ? $relation->isAccessBlocked() : false,\n 'self' => $viewMemberId === $member->getId(),\n 'friends_count' => $member->countFriends(),\n 'self_introduction' => $selfIntroduction ? (string)$selfIntroduction : null,\n );\n}", "public function findByMember(User $member)\n {\n $queryBuilder = $this->createQueryBuilder(self::ALIAS);\n $this->havingMember($queryBuilder, $member);\n\n $query = $queryBuilder->getQuery();\n $query->useQueryCache(true);\n\n return $query->getResult();\n }", "function retrieve_promoter_team_venues(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_promoter_team_venues($this->promoter->up_id);\n\t\t\n\t}", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function viewMembers()\n {\n\n //get approved members\n $members = Member::where('approved', '1')\n ->with('position', 'status')\n ->orderBy('created_at', 'desc')\n ->get();\n\n //get pending members\n $Pmembers = Member::where('approved', '0')\n ->orderBy('created_at', 'desc')\n ->with('position', 'status')\n ->get();\n //Calculate number of days to automatically set status value to alumni\n $today = Carbon::today();\n foreach($members as $member)\n {\n $joined = Carbon::parse($member->created_at);\n $difference = $joined->diffInMonths($today, false);\n\n //Check the difference\n if($difference >= 7 AND $member->status_id == '2')\n {\n $member->fill([\n 'status_id' => '4'\n ]);\n $member->save();\n\n $member->status_id;\n }elseif ($difference >= 7 AND $member->status_id == '1')\n {\n $member->fill([\n 'status_id' => '3'\n ]);\n $member->save();\n\n $member->status_id;\n }\n }\n\n //Return members view\n return view('members.viewMembers')\n ->with(['members' => $members, 'Pmembers' => $Pmembers]);\n }", "function galaxy_show_ranking_unique_player($player, $last = false) {\n\tglobal $db;\n\n\t$ranking = array();\n\n\t$request = \"select datadate, rank, points\";\n\t$request .= \" from \".TABLE_RANK_PLAYER_POINTS;\n\t$request .= \" where player = '\".mysql_real_escape_string($player).\"'\";\n\t$request .= \" order by datadate desc\";\n\t$result = $db->sql_query($request);\n\twhile (list($datadate, $rank, $points) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$datadate][\"general\"] = array(\"rank\" => $rank, \"points\" => $points);\n\t\tif ($last) break;\n\t}\n\n\t$request = \"select datadate, rank, points\";\n\t$request .= \" from \".TABLE_RANK_PLAYER_FLEET;\n\t$request .= \" where player = '\".mysql_real_escape_string($player).\"'\";\n\t$request .= \" order by datadate desc\";\n\t$result = $db->sql_query($request);\n\twhile (list($datadate, $rank, $points) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$datadate][\"fleet\"] = array(\"rank\" => $rank, \"points\" => $points);\n\t\tif ($last) break;\n\t}\n\n\t$request = \"select datadate, rank, points\";\n\t$request .= \" from \".TABLE_RANK_PLAYER_RESEARCH;\n\t$request .= \" where player = '\".mysql_real_escape_string($player).\"'\";\n\t$request .= \" order by datadate desc\";\n\t$result = $db->sql_query($request);\n\twhile (list($datadate, $rank, $points) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$datadate][\"research\"] = array(\"rank\" => $rank, \"points\" => $points);\n\t\tif ($last) break;\n\t}\n\n\treturn $ranking;\n}", "function getPostInfo($pdo) {\n $statement = $pdo->prepare(\"SELECT posts.*, users.*,\n\t(SELECT sum(vote_dir) FROM votes\n WHERE posts.post_id=votes.post_id)\n\tAS score\n\tFROM posts\n JOIN votes ON posts.post_id=votes.post_id\n JOIN users ON posts.user_id=users.id\n\tGROUP BY posts.post_id\n\tORDER BY post_id DESC\");\n\n $statement->execute();\n $getPostInfo = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n if (!$statement) {\n die(var_dump($pdo->errorInfo()));\n }\n\n return $getPostInfo;\n}", "public function getVotes()\n {\n return $this->votes;\n }", "function mentions_top($query_bin, $dt_start, $dt_end, $limit = NULL)\n{\n\n global $esc;\n\n // This function allows special arguments, similar to the TCAT front-end;\n // therefore we validate and process those arguments here\n if (!isset($_GET['dataset'])) {\n $_GET['dataset'] = $query_bin;\n }\n validate_all_variables();\n\n // Create WHERE clause to restrict to requested timestamp range\n // Convert to sqlSubset() format\n if (isset($dt_start) && isset($dt_end)) {\n $dt_start->setTimezone(new DateTimeZone('UTC'));\n $esc['datetime']['startdate'] = $dt_start->format('Y-m-d\\TH:i:s');\n $dt_end->setTimezone(new DateTimeZone('UTC'));\n $esc['datetime']['enddate'] = $dt_end->format('Y-m-d\\TH:i:s');\n }\n $where = sqlSubset();\n\n // Query database\n\n $dbh = pdo_connect();\n\n $bin_name = $query_bin['bin'];\n\n // NOTICE: This query does not define a cut-off point\n\n $sql = 'select to_user, count(to_user) as cnt from ' . $bin_name . '_mentions m inner join ' . $bin_name . '_tweets t on t.id = m.tweet_id ' . $where .\n ' group by to_user order by count(to_user) desc';\n\n if (!is_null($limit)) {\n $sql .= ' limit ' . $limit;\n }\n $rec = $dbh->prepare($sql);\n $rec->execute();\n\n $list = array();\n\n while ($res = $rec->fetch(PDO::FETCH_ASSOC)) {\n $mention = $res['to_user'];\n $count = $res['cnt'];\n $element = array ( 'mention' => $mention,\n 'count' => $count );\n $list[] = $element;\n }\n\n return $list;\n\n}", "public function memberStats()\n {\n // pull stats from the cache if they are there, if not store a fresh copy for 1 day\n $memberStats = Cache::remember('statistics.membership', 86400, function () {\n return MemberStats::first();\n });\n\n $votingMembers = $this->votingManager->countVotingMembers();\n\n $memberConversionStats = Cache::remember('statistics.membershipConversion', 86400, function () {\n return $this->membershipConversionStats();\n });\n\n return view('statistics.member_stats')\n ->with('memberStats', $memberStats)\n ->with('votingMembers', $votingMembers)\n ->with($memberConversionStats);\n }", "public function testGetParliamentaryCandidateWithVoteCast()\n {\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $candidates = $pollingStation->getParliamentaryCandidateWithVoteCast();\n $this->assertEquals($candidates[0]->getFirstName(), 'Jhon');\n $this->assertEquals($candidates[0]->getVoteCast(), 100);\n $this->assertEquals($candidates[1]->getFirstName(), 'Jannette');\n $this->assertEquals($candidates[1]->getVoteCast(), 280);\n $this->assertEquals($candidates[2]->getFirstName(), 'Sondra');\n $this->assertEquals($candidates[2]->getVoteCast(), 98);\n $this->assertEquals($candidates[3]->getFirstName(), 'Fadde');\n $this->assertEquals($candidates[3]->getVoteCast(), 0);\n $this->assertEquals($candidates[4]->getFirstName(), 'Vivien');\n $this->assertEquals($candidates[4]->getVoteCast(), 100);\n $this->assertEquals($candidates[5]->getFirstName(), 'Joella');\n $this->assertEquals($candidates[5]->getVoteCast(), 7);\n $this->assertEquals($candidates[6]->getFirstName(), 'Adde');\n $this->assertEquals($candidates[6]->getVoteCast(), 2);\n }", "function getAffiliateSponsorDetail($affiliateID = NULL ,$sponsorID =NULL)\n\t\t{\n\t\t\n\t\t\t# fetch articles \n\t\t\t$query = \"select * from tbl_sponsors\n\t\t\twhere affiliate_id = $affiliateID and id = $sponsorID\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\t\t\t\n\t\t\t$myAffiliateSponsors = array();\n\t\t\t\n\t\t\twhile($row = $rs->FetchRow()) {\n\t\t\t\t$myAffiliate\t\t= $row;\n\t\t\t\tarray_push($myAffiliateSponsors,$myAffiliate);\n\t\t\t}\n\n\t\t\t\n\t\t\treturn $myAffiliateSponsors;\t\t\n\t\t}", "function getAllPosatclosure($limit){\n\t \t$sql = \"SELECT *,SUM(stage='283') As sum1, SUM(stage='284') As sum2, SUM(stage='285') As sum3, SUM(stage='286') As sum4, SUM(stage='287') As sum5, SUM(stage='288') As sum6, SUM(stage='289') As sum7, SUM(stage='290') As sum8, SUM(stage='291') As sum9, SUM(stage='292') As sum10, SUM(stage='293') As sum11, SUM(stage='294') As sum12, SUM(stage='295') As sum13, COUNT(DISTINCT cand_id) As count2,synonym.parentname As compa, a1.parentname As loca FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id LEFT JOIN companies_grade ON pof.grade=companies_grade.gid LEFT JOIN (SELECT * FROM events_tt WHERE is_alloc='1' GROUP BY pof_id) As was ON pof.pof_id=was.pof_id LEFT JOIN allocation ON was.alloc_id=allocation.id LEFT JOIN (SELECT date As cvsenton,pofid FROM pof_candidates ORDER BY date DESC LIMIT 1,1) As lastcv ON pof.pof_id=lastcv.pofid WHERE pof.is_allocated='1' AND pof.not_pursue='0' AND pof.closure='1' GROUP BY pof.pof_id ORDER BY pof.pof_id DESC LIMIT \" .$limit . \",20 \";\n\t $Q = $this->db->query($sql);\n\tif($Q->num_rows() > 0){\n\tforeach($Q->result() as $row)\n\t{\n\t $data[] = $row;\n\t}\n\t}\n\t $Q->free_result(); \n\t return $data; \n }", "private function jobnumber_last_allocation($owner) {\n $owner_escaped = $this->connection->escape_string(trim($owner));\n if( $owner_escaped == '' )\n throw new NeoCaptarException (\n __METHOD__, \"empty string passed where a valid project owner account was expected.\" );\n $table_j = \"{$this->connection->database}.jobnumber `j`\";\n $table_ja = \"{$this->connection->database}.jobnumber_allocation `ja`\";\n $sql = \"SELECT ja.project_id,ja.jobnumber,ja.allocated_time,ja.allocated_by_uid FROM {$table_j}, {$table_ja} WHERE j.owner='{$owner_escaped}' AND ja.jobnumber_id=j.id AND j.first <= ja.jobnumber AND ja.jobnumber <= j.last ORDER BY jobnumber DESC LIMIT 1\";\n $result = $this->connection->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows == 0 ) return null;\n if( $nrows != 1 )\n throw new NeoCaptarException (\n __METHOD__, \"inconsistent result returned by the query. Database may be corrupt.\" );\n return mysql_fetch_array( $result, MYSQL_ASSOC );\n }", "function getUpperLimit($MemberID) {\n global $mysql;\n $userlimit = $mysql->select(\"select * from _tbl_member where MemberID='\".$MemberID.\"'\");\n if ($userlimit[0]['MoneyTransferLimit']>0) {\n return $userlimit[0]['MoneyTransferLimit'];\n } else {\n $adminLimit = $mysql->select(\"select * from _tbl_members_imps_limits where MemberID='\".$MemberID.\"' and date(TxnDate)=date('\".date(\"Y-m-d\").\"') order by id desc \");\n if (isset($adminLimit[0]['TransferLimit'])) {\n return $adminLimit[0]['TransferLimit'];\n } else {\n $previous_day_balance = $mysql->select(\"select (sum(Credit)-sum(Debit)) as previous_balance from _tbl_accounts where date(TxnDate)<=date('\".date(\"Y-m-d\",strtotime(date(\"Y-m-d\"). ' -1 days')).\"') and MemberID='\".$MemberID.\"'\");\n return isset($previous_day_balance[0]['previous_balance']) ? intval($previous_day_balance[0]['previous_balance']/2) : 0;\n }\n }\n}", "function islandora_ethnography_get_dept_members($dept, $pid) {\n $params = array(\n 'fl' => array('MADS_title_ms PID'),\n );\n $query = \"MADS_organization_ms:\\\"$dept\\\" AND -PID:\\\"$pid\\\"\";\n $url = parse_url(variable_get('islandora_solr_url', 'localhost:8080/solr'));\n $solr = new Apache_Solr_Service($url['host'], $url['port'], $url['path'] . '/');\n $solr->setCreateDocuments(FALSE);\n try {\n $results = $solr->search($query, 0, 1000, $params);\n $json = json_decode($results->getRawResponse(), TRUE);\n }\n catch (Exception $e) {\n watchdog_exception('Islandora Entities', $e, 'Got an exception while searching entities for callback.', array(), WATCHDOG_ERROR);\n }\n $colleages = array();\n foreach ($json['response']['docs'] as $choice) {\n if (isset($choice['MADS_title_ms'])) {\n foreach ($choice['MADS_title_ms'] as $candidate) {\n $colleages[$choice['PID']] = $candidate;\n }\n }\n }\n return $colleages;\n}", "function fetchJudgeRoundCompletionPublicVoters($condition = \"\",$order = \"voter_id\")\n\t{\n\t\t$arrlist = array();\n\t\t$i = 0;\n\t\n\t\t$condition = explode(\"||##||\",$condition);\n\t\n\t\t$sQuery = \"select v.voter_id,v.client_id,v.voter_username,v.voter_firstname,v.voter_lastname,v.voter_email from \".DB_PREFIX.\"voter v WHERE 1 AND user_type_id='\".USER_TYPE_PUBLIC_VOTER_USER.\"' \" . $condition[0] . \" AND v.voter_id not in (select voter_id from \".DB_PREFIX.\"vote vt WHERE 1 \" . $condition[1] . \" ) ORDER BY \".$order;\n\t\t\n\t\t$rs = $this->runquery($sQuery);\n\t\t\n\t\treturn $rs;\n\t}", "public static function get_top_bidders_with_end_auctions() {\n global $wpdb;\n $auction_table = $wpdb->prefix.\"wauc_auction_log\";\n\n //get all running product\n $args = array(\n 'post_status' => 'publish',\n 'post_type' => 'product',\n 'meta_query' => array(\n array(\n 'key' => 'wauc_auction_end',\n 'value' => time(),\n 'type' => 'CHAR',\n 'compare' => '<',\n ),\n array(\n 'key' => '_wauc_current_status',\n 'value' => 'running',\n 'type' => 'CHAR',\n 'compare' => '=',\n )\n )\n );\n $running_auctions = new WP_Query($args);\n $running_auc_ids = array();\n if( $running_auctions->have_posts() ) {\n while( $running_auctions->have_posts() ) {\n $running_auctions->the_post();\n $running_auc_ids[] = get_the_ID();\n }\n }\n //term\n if( empty( $running_auc_ids ) ) return array();\n\n $query = \"SELECT DISTINCT tt.*, wp_users.user_email, wp_posts.post_title as auction_name\nFROM $auction_table tt\nINNER JOIN\n (SELECT auction_id, MAX(bid) AS max_bid\n FROM ( SELECT * FROM $auction_table c WHERE c.is_fake = 0 ) d\n GROUP BY auction_id) groupedtt \nON tt.auction_id = groupedtt.auction_id \nAND tt.bid = groupedtt.max_bid\nINNER JOIN wp_users\nON wp_users.ID = tt.userid\nINNER JOIN $wpdb->posts wp_posts\nON wp_posts.ID = tt.auction_id\nWHERE tt.auction_id IN (\".implode(',',$running_auc_ids).\")\n\";\n\n $result = $wpdb->get_results($query);\n return $result;\n }", "public function getUsersForHierarchyRanking() {\n // create hierarchy ranking query\n $hierarchy_ranking_query = Doctrine_Query::create()\n ->from('sfGuardUserProfile sgup')\n ->leftJoin('sgup.User sgu')\n ->where('sgup.accumulated_points > 0')\n ->andWhere('sgup.id=sgu.id')\n ->andWhere('sgu.is_disabled <> 1')\n ->andWhere('sgu.is_active = 1')\n ->groupBy('sgu.username')\n ->orderBy('sgup.accumulated_points DESC, sgu.username ASC');\n \n return $hierarchy_ranking_query;\n }", "public function getLivraison()\n\t{\n\t\t$this->db->where('titre = \"livraison\"');\n\t\t$Query = $this->db->get(\"mention\");\n\t\tif($Query->num_rows() > 0 ){\n\t\t\tforeach ($Query->result() as $mentionsLivraisons)\n\t\t\t{\n\t\t\t\t$data[] = $mentionsLivraisons;\n\t\t\t}\n\t\n\t\t\treturn $data;\n\t\t}\n\t}", "public function show_latestMember($output_method = 'echo')\n {\n return $this->call_method(\"show/latestMember\",\n array('output_method' => $output_method,\n )\n );\n }", "public function getMyOpinions($book, $username){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, o.id FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n WHERE b.id=\".intval($book).\" and a.username='\".mysqli_real_escape_string($this->link,$username).\"'\n ORDER BY o.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "protected function MEMBER_getLastMember()\n\t{\n\t\t$query = $this->db->select(\n\t\t\t\tself::MEMBER_TABLE,\n\t\t\t\t'collab_member_id',\n\t\t\t\t'',\n\t\t\t\t__LINE__,\n\t\t\t\t__FILE__,\n\t\t\t\tfalse,\n\t\t\t\t\"ORDER BY `collab_member_id` DESC LIMIT 1;\"\n\t\t);\n\t\t$last_row = $query->fetchRow();\n\t\treturn is_array($last_row)? $last_row['collab_member_id']: 0;\n\t}", "private function _getTicketsMajority()\n {\n $majority = (new Time($this->Settings->read('event_date')))->addYears(-18);\n\n return [\n [\n 'label' => 'Mineurs',\n 'value' => $this->Tickets->find('all')\n ->where([\n 'paid' => 1,\n 'birthdate >' => $majority\n ])\n ->count()\n ], [\n 'label' => 'Majeurs',\n 'value' => $this->Tickets->find('all')\n ->where([\n 'paid' => 1,\n 'birthdate <' => $majority\n ])\n ->count()\n ]\n ];\n }" ]
[ "0.53921187", "0.52387536", "0.509725", "0.5026603", "0.4901936", "0.47599354", "0.47508165", "0.47487944", "0.47423947", "0.47328556", "0.472439", "0.47059375", "0.46956787", "0.46693555", "0.4653796", "0.4643136", "0.4643121", "0.46318394", "0.4630398", "0.4604285", "0.4563734", "0.45584014", "0.45561454", "0.4544666", "0.45372552", "0.45370007", "0.45288363", "0.4501564", "0.44801998", "0.44552788", "0.44507807", "0.44480744", "0.44474533", "0.44402257", "0.44401693", "0.44391418", "0.44360223", "0.44349623", "0.44343588", "0.44287887", "0.44242147", "0.44160065", "0.44116798", "0.4407599", "0.43966815", "0.43934214", "0.43804204", "0.43713564", "0.43707815", "0.4369471", "0.4366861", "0.43667045", "0.43660712", "0.43617088", "0.43599436", "0.4358276", "0.43421972", "0.43393394", "0.43391195", "0.43362764", "0.43347722", "0.43197867", "0.4316698", "0.43125007", "0.43124422", "0.43091378", "0.43056878", "0.43027467", "0.43014026", "0.43001226", "0.4296352", "0.42960855", "0.4287964", "0.42874998", "0.4286966", "0.42854294", "0.42814955", "0.42800057", "0.42790374", "0.42769307", "0.4274719", "0.42707303", "0.42701104", "0.42684224", "0.4258215", "0.42548734", "0.42489484", "0.424786", "0.42409372", "0.42337382", "0.42316672", "0.42307702", "0.42164046", "0.42161193", "0.42158648", "0.42127073", "0.42056137", "0.42046162", "0.42044166", "0.42032355" ]
0.47752798
5
Compare bill sponsorship between two members who served in the same Congress and chamber
public function compareTwoMembersBillSponsorships(string $firstMemberId, string $secondMemberId, int $congress, string $chamber) { $this->formatValidator->isValidMemberIdFormat($firstMemberId); $this->formatValidator->isValidMemberIdFormat($secondMemberId); $this->congressValidator->isValidChamber($chamber); switch ($chamber) { case 'senate': $earliestCongress = 101; break; case 'house': default: $earliestCongress = 102; break; } $this->congressValidator->isValidCongress($congress, $earliestCongress); $uriStub = "members/{$firstMemberId}/bills/{$secondMemberId}/{$congress}/{$chamber}.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n $author_team_x = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $x->sources[0]->citation->uuid);\n $author_team_y = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $y->sources[0]->citation->uuid);\n\n //same author, and different year\n if($author_team_x->titleCache == $author_team_y->titleCache){\n $x_year = substr(\n $x->sources[0]->citation->datePublished->start,\n 0,\n strpos($x->sources[0]->citation->datePublished->start,'-'));\n $y_year = substr(\n $y->sources[0]->citation->datePublished->start,\n 0,\n strpos($y->sources[0]->citation->datePublished->start,'-'));\n if ($x_year < $y_year){//the year of the first publication is smaller\n $res = -1;\n }\n else if($x_year == $y_year){ //if same year check the page\n $x_page = $x->sources[0]->citationMicroReference;\n $y_page = $y->sources[0]->citationMicroReference;\n if($x_page < $y_page){\n $res = -1;\n }\n else{\n $res = 1;\n }\n }else\n $res = 1;\n }\n //different author and the first one is alphabetically smaller\n //else if($x->sources[0]->citation->authorship->teamMembers[0]->lastname <\n //$y->sources[0]->citation->authorship->teamMembers[0]->lastname){\n else if ($author_team_x->titleCache < $author_team_y->titleCache)\t{\n $res = -1;\n }\n //different author and the second one is alphabetically smaller\n else{\n $res = 1;\n }\n\n }\n //var_dump($res);\n //var_dump(' ============ ');\n return $res;\n}", "public function checkCampaigns()\r\n\t{\r\n\t\t// get all the published campaigns and see if the customer satisfies any of them.\r\n\t\t$campaigns = (new \\Shop\\Models\\Campaigns)->setState('filter.published_today', true)->setState('filter.publication_status', 'published')->getList();\r\n\t\t//echo \"Published campaigns: \" . count($campaigns) . \"<br/>\";\r\n\r\n\t\t$indexed_campaigns = array();\r\n\t\tforeach ($campaigns as $campaign)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t$campaign->__user_qualifies = $campaign->customerQualifies( $this );\r\n\t\t\t\t$indexed_campaigns[(string) $campaign->id] = $campaign;\r\n\t\t\t} catch (\\Exception $e) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$matches = array();\r\n\r\n\t\t// if so, grant the customer the benefits, but only if the customer doesn't satisfy the rules of any descendants\r\n\r\n\t\t//echo \"Customer qualifies for this many campaigns: \" . count($indexed_campaigns) . \"<br/>\";\r\n\t\t//echo \"and they are: <br/>\";\r\n\t\tforeach ($indexed_campaigns as $key=>$indexed_campaign)\r\n\t\t{\r\n\t\t\t$next_match = $indexed_campaign;\r\n\r\n\t\t\t// Does the campaign have descendants?\r\n\t\t\tif ($indexed_campaign->__descendants = $indexed_campaign->ancestorsGetDescendants())\r\n\t\t\t{\r\n\t\t\t\tforeach ($indexed_campaign->__descendants as $descendant)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (isset($indexed_campaigns[(string)$descendant->id]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$next_match = $descendant;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$indexed_campaign->__replace_with = null;\r\n\t\t\tif ($next_match->id != $indexed_campaign->id)\r\n\t\t\t{\r\n\t\t\t\t$indexed_campaign->__replace_with = $next_match;\r\n\t\t\t}\r\n\r\n\t\t\tif (!array_key_exists((string) $next_match->id, $matches))\r\n\t\t\t{\r\n\t\t\t\t$matches[(string) $next_match->id] = $next_match;\r\n\t\t\t}\r\n\r\n\t\t\t//echo $indexed_campaign->title . \" (which has \" . count($indexed_campaign->__descendants) . \" descendants) <br/>\";\r\n\t\t}\r\n\r\n\t\t// Check all of the customer's current campaigns,\r\n\t\t// and if they have expired\r\n\t\t// OR if they are being replaced by a descendant,\r\n\t\t// expire the benefits\r\n\t\t$active_campaign_ids = array();\r\n\t\tif ($active_campaigns = (array) $this->{'shop.active_campaigns'})\r\n\t\t{\r\n\t\t\tforeach ($active_campaigns as $key=>$active_campaign_cast)\r\n\t\t\t{\r\n\t\t\t\t$active_campaign_id = (string) \\Dsc\\ArrayHelper::get($active_campaign_cast, 'id');\r\n\t\t\t\t$active_campaign_expires_time = \\Dsc\\ArrayHelper::get($active_campaign_cast, 'expires.time');\r\n\t\t\t\t$active_campaign = (new \\Shop\\Models\\Campaigns)->setState('filter.id', $active_campaign_id)->getItem();\r\n\r\n\t\t\t\t$replacing_with_descendant = false;\r\n\t\t\t\t// Does the campaign have descendants?\r\n\t\t\t\tif ($active_campaign->__descendants = $active_campaign->ancestorsGetDescendants())\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($active_campaign->__descendants as $descendant)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (isset($matches[(string)$descendant->id]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$replacing_with_descendant = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// are we replacing this? Has it expired?\r\n\t\t\t\tif ($active_campaign_expires_time < time() || $replacing_with_descendant)\r\n\t\t\t\t{\r\n\t\t\t\t\t// echo \"Removing customer from: \" . $active_campaign->title . \"<br/>\";\r\n\t\t\t\t\t$active_campaign->expireCustomerRewards( $this );\r\n\t\t\t\t\tunset($active_campaigns[$key]);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Only track this if it really is active\r\n\t\t\t\t\t$active_campaign_ids[] = $active_campaign_id;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t//echo \"Customer's active campaigns: <br/>\";\r\n\t\t//echo \\Dsc\\Debug::dump($active_campaigns);\r\n\r\n\t\t//echo \"Customer should only be in these campaigns: <br/>\";\r\n\r\n\t\t// Now add the customer to any new campaigns they qualify for\r\n\t\tforeach ($matches as $match)\r\n\t\t{\r\n\t\t\t//echo $match->title . \"<br/>\";\r\n\r\n\t\t\tif (!in_array((string) $match->id, $active_campaign_ids))\r\n\t\t\t{\r\n\t\t\t\t$match->rewardCustomer( $this );\r\n\t\t\t\t//echo \"so Adding customer to: \" . $match->title . \"<br/>\";\r\n\t\t\t\t$active_campaigns[] = array(\r\n\t\t\t\t\t'id' => (string) $match->id,\r\n\t\t\t\t\t'title' => (string) $match->title,\r\n\t\t\t\t\t'activated' => \\Dsc\\Mongo\\Metastamp::getDate('now'),\r\n\t\t\t\t\t'expires' => \\Dsc\\Mongo\\Metastamp::getDate( $match->expires() ),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Track current campaigns in the user object, shop.active_campaigns\r\n\t\t$this->{'shop.active_campaigns'} = array_values($active_campaigns);\r\n\r\n\t\treturn $this->save();\r\n\t}", "function matchingCommission($user_id, $userStatus)\n {\n \n global $obj_rep;\n \n $sqlcarry = mysql_fetch_assoc(mysql_query(\"select * from matching_income where user_id='\" . $user_id . \"' order by id desc limit 1\"));\n $carryLeft = $sqlcarry['carry_fwd_left'];\n $carryReft = $sqlcarry['carry_fwd_right'];\n \n $querys1 = mysql_fetch_array(mysql_query(\"select sum(mpv) as totalleftamount from manage_bv_history where status='0' and income_id='\" . $user_id . \"' and leg='left'\"));\n \n $currentleftTotal = mysql_fetch_array(mysql_query(\"select sum(mpv) as totalleft from manage_bv_history where income_id='\" . $user_id . \"' and leg='left'\"));\n \n \n \n \n ////////////////////////////////////////////////////total left with carry forward////////////// \n $leftTotal = $querys1['totalleftamount'] + $carryLeft;\n \n $querys12 = mysql_fetch_array(mysql_query(\"select sum(mpv) as totalrightamount from manage_bv_history where status='0' and income_id='\" . $user_id . \"' and leg='right'\"));\n \n $currentrightTotal = mysql_fetch_array(mysql_query(\"select sum(mpv) as totalright from manage_bv_history where income_id='\" . $user_id . \"' and leg='right'\"));\n \n \n \n ////////////////////////////////////////////////////total right with carry forward////////////// \n $rightTotal = $querys12['totalrightamount'] + $carryReft;\n \n $totalPair = min($leftTotal, $rightTotal);\n \n if ($totalPair >= 1000) {\n $totalPair = 1000;\n $leftCarryForward = 0;\n $rightCarryForward = 0;\n } else {\n $totalPair;\n \n if ($leftTotal < $rightTotal) {\n $leftCarryForward = 0;\n \n $rightCarryForward = $rightTotal - $leftTotal;\n \n }\n \n if ($rightTotal < $leftTotal) {\n $rightCarryForward = 0;\n $leftCarryForward = $leftTotal - $rightTotal;\n }\n \n if ($leftTotal == $rightTotal) {\n $leftCarryForward = 0;\n $rightCarryForward = 0;\n }\n \n }\n $commission = ($totalPair * (10 / 100)) * 1;\n $sts = ($userStatus == 3 ? 1 : 0);\n \n ////////////////////////////////insert record in table///////////////////\n if ($totalPair >= 100) {\n \n $sqlComission = array(\n 'user_id' => $user_id,\n 'carry_fwd_left' => $leftCarryForward,\n 'carry_fwd_right' => $rightCarryForward,\n 'match_left' => $totalPair,\n 'match_right' => $totalPair,\n 'income_pair' => $totalPair,\n 'all_pair' => $totalPair,\n 'lpair' => $currentleftTotal[totalleft],\n 'rpair' => $currentrightTotal[totalright],\n 'commission' => $commission,\n 'final_amount' => $commission,\n 'b_date' => date(\"Y-m-d\"),\n 'status' => $sts,\n 'remark' => 'Get Matching Commission pair wise'\n );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t////////////////////mega matching Commission///////////////////////\n\t\t\t\n\t\t\t$sqlref=mysql_fetch_assoc(mysql_query(\"select * from user_registration where user_id='\".$user_id.\"'\"));\n\t\t\t$refId=$sqlref['ref_id'];\n\t\t\t\n\t\t\tif($refId!='cmp')\n\t\t\t{\n\t\t\t\t$sqlComissionmega = array(\n 'user_id' => $refId,\n 'carry_fwd_left' => $leftCarryForward,\n 'carry_fwd_right' => $rightCarryForward,\n 'match_left' => $totalPair,\n 'match_right' => $totalPair,\n 'income_pair' => $totalPair,\n 'all_pair' => $totalPair,\n 'lpair' => $currentleftTotal[totalleft],\n 'rpair' => $currentrightTotal[totalright],\n 'commission' => $commission,\n 'final_amount' => $commission,\n 'b_date' => date(\"Y-m-d\"),\n 'status' => $sts,\n 'remark' => 'Get Mega Matching Commission'\n );\n\t\t\t\n\t\t\t $lastIds = $obj_rep->insert_tbl($sqlComission, 'matching_income_mega');\n $fieldvalus = array(\n 'status' => 1\n );\n \n $condLevel6s = \" income_id='\" . $refId . \"' and status='0'\";\n $obj_rep->update_tbl($fieldvalus, 'manage_bv_history', $condLevel6s);\n \n $sqlmathicngs = mysql_query(\"select * from matching_income_mega where user_id = '\" . $refId . \"' and id='\" . $lastIds . \"' and status='1'\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t if (mysql_num_rows($sqlmathicngs) > 0) {\n \n $fetDatass = mysql_fetch_assoc($sqlmathicngs);\n /** update amount in final ewallet */\n mysql_query(\"update final_e_wallet set amount=(amount+$fetDatass[commission]) where user_id='\" . $refId . \"'\");\n \n \n /** get amount from final ewallet */\n $args_amount = mysql_fetch_assoc(mysql_query(\"select amount from final_e_wallet where user_id='\" . $refId . \"'\"));\n $Remarks = \" Get Mega Matching Commission\";\n \n /** Insert amount in credit_debit */\n $mega = \"INSERT INTO credit_debit SET user_id='\" . $refId . \"' , \n transaction_no='\" . $this->generate_transaction_number() . \"',\n credit_amt='\" . $fetDatass[commission] . \"',\n final_bal='\" . $args_amount['amount'] . \"',\n receiver_id='\" .$refId . \"',\n sender_id='$user_id',\n receive_date='\" . date(\"Y-m-d\") . \"',\n TranDescription = 'Get Matching commission',\n Remark='\" . $Remarks . \"'\n \";\n \n mysql_query($mega);\n \n }\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n \n $lastId = $obj_rep->insert_tbl($sqlComission, 'matching_income');\n $fieldvalu = array(\n 'status' => 1\n );\n \n $condLevel6 = \" income_id='\" . $user_id . \"' and status='0'\";\n $obj_rep->update_tbl($fieldvalu, 'manage_bv_history', $condLevel6);\n \n $sqlmathicng = mysql_query(\"select * from matching_income where user_id = '\" . $user_id . \"' and id='\" . $lastId . \"' and status='1'\");\n \n \n if (mysql_num_rows($sqlmathicng) > 0) {\n \n $fetDatas = mysql_fetch_assoc($sqlmathicng);\n /** update amount in final ewallet */\n mysql_query(\"update final_e_wallet set amount=(amount+$fetDatas[commission]) where user_id='\" . $user_id . \"'\");\n \n \n /** get amount from final ewallet */\n $args_amount = mysql_fetch_assoc(mysql_query(\"select amount from final_e_wallet where user_id='\" . $user_id . \"'\"));\n $Remark = \" Get Matching Commission\";\n \n /** Insert amount in credit_debit */\n $insert_cr_dr = \"INSERT INTO credit_debit SET user_id='\" . $user_id . \"' , \n transaction_no='\" . $this->generate_transaction_number() . \"',\n credit_amt='\" . $fetDatas[commission] . \"',\n final_bal='\" . $args_amount['amount'] . \"',\n receiver_id='\" . $user_id . \"',\n sender_id='',\n receive_date='\" . date(\"Y-m-d\") . \"',\n TranDescription = 'Get Matching commission',\n Remark='\" . $Remark . \"'\n \";\n \n mysql_query($insert_cr_dr);\n \n }\n\t\t\t\n\t\t\t\n\t\t\t/////////////////////////for voucher wallet information//////////////////////\n\t\t\t\n\t\t\t\t$voucherCom=$commission*(10/100);\n\t\t\t /** update amount in final ewallet */\n\t\t\t\tmysql_query(\"update voucher_e_wallet set amount=(amount+$voucherCom) where user_id='\" . $user_id . \"'\");\n \n \n /** get amount from final ewallet */\n $amoutnget = mysql_fetch_assoc(mysql_query(\"select amount from voucher_e_wallet where user_id='\" . $user_id . \"'\"));\n $Remarks = \" Get Voucher Bonus\";\n \n /** Insert amount in credit_debit */\n $invouhertable = \"INSERT INTO credit_debit_voucher SET user_id='\" . $user_id . \"' , \n transaction_no='\" . $this->generate_transaction_number_voucher() . \"',\n credit_amt='\" . $voucherCom . \"',\n final_bal='\" . $amoutnget['amount'] . \"',\n receiver_id='\" . $user_id . \"',\n sender_id='',\n receive_date='\" . date(\"Y-m-d\") . \"',\n TranDescription = 'Get Voucher Bonus',\n Remark='\" . $Remarks . \"'\n \";\n \n mysql_query($invouhertable);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//////////////////////////////////////end heree voucher /////////////////////////////////////\n\t\t\t\n\t\t\t\n\t\t}\n \n }", "function DiffStateAvail_AcceptOrigin($JobID) //if job accepted or not by any member at Origin\n {\n global $link;\n\n\t $str = \"Select tblmemberaction.MAID From tblmemberaction\n Inner Join tbljobs_location ON tblmemberaction.MAID = tbljobs_location.MAID\n Where tbljobs_location.Origin = '1' AND\n tblmemberaction.JobID = $JobID AND tblmemberaction.MID !=\" . $_SESSION['Member_Id'];\n\t\t\n\t $result_newQuery = mysql_query($str) or die(\"Query failed5\");\n $line = mysql_fetch_array($result_newQuery, MYSQL_ASSOC);\n $result = $line[MAID];\n \n\t if (count($result) > 0)\n\t {\n\t return 1;\n\t }\n\t else\n\t {\n\t return 0;\n\t }\n }", "function getChamberMembers($chamberID) {\r\n $sql = $this->db->prepare(\"SELECT UserID, firstname, lastname, email, businessname, expiry, archived, type\r\n FROM USER LEFT OUTER JOIN BUSINESS ON USER.businessID=BUSINESS.businessID WHERE USER.chamberID=:chamber_id\r\n ORDER BY lastname;\");\r\n if ($sql->execute(array(\r\n 'chamber_id' => $chamberID,\r\n ))) {\r\n return $sql->fetchall(PDO::FETCH_ASSOC);\r\n }\r\n return $chamberID;\r\n }", "function sort_members($a, $b){\n\t\t\t\t\t\t\t\t return (strtolower($a->organization) < strtolower($b->organization)) ? -1 : 1;\n\t\t\t\t\t\t\t\t}", "function bultoSimilar($bulto,$manifiesto)\n {\n $sql=<<<sql\n select bul_ref\n from manembxbulto\n where manemb_id=$manifiesto\nsql;\n\n $rs=&$this->con->Execute($sql);\n $cad=\"\";\n $sep=\",\";\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep;\n $rs->MoveNext();\n }\n \n //recuperar bultos quedados de igual origen y destino\n $oManEmb=new c_manifiesto_embarque($this->con,$this->usu_audit);\n $oManEmb->info($manifiesto);\n $sql=<<<sql\n select distinct(bq.bul_ref)\n from manembxbultoqueda bq, manembxbultoreal br\n where\n bq.bul_ref<>br.bul_ref\n and bq.manemb_id in \n (\n select distinct manemb_id from manifiesto_embarque\n where manemb_origen='$oManEmb->manemb_origen' and manemb_destino='$oManEmb->manemb_destino' ) \nsql;\n $rs=&$this->con->Execute($sql);\n while(!$rs->EOF)\n {\n $cad.=\"'\".$rs->fields[0].\"'\".$sep; \n $rs->MoveNext(); \n }\n $cad=substr($cad,0,(strlen($cad)-1));\n return($cad);\n }", "function rets_bsf_ismember ($roles, $agent1, $agency1, $agent2, $agency2) {\n\n $ismember1 = rets_bsf_ismember_agent ($roles, $agent1);\n $ismember2 = rets_bsf_ismember_agent ($roles, $agent2);\n\n if ($ismember1 == 'No' && $ismember2 == 'No') {\n return 'No';\n }\n\n // Set the variables for TYPE and UID so we don't error out\n if ($ismember1 == 'No') {\n $type1 = '';\n $uid1 = '';\n } else {\n $type1 = $ismember1[0];\n $uid1 = $ismember1[1];\n }\n if ($ismember2 == 'No') {\n $type2 = '';\n $uid2 = '';\n } else {\n $type2 = $ismember2[0];\n $uid2 = $ismember2[1];\n }\n \n $IsMember = array( \n 'ListAgentID' => $agent1,\n 'ListOfficeID' => $agency1,\n 'ListAgentType' => $type1,\n 'ListAgentUID' => $uid1,\n 'CoListAgentID' => $agent2,\n 'CoListOfficeID' => $agency2,\n 'CoListAgentType' => $type2,\n 'CoListAgentUID' => $uid2,\n );\n\n if ($ismember1 == 'No') {\n $IsMember['ListAgentID'] = $agent2;\n $IsMember['ListOfficeID'] = $agency2;\n $IsMember['ListAgentType'] = $type2;\n $IsMember['ListAgentUID'] = $uid2;\n $ismember2 = 'No';\n } \n if ($ismember2 == 'No') {\n $IsMember['CoListAgentID'] = '';\n $IsMember['CoListOfficeID'] = '';\n $IsMember['CoListAgentType'] = '';\n $IsMember['CoListAgentUID'] = '';\n\t$TeamMember = rets_bsf_get_teammember($roles,$IsMember['ListAgentUID']);\n\tif ($TeamMember<>'No') {\n\t $IsMember['CoListAgentID'] = $TeamMember[0];\n\t $IsMember['CoListOfficeID'] = $TeamMember[1];\n\t $IsMember['CoListAgentType'] = $TeamMember[2];\n\t $IsMember['CoListAgentUID'] = $TeamMember[3];\n\t}\n }\n return $IsMember;\n \n}", "function validateMember($member, $shareId, $balance) {\n\t\t$status = 1; // se inicializa el status y luego cambia si entra en las condiciones de bloqueo\n\t\t$message = '';\n\n\t\tif($balance < 0) {\n\t\t\t$balanceStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_ACCION_SALDO_DEUDOR'); // Archivo config\n\t\t\t// $status = $this->accessControlHelper->getAccesControlStatus($balanceStatus,$status);\n\t\t\t$status = $status - $balanceStatus;\n\t\t}\n\n\t\t$records = $this->recordRepository->getBlockedRecord($member);\n\t\tif(count($records)) {\n\t\t\tforeach ($records as $key => $value) {\n\t\t\t\t$recordStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_BLOQUEO_EXPEDIENTE');\n\t\t\t\t// $status = $this->accessControlHelper->getAccesControlStatus($recordStatus,$status);\n\t\t\t\t$status = $status - $recordStatus;\n\t\t\t\t$message .= 'Bloqueo activo por expediente :'.$value->id.', hasta la fecha '.$value->expiration_date.'<br>';\n\t\t\t}\n\t\t}\n\n\t\t$share = $this->shareRepository->find($shareId);\n\n\t\tif($share && $share->shareType && $share->shareType()->first()->access == 0) {\n\t\t\t$shareStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_ACCION_INACTIVA');\n\t\t\t$status = $status - $shareStatus;\n\t\t\t$message .= '* La Accion no posee acceso <br>';\n\t\t}\n\n\n\t\tif($share && $share->permit == 1) {\n\t\t\t$shareStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_ACCION_INACTIVA');\n\t\t\t$status = $status - $shareStatus;\n\t\t\t$message .= '* La accion '.$share->share_number.' tiene un permiso activo y no puede ingresar <br>';\n\t\t}\n\t\tif($share->status === 0) {\n\t\t\t$shareStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_ACCION_INACTIVA');\n\t\t\t// $status = $this->accessControlHelper->getAccesControlStatus($shareStatus,$status);\n\t\t\t$status = $status - $shareStatus;\n\t\t\t$message .= '* Accion Inactiva <br>';\n\t\t}\n\n\t\t$personStatus = $this->checkPersonStatus($member);\n\t\tif($personStatus === \"Inactivo\"){\n\t\t\t$personStatus = Config::get('partners.ACCESS_CONTROL_STATUS.SOCIO_INACTIVO');\n\t\t\t// $status = $this->getAccesControlStatus($personStatus,$status);\n\t\t\t$status = $status - $personStatus;\n\t\t\t$message .= '* Socio Inactivo <br>';\n\t\t}\n\t\tif($message !== '') {\n\t\t\t$currentPerson = $this->personModel->query(['name', 'last_name', 'rif_ci', 'card_number'])->where('id', $member)->first();\n\t\t\t$name = '<strong>'.$currentPerson->name.' '.$currentPerson->last_name.'</strong> Carnet: '.$currentPerson->card_number;\n\t\t\t$message = '<br><div><div>'.$name.'</div><div>'.$message.'</div></div>';\n\t\t}\n\t\t// se retorna el mensaje de error y el estatus , estos valores son usados para el registro final de cada miembro\n\t\treturn (object)[ 'message' => $message, 'status' => $status ];\n\t}", "function compareReports(CountyMarriage $r1, \n CountyMarriage $r2)\n{\n return $r1->compare($r2);\n}", "public function getSponsorname() {}", "function member_in_class($class, $member)\n{\n return $class->class_pin == $member->class->class_pin;\n}", "function intersection($searcher = array(), $candidate = array()){\r\n\t\t$set = array();\r\n\t\tforeach($searcher[\"MemberProfile\"] as $key_searchee=>$temp1){\r\n\t\t\tif ($key_searchee==\"member_id\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach($candidate[\"MemberProfile\"] as $key_candidate=>$temp2){\r\n\t\t\t\tif ($key_candidate==$key_searchee){\r\n\t\t\t\t\tif ($temp1[$key_searchee]==$temp2[$key_candidate]){\r\n\t\t\t\t\t\t$set[] = array($key_searchee=>$temp1);\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\treturn $set;\r\n\t}", "public function LoadSponsorIdsAndCredits() {\n $q = \"SELECT sponsorId,credits FROM DriverSponsorRelations WHERE driverId={$this->GetID()};\";\n $qresult = $this->db->sql->query($q);\n\n if ($qresult && $qresult->num_rows > 0) {\n for ($row = $qresult->fetch_assoc(); $row !== NULL; $row = $qresult->fetch_assoc()) {\n $id = $row[\"sponsorId\"];\n array_push($this->sponsorIds, $id);\n $this->credits[$id] = $row[\"credits\"];\n }\n\n $qresult->free();\n }\n else if (!$qresult) {\n return false;\n }\n\n return true;\n }", "public function searchCostBill() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n $criteria = new CDbCriteria;\n $criteria->order = 'id DESC';\n $criteria->compare('id', $this->id);\n $criteria->compare('bill_no', $this->bill_no, true);\n // $criteria->compare('bill_date', $this->bill_date, true);\n $criteria->compare('bill_from_date', $this->bill_from_date, true);\n $criteria->compare('bill_to_date', $this->bill_to_date, true);\n $criteria->compare('customer_id', $this->customer_id);\n // $criteria->compare('purchase_order_id', $this->purchase_order_id);\n $criteria->compare('item_id', $this->item_id);\n $criteria->compare('bill_type', $this->bill_type, true);\n $criteria->compare('print_type', $this->print_type, true);\n $criteria->compare('added_on', $this->added_on, true);\n $criteria->compare('particulars', $this->particulars, true);\n $criteria->condition=\"bill_type='cost_bill'\";\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "function processPayment() {\n \n if ($this->creditPayment != 0.00){\n$fieldParse = new parseGatewayFields(); \n$fieldParse-> setCardName($this->cardName);\n$fieldParse-> setAchName($this->accountName);\n$fieldParse-> setCardType($this->cardType);\n$fieldParse-> setAccountType($this->accountType);\n$fieldParse-> setCardExpDate($this->cardYear);\n$fieldParse-> parsePaymentFields();\n\n //reassign vars for CS Credit Cards\n$ccFirstName = $fieldParse-> getCredtCardFirstName();\n$ccLastName = $fieldParse-> getCredtCardLastName();\n$ccCardType = $fieldParse-> getCardType();\n$ccCardYear = $fieldParse-> getCardYear(); \n$ccCardMonth = $this->cardMonth;\n$ccCardNumber = $this->cardNumber;\n$ccCardCvv = $this->cardCvv;\n\n\n \n$club_id = $_SESSION['location_id'];\n \n$dbMain = $this->dbconnect();\n\n\n$stmt = $dbMain->prepare(\"SELECT MIN(club_id) FROM club_info WHERE club_name != ''\");//>=\n$stmt->execute(); \n$stmt->store_result(); \n$stmt->bind_result($club_id); \n$stmt->fetch();\n$stmt->close();\n \n$stmt = $dbMain ->prepare(\"SELECT gateway_id, passwordfd FROM billing_gateway_fields WHERE club_id= '$club_id'\");\n$stmt->execute(); \n$stmt->store_result(); \n$stmt->bind_result($userName, $password);\n$stmt->fetch();\n$stmt->close();\n \n$amount = $this->creditPayment;\n \n //credit\"\";//\n$ccnumber = $ccCardNumber;//\"4111111111111111\";\n$ccexp = \"$this->cardMonth$this->cardYear\";//\"1010\";\n$cvv = \"$this->cardCvv\";\n //==================\n$reference = \"CMP Balance\";\n$vaultFunction = \"\";//'add_customer';//'add_customer' or 'update_customer'\n$orderId = \"$this->contractKey\";\n$merchField1 = \"$reference $this->contractKey\";\n$payTypeFlag = \"creditcard\";//\"creditcard\"; // '' or 'check'\nif(isset($_SESSION['track1'])){\n $track1 = $_SESSION['track1'];\n}else{\n $track1 = \"\";\n}\nif(isset($_SESSION['track2'])){\n $track2 = $_SESSION['track2'];\n}else{\n $track2 = \"\";\n}\n\n \n$gw = new gwapi;\n$gw->setLogin(\"$userName\", \"$password\");\n$r = $gw->doSale($amount, $ccnumber, $ccexp, $cvv, $payTypeFlag, $orderId, $merchField1, $track1, $track2, $ccFirstName, $ccLastName);\n$ccAuthDecision = $gw->responses['responsetext'];\n$vaultId = $gw->responses['customer_vault_id'];\n$authCode = $gw->responses['authcode']; \n$transactionId = $gw->responses['transactionid'];\n$ccAuthReasonCode = $gw->responses['response_code'];\n//echo \"fubar $ccAuthReasonCode\";\n // exit;\n\n if($ccAuthReasonCode != 100) {\n \n $this->paymentStatus = \"$ccAuthDecision: $ccAuthDecision\";\n //$this->transactionId = $ccAuthReasonCode; \n }else{ \n $_SESSION['cc_request_id'] = $authCode;\n $this->paymentStatus = 1;\n //$this->transactionId = $ccAuthRequestId;\n }\n }\n if ($this->creditPayment == 0.00){\n $this->paymentStatus = 1;\n }\n}", "function processAuthority($phone1,$phone2,$call) {\r\n\t$perms_contract = $phone1[4]; //move to uppercase\r\n\t//$perms_contract = \"2.1.S\"; //move to uppercase\r\n\t$perms_caller = $phone2[4]; //move to uppercase\r\n\t//$perms_caller = \"3.2.S\"; //move to uppercase\r\n\t$flagged = false;\r\n\t//die();\r\n\t\r\n\tif($perms_contract != \"A\") { // These two lines remove the A level, all the rest are judgable \r\n\t\tif($perms_caller != \"A\") {\r\n\t\tif($perms_caller != \"F\") {\r\n\t\t\t// Zone Leader Catch \r\n\t\t\tif(strlen($perms_contract) < 2 || strlen($perms_caller) < 2) { //Tests for a whole number 1, 2, 3..\r\n\t\t\t\tif(substr($perms_contract,0,1) != substr($perms_caller,0,1)) $flagged = true; // Checks if the (1).1 and (1) match, flags if not\r\n\t\t\t}\r\n\t\t\t// District Catch\r\n\t\t\telseif(strlen($perms_contract) < 4 || strlen($perms_caller) < 4) { // Test for a float 1.2, 3.4..\r\n\t\t\t\tif(substr($perms_contract,0,1) != substr($perms_caller,0,1)) $flagged = true; // Checks if the (1).1 and (1).8 match, flags if not\r\n\t\t\t\telseif($perms_contract == $perms_caller) $flagged = false;\r\n\t\t\t\t//elseif(substr($perms_contract,2,1) != substr($perms_caller,2,1) && substr($perms_contract,2,1) != \"\" || substr($perms_caller,2,1) != \"\") $flagged = true; // Checks if the 1.(1) and 2.(1) match, flags if not\r\n\t\t\t}\r\n\t\t\t// Sister Catch\r\n\t\t\tif(strpos($perms_contract, \"S\") !== false || strpos($perms_caller, \"S\") !== false) { //Tests for S\r\n\t\t\t\tif(strpos($perms_contract, \"S\") !== strpos($perms_caller, \"S\")) { //Tests for one of them not being a sister\r\n\t\t\t\t\tif(substr($perms_contract,0,1) != substr($perms_caller,0,1)) $flagged = true; // Checks if the (1).1 and (1).8 match, flags if not\r\n\t\t\t\t\telseif(($perms_contract + \".S\") == $perms_caller) $flagged = false;\r\n\t\t\t\t\t//elseif(substr($perms_contract,2,1) != substr($perms_caller,2,1) && substr($perms_contract,2,1) != \"\" || substr($perms_caller,2,1) != \"\") $flagged = true; // Checks if the 1.(1) and 2.(1) match, flags if not\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t}\r\n\t\t// Duration Catch\r\n\tif(strtotime(substr($call[3],11,8)) > strtotime($GLOBALS['maximum_duration'])) $flagged = true;\r\n\t\r\n\t// Time Catch\r\n\tif(strtotime($call[2]) >= strtotime($GLOBALS['maximum_time'])) $flagged = true;\r\n\telseif(strtotime($call[2]) <= strtotime($GLOBALS['minimum_time'])) $flagged = true;\r\n\t\r\n\t// Flagged from Directory\r\n\tif($perms_contract == \"F\" || $perms_caller == \"F\") $flagged = true;\r\n\t//if(!$flagged) echo \"free! <br>\";\r\n\t/** REPORTING ***************/\r\n\tif($GLOBALS['reporting']) {\r\n\t\tif($flagged) addToReport($GLOBALS['report'], array_merge($phone2,$call), \"caller-flagged\",$GLOBALS['iterations']); \r\n\t\telse addToReport($GLOBALS['report'], array_merge($phone2,$call), \"caller-ok\",$GLOBALS['iterations']);\r\n\t}\r\n\t\r\n}", "function InfInsertMember($db, $inf_contact_id, $sponsor_id = false, $inf_product_id = false, $inf_payment_id = false, $inf_invoice_id = false) {\n\n\tif (DEBUG) EchoLn(\"ContactId: $inf_contact_id\");\n\n\t$contact = InfGetContactDetails($inf_contact_id);\n\n\t# Look up if the member already exists or not\n\t$query = \"SELECT m.member_id \n\t\t\t\tFROM members m\n\t\t\t\tWHERE inf_contact_id='{$contact['Id']}'\n\t\t\t\tLIMIT 1\";\n\tif (DEBUG) EchoLn($query);\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\tif ($row = mysqli_fetch_assoc($result)) {\n\t\t# FAILURE - Already exists\n\t\treturn array(\"member_id\" => \"\", \"username\" => \"\", \"passwd\" => \"\", \"email\" => \"\", \"name\" => \"\");\n\t}\n\n\t$member_id = false;\n\n\t# See if the customer (email) is an existing member - by checking email\n\t$query = \"SELECT member_id, inf_contact_id\n\t\t\t\tFROM members m\n\t\t\t\tLEFT JOIN member_emails me USING (member_id)\n\t\t\t\tWHERE m.email='{$contact['Email']}'\n\t\t\t\tOR me.alternate_email='{$contact['Email']}'\n\t\t\t\tORDER BY m.create_date ASC, me.create_date DESC\";\n\tif (DEBUG) EchoLn($query);\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\tif ($row = mysqli_fetch_assoc($result)) {\n\t\t$member_id = $row['member_id'];\n\t\t# If the member was found and didn't have an inf_contact_id, then give it to them.\n\t\tif (!$row['inf_contact_id']) {\n\t\t\t$query = \"UPDATE members \n\t\t\t\t\t\tSET inf_contact_id='{$payment['ContactId']}'\n\t\t\t\t\t\tWHERE member_id='$member_id\";\n\t\t\tif (DEBUG) EchoLn($query);\n\t\t\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\t\t\tcontinue;\n\t\t}\n\t}\n\t\n\tif ($sponsor_id) {\n\t\t$sponsor_array['sponsor_id'] = $sponsor_id;\n\t\t$sponsor_array['tracking'] = \"\";\n\t\t$sponsor_array['sponsor_unknown'] = 0;\n\t} else {\n\t\t$sponsor_array = InfGetSponsorDetails($db, $inf_contact_id, $contact);\n\t}\n\n\t# Create new username for the member\n\t# Keep creating them randomly until we find one not being used\n\tdo {\n\t\t$username = substr(str_shuffle(\"abcdefghijkmnopqrstuvwxyz\"), 0, 2).substr(str_shuffle(\"2346789\"), 0, 3);\n\t\t$query = \"SELECT member_id \n\t\t\t\t\tFROM members\n\t\t\t\t\tWHERE username='$username'\";\n\t\tif (DEBUG) EchoLn($query);\n\t\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\t} while (mysqli_fetch_assoc($result));\n\n\t$passwd = substr(str_shuffle(\"2346789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"), 0, 5);\n\t\n\t$sponsor_row = GetRowMemberDetails($db, $sponsor_array['sponsor_id']);\n\t\n\t# Assign their coaches \n\t$coach_id_setup = GetCoachId ($db, \"setup\");\n\tif (isset($sponsor_row['team_leader_id']) && $sponsor_row['team_leader_id'] <> 0) {\n\t\t// Special case for 173 (he's team leader closing strategy sales himself\n\t\t$coach_id_scale = $sponsor_row['team_leader_id'];\n\t} else {\n\t\t$coach_id_scale = GetCoachId ($db, \"scale\");\n\t}\n\t$coach_id_traffic = GetCoachId ($db, \"traffic\");\n\t$coach_id_success = GetCoachId ($db, \"success\");\n\t\n\t// If they are coming in at RISE and above then open up step 8 for them\n\t$step_sql = '';\n\tif (in_array($inf_product_id, array(INF_PRODUCT_ID_BAS_RIS_H, INF_PRODUCT_ID_BAS_RIS_C))) {\n\t\t$step_sql = \", steps_completed = 1.6\n\t\t\t\t\t, step_unlocked = 2.2\";\t\n\t\t$coach_id_startup = 0;\n\t\tEmailNewMemberCoach($db, \"S2\", $coach_id_setup, $member_row);\n\t} else {\n\t\tEmailNewMemberCoach($db, \"S1\", $coach_id_startup, $member_row);\n\t\t$coach_id_startup = GetCoachId ($db, \"startup\");\t\t\n\t}\n\n\t$date = date(\"Y-m-d H:i:s\", strtotime($contact['DateCreated']));\n// , inf_aff_id\t='$inf_aff_id'\n\t$query = \"INSERT INTO members\n\t\t\t\tSET inf_contact_id\t='{$contact['Id']}'\n\t\t\t\t, sponsor_id\t\t='{$sponsor_array['sponsor_id']}'\n\t\t\t\t, team_leader_id\t='{$sponsor_row['team_leader_id']}'\n\t\t\t\t, username\t\t\t='$username'\n\t\t\t\t, passwd\t\t\t='$passwd'\n\t\t\t\t, name\t\t\t='{$contact['FirstName']} {$contact['LastName']}'\n\t\t\t\t, email\t\t\t='{$contact['Email']}'\n\t\t\t\t, phone\t\t\t='{$contact['Phone1']}'\n\t\t\t\t, first_name\t='{$contact['FirstName']}'\n\t\t\t\t, last_name\t\t='{$contact['LastName']}'\n\t\t\t\t, address\t\t='{$contact['StreetAddress1']}'\n\t\t\t\t, city\t\t\t='{$contact['City']}'\n\t\t\t\t, state\t\t\t='{$contact['State']}'\n\t\t\t\t, zip\t\t\t='{$contact['PostalCode']}'\n\t\t\t\t, country\t\t='{$contact['Country']}'\n\t\t\t\t, t\t\t\t\t='{$sponsor_array['tracking']}'\n\t\t\t\t, ip\t\t\t='{$_SERVER['REMOTE_ADDR']}'\n\t\t\t\t$step_sql\n\t\t\t\t, sponsor_unknown\t='{$sponsor_array['sponsor_unknown']}'\n\t\t\t\t, join_date\t\t\t='$date'\n\t\t\t\t, create_date\t\t=NOW()\";\n\tif (DEBUG) EchoLn($query);\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\t$member_id = mysqli_insert_id($db);\n\n\t_InfGiveBonuses ($db, $inf_contact_id, $inf_product_id, $inf_payment_id, $inf_invoice_id, $card_id);\n\t\n\t# SUCCESS\n\t$query = \"INSERT INTO member_coaches\n\t\t\t\tSET member_id\t='$member_id'\n\t\t\t\t, coach_id_startup\t='$coach_id_startup'\n\t\t\t\t, coach_id_setup\t='$coach_id_setup'\n\t\t\t\t, coach_id_scale\t='$coach_id_scale'\n\t\t\t\t, coach_id_traffic\t='$coach_id_traffic'\n\t\t\t\t, coach_id_success\t='$coach_id_success'\n\t\t\t\t, start_date\t\t='$date'\";\n if (DEBUG) EchoLn($query);\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db) . '. ' . $query);\n\n\t# Remove from GetResponse\n\tGRMoveContactCampaign($contact['Email']);\n\n\t$member_row = GetRowMember($db, $member_id);\n\t\n\t# Email Member, Welcome Coach, S1 Coach and Sponsor \n\tEmailNewMember($db, $member_id);\n\tEmailNewMemberCoach($db, \"Welcome\", $coach_id_setup, $member_row);\n\tEmailNewMemberSponsor($db, $sponsor_row, $member_row, $inf_product_id);\n\t\t\t\t\n\treturn $member_row;\n}", "function cc_bill($cc_info, $member, $amount, \n $currency, $product_description, \n $charge_type, $invoice, $payment){\n global $config;\n $log = array();\n //////////////////////// cc_bill /////////////////////////\n\n srand(time());\n if ($charge_type == CC_CHARGE_TYPE_TEST) \n $amount = \"1.00\";\n $vars = array(\n \"type\" => 'sale',\n \"username\" => $this->config['login'],\n \"password\" => $this->config['pass'],\n \"orderid\" => $payment['payment_id'],\n \"amount\" => $amount,\n \"orderdescription\" => $product_description\n );\n if($charge_type == CC_CHARGE_TYPE_RECURRING){\n $vars['customer_vault_id'] = $member['data']['inspirepay_customer_vault_id'];\n }else{\n $vars +=array(\n \"ccnumber\" => $cc_info['cc_number'],\n \"ccexp\" => $cc_info['cc-expire'],\n \"email\" => $member['email'],\n \"firstname\" => $cc_info['cc_name_f'],\n \"lastname\" => $cc_info['cc_name_l'],\n \"address1\" => $cc_info['cc_street'],\n \"city\" => $cc_info['cc_city'],\n \"state\" => $cc_info['cc_state'],\n \"zip\" => $cc_info['cc_zip'],\n \"country\" => $cc_info['cc_country'],\n \"ipaddress\" => $member['remote_addr'] ? $member['remote_addr'] : $_SERVER['REMOTE_ADDR'],\n \"phone\" => $cc_info['cc_phone']\n );\n if ($cc_info['cc_code'])\n $vars['cvv'] = $cc_info['cc_code'];\n }\n \n // prepare log record\n $vars_l = $vars; \n if($vars['ccnumber'])\n $vars_l['ccnumber'] = $cc_info['cc'];\n if ($vars['cvv'])\n $vars_l['cvv'] = preg_replace('/./', '*', $vars['cvv']);\n $log[] = $vars_l;\n /////\n $res = $this->run_transaction($vars);\n $log[] = $res;\n\n if ($res['response'] == '1'){ \n if ($charge_type == CC_CHARGE_TYPE_TEST)\n $this->void_transaction($res['transactionid'], $log);\n return array(CC_RESULT_SUCCESS, \"\", $res['transactionid'], $log);\n } elseif ($res['response'] == '2') {\n return array(CC_RESULT_DECLINE_PERM, $res['responsetext'], \"\", $log);\n } else {\n return array(CC_RESULT_INTERNAL_ERROR, $res['responsetext'], \"\", $log);\n }\n }", "public function verification_by_member($deal_id,$mem_id,&$response_msg){\n\t\t$db = new db();\n\t\t\n\t\t$q = \"select added_by_mem_id from \".TP.\"transaction where id='\".mysql_real_escape_string($deal_id).\"'\";\n\t\t$ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\treturn false;\n\t\t}\n\t\t$row = $db->get_row();\n\t\tif($row['added_by_mem_id'] == $mem_id){\n\t\t\t$response_msg = \"As the submitter of this deal, you cannot verify it\";\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$q = \"select count(*) as cnt from \".TP.\"transaction_verifiers where deal_id='\".mysql_real_escape_string($deal_id).\"' and mem_id='\".mysql_real_escape_string($mem_id).\"'\";\n\t\t$ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\treturn false;\n\t\t}\n\t\t$row = $db->get_row();\n\t\tif($row['cnt'] > 0){\n\t\t\t/*******\n\t\t\tthis member has already verified the deal as ok\n\t\t\t*********/\n\t\t\t$response_msg = \"You have already confirmed the detail\";\n\t\t\treturn true;\n\t\t}\n\t\t$q = \"insert into \".TP.\"transaction_verifiers set deal_id='\".mysql_real_escape_string($deal_id).\"', mem_id='\".mysql_real_escape_string($mem_id).\"', date_verified='\".date('Y-m-d H:i:s').\"'\";\n\t\t$ok = $db->mod_query($q);\n\t\tif(!$ok){\n\t\t\treturn false;\n\t\t}\n\t\t$response_msg = \"Thank you for confirming the deal detail\";\n\t\treturn true;\n\t}", "public function checkOverlap()\n {\n global $zdb;\n\n try {\n $select = $zdb->select(self::TABLE, 'c');\n $select->columns(\n array('date_debut_cotis', 'date_fin_cotis')\n )->join(\n array('ct' => PREFIX_DB . ContributionsTypes::TABLE),\n 'c.' . ContributionsTypes::PK . '=ct.' . ContributionsTypes::PK,\n array()\n )->where(Adherent::PK . ' = ' . $this->_member)\n ->where(array('cotis_extension' => new Expression('true')))\n ->where->nest->nest\n ->greaterThanOrEqualTo('date_debut_cotis', $this->_begin_date)\n ->lessThan('date_debut_cotis', $this->_end_date)\n ->unnest\n ->or->nest\n ->greaterThan('date_fin_cotis', $this->_begin_date)\n ->lessThanOrEqualTo('date_fin_cotis', $this->_end_date);\n\n if ( $this->id != '' ) {\n $select->where(self::PK . ' != ' . $this->id);\n }\n\n $results = $zdb->execute($select);\n $result = $results->current();\n if ( $result !== false ) {\n $d = new \\DateTime($result->date_debut_cotis);\n\n return _T(\"- Membership period overlaps period starting at \") .\n $d->format(_T(\"Y-m-d\"));\n }\n return true;\n } catch (\\Exception $e) {\n Analog::log(\n 'An error occured checking overlaping fee. ' . $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "function cons_benef2($ced)\r\n\t{\r\n\t \t$sql=\"SELECT * FROM slc_benef WHERE ced_benf=\".$ced;\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result)\r\n\t\t { \r\n\t\t\twhile($reg= mysql_fetch_row($result))\r\n\t\t\t {\r\n\t\t\t if($reg[2]==$ced)\r\n\t\t\t { $cad=$reg[1].\"**\".$reg[2].\"**\".$reg[3].\"**\".$reg[6].'**'.$reg[7];\r\n\t\t\t return $cad;\r\n\t\t\t\t }\r\n\t\t\t else\r\n\t\t\t\t return false; \t \r\n\t\t\t }\r\n\t\t }\t \r\n\t\telse\r\n\t\t\t return false;\r\n\t}", "function get_consumer_details() {\n\t\t$consumer_no = $_REQUEST['consumer_no'];\n\t\t$biller_id = $_REQUEST['biller_id'];\n\t\tif (!empty($consumer_no) && !empty($biller_id)) {\n\t\t\t$biller_in_id = 'biller_user.biller_customer_id_no';\n\t\t\t$records_consumer = $this -> conn -> join_two_table_where_two_field('biller_user', 'biller_details', 'biller_id', 'biller_id', $biller_in_id, $consumer_no, 'biller_user.biller_id', $biller_id);\n\n\t\t\tif (!empty($records_consumer)) {\n\t\t\t\t$biller_id = $records_consumer[0]['biller_id'];\n\t\t\t\t$biller_company = $records_consumer[0]['biller_company_name'];\n\t\t\t\t$biller_company_logo = biller_company_logo . $records_consumer[0]['biller_company_logo'];\n\t\t\t\t$biller_user_name = $records_consumer[0]['biller_user_name'];\n\t\t\t\t$biller_customer_id = $records_consumer[0]['biller_customer_id_no'];\n\t\t\t\t$bill_amount = $records_consumer[0]['bill_amount'];\n\t\t\t\t$bill_due_date = $records_consumer[0]['bill_due_date'];\n\t\t\t\t$biller_user_email = $records_consumer[0]['biller_user_email'];\n\t\t\t\t$biller_user_contact_no = $records_consumer[0]['biller_user_contact_no'];\n\t\t\t\t$bill_pay_status = $records_consumer[0]['bill_pay_status'];\n\t\t\t\t$bill_invoice_no = $records_consumer[0]['bill_invoice_no'];\n\t\t\t\t$current_date = date(\"Y-m-d\");\n\t\t\t\tif ($bill_due_date >= $current_date) {\n\t\t\t\t\tif ($bill_pay_status == '1') {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill already paid\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => 'true', \"biller_id\" => $biller_id, 'biller_company' => $biller_company, 'biller_logo' => $biller_company_logo, 'consumer_name' => $biller_user_name, 'consumer_id' => $biller_customer_id, 'bill_amount' => $bill_amount, 'due_date' => $bill_due_date, 'consumer_email' => $biller_user_email, 'consumer_contact_no' => $biller_user_contact_no, 'bill_pay_status' => $bill_pay_status, 'bill_invoice_no' => $bill_invoice_no);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill Paid date is expired\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"No Bill Found from this consumer no\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing Parameter\", 'consumer_no' => $consumer_no, 'biller_id' => $biller_id);\n\t\t}\n\t\techo $this -> json($post);\n\n\t}", "function compairUserLink($d1,$d2) {\n if (isset($d1[\"lastname\"]) && isset($d2[\"lastname\"]) && isset($d1[\"firstname\"]) && isset($d2[\"firstname\"])) {\n return getPersonLink($d1[\"lastname\"],$d1[\"firstname\"])==getPersonLink($d2[\"lastname\"],$d2[\"firstname\"]);\n }\n else\n return false;\n}", "function compareStrainByDistance($strainA, $strainB)\n{\n // Same hamming distance to reference\n if ($strainA['dist_to_ref'] == $strainB['dist_to_ref'])\n {\n //sort by alphetical order\n if($strainA['name'] != $strainB['name'])\n {\n return ($strainA['name'] < $strainB['name']) ? -1 : 1;\n }\n // in the other case, they are equal\n return 0;\n }\n return ($strainA['dist_to_ref'] < $strainB['dist_to_ref']) ? -1 : 1;\n}", "public function has_competitor($memberid){\n $sql = \"SELECT * FROM tournamentCompetitors WHERE tournamentID=$this->id AND competitorID=$memberid\";\n $result = self::$database->query($sql);\n if (mysqli_num_rows($result)==1){\n return true;\n }\n return false;\n }", "function getCompatibleCandidates($searchee = array(), $criteria=array(), $limit=-1){\t\r\n\t\t$action=\"profile_search\";\r\n\t\t$registered_date=null;\r\n\t\tforeach($criteria as $key=>$value){ //plugs variables to place\r\n\t\t\tif ($key==\"action\"){\r\n\t\t\t\t$action = $value;\r\n\t\t\t}else if ($key==\"registered_date\"){\r\n\t\t\t\t$registered_date = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($action==\"searchbydateprofile\"){\r\n\t\t\t\r\n\t\t\t$condition = array(\"DATE(Member.created) = '\".$registered_date.\"'\",\r\n\t\t\t\t\t\t\t\t \"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\t\r\n\t\t}else if ($action==\"all\"){\r\n\t\t\t$condition = array(\"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t$this->controller->Member->unbindModel(array(\"hasMany\"=>array(\"GiftAvailTransaction\", \"Notification\", \"CreditCard\", \"PrivateMessage\", \"SentGift\", \"SubscriptionTransaction\", \"MemberProfileAnswer\", \"Album\", \"InMyOwnWordsAnswer\", \"MembersInterest\", \"Connection\", \"ReceiveMessage\", \"ShoppedItem\")));\r\n\t\tif ($limit==-1){ \r\n\t\t\t$members = $this->controller->Member->find(\"all\", \r\n\t\t\t\t\t\tarray(\"conditions\"=>$condition));\r\n\t\t}else{\r\n\t\t\t$members = $this->controller->Member->find(\"all\", array(\"conditions\"=>$condition, \"limit\"=>$limit));\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$matches = array();\r\n\t\tforeach ($members as $member){\r\n\r\n\t\t\t$passed = true;\r\n\t\t\tif (isset($searchee[\"MemberSetting\"])){\r\n\t\t\t\tif ($this->validAge($searchee,$member)&&$this->validDistance($searchee,$member)){\r\n\t\t\t\t\t$passed = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$passed = true;\r\n\t\t\t}\r\n\t\t\tif ($passed){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t$data[\"Match\"][\"matched_id\"] = $member[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"member_id\"] = $searchee[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"compatibility\"] = $this->getCompatibilityByWeight ($searchee, $member);\r\n\t\t\t\tif ($data[\"Match\"][\"compatibility\"]!=0){\r\n\t\t\t\t\t$matches[] = $this->controller->Match->save_match($data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $matches;\t\r\n\t\t\r\n\t}", "function checkBookingRules_vangen( $memberBookings, $guestBookings, $cancels )\n\t{\n\t\t$bookingSession = getBookingSession( );\n\t\t$user = $bookingSession->getUser( );\n\t\t$userid = $user->getDbColTrim( \"userid\" );\n\n\t\t$bookingErrors = new Booking_message;\n\t\t$bookingErrors->setHtmlPreSuffix( booking_error_html_prefix, booking_error_html_suffix );\n\t\t$member = new Booking_user( );\n\t\t$room1 = new Booking_resource( );\n\t\t$room2 = new Booking_resource( );\n\t\t$ownbookingfound = FALSE;\n\n\t\t# Check for valid membership numbers\n\t\tif ( is_array( $memberBookings ) )\n\t\t{\n\t\t\twhile ( list( $key, $booking ) = each( $memberBookings ) )\n\t\t\t{\n\t\t\t\tif ( !$member->getValidMember( $booking->getDbCol( \"useridbooked\" ) ) )\n\t\t\t\t{\n\t\t\t\t\t$room1->getResource( $booking->getDbCol( \"arrangementid\" ), $booking->getDbCol( \"resourceid\" ) );\n\n\t\t\t\t\t$errormsg = \"Medlemsnummer: \" .$booking->getDbCol( \"useridbooked\" ) .\" på \"\n\t\t\t\t\t.$room1->getDbCol( \"name\" ) .\" plass \"\n\t\t\t\t\t.$memberBookings[ $key ]->getDbCol( \"placenum\" ) .\" er ugyldig.\";\n\t\t\t\t\t$bookingErrors->addMessage( $errormsg );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ownbookingfound = ( $ownbookingfound || ( $userid == $booking->getDbColTrim( \"useridbooked\" ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# If no errors present check for multiple bookings of the same member\n\t\tif ( $bookingErrors->isEmpty( ) )\n\t\t{\n\t\t\tif ( is_array( $memberBookings ) )\n\t\t\t{\n\t\t\t\tfor ( $i = 0; $i < count( $memberBookings ); $i++ )\n\t\t\t\t{\n\t\t\t\t\tfor ( $j = $i+1; $j < count( $memberBookings ); $j++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $memberBookings[ $i ]->getDbCol( \"useridbooked\" ) == $memberBookings[ $j ]->getDbCol( \"useridbooked\" ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$room1->getResource( $memberBookings[ $i ]->getDbCol( \"arrangementid\" ), $memberBookings[ $i ]->getDbCol( \"resourceid\" ) );\n\t\t\t\t\t\t\t$room2->getResource( $memberBookings[ $j ]->getDbCol( \"arrangementid\" ), $memberBookings[ $j ]->getDbCol( \"resourceid\" ) );\n\n\t\t\t\t\t\t\t$errormsg = \"Medlemsnummer: \" .$memberBookings[ $i ]->getDbCol( \"useridbooked\" ) .\" er forsøkt booket flere ganger innenfor perioden. \"\n\t\t\t\t\t\t\t.$room1->getDbColTrim( \"name\" ) .\" plass \" .$memberBookings[ $i ]->getDbCol( \"placenum\" ) .\" og \"\n\t\t\t\t\t\t\t.$room2->getDbColTrim( \"name\" ) .\" plass \" .$memberBookings[ $j ]->getDbCol( \"placenum\" ) .\".\";\n\t\t\t\t\t\t\t$bookingErrors->addMessage( $errormsg );\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\n\n\t\t# Check of guest bookings\n\t\tif ( $bookingErrors->isEmpty( ) && is_array( $guestBookings ) )\n\t\t{\n\t\t\t# Create array with members that are not bound by the guest booking rules\n\t\t\teval( \"\\$noGuestLimitations = array( \" .Booking_noGuestLimitations .\" );\" );\n\n\t\t\t# Check if guest booking limitations should apply\n\t\t\tif ( !array_key_exists( $userid, $noGuestLimitations ) )\n\t\t\t{\n\t\t\t\t# Check for guest bookings without own booking\n\t\t\t\tif ( !$ownbookingfound )\n\t\t\t\t{\n\t\t\t\t\t$errormsg = \"Du kan ikke booke gjester (booking hvor medlemsnummer ikke er registrert) uten å bo på Vangen selv i samme periode.\";\n\t\t\t\t\t$bookingErrors->addMessage( $errormsg );\n\t\t\t\t}\n\n\t\t\t\t# Check for too many guest bookings\n\t\t\t\tif ( $bookingErrors->isEmpty( ) && ( count( $guestBookings ) > Vangen_max_guest_bookings ) )\n\t\t\t\t{\n\t\t\t\t\t$errormsg = \" Du har booket for mange gjester (booking hvor medlemsnummer ikke er registrert). Maks antall gjester er \" .Vangen_max_guest_bookings .\".\";\n\t\t\t\t\t# $errormsg .= \"<br>\\n\" . count( $memberBookings ) .\"-\" .count( $guestBookings ) .\"-\" .count( $cancels );\n\t\t\t\t\t$bookingErrors->addMessage( $errormsg );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\treturn( $bookingErrors );\n\t}", "public function getSponsorContract(Sponsor $sponsor, Team $team, $start, $end, $status = -1, $year) {\r\n\t\t$contract = NULL;\r\n\t\t$tmpEnd = 0;\r\n\t\t// $sponsor;\r\n\t\t// echo $year;\r\n\t\t$sponsorContracts = $this->getSponsorContracts($sponsor, $team, $start, $end, $status, $year);\r\n\r\n\t\t/* search for the most recent contract */\t\r\n\t\tforeach($sponsorContracts as $sponsorContract) {\r\n\t\t\t/* check weather this contract is the latest */\r\n\t\t\tif($sponsorContract->getEnd() > $tmpEnd) {\r\n\t\t\t\t$contract = $sponsorContract;\r\n\t\t\t\t/* set new reference end date */\r\n\t\t\t\t$tmpEnd = $sponsorContract->getEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t/* return sponsor contract */\r\n\t\treturn $contract;\r\n\t}", "public function remove_competitor($memberid){\n $sql = \"DELETE FROM tournamentCompetitors WHERE tournamentID=$this->id AND competitorID=$memberid\";\n $result = self::$database->query($sql);\n }", "public function findmembers($searchTerm, $campus)\n {\n // Search the members and display output\n $sql = \"SELECT * FROM churchmembers WHERE \n (\";\n \n $splitSearch = split(' ',trim($searchTerm));\n if(count($splitSearch) > 1){\n $sql .=\"firstname LIKE '%\".$splitSearch[0].\"%'\";\n \n if(count($splitSearch) > 2){ \n $sql .= \"AND middlename LIKE '%\".$splitSearch[1].\"%'\n AND surname LIKE '%\".$splitSearch[2].\"%')\";\n $searchcriteria = \"<p>Discovered a first name , middle name and surname possibility - searching specifically</p>\";\n }\n else{\n $sql .= \" AND surname LIKE '%\".$splitSearch[1].\"%')\";\n $searchcriteria = \"<p>Discovered a first name and surname possibility - searching specifically</p>\";\n }\n \n }\n else{\n $sql .=\"\n firstname LIKE '%$searchTerm%'\n OR\n middlename LIKE '%$searchTerm%'\n OR \n surname LIKE '%$searchTerm%'\n OR \n address1 LIKE '%$searchTerm%'\n OR \n address2 LIKE '%$searchTerm%'\n OR \n address4 LIKE '%$searchTerm%'\n OR\n postcode LIKE '%$searchTerm%'\n OR\n homephone LIKE '%$searchTerm%'\n OR \n mobilephone LIKE '%$searchTerm%'\n OR\n email LIKE '%$searchTerm%'\n OR \n medicalInfo LIKE '%$searchTerm%'\n OR\n memberStatus LIKE '%$searchTerm%'\n OR \n workphonenumber LIKE '%$searchTerm%'\n OR \n workemail LIKE '%$searchTerm%'\n OR\n occupation LIKE '%$searchTerm%'\n OR\n employer LIKE '%$searchTerm%'\n )\";\n $searchcriteria = \"<p>Searching broad-term on members area</p>\";\n }\n \n \n if($campus !=''){\n $sql .= \" AND campusid='\".db::escapechars($campus).\"'\";\n }\n $sql .= \"\n ORDER BY surname ASC, firstname ASC\n \";\n \n // Output the table\n $numentities = 0;\n $numentities = db::getnumrows($sql);\n print \"<p>\" . $numentities . \" discovered in members.</p>\";\n if($numentities > 0)\n {\n print \"<h2>Member Results</h2>\";\n print $searchcriteria;\n print \"<p><table class=\\\"searchtable\\\">\";\n print \"<tr><th>Surname</th><th>Firstname</th><th>Address 1</th><th>Postcode</th><th>Action</th></tr>\";\n $data = db::returnallrows($sql);\n foreach($data as $result)\n {\n // Display the member information\n print \"<tr>\";\n print \"<td>\" . $result['surname'] . \"</td>\";\n print \"<td>\" . $result['firstname'] . \"</td>\";\n print \"<td>\" . $result['address1'] . \"</td>\";\n print \"<td>\" . $result['postcode'] . \"</td>\";\n print \"<td><a href=\\\"index.php?mid=225&m=\" . $result['memberID'] . \"\\\">View</a></td>\";\n print \"</tr>\";\n }\n print \"</table>\";\n print \"</p>\";\n }\n \n \n \n return true;\n }", "function sort_crew($a, $b) {\n\t\tif($a->rank->level < $b->rank->level) {\n\t\t\treturn 1;\n\t\t}elseif($a->rank->level > $b->rank->level) {\n\t\t\treturn -1;\n\t\t}else{\n\t\t\treturn strcmp($a->lname,$b->lname);\n\t\t}\n\t}", "public function isSponsorOf() {\n\n\t\t$email = $this->customer()->first()->email;\n\n\t\t$box_question = BoxQuestion::where('slug', '=', 'sponsor')->first();\n\n\t\tif ($box_question === NULL)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn UserAnswer::where('box_question_id', '=', $box_question->id)->where('slug', '=', Str::slug($email))->count();\n\n\t}", "public function getSponsorContracts(Sponsor $sponsor = NULL, Team $team = NULL, $start = 0, $end = PHP_INT_MAX, $status = -1, $year) {\r\n\t\t$contracts = array();\r\n\r\n\t\t/* connect to mysql database */\r\n\t\t$this->connect();\r\n\t\t\r\n\t\t/* query mysql database to get all sponsor contracts with give start and end date */\r\n\t\t$contractCriteria = array();\r\n\t\t\r\n\t\tif(isset($sponsor)) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"sponsor_id\", 'func'=>\"=\", 'value'=>$sponsor->getId());\r\n\t\t}\r\n\t\tif(isset($team)) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"team_id\", 'func'=>\"=\", 'value'=>$team->getId());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//$contractCriteria[] = array('name'=>\"end\", 'func'=>\">=\", 'value'=>$start);\r\n\t\t//$contractCriteria[] = array('name'=>\"start\", 'func'=>\"<=\", 'value'=>$end);\r\n\r\n\t\t$contractCriteria[] = array('name'=>\"year\", 'func'=>\"=\", 'value'=>$year);\r\n\r\n\r\n\t\t/* only return contracts with particular status (optional) */\r\n\t\tif($status > -1) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"status\", 'func'=>\"=\", 'value'=>$status);\r\n\t\t}\r\n\r\n\t\t// print_r($contractCriteria);\r\n\t\t$result = $this->select($this->prefix.SPONSORING_TABLE, NULL, $contractCriteria, \"karma DESC\");\r\n\t\t// print_r($result);\r\n\t\tif($result != NULL) {\r\n\r\n\t\t\t/* receive data of sponsor contracts from result */\r\n\t\t\tforeach($result as $line) {\r\n\t\t\t\t$contract = new SponsorContract();\r\n\t\t\t\t$contract->setId($line['id']);\r\n\t\t\t\t$contract->setSponsor($this->getSponsor($line['sponsor_id']));\r\n\t\t\t\t$contract->setTeam($this->getTeam($line['team_id']));\r\n\t\t\t\t$contract->setStart($line['start']);\r\n\t\t\t\t$contract->setEnd($line['end']);\r\n\t\t\t\t$contract->setBaseAmount($line['base']);\r\n\t\t\t\t$contract->setPerPoint($line['per_point']);\r\n\t\t\t\t$contract->setExtraRank1($line['extra_rank1']);\r\n\t\t\t\t$contract->setExtraRank2($line['extra_rank2']);\r\n\t\t\t\t$contract->setExtraRank3($line['extra_rank3']);\r\n\t\t\t\t$contract->setExtraAudience($line['extra_audience']);\r\n\t\t\t\t$contract->setExtraChampionship($line['extra_championship']);\r\n\t\t\t\t$contract->setExtraTop5($line['extra_top5']);\r\n\t\t\t\t$contract->setKarma($line['karma']);\r\n\t\t\t\t$contract->setStatus($line['status']);\r\n\t\r\n\t\t\t\t/* add contract to contracts list */\r\n\t\t\t\t$contracts[] = $contract;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* disconnect from mysql database */\r\n\t\t$this->disconnect();\r\n\r\n\t\t/* return list of sponsor contracts */\r\n\t\treturn $contracts;\r\n\t}", "public function hasSponsor()\n {\n return $this->Sponsor !== null;\n }", "public function notify_members() {\n $from = array($this->site->user->email, $this->site->user->name());\n $subject = Kohana::lang('finance_reminder.charge.subject');\n if ($this->site->collections_enabled()) {\n $message = Kohana::lang('finance_reminder.charge.message_finances');\n }\n else {\n $message = Kohana::lang('finance_reminder.charge.message_basic');\n }\n\n foreach ($this->finance_charge_members as $member) {\n if ( ! $member->paid) {\n $replacements = array(\n '!name' => $member->user->name(),\n '!due_date' => date::display($member->due, 'M d, Y', FALSE),\n '!due_amount' => money::display($member->balance()),\n '!charge_title' => $member->title,\n '!pay_link' => url::base(),\n );\n $email = array(\n 'subject' => strtr($subject, $replacements),\n 'message' => strtr($message, $replacements),\n );\n email::announcement($member->user->email, $from, 'finance_charge_reminder', $email, $email['subject']);\n }\n }\n return TRUE;\n }", "function suchPerson($muster) {\n //$pre = ($_SESSION[\"preon\"])?\"%\":\"\"; //wiederspricht sich mit der Zeile danach\n $pre = isset($muster[\"pre\"])?$_SESSION[\"pre\"]:\"\";\n $fuzzy=$muster[\"fuzzy\"];\n $andor = $muster[\"andor\"];\n $rechte=berechtigung(\"cp_\");\n\n $joinCustomer = \" left join customer K on C.cp_cv_id=K.id\";\n $joinVendor = \" left join vendor V on C.cp_cv_id=V.id\";\n if ($muster[\"cp_name\"]==\"~\") {\n $where=\"and upper(cp_name) ~ '^\\[^A-Z\\].*$'\";\n } else {\n $dbf = array(\"cp_name\", \"cp_givenname\", \"cp_gender\", \"cp_title\" ,\n \"cp_street\", \"cp_zipcode\", \"cp_city\", \"cp_country\", \"country\",\n \"cp_phone1\", \"cp_fax\", \"cp_homepage\", \"cp_email\",\n \"cp_notes\", \"cp_stichwort1\",\"cp_birthday\", \"cp_beziehung\",\n \"cp_abteilung\", \"cp_position\", \"cp_cv_id\", \"cp_owener\");\n $keys=array_keys($muster);\n $anzahl=count($keys);\n $where=\"\";\n if ( isset( $muster[\"customer_name\"] ) ) {\n $whereCustomer = \"K.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n $whereVendor = \"V.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n } else {\n $whereCustomer = '1=1';\n $whereVendor = '1=1';\n }\n\n $daten=false;\n $tbl0=false;\n\n $where = array();\n for ($i=0; $i<$anzahl; $i++) {\n if (in_array($keys[$i],$dbf) && $muster[$keys[$i]]) {\n $suchwort=trim($muster[$keys[$i]]);\n $suchwort=strtr($suchwort,\"*?\",\"%_\");\n if ($keys[$i]==\"cp_birthday\") {$d=explode(\"\\.\",$suchwort); $suchwort=$d[2].\"-\".$d[1].\"-\".$d[0]; };\n if ($keys[$i]==\"cp_phone1\") {\n //Telefonnummer in beliebigen Telefonfeld suchen.\n $tmp =\"(cp_phone1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_phone2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_satphone like '\".$pre.$suchwort.\"$fuzzy')\";\n $where[] = $tmp;\n } else {\n $where[].=$keys[$i].\" ilike '\".$pre.$suchwort.\"$fuzzy'\";\n }\n }\n }\n $where = implode (\" $andor \",$where);\n $x=0;\n }\n $felderContact=\"C.cp_id, C.cp_cv_id, C.cp_title, C.cp_name, C.cp_givenname, C.cp_fax, C.cp_email, C.cp_gender as cp_gender\";\n $felderContcatOrCustomerVendor=\"COALESCE (C.cp_country, country) as cp_country,COALESCE (C.cp_zipcode, zipcode) as cp_zipcode,\n COALESCE (C.cp_city, city) as cp_city, COALESCE (C.cp_street, street) as cp_street,\n COALESCE (NULLIF (C.cp_phone1, ''), NULLIF (C.cp_mobile1, ''), phone) as cp_phone1\";\n\n\n $rs0=array(); //leere arrays initialisieren, damit es keinen fehler bei der funktion array_merge gibt\n if ($muster[\"customer\"]){ //auf checkbox customer mit Titel Kunden prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, K.name as name, K.language_id as language_id,\n 'C' as tbl from contacts C$joinCustomer where C.cp_cv_id=K.id and ($whereCustomer $andor $where) and $rechte order by cp_name\";\n $rs0=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs0) $rs0=array();\n }\n $rs1=array(); //s.o.\n if ($muster[\"vendor\"]){ //auf checkbox vendor mit Titel Lieferant prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, V.name as name, V.language_id as language_id, 'V' as tbl\n from contacts C$joinVendor where C.cp_cv_id=V.id and ($whereVendor $andor $where) and $rechte order by cp_name\";\n $rs1=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs1) $rs1=array();\n }\n $rs2=array(); //s.o.\n if ( isset( $muster[\"deleted\"] ) ) { //auf checkbox deleted mit Titel \"gelöschte Ansprechpartner (Kunden und Lieferanten)\" prüfen\n // es gibt nicht nur gelöschte Personen, sonder auch Personen ohne Zuordnung zu Firmen, z.B. private Adressen\n $sql0=\"select $felderContact, C.cp_country, C.cp_zipcode, C.cp_city, C.cp_street, C.cp_phone1,\n '' as name,'P' as tbl from contacts C where $rechte and (\".$where.\") and C.cp_cv_id is null order by cp_name\";\n $rs2=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs2) $rs2=array();\n }\n return array_merge($rs0,$rs1,$rs2); //alle ergebnisse zusammenziehen und zurückgeben\n}", "public function getAllMemberCards()\n {\n \n $query = \"SELECT MID, LoyaltyCardNumber FROM transactionsummary ORDER BY LoyaltyCardNumber ASC\";\n \n return parent::RunQuery($query);\n }", "function getChamberSpecificDetail($memberID, $dataID, $column, $table) {\r\n $queryString = \"SELECT $table.answer FROM $table JOIN BUSINESS ON $table.BUSINESSID=BUSINESS.businessID JOIN USER ON USER.businessID=BUSINESS.businessID WHERE USER.UserID='$memberID' AND $table.DataID=$dataID\";\r\n $sql = $this->db->prepare($queryString);\r\n if ($sql->execute()) {\r\n return $sql->fetch();\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "public function remove_sponsor_of_ambassador($id){\n if(Auth::user()->hasRole('sponsor')){\n $user = User::find($id);\n if($user){\n if(Auth::user()->ambassadors->count() && Auth::user()->ambassadors->where('ambassador_user_id',$user->id)->count()){\n $sponsor_ambassador = SponsorAmbassador::updateOrCreate([\n 'sponsor_user_id' => Auth::id(),'ambassador_user_id'=> $user->id,\n ], [\n 'status' => 0,\n ]);\n\n if($sponsor_ambassador->sponsor_user && $sponsor_ambassador->sponsor_user->email && $sponsor_ambassador->ambassador_user && $sponsor_ambassador->ambassador_user->email){\n $become_ambassador_status = 'deactivate';\n $sponsor_user_name = ($sponsor_ambassador->sponsor_user && $sponsor_ambassador->sponsor_user->first_name ? $sponsor_ambassador->sponsor_user->first_name : \"\").' '.($sponsor_ambassador->sponsor_user && $sponsor_ambassador->sponsor_user->last_name ? $sponsor_ambassador->sponsor_user->last_name : \"\");\n $ambassador_user_name = ($sponsor_ambassador->ambassador_user && $sponsor_ambassador->ambassador_user->first_name ? $sponsor_ambassador->ambassador_user->first_name : \"\").' '.($sponsor_ambassador->ambassador_user && $sponsor_ambassador->ambassador_user->last_name ? $sponsor_ambassador->ambassador_user->last_name : \"\");\n\n //Send email to sponsor\n $sponsor_email = $sponsor_ambassador->sponsor_user->email;\n Mail::send('mail.ambassador-sponsorship',compact('become_ambassador_status','sponsor_user_name','ambassador_user_name'), function ($message) use ($sponsor_email, $ambassador_user_name) {\n $message->to($sponsor_email)->subject('Sponsor er fjernet for '.$ambassador_user_name);\n $message->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'));\n });\n\n //Send email to ambassador\n $ambassador_email = $sponsor_ambassador->ambassador_user->email;\n Mail::send('mail.ambassador-sponsorship',compact('become_ambassador_status','sponsor_user_name','ambassador_user_name'), function ($message) use ($ambassador_email, $ambassador_user_name) {\n $message->to($ambassador_email)->subject('Sponsor er fjernet for '.$ambassador_user_name);\n $message->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'));\n });\n\n //Send email to all admin user\n $admin_users = (new User())->admin_users();\n if($admin_users->count()) {\n foreach ($admin_users as $admin_user) {\n $admin_email = $admin_user->email;\n Mail::send('mail.ambassador-sponsorship',compact('become_ambassador_status','sponsor_user_name','ambassador_user_name'), function ($message) use ($admin_email, $ambassador_user_name) {\n $message->to($admin_email)->subject('Sponsor er fjernet for '.$ambassador_user_name);\n $message->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'));\n });\n }\n }\n }\n\n\n flash(__('flash-messages.Successfully! You have been remove sponsorship of this ambassador.'))->success();\n return redirect(localized_route('our-ambassadors'));\n\n }else{\n flash(__('flash-messages.Your are not sponsor of this ambassador.'))->error();\n return redirect(localized_route('our-ambassadors'));\n }\n }else{\n abort(404);\n }\n\n }else{\n flash(__('flash-messages.Your are not authorized to become sponsor.'))->error();\n return redirect(localized_route('our-ambassadors'));\n }\n }", "public function queryEligibleCreditsToMatch(PaymentTransaction $invoice);", "function get_Child_Chambers($chamber){\r\n $sql = $this->db->prepare(\"SELECT chamberID from CHAMBER where parent_id=:myChamber;\");\r\n\r\n $result = $sql->execute(array(\r\n \"myChamber\" => $chamber\r\n ));\r\n\r\n if ($result){\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "public function check_online_members(){\n \t$this->load->model(\"portalmodel\");\n \t\n \t$project_id = $this->input->post('project_id');\n \t\n \t$final_names = \"\";\n \t\n \t// get list of current online members\n \t$tmp_online_member_ids = $this->portalmodel->list_select1(\"onlinemembers\");\n \t$online_member_ids = array();\n \tforeach ($tmp_online_member_ids as $eachid){\n \t\t$online_member_ids[]=$eachid->user_id;\n \t}\n \t\n \t$associated_members_ids = $this->portalmodel->list_select(\"project\",\"id\",$project_id);\n \t$tmp_members_ids = implode(\",\", array($associated_members_ids[0]['accountmanager'],$associated_members_ids[0]['projectmanager'],$associated_members_ids[0]['developer']));\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$tmp_members_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$final_names = implode(\", \", $associated_member_names);\n \t\n \t// now get the customer member list\n \t$already_member_ids = $this->portalmodel->list_select(\"chat_project_members\",\"fk_project_id\",$project_id);\n \t$arr_already_member_ids = array();\n \tforeach ($already_member_ids as $eachrecord){\n \t\t$arr_already_member_ids[]=$eachrecord['fk_user_id'];\n \t}\n \t$arr_already_member_ids[]=1001; // here we are adding 1001 for the admin, because he doesn't need to be selected\n \t$in_already_member_ids = implode(\",\", $arr_already_member_ids);\n \t\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$in_already_member_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$associated_member_names = implode(\", \", $associated_member_names);\n \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_member_names:$associated_member_names;\n \t\n \t// online customers\n \t$associated_customer_id = $this->portalmodel->select_name('project', 'customerid', \"id='\".$project_id.\"'\");\n \tif(!empty($associated_customer_id)){\n \t\t$associated_customer_name = $this->portalmodel->select_name('customer', 'companyname', \"customerid='\".$associated_customer_id.\"'\");\n \t\t\n \t\t// also get list of onlinecustomers to highlight\n\t \t$tmp_online_user_ids = $this->portalmodel->list_select1(\"onlinecustomers\");\n\t \t$online_customer_ids = array();\n\t \tforeach ($tmp_online_user_ids as $eachid){\n\t \t\t$online_customer_ids[]=$eachid->customer_id;\n\t \t}\n\t \t\n\t \tif (in_array($associated_customer_id, $online_customer_ids)){\n\t \t\t$associated_customer_name = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$associated_customer_name;\n\t \t}\n\t \t\n\t \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_customer_name:$associated_customer_name;\n \t}\n \t\n \t// online customer users\n \t$tmp_online_customer_user_ids = $this->portalmodel->list_select1(\"online_customer_users\");\n \t$online_customer_user_ids = array();\n \tforeach ($tmp_online_customer_user_ids as $eachid){\n \t\t$online_customer_user_ids[]=$eachid->customer_user_id;\n \t}\n \t\n \t$associated_users = $this->portalmodel->select_where('', '', 'customer_user_project_chat', \"FIND_IN_SET( $project_id, project_ids )\");\n \t$arr_associated_users = array();\n \tforeach ($associated_users as $each_associated_user){\n \t\tif(in_array($each_associated_user->id, $online_customer_user_ids)){\n \t\t\t$arr_associated_users[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$each_associated_user->first_name;\n \t\t}else{\n \t\t\t$arr_associated_users[] = $each_associated_user->first_name;\n \t\t}\n \t}\n \t\n \t$associated_member_names = implode(\",\", $arr_associated_users);\n \t\n \t$final_names = (!empty($final_names))?$final_names.\", \".$associated_member_names:$associated_member_names;\n \t\n \techo $final_names;\n }", "function request_banking(){\n $AffGroups = array(AffiliateUser);\n //$StoreGroups = array(AffiliateStoreUser);\n $OtherGroups = array(Developer2User,Developer1User,Partner2User, Partner1User, CoreMemberUser, CoreAdminUser);\n $this->requestBanking(MinAmountAff, $AffGroups);\n //$this->requestBanking(MinAmountStore, $StoreGroups);\n $this->requestBanking(MinAmountOther, $OtherGroups);\n echo \"Complete!\";\n exit();\n }", "public static function juniorCandidate()\n {\n echo json_encode(\\Models\\Member::juniorCandidate( ));\n //echo json_encode( $members );\n //var_dump($idJunior);\n }", "public function cmsCambiasponsorCICB(Request $request){\n $sap_code = $request->sap_code;\n $sponsor = $request->sponsor;\n\n $update = User::Where('sap_code', '=', $sap_code)\n ->update(['sap_code_sponsor' => \"$sponsor\" ]);\n\n $update = contracts::Where('code', '=', $sap_code)\n ->update(['sponsor' => \"$sponsor\" ]);\n \n $update = control_ci::Where('codigo', '=', $sap_code)\n ->update(['codigop' => \"$sponsor\" ]);\n\n return 'change';\n }", "function mate($mommy, $daddy) {\r\n\t$arr = range(1,CITY_COUNT);\r\n\t$baby = array();\r\n\tfor($i = 1; $i<=CITY_COUNT-1;$i++){\r\n\tarray_push($baby,1);\r\n\tarray_push($baby,\"-\");\r\n\t}\r\n\tarray_pop($baby);\r\n\r\n\tforeach($arr as $v)\r\n\t{\t\r\n\t\twhile(in_array($v,$baby)){\r\n\t\t$baby = array();\r\n\t\tfor($i = 0; $i < CITY_COUNT; $i++)\r\n\t\t{\r\n\t\t\t$chosen = mt_rand(0,1);\r\n\t\t\t$mom = explode(\"-\",$mommy);\r\n\t\t\t$dad = explode(\"-\",$daddy);\r\n\t\t\tif($chosen) {\r\n\t\t\t\tarray_push($baby,$mom[0]);\r\n\t\t\t\tarray_push($baby,\"-\");\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tarray_push($baby,$dad[0]);\r\n\t\t\t\tarray_push($baby,\"-\");\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t}\r\n\tarray_pop($baby);\r\n\tforeach($baby as $v)\r\n\t{\r\n\t\t$baby1.=$v;\r\n\t}\r\n\treturn $baby1;\r\n}", "function check_vendor_mambership(){\n $vendors = $this->db->get('vendor')->result_array();\n foreach ($vendors as $row) {\n if($row['membership'] !== '0'){\n if($row['member_expire_timestamp'] < time()){\n $data['membership'] = '0';\n $this->db->where('vendor_id', $row['vendor_id']);\n $this->db->update('vendor', $data);\n $this->set_product_publishability($row['vendor_id']);\n $this->email_model->membership_upgrade_email($row['vendor_id']);\n }\n }\n }\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "public function test_get_sbps_recheck_carrier_credit_limit($carriers, $codes, $from, $to, $negative, $trails)\n {\n /** @var \\CI_DB_result $query */\n if (false !== $trails)\n {\n $sql = sprintf(<<<EOF\n JOIN (\n SELECT order_detail_id\n FROM settlement_sbps_detail_log_purchase\n WHERE `disable` = %2\\$d AND `status` %1\\$s\n ) settlement_sbps_detail_log_purchase ON order_detail.id = settlement_sbps_detail_log_purchase.order_detail_id\nEOF\n , $this->transformInEqual($trails)\n , self::STATUS_ENABLE);\n }\n\n $sql = sprintf(<<<EOF\nSELECT order_detail.id\nFROM order_detail JOIN\n contract_order ON contract_order.id = order_detail.contract_order_id JOIN\n contract ON contract.id = contract_order.contract_id %7\\$s\nWHERE contract.`disable` = %3\\$d AND\n contract_order.`disable` = %3\\$d AND\n order_detail.`disable` = %3\\$d AND\n contract.contract_status_id <> %6\\$d AND\n contract_order.order_type_code %1\\$s AND\n order_detail.settlement_type_id %2\\$s AND\n order_detail.shipping_status_code = %4\\$d AND\n order_detail.authorize_status = %5\\$d\nEOF\n , $this->transformInEqual($codes, $negative)\n , $this->transformInEqual($carriers)\n , self::STATUS_ENABLE\n , fetch_code('shipment_status_waiting')\n , Sbps::AUTHORIZE_STATUS_CHECK_CREDIT_LIMIT_OK\n , $this->getContractStatus()\n , isset($sql) ? $sql : '');\n\n $sql .= $this->transformDate('order_detail.instruction_plan_date', ['from' => $from, 'to' => $to], true);\n $query = $this->CI->db->query($sql);\n $collection = $query->row_array();\n $query->free_result();\n\n /** @var array $actual */\n $query = $this->CI->contract->get_sbps_recheck_carrier_credit_limit($carriers, $codes, $from, $to, $negative, $trails);\n $actual = $query->row_array();\n $query->free_result();\n\n $this->assertInstanceOf('CI_DB_result', $query);\n $this->assertEquals($collection, $actual);\n }", "public function checkCostcenter($costcenter = '', $gmobj = '', $gmsub = '')\n {\n $query = $this->db->query(\"select gmaid from CRPDTA.F0901 WHERE gmmcu = '\" . $costcenter . \"' and gmobj='\" . $gmobj . \"' and gmsub='\" . $gmsub . \"' and gmpec=' '\");\n if ($query->num_rows() > 0){\n return true;\n } else {\n return false;\n }\n }", "function getMemberListAdmin() {\n $sql = \"SELECT d.*\n FROM admin_building a,\n condo_building b,\n member_condo c,\n member d \n WHERE a.admin_id=? AND a.building_id = b.building_id AND b.condo_id= c.condo_id AND c.member_id = d.id AND b.building_id=? ORDER BY d.id ASC\";\n \n return getAll($sql, [getLogin()['uid'], getLogin()['bid']]);\n}", "function cs_is_member($users_id)\r\n{\r\n\tsettype($users_id, 'integer');\r\n\t\r\n\tif ($users_id <= 0)\r\n\t\treturn false;\r\n\t\r\n\t$where = 'm.users_id = '.$users_id.' AND us.users_delete = 0 AND us.users_active = 1 AND sq.clans_id = 1';\r\n\t$count = cs_sql_count(__FILE__, 'members m LEFT JOIN {pre}_users us ON m.users_id = us.users_id LEFT JOIN {pre}_squads sq ON m.squads_id = sq.squads_id', $where);\r\n\t\r\n\tif ($count > 0)\r\n\t\treturn true;\r\n\t\r\n\treturn false;\r\n}", "function updateSponsor($aff_id)\n\t\t{\t\n\t\t\t/*\n\t\t\t\techo \"<pre>\";\n\t\t\t\tprint_r($this->Sponsor);\n\t\t\t\tdie();\n\t\t\t*/\t\n\t\t\t\n\t\t\t$query = \" update tbl_sponsors set`sponsor_name`= '\".$this->Sponsor->sponsor_name.\"',\n\t\t\t`sponsor_description` = '\".$this->Sponsor->sponsor_description.\"',\n\t\t\t`sponsor_url` = '\".$this->Sponsor->sponsor_url.\"' \t\t\t\t\t \n \t\t\t where `affiliate_id` = \".$aff_id.\" and id = \".$this->Sponsor->id;\n\t\t\t\t\t \t\n\t\t\t\t\t \n\t\t\t$response = $this->Execute($query);\n\t\t\treturn $response;\n\t\t}", "public function get_competitors(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT competitorID FROM tournamentCompetitors WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "function bill_pay_from_card() {\n\t\t$coupon_id = $_REQUEST['coupon_id'];\n\t\t$coupon_amount = $_REQUEST['coupon_amount'];\n\t\t$recharge_user_id = $_REQUEST['recharge_user_id'];\n\t\t$wt_category = $_REQUEST['wt_category'];\n\t\t// wt_category = 11 pay bill\n\t\t$bill_category_id = $_REQUEST['bill_category_id'];\n\t\t// 1- Water, 2- Movies etc\n\t\t$biller_id = $_REQUEST['biller_id'];\n\t\t$bill_amount = $_REQUEST['bill_amount'];\n\t\t$bill_consumer_no = $_REQUEST['bill_consumer_no'];\n\t\t$card_no = $_REQUEST['card_number'];\n\t\t$cvv_no = $_REQUEST['cvv_no'];\n\t\t$wallet_type = 2;\n\t\t// 1- Credit, 2-Debit\n\t\t$bill_pay_status = 1;\n\n\t\t$wallet_category = '4';\n\t\t// 4- Cashback\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t$wt_desc = 'PaY Bill';\n\t\tif (!empty($bill_consumer_no) && !empty($biller_id) && !empty($bill_amount) && !empty($recharge_user_id)) {\n\t\t\t$bill_records = $this -> conn -> get_table_field_doubles('biller_user', 'biller_customer_id_no', $bill_consumer_no, 'biller_id', $biller_id);\n\t\t\t//$bill_records = $this -> conn -> get_table_row_byidvalue('biller_user', 'biller_customer_id_no', $bill_consumer_no);\n\t\t\t//print_r($bill_records);\n\t\t\tif (!empty($bill_records)) {\n\t\t\t\t$bill_user_id = $bill_records['0']['biller_user_id'];\n\t\t\t\t$bill_pay_status = $bill_records['0']['bill_pay_status'];\n\t\t\t\tif ($bill_pay_status == '2') {\n\t\t\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $recharge_user_id);\n\t\t\t\t\t$wallet_amount = $records['0']['wallet_amount'];\n\t\t\t\t\t$reffer_status = $records['0']['reffer_amount_status'];\n\t\t\t\t\t$reffer_user_id = $records['0']['reffer_user_id'];\n\t\t\t\t\t$admin = $this -> conn -> get_all_records('admin');\n\t\t\t\t\t$admin_wallet = $admin['0']['admin_wallet'];\n\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t$recharge = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc', '\"' . $recharge_user_id . '\",\"' . $current_date . '\",\"' . $wallet_type . '\",\"' . $bill_amount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\"');\n\n\t\t\t\t\tif ($recharge) {\n\t\t\t\t\t\t$walletrecharge = $this -> conn -> insertnewrecords('bill_recharge', 'bill_user_id,bill_transaction_id,bill_category_id, biller_id,bill_consumer_no,bill_amount,bill_pay_date,bill_pay_status', '\"' . $recharge_user_id . '\",\"' . $transaction_id . '\",\"' . $bill_category_id . '\",\"' . $biller_id . '\",\"' . $bill_consumer_no . '\",\"' . $bill_amount . '\",\"' . $current_date . '\",\"' . $bill_pay_status . '\"');\n\n\t\t\t\t\t\tif (!empty($walletrecharge)) {\n\n\t\t\t\t\t\t\t$data_frnd['bill_paid_date'] = $current_date;\n\t\t\t\t\t\t\t$data_frnd['bill_pay_status'] = 1;\n\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('biller_user', 'biller_user_id', $bill_user_id, $data_frnd);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//reffer amount when user first recharge then beifits add in frnd wallet\n\t\t\t\t\t\tif ($reffer_status == '2') {\n\t\t\t\t\t\t\t$frnd_records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $reffer_user_id);\n\n\t\t\t\t\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t\t\t$user11_id = $frnd_records['0']['user_id'];\n\t\t\t\t\t\t\t$reffer_code_database = $frnd_records['0']['user_refferal_code'];\n\t\t\t\t\t\t\t$wallet = $frnd_records['0']['wallet_amount'];\n\t\t\t\t\t\t\t$frnd_number = $frnd_records['0']['user_contact_no'];\n\t\t\t\t\t\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t$wt_type = 2;\n\t\t\t\t\t\t\t// credit in frnd acconnt\n\t\t\t\t\t\t\t$refferamount = $refferal_amount;\n\t\t\t\t\t\t\t// reffer amount\n\t\t\t\t\t\t\t$wt_category = 9;\n\t\t\t\t\t\t\t// refferal amount recieved in wallet\n\t\t\t\t\t\t\t$wt_desc = \"Refferal amount add in your wallet using by \" .$mobile;\n\n\t\t\t\t\t\t\t$add_reffer_money = $this -> conn -> insertnewrecords('refferal_records', 'refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $recharge_user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\n\t\t\t\t\t\t\t$add_money = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\n\t\t\t\t\t\t\t// modify wallet of frnd using reffer code///\n\t\t\t\t\t\t\t$data_frnd['wallet_amount'] = $wallet + $refferal_amount;\n\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user11_id, $data_frnd);\n\n\t\t\t\t\t\t\t// Cahnge user status when refeer amount add in frnd wallet\n\t\t\t\t\t\t\t$data12['reffer_amount_status'] = 1;\n\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $recharge_user_id, $data12);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cashback_record_id = $recharge_number;\n\t\t\t\t\t\tif (!empty($coupon_id)) {\n\n\t\t\t\t\t\t\t$coupon_apply = $this -> conn -> insertnewrecords('coupon_details', 'coupon_id, user_id,coupon_apply_date', '\"' . $coupon_id . '\",\"' . $recharge_user_id . '\",\"' . $current_date . '\"');\n\t\t\t\t\t\t\tif (!empty($coupon_apply)) {\n\n\t\t\t\t\t\t\t\t$walletrecharge = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id,wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $recharge_user_id . '\",\"' . $current_date . '\",\"' . $wallet_type . '\",\"' . $coupon_amount . '\",\"' . $wallet_category . '\",\"' . $transaction_id . '\",\"' . $w_desc . '\",\"' . $cashback_record_id . '\"');\n\t\t\t\t\t\t\t\t$user_wallet = $wallet_amount + $coupon_amount;\n\t\t\t\t\t\t\t\t$data['wallet_amount'] = $user_wallet;\n\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $recharge_user_id, $data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Admin wallet update\n\t\t\t\t\t\t$admin_update_wallet = $admin_wallet + $recharge_amount;\n\t\t\t\t\t\t$data_admin['admin_wallet'] = $admin_update_wallet;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('admin', 'admin_id', 1, $data_admin);\n\t\t\t\t\t\t$res = file_get_contents(SITE_URL . \"/createpdf/pdf/\" . $bill_consumer_no);\n\t\t\t\t\t\t$post = array(\"status\" => \"true\", 'message' => \"Bill Pay Successfully\", \"bill_recharge_id\" => $recharge, 'consumer_no' => $bill_consumer_no, 'bill_amount' => $bill_amount, 'wallet_amount' => $wallet_amount, 'bill_pay_date' => $current_date, 'transaction_id' => $transaction_id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Pay Bill failed\");\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"These Bill already paid\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'recharge_user_id' => $recharge_user_id, 'bill_category_id' => $bill_category_id, 'biller_id' => $biller_id, 'wt_category' => $wt_category, 'consumer_no' => $bill_consumer_no, 'bill_amount' => $bill_amount);\n\t\t}\n\t\techo $this -> json($post);\n\n\t}", "public function getBorrowings();", "public static function getAgentsSponsored(int $memberId, $zoho): array\n {\n /**\n * Chaging to module Vendors (Agents) for count all of Agents sponsored\n */\n $zoho->setModule('Vendors');\n\n $params = self::PARAMS;\n\n $array = [];\n \n for ($i=1; self::hasMore('Vendors', $params, $memberId, $zoho); $i++) {\n array_push($array, $zoho->searchRecords(\"(Sponsor:{$memberId})\", $params)->getRecords());\n $params['fromIndex'] = 1 + (200 * $i);\n $params['toIndex'] = 200 + (200 * $i);\n }\n \n $agentsSponsored = [];\n \n foreach ($array as $keys) {\n foreach ($keys as $key) {\n $agentsSponsored[] = $key;\n }\n }\n return self::format($agentsSponsored);\n }", "function cns_cache_member_details($members)\n{\n require_code('cns_members');\n\n $member_or_list = '';\n foreach ($members as $member) {\n if ($member_or_list != '') {\n $member_or_list .= ' OR ';\n }\n $member_or_list .= 'm.id=' . strval($member);\n }\n if ($member_or_list != '') {\n global $TABLE_LANG_FIELDS_CACHE;\n $member_rows = $GLOBALS['FORUM_DB']->query('SELECT m.*,f.* FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_members m LEFT JOIN ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_member_custom_fields f ON f.mf_member_id=m.id WHERE ' . $member_or_list, null, null, false, true);\n global $TABLE_LANG_FIELDS_CACHE;\n $member_rows_g = $GLOBALS['FORUM_DB']->query('SELECT gm_group_id,gm_member_id FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_group_members WHERE gm_validated=1 AND (' . str_replace('m.id', 'gm_member_id', $member_or_list) . ')', null, null, false, true);\n global $MEMBER_CACHE_FIELD_MAPPINGS, $SIGNATURES_CACHE;\n $found_groups = array();\n foreach ($member_rows as $row) {\n $GLOBALS['CNS_DRIVER']->MEMBER_ROWS_CACHED[$row['id']] = $row;\n\n if (!cns_is_ldap_member($row['id'])) {\n // Primary\n $pg = $GLOBALS['CNS_DRIVER']->get_member_row_field($row['id'], 'm_primary_group');\n $found_groups[$pg] = true;\n }\n\n // Signature\n if ((get_page_name() != 'search') && (!is_null($row['m_signature'])) && ($row['m_signature'] !== '') && ($row['m_signature'] !== 0)) {\n $just_row = db_map_restrict($row, array('id', 'm_signature'));\n $SIGNATURES_CACHE[$row['id']] = get_translated_tempcode('f_members', $just_row, 'm_signature', $GLOBALS['FORUM_DB']);\n }\n\n $MEMBER_CACHE_FIELD_MAPPINGS[$row['mf_member_id']] = $row;\n }\n foreach ($member_rows_g as $row) {\n if (!cns_is_ldap_member($row['gm_member_id'])) {\n $found_groups[$row['gm_group_id']] = true;\n }\n }\n\n require_code('cns_groups');\n cns_ensure_groups_cached(array_keys($found_groups));\n }\n}", "public static function findAmendmentEntries($rowData)\n {\n\n $totalAmendments = 0;\n \n // mode 1: same gen_vendor_normalized, same reference_number, different contract_value\n $amendmentRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n // Ensure it's not the exact same row:\n ->where('id', '!=', $rowData['id'])\n // Make sure it's not a duplicate entry\n ->where('gen_is_duplicate', '=', 0)\n // Make sure it's not an error row\n ->where('gen_is_error', '=', 0)\n // Make sure it isn't part of a different amendment group (TODO - review this)\n ->whereNull('gen_amendment_group_id')\n ->whereNotNull('source_fiscal')\n // Make sure it's the same vendor:\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n\n // This is a bit of a complicated combination, but the resulting SQL is,\n // and (\"reference_number\" = ? or (\"original_value\" = ? and \"gen_start_year\" = ?))\n // Because of threshold limits (sole source, NAFTA, etc.), we wouldn't want to just match original and contract values without also matching start years (in case completely different contracts have the same values).\n ->where(function ($query) use ($rowData) {\n return $query->where('reference_number', '=', $rowData['reference_number'])\n ->orWhere(function ($query) use ($rowData) {\n return $query->where('original_value', '=', $rowData['contract_value'])\n ->where('gen_start_year', '=', $rowData['gen_start_year']);\n });\n })\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('contract_value', 'asc')\n // ->orderBy('id', 'asc')\n // ->toSql();\n ->pluck('id');\n\n if ($amendmentRows->count() > 0) {\n // Just 1 row is enough (since it'll be different than the original row)\n // Add back in the original ID (sorted by source_fiscal then ID in the earlier query in findAmendments)\n $amendmentRows->prepend($rowData['id']);\n\n $totalAmendments += self::markAmendmentEntries($rowData['owner_acronym'], $amendmentRows, 1);\n }\n\n return $totalAmendments;\n }", "function boucle_EVENEMENTS_dist($id_boucle, &$boucles) {\r\n $boucle = &$boucles[$id_boucle];\r\n $id_table = $boucle->id_table;\r\n\t$mstatut = $id_table.'.statut';\r\n \r\n if (!isset($boucle->modificateur['criteres']['statut'])) {\r\n // On n'est pas en mode pré-visualisation\r\n if (!$GLOBALS['var_preview']) {\r\n // Le critère {tout} est absent de la boucle\r\n if (!isset($boucle->modificateur['tout'])) {\r\n // on rajoute la condition \"statut = publie\"\r\n array_unshift($boucle->where, array(\"'='\", \"'$mstatut'\", \"'\\\\'publie\\\\''\"));\r\n }\r\n } \r\n \r\n // On est en mode pré-visualisation\r\n else {\r\n array_unshift($boucle->where,array(\"'IN'\", \"'$mstatut'\", \"'(\\\\'publie\\\\',\\\\'prop\\\\')'\"));\r\n }\r\n }\r\n return calculer_boucle($id_boucle, $boucles); \r\n}", "public function isMember()\n {\n return $this->affiliation != self::AFFILIATION_OUTCAST;\n }", "private static function showClanInfo(SR_Player $player, SR_Player $target)\n\t{\n// \t\t$bot = Shadowrap::instance($player);\n\t\t\n\t\tif (false === ($clan = SR_Clan::getByPlayer($target)))\n\t\t{\n\t\t\tself::rply($player, '5038', array($target->getName()));\n// \t\t\t$bot->reply(sprintf('Player %s does not belong to a clan yet.', $target->getName()));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn self::rply($player, '5039', array(\n\t\t\t$target->getName(), $clan->getName(),\n\t\t\t$clan->getMembercount(), $clan->getMaxMembercount(),\n\t\t\t$clan->displayNuyen(), $clan->displayMaxNuyen(),\n\t\t\t$clan->displayStorage(), $clan->displayMaxStorage(),\n\t\t\t$clan->getSlogan()\n\t\t));\n\t\t\n// \t\t$message = sprintf(\n// \t\t\t'%s is in the \"%s\" clan with %s/%s members, %s/%s wealth and %s/%s in the bank. Their motto: %s',\n// \t\t\t$target->getName(), $clan->getName(),\n// \t\t\t$clan->getMembercount(), $clan->getMaxMembercount(),\n// \t\t\t$clan->displayNuyen(), $clan->displayMaxNuyen(),\n// \t\t\t$clan->displayStorage(), $clan->displayMaxStorage(),\n// \t\t\t$clan->getSlogan()\n// \t\t);\n// \t\treturn $bot->reply($message);\n\t}", "function checkForDuplicateCongress($footprintData, $connection, $currentCongressID = 0)\n{\n $result = 0;\n $congresses = getAllCongresses($connection);\n foreach ($congresses as $congress)\n {\n if ($congress['name'] == $footprintData['name'] ||\n $congress['shortName'] == $footprintData['shortName'])\n {\n if ($currentCongressID <= 0 || $currentCongressID != $congress['id'])\n {\n if (!$result)\n {\n $result = array();\n $result['errors'] = array();\n }\n if ($congress['name'] == $footprintData['name'])\n {\n $error = array(\n \"code\" => 20,\n \"data\" => $congress['name']\n );\n array_push($result['errors'], $error);\n }\n if ($congress['shortName'] == $footprintData['shortName'])\n {\n $error = array(\n \"code\" => 21,\n \"data\" => $congress['shortName']\n );\n array_push($result['errors'], $error);\n }\n }\n }\n }\n return $result;\n}", "function bill_recharge() {\n\t\t$coupon_id = $_REQUEST['coupon_id'];\n\t\t$coupon_amount = $_REQUEST['coupon_amount'];\n\t\t$recharge_user_id = $_REQUEST['recharge_user_id'];\n\t\t$wt_category = $_REQUEST['wt_category'];\n\t\t// wt_category = 11 pay bill\n\t\t$bill_category_id = $_REQUEST['bill_category_id'];\n\t\t// 1- Water, 2- Movies etc\n\t\t$biller_id = $_REQUEST['biller_id'];\n\t\t$bill_amount = $_REQUEST['bill_amount'];\n\t\t$bill_consumer_no = $_REQUEST['bill_consumer_no'];\n\t\t$wallet_type = 2;\n\t\t// 1- Credit, 2-Debit\n\t\t$bill_pay_status = 1;\n\n\t\t$wallet_category = '4';\n\t\t// 4- Cashback\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\n\t\tif ($wt_category == '11') {\n\t\t\t$wt_desc = 'PaY Bill';\n\t\t}\n\n\t\tif (!empty($bill_consumer_no) && !empty($biller_id) && !empty($bill_amount) && !empty($recharge_user_id)) {\n\t\t\t//$bill_records = $this -> conn -> get_table_row_byidvalue('biller_user', 'biller_customer_id_no',$bill_consumer_no);\n\t\t\t$bill_records = $this -> conn -> get_table_field_doubles('biller_user', 'biller_customer_id_no', $bill_consumer_no, 'biller_id', $biller_id);\n\t\t\tif (!empty($bill_records)) {\n\t\t\t\t$bill_user_id = $bill_records['0']['biller_user_id'];\n\t\t\t\t$bill_pay_status = $bill_records['0']['bill_pay_status'];\n\t\t\t\tif ($bill_pay_status == '2') {\n\n\t\t\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $recharge_user_id);\n\t\t\t\t\t$wallet_amount = $records['0']['wallet_amount'];\n\t\t\t\t\t$admin = $this -> conn -> get_all_records('admin');\n\t\t\t\t\t$admin_wallet = $admin['0']['admin_wallet'];\n\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t$reffer_status = $records['0']['reffer_amount_status'];\n\t\t\t\t\t$reffer_user_id = $records['0']['reffer_user_id'];\n\t\t\t\t\tif ($wallet_amount >= $bill_amount) {\n\t\t\t\t\t\t//$transaction_id='5454';\n\t\t\t\t\t\t$recharge = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc', '\"' . $recharge_user_id . '\",\"' . $current_date . '\",\"' . $wallet_type . '\",\"' . $bill_amount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\"');\n\n\t\t\t\t\t\tif ($recharge) {\n\n\t\t\t\t\t\t\t$walletrecharge = $this -> conn -> insertnewrecords('bill_recharge', 'bill_user_id,bill_transaction_id,bill_category_id, biller_id,bill_consumer_no,bill_amount,bill_pay_date,bill_pay_status', '\"' . $recharge_user_id . '\",\"' . $transaction_id . '\",\"' . $bill_category_id . '\",\"' . $biller_id . '\",\"' . $bill_consumer_no . '\",\"' . $bill_amount . '\",\"' . $current_date . '\",\"' . $bill_pay_status . '\"');\n\n\t\t\t\t\t\t\t// change status of bill///\n\t\t\t\t\t\t\tif (!empty($walletrecharge)) {\n\n\t\t\t\t\t\t\t\t$data_frnd['bill_pay_status'] = 1;\n\t\t\t\t\t\t\t\t$data_frnd['bill_paid_date'] = $current_date;\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('biller_user', 'biller_user_id', $bill_user_id, $data_frnd);\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//reffer amount when user first recharge then beifits add in frnd wallet\n\t\t\t\t\t\t\tif ($reffer_status == '2') {\n\t\t\t\t\t\t\t\t$frnd_records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $reffer_user_id);\n\n\t\t\t\t\t\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t\t\t\t$user11_id = $frnd_records['0']['user_id'];\n\t\t\t\t\t\t\t\t$reffer_code_database = $frnd_records['0']['user_refferal_code'];\n\t\t\t\t\t\t\t\t$wallet = $frnd_records['0']['wallet_amount'];\n\t\t\t\t\t\t\t\t$frnd_number = $frnd_records['0']['user_contact_no'];\n\t\t\t\t\t\t\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t\t$wt_type = 2;\n\t\t\t\t\t\t\t\t// credit in frnd acconnt\n\t\t\t\t\t\t\t\t$refferamount = $refferal_amount;\n\t\t\t\t\t\t\t\t// reffer amount\n\t\t\t\t\t\t\t\t$wt_category = 9;\n\t\t\t\t\t\t\t\t// refferal amount recieved in wallet\n\t\t\t\t\t\t\t\t$wt_desc = \"Refferal amount add in your wallet using by \" . $mobile;\n\n\t\t\t\t\t\t\t\t$add_reffer_money = $this -> conn -> insertnewrecords('refferal_records', 'refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $recharge_user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\n\t\t\t\t\t\t\t\t$add_money = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\n\t\t\t\t\t\t\t\t// modify wallet of frnd using reffer code///\n\t\t\t\t\t\t\t\t$data_frnd['wallet_amount'] = $wallet + $refferal_amount;\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user11_id, $data_frnd);\n\n\t\t\t\t\t\t\t\t// Cahnge user status when refeer amount add in frnd wallet\n\t\t\t\t\t\t\t\t$data12['reffer_amount_status'] = 1;\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $recharge_user_id, $data12);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cashback_record_id = $recharge_number;\n\t\t\t\t\t\t\tif (!empty($coupon_id)) {\n\n\t\t\t\t\t\t\t\t$coupon_apply = $this -> conn -> insertnewrecords('coupon_details', 'coupon_id, user_id,coupon_apply_date', '\"' . $coupon_id . '\",\"' . $recharge_user_id . '\",\"' . $current_date . '\"');\n\t\t\t\t\t\t\t\tif (!empty($coupon_apply)) {\n\t\t\t\t\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\n\t\t\t\t\t\t\t\t\t$walletrecharge = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id,wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $recharge_user_id . '\",\"' . $current_date . '\",\"' . $wallet_type . '\",\"' . $coupon_amount . '\",\"' . $wallet_category . '\",\"' . $transaction_id . '\",\"' . $w_desc . '\",\"' . $cashback_record_id . '\"');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$user_wallet = $wallet_amount - $bill_amount + $coupon_amount;\n\t\t\t\t\t\t\t$data['wallet_amount'] = $user_wallet;\n\n\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $recharge_user_id, $data);\n\t\t\t\t\t\t\t// Admin wallet update\n\t\t\t\t\t\t\t$admin_update_wallet = $admin_wallet + $bill_amount - $coupon_amount;\n\t\t\t\t\t\t\t$data_admin['admin_wallet'] = $admin_update_wallet;\n\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('admin', 'admin_id', 1, $data_admin);\n\n\t\t\t\t\t\t\t$res = file_get_contents(SITE_URL . \"/createpdf/pdf/\" . $bill_consumer_no);\n\t\t\t\t\t\t\t$post = array(\"status\" => \"true\", 'message' => \"Bill Pay Successfully\", \"bill_recharge_id\" => $recharge, 'consumer_no' => $bill_consumer_no, 'bill_amount' => $bill_amount, 'wallet_amount' => $user_wallet, 'bill_pay_date' => $current_date, 'transaction_id' => $transaction_id);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Pay bill failed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$pay_amount = $recharge_amount - $wallet_amount;\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Not sufficent amount in your wallet\", 'wallet_amount' => $wallet_amount, 'bill_amount' => $bill_amount, 'payble_amount' => $pay_amount);\n\t\t\t\t\t\techo $this -> json($post);\n\t\t\t\t\t\texit();\n\t\t\t\t\t\t//$add=$this->add_money_recharge($recharge_user_id,$recharge_amount,$recharge_transaction_id);\n\t\t\t\t\t\t//$this->recharge();\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"These Bill already paid\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'recharge_user_id' => $recharge_user_id, 'bill_category_id' => $bill_category_id, 'biller_id' => $biller_id, 'wt_category' => $wt_category, 'consumer_no' => $bill_consumer_no, 'bill_amount' => $bill_amount);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "public function front_get_recent_deals_of_member($member_id,$num_deals,&$data_arr,&$data_count){\n $db = new db();\n\t\t\n\t\t$q = \"select t.date_of_deal,t.id as deal_id,t.deal_cat_name,t.deal_subcat1_name,t.deal_subcat2_name,t.value_in_billion,pm.designation,firm.name AS firm_name,t.value_range_id,vrm.display_text as fuzzy_value FROM \".TP.\"transaction_partner_members AS pm LEFT JOIN \".TP.\"transaction AS t ON ( pm.transaction_id = t.id ) LEFT JOIN \".TP.\"company AS firm ON ( pm.partner_id = firm.company_id ) LEFT JOIN \".TP.\"transaction_value_range_master as vrm ON (t.value_range_id=vrm.value_range_id) WHERE member_id = '\".$member_id.\"' and t.is_active='y' ORDER BY t.date_of_deal DESC LIMIT 0 , \".$num_deals;\n\t\t$ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$data_count = $db->row_count();\n if(0 == $data_count){\n //no deals done by this member\n return true;\n }\n\t\t$data_arr = $db->get_result_set_as_array();\n\t\t/****************\n\t\tget the participants\n\t\t**************/\n\t\trequire_once(\"classes/class.transaction_company.php\");\n\t\t$g_trans_comp = new transaction_company();\n\t\tfor($k=0;$k<$data_count;$k++){\n\t\t\t$data_arr[$k]['participants'] = NULL;\n\t\t\t$success = $g_trans_comp->get_deal_participants($data_arr[$k]['deal_id'],$data_arr[$k]['participants']);\n\t\t\tif(!$success){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n }", "public function testDestiny2GetClanLeaderboards()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function accessBruyerFromCustomerAction($domaine, $uuid) {\n $customer = $this->getCustomerByDomaine($domaine); \n if (!$customer == null) { \n $buyer = $this->getBuyerByUid($uuid); // get buyer or creat it if no exist\n $buyerCustomer= $this->getBuyerCustomer($customer, $buyer);// get buyerCustomer or creat it if no exist\n $visites = $buyerCustomer->getTotalAccess();\n $tabPromo = $customer->getPromoCodesAsArray();\n if ($customer->isGlobalPromo() && (!$tabPromo === FALSE)) { \n foreach(array_reverse($tabPromo) as $ligneCode) {\n var_dump($ligneCode);\n if ($customer->getPricingType() == 1) {\n if ($ligneCode[0] = $vistit) {\n $codePromo = $ligneCode[1];\n $msg = $ligneCode[2];\n break;\n }\n } else {\n if ($ligneCode[0] <= $vistit) {\n $codePromo = $ligneCode[1];\n $msg = $ligneCode[2];\n break;\n }\n }\n }\n }\n $code = \"\" ;\n $msg = '<resp><visite>'.$visites.'</visite><code>'.$code.'</code></resp>'; \n } else { \n $msg = '<resp>no exist></resp>';\n }\n return new Response($msg,200,array('content-type' => 'text/xml'));\n }", "public function getCreditRequests()\n {\n $search['q'] = request('q');\n\n $partner = auth()->user()->companies->first();\n\n $creditRequests = CreditRequest::search($search['q'])->with('quotation.user','user','credits')->paginate(10);\n\n return $creditRequests;\n /*$creditRequestsPublic = CreditRequest::search($search['q'])->where('public',1)->with('quotation.user','user','shippings')->get()->all();\n \n $creditRequestsPrivate = CreditRequest::search($search['q'])->where('public', 0)->whereHas('suppliers', function($q) use($partner){\n $q->where('shipping_request_supplier.supplier_id', $partner->id);\n })->get()->all();\n\n $creditRequests = array_collapse([$creditRequestsPublic, $creditRequestsPrivate]);\n\n // dd($creditRequests);\n \n \n $paginator = paginate($creditRequests, 10);\n \n return $paginator; */\n \n \n\n \n \n }", "function connectMemberToCommittee($committeeNumber, $post_id) {\n\t\t\n\t\t$client = $this->rotaryAuth->get_soap_client();\n\t\t$token = $this->rotaryAuth->get_soap_token();\n \t\t$header = new SoapHeader('http://xWeb', 'Token', $token, false );\n \t\t$client->__setSoapHeaders(array($header)); \n \t\t$coChairCount = 0;\n \t\t$chairArray = array('CHAIR', 'MEMBERSHIP CHAIR', 'COMMITTEE CHAIR');\n \t\t$cochairArray = array('COCHAIR', 'CO-CHAIR');\n\t\ttry {\t\n\t\t\t$rotaryclubmembers = $client->CommitteeMembersByID(floatval($committeeNumber), 'UserName');\n\t\t\t//print_r($rotaryclubmembers);\n\t\t}\n\t\tcatch (SoapFault $exception) {\n\t\t\techo $exception;\t\n\t\t}\n\t\tif ( is_object($rotaryclubmembers->MEMBERS) && is_array($rotaryclubmembers->MEMBERS->MEMBER )) {\n\t\t\t//loop through all users for a committee and delete them\n\t\t\t\t\t$users = get_users( array(\n\t\t\t\t\t\t'connected_type' => 'committees_to_users',\n\t\t\t\t\t\t'connected_items' => $post_id,\n\t\t\t\t\t\t'connected_direction' => 'from',\n\t\t\t\t\t)); \n\t\t\t\t\tif ( is_array( $users )) {\n\t\t\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t\t\tp2p_type( 'committees_to_users' )->disconnect( $post_id, $user->ID );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\n\t\t\tforeach($rotaryclubmembers->MEMBERS->MEMBER as $member) {\n\t\t\t\t$user_id = email_exists($member->EMAIL);\n\t\t\t\tif ($user_id) {\n\t\t\t\t\t//add chair and co-chairs\n\t\t\t\t\t\n\t\t\t\t\tif (in_array(strtoupper($member->COMMITTEEPOSITION), $chairArray)) {\n\t\t\t\t\t\tupdate_field('field_5356d453d36ac', $member->EMAIL, $post_id);\n\t\t\t\t\t}\n\t\t\t\t\tif (in_array(strtoupper($member->COMMITTEEPOSITION), $cochairArray)) {\n\t\t\t\t\t $coChairCount++;\n\t\t\t\t\t if (1 == $coChairCount) {\n\t\t\t\t\t\t update_field('field_5356d48feb36b', $member->EMAIL, $post_id);\n\t\t\t\t\t }\n\t\t\t\t\t else {\n\t\t\t\t\t\t update_field('field_5356d4dbeecc0', $member->EMAIL, $post_id);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t//from committees to user\n\t\t\t\t\tp2p_type( 'committees_to_users' )->connect( $post_id, $user_id, array('date' => current_time('mysql')\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t} //end foreach\n\t\t}\n\t}", "public function isBillingEqualShipping()\n {\n $user = Shopware()->Modules()->Admin()->sGetUserData();\n\n $billingAddress = $user[\"billingaddress\"][\"street\"].' '.$user[\"billingaddress\"][\"city\"].\n ' '.$user[\"billingaddress\"][\"zipcode\"].' '.$user[\"billingaddress\"][\"countryID\"];\n\n $shippingAddress = $user[\"shippingaddress\"][\"street\"].' '.$user[\"shippingaddress\"][\"city\"].\n ' '.$user[\"shippingaddress\"][\"zipcode\"].' '.$user[\"shippingaddress\"][\"countryID\"];\n\n if ($billingAddress == $shippingAddress) {\n return true;\n }\n return false;\n }", "function hammingDistance($strainReference, $firstStrain, $secondStrain)\n{\n $dist = 0;\n foreach ($strainReference as $key => $value)\n {\n //If we should consider the current marker in the distance calculus\n if(!in_array($value, [\"\", -1]))\n {\n if(array_key_exists($key, $firstStrain) && array_key_exists($key, $secondStrain))\n {\n if ($firstStrain[$key] != $secondStrain[$key])\n {\n $dist += 1;\n }\n }\n }\n }\n return $dist;\n}", "public function blooddonors(){\n $blooddonors_table = TableRegistry::get('Blooddonors');\n $blooddonors = $blooddonors_table->find()->order(['last_donation_timestamp'=>'DESC']);\n $this->set('blooddonors', $blooddonors);\n $this->viewBuilder()->setLayout('backend');\n }", "function checkDirectSponsored($userKey)\n {\n\t\tif(isset($userKey))\n\t\t{\n\t\t\t$totalCriteria = 0;\t\t\t\n\t\t\t$sql = \"SELECT COUNT(user_key) AS total FROM \".WPMLM_TABLE_USER.\" \n\t\t\t\t\tWHERE sponsor_key = '\".$userKey.\"' AND banned='0' AND payment_status IN ('1','2')\";\n\t\t\t\t\t\n\t\t\t$rs = @mysql_query($sql);\n\t\t\tif($rs && @mysql_num_rows($rs)>0) \n\t\t\t{\n\t\t\t\t$row = @mysql_fetch_array($rs);\n\t\t\t\t$total = $row['total'];\n\t\t\t\t$referrerCriteria = get_option( 'wpmlm_eligibility_settings', true );\n\t\t\t\t\n\t\t\t\tif($total >= $referrerCriteria['directreferrer'])\n\t\t\t\t{\n\t\t\t\t\t$totalCriteria = \"TRUE\"; \n\t\t\t\t}else{\n\t\t\t\t\t$totalCriteria = \"FALSE\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $totalCriteria; \t\n }", "public function getSponsorlink() {}", "public function test_admin_member_internship_b()\n {\n $this->request('GET', ['pages/memberdsc', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "public function show_qualified_candidate(){\r\n\t\tif(function_exists('date_default_timezone_set')) {\r\n\t\t\tdate_default_timezone_set(\"Asia/Kolkata\");\r\n\t\t}\r\n\t\t$date = date(\"Y-m-d\");\r\n\t\t$query = $this->conn->query(\"select candidate.cnum, candidate.name, candidate.department, candidate.profile, candidate.register_time from candidate\r\n\t\tinner join interview\r\n\t\ton (candidate.cnum=interview.cnum and interview.recomendation = 'proceed' and candidate.register_date = '$date')\");\r\n\t\t\r\n\t\twhile($row = $query->fetch_array(MYSQLI_ASSOC)){\r\n\t\t\t$this->candidate[] = $row;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $this->candidate;\r\n\t\t\r\n\t}", "public function getBillsWithUserReservation () {\n if (strpos(Route::getFacadeRoot()->current()->uri(), 'admin') !== false) {\n $bills = self::select('*')->orderBy('bill_bill_date', 'DESC')->get();\n } else {\n\n $bills = self::where('bill_user_id', '=', Auth::id())->get();\n }\n $bills->each(function ($b) {\n global $subtotals;\n global $totals;\n $r = new Reservation();\n $b->reservation = $r->where('id', '=', $b->reservation_id)\n ->select('id', 'reservation_started_at', 'reservation_ended_at', 'reservation_nights', 'user_id')\n ->with(array(\n 'guests' => function ($q) {\n $q->select('guests.id', 'reservation_id', 'guest_number', 'guest_night', 'guest_ended_at', 'guest_started_at', 'role_id');\n },\n ))\n ->first();\n $b->user = \\User::find($b->reservation->user_id);\n $b->reservation->guests->each(function ($g) use($b) {\n $g->calcGuestSumTotals();\n $s = new DateTime($g->guest_started_at);\n $g->guest_started_at_show = $s->format('d. m Y');\n $e = new DateTime($g->guest_ended_at);\n $g->guest_ended_at_show = $e->format('d. m Y');\n $b->reservation->reservation_sum += $g->guestSum;\n });\n $bds = new \\DateTime($b->bill_bill_date);\n $s = new DateTime($b->reservation->reservation_started_at);\n $b->reservation->reservation_started_at_show = $s->format('d. m Y');\n $e = new DateTime($b->reservation->reservation_ended_at);\n $b->reservation->reservation_ended_at_show = $e->format('d. m Y');\n $b->bill_bill_date_show = $bds->format(trans('formats.short-date-ts'));\n if (isset($b->bill_paid)) {\n $bds = new \\DateTime($b->bill_paid);\n $b->bill_paid_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n if (isset($b->bill_resent_date)) {\n $bds = new \\DateTime($b->bill_resent_date);\n $b->bill_resent_date_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n $ubc = DB::select(DB::raw('select `country_name_' . trans('formats.langjs') . '` from countries where country_code = ' . $b->user->user_country_code));\n $b->user->country = $ubc[0]->{'country_name_' . trans('formats.langjs')};\n $subtotals += (float)$b->bill_sub_total;\n $totals += (float)$b->bill_total;\n $b->subtotals = $subtotals;\n $b->totals = $totals;\n });\n return $bills;\n }", "public function js_get_challanNo_perBill($dist_cd, $order_no, $sdo_memo, $bill_no )\n {\n\n $sql = $this->db->query(\" SELECT GROUP_CONCAT(DISTINCT b.challan_no) AS challan_no FROM td_dm_delivery a, td_dm_delivery_details b\n WHERE a.trans_id = b.trans_id AND a.del_dt = b.del_dt AND a.bill_no = b.bill_no\n AND a.dist_cd = $dist_cd AND a.order_no = '$order_no'\n AND a.sdo_memo = '$sdo_memo' AND b.bill_no = '$bill_no' \");\n\n return $sql->result();\n\n }", "function abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}", "function check_borrower_status($obj, $borrower){\n\t$result = $obj->db->query($obj->Query_reader->get_query_by_code('check_borrower', array('borrower' => $borrower)));\n\tif($result->num_rows() > 0)\n\t\treturn $result->num_rows();\n\telse\n\t\treturn 0;\n}", "public static function checkSameUsersInAgency($userID , $targetID) {\n\t\t//echo $userID ;\n\t\t//echo '<br />';\n\t\t//echo $targetID;\n\t\t//return;\n $query = \"SELECT * FROM agencies WHERE (user_one_id =$userID OR user_two_id =$userID ) AND ( ( user_one_id = $targetID OR user_two_id = $targetID ) ) AND accepted =1\";\n\t\t\n\t\t$agencySth = ConnectionFactory::SelectAsStatementHandler($query, array($userID , $targetID));\n\t\t\n\t\t//echo \"<pre>\";\n\t\t//var_dump($agencySth);\n\t\t$agencySth->rowCount();\n\t\t\n\t\tif($agencySth->rowCount() < 1)\n\t\t{\n\t\t\t//echo \"i am empty\";\n\t\t\treturn false;\n\t\t} \n\t\telse {\n\t\t\t//echo \"i am not empty\";\n\t\t\treturn true;\n\n\t\t}\n\t\t\n\t\t/*if(count($agencySth) < 1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;*/\n\t}", "function creaChampionnatFantome($id_tournoi, $tab_c, Tournoi $tournoi, Concurrent $concurrent)\n{ \n $manager_concurrent = connect('Concurrent');\n //gestion des fantomes\n if($tournoi->getNbEquipe()!=4 ||\n $tournoi->getNbEquipe()!=6 ||\n $tournoi->getNbEquipe()!=8 ||\n $tournoi->getNbEquipe()!=12 ||\n $tournoi->getNbEquipe()!=16 ||\n $tournoi->getNbEquipe()!=24 ||\n $tournoi->getNbEquipe()!=32)\n {\n if($tournoi->getNbEquipe()<=4){$nb_fantome= 4-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=6){$nb_fantome= 6-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=8){$nb_fantome= 8-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=12){$nb_fantome= 12-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=16){$nb_fantome= 16-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=24){$nb_fantome= 24-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=32){$nb_fantome= 32-$tournoi->getNbEquipe();}\n\n for($i=1; $i<=$nb_fantome; $i++)\n {\n $concurrent->setIdTournoi($id_tournoi);\n $concurrent->setNomConcurrent(\"~~free win~~\");\n $concurrent->setNbConcurrent(1);\n $tab_fantome[] = $concurrent->getNomConcurrent();\n $manager_concurrent->addConcurrent($concurrent); \n }\n \n $nb_equipe_total = $tournoi->getNbEquipe()+$nb_fantome;\n //fusion des 2 tableaux fantome et real concurrent\n $tab_co = array_reverse($tab_c);\n $x=0;\n $espace_fantome=0;\n foreach($tab_co as $value_concurrent)\n {\n \n if($x<$nb_fantome)\n { \n if((($espace_fantome%3)==0) && (($nb_equipe_total==6) || ($nb_equipe_total==12) || ($nb_equipe_total==24)))\n {\n $tab_con[] = $tab_fantome[$x];\n $x++;\n }\n else if((($espace_fantome%3)==0) && (($nb_equipe_total==4) || ($nb_equipe_total==8) || ($nb_equipe_total==16) || ($nb_equipe_total==32)))\n {\n $tab_con[] = $tab_fantome[$x]; \n $x++;\n } \n }\n $tab_con[] = $value_concurrent;\n $espace_fantome++;\n }\n $tab_concurrent = array_reverse($tab_con);\n }\n $tab_fantome_championnat = array('nb_fantome' => $nb_fantome, 'tab_concurrent' => $tab_concurrent);\n \n return $tab_fantome_championnat;\n}", "function bill_transition_placed_soldout($billorid) {\n bill_transition_placed_pending($billorid);\n bill_transition_pending_soldout($billorid);\n}", "public function isSponsor()\n\t{\n\n\t\t$is_sponsor_of = $this->isSponsorOf();\n\n\t\tif ($is_sponsor_of > 0) return TRUE;\n\n\t\treturn FALSE;\n\n\t}", "public function unsetAgentLead()\n {\n $customers = LeadDetails::where('saveType','recipient')->get();\n $cunt = 0;\n $Acunt = 0;\n $Dcunt = 0;\n foreach ($customers as $customer) {\n $id=$customer->_id;\n if(isset($customer->agent))\n {\n LeadDetails::where('_id',new ObjectID($id))->unset('agent');\n $Acunt++;\n }\n if(isset($customer->dispatchDetails))\n {\n LeadDetails::where('_id', new ObjectID($id))->update(array('dispatchDetails.agent' => (string)'NA'));\n $Dcunt++;\n }\n $cunt++;\n \n }\n echo 'count'.$cunt .'Agnt Count'.$Acunt.'In Ag count'.$Dcunt;\n }", "function checkDuplication($oAffiliate)\n\t\t{\n\t\t\t$sSQL_username\t=\t\"select * from tbl_member \n\t\t\twhere user_name='\".$oAffiliate->username.\"'\";\n\t\t\t$rs_username\t=\t$this->Execute($sSQL_username);\n\t\t\tif($rs_username->RecordCount()) {\n\t\t\t\treturn \"username\";\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$sSQL_Email\t=\t\"select * from tbl_member \n\t\t\twhere email='\".$oAffiliate->email.\"' and isActive !='d'\";\n\t\t\t$rs_Email\t=\t$this->Execute($sSQL_Email);\n\t\t\tif($rs_Email->RecordCount()) {\n\t\t\t\treturn \"email\";\n\t\t\t}\n\t\t\t\n\t\t\t$sSQL_Promo\t=\t\"select * from tbl_affiliate aff, tbl_member mem\n\t\t\t\t\t\t\t \twhere aff.affiliate_id = mem.member_id and \n\t\t\t\t\t\t\t\taff.promo_code='\".$oAffiliate->promo_code.\"' \n\t\t\t\t\t\t\t\tand mem.isActive !='d'\";\n\t\t\t\n\t\t\t$rs_Promo\t=\t$this->Execute($sSQL_Promo);\t\t\t\n\t\t\tif($rs_Promo->RecordCount()) {\n\t\t\t\treturn \"promo_code\";\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\treturn \"notfound\";\n\t\t}", "function comparecsn($one, $two)\n{\n $one = preg_replace('/\\s*/m', '', strtolower($one));\n $two = preg_replace('/\\s*/m', '', strtolower($two));\n if ($one == $two) {\n return true;\n } else {\n return false;\n }\n}", "public function seniorContributors()\n {\n $query = \"SELECT identifier FROM \".$this->_name.\" WHERE status='Active' AND profile_type='senior'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n for($i=0; $i<count($result); $i++)\n {\n $result[$i]= $result[$i]['identifier'];\n }\n return $result;\n }\n else\n return \"NO\";\n }", "public function getBillcity()\n {\n return $this->billcity;\n }", "private static function saveClubData($data){\r\n\t\t// TODO: deactivate!!!\r\n\t\t\r\n\t\t$number = $data['club_nr'];\r\n\t\t$mCon = Membership_Controller_SoMember::getInstance();\r\n\t\t$cCon = Addressbook_Controller_Contact::getInstance();\r\n\t\t\r\n\t\t// get club membership by club_nr = member_nr of club\r\n\t\ttry{\r\n\t\t\t$member = $mCon->getSoMemberByMemberNr($number);\r\n\t\t}catch(Exception $e){\r\n\t\t\tTinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . 'TD-Import - Hinweis: Verein nicht gefunden - Neuanlage' . print_r($e->__toString(),true));\r\n\t\t\t$member = null;\r\n\t\t}\r\n\t\t\r\n\t\t$update = true;\r\n\t\t// if exists: modify\r\n\t\tif(!$member){\r\n\t\t\t$update = false;\r\n\t\t\t$member = $mCon->getEmptySoMember();\r\n\t\t\t$contact = new Addressbook_Model_Contact(null,true);\r\n\t\t\t\r\n\t\t\t// set member data\r\n\t\t\r\n\t\t\t$member->__set('begin_datetime', new Zend_Date($data['begin_date']));\r\n\t\t\tif($data['end_date']){\r\n\t\t\t\t$member->__set('termination_datetime', new Zend_Date($data['end_date']));\r\n\t\t\t}\r\n\t\t\t$member->__set('membership_type', 'SOCIETY');\r\n\t\t\t\r\n\t//\t\tif($data['membership_status'] == 0){\r\n\t//\t\t\t$status = 'PASSIVE';\r\n\t//\t\t}else{\r\n\t\t\t\t$status = 'ACTIVE';\r\n\t//\t\t}\r\n\t\t\t\r\n\t\t\t$member->__set('membership_status', $status);\r\n\t\t}else{\r\n\t\t\t$contact = $member->getForeignRecord('contact_id', $cCon);\r\n\t\t}\r\n\t\t$containerId = Tinebase_Core::getPreference('Membership')->getValue(Membership_Preference::ADDRESSBOOK_CLUBS);\r\n\t\t$names = explode(' ',trim($data['contact_name']));\r\n\t\t$nFamily = $nGiven = '';\r\n\t\tif(is_array($names)){\r\n\t\t\tif(array_key_exists('0', $names)){\r\n\t\t\t\t$nGiven = $names[0];\r\n\t\t\t}\r\n\t\t\tif(array_key_exists('1', $names)){\r\n\t\t\t\t$nFamily = $names[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$email2 = $data['email'];\r\n\t\t$email1 = '';\r\n\t\tif(strpos($email2, '/')){\r\n\t\t\tlist($email2, $email1) = explode('/',$email2);\r\n\t\t\t$email1 = trim($email1);\r\n\t\t\t$email2 = trim($email2);\r\n\t\t}\r\n\t\t\r\n\t\t$foundationDate = null;\r\n\t\tif($data['foundation_date']){\r\n\t\t\t$foundationDate = new Zend_Date($data['foundation_date']);\r\n\t\t}\r\n\t\t$contact->setFromArray(\r\n\t\t\tarray(\r\n\t\t\t\t'container_id' => $containerId,\r\n\t\t\t\t'org_name' => $data['org_name'],\r\n\t\t\t\t'company2' => $data['org_name2'],\r\n\t\t\t\t'n_given' => $nGiven,\r\n\t\t\t\t'n_family' => $nFamily,\r\n\t\t\t\t'adr_one_street' => $data['street'],\r\n\t\t\t\t'adr_one_postalcode' => $data['postalcode'],\r\n\t\t\t\t'adr_one_locality' => $data['location'],\r\n\t\t\t\t'email' => $email2,\r\n\t\t\t\t'email_home' => $email1,\r\n\t\t\t\t'url' => $data['www'],\r\n\t\t\t\t'tel_fax' => $data['fax'],\r\n\t\t\t\t'tel_work' => $data['phone1'],\r\n\t\t\t\t'tel_home' => $data['phone2'],\r\n\t\t\t\t//'bday' => $foundationDate,\r\n\t\t\t\t'customfields' => array(\r\n\t\t\t\t\t'vdstSportDiver' => ($data['sportdiver']==1?1:0),\r\n\t\t\t\t\t'vdstAffiliate' => ($data['affiliate']==1?1:0)\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\tif($update){\r\n\t\t\t$cCon->update($contact);\r\n\t\t\t$mCon->update($member);\r\n\t\t}else{\r\n\t\t\t$cCon->create($contact);\r\n\t\t\t$member->__set('member_nr', $number);\r\n\t\t\t$member->__set('contact_id', $contact->getId());\r\n\t\t\t//$assocContact = Brevetation_Controller_Brevetation::getInstance()->getAssociationContactByShortName('VDST');\r\n\t\t\t$assoc = Membership_Controller_Association::getInstance()->getAssociationByShortName('VDST');\r\n\t\t\t\r\n\t\t\t$member->__set('association_id', $assoc->getId());\r\n\t\t\t$member = $mCon->create($member);\r\n\t\t}\r\n\t\t\r\n\t\treturn $member;\r\n\t}", "function wyz_cmp_listings_near_me( $a, $b ) {\n\tif ( $a['distance'] == $b['distance'] ) return 0;\n\treturn $a['distance'] < $b['distance'] ? -1 : 1;\n}", "protected function getContacts($burn_id)\n {\n\n $submitter = fetch_row(\n \"SELECT u.full_name, u.email, u.phone, a.agency\n FROM burns db\n JOIN users u ON(db.submitted_by = u.user_id)\n JOIN agencies a ON(u.agency_id = a.agency_id)\n WHERE db.burn_id = ?\n \"\n , $burn_id);\n\n $contact = fetch_row(\"SELECT manager_name, manager_number FROM burns WHERE burn_id = ?\", $burn_id);\n\n // Start the contact block div.\n $html = \"<div style=\\\"margin: 0px 0px 15px 0px\\\" class=\\\"\\\">\n <h4>Contacts</h4>\n <hr>\";\n\n // Add submitted by.\n $html .= \" <div class=\\\"contact-block\\\">\n <div>\n <p>Submitted by</p>\n <h5>\".$submitter['full_name'].\" <b class=\\\"caret\\\"></b></h5>\n <a href=\\\"mailto:\".$submitter['email'].\"\\\">\".$submitter['email'].\"</a>\n </div>\n <div class=\\\"contact-right\\\">\n <p class=\\\"agency\\\">\".$submitter['agency'].\"</p>\n <a href=\\\"tel:\".$submitter['phone'].\"\\\">\".$submitter['phone'].\"</a>\n </div>\n </div>\";\n\n // Add the burn plan contact.\n $html .= \" <div class=\\\"contact-block\\\">\n <div>\n <p>Burn Manager</p>\n <h5>\".$contact['manager_name'].\"</h5>\n </div>\n <div class=\\\"contact-right\\\">\n <p class=\\\"district\\\">Phone Number</p>\n <a href=\\\"tel:\".$contact['manager_number'].\"\\\">\".$contact['manager_number'].\"</a>\n </div>\n </div>\";\n\n $html .= \"</div>\";\n\n return $html;\n }", "function noMarkVRS($from,$to,$consultant,$client)\n\t\t {\n\t\t $sql = \"SELECT COUNT(DISTINCT cand_id) As cnt FROM pof_candidates JOIN candidates ON pof_candidates.cand_id=candidates.id RIGHT JOIN pof ON pof_candidates.pofid=pof.pof_id LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location JOIN be_users ON pof_candidates.user_id=be_users.id WHERE (pof_candidates.date BETWEEN '\".$from.\"' AND '\".$to.\"') AND be_users.username LIKE '%\".$consultant.\"%' AND pof.client_id LIKE '\".$client.\"%' AND stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' )\t\t AND pof_candidates.shared_on=' '\";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t\t }", "public function testProcessScouting() {\n\n /* reset the expected report time */\n $scouter = Scouter::fromExisting($this->cr,$this->cs);\n $scouter->setReportTime(0);\n \n $dc = new DeadCities($this->tc,$this->cr);\n $this->assertNotNull($dc);\n $_POST[\"p2\"] = '{\"transit\": 0, \"attack\": 15}';\n $ns = $dc->process($this->cs, STATE_DEADCITIES_SCOUTING);\n $this->assertEquals($ns, STATE_DEADCITIES_SCOUTING);\n \n /* Test the scout has arrived with (reportTime = 0) */\n $_POST[\"p2\"] = \"{}\";\n $dbs = DbScout::fromExisting($this->dbc, new DbCity($this->dbc, Defaults::$server, Defaults::$player, $this->tc));\n $scouter->setReportTime(0);\n $this->assertNotNull($dbs);\n $dbs->setScoutTime($this->cr->getCtime());\n $this->cr->setCtime($this->cr->getCtime() + 25000);\n $dbs->setReportTime(0);\n $dc = new DeadCities($this->tc,$this->cr);\n $ns = $dc->process($this->cs, STATE_DEADCITIES_SCOUTING);\n $this->assertEquals($ns, STATE_SUSPEND);\n $this->assertGreaterThan(0, $scouter->getReportTime());\n \n /* Test the report time is now fresh for our expected scout */\n \n // update the client request to indicate 10 seconds later\n $this->cr->setCtime($this->cr->getCtime() + 10000);\n \n // add a report update which will be after expected time.\n $rb = new ReportBuffer($this->dbc,$this->tc,$this->cr);\n $rb->add(Defaults::$reportBufferOneLine);\n \n $dc = new DeadCities($this->tc,$this->cr);\n $ns = $dc->process($this->cs, STATE_DEADCITIES_SCOUTING);\n $this->assertEquals($ns, STATE_DEADCITIES_REPORT);\n \n $rb = new ReportBuffer($this->dbc,$this->tc,$this->cr);\n $this->assertNotNull($rb->getLastReport(810,810));\n \n }", "public static function noteStudent()\n {\n $post = json_decode( file_get_contents(\"php://input\"), true);\n $id = ($post[\"member\"][0]['club_id']);\n\n $noteClub = \\Models\\Club::markClub($id)-> note_club;\n\n //var_dump($noteClub); // 20\n $tempPR = true;\n //var_dump($post[\"member\"]);\n $total_member = 0;\n $count_member = 0;\n $nbValidate = 0;\n $nbNoValidate = 0;\n\n foreach ($post[\"member\"] as $value)\n {\n if( $value['project'] != 'PR+' )\n {\n $total_member += $value['member_mark'];\n $count_member++;\n if ($value[\"project\"] == \"PR\")\n {\n if ($value[\"project_validation\"]) { // Si projet validé\n //var_dump($value);\n $nbValidate++;\n if ($value[\"member_mark\"] < 10) {\n $tempPR = false;\n }\n }\n else {\n $nbNoValidate++;\n if ($value[\"member_mark\"] >= 10) $tempPR = false;\n }\n }\n }\n }\n $total = $noteClub * $count_member;\n $max = 20 * ( $count_member - $nbNoValidate ) + $nbNoValidate * 9;\n\n $lockmark = \\Models\\Club::isLock($id);\n $lockmark = $lockmark['lock_member_mark'];\n //if( $_SESSION['user']->is_Evaluator == '1')\n\n //var_dump($total_member == $total);\n //var_dump($lockmark);\n //var_dump($tempPR);\n\n //if($total_member <= $total && $lockmark && $tempPR){\n if( ($count_member * $noteClub > $max) && $lockmark && $tempPR){\n $i = 0;\n foreach ($post[\"member\"] as $value){\n $i += intval(\\Models\\Member::noteStudent($value),10);\n }\n if(count($post[\"member\"]) == $i)\n echo 1;\n else echo 0;\n } else echo 0;\n }", "public function handle()\n {\n \\Stripe\\Stripe::setApiKey(\"sk_live_HeS5nnfJ5qARMPsANoGw32c2\");\n $path = storage_path('app/may-affiliate-comms.csv');\n $file = fopen($path, \"r\");\n $current_referrer = \"\";\n $current_subscriptions = NULL;\n $row = 0;\n while (($data = fgetcsv($file, 200, \",\")) !== FALSE) {\n if ($row == 0) {\n $row++;\n continue;\n }\n \n// echo $data[1] . \"\\tCURRENT \\n\";\n \n if ($current_referrer != $data[1]) {\n \n $current_referrer = $data[1];\n \n// echo $current_referrer . \"\\tNEW \\n\";\n \n// $stripe_details = StripeDetail::where('email', $current_referrer)->get();\n// foreach ($stripe_details as $stripe_detail) {\n// $subscriptions = \\Stripe\\Subscription::all(array('limit'=>100, 'customer'=>$stripe_detail->stripe_id));\n// $current_subscriptions = $subscriptions;\n// }\n \n $user = User::where('email', $current_referrer)->first();\n $subscriptions = \\Stripe\\Subscription::all(array('limit' => 100, 'customer' => $user->stripe_id));\n \n $current_subscriptions = $subscriptions;\n \n \n \n }\n \n $plan__ = $data[2];\n \n $eligible = false;\n \n// echo $user->email . \"\\tSubscriptions Count: \" . count($current_subscriptions) . \"\\n\";\n \n $commission = 0;\n if ($plan__ == \"137\") {\n $commission = 20;\n } else if ($plan__ == \"297\") {\n $commission = 50;\n } else if ($plan__ == \"MX370\") {\n $commission = 200;\n } else if ($plan__ == \"MX970\") {\n $commission = 500;\n }\n \n foreach ($current_subscriptions->data as $subscription) {\n \n// echo $current_referrer . \"\\t\" . $subscription->status . \"\\t\" . $subscription->plan->id . \"\\n\";\n \n $subscription_items = $subscription->items->data;\n \n if ($subscription->status == \"active\" || $subscription->status == \"trialing\") {\n \n foreach ($subscription_items as $subscription_item) {\n \n $plan = $subscription_item->plan;\n $plan_id = $plan->id;\n \n if ($plan__ == \"137\") {\n if ($plan_id == \"MX370\" || $plan_id == \"0137\" || $plan_id == \"0197\" || $plan_id = \"0167\") {\n $eligible = true;\n }\n } else if ($plan__ == \"297\") {\n if ($plan_id == \"MX970\" || $plan_id == \"0297\" || $plan_id == \"0197\" || $plan_id = \"0167\") {\n $eligible = true;\n }\n } else if ($plan__ == \"MX370\") {\n if ($plan_id == \"MX370\") {\n $eligible = true;\n }\n } else if ($plan__ == \"MX970\") {\n if ($plan_id == \"MX970\") {\n $eligible = true;\n }\n }\n\n }\n }\n }\n \n// if ($eligible == false) {\n//// echo $current_referrer . \"\\t\" . $plan__ . \"\\t\" . \"No\\n\";\n// echo \"No\\n\";\n// } else if ($eligible == true) {\n//// echo $current_referrer . \"\\t\" . $plan__ . \"\\t\" . \"Yes\\n\";\n// echo \"Yes\\n\";\n// }\n echo $commission . \"\\n\";\n }\n }", "public function courriersAction()\n {\n // Les modèles\n $model_membres = new Model_DbTable_CommissionMembre();\n\n // On récupère la liste des membres de la commission\n $this->view->rowset_membres = $model_membres->fetchAll('ID_COMMISSION = '.$this->_request->id_commission);\n }" ]
[ "0.5376475", "0.5031117", "0.49625513", "0.49073452", "0.48976406", "0.48951378", "0.48256844", "0.46761075", "0.46516463", "0.46340224", "0.46296656", "0.46080282", "0.4603489", "0.45780826", "0.4576223", "0.4570238", "0.4570038", "0.45478666", "0.45273718", "0.45207253", "0.4520071", "0.45158136", "0.45156378", "0.4504287", "0.45011324", "0.44981334", "0.44908896", "0.44809192", "0.44681722", "0.44653147", "0.4438609", "0.44370472", "0.44303235", "0.44241104", "0.4417095", "0.4412376", "0.44011256", "0.43985292", "0.4382678", "0.43727973", "0.436958", "0.43642986", "0.43623945", "0.43568996", "0.43568772", "0.43543068", "0.43516022", "0.4348361", "0.43415192", "0.4338852", "0.43186474", "0.431083", "0.43102273", "0.42941767", "0.4281559", "0.42754197", "0.42743742", "0.42661896", "0.42658535", "0.42607448", "0.42604193", "0.4255794", "0.42518878", "0.4247951", "0.42393765", "0.42386708", "0.4229657", "0.4220203", "0.42192698", "0.4218321", "0.42120343", "0.421072", "0.4208256", "0.4205993", "0.4203783", "0.42024878", "0.42011747", "0.41998994", "0.4196258", "0.41939792", "0.41912246", "0.41890505", "0.41817698", "0.41809765", "0.41807458", "0.41775092", "0.416637", "0.41644388", "0.41584083", "0.41558105", "0.4154546", "0.415264", "0.41515657", "0.41453978", "0.41444257", "0.41419184", "0.41338992", "0.4127493", "0.4124096", "0.41204917" ]
0.66868687
0
Get the 20 most recent bill cosponsorships for a particular member
public function getSpecificMemberCosponsoredBills(string $memberId, string $type) { $this->formatValidator->isValidMemberIdFormat($memberId); $this->billValidator->isValidCosponsoredBillType($type); $uriStub = "{$memberId}/bills/{$type}.json"; return $this->performApiRequest($uriStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "function getAffiliateSponsor( $affiliateID = null,$page =1,$limit = 5)\n\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t# fetch articles \n\t\t\tif($limit != \"\"){\n\t\t\t\t\n\t\t\t\t$start = ($page - 1)*$limit;\t\t\t\n\t\t\t\t$query = \"select * from tbl_sponsors \n\t\t\t\t where affiliate_id = '$affiliateID' order by id desc limit $start , $limit \";\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$query = \"select * from tbl_sponsors\n\t\t\t\twhere affiliate_id = '$affiliateID' order by id desc\";\n\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\t\t\t\n\t\t\t$myAffiliateSponsors = array();\n\t\t\twhile($row = $rs->FetchRow()) {\n\t\t\t\t$desc = substr($row['sponsor_description'],0,100);\n\t\t\t\t$row['sponsor_description'] = $desc;\n\t\t\t\t$myAffiliate\t\t= $row;\n\t\t\t\tarray_push($myAffiliateSponsors,$myAffiliate);\t\n\t\t\t}\n\t\t\treturn $myAffiliateSponsors;\n\t\t}", "public function getAllCoordinators($limit = 15){\n return \\App\\User::where('role_id', '=', \\App\\UserRole::$COORDINATOR)\n ->orWhere('role_id','=', \\App\\UserRole::$GUEST)\n ->paginate($limit);\n }", "public function topContributors()\r\n {\r\n $this->paginatedResult->setLimit(35);\r\n $this->paginatedResult->setOffset(0);\r\n $query = \"SELECT count(b.id) as total , b.user_login, b.profile_image FROM links a inner join users b on a.ID_User = b.ID where a.id_status = 4 group by b.user_login order by total DESC\";\r\n $this->paginatedResult->setQuery( $query );\r\n\t$this->paginatedResult->setMethod( 'cache' );\r\n\t$this->paginatedResult->generatePagination();\r\n\treturn $this->paginatedResult;\r\n }", "public function get_competitors(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT competitorID FROM tournamentCompetitors WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "public function getBorrowings();", "public function getCreditRequests()\n {\n $search['q'] = request('q');\n\n $partner = auth()->user()->companies->first();\n\n $creditRequests = CreditRequest::search($search['q'])->with('quotation.user','user','credits')->paginate(10);\n\n return $creditRequests;\n /*$creditRequestsPublic = CreditRequest::search($search['q'])->where('public',1)->with('quotation.user','user','shippings')->get()->all();\n \n $creditRequestsPrivate = CreditRequest::search($search['q'])->where('public', 0)->whereHas('suppliers', function($q) use($partner){\n $q->where('shipping_request_supplier.supplier_id', $partner->id);\n })->get()->all();\n\n $creditRequests = array_collapse([$creditRequestsPublic, $creditRequestsPrivate]);\n\n // dd($creditRequests);\n \n \n $paginator = paginate($creditRequests, 10);\n \n return $paginator; */\n \n \n\n \n \n }", "function GetLeaderboards($db) {\n\t$query = \"SELECT m.member_id, m.name, SUM(tier1_amt + tier2_amt + tier3_amt) AS sum_commissions\n\t\t\t\tFROM commissions c\n\t\t\t\tJOIN transactions t USING (trans_id)\n\t\t\t\tJOIN members m ON m.member_id = t.member_id\n\t\t\t\tWHERE m.member_id > 100\n\t\t\t\tGROUP BY m.member_id\n\t\t\t\tORDER BY sum_commissions DESC\n\t\t\t\tLIMIT 5\";\n\t\t\t\t// Add in date ranges\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db));\n\t$table_rows = false;\n\tfor($i=1; $row = mysqli_fetch_assoc($result); $i++) {\n\t\t$table_rows .= \"<tr>\"\n\t\t. WriteTD($i)\t\n#\t\t. WriteTD(WriteDate($row['member_id']))\t\n\t\t. WriteTD($row['name'])\t\n#\t\t. WriteTD(WriteDollars($row['sum_commissions']), TD_RIGHT)\t\n\t\t. \"</tr>\";\n\t}\n\t\n\tif (!$table_rows) {\n\t\t$res = \"There are no members with commissions at this time.\";\n\t} else {\n\t\t$table_header = \"<tr><thead>\"\n\t\t. WriteTH(\"Rank\")\t\n\t\t. WriteTH(\"Member\")\t\n#\t\t. WriteTH(\"Member ID\")\t\n#\t\t. WriteTH(\"Commissions\", TD_RIGHT)\t\n\t\t. \"</tr></thead>\";\n\t\t$res = '<link rel=\"stylesheet\" type=\"text/css\" href=\"http://digialti.com/css/style.css\">';\n\t\t$res .= \"<table width='300px' class='daTable'>\";\n\t\t$res .= $table_header;\n\t\t$res .= $table_rows;\n\t\t$res .= \"</table>\";\n}\n\t$res = \"<h3>All Time Top Income Earners</h3>\".$res;\n\treturn $res;\n}", "public function getPendingRelRequests(Member $member);", "public function getSponsorContracts(Sponsor $sponsor = NULL, Team $team = NULL, $start = 0, $end = PHP_INT_MAX, $status = -1, $year) {\r\n\t\t$contracts = array();\r\n\r\n\t\t/* connect to mysql database */\r\n\t\t$this->connect();\r\n\t\t\r\n\t\t/* query mysql database to get all sponsor contracts with give start and end date */\r\n\t\t$contractCriteria = array();\r\n\t\t\r\n\t\tif(isset($sponsor)) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"sponsor_id\", 'func'=>\"=\", 'value'=>$sponsor->getId());\r\n\t\t}\r\n\t\tif(isset($team)) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"team_id\", 'func'=>\"=\", 'value'=>$team->getId());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//$contractCriteria[] = array('name'=>\"end\", 'func'=>\">=\", 'value'=>$start);\r\n\t\t//$contractCriteria[] = array('name'=>\"start\", 'func'=>\"<=\", 'value'=>$end);\r\n\r\n\t\t$contractCriteria[] = array('name'=>\"year\", 'func'=>\"=\", 'value'=>$year);\r\n\r\n\r\n\t\t/* only return contracts with particular status (optional) */\r\n\t\tif($status > -1) {\r\n\t\t\t$contractCriteria[] = array('name'=>\"status\", 'func'=>\"=\", 'value'=>$status);\r\n\t\t}\r\n\r\n\t\t// print_r($contractCriteria);\r\n\t\t$result = $this->select($this->prefix.SPONSORING_TABLE, NULL, $contractCriteria, \"karma DESC\");\r\n\t\t// print_r($result);\r\n\t\tif($result != NULL) {\r\n\r\n\t\t\t/* receive data of sponsor contracts from result */\r\n\t\t\tforeach($result as $line) {\r\n\t\t\t\t$contract = new SponsorContract();\r\n\t\t\t\t$contract->setId($line['id']);\r\n\t\t\t\t$contract->setSponsor($this->getSponsor($line['sponsor_id']));\r\n\t\t\t\t$contract->setTeam($this->getTeam($line['team_id']));\r\n\t\t\t\t$contract->setStart($line['start']);\r\n\t\t\t\t$contract->setEnd($line['end']);\r\n\t\t\t\t$contract->setBaseAmount($line['base']);\r\n\t\t\t\t$contract->setPerPoint($line['per_point']);\r\n\t\t\t\t$contract->setExtraRank1($line['extra_rank1']);\r\n\t\t\t\t$contract->setExtraRank2($line['extra_rank2']);\r\n\t\t\t\t$contract->setExtraRank3($line['extra_rank3']);\r\n\t\t\t\t$contract->setExtraAudience($line['extra_audience']);\r\n\t\t\t\t$contract->setExtraChampionship($line['extra_championship']);\r\n\t\t\t\t$contract->setExtraTop5($line['extra_top5']);\r\n\t\t\t\t$contract->setKarma($line['karma']);\r\n\t\t\t\t$contract->setStatus($line['status']);\r\n\t\r\n\t\t\t\t/* add contract to contracts list */\r\n\t\t\t\t$contracts[] = $contract;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* disconnect from mysql database */\r\n\t\t$this->disconnect();\r\n\r\n\t\t/* return list of sponsor contracts */\r\n\t\treturn $contracts;\r\n\t}", "function getAffiliateSponsorDetail($affiliateID = NULL ,$sponsorID =NULL)\n\t\t{\n\t\t\n\t\t\t# fetch articles \n\t\t\t$query = \"select * from tbl_sponsors\n\t\t\twhere affiliate_id = $affiliateID and id = $sponsorID\";\n\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\t\t\t\n\t\t\t$myAffiliateSponsors = array();\n\t\t\t\n\t\t\twhile($row = $rs->FetchRow()) {\n\t\t\t\t$myAffiliate\t\t= $row;\n\t\t\t\tarray_push($myAffiliateSponsors,$myAffiliate);\n\t\t\t}\n\n\t\t\t\n\t\t\treturn $myAffiliateSponsors;\t\t\n\t\t}", "function getFriendLastedPosting() {\n $sql = \"SELECT b.*,\n c.name \n FROM member_posting a\n INNER JOIN posting b \n ON b.id = a.posting_id\n INNER JOIN member c \n ON c.id = a.member_id\n WHERE a.member_id IN (\n SELECT friend_id FROM member_friend WHERE member_id = ?)\n ORDER BY b.last_update_time DESC LIMIT 10\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function listDonors()\n {\n $records = [];\n $pageSize = 500;\n $pageStart = 1;\n $pageEnd = $pageSize;\n\n while ($pageSize !== null) {\n $response = $this->callSql(\"\n SELECT\n *\n FROM (\n SELECT\n /*ROW_NUMBER() OVER(ORDER BY dp.first_name, dp.middle_name, dp.last_name ASC) AS row_number,*/\n ROW_NUMBER() OVER(ORDER BY dp.donor_id ASC) AS row_number,\n dp.donor_id,\n dp.first_name,\n dp.middle_name,\n dp.last_name,\n dp.email,\n dp.address,\n dp.address2,\n dp.city,\n dp.state,\n dp.zip,\n dp.country,\n dp.gift_total\n FROM dp\n LEFT JOIN dpudf ON dpudf.donor_id = dp.donor_id\n WHERE\n (dp.nomail_reason != 'IA'\n AND dp.nomail_reason != 'DE')\n OR dp.nomail_reason IS NULL\n /*ORDER BY dp.first_name, dp.middle_name,dp.last_name ASC*/\n ) AS tmp\n WHERE tmp.row_number BETWEEN {$pageStart} AND {$pageEnd}\n \");\n\n // Handle records returned from the current page\n if (is_array($response) && count($response) > 0) {\n // Add this page's records to the running total\n foreach ($response as $record) {\n $records[] = $record;\n }\n unset($record);\n\n // Select the next page\n $pageStart += $pageSize;\n $pageEnd += $pageSize;\n } else {\n // Signal that there are no more records to be obtained\n $pageSize = null;\n }\n }\n\n return $records;\n }", "public function getSponsorContract(Sponsor $sponsor, Team $team, $start, $end, $status = -1, $year) {\r\n\t\t$contract = NULL;\r\n\t\t$tmpEnd = 0;\r\n\t\t// $sponsor;\r\n\t\t// echo $year;\r\n\t\t$sponsorContracts = $this->getSponsorContracts($sponsor, $team, $start, $end, $status, $year);\r\n\r\n\t\t/* search for the most recent contract */\t\r\n\t\tforeach($sponsorContracts as $sponsorContract) {\r\n\t\t\t/* check weather this contract is the latest */\r\n\t\t\tif($sponsorContract->getEnd() > $tmpEnd) {\r\n\t\t\t\t$contract = $sponsorContract;\r\n\t\t\t\t/* set new reference end date */\r\n\t\t\t\t$tmpEnd = $sponsorContract->getEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t/* return sponsor contract */\r\n\t\treturn $contract;\r\n\t}", "public function getTop25Customers($start = '2020-01-01', $end = '2021-12-31', $source = 'internal'){\n if ($source == 'internal') {\n $this->db->query('SELECT user_id,\n SUM(order_quantity) as total_quantity\n FROM new_customer_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY user_id\n ORDER BY total_quantity DESC\n LIMIT 25\n ;');\n } else if ($source == 'external') {\n $this->db->query('SELECT user_id,\n SUM(order_quantity) as total_quantity\n FROM new_external_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY user_id\n ORDER BY total_quantity DESC\n LIMIT 25\n ;');\n }\n $this->db->bind(':start', $start);\n $this->db->bind(':end', $end);\n $results = $this->db->resultSet();\n return $results;\n }", "function findForCoPerson($coPersonId, $limit=null, $offset=null, $order=null, $owner=true) {\n $args = array();\n $args['joins'][0]['table'] = 'co_group_members';\n $args['joins'][0]['alias'] = 'CoGroupMember';\n $args['joins'][0]['type'] = 'INNER';\n $args['joins'][0]['conditions'][0] = 'CoGroup.id=CoGroupMember.co_group_id';\n $args['conditions']['CoGroup.status'] = StatusEnum::Active;\n $args['conditions']['CoGroupMember.co_person_id'] = $coPersonId;\n if($owner) {\n $args['conditions']['OR']['CoGroupMember.member'] = 1;\n $args['conditions']['OR']['CoGroupMember.owner'] = 1;\n } else {\n $args['conditions']['CoGroupMember.member'] = true;\n }\n // Only pull currently valid group memberships\n $args['conditions']['AND'][] = array(\n 'OR' => array(\n 'CoGroupMember.valid_from IS NULL',\n 'CoGroupMember.valid_from < ' => date('Y-m-d H:i:s', time())\n )\n );\n $args['conditions']['AND'][] = array(\n 'OR' => array(\n 'CoGroupMember.valid_through IS NULL',\n 'CoGroupMember.valid_through > ' => date('Y-m-d H:i:s', time())\n )\n );\n $args['contain'] = false;\n \n if($limit) {\n $args['limit'] = $limit;\n }\n \n if($offset) {\n $args['offset'] = $offset;\n }\n \n if($order) {\n $args['order'] = $order;\n }\n \n return $this->find('all', $args);\n }", "public function getTop10Customers($start = '2020-01-01', $end = '2021-12-31', $source = 'internal'){\n if ($source == 'internal') {\n $this->db->query('SELECT user_id,\n SUM(order_quantity) as total_quantity\n FROM new_customer_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY user_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n } else if ($source == 'external') {\n $this->db->query('SELECT user_id,\n SUM(order_quantity) as total_quantity\n FROM new_external_orders\n WHERE ordered_at >= :start and ordered_at <= :end and order_status = \"PENDING\"\n GROUP BY user_id\n ORDER BY total_quantity DESC\n LIMIT 10\n ;');\n }\n $this->db->bind(':start', $start);\n $this->db->bind(':end', $end);\n $results = $this->db->resultSet();\n return $results;\n }", "function getContractRelList(){\n $sql = \"SELECT * FROM user_contract ORDER by id DESC\";\n return getAll($sql);\n}", "public function get_user_invoices($member_id, $limit = NULL)\n\t{\n\t\t$this->db->select('invoice.*, invoice_status.invoice_status_name');\n\t\t$this->db->where('invoice.invoice_status = invoice_status.invoice_status_id AND invoice.member_id = '.$member_id);\n\t\t$this->db->order_by('created', 'DESC');\n\t\tif($limit != NULL)\n\t\t{\n\t\t\t$this->db->limit($limit);\n\t\t}\n\t\t$query = $this->db->get('invoice, invoice_status');\n\t\t\n\t\treturn $query;\n\t}", "function get_memberlist($order = ID, $pagenum = 1, $usercount = 10) {\r\n\tglobal $bbdb, $bb;\r\n\tif ( isset($_GET['page']) )\r\n\t\t$page = ($_GET['page'] - 1) * $usercount;\r\n\telse\r\n\t\t$page = ($pagenum - 1) * $usercount;\r\n\tif ( $bb->wp_table_prefix ) {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM \".$bb->wp_table_prefix.\"posts RIGHT JOIN \".$bb->wp_table_prefix.\"users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM \".$bb->wp_table_prefix.\"users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t} else {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM $bbdb->posts RIGHT JOIN $bbdb->users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t}\r\n\treturn $result;\r\n}", "public function getPopularCourses()\n {\n\n // SAME HERE ---- TRYING TO GET ANYTHING TEACHER-RELATED BECAUSE THERE ARE VERY FEW INSTRUCTORS BUT LOOKS BETTER IF SHOWING MORE ON DASHBOARD\n\n $instructors = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n $editTeachers = Role::where('shortname', 'editingteacher')->first()->users()->take(4)->get();\n $courseCreators = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n\n $t = $this->coursesForRecents($instructors);\n $et = $this->coursesForRecents($editTeachers);\n $cr = $this->coursesForRecents($courseCreators);\n\n return collect(array_merge($t->toArray(), $et->toArray(), $cr->toArray()))->sortBy('timecreated')->take(5);\n }", "function getMemberCondoInfo() {\n return getAll(\"SELECT b.name,\n b.area,\n b.cost \n FROM member_condo a \n INNER JOIN condo b \n ON a.condo_id = b.id\n WHERE a.member_id = ?\",\n [getLogin()['mid']]);\n}", "public function actionlistallfuturesinitiatedByMember(){\n \n $member_id = Yii::app()->user->id;\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='futures_initiated_by=:id';\n $criteria->params = array(':id'=>$member_id);\n $future= Futures::model()->findAll($criteria);\n \n if($future===null) {\n http_response_code(404);\n $data['error'] ='No record found';\n echo CJSON::encode($data);\n } else {\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"futures\" => $future)\n );\n \n }\n }", "function i4_lms_get_coordinators() {\n global $wpdb;\n\n $table_name = $wpdb->prefix . 'i4_lms_coordinators';\n $SQL = \"SELECT *\n\t\t\tFROM $table_name\n\t\t\tORDER BY coordinator_name ASC\n\t\t\t\";\n\n $coordinators = $wpdb->get_results($SQL);\n\n echo '<div class=\"coordinators-wrapper\">';\n foreach ($coordinators as $coordinator) {\n echo '<div class=\"coordinator\">';\n echo '<img src=\"' . $coordinator->coordinator_img . '\" alt=\"' . $coordinator->coordinator_name . '\"/>';\n echo '<p>' . $coordinator->coordinator_name . '</p>';\n echo '<p>' . $coordinator->coordinator_email . '</p>';\n echo '<p>Course ID - ' . $coordinator->course_id . '</p>';\n echo '<span><a href=\"?page=coordinators&action=delete&coordinator_id=' . $coordinator->id . '\">Delete</a>';\n echo '</div>';\n }\n echo '</div>';\n //var_dump( $coordinators );\n }", "public function getTopSnippetContributors($limit = 5)\n {\n return $this->user->from('users AS u')\n ->join('snippets AS s', 'u.id', '=', 's.author_id', 'LEFT OUTER')\n ->where('u.active', '=', 1)\n ->where('s.approved', '=', 1)\n ->whereRaw('s.deleted_at IS NULL')\n ->groupBy('s.author_id')\n ->orderBy('snippets_count', 'DESC')\n ->take($limit)\n ->get(array('u.id', 'u.first_name', 'u.last_name', 'u.slug',\n DB::raw('count(s.author_id) AS snippets_count')));\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "public function getAllMemberCards()\n {\n \n $query = \"SELECT MID, LoyaltyCardNumber FROM transactionsummary ORDER BY LoyaltyCardNumber ASC\";\n \n return parent::RunQuery($query);\n }", "function get_all_commission_groupe($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('commission_groupe')->result_array();\n }", "public function sponsorships()\n {\n return $this->hasMany('App\\Sponsorship');\n }", "public function getPopularAuthors($limit)\n {\n return User::withCount(['posts' => function ($query) {\n $query->published();\n }])\n ->whereHas('posts', function ($query) {\n $query->published();\n })\n ->where('privilege', '>', 1)\n ->orderBy('posts_count', 'desc')\n ->take($limit)\n ->get();\n }", "function getAllOwners($currpg,$url)\n\t{\n\t\t$sql = \"Select * from tblowner order by organization_name\";\t// sql statement \n\t\t$result = paging($sql,$currpg, $this->pagesize,$url); // execute sql statement \n\t\treturn $result;\t\t\t\t\t\t// return result from sql \n\t}", "public function compareTwoMembersBillSponsorships(string $firstMemberId, string $secondMemberId, int $congress, string $chamber)\n {\n $this->formatValidator->isValidMemberIdFormat($firstMemberId);\n $this->formatValidator->isValidMemberIdFormat($secondMemberId);\n $this->congressValidator->isValidChamber($chamber);\n\n switch ($chamber) {\n case 'senate':\n $earliestCongress = 101;\n break;\n case 'house':\n default:\n $earliestCongress = 102;\n break;\n }\n\n $this->congressValidator->isValidCongress($congress, $earliestCongress);\n\n $uriStub = \"members/{$firstMemberId}/bills/{$secondMemberId}/{$congress}/{$chamber}.json\";\n\n return $this->performApiRequest($uriStub);\n }", "public function getMyComingSoons()\n {\n $this->tasteTheCookie();\n \n $cinemaEmail = $_REQUEST[\"cinemaEmail\"];\n $page = $_REQUEST[\"page\"];\n\n $soonmdl = new ComingSoonModel();\n $moviemdl = new MovieModel();\n $comingSoons = $soonmdl->where(\"email\", $cinemaEmail)->limit(20, ($page-1)*20)->find();\n $results = [];\n foreach ($comingSoons as $soon)\n {\n $movie = $moviemdl->find($soon->tmdbID);\n array_push($results, [\n \"movieName\" => $movie->title\n ]);\n }\n\n echo json_encode($results);\n }", "function get_consumer_details() {\n\t\t$consumer_no = $_REQUEST['consumer_no'];\n\t\t$biller_id = $_REQUEST['biller_id'];\n\t\tif (!empty($consumer_no) && !empty($biller_id)) {\n\t\t\t$biller_in_id = 'biller_user.biller_customer_id_no';\n\t\t\t$records_consumer = $this -> conn -> join_two_table_where_two_field('biller_user', 'biller_details', 'biller_id', 'biller_id', $biller_in_id, $consumer_no, 'biller_user.biller_id', $biller_id);\n\n\t\t\tif (!empty($records_consumer)) {\n\t\t\t\t$biller_id = $records_consumer[0]['biller_id'];\n\t\t\t\t$biller_company = $records_consumer[0]['biller_company_name'];\n\t\t\t\t$biller_company_logo = biller_company_logo . $records_consumer[0]['biller_company_logo'];\n\t\t\t\t$biller_user_name = $records_consumer[0]['biller_user_name'];\n\t\t\t\t$biller_customer_id = $records_consumer[0]['biller_customer_id_no'];\n\t\t\t\t$bill_amount = $records_consumer[0]['bill_amount'];\n\t\t\t\t$bill_due_date = $records_consumer[0]['bill_due_date'];\n\t\t\t\t$biller_user_email = $records_consumer[0]['biller_user_email'];\n\t\t\t\t$biller_user_contact_no = $records_consumer[0]['biller_user_contact_no'];\n\t\t\t\t$bill_pay_status = $records_consumer[0]['bill_pay_status'];\n\t\t\t\t$bill_invoice_no = $records_consumer[0]['bill_invoice_no'];\n\t\t\t\t$current_date = date(\"Y-m-d\");\n\t\t\t\tif ($bill_due_date >= $current_date) {\n\t\t\t\t\tif ($bill_pay_status == '1') {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill already paid\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => 'true', \"biller_id\" => $biller_id, 'biller_company' => $biller_company, 'biller_logo' => $biller_company_logo, 'consumer_name' => $biller_user_name, 'consumer_id' => $biller_customer_id, 'bill_amount' => $bill_amount, 'due_date' => $bill_due_date, 'consumer_email' => $biller_user_email, 'consumer_contact_no' => $biller_user_contact_no, 'bill_pay_status' => $bill_pay_status, 'bill_invoice_no' => $bill_invoice_no);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Bill Paid date is expired\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"No Bill Found from this consumer no\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing Parameter\", 'consumer_no' => $consumer_no, 'biller_id' => $biller_id);\n\t\t}\n\t\techo $this -> json($post);\n\n\t}", "static function getTopSpendCoinUser($days_before, $start=0, $limit=1000)\r\n\t{\r\n\t\t$days_before = funcs::check_input($days_before);\r\n\t\t$start = funcs::check_input($start);\r\n\t\t$limit = funcs::check_input($limit);\r\n\r\n\t\t$username = $_SESSION['sess_username'];\r\n\t\t$SuperUser = array('superadmin','cyric','heiko','Kleopatra33');\r\n\t\tif(!in_array($username,$SuperUser)){\r\n\t\t\t$condman = \" (\".TABLE_MEMBER_COUNT.\" <=\".MALE_MEMBERS_FLAG_PER_CITY.\") AND (\".TABLE_MEMBER_GENDER.\"= 1)\";\r\n\t\t\t$condwoman = \" (\".TABLE_MEMBER_COUNT.\" <=\".FEMALE_MEMBERS_FLAG_PER_CITY.\") AND (\".TABLE_MEMBER_GENDER.\"= 2)\";\r\n\t\t\t$CONDITION = \" AND ( $condman OR $condwoman ) AND \".TABLE_MEMBER_FLAG.\" != 1\" ;\r\n\t\t}\r\n\r\n\t\t$sqlGetRecords = \"\r\n\t\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t\tt1.\".TABLE_MEMBER_USERNAME.\" AS username,\r\n\t\t\t\t\t\t\tt1.signup_datetime as registred,\r\n\t\t\t\t\t\t\tt1.id as user_id,\r\n\t\t\t\t\t\t\tt4.name as \".TABLE_MEMBER_CITY.\",\r\n\t\t\t\t\t\t\tt3.name as \".TABLE_MEMBER_STATE.\",\r\n\t\t\t\t\t\t\tt2.name as \".TABLE_MEMBER_COUNTRY.\",\r\n\t\t\t\t\t\t\tSUM(c.coin) * -1 AS spent_coin,\r\n\t\t\t\t\t\t\tt1.coin AS remain_coin,\r\n\t\t\t\t\t\t\tMIN(c.log_date) as spend_date\r\n\t\t\t\t\t\t\";\r\n\t\t$sqlGetTotal = \"\r\n\t\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t\tcount(t1.id)\r\n\t\t\t\t\t \";\r\n\t\t$sqlCondition = \"\r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\tcoin_log c\r\n\t\t\t\t\t\tINNER JOIN\r\n\t\t\t\t\t\t\t\".TABLE_MEMBER.\" t1 ON c.member_id = t1.id\r\n\t\t\t\t\t\tLEFT OUTER JOIN xml_countries t2\r\n\t\t\t\t\t\t\tON t1.country = t2.id\r\n\t\t\t\t\t\tLEFT OUTER JOIN xml_states t3\r\n\t\t\t\t\t\t\tON t1.state=t3.id\r\n\t\t\t\t\t\tLEFT OUTER JOIN xml_cities t4\r\n\t\t\t\t\t\t\tON t1.city=t4.id\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tc.coin_field != 'bonus'\r\n\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\t(t1.\".TABLE_MEMBER_ISACTIVE.\" = 1) $CONDITION\r\n\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\tlog_date >= DATE_ADD(NOW(), INTERVAL -$days_before DAY)\r\n\t\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\t\tt1.id\r\n\r\n\t\t\t\t\t\t\";\r\n\t\t$sqlLimit =\t\t\"\r\n\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t\tspent_coin DESC\r\n\t\t\t\t\t\tLIMIT $start, $limit\r\n\t\t\t\t\t\t\";\r\n\r\n\t\t/*echo $sqlGetTotal.$sqlCondition;\r\n\t\techo \"<br/><br/>\";*/\r\n\r\n\t\t$result['data'] = DBconnect::assoc_query_2D($sqlGetRecords.$sqlCondition.$sqlLimit);\r\n\t\t$result['total'] = count(DBConnect::assoc_query_2D($sqlGetTotal.$sqlCondition));\r\n\r\n\t\t//return $result;\r\n\r\n\t\t/*echo \"<pre>\";\r\n\t\tprint_r($result);\r\n\t\techo \"</pre>\";*/\r\n\r\n\t\treturn $result;\r\n\t}", "public function get_latest_invoice()\n\t{\n\t\t$where = 'invoice.invoice_status_id != 4 AND invoice.invoice_status_id = invoice_status.invoice_status_id AND member.member_id = invoice.member_id AND invoice.dobi_id = '.$this->session->userdata('dobi_id');\n\t\t$table = 'invoice, invoice_status, member';\n\t\t\n\t\t//retrieve all invoice\n\t\t$this->db->from($table);\n\t\t$this->db->select('invoice.*, invoice.invoice_status_id AS status,member.member_first_name AS first_name, member.member_surname AS other_names, invoice_status.invoice_status_name');\n\t\t$this->db->where($where);\n\t\t$this->db->order_by('invoice.created', 'DESC');\n\t\t$query = $this->db->get('', 20);\n\t\t\n\t\treturn $query;\n\t}", "public function getYearsOfSponsorShip()\n {\n return \"Years Of Sponsorships 20\";\n }", "public function fetch_next_bill() {\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '=', $this->monthrefdate)\n ->where('monthseqnumber', '>', $this->monthseqnumber)\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n if ($next_bill != null) {\n return $next_bill;\n }\n\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '>', $this->monthrefdate)\n ->orderBy('monthrefdate', 'asc')\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n return $next_bill;\n}", "public function front_get_recent_deals_of_member($member_id,$num_deals,&$data_arr,&$data_count){\n $db = new db();\n\t\t\n\t\t$q = \"select t.date_of_deal,t.id as deal_id,t.deal_cat_name,t.deal_subcat1_name,t.deal_subcat2_name,t.value_in_billion,pm.designation,firm.name AS firm_name,t.value_range_id,vrm.display_text as fuzzy_value FROM \".TP.\"transaction_partner_members AS pm LEFT JOIN \".TP.\"transaction AS t ON ( pm.transaction_id = t.id ) LEFT JOIN \".TP.\"company AS firm ON ( pm.partner_id = firm.company_id ) LEFT JOIN \".TP.\"transaction_value_range_master as vrm ON (t.value_range_id=vrm.value_range_id) WHERE member_id = '\".$member_id.\"' and t.is_active='y' ORDER BY t.date_of_deal DESC LIMIT 0 , \".$num_deals;\n\t\t$ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$data_count = $db->row_count();\n if(0 == $data_count){\n //no deals done by this member\n return true;\n }\n\t\t$data_arr = $db->get_result_set_as_array();\n\t\t/****************\n\t\tget the participants\n\t\t**************/\n\t\trequire_once(\"classes/class.transaction_company.php\");\n\t\t$g_trans_comp = new transaction_company();\n\t\tfor($k=0;$k<$data_count;$k++){\n\t\t\t$data_arr[$k]['participants'] = NULL;\n\t\t\t$success = $g_trans_comp->get_deal_participants($data_arr[$k]['deal_id'],$data_arr[$k]['participants']);\n\t\t\tif(!$success){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n }", "function liste_referers_jour($jour) {\r\n\t# nombre de referers a afficher\r\n\t$limit = intval($limit); //secu\r\n\tif ($limit == 0) {\r\n\t\t$limit = 100;\r\n\t}\r\n\r\n\t$q = sql_select(\"referer, visites_jour AS vis \r\n\t\t\t\t\tFROM spip_referers \r\n\t\t\t\t\tWHERE date = \\\"$jour\\\"\r\n\t\t\t\t\tORDER BY visites_jour \r\n\t\t\t\t\tDESC \r\n\t\t\t\t\tLIMIT $limit\");\r\n\r\n\t$aff = debut_cadre_trait_couleur(\"referers-24.gif\", true)\r\n\t\t. \"<div class='cart_titre verdana3 bold'>\" . _T('actijour:liens_entrants_jour') . \"</div>\"\r\n\t\t. aff_referers($q, $limit, '')\r\n\t\t. \"<div style='clear:both;'></div>\"\r\n\t\t. fin_cadre_trait_couleur(true);\r\n\r\n\treturn $aff;\r\n}", "public function getMemberBooks($member_id) { \r\n $this->db->select('book_issues.id,book_issues.return_date,book_issues.issue_date,book_issues.is_returned,books.book_title,books.book_no,books.author')->from('book_issues');\r\n $this->db->join('books', 'books.id = book_issues.book_id','left');\r\n if ($member_id != null) {\r\n $this->db->where('book_issues.member_id', $member_id);\r\n $this->db->order_by(\"book_issues.is_returned\", \"asc\");\r\n } \r\n $query = $this->db->get();\r\n return $query->result_array(); \r\n\r\n }", "function zg_ai_find_players_to_debate($bot, $num = 99) {\n global $game;\n include drupal_get_path('module', 'zg') . '/includes/' . $game . '_defs.inc';\n $num = min($num, $bot->actions);\n\n // $debate_wait_time = 1200;\n // $zombie_debate_wait = 300;\n $sql = 'SELECT users.id, users.username, users.meta\n FROM users\n LEFT OUTER JOIN clan_members ON clan_members.fkey_users_id = users.id\n LEFT OUTER JOIN clans ON clan_members.fkey_clans_id = clans.id\n WHERE users.id <> %d\n AND (clans.id <> %d OR clans.id IS NULL OR users.meta = \"zombie\")\n AND username <> \"\"\n AND (debates_last_time < \"%s\" OR\n (users.meta = \"zombie\" AND debates_last_time < \"%s\"))\n AND users.meta NOT like \"ai_%\"\n AND users.level > %d\n AND users.level < %d\n ORDER BY abs(users.experience - %d) ASC\n LIMIT %d;';\n\n $result = db_query($sql, $bot->id, $bot->fkey_clans_id,\n date('Y-m-d H:i:s', REQUEST_TIME - $debate_time),\n date('Y-m-d H:i:s', REQUEST_TIME - $zombie_debate_wait),\n $bot->level - 15, $bot->level + 15, $bot->experience, $num);\n $data = [];\n while ($item = db_fetch_object($result)) {\n $data[] = $item;\n }\n return zg_ai_data_type($data);\n}", "function loadPending($startpoint=null,$limit=null){\r\n$sql=\"SELECT DISTINCT birth_info.*, general_info.surname, general_info.othernames FROM birth_info, general_info WHERE birth_info.status='pending' AND general_info.c_id=birth_info.c_id \";\r\nreturn array_slice($this->query($sql),$startpoint,$limit);\r\n}", "public function getAwardedBountyUsers();", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "function get_customerbookings($custID, $shipID, $filter = false, $filterable = false, $interval = '', $loginID = '', $debug = false) {\n\t\t$loginID = (!empty($loginID)) ? $loginID : DplusWire::wire('user')->loginid;\n\t\t$user = LogmUser::load($loginID);\n\t\t$q = (new QueryBuilder())->table('bookingc');\n\t\t$q->where('custid', $custID);\n\n\t\tif (!empty($shipID)) {\n\t\t\t$q->where('shiptoid', $shipID);\n\t\t}\n\n\t\tif ($user->get_dplusrole() == DplusWire::wire('config')->roles['sales-rep']) {\n\t\t\t$q->where('salesrep', DplusWire::wire('user')->salespersonid);\n\t\t}\n\t\t$q->generate_filters($filter, $filterable);\n\n\t\tswitch ($interval) {\n\t\t\tcase 'month':\n\t\t\t\t$q->field($q->expr(\"CAST(CONCAT(YEAR(bookdate), LPAD(MONTH(bookdate), 2, '0'), '01') AS UNSIGNED) as bookdate\"));\n\t\t\t\t$q->field('SUM(amount) as amount');\n\t\t\t\t$q->group('YEAR(bookdate), MONTH(bookdate)');\n\t\t\t\tbreak;\n\t\t\tcase 'day':\n\t\t\t\t$q->field('bookingc.*');\n\t\t\t\t$q->field('SUM(amount) as amount');\n\t\t\t\t$q->group('bookdate');\n\t\t\t\tbreak;\n\t\t}\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t}", "function getCreditos2() {\n\t\t$this -> User -> recursive = -1;\n\t\t$user = $this -> User -> read(null, $this -> Auth -> user(\"id\"));\n\t\tif (!empty($this -> params['requested'])) {\n\t\t\treturn $user[\"User\"][\"creditos\"] + $user[\"User\"][\"bonos\"];\n\t\t}\n\t\t/*if($this->RequestHandler->isAjax()){\n\t\t echo $user[\"User\"][\"creditos\"];\n\t\t Configure::write(\"debug\",0);\n\t\t $this->autoRender=false;\n\t\t exit(0);\n\t\t }*/\n\t}", "public function getProfileContribution()\n {\n $payments = Auth::user()->member->payments;\n \n return Datatables::of($payments)->make(true);\n }", "public function getBillsWithUserReservation () {\n if (strpos(Route::getFacadeRoot()->current()->uri(), 'admin') !== false) {\n $bills = self::select('*')->orderBy('bill_bill_date', 'DESC')->get();\n } else {\n\n $bills = self::where('bill_user_id', '=', Auth::id())->get();\n }\n $bills->each(function ($b) {\n global $subtotals;\n global $totals;\n $r = new Reservation();\n $b->reservation = $r->where('id', '=', $b->reservation_id)\n ->select('id', 'reservation_started_at', 'reservation_ended_at', 'reservation_nights', 'user_id')\n ->with(array(\n 'guests' => function ($q) {\n $q->select('guests.id', 'reservation_id', 'guest_number', 'guest_night', 'guest_ended_at', 'guest_started_at', 'role_id');\n },\n ))\n ->first();\n $b->user = \\User::find($b->reservation->user_id);\n $b->reservation->guests->each(function ($g) use($b) {\n $g->calcGuestSumTotals();\n $s = new DateTime($g->guest_started_at);\n $g->guest_started_at_show = $s->format('d. m Y');\n $e = new DateTime($g->guest_ended_at);\n $g->guest_ended_at_show = $e->format('d. m Y');\n $b->reservation->reservation_sum += $g->guestSum;\n });\n $bds = new \\DateTime($b->bill_bill_date);\n $s = new DateTime($b->reservation->reservation_started_at);\n $b->reservation->reservation_started_at_show = $s->format('d. m Y');\n $e = new DateTime($b->reservation->reservation_ended_at);\n $b->reservation->reservation_ended_at_show = $e->format('d. m Y');\n $b->bill_bill_date_show = $bds->format(trans('formats.short-date-ts'));\n if (isset($b->bill_paid)) {\n $bds = new \\DateTime($b->bill_paid);\n $b->bill_paid_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n if (isset($b->bill_resent_date)) {\n $bds = new \\DateTime($b->bill_resent_date);\n $b->bill_resent_date_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n $ubc = DB::select(DB::raw('select `country_name_' . trans('formats.langjs') . '` from countries where country_code = ' . $b->user->user_country_code));\n $b->user->country = $ubc[0]->{'country_name_' . trans('formats.langjs')};\n $subtotals += (float)$b->bill_sub_total;\n $totals += (float)$b->bill_total;\n $b->subtotals = $subtotals;\n $b->totals = $totals;\n });\n return $bills;\n }", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function front_get_deals_of_member_paged($member_id,$num_to_fetch,$start_offset,&$data_arr,&$data_count){\n $db = new db();\n\t\t\n\t\t$q = \"select t.date_of_deal,t.id as deal_id,t.deal_cat_name,t.deal_subcat1_name,t.deal_subcat2_name,t.value_in_billion,pm.designation,firm.name AS firm_name,t.value_range_id,vrm.display_text as fuzzy_value FROM \".TP.\"transaction_partner_members AS pm LEFT JOIN \".TP.\"transaction AS t ON ( pm.transaction_id = t.id ) LEFT JOIN \".TP.\"company AS firm ON ( pm.partner_id = firm.company_id ) LEFT JOIN \".TP.\"transaction_value_range_master as vrm ON (t.value_range_id=vrm.value_range_id) WHERE member_id = '\".$member_id.\"' and t.is_active='y' ORDER BY t.date_of_deal DESC LIMIT \".$start_offset.\" , \".$num_to_fetch;\n\t\t\n $ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\t\n\t\t\treturn false;\n\t\t}\n $data_count = $db->row_count();\n if(0 == $data_count){\n //no deals done by this member\n return true;\n }\n\t\t$data_arr = $db->get_result_set_as_array();\n\t\t/****************\n\t\tget the participants\n\t\t**************/\n\t\trequire_once(\"classes/class.transaction_company.php\");\n\t\t$g_trans_comp = new transaction_company();\n\t\tfor($k=0;$k<$data_count;$k++){\n\t\t\t$data_arr[$k]['participants'] = NULL;\n\t\t\t$success = $g_trans_comp->get_deal_participants($data_arr[$k]['deal_id'],$data_arr[$k]['participants']);\n\t\t\tif(!$success){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n }", "function getAffiliate($member_id)\n\t\t{\n\t\t\t$query = \"select m.*,af.*\n\t\t\tfrom tbl_member m \n\t\t\tleft join tbl_affiliate af \n\t\t\ton m.member_id = af.affiliate_id\n\t\t\twhere member_id = '\".$member_id.\"' and member_type='affiliate'\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = new Affiliate();\n\t\t\t$row = $rs->FetchRow();\n\t\t\t\n\t\t\t$oAffiliate->member_id\t\t\t\t=\t\t$row['member_id'];\n\t\t\t$oAffiliate->first_name\t\t\t\t=\t\t$row['first_name'];\n\t\t\t$oAffiliate->last_name\t\t\t\t=\t\t$row['last_name'];\n\t\t\t$oAffiliate->user_name\t\t\t\t=\t\t$row['user_name'];\n\t\t\t$oAffiliate->email\t\t\t\t\t=\t\t$row['email'];\n\t\t\t$oAffiliate->isActive\t\t\t\t=\t\t$row['isActive'];\n\t\t\t$oAffiliate->member_type\t\t\t=\t\t$row['member_type'];\n\t\t\t$oAffiliate->reg_date\t\t\t\t=\t\t$row['reg_date'];\n\t\t\t$oAffiliate->affiliate_id\t\t\t=\t\t$row['affiliate_id'];\n\t\t\t$oAffiliate->organisation_name\t\t=\t\t$row['organisation_name'];\n\t\t\t$oAffiliate->affiliate_code\t\t\t=\t\t$row['affiliate_code'];\n\t\t\t$oAffiliate->promo_code\t\t\t=\t\t$row['promo_code'];\t\t\t\n\t\t\t$oAffiliate->banner\t\t\t\t\t=\t\t$row['banner'];\n\t\t\t$oAffiliate->donation_url\t\t\t=\t\t$row['donation_url'];\n\t\t\t$oAffiliate->organisation_website\t=\t\t$row['organisation_website'];\n\t\t\t$oAffiliate->street_address\t\t\t=\t\t$row['street_address'];\n\t\t\t$oAffiliate->city\t\t\t\t\t=\t\t$row['city'];\n\t\t\t$oAffiliate->state\t\t\t\t\t=\t\t$row['state'];\n\t\t\t$oAffiliate->zip_code\t\t\t\t=\t\t$row['zip_code'];\n\t\t\t$oAffiliate->country\t\t\t\t=\t\t$row['country'];\n\t\t\t$oAffiliate->description\t\t\t=\t\t$row['description'];\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "public function index(Request $request)\n {\n $query = Member::withCount('borrows');\n if ($request->id) {\n $query->where('id', $request->id);\n }\n if ($request->email) {\n $query->where('email', 'LIKE', '%'.$request->email.'%');\n }\n if($request->sort=='asc'){\n $members = $query->orderBy('id')->paginate(15);\n } elseif($request->sort=='desc') {\n $members = $query->orderBy('id', 'desc')->paginate(15);\n } else {\n $members = $query->orderBy('id')->paginate(15);\n }\n //$members = $query->orderBy('id')->paginate(15);\n return view('members.index', ['members'=>$members]);\n }", "public function getTopMembers(): array\n {\n $statement = \"SELECT * FROM \" . $this->table . \" ORDER BY id LIMIT \".self::MEMBERLIMIT;\n return $this->pdo->query($statement)->fetchAll();\n }", "public static function latestCourses($limit = 8)\n {\n return static::find()\n ->active()\n// ->select([\n// '{{kurs}}.*',\n// 'AVG({{rating}}.rate) AS averageRating'\n// ])\n// ->joinWith('validRatings', false)\n// ->groupBy('{{kurs}}.id')\n// ->orderBy(['kurs.enrolls_count' => SORT_DESC])\n ->recently($limit)\n ->with([\n 'user' => function ($query) {\n return $query->select(['id', 'firstname', 'lastname'])->asArray();\n },\n ])\n ->all();\n\n }", "public function findAllWithOffsetLimit($leaderboardId, $offset, $limit) {\n // $transactions = $repository->findAllByUserId();\n // echo $transactions[0]->UserId;\n $sql = \"\n SELECT * FROM score_post where leaderboard_id = $leaderboardId order by score desc LIMIT $limit OFFSET $offset \n \"; \t\n $stmt = $this->connection->prepare($sql);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_CLASS, 'Transaction');\n return $stmt->fetchAll();\n }", "public function getLatestInvoices()\r\n {\r\n if ($this->userId != Null) {\r\n $em = $this->entityManager;\r\n $criteria = array(\r\n 'user' => $this->userId\r\n );\r\n $order = array(\r\n 'id' => 'DESC'\r\n );\r\n $limit = 50;\r\n \r\n $transact = $em->getRepository('Transactions\\Entity\\InvoiceUser')->findBy($criteria, $order, $limit);\r\n return $transact;\r\n }\r\n }", "public function getCharges();", "public function memberList($eid = 1) {\n $config = $this->config('simple_conreg.settings.'.$eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::badgeTypes($eid, $config);\n $digits = $config->get('member_no_digits');\n\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'Name':\n $order = 'name';\n break;\n case 'Country':\n $order = 'country';\n break;\n case 'Type':\n $order = 'badge_type';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content = array();\n\n //$content['#markup'] = $this->t('Unpaid Members');\n\n $content['message'] = array(\n '#cache' => ['tags' => ['simple-conreg-member-list'], '#max-age' => 600],\n '#markup' => $this->t('Members\\' public details are listed below.'),\n );\n\n $rows = [];\n $headers = [\n 'member_no' => ['data' => t('Member No'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'member_name' => ['data' => t('Name'), 'field' => 'name'],\n 'badge_type' => ['data' => t('Type'), 'field' => 'm.badge_type', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_country' => ['data' => t('Country'), 'field' => 'm.country', 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],\n ];\n $total = 0;\n\n foreach ($entries = SimpleConregStorage::adminPublicListLoad($eid) as $entry) {\n // Sanitize each entry.\n $badge_type = trim($entry['badge_type']);\n $member_no = sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n $member = ['member_no' => $badge_type . $member_no];\n switch ($entry['display']) {\n case 'F':\n $fullname = trim(trim($entry['first_name']) . ' ' . trim($entry['last_name']));\n if ($fullname != trim($entry['badge_name']))\n $fullname .= ' (' . trim($entry['badge_name']) . ')';\n $member['name'] = $fullname;\n break;\n case 'B':\n $member['name'] = trim($entry['badge_name']);\n break;\n case 'N':\n $member['name'] = t('Name withheld');\n break;\n }\n $member['badge_type'] = trim(isset($types[$badge_type]) ? $types[$badge_type] : $badge_type);\n $member['country'] = trim(isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country']);\n\n // Set key to field to be sorted by.\n if ($order == 'member_no')\n $key = $member_no;\n else\n $key = $member[$order] . $member_no; // Append member number to ensure uniqueness.\n if (!empty($entry['display']) && $entry['display'] != 'N' && !empty($entry['country'])) {\n $rows[$key] = $member;\n }\n $total++;\n }\n\n // Sort array by key.\n if ($direction == 'DESC')\n krsort($rows);\n else\n ksort($rows);\n\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n //'#footer' => array(t(\"Total\")),\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n\n $content['summary_heading'] = [\n '#markup' => $this->t('Country Breakdown'),\n '#prefix' => '<h2>',\n '#suffix' => '</h2>',\n ];\n\n $rows = array();\n $headers = array(\n t('Country'),\n t('Number of members'),\n );\n $total = 0;\n foreach ($entries = SimpleConregStorage::adminMemberCountrySummaryLoad($eid) as $entry) {\n if (!empty($entry['country'])) {\n // Sanitize each entry.\n $entry['country'] = trim($countryOptions[$entry['country']]);\n $rows[] = $entry;\n $total += $entry['num'];\n }\n }\n //Add a row for the total.\n $rows[] = array(t(\"Total\"), $total);\n $content['summary'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n\n return $content;\n }", "function getCompatibleCandidates($searchee = array(), $criteria=array(), $limit=-1){\t\r\n\t\t$action=\"profile_search\";\r\n\t\t$registered_date=null;\r\n\t\tforeach($criteria as $key=>$value){ //plugs variables to place\r\n\t\t\tif ($key==\"action\"){\r\n\t\t\t\t$action = $value;\r\n\t\t\t}else if ($key==\"registered_date\"){\r\n\t\t\t\t$registered_date = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($action==\"searchbydateprofile\"){\r\n\t\t\t\r\n\t\t\t$condition = array(\"DATE(Member.created) = '\".$registered_date.\"'\",\r\n\t\t\t\t\t\t\t\t \"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\t\r\n\t\t}else if ($action==\"all\"){\r\n\t\t\t$condition = array(\"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t$this->controller->Member->unbindModel(array(\"hasMany\"=>array(\"GiftAvailTransaction\", \"Notification\", \"CreditCard\", \"PrivateMessage\", \"SentGift\", \"SubscriptionTransaction\", \"MemberProfileAnswer\", \"Album\", \"InMyOwnWordsAnswer\", \"MembersInterest\", \"Connection\", \"ReceiveMessage\", \"ShoppedItem\")));\r\n\t\tif ($limit==-1){ \r\n\t\t\t$members = $this->controller->Member->find(\"all\", \r\n\t\t\t\t\t\tarray(\"conditions\"=>$condition));\r\n\t\t}else{\r\n\t\t\t$members = $this->controller->Member->find(\"all\", array(\"conditions\"=>$condition, \"limit\"=>$limit));\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$matches = array();\r\n\t\tforeach ($members as $member){\r\n\r\n\t\t\t$passed = true;\r\n\t\t\tif (isset($searchee[\"MemberSetting\"])){\r\n\t\t\t\tif ($this->validAge($searchee,$member)&&$this->validDistance($searchee,$member)){\r\n\t\t\t\t\t$passed = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$passed = true;\r\n\t\t\t}\r\n\t\t\tif ($passed){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t$data[\"Match\"][\"matched_id\"] = $member[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"member_id\"] = $searchee[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"compatibility\"] = $this->getCompatibilityByWeight ($searchee, $member);\r\n\t\t\t\tif ($data[\"Match\"][\"compatibility\"]!=0){\r\n\t\t\t\t\t$matches[] = $this->controller->Match->save_match($data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $matches;\t\r\n\t\t\r\n\t}", "public function get_user_following($filters)\n {\n $active_login_userid = $filters['active_login_userid'];\n $owner_profile_userid = $filters['owner_profile_userid'];\n $filter = $filters['filter'];\n \n //Most Recent\n $active_filter = \" ORDER BY created_at DESC, u.first_name, u.last_name\";\n if($filter == 1) {\n //Alphabetical\n $active_filter = \" ORDER BY u.first_name, u.last_name\";\n } else if($filter == 2) {\n //By number of followers\n $active_filter = \" ORDER BY followers DESC, u.first_name, u.last_name\";\n } else if($filter == 3) {\n //By number of mutual friends\n $active_filter = \" ORDER BY mutual_friends DESC, u.first_name, u.last_name\";\n } else if($filter == 4) {\n //By number of similar interests\n $active_filter = \" ORDER BY similar_interest DESC, u.first_name, u.last_name\";\n }\n \n $limit = 20;\n \n $sql = \"SELECT u.id as user_id,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n ub.coverphoto,\n coalesce(a.total,0) as followers,\n coalesce(b.total,0) as following,\n round((coalesce(c.yaycount,0) + coalesce(d.yaycount,0) + (coalesce(e.yaycount,0) / 10)) / 3) as avg_rating,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then \n (case WHEN ucol.course IS NOT NULL THEN\n CONCAT(ucol.course, ', ', ucol.schoolname)\n ELSE ucol.schoolname\n end)\n when 3 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n (case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end) 'friend_status',\n (case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end) 'following_status',\n coalesce(mf.mutualfriends,0) as mutual_friends,\n coalesce(ms.mutualstrings,0) as similar_interest,\n uq.created_at\n FROM useracquiantances uq\n JOIN users u ON u.id = uq.user_two_id\n LEFT JOIN userbasicinfo ub on u.id = ub.user_id\n LEFT JOIN usersettings us on u.id = us.user_id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (select useracquiantances.user_two_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_two_id) as a ON a.user_two_id = u.id\n LEFT OUTER JOIN (select useracquiantances.user_one_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_one_id) as b ON b.user_one_id = u.id\n LEFT OUTER JOIN (select postcontentapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postcontentapprovalrate\n LEFT JOIN postcontent ON postcontent.id = postcontentapprovalrate.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postcontentapprovalrate.mask = 0\n GROUP BY postcontentapprovalrate.user_id) as c ON c.user_id = u.id\n LEFT OUTER JOIN (select topicapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM topicapprovalrate\n LEFT JOIN topic ON topic.id = topicapprovalrate.string_id\n WHERE topic.deleted_at IS NULL AND topicapprovalrate.mask=0\n GROUP BY topicapprovalrate.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select postopinionapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postopinionapprovalrate\n LEFT JOIN postopinion ON postopinion.id = postopinionapprovalrate.postopinion_id\n LEFT JOIN postcontent ON postcontent.id = postopinion.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postopinion.deleted_at IS NULL\n AND postopinionapprovalrate.mask=0\n GROUP BY postopinionapprovalrate.user_id) as e ON e.user_id = u.id\n LEFT JOIN useracquiantances ua on ua.user_one_id = uq.user_two_id \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = uq.user_two_id\n LEFT JOIN userfriends uf2 on uf2.user_one_id = uq.user_two_id \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=uq.user_two_id\n LEFT OUTER JOIN (select uf5.user_one_id,\n COUNT(*) mutualfriends\n FROM userfriends uf5\n WHERE uf5.status=1 AND\n uf5.user_two_id IN (SELECT uf6.user_two_id\n FROM userfriends uf6\n WHERE uf6.user_one_id={$active_login_userid} AND status=1)\n GROUP BY uf5.user_one_id) as mf ON mf.user_one_id = u.id\n LEFT OUTER JOIN (select tr.user_id,\n COUNT(*) mutualstrings\n FROM topictrack tr\n LEFT JOIN topic t ON t.id = tr.topic_id\n WHERE t.deleted_at IS NULL AND tr.mask=0 AND\n tr.topic_id IN (SELECT tr2.topic_id \n FROM topictrack tr2\n LEFT JOIN topic t2 ON tr2.topic_id = t2.id\n WHERE tr2.user_id={$active_login_userid} \n AND t.deleted_at IS NULL \n AND tr.mask=0)\n GROUP BY tr.user_id) as ms ON ms.user_id = u.id\n WHERE (uq.user_one_id={$owner_profile_userid} AND uq.status=1)\n {$active_filter}\n LIMIT {$limit}\";\n \n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }", "function get_member( $member )\n {\n // TODO Determine role.is_admin in a better way\n\n $get_member_query = <<<SQL\n select m.first_name,\n m.last_name,\n m.gatech_email_address,\n m.display_email_address,\n to_char( m.paid_dues_date, 'MM/DD/YYYY' ) as paid_dues_date,\n to_char( m.paid_locker_date, 'MM/DD/YYYY' ) as paid_locker_date,\n to_char( m.paid_practice_date, 'MM/DD/YYYY' ) as paid_practice_date,\n to_char(\n m.paid_locker_date + ( m.locker_months * interval '1 month' ),\n 'MM/DD/YYYY'\n ) as locker_end_date,\n m.locker_number,\n m.profile_photo_path,\n m.personal_website,\n m.is_available_for_collaboration,\n m.biography,\n m.first_name || ' ' || m.last_name as name,\n r.is_admin\n from tb_member m\n join tb_member_role mr\n on m.member = mr.member\n join tb_role r\n on mr.role = r.role\n where m.member = ?member?\norder by r.rank\n limit 1\nSQL;\n\n $params = [ 'member' => $member ];\n $result = query_execute( $get_member_query, $params );\n\n return query_success( $result ) ? query_fetch_one( $result ) : false;\n }", "public function toplist()\n {\n $listfac = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->select('factura_cab.numfac as numfac','fecfac', 'fecpago','NOM_ENT','valpago','estfac')\n ->orderBy('numfac', 'desc')\n ->take(5)\n ->get();\n\n return $listfac; \n }", "public function lastPaidOrderCustomers()\n {\n return $this->model->select('id', 'user_id', 'paid_date')\n ->with('user')\n ->whereStatusId(OrderStatusConstants::PAID)\n ->whereNotNull('paid_date')\n ->orderByDesc('paid_date')\n ->paginate();\n }", "public function charge_list( $count = 10, $offset = 0, $customer_id = FALSE ) {\r\n\t\t$params['count'] = $count;\r\n\t\t$params['offset'] = $offset;\r\n\t\tif( $customer_id )\r\n\t\t\t$params['customer'] = $customer_id;\r\n\t\t$vars = http_build_query( $params, NULL, '&' );\r\n\t\t\r\n\t\treturn $this->_send_request( 'charges?'.$vars );\r\n\t}", "public function topFreelancers()\n {\n \t$freelancers = DB::table('freelancers')\n \t\t\t\t\t->join('users','user_id','freelancers.user_id','users.id')\n \t\t\t\t\t->join('userprofiles','freelancers.user_id','freelancers.user_id','userprofiles.user_id')\n \t\t\t\t\t->join('countries','userprofiles.country_id','countries.id','userprofiles.country_id')\n \t\t\t\t\t->take(5)\n \t\t\t\t\t->get();\n \t//$categories = DB::table('skill_categories')\n\n\n \t$title = 'Browse Top Freelancers';\n\n \treturn view('profiles.top-freelancers-profile',['title'=>$title,'freelancers'=>$freelancers]);\n }", "function getCongregationCoordinators() {\n $sqlQuery = \"SELECT * FROM congregation_coordinator\";\n $result = $this->DB->executeQuery($sqlQuery, $this->Functions->paramsIsZero(), \"select\");\n $bigString = \"<table class='table'>\";\n $bigString .= \"<thead>\";\n $bigString .= \"<tr>\";\n $bigString .= \"<th scope='col'>#</th>\";\n $bigString .= \"<th scope='col'>Coordinator Name</th>\";\n $bigString .= \"<th scope='col'>Coordinator Phone</th>\";\n $bigString .= \"<th scope='col'>Coordinator Email</th>\";\n $bigString .= \"</tr>\";\n $bigString .= \"</thead>\";\n $bigString .= \"<tbody>\";\n for($i = 0; $i < sizeof($result); $i++) {\n $bigString .= \"<tr>\";\n $bigString .= \"<th scope='row'>\".($i+1).\"</th>\";\n $bigString .= \"<td>\".$this->Functions->testSQLNullValue($result[$i]['coordinatorName']).\"</td>\";\n $bigString .= \"<td>\".$this->Functions->testSQLNullValue($result[$i]['coordinatorPhone']).\"</td>\";\n $bigString .= \"<td id='coordinator-email'>\".$this->Functions->testSQLNullValue($result[$i]['coordinatorEmail']).\"</td>\";\n $bigString .= \"</tr>\";\n }\n $bigString .= \"</tbody>\";\n $bigString .= \"</table>\";\n echo $bigString;\n }", "function getToplist($limit=false, $extended=false) {\n static $toplist;\n $challenges = challenges();\n if (!$toplist) {\n $top = array();\n $lists = array();\n $info = array();\n foreach ($challenges as $challenge_id => $data) {\n if ($data['type'] == 'private' && isChallengeOpen($challenge_id)) {\n $lists[] = getChallToplist($challenge_id, false);\n }\n }\n foreach ($lists as $list) {\n if (!$list) {\n continue;\n }\n foreach ($list as $data) {\n if (array_key_exists($data['userid'], $top)) {\n $top[$data['userid']] += $data['points'];\n } else {\n $top[$data['userid']] = $data['points'];\n $info[$data['userid']] = array('username' => $data['username'], 'country' => $data['country']);\n }\n }\n }\n arsort($top);\n foreach ($top as $userid => $points) {\n unset($top[$userid]);\n $tmp['username'] = $info[$userid]['username'];\n $tmp['country'] = $info[$userid]['country'];\n $tmp['userid'] = $userid;\n $tmp['points'] = $points;\n if ($extended) {\n $tmp['total'] = count(getUserChalls($userid));\n }\n $newTop[] = $tmp;\n }\n $top = $newTop;\n $toplist = $top;\n } else {\n $top = $toplist;\n }\n if ($limit) {\n $top = array_slice($top,0,$limit,true);\n }\n return $top;\n}", "function get_all($limit=10000, $offset=0)\n\t{\n\t\t$this->db->from('giftcards');\n\t\t$this->db->where('deleted',0);\n\t\t$this->db->order_by(\"giftcard_number\", \"asc\");\n\t\t$this->db->limit($limit);\n\t\t$this->db->offset($offset);\n\t\treturn $this->db->get();\n\t}", "public function getCandidats();", "public function getAllMemberClosedOrders($member_id){\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='order_initiated_by=:orderedby and status=:status';\n $criteria->params = array(':orderedby'=>$member_id,':status'=>'closed');\n $orders= Order::model()->findAll($criteria);\n \n $all_orders = [];\n foreach($orders as $order){\n $all_orders[] = $order['id'];\n }\n \n return $all_orders;\n \n }", "function getpersonneClient($id){\n\t\t$q = $this->personne->find('all',array(\n\t\t\t\t\"conditions\" => \"Personne.deleted = 0 and Personne.id_client =$id \",\n\t\t\t\t'limit' => 20,\n\t\t\t\t'fields'=>$this->paginate['fields'] ,\n\t\t\t\t\"order\" => \"Personne.id desc\"\n\t\t));\n\t\treturn $q;\n\t}", "public static function getGithubContributors($owner,$reponame) {\n $PASSWORD = '';\n $username = '';\n\n $page = 1;\n $base_url = 'https://api.github.com';\n $url = '/repos/'.$owner.'/'.$reponame.'/contributors?per_page=100&page=';\n\n // this could be done async, and having websockets on the frontend\n // create curl resource\n $goToNextPage = True;\n $contributors = array();\n // get all the pages\n do {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $base_url.$url.$page);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch,CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $username . \":\" . $PASSWORD);\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1;\".\n \" en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\";\n curl_setopt($ch,CURLOPT_USERAGENT,$user_agent);\n $output = curl_exec($ch);\n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n curl_close($ch);\n\n $header = substr($output, 0, $header_size);\n $body = substr($output, $header_size);\n $json = json_decode($body,true);\n\n $contributors = array_merge($contributors,$json);\n ++$page;\n $goToNextPage = (count($json) > 99);\n } while($goToNextPage);\n return $contributors;\n }", "public function get_consents(){\n $pagination = create_pagination();\n $consents = Consent::select(\n DB::raw('SQL_CALC_FOUND_ROWS consent.consent_id'),\n 'consent.title',\n 'consent.content',\n 'consent.created_at'\n )\n ->where('consent.franchise_id', $this->franchise_id)\n ->where('consent.club_id', $this->club_id)\n ->where(function($query){\n //allow filter by team name\n if( isset($this->request['name']) && !empty($this->request['name']) ) {\n $query->where('consent.title', 'like', '%' . $this->request['name'] . '%');\n }\n return $query;\n })\n ->limit($pagination['per_page'])\n ->offset($pagination['offset']);\n\n //if auth user is guardian load only the consents assigned to him/her\n if( Auth::user()->hasRole('guardian') ){\n $consents->select(\n DB::raw('SQL_CALC_FOUND_ROWS consent.consent_id'),\n 'consent.title',\n 'consent.content',\n 'consent.created_at',\n 'rel_consent_user.agreed_at'\n )\n ->leftJoin('rel_consent_user', 'rel_consent_user.consent_id', '=', 'consent.consent_id')\n ->where('rel_consent_user.user_id', $this->user_id);\n }\n\n $consents = $consents->get();\n //count the results so we can use them in pagination\n $requestsCount = DB::select( DB::raw(\"SELECT FOUND_ROWS() AS count;\") );\n $count = reset($requestsCount)->count;\n\n //for admin load the guardians that the consent was assigned to\n if( Auth::user()->hasRole('admin') ){\n $consents->load('guardians');\n }\n\n return format_response($consents, $count);\n }", "public function fetchCampaign_and_patrons() {\n return $this->QueryAPI(\"current_user/campaigns?include=rewards,creator,goals,pledges\");\n }", "public function index()\n {\n $paginate = Input::get('paginate', 'true') === 'true';\n\n return $paginate ? MemberGroup::paginate(15) : MemberGroup::all();\n }", "function getClubs($NAC_ID, $withFlightsOnly=false) {\n\t\tglobal $db,$NACclubsTable;\n\t\tif ($withFlightsOnly) {\n\t\t\tglobal $flightsTable;\n\t\t\t$query=\"SELECT clubID, clubName\n\t\t\t\tFROM $NACclubsTable c\n\t\t\t\t\tINNER JOIN $flightsTable f ON f.NACid=c.NAC_ID AND f.NACclubID=c.clubID\n\t\t\t\tWHERE c.NAC_ID=$NAC_ID\n\t\t\t\tGROUP BY clubID, clubName\n\t\t\t\tORDER BY clubName\";\n\t\t}else {\n\t\t\t$query=\"SELECT * FROM $NACclubsTable WHERE NAC_ID=$NAC_ID ORDER BY clubName\";\n\t\t}\n\t\t$res= $db->sql_query($query);\n\t\t// echo $query;\n \t\tif($res <= 0){\n\t\t\t echo \"Error getting NAC clubs from DB<BR>\";\n\t\t return;\n\t }\n\t\t$NACclubList=array();\n\t\twhile ($row=$db->sql_fetchrow($res)) {\n\t\t\t$NACclubList[$row['clubID']]=$row['clubName'];\n\t\t}\n\t\treturn $NACclubList;\n }", "public function sponsors(){\n return $this->belongsToMany('App\\Sponsor')->withPivot('points_balance');\n }", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "public function get_challan_list()\n {\n return $this->db->select('sr_no,customer_id, challan_no, material, total, challan_bills.created_on, bakery_name,bakery_address, bakery_area, bakery_city')->order_by('sr_no','desc')\n ->from('challan_bills')->join('customers', 'customers.id = challan_bills.customer_id')->get();\n }", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "function getAffiliates()\n\t\t{\n\t\t\t$query = \"select member_id,concat(first_name,' ',last_name) as affiliate_name\n\t\t\tfrom tbl_member \n\t\t\twhere member_type = 'affiliate' order by first_name asc\";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$oAffiliate = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$member_id = $row['member_id'];\n\t\t\t\t$affiliate_name = $row['affiliate_name'];\n\t\t\t\t$oAffiliate[$member_id] = $affiliate_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $oAffiliate;\n\t\t}", "public function findByMember( $member )\n\t{\n\t\treturn \\IPS\\Db::i()->select( 'ip_address AS ip, 1 AS count, joined AS first, joined AS last', 'core_members', array( 'member_id=?', $member->member_id ) )->setKeyField( 'ip' );\n\t}", "public function peopleCbo() {\n $people = Person::all();\n return $people;\n }", "private function showPremiumMembers() {\n $query = \"SELECT DISTINCT u.id, n.nhc_pin, u.user_login, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um ON um.user_id = u.id AND um.meta_key = 'member_level' AND um.meta_value IN ('paid-75', 'paid-95')\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um7 ON um7.user_id = u.id AND um7.meta_key = 'expiration_date' AND um7.meta_value {$this->expireDateClause}\n ORDER BY um.meta_value\";\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n foreach($membersArr as $key => $m) {\n $tmp = get_user_meta($m['id']);\n $membersArr[$key]['addr1'] = $tmp['addr1'][0];\n $membersArr[$key]['addr2'] = $tmp['addr2'][0];\n $membersArr[$key]['city'] = $tmp['city'][0];\n $membersArr[$key]['thestate'] = $tmp['thestate'][0];\n $membersArr[$key]['zip'] = $tmp['zip'][0];\n $membersArr[$key]['country'] = $tmp['country'][0];\n $membersArr[$key]['level'] = $tmp['member_level'][0];\n }\n \n $this->showResults($membersArr, 'premium', true);\n }", "public function getCredits();", "public function getRecentCustomers($id);", "function getAllPosatclosure($limit){\n\t \t$sql = \"SELECT *,SUM(stage='283') As sum1, SUM(stage='284') As sum2, SUM(stage='285') As sum3, SUM(stage='286') As sum4, SUM(stage='287') As sum5, SUM(stage='288') As sum6, SUM(stage='289') As sum7, SUM(stage='290') As sum8, SUM(stage='291') As sum9, SUM(stage='292') As sum10, SUM(stage='293') As sum11, SUM(stage='294') As sum12, SUM(stage='295') As sum13, COUNT(DISTINCT cand_id) As count2,synonym.parentname As compa, a1.parentname As loca FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id LEFT JOIN companies_grade ON pof.grade=companies_grade.gid LEFT JOIN (SELECT * FROM events_tt WHERE is_alloc='1' GROUP BY pof_id) As was ON pof.pof_id=was.pof_id LEFT JOIN allocation ON was.alloc_id=allocation.id LEFT JOIN (SELECT date As cvsenton,pofid FROM pof_candidates ORDER BY date DESC LIMIT 1,1) As lastcv ON pof.pof_id=lastcv.pofid WHERE pof.is_allocated='1' AND pof.not_pursue='0' AND pof.closure='1' GROUP BY pof.pof_id ORDER BY pof.pof_id DESC LIMIT \" .$limit . \",20 \";\n\t $Q = $this->db->query($sql);\n\tif($Q->num_rows() > 0){\n\tforeach($Q->result() as $row)\n\t{\n\t $data[] = $row;\n\t}\n\t}\n\t $Q->free_result(); \n\t return $data; \n }", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function blooddonors(){\n $blooddonors_table = TableRegistry::get('Blooddonors');\n $blooddonors = $blooddonors_table->find()->order(['last_donation_timestamp'=>'DESC']);\n $this->set('blooddonors', $blooddonors);\n $this->viewBuilder()->setLayout('backend');\n }", "public function fetchCampaign() {\n return $this->QueryAPI(\"current_user/campaigns?include=rewards,creator,goals\");\n }", "function getRecent($limit) {\n $PDO = &DB::$PDO;\n static $recent;\n if (!$recent) {\n $mem = new cache;\n $mem->key = 'Recent';\n if (!$data = $mem->get()) {\n $rec = $PDO->query('SELECT u.username, u.country, a.time, a.size, c.name, c.id, a.passed, a.executed, c.active \n FROM attempts a, users u, challenges c \n WHERE a.user_id = u.id AND c.id=a.challenge_id AND active=\\'1\\'\n ORDER BY a.id DESC LIMIT 100');\n \n while (list($username,$country,$time,$size,$challenge_name,$challenge_id,$passed,$executed,$active)=$rec->fetch()) {\n if ($executed == 0) {\n $passed = 'pending';\n }\n else {\n $passed = $passed ? 'valid' : 'invalid';\n }\n $list[] = array('username' => $username,\n 'country' => $country,\n 'challenge_name' => $challenge_name,\n 'challenge_id' => $challenge_id,\n 'result' => $passed,\n 'time' => $time,\n 'size' => $size,\n 'challenge_active' => $active);\n \n }\n $mem->set(0,$list,MEMCACHE_COMPRESSED,1800);\n } else {\n $list = $data;\n $recent = $list;\n }\n } else {\n $list = $recent;\n }\n $list = array_slice($list,0,$limit,true);\n return $list;\n}", "public function getCompanyWithUsers();", "public function getDonations() {\r\n $rights = MOD_right::get();\r\n if ($rights->hasRight('Treasurer')) {\r\n $limitClause = \"\";\r\n } else {\r\n $limitClause = \"LIMIT 25\";\r\n }\r\n $query = \"\r\n SELECT\r\n *\r\n FROM\r\n donations\r\n ORDER BY\r\n created DESC\r\n $limitClause\r\n \";\r\n $result = $this->dao->query($query);\r\n $donations = array();\r\n while ($row = $result->fetch(PDB::FETCH_OBJ)) {\r\n if ($row->IdCountry == 0) {\r\n $countryName = \"Unknown country\";\r\n } else {\r\n $idCountry = intval($row->IdCountry);\r\n $resultcountry = $this->dao->query(\"\r\n SELECT\r\n name\r\n FROM\r\n geonames_cache\r\n WHERE\r\n geonameId = $idCountry\r\n \");\r\n $country = $resultcountry->fetch(PDB::FETCH_OBJ);\r\n $countryName = $country->name;\r\n }\r\n $row->CountryName = $countryName;\r\n array_push($donations, $row);\r\n }\r\n return $donations;\r\n }", "public function getExpiringMembers() {\n\t\t$date = new DateTime();\n\t\t$end = $date->setTimestamp(strtotime('+30 days'));\n\n\t\treturn Member::get()->filter(array(\n\t\t\t'MembershipStatus' => 'Verified',\n\t\t\t'ExpiryDate:LessThan' => $end->format('Y-m-d H:i:s'),\n\t\t\t'Notified' => 0\n\t\t));\n\t}", "function getMyAffiliates($uID = null)\n\t\t{\n\t\t\t$query = \"select affiliate_id,associated_aff_id,status from tbl_affiliate_association where affiliate_id = $uID || associated_aff_id=$uID \";\n\t\t\t$rs = $this->Execute($query);\n\t\t\t\n\t\t\t$arrAffiliates = array();\n\t\t\tif($rs->RecordCount()) {\t\t\t\n\t\t\t\twhile($row = $rs->FetchRow())\n\t\t\t\t{\n\t\t\t\t\tif($row['associated_aff_id']!=$uID)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($row['status']=='confirmed')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arrAffiliates[] \t= $row['associated_aff_id'];\n\t\t\t\t\t\t\t$arrStatus[] \t= $row['status'];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$arrAffiliates[] \t= $row['affiliate_id'];\n\t\t\t\t\t\t$arrStatus[] \t= $row['status'];\t\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t$arrAffiliates=array_combine($arrAffiliates,$arrStatus);\n\t\t\t\t\t\n\t\t\t$myAffiliates = array();\n\t\n\t\t\tif(count($arrAffiliates) > 0) {\n\t\t\t\t\n\t\t\t\tforeach($arrAffiliates as $affID=>$affStatus) {\n\t\t\t\t\t\n\t\t\t\t\t$query = \"select first_name, last_name , reg_date , banner, description, donation_url,organisation_name \n\t\t\t\t\tfrom tbl_member , tbl_affiliate where member_id = '$affID' and affiliate_id = '$affID'\";\n\t\t\t\t\t$rs = $this->Execute($query);\n\t\t\t\t\t\n\t\t\t\t\t$myAffiliate = array();\t\n\t\t\t\t\t\n\t\t\t\t\twhile($row = $rs->FetchRow()) {\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$row['member_id'] \t \t\t=\t$affID;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$row['name'] \t\t\t\t=\t$row['first_name'].\" \".$row['last_name'];\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$myAffiliate['reg_date'] \t\t\t=\t$row['reg_date'];\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myAffiliate['banner'] \t\t\t\t=\t$row['banner'];\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$myAffiliate['organisation_name'] \t=\t$row['organisation_name'];\t\t\n\t\t\t\t\t\t\t$myAffiliate['donation_url'] \t\t= \t$row['donation_url'];\t\n\t\t\t\t\t\t\t$myAffiliate['description'] \t\t=\t$row['description'];\t\t\n\t\t\t\t\t\t\techo \"<pre>----\";\n\t\t\t\t\t\t\tprint_r($row);\n\t\t\t\t\t\t*/\t\t\t\t\t\t\n\t\t\t\t\t\t$row['status']\t=\t$affStatus;\n\t\t\t\t\t\t$myAffiliates[] = $row;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $myAffiliates;\n\t\t}", "public function getAllFollowers($id,$number=20)\n {\n $follwers = Followers::where('user_id',$id)->select('follower_id')->get();\n $userId = [];\n foreach ($follwers as $follwer)\n $userId[] = $follwer->follower_id;\n return User::whereIn('id',$userId)->paginate($number);\n\n }", "public function getLast2Opinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n ORDER BY o.pubDate LIMIT 2;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "function get_all_bookings_back_limit_admin($perpage = null, $page = null, $orderby = null)\n {\n $offset = null;\n if ($page != null) {\n $offset = ($page == 1) ? 0 : ($page * $perpage) - $perpage;\n }\n\n $this->db->select('pt_bookings.booking_user,pt_bookings.booking_cancellation_request,pt_bookings.booking_id,pt_bookings.booking_type,pt_bookings.booking_expiry,pt_bookings.booking_ref_no,\n pt_bookings.booking_status,pt_bookings.booking_item,pt_bookings.booking_item_title,\n booking_total,pt_bookings.booking_deposit,pt_bookings.booking_date,pt_accounts.ai_first_name,pt_accounts.ai_last_name,pt_accounts.accounts_email');\n $this->db->join('pt_accounts', 'pt_bookings.booking_user = pt_accounts.accounts_id', 'left');\n $this->db->order_by('pt_bookings.booking_id', 'desc');\n $query = $this->db->get('pt_bookings', $perpage, $offset);\n $data['all'] = $query->result();\n // $data['nums'] = $query->num_rows();\n return $data;\n }", "public function cardList()\n {\n // $pageIndex = 0;\n // $pageSize = 20;\n $pageIndex = I('get.pageIndex');\n $pageSize = I('get.pageSize');\n $where = I('get.where');\n $orderBy = I('get.orderBy');\n\n $where = htmlspecialchars_decode($where);\n\n $data = array(\n \"userAccount\" => self::USERACCOUNT,\n \"pageIndex\" => $pageIndex,\n \"pageSize\" => $pageSize,\n \"where\" => $where,\n \"orderBy\" => $orderBy,\n );\n $response_data = $this->client->CallHttpPost(\"Get_MembersPagedV2\", $data);\n $this->ajaxReturn($response_data);\n }" ]
[ "0.56200135", "0.5617521", "0.5444341", "0.5423977", "0.5405237", "0.5385923", "0.5324675", "0.5312633", "0.5310244", "0.5306531", "0.52872974", "0.5187799", "0.51819146", "0.5179681", "0.51522", "0.5122256", "0.51160336", "0.50941294", "0.5080814", "0.5049103", "0.50185037", "0.5013616", "0.5005321", "0.50033176", "0.49807596", "0.49750867", "0.4965134", "0.4880672", "0.48764583", "0.48718214", "0.48550296", "0.48515612", "0.48513472", "0.48346263", "0.48243082", "0.48230195", "0.48113337", "0.4803349", "0.4797418", "0.47897047", "0.47753474", "0.47747016", "0.47693986", "0.47693723", "0.47562507", "0.4755794", "0.4752843", "0.4746068", "0.47444594", "0.47389615", "0.47292548", "0.4724412", "0.47170594", "0.4714402", "0.4705639", "0.46975416", "0.4690132", "0.46886852", "0.46857363", "0.4676403", "0.46735746", "0.46718764", "0.46678293", "0.4666555", "0.46654373", "0.46576875", "0.46540323", "0.46466416", "0.464188", "0.46352604", "0.46351618", "0.4634", "0.46318325", "0.46310925", "0.46284664", "0.46283978", "0.46233484", "0.46209416", "0.46207735", "0.46138698", "0.46134838", "0.46134838", "0.46134716", "0.46134168", "0.46118137", "0.46074855", "0.46054712", "0.46049824", "0.46045047", "0.45932984", "0.45847824", "0.45778966", "0.45716232", "0.4570865", "0.45708382", "0.4570611", "0.45699447", "0.45696467", "0.45685047", "0.45683634" ]
0.4872455
29
Grab all the users
public function index() { $users = User::All(); $iduser = Auth::id(); // Show the page return View('admin.users.index', compact('users', 'iduser')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function allUsers()\n {\n // $sql = 'SELECT * FROM '.$db_name;\n return $this->queryAll();\n }", "function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}", "function getUsers(){\n }", "function getUsers(){\n }", "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "private function getUserBatch() {\n\t\t// Include also hidden (disabled) users to the export\n\t\t$hidden_status = access_get_show_hidden_status();\n\t\taccess_show_hidden_entities(true);\n\n\t\t// Ignore access settings to get all users\n\t\telgg_set_ignore_access(true);\n\n\t\t$users = elgg_get_entities(array(\n\t\t\t'type' => 'user',\n\t\t\t'limit' => $this->limit,\n\t\t\t'offset' => $this->offset,\n\t\t));\n\n\t\t// Set access level to normal\n\t\telgg_set_ignore_access(false);\n\n\t\t// Set hidden status to normal\n\t\taccess_show_hidden_entities($hidden_status);\n\n\t\treturn $users;\n\t}", "public function getAllUser(){\n return $this->users;\n }", "public function getAllUsers()\n\t{\n\t\t$users = $this->fetchAll();\n\t\t\n\t\treturn $users;\n\t}", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }", "function d4os_io_db_070_os_user_load_all() {\n $users = array();\n d4os_io_db_070_set_active('os_robust');\n $result = db_query(\"SELECT *, ua.FirstName AS username, ua.LastName AS lastname, ua.PrincipalID AS UUID, ua.Email AS email, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\");\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $users;\n}", "function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}", "public function getUsers()\n {\n $stmt = $this->DB->prepare(\"select user, hash from users\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }", "public function getAllUsers()\n {\n $result = self::$dbInterface -> query(\"SELECT userID, userName, email FROM user\");\n return $result;\n }", "public function getAllUser(){\n $users = $this->bdd->query('SELECT * FROM users');\n $users->execute();\n\t\treturn $users->fetchALL(\\PDO::FETCH_ASSOC);\n }", "public function GetAllUsers()\n {\n $data = $this->db()->run(\"SELECT * FROM users\")->fetchall(PDO::FETCH_ASSOC);\n return $data;\n }", "public function retrieveAllUsers () {\n return $this->usersDB;\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "function get_users()\n {\n //Unimplemented\n }", "public function getAllUsers()\n {\n $sql = \"SELECT `user_id`, `user_fname`, `user_lname`, `user_password_hash`, `user_email`, `user_role` FROM users\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function allUser(){\n\n\t\t\t$data=$this->all('oops');\n\t\t\treturn $data;\n\t\t}", "protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}", "function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }", "public static function getUsers(){\n return self::find()->all();\n }", "public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}", "public function findUsers();", "public function findUsers();", "function getUsers(){\n $this->users = array();\n foreach($this->userIds as $userId){\n array_push($this->users, new user($userId));\n }\n }", "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }", "private function get_all() {\n $result = $this->dbh->query($this->query_array['get_all'], array())->fetchAll();\n $users = [];\n foreach ($result as $row) {\n $user = new User($row['id'], $row['username']);\n $users[] = $user->to_array();\n }\n return $users;\n }", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }", "public static function allUser()\n {\n $self = new self();\n\n $sql = \"SELECT * FROM user\";\n\n $result = $self->db->query($sql);\n\n $result = $result->fetchAll();\n\n return $result;\n }", "Public Function getAllUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }", "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "public function getAll(){\n $users = UserResource::collection($this->userRepo->getAll());\n return $users;\n }", "public function findUsers(): iterable;", "public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}", "public function getUsers()\n {\n return Security::getUserList();\n }", "public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "protected function GetAllUsers()\r\n {\r\n $sql = \"SELECT * FROM `users`\";\r\n $result = $this->connect()->query($sql);\r\n $rows = $result->num_rows;\r\n\r\n if ($rows > 0) {\r\n while ($row = $result->fetch_assoc()) {\r\n $data[] = $row;\r\n }\r\n\r\n return $data;\r\n } else {\r\n echo \"No results found!\";\r\n }\r\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "function extract_all_users() {\n\t\t$db = connect_to_db();\n\n\t\t$select_statement = \n\t\t\t\"select users.id, users.username from users\";\n\t\t;\n\n\t\t$stmt = $db->prepare($select_statement);\n\n\t\tif ( !($stmt->execute()) ) {\n\t\t\techo \"Error: Could not get users.\";\n\t\t\t$db->close();\n\t\t\texit;\n\t\t}\n\n\t\t$json = \"[\";\n\n\t\t$stmt->bind_result($id, $username);\n\n\t\twhile ( $stmt->fetch() ) {\n\t\t\t$info = array('id' => $id, 'username' => $username);\n\t\t\t$json = $json . json_encode($info) . \",\";\n\t\t}\n\n\t\techo substr_replace($json, \"]\", -1);\n\n\t\t$db->close();\n\t}", "public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }", "function getAllUsers() \n\t{\n\t\t$stmt = $this->con->prepare(\"SELECT id, username FROM users\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $username);\n\t\t$users = array();\n\t\twhile ($stmt->fetch()) {\n\t\t\t$temp = array();\n\t\t\t$temp[\"id\"] = $id;\n\t\t\t$temp[\"username\"] = $username;\n\t\t\tarray_push($users, $temp);\n\t\t\t\n\t\t}\n\t\treturn $users;\n\t}", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "public function all(){\n\t\t$sql = \"select * from users\";\n\t\t$stmt= $this->connect->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(PDO::FETCH_CLASS, 'User');\n\t\treturn $result;\n\t}", "public function getAllUsers() {\n\n $users = $this->repoProvider->Users()->findAll();\n return MapperHelper::getMapper()->getDTOs($users); // tomorrow first priority. \n }", "public function getUsersList()\n {\n }", "public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }", "public function all_user()\n {\n $this->res->SetObject(RCD::SC, RCD::SC, FALSE, $this->db->get('user')->result());\n }", "public function recoverAllUsers() {\n\t\t$req = \"SELECT * FROM users ORDER BY id_user\";\n\t\t$response = $this->getDb()->fetchAll($req);\n\t\t\n\t\t//Convert Query response to an array of domain objects\n\t\t$users = array();\n\t\tforeach ($response as $row) {\n\t\t\t$userId = $row['id_user'];\n\t\t\t$users[$userId] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $users;\n\t}", "public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }", "public function getAllUsers() {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "public static function getAllUser()\n\t{\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}", "public function getAll()\n\t{\n\t\t$query = \"\n\t\tSELECT * FROM `user`\n\t\t\";\n\n\t\t$handle = $this->db->query($query);\n\t\t$result = $handle->fetchAll(Database::FETCH_ASSOC);\n\n\t\t$users = array();\n\n\t\tfor ($i = 0; $i < count($result); $i++) {\n\t\t\t$res = $result[$i];\n\t\t\t$user = new User($res['id'], $res['name']);\n\t\t\t$users[] = $user;\n\t\t}\n\n\t\treturn $users;\n\t}", "public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function getAllUsers(){\n $stmt = $this->databaseConnection->prepare(\"SELECT users.login, users.phone, users.invite, cities.city_name, invites.date_status_\n FROM users\n LEFT JOIN cities ON users.id_city = cities.id_city\n LEFT JOIN invites ON users.invite = invites.invite\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "function all_users()\r\n\t{\r\n\t\t//$this->mongo_db->select('*');\r\n\t\t//$this->mongo_db->from('users');\r\n\t\t// \r\n\t\t//$query = $this->mongo_db->get();\r\n\t\t//return $query->result_array();\r\n\t\t\r\n\t\t//connect to mongodb collection (i.e., table) named as ‘surfinme_index’\r\n\t\t$collection \t= $this->mongo_db->db->selectCollection('settings');\r\n \t//selecting records from the collection - surfinme_index\r\n \t$result\t\t= $collection->find();\r\n\t\tforeach($result as $data) \r\n\t\t{ \r\n\t\t\t//display the records \r\n\t\t\tvar_dump($data);\r\n\t\t} \r\n\t\t\r\n\t}", "public function users()\n {\n $sql = \"SELECT *\n FROM user\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function d4os_io_db_070_os_user_get_all_uid() {\n $list = array();\n $result = db_query(\"SELECT * FROM {d4os_ui_users}\");\n while ($user = db_fetch_object($result)) {\n $list[] = $user;\n }\n return $list;\n}", "public function get_all_users() {\n $query = $this->db->get('users');\n if($users->num_rows() == 0) {\n return false;\n }\n $results = $query->result_array();\n $users = array();\n foreach($results as $row){\n $users[] = User::from_row_array($row);\n }\n return $users;\n }", "public static function all() {\n $result = mysqli_query( Connection::getConnection(), \"Select * from users\" );\n $nRows= mysqli_num_rows($result);\n $users=[];\n for($i=0; $i < $nRows; $i++) {\n $user = mysqli_fetch_assoc($result);\n $users[$i] = new User(\n $user['id'],\n $user['name'],\n $user['email'],\n $user['type'],\n $user['patchImage']);\n }\n return $users;\n }", "public function getAll()\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * FROM users\";\n\n try\n {\n $this->query = $this->handler->query($this->sql);\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }", "public function get_users() {\n\n\t\t\t$query = $this->db->prepare(\"SELECT * FROM `users` ORDER BY `user_id`\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\t$query->execute();\n\t\t\t}catch(PDOException $e){\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\n\t\t\treturn $query->fetchAll();\n\n\t\t}", "public function user_getAll(){\n\n if( $stmt = $this->connection->prepare(\"SELECT user_id, email, name, level, phone FROM users ORDER BY name ASC\") ){\n $stmt->execute();\n $stmt->bind_result($user_id, $email, $name, $level, $phone);\n \n $results = array();\n while( $stmt->fetch() ){\n $User = new User($user_id, $email, $name, $level, $phone);\n $results[] = $User;\n } \n \n $stmt->close();\n return $results;\n }\n return null;\n \n }", "function get_all_users()\n{\n\t$db = open_database_connection();\n\t$stmt = $db->prepare(\"SELECT userID, name as title, name, roleID FROM user ORDER BY roleID\");\n\t$stmt->execute();\n\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t$users = array();\n\tforeach ($rows as $row) {\n\t\t$users[] = $row;\n\t}\n close_database_connection($db);\n return $users;\n}", "function getUsers() {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select users_username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}", "public function getAllUsers(): array\n {\n return $this->users;\n }", "public function getUsers() {\n $userDAO = new UserDAO();\n return $userDAO->retrieveUsers();\n }", "public function selectAll(){\r\n $query = 'SELECT * FROM user_tbl';\r\n $stmt = $this->_db->prepare($query);\r\n $stmt->execute();\r\n $users = $stmt->fetchAll(PDO::FETCH_OBJ);\r\n foreach ($users as $user){\r\n echo $user->username.\"<br>\";\r\n }\r\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public static function all()\n {\n self::dbConnect();\n $statement = self::$dbc->prepare('SELECT * FROM users');\n $statement->execute();\n $results = $statement->fetchAll();\n $users = [];\n foreach ($results as $row) {\n $users[] = new User($row);\n }\n return $users;\n }", "function load_users()\n {\n $query = $this->db->query('SELECT `id`,`login_id`,`user_name`,`org`,`hash` FROM `user`');\n $uarray = array();\n foreach ( $query->result_array() as $user )\n {\n \t$uarray[$user['id']] = $user;\n }\n\n return $uarray;\n }", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "function getUsers() {\n\t\t$users = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/users.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $users;\n\t}", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "function getUsers() {\n\t$connection = dbConnect();\n\t$sql = \"SELECT * FROM `users`\";\n\t$statement = $connection->query( $sql );\n\n\treturn $statement->fetchAll();\n}", "function getAllUsers(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$query = $db->query('SELECT * FROM user');\n\t\t\t$json = '{';\n\t\t\t\n\n\t\t\tif ($query->rowCount() > 0) {\n\t\t\t\t$json = $json . ' \"Users\" : [';\n\n\t\t\t\tforeach($query as $row) {\n\t\t\t\t\t$user = new user($row['Id'], null, null, 0, 0, null);\n\t\t\t\t\t\n\t\t\t\t\t$json = $json . $user->getUser() . \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$json = rtrim($json, ',');\n\t\t\t\t$json = $json . \" ] }\";\n\t\t\t\t\n\n\t\t\t\treturn $json;\n\t\t\t} else {\n\t\t\t return $json . ' \"Message\" : \"No users found\" }';\n\t\t\t}\n\t\t}", "public function all()\n {\n return $this->newQuery('getUsers', ['type' => 'AllUsers']);\n }", "public function selectAllUsers()\r\n\t{\r\n\t\t\r\n\t\t$userIds = array();\r\n\t\t//select user IDs for all users\r\n\t\t//array_push user IDs in a while loop\r\n\t\t//return $userIds;\r\n\t}", "static function getUsers()\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->query('SELECT login, email FROM users');\n\n\t\treturn $request;\n\t}", "public function selectAllUsers(){\r\n $userList = new UsersList();\r\n return $userList->selectAllUsers();\r\n }", "public function getAllUsers(): array\n {\n return $this->em->getRepository('AppBundle:User')->findAll();\n }", "public function getAllUser()\n {\n $this->stmt = $this->db->prepare('SELECT * FROM user');\n $this->stmt->execute();\n $data = $this->stmt->get_result();\n $rows = $data->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }", "function getUsers()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`customers`\";\n\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $users = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $user = new UserEntity();\n $user->setIdUser($data->idUser);\n $user->setNom_societe($data->Nom_societe);\n $user->setAbreviations($data->Abreviations);\n $user->setAdresse($data->Adresse);\n $user->setTel($data->Tel);\n $user->setEmail($data->Email);\n $user->setSecteur($data->Secteur);\n $user->setCreatedAt($data->createdat);\n\n $users[] = $user;\n }\n\n if ($users) {\n return $users;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }", "public function getList() {\n //Retourne la liste de tous les users\n $users = [];\n $requsers = $this->db->query('SELECT * FROM user');\n\n while ($data = $requsers->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new user($data);\n }\n\n return $users;\n }" ]
[ "0.82159644", "0.81963795", "0.81963795", "0.81963795", "0.819341", "0.80237275", "0.7971727", "0.79622465", "0.79622465", "0.7955282", "0.7949617", "0.79246294", "0.78911173", "0.78825337", "0.7880041", "0.78759897", "0.7863552", "0.7853774", "0.78480643", "0.7844588", "0.78073853", "0.78013563", "0.77842957", "0.778308", "0.77821076", "0.7781526", "0.7779912", "0.7775711", "0.7769355", "0.77686864", "0.7767436", "0.7763922", "0.7758631", "0.7758631", "0.77535915", "0.7741202", "0.7736928", "0.77367115", "0.77325386", "0.77299", "0.7728319", "0.7715493", "0.771388", "0.7713063", "0.7709861", "0.77045035", "0.7703982", "0.769873", "0.7676258", "0.7667841", "0.76566017", "0.76456296", "0.7640309", "0.76374626", "0.76334983", "0.7619871", "0.761541", "0.76115453", "0.76079255", "0.76066107", "0.7601857", "0.7599677", "0.7591921", "0.759081", "0.75837183", "0.7579214", "0.7578463", "0.75762963", "0.7560436", "0.7541159", "0.75387114", "0.75359243", "0.75220025", "0.75173944", "0.7513266", "0.7512261", "0.7505841", "0.7501465", "0.750068", "0.7497794", "0.7496102", "0.74946487", "0.74925494", "0.7484525", "0.74833304", "0.7482149", "0.7479065", "0.7476854", "0.7474617", "0.7472923", "0.7463579", "0.74569684", "0.7454863", "0.74545676", "0.74531263", "0.74523276", "0.7449647", "0.7441203", "0.7433225", "0.74313265", "0.7426696" ]
0.0
-1
Returns the Ip Locker form
public function __construct($name) { parent::__construct($name); $this->add(array( 'name' => 'ip', 'type' => 'Text', 'attributes' => array( 'class' => 'input large', 'id' => 'ip' ) )); $this->add(array( 'type' => 'Zend\Form\Element\Textarea', 'name' => 'description', 'attributes' => array( 'class' => 'styled_textarea', 'rows' => '7', 'cols' => '40' ) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ObtenerIp()\n { \n\n return str_replace(\".\",\"\",$this->getIP()); //Funcion que quita los puntos de la IP\n\n }", "public function getIpAdress(){\n return $this->auth['ip_adress'];\n }", "public function getIpLockIsDisabled() {}", "private function ip_lock($token, $ip = null)\n\t\t{\n\t\t\tif ($ip === null)\n\t\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t\treturn sha1($token. $ip);\n\t\t}", "public function checkLockToIP() {}", "protected function getKey()\n {\n\treturn 'ip:' . $this->ip;\n }", "protected function fetchIp()\n {\n $ip = $this->request->server('REMOTE_ADDR');\n return implode('.', array_slice(explode('.', $ip), 0, 4 -1));\n }", "public function returnClientIP(){\n\n return self::$oCRNRSTN_ENV->oCRNRSTN_IPSECURITY_MGR->clientIpAddress();\n\n }", "public function getIp(): string\n {\n return $this->ip;\n }", "public function getIp(): string\n {\n return $this->ip;\n }", "public function walletlock(){\n return $this->bitcoin->walletlock();\n }", "public function getIp() {\n\t\treturn $_SERVER['REMOTE_ADDR'];\t\n\t}", "static function getIpLong()\n {\n return ip2long(self::getIp());\n }", "protected function ipLockClause() {}", "public function getIp()\n {\n return $this->_getIp();\n }", "public function getIp() : string {\n return $this->ip;\n }", "public static function ip_info()\r\n {\r\n\r\n $a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.self::get_client_ip()));\r\n \r\n $a = Input::filter_text($a);\r\n \r\n return $a;\r\n \r\n }", "public static function get_unsafe_client_ip()\n {\n }", "public function getLockHash() {}", "protected function _ip()\n {\n $element = new Zend_Form_Element_Text('ip');\n $element->setLabel('Login ip')\n ->addValidator(new Zend_Validate_Ip());\n\n return $element;\n }", "public function __toString()\n {\n return long2ip($this->ip);\n }", "public function getIpAddress() {\n return [\n '#markup' => $this->t('Your Ip address is: @ipaddress', array('@ipaddress' => $this->personalizationIpService->getIpAddress()))\n ];\n }", "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t \n\t // los proxys van añadiendo al final de esta cabecera\n\t // las direcciones ip que van \"ocultando\". Para localizar la ip real\n\t // del usuario se comienza a mirar por el principio hasta encontrar\n\t // una dirección ip que no sea del rango privado. En caso de no\n\t // encontrarse ninguna se toma como valor el REMOTE_ADDR\n\t \n\t $entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t \n\t reset($entries);\n\t while (list(, $entry) = each($entries))\n\t {\n\t $entry = trim($entry);\n\t if ( preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\", $entry, $ip_list) )\n\t {\n\t // http://www.faqs.org/rfcs/rfc1918.html\n\t $private_ip = array(\n\t '/^0\\./',\n\t '/^127\\.0\\.0\\.1/',\n\t '/^192\\.168\\..*/',\n\t '/^172\\.((1[6-9])|(2[0-9])|(3[0-1]))\\..*/',\n\t '/^10\\..*/');\n\t \n\t $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);\n\t \n\t if ($client_ip != $found_ip)\n\t {\n\t $client_ip = $found_ip;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t }\n\t \n\t return $client_ip;\n\t \n\t}", "private static function resolveClientIp(): string{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function getDeviceIP();", "public function getIp()\n {\n return $this->get(self::IP);\n }", "public function getIp()\n {\n return $this->get(self::IP);\n }", "public function getIp()\r\n\t{\r\n\t\tif($this->getQuality() != FALSE OR $this->getSks() != FALSE)\r\n\t\t{\r\n\t\t\t$ipk = $this->getQuality() / $this->getSks();\r\n\r\n\t\t\t$pembulatan = round($ipk, ceil($ipk));\r\n\t\t} else {\r\n\t\t\t$pembulatan = 0.0000;\r\n\t\t}\r\n\r\n\t\treturn substr($pembulatan, 0, 5);\r\n\t}", "public function getIP(): string {\n return $this->context->ip;\n }", "public function getIp(): string\n {\n return $this->getServer(self::REMOTE_ADDR);\n }", "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "static function getIp()\n {\n if (!isset(self::$_data[self::KEY_IP]))\n {\n $_ipAddress = $_SERVER[\"REMOTE_ADDR\"];\n if (isset($_REQUEST[\"ip\"]) && strlen($_REQUEST[\"ip\"]) > 0)\n {\n $_ipAddress = $_REQUEST[\"ip\"];\n }\n elseif (isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"]) && strlen($_SERVER[\"HTTP_X_FORWARDED_FOR\"]) > 0)\n {\n $_ipAddress = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n }\n self::setIp($_ipAddress);\n }\n\n return self::$_data[self::KEY_IP];\n }", "public function ip()\n\t{\n\t\treturn $this->Players->ip($this->SqueezePlyrID);\n\t}", "public function ip_v4 () {\n\t\t\treturn $this->ip_v4_address();\n\t\t}", "public function getIp()\n {\n return $this->_ip;\n }", "public function getIp()\n {\n $value = $this->get(self::ip);\n return $value === null ? (string)$value : $value;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function getIp()\n {\n return $this->ip;\n }", "public function ip()\n {\n return $this->ip;\n }", "protected function buscarIp()\n {\n $ip = '';\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED'];\n } elseif (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_FORWARDED'])) {\n $ip = $_SERVER['HTTP_FORWARDED'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n $ip = 'DESCONHECIDO';\n }\n\n return $ip;\n }", "public function getGrantedIp()\n {\n return $this->__get(\"granted_ip\");\n }", "private function getRequestIP() {\n\t\t$requestIP = t3lib_div::getIndpEnv('REMOTE_ADDR');\n\t\treturn $requestIP;\n\t}", "protected function ip_address()\n\t{\n\t\t//return $this->ip2int(ipaddress::get());\n\t\t//return $this->ip2int(server('REMOTE_ADDR'));\n\t\treturn server('REMOTE_ADDR');\n\t}", "public function getIPAddress(): string;", "public function hash_cliente(){\n return md5($_SERVER['REMOTE_ADDR'].gethostbyaddr($_SERVER['REMOTE_ADDR']).$_SERVER['HTTP_USER_AGENT']);\n }", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "public function getIp() {\n return $this->ip;\n }", "protected function ipAddress(): string\n {\n return $this->container->make('request')->ip();\n }", "public function getIP(): string\n {\n return (string)$this->env['REMOTE_ADDR'];\n }", "function cjpopups_current_ip_address(){\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "public function ip_v4_address () {\n\t\t\treturn sprintf(\n\t\t\t\t'%d.%d.%d.%d',\n\t\t\t\tmt_rand(2,255),\n\t\t\t\tmt_rand(2,255),\n\t\t\t\tmt_rand(2,255),\n\t\t\t\tmt_rand(2,255)\n\t\t\t);\n\t\t}", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "public static function get_ip()\n\t{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function getMask()\n {\n return self::prefix_to_mask($this->prefix, $this->version);\n }", "function itsec_rcp_get_ip() {\n\treturn ITSEC_Lib::get_ip();\n}", "function getIp(){\n\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\tif(!empty($_SERVER['HTTP_CLIENT_IP'])){\n\t\t\t$ip= $_SERVER['HTPP_CLIENT_IP'];\n\t\t}elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t\treturn $ip;\n}", "public function get_client_ip2() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n }", "function bps_get_server_ip_address_sysinfo() {\n\n\tif ( is_admin() && wp_script_is( 'bps-accordion', $list = 'queue' ) && current_user_can('manage_options') ) {\n\t\tif ( isset( $_SERVER['SERVER_ADDR'] ) ) {\n\t\t\t$ip = esc_html($_SERVER['SERVER_ADDR']);\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\n\t\t} elseif ( isset( $_SERVER['HTTP_HOST'] ) ) {\n\t\t\t$ip = esc_html( gethostbyname( $_SERVER['HTTP_HOST'] ) );\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\t\t\n\t\t} else { \n\t\t\t$ip = @dns_get_record( bpsGetDomainRoot(), DNS_ALL );\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip[0]['ip'].'</strong><br>';\t\n\t\t}\n\t}\n}", "static public function getIp() {\n if (isset($_SERVER['REMOTE_ADDR'])) return $_SERVER['REMOTE_ADDR'];\n return '127.0.0.1';\n }", "public function gatewayIpAddr()\n {\n $datas = 'N.A';\n\n if(exec('ip route | awk \\'/a/ { print $3 }\\'',$output))\n $datas = $output[0];\n\n return $datas;\n }", "function getRequestIPAddress()\n{\n $ip = preg_replace('#[^0-9.]#', '', getenv('REMOTE_ADDR'));\n \n return $ip;\n \n \n}", "public function clientIp(){\n return $this->clientIp;\n }", "function ip() {\n return request()->ip();\n }", "protected function resolveIp(): string\n {\n return Request::ip();\n }", "public function getVip()\n {\n return $this->get(self::_VIP);\n }", "public function getVip()\n {\n return $this->get(self::_VIP);\n }", "public static function get_client_ip() {\n\t\t\treturn IBX_WPFomo_Helper::get_client_ip();\n\t\t}", "final protected function ipAddress()\n {\n return $this->container->make('request')->ip();\n }", "public function getCurrentIv(): string;", "function suipcontrol_getmoduleinfo(){\n\t$block3IP = substr($_SERVER['REMOTE_ADDR'],0,strrpos($_SERVER['REMOTE_ADDR'],\".\"));\n\t$info = array(\n\t\t\"name\"=>\"Superuser IP Access Control\",\n\t\t\"version\"=>\"1.0\",\n\t\t\"author\"=>\"Eric Stevens\",\n\t\t\"category\"=>\"Administrative\",\n\t\t\"download\"=>\"core_module\",\n\t\t\"prefs\"=>array(\n\t\t\t\"SuperUser IP Control User Preferences,title\",\n\t\t\tarray(\"IP from which you might sign on. Enter partial IP's for a subnet and separate ranges with commas; semicolons; or spaces. `nFor example; if you wanted to allow aaa.bbb.ccc.1 through aaa.bbb.ccc.255; enter aaa.bbb.ccc. and the entire subnet will match.`n`n You're on %s now; recommend using %s if this is you.`n `bCaution`b: entering bad data here might block you out of most superuser activities!,note\", $_SERVER['REMOTE_ADDR'], $block3IP), //default to XXX.XXX.XXX. for the current user's IP address.\n\t\t\t\"ips\"=>\"IPs|$block3IP\",\n\t\t\t\"tempauthorize\"=>\"Temporary authorization code,viewonly|\",\n\t\t\t\"tempip\"=>\"Temporarily authorized IP|\",\n\t\t\t\"authemail\"=>\"Temp authorization email address,|\",\n\t\t),\n\t);\n\treturn $info;\n}", "function getIp()\n{\n $ip = false;\n\n if(!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_X_FORWARDED_FOR']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['HTTP_VIA']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_VIA']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['REMOTE_ADDR']))\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (($longip = ip2long($ip)) !== false)\n {\n if ($ip == long2ip($longip))\n {\n return $ip;\n }\n }\n \n return false;\n}", "private function getIPPublic ()\n {\n $dbs = new DB ( $this->config['database'] );\n $search = $dbs->query(\"SELECT * FROM tbl_client_connection_priv WHERE\n priv_client_id LIKE '\". $this->c .\"%' order by private_rec_date desc limit 1\");\n\t\t\tif ( count ( $search ) ) {\n\t\t\t\t$this->result['id'] = $this->c;\n\t\t\t\t$this->result['real_ip_address'] = $search[0]['real_client_ip'];\n\t\t\t} else\n\t\t\t\t$this->result['data']['result'] = $this->c . \":No usage history found\";\n\t\t\t\n\t\t\t$dbs->CloseConnection ();\n\t\t\treturn;\n\t\t}", "function network(){\n return (long2ip((ip2long($this->address))\n & (ip2long($this->netmask()))));\n }", "private static function getIp()\n {\n if (empty($_SERVER['REMOTE_ADDR']) && (Spry::isCli() || Spry::isCron() || Spry::isBackgroundProcess())) {\n return '127.0.0.1';\n }\n\n return $_SERVER['REMOTE_ADDR'] ?? 'No IP';\n }", "public function getClientIp(): string {\n $s = $this->server();\n if (array_key_exists('HTTP_CLIENTIP', $s)) {\n if (!empty($s['HTTP_CLIENTIP'])) {\n return $s['HTTP_CLIENTIP'];\n }\n }\n if (array_key_exists('HTTP_X_FORWARDED_FOR', $s) && !empty($s['HTTP_X_FORWARDED_FOR'])) {\n $addresses = explode(',', $s['HTTP_X_FORWARDED_FOR']);\n while (count($addresses)) {\n $ip = @trim(array_shift($addresses));\n if ($ip === '') {\n continue;\n }\n if (!self::isLanIp($ip)) {\n return $ip;\n }\n }\n }\n return $s['REMOTE_ADDR'];\n }", "function erp_get_client_ip() {\n $ipaddress = '';\n\n if ( isset( $_SERVER['HTTP_CLIENT_IP'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );\n } else if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );\n } else if ( isset( $_SERVER['HTTP_X_FORWARDED'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED'] ) );\n } else if ( isset( $_SERVER['HTTP_FORWARDED_FOR'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['HTTP_FORWARDED_FOR'] ) );\n } else if ( isset( $_SERVER['HTTP_FORWARDED'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['HTTP_FORWARDED'] ) );\n } else if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {\n $ipaddress = sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );\n } else {\n $ipaddress = 'UNKNOWN';\n }\n\n return $ipaddress;\n}", "function get_client_ip_2() {\r\n $ipaddress = '';\r\n if (isset($_SERVER['HTTP_CLIENT_IP']))\r\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\r\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\r\n else if(isset($_SERVER['REMOTE_ADDR']))\r\n $ipaddress = $_SERVER['REMOTE_ADDR'];\r\n else\r\n $ipaddress = 'IP tidak dikenali';\r\n return $ipaddress;\r\n}", "function get_ip_address()\n{\n $ip = $_SERVER['REMOTE_ADDR'];\n return $_SERVER['REMOTE_ADDR'];\n //return var_export(unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip)));\n}", "public function getInternalIp()\n {\n return $this->internal_ip;\n }", "function get_client_ip() {\n\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n return $ipaddress;\n}", "public function getOldAddress(): string\n {\n return $this->old_address;\n }", "function ip_address()\n{\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "public function getGivenIp()\n\t{\n\t\treturn $this->given_ip;\n\t}", "public function GetIp()\n {\t\n\t$q = Doctrine_Query::create()\n\t\t\t\t\t\t->select('*')\n\t\t\t\t\t\t->from('Users')\n\t\t\t\t\t\t->where('id = ?',$this->getUser()->getId());\n\t$result =$q->FetchOne();\n\treturn $result->getUserIp();\n }", "public function getClientNoncePad(): string;", "public function ip()\n {\n return $this->rule('ip');\n }", "function getClientIP() {\r\n $ip = '';\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } else {\r\n $ip = '0.0.0.0';\r\n }\r\n return ($ip);\r\n }", "public function getIpClient() {\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n else {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n }\r\n return $ip;\r\n }", "public function get_pin(): string\n {\n // $res is a string;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::PIN_INVALID;\n }\n }\n $res = $this->_pin;\n return $res;\n }", "private function getUserIP()\n {\n $iph = $this->app->make('helper/validation/ip');\n $ip = $iph->getRequestIP();\n\n return $ip->getIP(IPAddress::FORMAT_IP_STRING);\n }", "private function generateFormkey()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n // mt_rand() is better than rand()\n $uniqid = uniqid(mt_rand(), true);\n\n return md5($ip . $uniqid);\n }", "public function getIpAddress()\n {\n return $this->getRequest()->ip;\n }", "public function getRemoteIp();", "function getUserIP() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$ipaddress = '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\n\t\t\t\t\t\t\t\t \t $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\t\t\t\t\t\t\t else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t\t\t\t\t\t \t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t\t\t\t\t\t else if(isset($_SERVER['HTTP_X_FORWARDED']))\n\t\t\t\t\t\t\t\t\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\t\t\t\t\t\t\t else if(isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n\t\t\t\t\t\t\t\t\t $ipaddress = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n\t\t\t\t\t\t\t\t else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\t\t\t\t\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\t\t\t\t\t\t\t else if(isset($_SERVER['HTTP_FORWARDED']))\n\t\t\t\t\t\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\t\t\t\t\t\t\t\telse if(isset($_SERVER['REMOTE_ADDR']))\n\t\t\t\t\t\t\t\t\t $ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $ipaddress = 'UNKNOWN';\n\t\t\t\t\t\t\t\t return $ipaddress;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}" ]
[ "0.60105306", "0.5860311", "0.57311285", "0.5723498", "0.57130504", "0.57081383", "0.5656677", "0.56053233", "0.5602244", "0.5602244", "0.5599226", "0.5583803", "0.55820405", "0.5577483", "0.55456936", "0.5532191", "0.5522312", "0.5497495", "0.54882723", "0.5469468", "0.5444787", "0.5433551", "0.5433046", "0.542724", "0.5415949", "0.54021883", "0.54021883", "0.53985727", "0.5394648", "0.53922397", "0.53898054", "0.53886557", "0.53762215", "0.5370152", "0.53561735", "0.5344368", "0.5344071", "0.5344071", "0.5344071", "0.5344071", "0.5344071", "0.5344071", "0.5344071", "0.53428435", "0.53159577", "0.53148603", "0.52871287", "0.5286764", "0.5282569", "0.52806044", "0.5279986", "0.5279986", "0.5279986", "0.5275287", "0.52690065", "0.5262997", "0.5255412", "0.5237977", "0.523406", "0.52299356", "0.52193314", "0.52157557", "0.5215475", "0.5214055", "0.5208608", "0.52040166", "0.5200748", "0.51846445", "0.5184102", "0.518058", "0.5178836", "0.5168645", "0.5168645", "0.51639414", "0.51474094", "0.5137553", "0.51356936", "0.5134301", "0.51308185", "0.51277477", "0.51216257", "0.5121383", "0.51185066", "0.51138467", "0.5111979", "0.5110303", "0.5106202", "0.5103325", "0.5099552", "0.5098464", "0.5094136", "0.5092626", "0.508697", "0.5079713", "0.507577", "0.5057326", "0.50570095", "0.5054839", "0.50544995", "0.50451326", "0.504431" ]
0.0
-1
Cache for how long.
public function overAPeriodOf(string $time): PersisterInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function howLongToCacheInSeconds(){\n return(120); //two minutes by default\n }", "public function howLongToCacheInSeconds(){\n return(12000); //200 minutes\n }", "public function howLongToCacheInSeconds(){\n return(1200); //twenty minutes by default\n }", "protected function _getCacheLifetime()\n\t{\n\t\treturn Mage::helper('bcp')->getAdvancedConfig('html_page_cache_time');\n\t}", "public function getCacheLifetime(): int;", "private function _getCacheLifeTime() {\n\n $getDefaultCache = $this->_readDefaultCache();\n if (isset($getDefaultCache['frontend']['lifetime']) && !empty($getDefaultCache['frontend']['lifetime']))\n $chacheLifetime = $getDefaultCache['frontend']['lifetime'];\n $chacheLifetime = !empty($chacheLifetime) ? $chacheLifetime : 300;\n return $chacheLifetime;\n }", "function cache() {\n\n if ( func_num_args() == 0 ) {\n return $this->expireTime;\n } elseif ( func_num_args() == 1 ) {\n if ( is_bool(($arg = func_get_arg(0))) ) {\n if ( $arg ) {\n $this->expireTime = 3600;\n } else {\n $this->expireTime = 0;\n }\n } elseif ( is_numeric($arg) ) {\n $this->expireTime = $arg;\n } else {\n return isset($this->cache_expires[$arg])?$this->cache_expires[$arg]:0;\n }\n } elseif ( func_num_args() == 2 ) {\n if ( is_numeric(($arg=func_get_arg(1))) ) {\n $this->cache_expires[func_get_arg(0)] = $arg;\n } elseif ( is_bool($arg) ) {\n if ( $arg ) {\n $this->cache_expires[func_get_arg(0)] = 3600;\n } else {\n $this->cache_expires[func_get_arg(0)] = 0;\n }\n }\n }\n }", "abstract public function cachedTime(string $key): ?int;", "public function cacheLifetime()\n {\n return config('personality-insights.cache_expiration');\n }", "public function getCacheTTL();", "protected function getCacheTime() {\n $time = self::CACHE_TIME;\n\n return $time; \n }", "static public function get_cache_ttl() {\n\t\treturn (int) get_option( 'azure_browse_cache_results', 15 );\n\t}", "protected function calculatePageCacheTimeout() {}", "public function getCachingTime()\n {\n return $this->caching_time;\n }", "public static function get_cache_age()\n {\n return self::$cache_age;\n }", "public function getCacheExp();", "public function cacheFor(): DateTimeInterface|DateInterval|float|int|null;", "protected function getTTL()\n {\n return Cache::getDefaultCacheTime();\n }", "public function cacheFor()\n {\n return now()->addMinutes(2);\n }", "protected function getCacheTime()\n {\n return $this->_cacheTime;\n }", "function wprss_feed_cache_lifetime( $seconds ) {\n return 1; // one second\n }", "protected function google_cache_limit() {\n\t\treturn (int) apply_filters( 'taro_geo_taxonomy_geocode_cache_time', 60 * 60 * 24 * 30 );\n\t}", "public static function getCacheLifetime()\r\n {\r\n return self::$_cacheLifetime;\r\n }", "public function getCacheTime()\n {\n return $this->_cacheTime;\n }", "public function cacheFor()\n {\n // return now()->addMinutes(5);\n }", "public function getCacheLifetime()\n {\n $lifetime = config('geocoder.cache.duration');\n\n return !is_null($this->cacheLifetime) ? $this->cacheLifetime : $lifetime;\n }", "protected function getCacheLifetime(): ?int\n {\n return 86400;\n }", "public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }", "public function getCacheTime($configKey);", "public function cacheFor()\n {\n return now()->addMinutes(1440);\n }", "public function getCacheLifetime() {\n\t\treturn $this->cacheLifetime;\n\t}", "function cache();", "public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }", "public function cacheGet() {\n }", "public function cacheTtl()\n {\n return $this->cacheTtl;\n }", "public function getCacheMaxAge() {\n return 0;\n }", "public function memCached() { return true; }", "function prefix_set_feed_cache_time( $seconds ) {\n return 1;\n}", "public function getCacheLifetime()\n {\n return self::DEFAULT_CACHE_LIFETIME;\n }", "public function getCacheTime()\n\t{\n\t\treturn $this->scopeConfig->getValue(\n\t\t\t$this->getConfigPath(self::SYSTEM_CONFIG_PATH_CACHING),\n\t\t\t\\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n\t\t);\n\t}", "private function ncc_v2_twitter_tweets_cache_to_seconds()\n {\n if ( get_option( NCC_V2_TWITTER_OPTION_GROUP ) )\n {\n $options = get_option( NCC_V2_TWITTER_OPTION_GROUP );\n $cache_minutes = $options['ncc_v2_twitter_admin_options_cache_duration'];\n } else\n {\n $cache_minutes = 0;\n }\n\n $cache_minutes = $cache_minutes * 60;\n\n return $cache_minutes;\n }", "public function cache_gc() {\n // TO DO!!!!!\n }", "public function getConversationCacheTime()\n {\n return $this->cacheTime ?? null;\n }", "public function execute()\n {\n return $this->smarty->cache_lifetime;\n }", "public function wasCached();", "public function makeCacheHash() {}", "public function getDefaultCacheTime()\n {\n return $this->default;\n }", "public function getCacheLength() {\n return $this->_cacheLength;\n }", "function getLifeTime();", "public static function cached($_name) {\n\t\treturn self::fetch($_name,TRUE)?\n\t\t\tarray(\n\t\t\t\t'time'=>self::$l1cache['current']['time'],\n\t\t\t\t'size'=>strlen(self::$l1cache['current']['data'])\n\t\t\t):\n\t\t\tFALSE;\n\t}", "public function getCacheTimeout()\n {\n return $this->cacheTimeout;\n }", "public function isCached() {}", "function &createCache() {}", "protected function getRuntimeCache() {}", "abstract protected function cacheData();", "final public function cache($time = false) {\n\t\t\t$this->cache_ttl = $time;\n\t\t\treturn $this;\n\t\t}", "public function getCacheTTL()\n {\n return $this->CacheTTL;\n }", "public function getCacheTimeToLive() {\n return $this->cacheTtl;\n }", "function getCacheDuration($config='') {\n \n if ($config == 'low') {\n\t\t $minutes = config('app.cache_minutes_low');\n\t\t} else {\n\t\t $minutes = config('app.cache_minutes');\n\t\t}\n\n return $minutes;\n\n}", "protected static function getRuntimeCache() {}", "public static function cache_time($name) {\n if(self::$adapter === false)\n throw new rcException('The Cache system is not initialized');\n return self::$adapter->cache_time($name);\n }", "protected function cacheTime(): Carbon\n {\n return Carbon::now()->addSeconds(config('hybridly-share.cache-ttl', 60));\n }", "function training_performance_callback() {\n global $user;\n $obj = new stdClass();\n $obj->some_var = rand(1, 500);\n $cid = 'cache_for_user_' . $user->uid;\n cache_set($cid, $obj, 'cache_training_performance', CACHE_PERMANENT);\n //cache_clear_all($cid, 'cache_training_performance');\n dpm(cache_get($cid, 'cache_training_performance'));\n $output = 'Test cache!' . rand(1, 500);\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n );\n}", "protected function getTime() {\n return microtime(true);\n }", "protected function getTime()\n {\n return microtime(true);\n }", "function calcTTL($res_cache, $res_expires, $res_last)\n {\n if (str_contains($res_cache, 'max-age'))\n {\n $TTL = (preg_replace( '/[^0-9]+/', '', $res_cache)) / 31556952 ;\n if (str_contains($res_cache, 'stale'))\n {\n $res_cache = substr( $res_cache, 0, strpos($res_cache, \"stale\"));\n $TTL = (preg_replace( '/[^0-9]+/', '', $res_cache) )/ 31556952;\n }\n }\n elseif ( $res_expires!= strtotime('0') && $res_last != strtotime('0') && $res_expires>$res_last)\n {\n $TTL = ($res_expires - $res_last) / 31556952;\n }\n return $TTL;\n }", "protected function getMemoryCache() {}", "private function cached($key, $value, $time = 5)\n\t{\n\t\tif (App::environment('local') === false) {\n\t\t\treturn $this->cache->remember($key, $time, function() use ($value) {\n\t\t\t\treturn $value;\n\t\t\t});\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}", "public function isCached(): bool;", "public function cache_lifetime(Rest_Response $response)\n\t{\n\t\t// Get out of here if this cannot be cached\n\t\tif (! $this->set_cache($response))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Calculate apparent age\n\t\tif ($date = $response->headers('date'))\n\t\t{\n\t\t\t$apparent_age = max(0, $this->_response_time - strtotime($date));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$apparent_age = max(0, $this->_response_time);\n\t\t}\n\n\t\t// Calculate corrected received age\n\t\tif ($age = $response->headers('age'))\n\t\t{\n\t\t\t$corrected_received_age = max($apparent_age, intval($age));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$corrected_received_age = $apparent_age;\n\t\t}\n\n\t\t// Corrected initial age\n\t\t$corrected_initial_age = $corrected_received_age + $this->request_execution_time();\n\n\t\t// Resident time\n\t\t$resident_time = time() - $this->_response_time;\n\n\t\t// Current age\n\t\t$current_age = $corrected_initial_age + $resident_time;\n\n\t\t// Prepare the cache freshness lifetime\n\t\t$ttl = NULL;\n\n\t\t// Cache control overrides\n\t\tif ($cache_control = $response->headers('cache-control'))\n\t\t{\n\t\t\t// Parse the cache control header\n\t\t\t$cache_control = Rest_HTTP_Header::parse_cache_control($cache_control);\n\n\t\t\tif (isset($cache_control['max-age']))\n\t\t\t{\n\t\t\t\t$ttl = $cache_control['max-age'];\n\t\t\t}\n\n\t\t\tif (isset($cache_control['s-maxage']) AND isset($cache_control['private']) AND $this->_allow_private_cache)\n\t\t\t{\n\t\t\t\t$ttl = $cache_control['s-maxage'];\n\t\t\t}\n\n\t\t\tif (isset($cache_control['max-stale']) AND ! isset($cache_control['must-revalidate']))\n\t\t\t{\n\t\t\t\t$ttl = $current_age + $cache_control['max-stale'];\n\t\t\t}\n\t\t}\n\n\t\t// If we have a TTL at this point, return\n\t\tif ($ttl !== NULL)\n\t\t{\n\t\t\treturn $ttl;\n\t\t}\n\n\t\tif ($expires = $response->headers('expires'))\n\t\t{\n\t\t\treturn strtotime($expires) - $current_age;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "private static function getCacheTimeOut($options) {\n if (is_numeric(self::$cache_timeout) && self::$cache_timeout > 0) {\n $ret_value = self::$cache_timeout;\n }\n else {\n $ret_value = FALSE;\n }\n if (isset($options['cachetimeout'])) {\n if (is_numeric($options['cachetimeout']) && $options['cachetimeout'] > 0) {\n $ret_value = $options['cachetimeout'];\n }\n else {\n $ret_value = FALSE;\n }\n }\n return $ret_value;\n }", "public function getFromCache() {}", "public function saveToCacheForever();", "final protected function getCacheNeed()\n\t{\n\t\treturn\tintval($this->arParams['CACHE_TIME']) > 0 &&\n\t\t\t\t$this->arParams['CACHE_TYPE'] != 'N' &&\n\t\t\t\tConfig\\Option::get(\"main\", \"component_cache_on\", \"Y\") == \"Y\";\n\t}", "function checkKeys()\n{\n $cache = Cache::get()->first();\n\n if (!$cache) {\n $cache = new Cache();\n refreshKeys($cache);\n }\n else { \n if (time() > $cache->timeout){\n refreshKeys($cache);\n }\n }\n}", "public function getCache();", "public function getCacheLifetime()\n {\n if ($this->cacheLifetime === null) {\n $this->setCacheLifetime($this->config->get('concrete.i18n.community_translation.cache_lifetime', 3600));\n }\n\n return $this->cacheLifetime;\n }", "public static function getCache() {}", "public function testTime()\n {\n $this->assertEquals(self::$cache->time('Toaster'), '');\n\n //Standard function test\n self::$cache->set('Toaster', 'Test', 5);\n\n $this->assertEquals(self::$cache->time('Toaster'), time());\n }", "public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}", "public function getExpiresIn();", "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']=array('block_youtube_channel__cache_on');\n\t\t$info['ttl']=intval(get_option('channel_update_time'));\n\t\treturn $info;\n\t}", "public function getTimeToCook()\n {\n return $this->_timeToCook;\n }", "protected function getCache() {\n\t\t$factory = $this->policy('rate_factoryname');\n\t\t$lifetime = $this->policy('rate_lock_timeout') + 60; // As long as it's longer than the actual timeout\n\t\t$cache = SS_Cache::factory($factory);\n\t\t$cache->setOption('automatic_serialization', true);\n\t\t$cache->setOption('lifetime', $lifetime);\n\t\treturn $cache;\n\t}", "public function cache_lifetime_callback()\n {\n $this->view('params/lifetime', [\n 'dim' => __('minutes', 'sepw'),\n 'lifetime' => isset($this->options['cache_lifetime']) ? esc_attr($this->options['cache_lifetime']) : 30,\n ]);\n }", "protected function cache()\n {\n // Cache location items\n $this->locations->get(); // All\n $this->locations->menu(); // Menu\n $this->locations->mapItems(); // Map\n $this->locations->featured(); // Featured\n\n // Cache properties\n $this->properties->cacheAll(); // All\n $this->properties->specials();\n }", "public function hasMaxCache(){\n return $this->_has(2);\n }", "function getMembersOnline(): int\n{\n return cache()->remember('i.membersOnline', getCacheILifetime('membersOnline'), function () {\n $onlinePeriod = 10; // minutes\n return \\App\\Models\\PageViews::select('user_ip')\n ->distinct()\n ->where('created_at', '>', now()->subMinutes($onlinePeriod))\n ->where('user_id', '!=', '')\n ->count(['user_ip']);\n });\n}", "function getRunningDays(): int\n{\n return cache()->remember('i.runningDays', getCacheILifetime('runningDays'), function () {\n $flag = 'created_at';\n $firstUser = \\App\\Models\\User::select($flag)->orderBy($flag)->first();\n return \\Carbon\\Carbon::parse($firstUser->$flag)->diffInDays();\n });\n}", "public function cache($since, $time = '+1 day') {\n\t\tif (!is_int($time)) {\n\t\t\t$time = strtotime($time);\n\t\t}\n\t\t$this->header(array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", time()) . 'GMT'\n\t\t));\n\t\t$this->modified($since);\n\t\t$this->expires($time);\n\t\t$this->sharable(true);\n\t\t$this->maxAge($time - time());\n\t}", "public function expires($key) {\n\t\t$cache = apc_cache_info('user');\n\t\tif (empty($cache['cache_list'])) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($cache['cache_list'] as $entry) {\n\t\t\tif ($entry['info'] != $key) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($entry['ttl'] == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t$expire = $entry['creation_time']+$entry['ttl'];\n\t\t\treturn $expire;\n\t\t}\n\t\treturn false;\n\t}", "public static function hasCache() {\n\t\treturn false;\n\t}", "function test_expires_in()\n {\n # Only Memcache & Redis support expires_in.\n if (get_class($this) == 'Test_ActiveSupport_Cache_MemcacheStore'\n or get_class($this) == 'Test_ActiveSupport_Cache_RedisStore')\n {\n # caching second var (with ttl)\n $this->cache->write('other_var', '23', array('expires_in' => 2));\n $this->assert_equal($this->cache->read('other_var'), '23');\n sleep(3);\n $this->assert_false($this->cache->read('other_var'));\n $this->assert_equal($this->cache->read('var'), 'value');\n }\n }", "function _can_cache() {\n\t\treturn true;\n\t}", "public function isCacheEnabled(){\n return(true);\n }", "public function isCacheEnabled(){\n return(true);\n }", "public function getTempCacheTimeToLive() {\n return $this->temporaryCacheTtl;\n }", "protected function getClassInfoCache() {}", "public function cache($options = true);", "public static function getCacheControl() {}", "public function updateCache();" ]
[ "0.7718767", "0.7644094", "0.7560773", "0.7219959", "0.71991587", "0.7115223", "0.7071395", "0.69224864", "0.69180954", "0.6858608", "0.6815398", "0.680982", "0.6753738", "0.6701596", "0.66249394", "0.66159534", "0.66078776", "0.6607179", "0.6606004", "0.6601273", "0.65983623", "0.6561326", "0.6544453", "0.6527267", "0.6465841", "0.6451624", "0.6439114", "0.6434588", "0.64289814", "0.6410292", "0.63961047", "0.63829064", "0.6378945", "0.6370981", "0.63672334", "0.63526213", "0.6326664", "0.6317456", "0.6309973", "0.6274888", "0.6243798", "0.6207073", "0.6194065", "0.6184874", "0.61403906", "0.61398304", "0.6107079", "0.6105664", "0.6088072", "0.6081304", "0.6077901", "0.6077153", "0.60729784", "0.6066172", "0.6058116", "0.6056283", "0.604941", "0.60052305", "0.59969026", "0.5996749", "0.59936434", "0.59511036", "0.59254813", "0.59023905", "0.5890352", "0.5871502", "0.58560455", "0.58527076", "0.58453226", "0.5838804", "0.58358026", "0.58338404", "0.5802625", "0.57955396", "0.579008", "0.57780296", "0.5769729", "0.575725", "0.57342035", "0.5728923", "0.5717294", "0.57141274", "0.5712226", "0.57107717", "0.57067645", "0.5691697", "0.56894743", "0.56886137", "0.5652592", "0.5650211", "0.5637708", "0.5635374", "0.5635054", "0.56329083", "0.56318647", "0.56318647", "0.56316394", "0.5625748", "0.5610435", "0.56062233", "0.559047" ]
0.0
-1
Parameters to pass into the method.
public function withParameters(): PersisterInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParameters()\r\n {\r\n }", "public function getParameters()\n\t{\n\n\t}", "public function getParameters()\n\t{\n\n\t}", "public function parameters();", "public function parameters();", "public function getParameters() {}", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "abstract public function getParameters();", "function getParameters();", "function getParameters();", "public function getParams(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "function getParams()\n {\n }", "function new_parameters() {\r\n\r\n }", "public function getParameters()\n {\n // TODO: Implement getParameters() method.\n }", "public function getParams() {}", "function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "function getParams()\n {\n }", "function storeParameters()\n {\n }", "private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }", "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "public function getParams()\n {\n // TODO: Implement getParams() method.\n }", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "function getParameters(){ return $this->parameters; }", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "public static function connectionArgs()\n {\n }", "public static function connectionArgs()\n {\n }", "protected function getArguments()\n {\n\n }", "public function prepareArguments() {}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}", "function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}", "function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "abstract public function processParameters ($params);", "public function parameters(): array;", "protected function initializeActionMethodArguments() {}", "function getParameters(): array;", "protected function specifyParameters()\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n call_user_func_array([$this, 'addArgument'], $arguments);\n }\n foreach ($this->getOptions() as $options) {\n call_user_func_array([$this, 'addOption'], $options);\n }\n }", "public function getParameters()\n {\n return array();\n }", "function setParameters($parameters);", "public function parameters()\n {\n return array_merge($this->get, $this->post);\n }", "function params(array $data);", "public function run(...$params);", "public function getParameters(){\n\t\t$options = $this->_function_reflection->getParameters();\n\t}", "function get_parameters()\r\n {\r\n return $this->parameters;\r\n }", "public function getParameters(): array;", "private function specifyParameters(): void\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n $this->addArgument(...$arguments);\n }\n\n foreach ($this->getOptions() as $options) {\n $this->addOption(...$options);\n }\n }", "public function finish_setting_parameters()\n {\n $this->set_variable( 'parameters', $this->parameters );\n }", "public function getDefinedParameters();", "protected function initializeCommandMethodArguments() {}", "private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }", "public function get_body_params()\n {\n }", "function set_params($params)\r\n\t{\r\n\t\t$this->parameters = $params;\r\n\t}", "public function getRequiredParameters();", "public function getRequiredParameters();", "public function getPreparedParams(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "private function loadParams() {\r\n foreach ($this->_param_names as $param_name)\r\n\t{\r\n\t\t$funcname = 'set'.$param_name;\r\n\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name)));\r\n\t\telse\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t}\r\n }", "protected function _generateParams()\r\n { \r\n $this->_transactionalParams = array('EmailAddress' =>$this->_emailPostedData['emailInfos'], 'storeId'=>$this->_emailPostedData['storeId']);\r\n $this->_mapValuesWithAttributes(); \r\n }", "public function parameters( Array $parameters=array() ) {\n foreach ($parameters as $name=>$value) {\n $this->params[$name]= $value;\n }\n }", "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->method = func_get_arg(0);\n $this->poNumber = func_get_arg(1);\n $this->additionalData = func_get_arg(2);\n $this->extensionAttributes = func_get_arg(3);\n }\n }", "public function get_file_params()\n {\n }", "private function readEngineArguments() {\n // TODO: Clean this up and move it into LandEngines.\n\n $onto = $this->getEngineOnto();\n $remote = $this->getEngineRemote();\n\n // This just overwrites work we did earlier, but it has to be up in this\n // class for now because other parts of the workflow still depend on it.\n $this->onto = $onto;\n $this->remote = $remote;\n $this->ontoRemoteBranch = $this->remote.'/'.$onto;\n }", "protected function parse_body_params()\n {\n }", "public function parametersAndQueriesDataProvider() {}", "public function params(): array;", "public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }" ]
[ "0.73878", "0.72067785", "0.72067785", "0.7179065", "0.7179065", "0.7166118", "0.71289724", "0.71289724", "0.7112083", "0.70258236", "0.70258236", "0.698418", "0.6923519", "0.6923519", "0.6923519", "0.6923519", "0.6923519", "0.6923519", "0.6923519", "0.6923519", "0.6883794", "0.68686026", "0.68231523", "0.67719644", "0.6724244", "0.67134035", "0.6632581", "0.6630354", "0.6555917", "0.6555798", "0.6553911", "0.6553911", "0.6553911", "0.6553911", "0.6485165", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6478434", "0.6477734", "0.64367914", "0.63928086", "0.63674384", "0.63674384", "0.63674384", "0.63628423", "0.63628423", "0.63106275", "0.6301963", "0.6298405", "0.62976784", "0.62976784", "0.6275117", "0.6273312", "0.62683654", "0.6230504", "0.62156916", "0.62151366", "0.6160665", "0.61599106", "0.6144991", "0.614394", "0.61254275", "0.61165047", "0.61064434", "0.6102414", "0.60991883", "0.60963774", "0.60802513", "0.6079699", "0.6058568", "0.6056835", "0.6051487", "0.60363513", "0.60363513", "0.6035712", "0.60029954", "0.5999135", "0.59976727", "0.59947103", "0.599394", "0.5986414", "0.5969755", "0.59583116", "0.59529704", "0.59479195", "0.5899518", "0.58979243", "0.58979243", "0.58979243", "0.58979243", "0.58979243", "0.58979243", "0.58979243", "0.58979243" ]
0.0
-1
Display a listing of the resource.
public function __construct() { $this->Customer = new Customer(); $this->Pelanggan = new Pelanggan(); $this->User = new User(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446838", "0.7361646", "0.7299749", "0.7246801", "0.7163394", "0.7148201", "0.71318537", "0.7104601", "0.7101873", "0.709985", "0.70487136", "0.69936216", "0.6988242", "0.69347453", "0.68989795", "0.68988764", "0.68909055", "0.68874204", "0.68650436", "0.6848891", "0.6829478", "0.6801521", "0.67970383", "0.6794992", "0.678622", "0.67595136", "0.67416173", "0.6730242", "0.67248064", "0.6724347", "0.6724347", "0.6724347", "0.6717754", "0.67069757", "0.67046493", "0.67045283", "0.66652155", "0.6662764", "0.6659929", "0.6659647", "0.665744", "0.6653796", "0.66483474", "0.6620148", "0.6619058", "0.66164845", "0.6606442", "0.66005665", "0.65998816", "0.6593891", "0.6587057", "0.6584887", "0.65822107", "0.65806025", "0.6576035", "0.65731865", "0.6571651", "0.65702003", "0.6569641", "0.6564336", "0.65618914", "0.65526754", "0.6552204", "0.6545456", "0.653638", "0.65332466", "0.65329266", "0.65268785", "0.6525191", "0.652505", "0.65196913", "0.6517856", "0.6517691", "0.65152586", "0.6515112", "0.6507232", "0.65038383", "0.65013176", "0.64949673", "0.6491598", "0.6486873", "0.64857864", "0.6484881", "0.6483896", "0.64777964", "0.6476692", "0.64711976", "0.6469358", "0.64685416", "0.64659655", "0.6462483", "0.6461606", "0.6459046", "0.6457556", "0.6454214", "0.6453915", "0.64524966", "0.64499927", "0.6448528", "0.6447461", "0.6445687" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $customers = Customer::all(); $jenis_langganan = ref_jenis_langganan::all(); return view('pelanggan.create', ['customers' => $customers, 'jenis_langganan' => $jenis_langganan]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.75934863", "0.75934863", "0.7587591", "0.75782615", "0.75711566", "0.74992937", "0.74349296", "0.7432467", "0.7387912", "0.7351958", "0.73380226", "0.73111826", "0.72957826", "0.72812104", "0.72734547", "0.7242778", "0.72294843", "0.7225723", "0.718609", "0.71780044", "0.7173978", "0.71492267", "0.71434265", "0.7143343", "0.71356934", "0.7127626", "0.7122704", "0.71151215", "0.71151215", "0.71151215", "0.711137", "0.7093674", "0.708441", "0.70805633", "0.7079313", "0.70560336", "0.70560336", "0.705535", "0.7038748", "0.7038717", "0.70355713", "0.7033314", "0.70298624", "0.70262384", "0.7025372", "0.70192045", "0.7017566", "0.70037806", "0.70029014", "0.69999987", "0.6995955", "0.6994461", "0.69932437", "0.698907", "0.6985915", "0.69654584", "0.69652516", "0.6956021", "0.6951258", "0.6950627", "0.69471824", "0.69432425", "0.6941303", "0.69406337", "0.6937103", "0.6937103", "0.69363457", "0.6934366", "0.6931313", "0.6927307", "0.6926027", "0.6922591", "0.69176334", "0.69158953", "0.6911744", "0.6910005", "0.6909594", "0.6907657", "0.6902698", "0.6900764", "0.69007087", "0.6900391", "0.68942374", "0.68933", "0.68929493", "0.68912417", "0.68912417", "0.68911326", "0.6888626", "0.6887399", "0.68857414", "0.6884495", "0.6881287", "0.6878567", "0.6875623", "0.687334", "0.68722713", "0.6870009", "0.68697596", "0.6869062", "0.6868769" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'alamat' => 'required', 'Id_kabupaten' => 'required', 'Id_provinsi' => 'required', 'nomor_pelanggan' => 'required', 'nomor_rumah' => 'required', 'Kode_pos' => 'required' ]); $customer = $this->Customer->detailData($request->id_customer); $data = [ 'Id_customer' => $request->id_customer, 'no_rumah' => $request->nomor_rumah, 'Alamat_titik_langganan' => $request->alamat, 'Id_kabupaten' => $request->Id_kabupaten, 'Id_provinsi' => $request->Id_provinsi, 'Id_jenis_langganan' => $request->Id_jenis_langganan, 'nomor_pelanggan' => $request->nomor_pelanggan, 'Nik' => $customer->Nik, 'created_by' => 'Admin', 'updated_by' => 'Admin', 'Kode_pos' => $request->Kode_pos ]; $this->Pelanggan->addData($data); return redirect('/admin/pelanggan'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $pelanggan = $this->Pelanggan->detailData($id); $jenis_langganan = ref_jenis_langganan::all(); $data = [ 'pelanggan' => $pelanggan, 'customer' => $this->Customer->detailData($pelanggan->Id_customer), 'jenis_langganan' => $jenis_langganan ]; return view('pelanggan.edit', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78561044", "0.7695814", "0.72755414", "0.72429216", "0.71737534", "0.7064628", "0.7056257", "0.69859976", "0.6949863", "0.6948435", "0.6942811", "0.69298875", "0.69032556", "0.6900465", "0.6900465", "0.6880163", "0.6865618", "0.68620205", "0.6859499", "0.6847944", "0.6837563", "0.6812879", "0.68089813", "0.6808603", "0.68049484", "0.67966837", "0.6795056", "0.6795056", "0.67909557", "0.6787095", "0.67825735", "0.67783386", "0.6771208", "0.67658216", "0.67488056", "0.67488056", "0.67481846", "0.67474896", "0.67430425", "0.6737776", "0.67283165", "0.6715326", "0.66959506", "0.66939133", "0.6690822", "0.6690126", "0.66885006", "0.6687302", "0.6685716", "0.6672116", "0.6671334", "0.6667436", "0.6667436", "0.6664605", "0.6663487", "0.6662144", "0.6659632", "0.6658028", "0.66556853", "0.6645572", "0.66350394", "0.66338056", "0.6630717", "0.6630717", "0.66214246", "0.66212183", "0.661855", "0.6617633", "0.6612846", "0.66112465", "0.66079855", "0.65980226", "0.6597105", "0.6596064", "0.6593222", "0.65920717", "0.6589676", "0.6582856", "0.65828097", "0.6582112", "0.6578338", "0.65776545", "0.65774703", "0.6572131", "0.65708333", "0.65703875", "0.6569249", "0.6564464", "0.6564464", "0.65628386", "0.6560576", "0.6559898", "0.65583706", "0.6558308", "0.6557277", "0.65571105", "0.6557092", "0.6556115", "0.655001", "0.6549598", "0.6547666" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $request->validate([ 'alamat' => 'required', 'Id_kabupaten' => 'required', 'Id_provinsi' => 'required', 'nomor_pelanggan' => 'required', 'nomor_rumah' => 'required', 'Kode_pos' => 'required' ]); $data = [ 'no_rumah' => $request->nomor_rumah, 'Alamat_titik_langganan' => $request->alamat, 'Id_kabupaten' => $request->Id_kabupaten, 'Id_provinsi' => $request->Id_provinsi, 'Id_jenis_langganan' => $request->Id_jenis_langganan, 'nomor_pelanggan' => $request->nomor_pelanggan, 'Kode_pos' => $request->Kode_pos ]; $this->Pelanggan->editData($id, $data); return redirect('/admin/pelanggan'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7423347", "0.70622426", "0.70568657", "0.6896551", "0.65835553", "0.64519453", "0.6348333", "0.6212436", "0.61450946", "0.6122591", "0.6114199", "0.6101911", "0.60876113", "0.60528636", "0.60177964", "0.6006609", "0.59725446", "0.594558", "0.59395295", "0.5938792", "0.5893703", "0.5862337", "0.58523124", "0.58523124", "0.5851579", "0.5815571", "0.58067423", "0.5750728", "0.5750728", "0.5736541", "0.5723664", "0.5715135", "0.56949675", "0.5691129", "0.56882757", "0.5669375", "0.5655524", "0.56517446", "0.5647158", "0.5636521", "0.563466", "0.5632965", "0.56322825", "0.56291395", "0.56202215", "0.56087196", "0.56020856", "0.5591966", "0.5581127", "0.5581055", "0.558085", "0.5575458", "0.55706805", "0.55670804", "0.55629116", "0.5562565", "0.5558853", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.555572", "0.5555007", "0.5553948", "0.5553837", "0.5553147", "0.55429846", "0.5541925", "0.5540208", "0.5539145", "0.5536157", "0.55350804", "0.5534241", "0.5523782", "0.5518406", "0.55147856", "0.5513397", "0.550961", "0.55072165", "0.55067354", "0.5503418", "0.5501671", "0.55010796", "0.54998124", "0.5497327", "0.54942787", "0.54942036", "0.54942036", "0.54935455", "0.549267", "0.5491964", "0.5489983", "0.54833627", "0.54794145", "0.5478835", "0.5478348", "0.5465178", "0.54648995", "0.54607797", "0.54571307" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $customer = Pelanggan::where('Id',$id)->delete(); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
wrapper for the curl_ functions to make a POST request to the given url with given body.
public static function do_post_request($url, $request_body, $port = false, &$optional_headers = null) { $ch = curl_init($url); if ($port !== false) { curl_setopt($ch, CURLOPT_PORT, $port); } curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body); $has_headers = !empty($optional_headers); curl_setopt($ch, CURLOPT_HEADER, $has_headers); if ($has_headers) { $hasCL = false; foreach ($optional_headers as $index => $header) { if (substr($header, 0, 15) == 'Content-Length:') { $hasCL = true; break; } } if (!$hasCL) { $cl = strlen($request_body); $optional_headers[] = "Content-Length: $cl"; } curl_setopt($ch, CURLOPT_HTTPHEADER, $optional_headers); } curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); if (false === $result) { $errno = curl_errno($ch); $error = curl_error($ch); static::debugError($url, $optional_headers, $request_body, "$errno: $error"); return 'Erreur :\n' . $error; } curl_close($ch); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post($url, $body = array(), $query = array(), $headers = array());", "public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }", "function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}", "function curl_post($url, array $post = NULL, array $headers = NULL, array $options = array()) {\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $_defaults = defaults;\n \n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}", "function curl_post($url, array $post = NULL, array $options = array())\n{\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch))\n {\n echo \"curl_exec failed \" . $url;\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}", "function curl_post($url, array $post = NULL, array $options = array()) {\n\t\t$this->curlError = 0;\n\t $defaults = array(\n\t CURLOPT_POST => 1,\n\t CURLOPT_HEADER => 0,\n\t CURLOPT_URL => $url,\n\t CURLOPT_FRESH_CONNECT => 1,\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_FORBID_REUSE => 1,\n\t CURLOPT_TIMEOUT => 4,\n\t CURLOPT_POSTFIELDS => $this->decodeParamsIntoGetString($post),\n\t\t\tCURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT']\n\t );\n\t \n\t $this->logMessage(\"Posting to: \".$this->decodeParamsIntoGetString($post));\n\t\t\n\t $ch = curl_init();\n\t curl_setopt_array($ch, ($options + $defaults));\n\t if( !$result = curl_exec($ch))\n\t { \n\t // trigger_error(curl_error($ch));\n\t \t$this->curlError = curl_error($ch);\n\t \treturn false;\n\t }\n\t else {\n\t \treturn $result;\n\t \n\t \t} \t\n\t}", "function new_post($request,$url) {\n ##Data Post\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n return curl_exec($ch);\n}", "static function post($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\PostRequest($url, $body, $headers);\n return $request->send();\n }", "public function postCurlCall($url, $post_params){\n return $this->utilities->curlPost($url, $post_params);\n }", "public function post($url, $payload = array(), $do_not_exit = true)\n {\n if($do_not_exit)\n {\n $this->do_not_exit = true;\n }\n\n $this->url = $url;\n $this->curl_handle = curl_init();\n $payload = http_build_query($payload);\n curl_setopt($this->curl_handle, CURLOPT_URL, $this->url);\n curl_setopt($this->curl_handle, CURLOPT_POST, true);\n curl_setopt($this->curl_handle, CURLOPT_HTTPHEADER, $this->header);\n curl_setopt($this->curl_handle, CURLOPT_POSTFIELDS, $payload);\n curl_setopt($this->curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl_handle, CURLOPT_HEADER, true);\n $this->curl_response = curl_exec($this->curl_handle);\n\n $this->parse_curl_response();\n return $this->http_body;\n }", "function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}", "public function post($requestUrl, $requestBody, array $requestHeaders = []);", "public function post(string $url, array $input = [], $headers = null);", "function curl_post($url, $postfields=array(), $headers=array(), $auth=array()) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));\n curl_setopt($ch,CURLOPT_HTTPHEADER, $headers);\n if(!empty($auth['username']) && !empty($auth['password'])) {\n curl_setopt($ch, CURLOPT_USERPWD, $auth['username'].\":\".$auth[\"password\"]);\n }\n return curl_exec($ch);\n}", "function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}", "function h_POST(string $url, $data = []) {\n // if URL doesn't start with \"http\", prepend API_URL\n if (!preg_match('/^http/', $url, $matches)) {\n $url = API_URL . $url;\n }\n\n $payload = json_encode($data);\n\n // Prepare new cURL resource\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n \n // Set HTTP Header for POST request \n curl_setopt(\n $ch,\n CURLOPT_HTTPHEADER,\n [\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($payload)\n ]\n );\n \n // Submit the POST request\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n}", "public function _post($url = null, array $parameters = []);", "function do_post_request($url, $data, $optional_headers = null)\n{\n $params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n return $response;\n}", "public function post($url, $body)\n {\n $result = $this->curlService->post(\n $this->getUrl() . $url,\n $this->getToken(),\n $body\n );\n\n return $this->parse($result);\n }", "public function post($url, $payload, $options = [])\n {\n $request = new Client();\n $request->init();\n\n $request->setopt(CURLOPT_URL, $url);\n\n foreach ($this->options as $optionKey => $optValue) {\n $request->setopt($optionKey, $optValue);\n }\n\n foreach ($options as $optionKey => $optValue) {\n $request->setopt($optionKey, $optValue);\n }\n\n $request->setopt(CURLOPT_POSTFIELDS, $payload);\n $request->setopt(\n CURLOPT_HTTPHEADER,\n [\n 'Content-Type: ' . $this->dataType,\n 'Content-Length: ' . strlen($payload)\n ]\n );\n\n if (!$this->body = $request->exec()) {\n $this->error = $request->error();\n }\n\n $info = $request->getinfo();\n $this->status = isset($info['http_code']) ? $info['http_code'] : null;\n\n $request->close();\n }", "public function post ($url, $data = null, $headers = null, $options = null);", "public function curl_post($url, array $post = NULL, array $options = array()){\n\n try{\n\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 25,\n CURLOPT_CONNECTTIMEOUT => 25,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n /*\n If you are doing a POST, and the content length is 1,025 or greater, then curl exploits\n a feature of http 1.1: 100 (Continue) Status.\n\n See http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3\n\n * it adds a header, \"Expect: 100-continue\".\n * it then sends the request head, waits for a 100 response code, then sends the content\n\n Not all web servers support this though. Various errors are returned depending on the\n server. If this happens to you, suppress the \"Expect\" header with this command:\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\n */\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\n if(!$result = curl_exec($ch)) {\n\n //\n // HOOOSTON...VE HAF PROBLEM!\n throw new Exception('CRNRSTN :: CURL [POST] ERROR experienced :: '.curl_error($ch));\n\n }\n\n curl_close($ch);\n\n return $result;\n\n } catch (Exception $e) {\n\n curl_close($ch);\n\n $this->catchException($e, LOG_ERR, __METHOD__, __NAMESPACE__);\n\n return false;\n\n }\n\n }", "function do_post_request($url, $data, $optional_headers = null)\n {\n\t \n$params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n\t //print_r($response);\n return $response;\n }", "function http_post($url, $params = array()) {\n $postData = '';\n //create name value pairs seperated by &\n foreach ($params as $k => $v) {\n $postData .= $k . '=' . $v . '&';\n }\n $postData = rtrim($postData, '&');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n $output = curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}", "public function https_post($url, $data = [] , $is_raw = false){\n// $this->response = $curl->post($url , $data , $is_raw)\n// ->setHeader('X-Requested-With', 'XMLHttpRequest')\n// ->setHeader(\"Accept\" , 'application/json')\n// ->setHeader('Content-Type' , 'application/json')\n// //->setOpt(CURLOPT_PROXY , '127.0.0.1:8888')\n// ->response;\n\n $header = [\n 'Accept:application/json' , 'Content-Type:application/json'\n ];\n $this->response = $this->https_request($url , json_encode($data ) , $header);\n\n return $this;\n }", "function post($url, $fields = array(), $http_options = array()) {\n $http_options = $http_options + $this->http_options;\n $http_options[CURLOPT_POST] = true;\n $http_options[CURLOPT_POSTFIELDS] = $fields;\n if (is_array($fields)) {\n $http_options[CURLOPT_HTTPHEADER] = array(\"Content-Type: multipart/form-data\");\n }\n $this->handle = curl_init($url);\n\n if (!curl_setopt_array($this->handle, $http_options)) {\n throw new RestClientException(\"Error setting cURL request options.\");\n }\n\n $this->response_object = curl_exec($this->handle);\n $this->http_parse_message($this->response_object);\n\n curl_close($this->handle);\n return $this->response_object;\n }", "function web_hook_post($url, $fields) {\n // url-ify the data for the POST\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string,'&');\n\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return ($result);\n}", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}", "function curl_post($url, $post) {\n\t$ch = curl_init(); \n curl_setopt($ch, CURLOPT_POST, 1); \n curl_setopt($ch, CURLOPT_URL,$url); \n //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post); \n curl_setopt($ch, CURLOPT_HEADER, false); \n ob_start(); \n curl_exec($ch); \n if (curl_errno($ch)){\n print curl_error($ch);}\n else{\n curl_close($ch);}\n $result = ob_get_contents() ; \n ob_end_clean(); \n return $result; \n}", "function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }", "public function post($location, $body);", "function http_post($url, $post_string) {\n\t\t\n\t\t// add any additional curl options here\n\t\t$options = array(CURLOPT_URL => $url,\n\t\tCURLOPT_POST => true,\n\t\tCURLOPT_POSTFIELDS => $post_string,\n\t\tCURLOPT_USERAGENT => $this->user_agent);\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, $options);\n\t\t\n\t\t$response = curl_exec($ch);\n\t\t$this->last_response = $response;\n\t\t$info = curl_getinfo($ch);\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t// all good\n\t\tif ($info['http_code'] == 204)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function curlRequest($url, $headers, $body)\n\t{\n\t\t$header_strings = array();\n\t\tforeach ($headers as $key => $val) {\n\t\t\t$header_strings[] = \"{$key}: {$val}\";\n\t\t}\n\n\t\t$curlHandle = curl_init();\n\t\tcurl_setopt($curlHandle, CURLOPT_URL, $url);\n\t\tcurl_setopt($curlHandle, CURLOPT_POST, 1);\n\t\tcurl_setopt($curlHandle, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($curlHandle, CURLOPT_TIMEOUT, $this->timeout);\n\t\tcurl_setopt($curlHandle, CURLOPT_POSTFIELDS, $body);\n\t\tcurl_setopt($curlHandle, CURLOPT_HTTPHEADER, $header_strings);\n\t\tcurl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_exec($curlHandle);\n\t\t$status = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE);\n\t\tcurl_close($curlHandle);\n\t\treturn $status;\n\t}", "function post($url, $data = '', $content_type = '')\n{\n\t\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data); \n\t\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\n\tif ($content_type != '')\n\t{\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, \n\t\t\tarray(\n\t\t\t\t\"Content-type: \" . $content_type\n\t\t\t\t)\n\t\t\t);\n\t}\t\n\t\n\t$response = curl_exec($ch);\n\tif($response == FALSE) \n\t{\n\t\t$errorText = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tdie($errorText);\n\t}\n\t\n\t$info = curl_getinfo($ch);\n\t$http_code = $info['http_code'];\n\t\t\n\tcurl_close($ch);\n\t\n\treturn $response;\n}", "public function post($url = null, array $data = [])\n {\n $this->init($url);\n\n curl_setopt($this->handler, CURLOPT_POST, count($data));\n curl_setopt($this->handler, CURLOPT_POSTFIELDS, http_build_query($data));\n\n return $this->exec();\n }", "private function curl_post($url, $data)\n {\n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "private function curlDo($url, $attrs = null, $post_body = false) {\n\t\t// locallize this variable for terser syntax\n\t\t$crowd_config = $this->crowd_config;\n\n\t\t// build up the full url/query string\n\t\t$query = \"\";\n\t\tif($attrs != null && count($attrs) > 0) {\n\t\t\t$query = \"?\" . http_build_query($attrs);\n\t\t}\n\t\t$full_url = $this->base_url . $url . $query; \n\n\t\t// get a curl handle\n\t\t$curl = curl_init($full_url);\n\n\t\t// Crowd REST uses HTTP auth for the app name and credential\n\t\tcurl_setopt($curl, CURLOPT_USERPWD, $crowd_config['app_name'] . ':' . $crowd_config['app_credential'] );\n\t\t// get back the response document\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t// set our content-type correctly (we get a 415 with text/xml)\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\"Content-Type: application/xml\"));\n\t\t// only post if we have a body\n\t\tif($post_body) {\n\t\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $post_body);\n\t\t}\n\t\t// optional supress peer checking to deal with broken SSL configs - may be common with Crowd\n\t\tif (array_key_exists('verify_ssl_peer',$crowd_config)) {\n\t\t curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $crowd_config['verify_ssl_peer']);\n\t\t}\n\t\t// give us back the response headers (so we can scrape cookies)\n\t\tcurl_setopt($curl, CURLOPT_HEADER, true);\n\t\t// load our cookies from early requests\n\t\t$this->curl_load_cookies($curl);\n\n\n\t\t// fire off the request\n\t\t$response = curl_exec($curl);\n\n\t\t// check for curl errors \n\t\tif (curl_errno($curl)) {\n\t\t throw new Exception(\"curl error (${full_url}): \" . curl_error($curl));\n\t\t}\n\n\t\t// extract response metadata\n\t\t$info = curl_getinfo($curl);\n\n\t\t// split headers out of the response\n\t\t$rc = $this->curl_split_headers($response,$info);\n\t\t// add in the metadata\n\t\t$rc['metadata'] = $info;\n\n\t\t// store cookies for later reuse\n\t\t$this->curl_store_cookies($rc);\n\t\tcurl_close($curl);\n\t\treturn $rc;\n\t}", "function api_post($url, array $post_contents, $username = null, $password = null)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_contents));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n if ($username != NULL) {\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n }\n return $this->gather_response($ch);\n }", "protected function _doPost($in_url, $in_content, $in_content_type, $in_additional_curl_options=array()) {\r\n return $this->__doRequest($in_url, 'POST', $in_content, $in_content_type, $in_additional_curl_options);\r\n }", "function postDataToUrl($url, $data) {\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\r\n curl_setopt($curl, CURLOPT_HEADER, 1);\r\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n $response = curl_exec ($curl);\r\n curl_close ($curl);\r\n\treturn $response;\r\n}", "function curl_post_https($url, $data)\r\n{ // 模拟提交数据函数\r\n $curl = curl_init(); // 启动一个CURL会话\r\n curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在\r\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器\r\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转\r\n curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer\r\n curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包\r\n curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环\r\n curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回\r\n $tmpInfo = curl_exec($curl); // 执行操作\r\n if (curl_errno($curl)) {\r\n echo 'Errno' . curl_error($curl); //捕抓异常\r\n }\r\n curl_close($curl); // 关闭CURL会话\r\n return $tmpInfo; // 返回数据,json格式\r\n}", "public function postGuzzleRequest($headers, $url, $body)\n {\n $client = new \\GuzzleHttp\\Client(['headers' => $headers]);\n $response = $client->post($url, array('form_params'=>$body));\n\n $response = json_decode($response->getBody());\n\n\n return $response;\n }", "function customPost($url, $refer, $post_info)\n {\n $USER_AGENT=\"Mozilla/5.0 (Windows NT 6.3; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0\";\n\n if (!isset($CONNECT_TIMEOUT) || !filter_var($CONNECT_TIMEOUT, FILTER_VALIDATE_INT)) {$CONNECT_TIMEOUT=10;} //use 10 seconds by default when no timeout is set\n if (!isset($refer) || !filter_var($refer, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)) {$refer=$url;} //use original url as refer when no valid URL provided\n\n $ch=curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, $USER_AGENT);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $CONNECT_TIMEOUT);\n curl_setopt($ch, CURLOPT_TIMEOUT, $CONNECT_TIMEOUT);\n curl_setopt($ch, CURLOPT_REFERER, $refer);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_info);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n $result=curl_exec($ch);\n curl_close($ch);\n\n return $result;\n }", "function post($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'POST', 'body' => $data), $options));\n\t}", "function curl_post_https($url,$data){ // 模拟提交数据函数\n $curl = curl_init(); // 启动一个CURL会话\n curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转\n curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer\n curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包\n curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环\n curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回\n $tmpInfo = curl_exec($curl); // 执行操作\n if (curl_errno($curl)) {\n echo 'Errno'.curl_error($curl);//捕抓异常\n }\n curl_close($curl); // 关闭CURL会话\n return $tmpInfo; // 返回数据,json格式\n}", "private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }", "function post($url, $args = array()) {\n\t\t$defaults = array('method' => 'POST');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}", "public static function http_post($url, $postargs = NULL, $output_errors = TRUE) {\n $session = curl_init();\n // Set the POST options.\n curl_setopt($session, CURLOPT_URL, $url);\n if ($postargs !== NULL) {\n curl_setopt($session, CURLOPT_POST, TRUE);\n if (is_array($postargs) && version_compare(phpversion(), '5.5.0') >= 0) {\n // Posting a file using @ prefix is deprecated as of version 5.5.0.\n foreach ($postargs as $key => $value) {\n // Loop through postargs to find files where the value is prefixed @.\n if (strpos($value ?? '', '@') === 0) {\n // Found a file - could be in form @path/to/file;type=mimetype.\n $fileparts = explode(';', substr($value, 1));\n $filename = $fileparts[0];\n if (count($fileparts) == 1) {\n // Only filename specified.\n $postargs[$key] = new CurlFile($filename);\n }\n else {\n // Mimetype may be specified too.\n $fileparam = explode('=', $fileparts[1]);\n if ($fileparam[0] == 'type' && isset($fileparam[1])) {\n // Found a mimetype.\n $mimetype = $fileparam[1];\n $postargs[$key] = new CurlFile($filename, $mimetype);\n }\n else {\n // The fileparam didn't seem to be a mimetype.\n $postargs[$key] = new CurlFile($filename);\n }\n }\n }\n }\n }\n curl_setopt($session, CURLOPT_POSTFIELDS, $postargs);\n }\n curl_setopt($session, CURLOPT_HEADER, FALSE);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, TRUE);\n // Do the POST and then close the session.\n $response = curl_exec($session);\n $httpCode = curl_getinfo($session, CURLINFO_HTTP_CODE);\n $curlErrno = curl_errno($session);\n // Check for an error, or check if the http response was not OK.\n if ($curlErrno || $httpCode != 200) {\n if ($output_errors) {\n echo '<div class=\"error\">cUrl POST request failed. Please check cUrl is installed on the server and the $base_url setting is correct.<br/>URL:' . $url . '<br/>';\n if ($curlErrno) {\n echo 'Error number: ' . $curlErrno . '<br/>';\n echo 'Error message: ' . curl_error($session) . '<br/>';\n }\n echo \"Server response<br/>\";\n echo $response . '</div>';\n }\n $return = [\n 'result' => FALSE,\n 'output' => $curlErrno ? curl_error($session) : $response,\n 'errno' => $curlErrno,\n 'status' => $httpCode\n ];\n }\n else {\n $arr_response = explode(\"\\r\\n\\r\\n\", $response);\n // Last part of response is the actual data.\n $return = ['result' => TRUE, 'output' => array_pop($arr_response)];\n }\n curl_close($session);\n return $return;\n }", "public function curlpost($url, $data)\n {\n\n $host = $url;\n // echo $host;exit;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $host);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n //curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n //var_dump(curl_error($ch));\n $res = curl_exec($ch);\n curl_close($ch);\n return $res;\n }", "private function _post_data($url, $data)\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t$ret = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $ret;\n\t}", "function post($url, $headers, $params)\n{\n $data = json_encode($params);\n\n $curl = curl_init();\n\n array_push($headers, \"Content-Type: application/json\");\n array_push($headers, \"Content-Length: \" . strlen($data));\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n // print_r(\"=========请求信息 start =========\\n\");\n // print_r($url . \"\\n\");\n // print_r(json_encode($headers) . \"\\n\");\n // print_r($data . \"\\n\");\n $response = curl_exec($curl);\n curl_close($curl);\n // print_r(\"==============================\\n\");\n // print_r($response);\n // print_r(\"\\n=========请求信息 end =========\\n\");\n return $response;\n}", "function request(string $url, string $fields = '', int $isPost = 0)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, $isPost);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n if ($isPost) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n }\n $requestHeaders = array(\n 'Content-type: application/x-www-form-urlencoded',\n 'Content-Length: ' . strlen($fields),\n );\n curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);\n return curl_exec($ch);\n}", "public static function CurlPost($url, array $post = array(), array $options = array()) {\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_FOLLOWLOCATION => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if (!$result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n\n curl_close($ch);\n // var_dump(curl_getinfo($ch)); exit;\n\n\n return $result;\n }", "function postRequest( $url, $fields, $optional_headers = null ) {\n\t\t// http_build_query is preferred but doesn't seem to work!\n\t\t// $fields_string = http_build_query($fields, '', '&', PHP_QUERY_RFC3986);\n\t\t\n\t\t// Create URL parameter string\n\t\tforeach( $fields as $key => $value )\n\t\t\t$fields_string .= $key.'='.$value.'&';\n\t\t\t\n\t\t$fields_string = rtrim( $fields_string, '&' );\n\n//\t\techo \"controlKey.php : postRequest() : URL = $url\";\n//\t\techo \"controlKey.php : postRequest() : Fields_string = $fields_string\";\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_POST, count( $fields ) );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $fields_string );\n\t\t\n\t\t$result = curl_exec( $ch );\n\t\t\n\t\tcurl_close( $ch );\n\t}", "function post($url, $data) {\n $options = array(\n\t\t 'http' => array(\n\t\t\t\t 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t\t\t 'method' => 'POST',\n\t\t\t\t 'content' => http_build_query($data),\n\t\t\t\t ),\n\t\t );\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n return $result;\n}", "private function post($url, $content, $type = '', $header = '') {\n\t\t$url = $this->api_url . $url;\n\n\t\t// Set headers.\n\t\t$headers = array();\n\t\tif (!empty($type)) {\n\t\t\t$headers[] = 'Content-Type: ' . $type . '; charset=UTF-8';\n\t\t}\n\t\tif (!empty($header)) {\n\t\t\t$headers[] = $header;\n\t\t}\n\n\t\t// Open curl.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->api_username . \":\" . $this->api_password);\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tif (count($headers) > 0) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\t}\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $output;\n\t}", "private function create_curl($s_url, $post_params = array() )\n\t{\n\n\t\t$full_url = $this->settings['server'];\n if ($this->settings['port'] != '80') $full_url .= ':' . $this->settings['port'];\n $full_url .= $s_url ;\n\n\t\t$this->log( 'curl_init( ' . $full_url . ' )' );\n\t\t\n $post_value = Centrifuge::array_implode( '=', '&', $post_params );\n \n\t\t# Set cURL opts and execute request\n\t\t$ch = curl_init();\n\t\tif ( $ch === false )\n\t\t{\n\t\t\tthrow new CentrifugeException('Could not initialize cURL!');\n\t\t}\n\n\t\tcurl_setopt( $ch, CURLOPT_URL, $full_url );\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array ( \"Content-type: application/x-www-form-urlencoded\" ) );\t\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, $this->settings['timeout'] );\n\t\t\n $this->log( 'trigger POST: ' . $post_value );\n\n\t\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $post_value );\n \n\t\treturn $ch;\n\t}", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "function post (string $url, array $args = []): string {\n\t$curlCall = curl_init($url);\n\n\tcurl_setopt($curlCall, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($curlCall, CURLOPT_POST, true);\n\tcurl_setopt($curlCall, CURLOPT_POSTFIELDS, $args);\n\n\t$return = curl_exec($curlCall);\n\tcurl_close($curlCall);\n\n\treturn $return;\n}", "function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}", "function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {}", "private function post (string $url)\r\n\t{\r\n\t\ttry {\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t$handle = curl_init();\t\t\t\r\n\t\t\tcurl_setopt_array($handle, array(\r\n\t\t\t\tCURLOPT_URL => $url,\r\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => 5,\r\n\t\t\t\tCURLOPT_TIMEOUT => 60,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => $this->paramUrl\r\n\t\t\t\t));\t\t\r\n\t\t\t//curl_setopt($ch, CURLOPT_ENCODING ,\"\");\r\n\t\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));\r\n\t\t\t\r\n\t\t\t$response = curl_exec($handle);\t\t\r\n\t\t\t$resp = json_decode($response);\t\t\t\r\n\t\t\tif ($resp['ok'] == false)\r\n\t\t\t\tthrow new \\Exception($resp['description']);\t\t\t\r\n\t\t\t\r\n\t\t} catch ( \\Exception $e) {\r\n\t\t\t$Logger = new \\Logger('TelegramMain.txt');\r\n\t\t\t$Logger -> log($response, $url.$this->paramUrl);\r\n\t\t}finally{\t\t\t\r\n\t\t\tcurl_close($handle);\t\t\r\n\t\t\treturn $response;\t\t\t\r\n\t\t}\r\n\r\n\t}", "public function post($url, $params = array(), $options = array())\n\t{\n\t\t$field_string = '';\n\t\t\n\t\tif ( iterable($params) ) {\n\t\t\tforeach ( $params as $key => $value ) {\n\t\t\t\t$field_string .= urlencode($key) . '=' . urlencode($value) . '&';\n\t\t\t}\n\t\t\t\n\t\t\trtrim($field_string, '&');\n\t\t}\n\t\t\n\t\t$options[CURLOPT_URL] = $url;\n\t\t$options[CURLOPT_RETURNTRANSFER] = array_ensure($options, CURLOPT_RETURNTRANSFER, 1);\n\t\t$options[CURLOPT_HEADER] = array_ensure($options, CURLOPT_HEADER, 0);\n\t\t$options[CURLOPT_USERAGENT] = array_ensure($options, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0');\n\t\t$options[CURLOPT_IPRESOLVE] = array_ensure($options, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n\t\t$options[CURLOPT_POST] = sizeof($params);\n\t\t$options[CURLOPT_SSL_VERIFYPEER] = false;\n\t\t$options[CURLOPT_SSL_VERIFYHOST] = 0;\n\t\t$options[CURLOPT_POSTFIELDS] = $field_string;\n\t\t//$options[CURLOPT_HEADER] = strlen($field_string);\n\t\t\n\t\t$curl = curl_init();\n\t\t\n\t\tcurl_setopt_array($curl, $options);\n\t\t\n\t\t$response = curl_exec($curl);\n\t\t\n\t\tif ( false === $response ) {\n\t\t\techo curl_error($curl);\n\t\t}\n\t\t\n\t\tcurl_close($curl);\n\t\t\n\t\treturn $response;\n\t}", "function PostURL($url, $postData, $options = array())\n\t{\n\t\t//\t\t$postString = '';\n\t\t//\t\tforeach ($postData as $key => $value) { $postString .= \"$key=$value&\"; }\n\n//\t\t\n//\t\t$options['post_string'] = http_build_query($postData);\n\t\t$options['post_array'] = $postData;\n\t\treturn self::FetchURL($url, $options);\n\t\t\n\t}", "function restPost($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "function curl($url, $post_fields = null, $return_headers = false)\n {\n global $standard_headers;\n global $cookie;\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $standard_headers);\n curl_setopt($ch, CURLOPT_COOKIE, $cookie);\n\n if($return_headers == true) {\n curl_setopt($ch, CURLOPT_HEADER, 1);\n }\n\n if(!is_null($post_fields)) {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));\n } else {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n }\n\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "static function submitHttpPost($url, $postParams = null, $timeout = 50) {\n $ch = curl_init();\n\n // set up the request\n curl_setopt($ch, CURLOPT_URL, $url);\n // make sure we submit this as a post\n curl_setopt($ch, CURLOPT_POST, true);\n if (isset($postParams)) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n }else{\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"\"); \t\n }\n // make sure problems are caught\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n // return the output\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // set the timeouts\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\n curl_setopt($ch, CURLOPT_TIMEOUT,$timeout);\n // set the PHP script's timeout to be greater than CURL's\n set_time_limit($timeout + 25);\n\n $result = curl_exec($ch);\n // check for errors\n if (0 == curl_errno($ch)) {\n curl_close($ch);\n return $result;\n } else {\n\t\t\t$this->modx->log(MODX_LOG_LEVEL_ERROR,'XFlickr Request failed. '.curl_errno($ch).': '. curl_error($ch).' URL:'.$url);\n curl_close($ch);\n }\n }", "function mi_http_request($url, $data)\r\n{\r\n\r\n $curl = curl_init($url);\r\n curl_setopt($curl, CURLOPT_POST, true);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n return $response;\r\n}", "protected function makePostRequest($uri, $params) {\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL,$this->server_url . $uri);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS,\n http_build_query($params));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($curl);\n $this->response = $output;\n $this->response_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close ($curl);\n }", "function curl_post(&$handle, $url, $fields = '', &$info = NULL) {\r\n\tglobal $curl_last_timestamp, $curl_throttle;\r\n\tif (! $curl_throttle) {\r\n\t\t$curl_throttle = 2;\r\n\t}\r\n\tif ($curl_last_timestamp && time() - $curl_last_timestamp < $curl_throttle * 60) {\r\n\t\t$delay = min(array(\r\n\t\t\t$curl_throttle * 60, time() - $curl_last_timestamp\r\n\t\t));\r\n\t\tif ($delay) {\r\n\t\t\t//log_msg('CURL', \"Sleeping for $delay second(s)\");\r\n\t\t\tusleep($delay * 1000000);\r\n\t\t}\r\n\t}\r\n\t$curl_last_timestamp = time();\r\n\tif ($fields && is_array($fields))\r\n\t\t$fields = http_build_query2($fields, '', '&');\r\n\tcurl_setopt($handle, CURLOPT_POST, TRUE);\r\n\tif ($fields)\r\n\t\tcurl_setopt($handle, CURLOPT_POSTFIELDS, $fields);\r\n\tcurl_setopt($handle, CURLOPT_URL, $url);\r\n\tcurl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);\r\n\t$result = curl_exec($handle);\r\n\t$info = curl_getinfo($handle);\r\n\t//log_msg('CURL', \"Post $url?$fields ; result info=\" . json_encode($info));\r\n\treturn $result;\r\n}", "public static function urlPost($url, $content, $headers=null) {\n\n $isJsonForm = false;\n\n if ($headers == null){\n $headers = array(\"Content-type: application/json\");\n $isJsonForm = true;\n }\n else {\n $stringFromHeaders = implode(\" \",$headers);\n if (preg_match(\"/Content\\-type:/i\",$stringFromHeaders)){\n \n if (preg_match(\"/Content\\-type:\\ {0,4}application\\/json/i\",$stringFromHeaders)){\n $isJsonForm = true; \n //array_push($headers,\"Content-type: application/json\");\n }\n\n }\n else{\n $isJsonForm = true; \n array_push($headers,\"Content-type: application/json\");\n }\n }\n\n if ($isJsonForm){\n $content = json_encode($content);\n $contentString = $content;\n }\n else{\n\n $contentString = '';\n foreach ($content as $key => $value){\n if (preg_match(\"/[a-zA-Z_]{2,100}/\",$key))\n $contentString .= $key . \"=\" . $value .\"&\";\n }\n $contentString .= \"\\n\";\n }\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $contentString);\n\n if($headers != null && in_array('Custom-SSL-Verification:false',$headers)){\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); \n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n $contents = curl_exec($curl);\n \n if($errno = curl_errno($curl)) {\n $error_message = curl_strerror($errno);\n //echo \"cURL error ({$errno}):\\n {$error_message}\";\n $contents = \"cURL error ({$errno}):\\n {$error_message}\";\n }\n\n\n $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n /*\n if ($status != 201) {\n die(\"Error: call to URL $url failed with status $status, response $contents, curl_error: \" . curl_error($curl) . \", curl_errno: \" . curl_errno($curl));\n }\n */\n curl_close($curl);\n \n return utf8_encode($contents);\n }", "function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "public function curlPostCall( $url, $postData ) \n {\n // prx($postData);\n $fields = array();\n foreach ($postData as $postKey => $postVal){\n $fields[$postKey] = urlencode($postVal);\n }\n //url-ify the data for the POST\n foreach($fields as $key=>$value) { \n $fields_string .= $key.'='.$value.'&';\n }\n \n rtrim($fields_string, '&');\n\n try\n {\n // $requestTime = date('r');\n #CURL REQUEST PROCESS-START#\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL, $url);\n //curl_setopt($ch,CURLOPT_POST, count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n //execute post\n $result = curl_exec($ch);\n \n //close connection\n curl_close($ch);\n }\n catch( Exception $e)\n {\n $strResponse = \"\";\n $strErrorCode = $e->getCode();\n $strErrorMessage = $e->getMessage();\n die('Connection Failure with API');\n }\n \n $responseArr = json_decode($result, true);\n return $responseArr;\n }", "public function Post( $sUrl, array $aFields );", "public static function curlPost($url,$params)\n {\n $postData = '';\n //create name value pairs seperated by &\n foreach($params as $k => $v)\n {\n $postData .= $k . '='.$v.'&';\n }\n rtrim($postData, '&');\n\n $ch = curl_init();\n\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch,CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n\n $output=curl_exec($ch);\n\n curl_close($ch);\n return $output;\n\n }", "function ccweb_httpPost2($url, $data, &$outResponse) { \r\n $params = array('http' => array('method' => 'POST', 'content' => $data)); \r\n $context = stream_context_create($params);\r\n\r\n $fh = fopen($url, 'rb', false, $context);\r\n if (!$fh) {return FALSE;} \r\n \r\n $response = stream_get_contents($fh); \r\n if ($response === false) {return FALSE;} \r\n \r\n $outResponse = $response; \r\n return TRUE; \r\n}", "public static function post($url,$vars,$extended=false,$headers=null,$closeAfterUse=true,$timeout=-1,$cookies=null){\n\t\t\tif(!function_exists('connect_store_headers_callback')){\n\t\t\t\tfunction connect_store_headers_callback($ch,$header){\n\t\t\t\t\tConnect::$HEADERS[]=$header;\n\t\t\t\t\treturn strlen($header);\n\t\t\t\t}\n\t\t\t}\n\t\t\tself::$HEADERS=array();\n\t\t\t$ch=curl_init();\n\t\t\t$wp=fopen('php://temp','r+');\n\t\t\tcurl_setopt($ch,CURLOPT_URL,$url);\n\t\t\tcurl_setopt($ch,CURLOPT_STDERR,$wp);\n\t\t\tcurl_setopt($ch,CURLOPT_VERBOSE,true);\n\t\t\tif(substr($url,0,8)=='https://'){\n\t\t\t\tcurl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_ANY);\n\t\t\t\tcurl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);\n\t\t\t}\n\t\t\tif($headers)curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);\n\t\t\tif($timeout!=-1)curl_setopt($ch,CURLOPT_TIMEOUT_MS,$timeout);\n\t\t\tif($cookies){\n\t\t\t\tforeach($cookies as $k=>$v)$cookies[$k]=$k.'='.urlencode($v);\n\t\t\t\tcurl_setopt($ch,CURLOPT_COOKIE,implode('; ',$cookies));\n\t\t\t}\n\t\t\tcurl_setopt($ch,CURLOPT_HEADER,false);\n\t\t\tcurl_setopt($ch,CURLOPT_USERAGENT,self::$USERAGENT);\n\t\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\t\t\tcurl_setopt($ch,CURLOPT_POST,true);\n\t\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$vars);\n\t\t\tcurl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);\n\t\t\tcurl_setopt($ch,CURLOPT_MAXREDIRS,50);\n\t\t\tcurl_setopt($ch,CURLOPT_HEADERFUNCTION,'connect_store_headers_callback');\n\t\t\t$data=curl_exec($ch);\n\t\t\tif(CFG::get('DEBUG_VERBOSE'))xlog('HTTP POST ',$url,':',$data!==false?'success':'failure');\n\t\t\tif($data===false)$data='';\n\t\t\t$ips=self::_get_curl_remote_ips($wp);\n\t\t\tif(!$extended && (curl_getinfo($ch,CURLINFO_HTTP_CODE)>=400))$data='';\n\t\t\tif($extended)$data=array(\n\t\t\t\t'ip'=>count($ips)>0 ? end($ips) : '',\n\t\t\t\t'ips'=>$ips,\n\t\t\t\t'curl'=>$ch,\n\t\t\t\t'status'=>curl_getinfo($ch,CURLINFO_HTTP_CODE),\n\t\t\t\t'response'=>!$data?'':$data,\n\t\t\t\t'headers'=>self::$HEADERS,\n\t\t\t\t'headers_received'=>self::$HEADERS,\n\t\t\t\t'headers_sent'=>curl_getinfo($ch,CURLINFO_HEADER_OUT)\n\t\t\t);\n\t\t\tif($closeAfterUse)curl_close($ch);\n\t\t\tfclose($wp);\n\t\t\t$GLOBALS['K2F_CURL'][]=$ch;\n\t\t\treturn $data;\n\t\t}", "public function post($url, $data = array()) {\n\t\treturn $this->request($url, $data, true);\n\t}", "public function post($url,$param,$header=null){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL,$url);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($param));\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\t$response = curl_exec($ch);\n\t\t$err = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tif ($err) {\n\t\t\tarray_push($this->curlError,$err);\n\t\t\treturn $err;\n\t\t} else {\n\t\t $response = json_decode($response, TRUE);\n\t\t}\n\t\treturn $response;\n\t}", "public function post($url)\n {\n $this->requestType = Client::REQUEST_POST;\n $this->url = $url;\n return $this;\n }", "function forwardPostRequest($url, $data) {\n\t\t\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => $url,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_POST => 1,\n\t\t\tCURLOPT_POSTFIELDS => $data,\n\t\t\tCURLOPT_HTTPHEADER => array(\"cache-control: no-cache\"),\n\t\t\tCURLOPT_SSL_VERIFYPEER => false\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\tif ($response === false) echo \"Bad response\";\n\n\t\tcurl_close($curl);\n\t\treturn $response;\n\n\t}", "function post($url,$fields){\n curl_setopt($this-> ch,CURLOPT_POST,1);\n curl_setopt($this-> ch,CURLOPT_POSTFIELDS,$fields);\n curl_setopt($this-> ch,CURLOPT_URL,$url);\n curl_setopt($this-> ch,CURLOPT_COOKIE, COOKIE_FILE); \n curl_setopt($this-> ch,CURLOPT_FOLLOWLOCATION,true);\n // 返回跳转后的页面 如果只提交表单,则返回1表示成功\n return $this-> html = curl_exec($this-> ch);\n }", "public static function post($url, $data)\n {\n return self::fetch($url, array (\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $data\n )\n );\n }", "public static function sendPost($_url, $_data, $_headers = [],\n $_return_header = true)\n {\n return self::sendCurl($_url,\n array(\n CURLOPT_SSL_VERIFYHOST => false,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_FOLLOWLOCATION => 0,\n CURLOPT_POST => 1,\n CURLOPT_POSTFIELDS => $_data,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_HTTPHEADER => $_headers,\n CURLOPT_HEADER => $_return_header\n ));\n }", "public function doPost(array $parsed_body);", "private static function execCurl($full_url, $type,\n $headers, $post_data = null) {\n $curl_request = self::getCurlRequestType($type);\n\n if ($post_data !== null) {\n if ($type !== 'POST') {\n throw new Exception('Cannot post field data with non-POST request!');\n }\n }\n\n $session = curl_init($full_url);\n curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($session, $curl_request, true);\n if ($post_data !== null) {\n curl_setopt($session, CURLOPT_POSTFIELDS, $post_data);\n }\n\n // Do it\n $server_output = curl_exec($session);\n curl_close($session);\n\n if ($server_output === false) {\n throw new Exception(\"Couldn't make cURL request!\");\n }\n\n return $server_output;\n }", "public function postBody($url, $body)\n {\n return $this->client->post(\n $this->baseUrl . $this->userId . '/' . $url,\n [\n 'json' => $body,\n ]\n )->getBody()->getContents();\n }", "function Send($url, $POST){ //работа с CURL'ом\n\t$ch = curl_init();// Устанавливаем соединение\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $POST);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t$result = curl_exec($ch);\n\n\tif($result === false) print $err = curl_error($ch);\n\n\treturn $result;\n}", "public static function post($url, $data = array())\r\n\t{\r\n\t\t$ch = curl_init();\r\n\t\t\r\n\t\tif ( ! empty( $data ) )\r\n\t\t\t$data = http_build_query($data);\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //to suppress the curl output \r\n\t\t\r\n\t\t$result = curl_exec($ch);\r\n\r\n\t\tcurl_close ($ch);\r\n\t\t\r\n\t\tif ( false !== $result )\r\n\t\t\t$result = json_decode( $result );\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "function wechat_php_curl_https_post($url, $postfields, $ct = '')\n{\n //$postfields = array('field1'=>'value1', 'field2'=>'value2');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, true);\n // Edit: prior variable $postFields should be $postfields;\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n if($ct == 'json'){\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: application/json',\n 'Content-Length: ' . strlen($postfields),\n )); \n }\n\n //Keep this code to remind me use it for some chinese character just in case\n if($ct == 'utf-8'){\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: text/xml; charset=utf-8', \n 'Content-Length: ' . strlen($postfields),\n )); \n }\n\n $result = curl_exec($ch);\n\n if(curl_errno($ch))\n {\n curl_close($ch);\n return NULL;\n }\n\n curl_close($ch);\n return $result;\n}", "public function post( $url, array $headers=array(), $data=null ) {\n return $this->httpRequest( $url, 'POST', $headers, $data );\n }", "public function postFields($postFields, $url, $referer) {\r\n\r\n\t\t$ch = curl_init(); # Initialize a CURL session.\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); # The URL to fetch.\r\n\t\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $this->userAgent); # Set the userAgent here\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1); # Do a regular HTTP POST. The data should be url encoded\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS,$postFields); # Fields to be poted to the above set url\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); # set this to return the transfer as a string\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\r\n \r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); # set this to follow any Location: header \r\n\r\n\t\tcurl_setopt($ch, CURLOPT_REFERER, $referer); # Set the referer url here\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookiefile); # The name of the file containing the cookie data. \r\n\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookiefile); # The name of a file to save all internal cookies to when the connection closes.\r\n\r\n\t\t$output = curl_exec($ch); # store the contents of the fetched url\r\n echo curl_error($ch);\r\n\t\tcurl_close($ch); # close curl resource, \r\n\t\t\r\n\t\r\n\r\n\t\treturn $output; # Return the output\r\n\r\n\t}", "function rest_post_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "public function post($uri = null, $headers = null, $postBody = null)\n {\n return $this->createRequest('POST', $uri, $headers, $postBody);\n }", "public static function doPost($url, $postdata, $header = '', $dataencode = 'JSON') {\n // contain acceptable methods. Return false and stop processing here.\n $encode_types = ['QUERY', 'HTTP', 'JSON'];\n if (!in_array($dataencode, $encode_types)) {\n $msg = t('ERROR in call to @function in @file. Data Enocde must be !list', [\n '@function' => __FUNCTION__,\n '@file' => __FILE__,\n '!list' => implode(', ', $encode_types),\n ]);\n watchdog(self::BOX_OPERATIONS_NAME, $msg);\n drupal_set_message($msg, 'error');\n\n return FALSE;\n }\n\n // Decide how to encode data. Some calls will require post data to be\n // encoded as a JSON string. Other calls will require QUERY.\n switch ($dataencode) {\n\n case 'QUERY':\n case 'HTTP':\n $postdata = http_build_query($postdata);\n break;\n case 'JSON':\n default:\n $postdata = trim(json_encode($postdata));\n break;\n }\n\n\n // cURL magic\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n\n // Skip header if blank\n if ($header != '') {\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n $header,\n ));\n }\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return $result;\n }", "public static function post($url,array $params = array()) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n $data = curl_exec($ch);\n curl_close($ch);\n\n return $data;\n }", "function Curl_Post_Login($url, $params = array()) {\n $data_string = json_encode($params);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n\n $result = curl_exec($ch);\n return $result;\n }", "function post(Request &$request, Response &$response);", "protected function postURL($url, array $parameters, &$report = null)\n {\n $content = false;\n $curlSetup = array(\n 'curlUse' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse'],\n 'curlTimeout' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlTimeout'],\n 'curlProxyServer' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer'],\n 'curlProxyTunnel' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel'],\n 'curlProxyUserPass' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass'],\n );\n\n if (isset($report)) {\n $report['error'] = 0;\n $report['message'] = '';\n }\n\n if ($curlSetup['curlUse'] == '1' && preg_match('/^(?:http|ftp)s?|s(?:ftp|cp):/', $url)) {\n if (isset($report)) {\n $report['lib'] = 'cURL';\n }\n\n // External URL without error checking.\n $ch = curl_init();\n if (!$ch) {\n if (isset($report)) {\n $report['error'] = -1;\n $report['message'] = 'Couldn\\'t initialize cURL.';\n }\n return false;\n }\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));\n // some sites need a user-agent\n curl_setopt($ch, CURLOPT_USERAGENT, 'My-Minifier/1.0');\n\n // may fail (PHP 5.2.0+ and 5.1.5+) when open_basedir or safe_mode are enabled\n $followLocation = @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n if (!empty($curlSetup['curlProxyServer'])) {\n curl_setopt($ch, CURLOPT_PROXY, $curlSetup['curlProxyServer']);\n\n if (!empty($curlSetup['curlProxyTunnel'])) {\n curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, $curlSetup['curlProxyTunnel']);\n }\n if (!empty($curlSetup['curlProxyUserPass'])) {\n curl_setopt($ch, CURLOPT_PROXYUSERPWD, $curlSetup['curlProxyUserPass']);\n }\n }\n $content = curl_exec($ch);\n if (isset($report)) {\n $curlInfo = curl_getinfo($ch);\n $report['headers'] = $curlInfo;\n if ($content === false) {\n $report['error'] = curl_errno($ch);\n $report['message'] = curl_error($ch);\n } else {\n // We hit a redirection but we couldn't follow it\n if (!$followLocation && $curlInfo['status'] >= 300 && $curlInfo['status'] < 400) {\n $report['error'] = -1;\n $report['message'] = 'Couldn\\'t follow location redirect (either PHP configuration option safe_mode or open_basedir is in effect).';\n }\n }\n }\n curl_close($ch);\n } else {\n \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::devLog('curl is not enabled', 'my_minifier', 3);\n }\n\n return $content;\n }", "function postDataToServerUsingCurl( $post, $rel_url )\n\t{\n\t\t$url\t\t= \"https://api.razorpay.com/v1/\" . $rel_url;\n\t\t$post_json = json_encode($post);\n\t\t$headers = array();\n\t\t$headers[] = \"Content-Type: application/json\";\n\t\t$options = array(\n\t\t\tCURLOPT_POST\t\t => true,\n\t\t\tCURLOPT_POSTFIELDS\t => $post_json,\n\t\t\tCURLOPT_URL\t\t\t => $url,\n\t\t\tCURLOPT_USERPWD\t\t => $this->password,\n\t\t\tCURLOPT_RETURNTRANSFER => true, // return web page\n\t\t\tCURLOPT_HTTPHEADER\t => $headers,\n\t// CURLOPT_HEADER => false, // don't return headers\n\t// CURLOPT_FOLLOWLOCATION => true, // follow redirects\n\t// CURLOPT_ENCODING => \"\", // handle all encodings\n\t// CURLOPT_USERAGENT => \"spider\", // who am i\n\t// CURLOPT_AUTOREFERER => true, // set referer on redirect\n\t\t\tCURLOPT_CONNECTTIMEOUT => 20, // timeout on connect\n\t\t\tCURLOPT_TIMEOUT => 120, // timeout on response\n\t\t\tCURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n\t\t\tCURLOPT_SSL_VERIFYPEER => true, // enable SSL Cert checks\n\t\t\tCURLOPT_SSL_VERIFYHOST => 2,\n\t\t\tCURLOPT_SSLVERSION\t => CURL_SSLVERSION_TLSv1_2\n\t\t);\n\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt_array( $ch, $options );\n\t\t$result = curl_exec( $ch );\n\t\tif (curl_errno($ch))\n\t\t {\n\t\t\techo 'Error:' . curl_error($ch);\n\t\t }\n\t\tcurl_close( $ch );\n\t\treturn json_decode($result);\n\t}" ]
[ "0.80899096", "0.7871003", "0.76686794", "0.7516226", "0.74639946", "0.7203069", "0.716835", "0.707107", "0.7064467", "0.7041658", "0.70412344", "0.69424546", "0.6933469", "0.69093966", "0.6870257", "0.68594074", "0.6854093", "0.68258476", "0.67878294", "0.67781204", "0.6777103", "0.67745215", "0.676008", "0.67428476", "0.6739416", "0.67292935", "0.6688974", "0.66857135", "0.6677246", "0.66646254", "0.66589206", "0.6653535", "0.6648677", "0.66392", "0.66086257", "0.6595753", "0.65942866", "0.65931296", "0.65924644", "0.6563544", "0.6559819", "0.655858", "0.6556323", "0.6549575", "0.65430516", "0.65244734", "0.65223026", "0.6499303", "0.6479434", "0.64695907", "0.64575833", "0.6424869", "0.6422827", "0.6418735", "0.6409601", "0.64066297", "0.63987005", "0.6396402", "0.6395965", "0.6391", "0.6382792", "0.6378182", "0.6358747", "0.6358137", "0.6352183", "0.6351249", "0.63368326", "0.63360673", "0.63129425", "0.63108176", "0.63071996", "0.6286333", "0.62829804", "0.6267363", "0.62657124", "0.62629354", "0.62623644", "0.62598974", "0.62481165", "0.6240231", "0.6229775", "0.6225246", "0.62249655", "0.6217701", "0.6212732", "0.6202272", "0.61952204", "0.61838686", "0.61687756", "0.6166359", "0.616492", "0.61487335", "0.61487013", "0.6134157", "0.6116323", "0.61099035", "0.61065435", "0.6085156", "0.60844237", "0.6068439" ]
0.7215433
5
Method returning list of available datasets
public function getPpDatasets() { throw new NotSupportedException('MySQL does not support list of datasets!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatasetsList() {\n return $this->_get(3);\n }", "public function getDatasetsList() {\n return $this->_get(1);\n }", "public function getDatasetsList() {\n return $this->_get(4);\n }", "function getDataSets()\n {\n if ($this->getResource('wdrs:describedby')){\n $dataset = $this->getResource('wdrs:describedby')->all('void:inDataset');\n }else {\n $schemaUrls = $this->allResources('schema:url');\n $describedBy = array_filter($schemaUrls, function($schemaUrl)\n {\n return(strpos($schemaUrl->getURI(), 'worldcat.org/title'));\n });\n $describedBy = array_shift($describedBy);\n $dataset = $describedBy->all('void:inDataset');\n }\n \n return $dataset;\n }", "public function getDatasetNameList() {\n return $this->_get(17);\n }", "public function getDatasetNameList() {\n return $this->_get(6);\n }", "public function dataSets()\n\t{\n\t\treturn $this->data_sets;\n\t}", "public function select_datasets()\n {\n return array_diff($this->db->list_tables(), array('users', 'users_groups', 'user_visualisation', 'places', 'groups', 'login_attempts'));\n }", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "public static function getDataList () { return self::getList('data'); }", "public function getDataSourcesList() {\n return $this->_get(10);\n }", "public function hasDatasets() {\n return $this->_has(3);\n }", "public function hasDatasets() {\n return $this->_has(4);\n }", "public function getDataSourcesList() {\n return $this->_get(8);\n }", "public function hasDatasets() {\n return $this->_has(1);\n }", "protected function getDataSet()\n {\n return $this->createMySQLXMLDataSet(__DIR__ . '/../paczkolab_test.xml');\n }", "abstract protected function getDataSet();", "protected function availableFileSets(){\n if( $this->_availableFileSets === null ){\n $fileSetListObj = new FileSetList;\n $this->_availableFileSets = $fileSetListObj->get();\n }\n return $this->_availableFileSets;\n }", "public function getDataSourcesList() {\n return $this->_get(1);\n }", "public function get_all(){\n $cache_data_list=[];\n if($this->driver=='file'){\n foreach ($cache_list=$this->file->file_walk($this->path) as $value){\n $cache_data_list[]=$this->file->read_file($value);\n }\n }\n if($this->driver==\"redis\"){\n foreach ($this->redis->hGetAll($this->path) as $key=>$value){\n $cache_data_list[]=$value;\n }\n }\n return $cache_data_list;\n }", "protected function getDataSet() {\n\t\treturn $this->createXMLDataSet ( dirname ( __FILE__ ) . '\\..\\..\\data\\cron\\empty_dstable_1_article_2_attach_test_data.xml' );\n\t}", "public function getDatafiles()\n {\n return $this->game->getDatafiles();\n }", "public static function get_dataset()\r\n {\r\n $ds = new Datasets();\r\n return $ds->get_by_type(self::DATASET_TYPE);\r\n }", "public function getDatasets($resource = NULL, $study_id = NULL, $query = NULL, $from = 0, $limit = 50, $sort = NULL, $order = NULL, $network_id=NULL) {\n global $language;\n $this->setLastResponse(NULL);\n $from = empty($from) ? '0' : $from;\n $limit = empty($limit) ? '5' : $limit;\n $order = empty($order) ? '' : ($order == 'desc' ? '-' : '');\n $sort_rql_bucket = empty($sort) ? \"\" : \",sort($order$sort)\";\n $query = empty($query) ? '' : \",match($query,(Mica_dataset.name,Mica_dataset.acronym,Mica_dataset.description))\";\n $resource_params = empty($resource) ? '' : \",in(Mica_dataset.className,$resource)\";\n $network_params = empty($network_id) ? '' : \",in(Mica_dataset.networkId,$network_id)\";\n $studies_param = empty($study_id) ? '' :\",study(in(Mica_study.id,(\" . rawurlencode($study_id) . \")))\";\n\n if (!empty($query) || !empty($resource_params) || !empty($studies_param)) {\n $params = \"dataset(limit($from,$limit)$resource_params$network_params$query$sort_rql_bucket)$studies_param\";\n } else {\n $params = \"dataset(exists(Mica_dataset.id),limit($from,$limit)$sort_rql_bucket)\";\n }\n\n $params .= \",locale($language->language)\";\n $resource_query = '/datasets/_rql?query=' . $params;\n $this->drupalCache->MicaGetCache($resource_query);\n if(!isset($this->result_resource_query)){\n $url_datasets = $this->micaUrl . $resource_query;\n $request = new HttpClientRequest($url_datasets, array(\n 'method' => HttpClientRequest::METHOD_GET,\n 'headers' => $this->authorizationHeader(array(\n 'Accept' => array(parent::HEADER_JSON),\n )\n ),\n ));\n $client = $this->client();\n try {\n $data = $client->execute($request);\n $this->setLastResponse($client->lastResponse);\n $datasets = json_decode($data);\n if($datasets->datasetResultDto->totalCount!==0){\n $this->result_resource_query = new DatasetJoinResponseWrapper($datasets);\n $this->drupalCache->MicaSetCache($resource_query, $this->result_resource_query);\n }\n return $this->result_resource_query;\n }\n catch (HttpClientException $e) {\n watchdog('Mica Client', 'Connection to server fail, Error serve code : @code, message: @message',\n array(\n '@code' => $e->getCode(),\n '@message' => $e->getMessage()\n ), WATCHDOG_WARNING);\n $this->result_resource_query = NULL;\n return array();\n }\n }\n return $this->result_resource_query;\n }", "public function getDatastreams();", "protected function getDataSet()\n {\n return $this->createFlatXMLDataSet(dirname(__FILE__).'/_files/category.xml');\n }", "public function getMultipleData();", "public function getAvailableSites();", "protected function getDataSet(){\n return $this->createXMLDataSet(\n dirname(__FILE__) . '/../_dataSet/commonTest.xml'\n );\n }", "protected function getDataSet(){\n return $this->createXMLDataSet(\n dirname(__FILE__) . '/../_dataSet/commonTest.xml'\n );\n }", "function listSources() {\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$result = $this->_execute('SHOW TABLES FROM ' . $this->name($this->config['database']) . ';');\n\n\t\tif (!$result) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\n\t\t\twhile ($line = mysql_fetch_row($result)) {\n\t\t\t\t$tables[] = $line[0];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\t\t\treturn $tables;\n\t\t}\n\t}", "function listSources() {\n\t\t$db = $this->config['database'];\n\t\t$this->config['database'] = basename($this->config['database']);\n\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\n\t\t$result = $this->fetchAll(\"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;\");\n\n\t\tif (!$result || empty($result)) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\t\t\tforeach ($result as $table) {\n\t\t\t\t$tables[] = $table[0]['name'];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\n\t\t\t$this->config['database'] = $db;\n\t\t\treturn $tables;\n\t\t}\n\t\t$this->config['database'] = $db;\n\t\treturn array();\n\t}", "protected function getDataSet()\n {\n //Dataset TokenTest.xml has the minimal data we need to perform our tests\n $classFile = str_replace('.php', '.xml', __FILE__);\n return $this->createFlatXMLDataSet($classFile);\n }", "public function getDataSet()\n {\n return $this->getConnection()->createDataSet();\n }", "function datasets(string $id): array {\n if (!isset($this->features[$id]))\n return [];\n else\n return array_keys($this->features[$id]['files']);\n }", "public function get(): array {\n\n if ($this->options['evaluation'] === false) {\n // Look for previous training and prediction files we generated and couldn't be used\n // by machine learning backends because they weren't big enough.\n\n $pendingfiles = \\core_analytics\\dataset_manager::get_pending_files($this->modelid, $this->includetarget,\n array_keys($this->filesbytimesplitting));\n foreach ($pendingfiles as $timesplittingid => $files) {\n foreach ($files as $file) {\n $this->filesbytimesplitting[$timesplittingid][] = $file;\n }\n }\n }\n\n // We join the datasets by time splitting method.\n $timesplittingfiles = array();\n foreach ($this->filesbytimesplitting as $timesplittingid => $files) {\n\n if ($this->options['evaluation'] === true) {\n // Delete the previous copy. Only when evaluating.\n \\core_analytics\\dataset_manager::delete_previous_evaluation_file($this->modelid, $timesplittingid);\n }\n\n // Merge all course files into one.\n if ($this->includetarget) {\n $filearea = \\core_analytics\\dataset_manager::LABELLED_FILEAREA;\n } else {\n $filearea = \\core_analytics\\dataset_manager::UNLABELLED_FILEAREA;\n }\n $timesplittingfiles[$timesplittingid] = \\core_analytics\\dataset_manager::merge_datasets($files,\n $this->modelid, $timesplittingid, $filearea, $this->options['evaluation']);\n }\n\n if (!empty($pendingfiles)) {\n // We must remove them now as they are already part of another dataset.\n foreach ($pendingfiles as $timesplittingid => $files) {\n foreach ($files as $file) {\n $file->delete();\n }\n }\n }\n\n return $timesplittingfiles;\n }", "protected function getDataSet() {\n\t\treturn $this->createXMLDataSet ( dirname ( __FILE__ ) . '\\..\\..\\data\\cron\\1_DS_1_article_test_1_dupl_attach_1_unpub_attach_1_new_valid_DS_data.xml' );\n\t}", "function getDatasetDirectories(string $download_path): array\n{\n\t$datasets = [] ;\n\t$handle = opendir($download_path);\n\twhile (($file = readdir($handle)) !== false) {\n\t\tif ($file === '.' || $file === '..') {\n\t\t\techo \"skipping $file because dot file\".PHP_EOL;\n\t\t\tcontinue;\n\t\t}\n\t\tif ( true != is_dir(\"$download_path/$file\") ) {\n\t\t\techo \"skipping $file because not a directory\".PHP_EOL;\n\t\t\tcontinue;\n\t\t}\n\t\tif (1 != preg_match(\"/\\d+/\",$file) ) {\n\t\t\techo \"skipping $file because not matching digits\".PHP_EOL;\n\t\t\tcontinue;\n\t\t}\n\t\tarray_push($datasets, $file);\n\t}\n\treturn $datasets;\n}", "public function getDataSet()\n {\n $originalXml = dirname(__FILE__).'/Flats/all-original-data.xml';\n return $this->createFlatXMLDataSet($originalXml);\n }", "public function getDataSet()\n {\n $originalXml = dirname(__FILE__).'/Flats/all-original-data.xml';\n return $this->createFlatXMLDataSet($originalXml);\n }", "public function getDatasources()\n {\n return $this->datasources;\n }", "public function getAvailablePaths()\n {\n $paths = [];\n $datasources = array_reverse($this->datasources);\n foreach ($datasources as $datasource) {\n $paths = array_merge($paths, $datasource->getAvailablePaths());\n }\n return $paths;\n }", "public function getDataList(){\n return $this->_get(1);\n }", "function getAllDatas() {\n if (isset($_GET['application'])) {\n $application=htmlentities($_GET['application']);\n $path = \"../data/\".$application;\n }\n //liste les fichiers dans les dossiers de donnees\n $nb_fichier = 0;\n if($dossier = opendir($path)) {\n while(false !== ($fichier = readdir($dossier))){\n if($fichier != '.' && $fichier != '..' && $fichier != 'index.php' && $fichier != '.DS_Store' && $fichier != 'template.csv'){ \n $nb_fichier++;\n $nomFichier = substr($fichier, 0, -4);\n echo '<option value=\"'. $nomFichier .'\">'. $nomFichier .'</option>';\n } \n } \n closedir($dossier);\n } else {\n \t\techo'<option value=\"erreur\">erreur</option>';\n\t}\n}", "public function getAllData()\n {\n $result = array();\n\n foreach ($this->list as $item)\n $result[] = $item->getAllData();\n\n return $result;\n }", "protected function getAllFiles() {\n $sql = \"SELECT * FROM satdatameta\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n return $results;\n }", "public function index()\n\t{\n\t\t$datasets = Dataset::all();\n\n\t\treturn View::make('datasets.index', compact('datasets'));\n\t}", "protected function getDataSet()\n {\n $seedFilePath = __DIR__ . '/databaseXml/seed.xml';\n return $this->createXMLDataSet($seedFilePath);\n }", "public function get_all(){ \n\t\treturn $this->call('GET', '/admin/collects.json', array()); \n\t}", "public function listDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "public static function all()\n {\n if( $call = Master::$cMaster->APICall('0.9.1/db') )\n {\n $result = array();\n foreach( json_decode( $call, true ) as $db ){ array_push( $result, Database::DBWithIDName( $db['ID'], $db['name'] ) ); }\n return $result;\n }\n else{ commandResult( 500, \"Could not lookup databases\" ); }\n }", "public function get_dbs()\n\t{\n\t\treturn $this->driver_query('db_list');\n\t}", "function databases(){\n $this->execute(\"SELECT datname FROM pg_database WHERE datistemplate = false;\");\n $aDatabases = array();\n while ($aReg = $this->fetchRow()){\n $aDatabases[] = $aReg[0];\n }\n return $aDatabases;\n }", "public static function all(): array {\n $lines = [];\n foreach (Datasets::load('lines') as $line) {\n $lines[$line['name']] = $line;\n }\n\n return $lines;\n }", "public function getDatasourceOverviewData()\n {\n\n // create the ArrayList instance\n $datasources = new ArrayList();\n\n // load all virtual host nodes\n foreach ($this->getDatasourceRepository()->findAll() as $datasourceNode) {\n $datasources->add($this->toDatasourceOverviewData($datasourceNode));\n }\n\n // return the ArrayList instance\n return $datasources;\n }", "protected function getDataSet()\n {\n return new \\PHPUnit_Extensions_Database_DataSet_YamlDataSet(__DIR__ . '/DataSet/base.yml');\n }", "protected static function _getDataTypes()\n {\n return [];\n }", "protected function getDataSet()\n\t{\n\t\treturn $this->createXMLDataSet(dirname(__FILE__).'/_fixtures/DirectDeposit.fixture.xml');\n\t}", "public function getDatabases(){\n $pdo = $this->pdo;\n $databases = $pdo->prepare(\"SHOW DATABASES;\");\n $databases->execute();\n $databases = $databases->fetchAll($pdo::FETCH_NUM);\n foreach($databases as &$database)\n $database = $database[0];\n return $databases;\n }", "public function getOtherDataSourcesList() {\n return $this->_get(10);\n }", "public function getDataSetCollection(): DataSetCollection {\n\n return $this->dataSetCollection;\n\n }", "public function listAll()\n {\n return array_merge(\n $this->discovery()->findAllGroupAliasFiles(),\n $this->discovery()->findAllSingleAliasFiles()\n );\n }", "public function getAll()\n {\n return $this->database->getAll('Extension', 'slicerpackages');\n }", "public function listDatasets($projectId, $optParams = array()) {\n $params = array('projectId' => $projectId);\n $params = array_merge($params, $optParams);\n $data = $this->__call('list', array($params));\n if ($this->useObjects()) {\n return new Google_DatasetList($data);\n } else {\n return $data;\n }\n }", "public function showDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}", "public function listInMemoryDatabases(): array\n {\n return array_diff($this->listDatabases(), $this->listPersistedDatabases());\n }", "public function getDatasetIdArray()\n {\n $dataset = array();\n $classIdentifier = $this->openDataIni->variable( 'GeneralSettings', 'DatasetClassIdentifier' );\n $class = eZContentClass::fetchByIdentifier( $classIdentifier );\n if ( $class instanceof eZContentClass )\n {\n $params = array(\n 'ClassFilterType' => 'include',\n 'ClassFilterArray' => array( $classIdentifier ),\n 'Depth' => 1,\n 'DepthOperator' => 'ge'\n );\n $nodes = eZContentObjectTreeNode::subTreeByNodeID( $params, eZINI::instance( 'content.ini' )->variable( 'NodeSettings', 'RootNode' ) );\n foreach( $nodes as $node )\n {\n $dataset[] = self::generateUniqueId( $node->attribute( 'contentobject_id' ) );\n }\n }\n return $dataset;\n }", "public function getDataBaseFeeds()\n {\n return $this->dataBaseFeeds;\n }", "public function getDatasetNodes()\n {\n $nodes = array();\n $classIdentifier = $this->openDataIni->variable( 'GeneralSettings', 'DatasetClassIdentifier' );\n $class = eZContentClass::fetchByIdentifier( $classIdentifier );\n if ( $class instanceof eZContentClass )\n {\n $params = array(\n 'ClassFilterType' => 'include',\n 'ClassFilterArray' => array( $classIdentifier ),\n 'Depth' => 1,\n 'DepthOperator' => 'ge'\n );\n $nodes = eZContentObjectTreeNode::subTreeByNodeID( $params,\n eZINI::instance( 'content.ini' )->variable( 'NodeSettings', 'RootNode' ) ); \n }\n return $nodes;\n }", "protected function getDataSet()\n {\n return $this->getYamlDataSet('bookings.yml');\n }", "public static function getAllData() {\n $retData = '';\n\n // Iterate over all data fetchers and fetch data\n foreach (self::$dataFetchersObjects as $fetchObject) {\n $retData .= $fetchObject->readData();\n }\n\n return $retData;\n }", "public function getDatastreams() {\n \n }", "private function getDatasets($datasets) {\n $datasets_id = collect($datasets)->implode('id', ', ');\n $sql = \" AND t1.datasets_id\";\n\n return $sql .= ((count($datasets) === 1)) ? \" = $datasets_id\" : \" IN ($datasets_id)\";\n }", "public function getDatasList(){\n return $this->_get(5);\n }", "public function getListDataTable(){\n $folders = Folder::select(['id', 'name', 'description'])\n ->where('user_id', Auth::user()->id);\n \n return Datatables::of($folders)->make(true);\n }", "public function get_all ();", "public function findAllLoaded() {}", "public function databases()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/databases');\n }", "public function getResourceSets();", "public function getAllSetlists() {\n\t\t\t$query = \"SELECT setlist.setlist_id, setlist.date, artist.artist_name as artist_name, venue.venue_name as venue_name, venue.city, venue.state\n\t\t\t\t\tFROM setlist\n\t\t\t\t\tJOIN artist\n\t\t\t\t\tON setlist.artist_id = artist.artist_id\n\t\t\t\t\tJOIN venue\n\t\t\t\t\tON setlist.venue_id = venue.venue_id\n\t\t\t\t\tORDER by setlist.date DESC\";\n\t\t\t\t\t//WHERE user.id = ?\";\n\t\t\t$result = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n\t\t\t\n\t\t\t$setlist_array = array();\n\t\t\tif($result->num_rows > 0) {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\t\n\t\t\t}\n\t\t}", "public function listPersistedDatabases(): array\n {\n return $this->dataReader->listPersistedDatabases();\n }", "public function testDatasetReturnsData()\n {\n $size = 100;\n\n $response = $this->get('/api/dataset?size={$size}');\n\n $response->assertStatus(200);\n $response->assertJsonCount($size, \"\");\n }", "public function getTables();", "public function getTables();", "public function getTables();", "public function getListOfTables() {}", "protected function getDataSet()\n {\n return $this->createXMLDataSet(FIXTURE . '/Xml/bookAndAuthor.xml');\n }", "public static function data_images() {\n\t\tif ( empty( self::$images ) ) {\n\t\t\tself::$images = glob( dirname( dirname( __FILE__ ) ) . '/images/*' );\n\t\t}\n\n\t\treturn self::$images;\n\t}", "public static function getAll(): array;", "public function dataSets()\n\t{\n\t\tif (!$this->system->user->hasAdminPermissions('data_sets')) {\n\t\t\treturn Redirect::route('admin.dashboard');\n\t\t}\n\t\t$data_sets = DataSetsRepository::retrieve();\n\t\t$messages = $this->system->messages->get();\n\t\treturn View::make('data::data_sets.data_sets', compact('messages', 'data_sets'));\n\t}", "public function get_data() {\n $rv = [\n 'standard' => [],\n 'counties' => []\n ];\n // echo 'url: '. $this->url;\n if ($this->is_remote($this->url)) {\n // Remote fetch\n // echo 'is remote';\n if ($this->user && $this->passwd) {\n // echo 'user:'.$this->user;\n $auth = base64_encode($this->user . \":\" . $this->passwd);\n $context = stream_context_create(['http' => ['header' => \"Authorization: Basic $auth\"]]);\n // $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n $data_standards = file($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n // echo '$data_standards: '. $data_standards;\n // $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n $data_counties = file($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n // echo '$data_counties: '. $data_counties;\n }\n else {\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n }\n else {\n // Local files\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n // $rv['standard'] = $this->read_standards_file($data_standards);\n // $rv['counties'] = $this->read_counties_file($data_counties, $data_standards);\n\n // return $rv;\n\n $standards_and_committees = $this->read_standards_file($data_standards);\n // var_dump($standards_and_committees[0]);\n $listings = $this->read_counties_file($data_counties, $standards_and_committees[0], $standards_and_committees);\n $listings['committees'] = $standards_and_committees[1];\n return $listings;\n }", "public function getAllOptions()\n {\n $department = $this->_departmentFactory->create();\n $departmentItems = $department->getCollection();\n $this->_loadedData = array();\n \n foreach($departmentItems as $item) {\n\t\t\tarray_push($this->_loadedData,$item->getData());\n\t\t}\n\n return $this->_loadedData;\n // echo '<pre>';\n // print_r($this->_loadedData);\n // die;\n }", "public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }", "public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }", "public function loadAll()\n {\n $result = [];\n $paths = $this->discovery()->findAllGroupAliasFiles();\n foreach ($paths as $path) {\n $result = array_merge($result, $this->loadAllRecordsFromGroupAliasPath($path));\n }\n $paths = $this->discovery()->findAllSingleAliasFiles();\n foreach ($paths as $path) {\n $aliasRecords = $this->loadSingleSiteAliasFileAtPath($path);\n foreach ($aliasRecords as $aliasRecord) {\n $this->storeAliasRecordInResut($result, $aliasRecord);\n }\n }\n ksort($result);\n return $result;\n }", "abstract public function readDataSource(): Traversable;", "public function getList()\n {\n $list = new \\BearFramework\\DataList();\n foreach ($this->data as $addon) {\n $list[] = clone($addon);\n }\n return $list;\n }", "public function getDataProvider();", "public function getDataProvider();" ]
[ "0.746276", "0.74213374", "0.737682", "0.7341661", "0.69292605", "0.6902698", "0.690156", "0.6782518", "0.6723412", "0.6723412", "0.64663994", "0.6343628", "0.6245609", "0.6230754", "0.6222818", "0.61989164", "0.6135125", "0.6118722", "0.610989", "0.6104249", "0.6088492", "0.6017814", "0.5957042", "0.5950871", "0.59172416", "0.58904636", "0.58610046", "0.585345", "0.58514863", "0.5850845", "0.5850845", "0.58313334", "0.58264226", "0.58257776", "0.58151907", "0.58106047", "0.58046156", "0.5792001", "0.57841176", "0.5757554", "0.5757554", "0.57537985", "0.5715803", "0.571104", "0.5700865", "0.5697705", "0.5695895", "0.56931263", "0.56761026", "0.5662823", "0.56600374", "0.5659536", "0.56467295", "0.5646503", "0.56463164", "0.56417537", "0.5594815", "0.5587093", "0.5586169", "0.5568022", "0.5561922", "0.5559558", "0.5551726", "0.5541586", "0.55315536", "0.5529111", "0.55288774", "0.55076486", "0.55072206", "0.5504451", "0.54957837", "0.5490991", "0.54882395", "0.54800963", "0.54717565", "0.54431903", "0.5441702", "0.5431333", "0.5420164", "0.54115766", "0.54101396", "0.54076385", "0.5393871", "0.5393129", "0.5393129", "0.5393129", "0.53823954", "0.5378606", "0.5374421", "0.5371654", "0.53684074", "0.5368368", "0.53665006", "0.53599894", "0.5357173", "0.53570604", "0.53418666", "0.5340765", "0.5338327", "0.5338327" ]
0.7043735
4
Method returning info about one selected dataset
public function getPpDataset($ppDatasetId) { return new PpDataset($ppDatasetId, $ppDatasetId, null, PpConnection::TYPE_MYSQL, $this->getRowsCount($ppDatasetId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getDataSet();", "public function dataset()\n {\n return $this->data;\n }", "public function Individualgetdata();", "public function getOneDataset()\n\t{\t\n\t\tglobal $ilDB;\n\t\t\n\t\t$data_type = array();\n\t\t$data_value = array();\n\t\t\n\t\t$query = 'SELECT * FROM '.$this->dbTable.' WHERE ';\n\t\t\n\t\tif($this->getMDB2Query() != '' && $this->getMDB2DataType() != '' && $this->getMDB2DataValue() != '')\n\t\t{\n\t\t\t$query .= $this->getMDB2Query();\n\t\t\tif ($this->orderField != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" ORDER BY \".$this->orderField;\n\t\t\t}\n\t\t\t$data_type = $data_type + $this->getMDB2DataType();\n\t\t\t$data_value = $data_value + $this->getMDB2DataValue();\n\t\t\t\n\t\t\t\n\t\t\t$res = $ilDB->queryf($query, $data_type, $data_value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .= '1';\n\t\t\t\n\t\t\tif ($this->orderField != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" ORDER BY \".$this->orderField;\n\t\t\t}\n\t\t\t\n\t\t\t$res = $ilDB->query($query);\n\t\t\t\n\t\t}\n\t\t$row = $ilDB->fetchAssoc($res);\n\t\t\n\t\treturn $row;\n\n\t}", "public function get_data();", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function viewData($id = null) {\n\t\t$data = $this->Molecular_feature->findById($id); //if the id is passed then find on that\n if (!$data){ //if the set does not exist\n throw new NotFoundExcpetion(__('Invalid Data Record'));\n } //if the sample set with that id exists\n $this->set('info', $data);// passes the set to the page\n\t}", "public function retreiveData($data_label = \"\")\n\t{\n\n\t}", "abstract function getdata();", "public function hasDatasetId() {\n return $this->_has(2);\n }", "public function hasDatasetId() {\n return $this->_has(2);\n }", "public function getInformation();", "public function data();", "public function data();", "public function getDataSet()\n {\n return $this->getConnection()->createDataSet();\n }", "public function getSummaryData();", "abstract public function getDataDesc();", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "private function parse_dataset() {\n\t\t$dataset = $_POST['dataset'];\n\t\t$this->expat['dataset'] = $dataset;\n\n\t\t// Set data transform\n\t\t$this->expat['dataTransform'] = $this->_expat['dataTransform'];\n\n\t\t// Retrieve dataset metadata\n\t\t$db = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_NAME.\";port=3306;charset=utf8\", DB_USER, DB_PASS);\n\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t$q = $db->prepare(\"SELECT\n\t\t\tGenome,\n\t\t\tSpecies,\n\t\t\tExperiment,\n\t\t\tIDtype,\n\t\t\tMySQLTable\n\t\tFROM expat_datasets\n\t\tWHERE Dataset = ?\");\n\n\t\t// Execute query with array of values\n\t\t$q->execute(array($dataset));\n\n\t\t// Get results\n\t\tif($q->rowCount() > 0) {\n\t\t\twhile($row = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$this->expat['genome'] = $row['Genome'];\n\t\t\t\t$this->expat['species'] = $row['Species'];\n\t\t\t\t$this->expat['experiment'] = $row['Experiment'];\n\t\t\t\t$this->expat['queryId'] = $row['IDtype'];\n\t\t\t\t$this->expat['queryTable'] = $row['MySQLTable'];\n\n\t\t\t\tswitch ($row['IDtype']) {\n\t\t\t\t\tcase 'geneid':\n\t\t\t\t\t\t$this->expat['rowType'] = 'Gene ID';\n\t\t\t\t\t\t$this->expat['rowText'] = 'Gene(s)'; \n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'probeid':\n\t\t\t\t\t\t$this->expat['rowType'] = 'Probe ID';\n\t\t\t\t\t\t$this->expat['rowText'] = 'Probe(s)'; \n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'transcriptid':\n\t\t\t\t\t\t$this->expat['rowType'] = 'Transcript ID';\n\t\t\t\t\t\t$this->expat['rowText'] = 'Transcript(s)'; \n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error->set_status(404);\n\t\t\t$this->error->set_message('The dataset you have selected: ' + $dataset + ' is not available. Please try again.');\n\t\t\t$this->error->execute();\n\t\t}\n\n\t\t// Mapping is only applicable for ljgea experiment\n\t\t$this->expat['mapped'] = false;\n\n\t\t// Perform sanity check on selected dataset\n\t\tif ($dataset === 'ljgea-geneid') {\n\t\t\t$this->expat['queryMappedId'] = 'ProbeID';\n\t\t\t$this->expat['mapped'] = array(\n\t\t\t\t'dataset' => 'ljgea-probeid',\n\t\t\t\t'rowType' => 'Probe ID',\n\t\t\t\t'text' => 'Probe(s)'\n\t\t\t);\n\t\t} else if ($dataset === 'ljgea-probeid') {\n\t\t\t$this->expat['queryMappedId'] = 'ProbeID';\n\t\t\t$this->expat['mapped'] = array(\n\t\t\t\t'dataset' => 'ljgea-geneid',\n\t\t\t\t'rowType' => 'Gene ID',\n\t\t\t\t'text' => 'Gene(s)'\n\t\t\t);\n\t\t}\n\t\telse if ($dataset === 'reidd-2019-barleynutrient') {\n\t\t\t$this->expat['externalUrl'] = 'https://plants.ensembl.org/Hordeum_vulgare/Gene/Summary?g=';\n\t\t}\n\n\t\t// Define datasets\n\t\t$datasets = array(\n\t\t\t'ljgea-geneid' => array(\n\t\t\t\t'WT_control1',\n\t\t\t\t'WT_Drought1',\n\t\t\t\t'Ljgln2_2_Control1',\n\t\t\t\t'Ljgln2_2_Drought1',\n\t\t\t\t'root_4dpicontrol1B',\n\t\t\t\t'root_4dpimycorrhized1D',\n\t\t\t\t'root_28dpicontrol1A',\n\t\t\t\t'root_28dpimycorrhized1C',\n\t\t\t\t'WT_root_tip_3w_uninocul_1',\n\t\t\t\t'WT_root_3w_uninocul_1',\n\t\t\t\t'WT_root_3w_5mM_nitrate_1',\n\t\t\t\t'WT_root_6w_5mM_nitrate_1',\n\t\t\t\t'WT_shoot_3w_5mM_nitrate_1',\n\t\t\t\t'WT_shoot_3w_uninocul_1',\n\t\t\t\t'WT_shoot_3w_inocul3_1',\n\t\t\t\t'WT_leaf_6w_5mM_nitrate_1',\n\t\t\t\t'WT_stem_6w_5mM_nitrate_1',\n\t\t\t\t'WT_flower_13w_5mM_nitrate_1',\n\t\t\t\t'har1_root_3w_uninocul_2',\n\t\t\t\t'har1_root_3w_inocul3_2',\n\t\t\t\t'har1_shoot_3w_uninocul_1',\n\t\t\t\t'har1_shoot_3w_inocul3_1',\n\t\t\t\t'WT_root_3w_nodC_inocul1_1',\n\t\t\t\t'WT_root_3w_inocul1_1',\n\t\t\t\t'WT_root_3w_inocul3_1',\n\t\t\t\t'WT_nodule_3w_inocul14_1',\n\t\t\t\t'WT_nodule_3w_inocul21_1',\n\t\t\t\t'WT_root_nodule_3w_inocul7_1',\n\t\t\t\t'WT_root_nodule_3w_inocul21_1',\n\t\t\t\t'WT_rootSZ_3w_uninocul_1',\n\t\t\t\t'WT_rootSZ_3w_Nod_inocul1_1',\n\t\t\t\t'WT_rootSZ_3w_inocul1_1',\n\t\t\t\t'nfr5_rootSZ_3w_uninocul_1',\n\t\t\t\t'nfr5_rootSZ_3w_inocul1_1',\n\t\t\t\t'nfr1_rootSZ_3w_uninocul_1',\n\t\t\t\t'nfr1_rootSZ_3w_inocul1_1',\n\t\t\t\t'nup133_rootSZ_3w_uninocul_1',\n\t\t\t\t'nup133_rootSZ_3w_inocul1_1',\n\t\t\t\t'cyclops_root_3w_uninocul',\n\t\t\t\t'cyclops_root_nodule_3w_inocul21',\n\t\t\t\t'nin_rootSZ_3w_uninocul_1',\n\t\t\t\t'nin_rootSZ_3w_inocul1_1',\n\t\t\t\t'sen1_root_3w_uninocul_1',\n\t\t\t\t'sen1_nodule_3w_inocul21_1',\n\t\t\t\t'sst1_root_3w_uninocul_1',\n\t\t\t\t'sst1_nodule_3w_inocul21_1',\n\t\t\t\t'cyclops_root_3w_inocul',\n\t\t\t\t'Shoot_0mM_sodiumChloride_1',\n\t\t\t\t'Shoot_25mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_50mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_75mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_50mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Shoot_100mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Shoot_150mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Lburttii_Ctrol_A',\n\t\t\t\t'Lburttii_Salt_A',\n\t\t\t\t'Lcorniculatus_Ctrol_A',\n\t\t\t\t'Lcorniculatus_Salt_A',\n\t\t\t\t'Lfilicaulis_Ctrol_A',\n\t\t\t\t'Lfilicaulis_Salt_A',\n\t\t\t\t'Lglaber_Ctrol_A',\n\t\t\t\t'Lglaber_Salt_A',\n\t\t\t\t'Ljaponicus_Gifu_Ctrol_A',\n\t\t\t\t'Ljaponicus_Gifu_Salt_A',\n\t\t\t\t'Ljaponicus_MG20_Ctrol_A',\n\t\t\t\t'Ljaponicus_MG20_Salt_A',\n\t\t\t\t'Luliginosus_Ctrol_A',\n\t\t\t\t'Luliginosus_Salt_A',\n\t\t\t\t'Fl_1',\n\t\t\t\t'Pod20_1',\n\t\t\t\t'Seed10d_1',\n\t\t\t\t'Seed12d_1',\n\t\t\t\t'Seed14d_1',\n\t\t\t\t'Seed16d_1',\n\t\t\t\t'Seed20d_1',\n\t\t\t\t'Leaf_1',\n\t\t\t\t'Pt_1',\n\t\t\t\t'Stem_1',\n\t\t\t\t'Root_1',\n\t\t\t\t'Root0h_1',\n\t\t\t\t'Nod21_1'\n\t\t\t),\n\t\t\t'ljgea-probeid' => array(\n\t\t\t\t'WT_control1',\n\t\t\t\t'WT_Drought1',\n\t\t\t\t'Ljgln2_2_Control1',\n\t\t\t\t'Ljgln2_2_Drought1',\n\t\t\t\t'root_4dpicontrol1B',\n\t\t\t\t'root_28dpicontrol1A',\n\t\t\t\t'root_4dpimycorrhized1D',\n\t\t\t\t'root_28dpimycorrhized1C',\n\t\t\t\t'WT_root_tip_3w_uninocul_1',\n\t\t\t\t'WT_root_3w_uninocul_1',\n\t\t\t\t'WT_root_3w_5mM_nitrate_1',\n\t\t\t\t'WT_root_6w_5mM_nitrate_1',\n\t\t\t\t'WT_shoot_3w_5mM_nitrate_1',\n\t\t\t\t'WT_shoot_3w_uninocul_1',\n\t\t\t\t'WT_shoot_3w_inocul3_1',\n\t\t\t\t'WT_leaf_6w_5mM_nitrate_1',\n\t\t\t\t'WT_stem_6w_5mM_nitrate_1',\n\t\t\t\t'har1_root_3w_uninocul_2',\n\t\t\t\t'har1_root_3w_inocul3_2',\n\t\t\t\t'har1_shoot_3w_inocul3_1',\n\t\t\t\t'WT_root_3w_nodC_inocul1_1',\n\t\t\t\t'WT_root_3w_inocul1_1',\n\t\t\t\t'WT_root_3w_inocul3_1',\n\t\t\t\t'WT_nodule_3w_inocul14_1',\n\t\t\t\t'WT_nodule_3w_inocul21_1',\n\t\t\t\t'WT_root_nodule_3w_inocul21_1',\n\t\t\t\t'WT_rootSZ_3w_inocul1_1',\n\t\t\t\t'WT_rootSZ_3w_Nod_inocul1_1',\n\t\t\t\t'nfr5_rootSZ_3w_uninocul_1',\n\t\t\t\t'nfr5_rootSZ_3w_inocul1_1',\n\t\t\t\t'nfr1_rootSZ_3w_uninocul_1',\n\t\t\t\t'nfr1_rootSZ_3w_inocul1_1',\n\t\t\t\t'nup133_rootSZ_3w_uninocul_1',\n\t\t\t\t'nup133_rootSZ_3w_inocul1_1',\n\t\t\t\t'nin_rootSZ_3w_uninocul_1',\n\t\t\t\t'nin_rootSZ_3w_inocul1_1',\n\t\t\t\t'sen1_root_3w_uninocul_1',\n\t\t\t\t'sen1_nodule_3w_inocul21_1',\n\t\t\t\t'sst1_root_3w_uninocul_1',\n\t\t\t\t'sst1_nodule_3w_inocul21_1',\n\t\t\t\t'Shoot_0mM_sodiumChloride_1',\n\t\t\t\t'Shoot_25mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_50mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_75mM_sodiumChloride_Initial_1',\n\t\t\t\t'Shoot_50mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Shoot_100mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Shoot_150mM_sodiumChloride_Gradual_1',\n\t\t\t\t'Lburttii_Ctrol_A',\n\t\t\t\t'Lburttii_Salt_A',\n\t\t\t\t'Lcorniculatus_Ctrol_A',\n\t\t\t\t'Lcorniculatus_Salt_A',\n\t\t\t\t'Lfilicaulis_Ctrol_A',\n\t\t\t\t'Lfilicaulis_Salt_A',\n\t\t\t\t'Lglaber_Ctrol_A',\n\t\t\t\t'Lglaber_Salt_A',\n\t\t\t\t'Ljaponicus_Gifu_Ctrol_A',\n\t\t\t\t'Ljaponicus_Gifu_Salt_A',\n\t\t\t\t'Ljaponicus_MG20_Ctrol_A',\n\t\t\t\t'Ljaponicus_MG20_Salt_A',\n\t\t\t\t'Luliginosus_Ctrol_A',\n\t\t\t\t'Luliginosus_Salt_A',\n\t\t\t\t'Fl_1',\n\t\t\t\t'Pod20_1',\n\t\t\t\t'Seed10d_1',\n\t\t\t\t'Seed12d_1',\n\t\t\t\t'Seed14d_1',\n\t\t\t\t'Seed16d_1',\n\t\t\t\t'Seed20d_1',\n\t\t\t\t'Leaf_1',\n\t\t\t\t'Pt_1',\n\t\t\t\t'Stem_1',\n\t\t\t\t'Root_1',\n\t\t\t\t'Root0h_1',\n\t\t\t\t'Nod21_1'\n\t\t\t),\n\t\t\t'rnaseq-giovanettim-2015-am' => array(\n\t\t\t\t'Control_H2O',\n\t\t\t\t'Treatment_AMGSE_24h',\n\t\t\t\t'Treatment_AMGSE_48h'\n\t\t\t),\n\t\t\t'rnaseq-handay-2015' => array(\n\t\t\t\t'MAFF3',\n\t\t\t\t'MAFF12',\n\t\t\t\t'AM15',\n\t\t\t\t'AM27',\n\t\t\t\t'rhnon',\n\t\t\t\t'AMnon'\n\t\t\t),\n\t\t\t'rnaseq-sasakit-2014' => array(\n\t\t\t\t'MG20_shoot',\n\t\t\t\t'har1_shoot',\n\t\t\t\t'CLE_RS1ox',\n\t\t\t\t'CLE_RS2ox'\n\t\t\t),\n\t\t\t'rnaseq-suzakit-2014' => array(\n\t\t\t\t'MG20_5dMAFF',\n\t\t\t\t'MG20_mock',\n\t\t\t\t'vag1_5dMAFF',\n\t\t\t\t'vag1_mock'\n\t\t\t),\n\t\t\t'rnaseq-davidm-2017-rootshoottotalreads' => array(\n\t\t\t\t'Root_H2O',\n\t\t\t\t'Root_R7A',\n\t\t\t\t'Shoot_H2O',\n\t\t\t\t'Shoot_R7A'\n\t\t\t),\n\t\t\t'rnaseq-davidm-2017-rootshootuniquereads' => array(\n\t\t\t\t'Root_H2O',\n\t\t\t\t'Root_R7A',\n\t\t\t\t'Shoot_H2O',\n\t\t\t\t'Shoot_R7A'\n\t\t\t),\n\t\t\t'rnaseq-kellys-2017-microbialspectrum' => array(\n\t\t\t\t'RootHair_H2O_1dpi',\n\t\t\t\t'RootHair_nodC_1dpi',\n\t\t\t\t'RootHair_R7A_1dpi',\n\t\t\t\t'RootHair_R7A_3dpi',\n\t\t\t\t'RootHair_NF_1dpi',\n\t\t\t\t'NodulePrimordia_R7A_7dpi',\n\t\t\t\t'Nodule_R7A_21dpi',\n\t\t\t\t'Root_H2O_1dpi',\n\t\t\t\t'Root_H2O_3dpi',\n\t\t\t\t'Root_Ml_R7A_1dpi',\n\t\t\t\t'Root_Ml_R7A_3dpi',\n\t\t\t\t'Root_Sf_HH103_1dpi',\n\t\t\t\t'Root_Sf_HH103_3dpi',\n\t\t\t\t'Root_Be_1dpi',\n\t\t\t\t'Root_Be_3dpi',\n\t\t\t\t'Root_Pst_DC3000_1dpi',\n\t\t\t\t'Root_Pst_DC3000_3dpi',\n\t\t\t\t'Root_Rs_JS763_1dpi',\n\t\t\t\t'Root_Rs_JS763_3dpi'\n\t\t\t),\n\t\t\t'reidd-2020-gifuatlas' => array(\n\t\t\t\t'ZON_1hr_mock',\n\t\t\t\t'ZON_1hr_BA',\n\t\t\t\t'ZON_24hr_mock',\n\t\t\t\t'ZON_24hr_BA',\n\t\t\t\t'ZON_24hr_R7A',\n\t\t\t\t'Nodules_10dpi',\n\t\t\t\t'3dpi_root_mock',\n\t\t\t\t'3dpi_root_R7A',\n\t\t\t\t'3dpi_shoot_mock',\n\t\t\t\t'3dpi_shoot_R7A',\n\t\t\t\t'AM_15dpi',\n\t\t\t\t'AM_27dpi',\n\t\t\t\t'AM_mock_15d',\n\t\t\t\t'Mature_flower',\n\t\t\t\t'Immature_flower',\n\t\t\t\t'Pod',\n\t\t\t\t'Seed',\n\t\t\t\t'Root',\n\t\t\t\t'Leaf',\n\t\t\t\t'AM_mock_27d_P',\n\t\t\t\t'AM_mock_27d',\n\t\t\t\t'Root_hair_mock_rhizobia',\n\t\t\t\t'Root_hair_nodC_24hr',\n\t\t\t\t'Root_hair_R7A_24hr',\n\t\t\t\t'Root_hair_R7A_72hr',\n\t\t\t\t'Root_hair_mock_NF',\n\t\t\t\t'Root_hair_NF_24hr',\n\t\t\t\t'Nodule_primordia_7dpi',\n\t\t\t\t'Nodules_21dpi',\n\t\t\t\t'Root_mock_microbialspectrum',\n\t\t\t\t'M_loti_R7A_3dpi',\n\t\t\t\t'Bradyrhizobium_elkanii_USDA61_3dpi',\n\t\t\t\t'Sinorhizobium_fredii_HH103_3dpi',\n\t\t\t\t'Pseudomonas_syringae_pv_tomato_DC3000_3dpi',\n\t\t\t\t'Ralstonia_solanacearum_JS763_3dpi'\n\t\t\t),\n\t\t\t'montielj-2020-IRBG74infection' => array(\n\t\t\t\t'Mock_root_3d',\n\t\t\t\t'IRBG74_root_3d',\n\t\t\t\t'IRBG74_root_nodA_3d',\n\t\t\t\t'Mock_root_5d',\n\t\t\t\t'IRBG74_root_5d',\n\t\t\t\t'IRBG74_root_nodA_5d',\n\t\t\t\t'Mock_root_10d',\n\t\t\t\t'IRBG74_root_10d',\n\t\t\t\t'IRBG74_root_nodA_10d'\n\t\t\t)\n\t\t);\n\n\t\t$userGroups = array_filter(explode(',', is_logged_in()['UserGroup']));\n\t\tif(is_allowed_access_by_user_group($userGroups)) {\n\t\t\t$private_datasets = array(\n\t\t\t\t'rnaseq-kellys-2015-bacteria' => array(\n\t\t\t\t\t'277_exoU_24',\n\t\t\t\t\t'277_exoU_72',\n\t\t\t\t\t'277_exoYF_24',\n\t\t\t\t\t'277_exoYF_72',\n\t\t\t\t\t'277_H2O_24',\n\t\t\t\t\t'277_nodC_24',\n\t\t\t\t\t'277_R7A_24',\n\t\t\t\t\t'277_R7A_72',\n\t\t\t\t\t'311_exoU_24',\n\t\t\t\t\t'311_exoU_72',\n\t\t\t\t\t'311_exoYF_24',\n\t\t\t\t\t'311_exoYF_72',\n\t\t\t\t\t'311_H2O_24',\n\t\t\t\t\t'311_nodC_24',\n\t\t\t\t\t'311_R7A_24',\n\t\t\t\t\t'311_R7A_72',\n\t\t\t\t\t'G_exoU_24',\n\t\t\t\t\t'G_exoU_72',\n\t\t\t\t\t'G_exoYF_24',\n\t\t\t\t\t'G_exoYF_72',\n\t\t\t\t\t'G_H2O_24',\n\t\t\t\t\t'G_nodC_24',\n\t\t\t\t\t'G_R7A_24',\n\t\t\t\t\t'G_R7A_72'\n\t\t\t\t),\n\t\t\t\t'rnaseq-kellys-2015-purifiedcompounds' => array(\n\t\t\t\t\t'G_H2O_24',\n\t\t\t\t\t'277_H2O_24',\n\t\t\t\t\t'311_H2O_24',\n\t\t\t\t\t'G_NF_24',\n\t\t\t\t\t'277_NF_24',\n\t\t\t\t\t'311_NF_24',\n\t\t\t\t\t'G_R7AEPS_24',\n\t\t\t\t\t'277_R7AEPS_24',\n\t\t\t\t\t'311_R7AEPS_24',\n\t\t\t\t\t'G_UEPS_24',\n\t\t\t\t\t'277_UEPS_24',\n\t\t\t\t\t'311_UEPS_24',\n\t\t\t\t\t'G_NF_R7AEPS_24',\n\t\t\t\t\t'277_NF_R7AEPS_24',\n\t\t\t\t\t'311_NF_R7AEPS_24',\n\t\t\t\t\t'G_NF_UEPS_24',\n\t\t\t\t\t'277_NF_UEPS_24',\n\t\t\t\t\t'311_NF_UEPS_24'\n\t\t\t\t),\n\t\t\t\t'rnaseq-murakamie-2016' => array(\n\t\t\t\t\t'G_H2O',\n\t\t\t\t\t'G_NF',\n\t\t\t\t\t'38534_H2O',\n\t\t\t\t\t'38534_NF',\n\t\t\t\t\t'4820_H2O',\n\t\t\t\t\t'4820_NF',\n\t\t\t\t\t'nfr1_H2O',\n\t\t\t\t\t'nfr1_NF'\n\t\t\t\t),\n\t\t\t\t'reidd-2019-barleynutrient' => array(\n\t\t\t\t\t'N-P-_Mainroot',\n\t\t\t\t\t'N-P-_Lateralroot',\n\t\t\t\t\t'N-P-_Shoot',\n\t\t\t\t\t'N-P+_Mainroot',\n\t\t\t\t\t'N-P+_Lateralroot',\n\t\t\t\t\t'N-P+_Shoot',\n\t\t\t\t\t'N+P-_Mainroot',\n\t\t\t\t\t'N+P-_Lateralroot',\n\t\t\t\t\t'N+P-_Shoot',\n\t\t\t\t\t'N+P+_Mainroot',\n\t\t\t\t\t'N+P+_Lateralroot'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$datasets = array_merge($datasets, $private_datasets);\n\t\t}\n\n\t\t// Write to private variable\n\t\t$this->_expat['datasets'] = $datasets;\n\t}", "public static function getDataSetType()\n {\n return static::$datasetType;\n }", "abstract public function information();", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function getData($name);", "public function hasDatasetName() {\n return $this->_has(6);\n }", "public static function get_dataset()\r\n {\r\n $ds = new Datasets();\r\n return $ds->get_by_type(self::DATASET_TYPE);\r\n }", "public function getInfo();", "private function getData()\n\t{\n\t\t// get the gallery record\n\t\t$this->record = BackendSlideshowModel::getImage($this->id);\n\t\t$this->record2 = BackendSlideshowModel::getGallery($this->galleryId);\n\t\t\n\t}", "public function hasDatasetName() {\n return $this->_has(17);\n }", "public function getContent() {\n return $this->arDataset; \n }", "public function getData($name = null);", "public function getDataWithTypeCurrent() {}", "function get_data()\n {\n }", "function info($what){\n if(isset($this->set[$what])) return $this->set[$what];\n return $this->key;\n }", "function dataset0 ( ) // 允許外界直接[接觸]到內部的_dataset (可能反向排序)\n{\n return $this->_dataset;\n}", "public function testCanGetDatasetByTitleAndOptionallyByAccountAndProject() {\n AuthenticationHelper::login(\"[email protected]\", \"password\");\n\n $topLevel = new DatasetInstanceSummary(\"Top Level Dataset\", \"test-json\");\n $topLevelId = $this->datasetService->saveDataSetInstance($topLevel, null, null);\n\n $account1 = new DatasetInstanceSummary(\"Account Dataset 1\", \"test-json\");\n $account1Id = $this->datasetService->saveDataSetInstance($account1, null, 1);\n\n $account2 = new DatasetInstanceSummary(\"Account Dataset 2\", \"test-json\");\n $account2Id = $this->datasetService->saveDataSetInstance($account2, null, 2);\n\n $project1 = new DatasetInstanceSummary(\"Project Dataset 1\", \"test-json\");\n $project1Id = $this->datasetService->saveDataSetInstance($project1, \"soapSuds\", 2);\n\n $project2 = new DatasetInstanceSummary(\"Project Dataset 2\", \"test-json\");\n $project2Id = $this->datasetService->saveDataSetInstance($project2, \"wiperBlades\", 2);\n\n $this->assertEquals($this->datasetService->getDataSetInstance($topLevelId), $this->datasetService->getDataSetInstanceByTitle(\"Top Level Dataset\", null, null));\n $this->assertEquals($this->datasetService->getDataSetInstance($account1Id), $this->datasetService->getDataSetInstanceByTitle(\"Account Dataset 1\", null, 1));\n $this->assertEquals($this->datasetService->getDataSetInstance($account2Id), $this->datasetService->getDataSetInstanceByTitle(\"Account Dataset 2\", null, 2));\n $this->assertEquals($this->datasetService->getDataSetInstance($project1Id), $this->datasetService->getDataSetInstanceByTitle(\"Project Dataset 1\", \"soapSuds\", 2));\n $this->assertEquals($this->datasetService->getDataSetInstance($project2Id), $this->datasetService->getDataSetInstanceByTitle(\"Project Dataset 2\", \"wiperBlades\", 2));\n\n\n }", "abstract public function getCorrespondingMetaData();", "function getDataSets()\n {\n if ($this->getResource('wdrs:describedby')){\n $dataset = $this->getResource('wdrs:describedby')->all('void:inDataset');\n }else {\n $schemaUrls = $this->allResources('schema:url');\n $describedBy = array_filter($schemaUrls, function($schemaUrl)\n {\n return(strpos($schemaUrl->getURI(), 'worldcat.org/title'));\n });\n $describedBy = array_shift($describedBy);\n $dataset = $describedBy->all('void:inDataset');\n }\n \n return $dataset;\n }", "public function dataSet()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\DataSet');\n\t}", "public function getData()\n {\n }", "public function getData()\r\n {\r\n }", "static public function selectInfo($info);", "abstract protected function getDataProvider();", "function getInfo($id){\r\n\t\t$this->getQuestion($id);\r\n\t}", "function get_data($name)\n {\n }", "abstract protected function data();", "public function retrieveData(){\n\t\t$mParser = new RecipeParser;\n\t\t$mParser->retrieveInfoForObject($this);\n\t}", "public function getData() {}", "function getPhotoSetInfo($photoset_id){\n\n\t\t/* Get Photoset Name and Description */\n\t\t$photoset_info = $this->askFlickr('photosets.getInfo','&photoset_id='.$photoset_id);\n\n\t\t/* Return Photo Info Object */\n\t\treturn $photoset_info;\n\t}", "public function show($id)\n\t{\n\t\t$dataset = Dataset::findOrFail($id);\n\n\t\treturn View::make('datasets.show', compact('dataset'));\n\t}", "function fiftyone_degrees_get_dataset_name($headers) {\n $name = fiftyone_degrees_read_ascii($headers['info']['data_set_name_offset'], $headers);\n return $name;\n}", "function getInfo();", "function get_data($name) {\n return isset($this->data[$name]) ? $this->data[$name] : null;\n }", "function sample_infos($sample_id) {\n\t$dbh = db_connect(); #DATABASE CONNEXION\n\n\t$sample_name = db_finder('SAMPLES' \t\t , 'NAME' \t \t\t, 'ID' \t\t , $sample_id);\n\t$artist_id \t = db_finder('SAMPLES_ARTISTS', 'ARTIST_ID' \t, 'SAMPLE_ID' , $sample_id);\n\t$artist_name = db_finder('ARTISTS' \t\t , 'NAME' \t \t\t, 'ID' \t\t , $artist_id);\n\t$difficulty = db_finder('SAMPLES' \t\t , 'DIFFICULTY'\t, 'ID' \t\t , $sample_id);\n\t$type \t\t = 'Musique';\n\t//$type \t\t = type_by_sampleID(\t\t\t\t\t\t\t\t\t\t\t$sample_id);\n\t$categories = categories_by_sampleID(\t\t\t\t\t\t\t\t\t $sample_id);\n\t\n\treturn [\n\t\t'SAMPLE_NAME' => $sample_name, \t'SAMPLE_ID' => $sample_id,\n\t\t'ARTIST_NAME' => $artist_id, \t'ARTIST_ID' => $artist_name,\n\t\t'CATEGORIES' => $categories, \t'TYPE' \t=> $type,\n\t\t'DIFFICULTY' => $difficulty\n\t];\n}", "public function getMultipleData();", "function get_data_item( $name ) {\n\t\treturn $this->data_layer()->get_item( $name );\n\t}", "public function select(): DataSet\n {\n if (!$this->fileExists) {\n throw new AccessLayerException(sprintf(\"Table file %s does not exists!\", $this->path));\n }\n\n return $this->data;\n }", "public function getMetaData();", "public function getData() {\n\t\t// si les donnée ne sont pas initialisé, on les crée\n\t\tif (empty($this->DataSet)) {$this->setDataSet(new pData());}\n\t\treturn $this->DataSet;\n\t}", "public function getInfo() {}", "public function getInfo() {}", "public static function getData() {}", "public function getSingleData(){\n //buatlah query\n $sqlQuery = \"SELECT \n * \n FROM\n \".$this->t_name.\"\n WHERE \n id = ?\n LIMIT 0,1\";\n //siapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n //bindParam\n $stmt->bindParam(1,$this->id);\n //eksekusi perintahnya\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $dataRow['name'];\n $this->email = $dataRow['email'];\n $this->age = $dataRow['age'];\n $this->designation = $dataRow['designation'];\n $this->created = $dataRow['created'];\n }", "public function getInformation(): array;", "public function getDatasetNameList() {\n return $this->_get(6);\n }", "public function getData()\n {\n // TODO: Implement getData() method.\n }", "public function getData()\n {\n // TODO: Implement getData() method.\n }", "private function Info() {\n\n\t\t$db=$GLOBALS['db'];\n\n\t\t$sql=\"SELECT *\n\t\t\t\t\tFROM \".$GLOBALS['database_prefix'].\"v_document_files\n\t\t\t\t\tWHERE document_id = '\".$this->document_id.\"'\n\t\t\t\t\t\";\n\t\t//echo $sql.\"<br>\";\n\t\t$result = $db->Query($sql);\n\n\t\tif ($db->NumRows($result) > 0) {\n\t\t\twhile($row=$db->FetchArray($result)) {\n\t\t\t\t/* HERE WE CALL THE FIELDS AND SET THEM INTO DYNAMIC VARIABLES */\n\t\t\t\t$arr_cols=$db->GetColumns($result);\n\t\t\t\tfor ($i=1;$i<count($arr_cols);$i++) {\n\t\t\t\t\t$col_name=$arr_cols[$i];\n\t\t\t\t\t$this->$col_name=$row[$col_name];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function get_data()\n {\n\n\n }", "public function getSpecifics() {}", "function getData();", "function getStudyInfo($connection, $idStudy){\n\t$query = \"SELECT * FROM vStudyWithTypeNames WHERE idStudy =\".$idStudy;\n\treturn fetchRowFromDBOnID($connection, $query, $idStudy, \"study\");\n}", "public function getDatasetNameList() {\n return $this->_get(17);\n }", "public function getQuestionData()\n {\n return $this->_coreRegistry->registry('current_question');\n }", "public function getDetail();", "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "abstract public function infoAll();" ]
[ "0.64766693", "0.64530253", "0.61231613", "0.60006773", "0.5907415", "0.5866788", "0.58132446", "0.5737339", "0.57204473", "0.56719625", "0.56719625", "0.56672966", "0.5657123", "0.5657123", "0.56437755", "0.56400615", "0.56350416", "0.5628495", "0.5628495", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.5601358", "0.55997676", "0.5598456", "0.55558074", "0.55409896", "0.5540551", "0.5540551", "0.5540551", "0.5536358", "0.5534898", "0.55316913", "0.5521257", "0.55056334", "0.54547787", "0.5445738", "0.54454035", "0.54315454", "0.5384111", "0.53787357", "0.53687394", "0.5355345", "0.53485256", "0.5341338", "0.5340081", "0.5337737", "0.53300834", "0.5307169", "0.5291255", "0.5281638", "0.52779084", "0.5259543", "0.5255743", "0.5253981", "0.52393186", "0.52348626", "0.52289575", "0.5214929", "0.52131593", "0.5208803", "0.52062184", "0.5203819", "0.52037376", "0.51998025", "0.5197497", "0.51882446", "0.51882446", "0.5186566", "0.51807296", "0.51700085", "0.5168114", "0.5167737", "0.5167737", "0.51411396", "0.5132328", "0.5131166", "0.5128866", "0.5126083", "0.5118296", "0.5110129", "0.51080036", "0.51007175", "0.5098697" ]
0.0
-1
Method returning count of rows in a DB table
private function getRowsCount($ppDatasetId) { $query=$this->db->prepare('SELECT count(*) AS pocet FROM `'.$ppDatasetId.'`;'); $query->execute(); return $query->fetchColumn(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count(){\n\t\t\t$query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n\t\t\n\t\t\t$stmt = $this->conn->prepare( $query );\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\t\treturn $row['total_rows'];\n\t\t}", "public function getCount() {\n\t\treturn $this->db->fetchColumn ( \"SELECT COUNT(id) FROM \" . $this->table );\n\t}", "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \".$this->table_name. \"\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n }", "public function getCount() {\n return $this->db->fetchColumn(\"SELECT COUNT(id) FROM $this->table\");\n }", "function count()\n {\n $this->object->select($this->object->get_primary_key_column());\n $retval = $this->object->run_query(FALSE, FALSE, FALSE);\n return count($retval);\n }", "public function count()\n {\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }", "public static function count(){\n\t\t//Connect to the database\n\t\t$db = static::getDatabaseConnection();\n\t\t$query = \"SELECT count(id) FROM \" . static::$tableName;\n\t\t$statement = $db->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchColumn(); \n\t\treturn $result;\n\t}", "function count()\n {\n $retval = 0;\n $key = $this->object->get_primary_key_column();\n $results = $this->object->run_query(\"SELECT COUNT(`{$key}`) AS `{$key}` FROM `{$this->object->get_table_name()}`\");\n if ($results && isset($results[0]->{$key})) {\n $retval = (int) $results[0]->{$key};\n }\n return $retval;\n }", "public abstract function row_count();", "public function count_rows() {\r\n return $this->db->count_all_results($this->table_name);\r\n }", "public static function getCount()\n {\n $key = static::getPrimaryKey();\n return DB::table(static::$schema)\n ->select(['count('. $key .') tcount'])\n ->fetchOne()\n ->tcount;\n }", "public function count(){\r\n\t$query = \"SELECT count(*) FROM \" . $this->table_name;\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare( $query );\r\n\r\n\t// execute query\r\n\t$stmt->execute();\r\n\r\n\t// get row value\r\n\t$rows = $stmt->fetch(PDO::FETCH_NUM);\r\n\r\n\t// return count\r\n\treturn $rows[0];\r\n}", "public function count() {\n if($this->count === false) {\n if (is_object($this->table)) {\n $this->count = 1;\n } elseif (is_array($this->table)) {\n $this->count = count($this->table);\n } else {\n $this->count = 0;\n }\n }\n return $this->count;\n }", "public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n}", "public function count()\n\t{\n\t\t// Execute query and return count\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? count($result) : 0;\n\t}", "public function getNumberOfRows(){\r\n $this->setTable('subscribed');\r\n $table = $this->getTable();\r\n\r\n $sql = \"SELECT * FROM \" . $table;\r\n $stmt = $this->fetch()->query($sql);\r\n return $stmt->rowCount();\r\n }", "public function count(){\n $query = \"SELECT COUNT(*) as total_rows \n FROM $this->table_name\";\n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n}", "function get_num_records()\n\t{\n\t\t$this->sql = 'SELECT COUNT(*) FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\treturn db_getOne($this->sql, $this->use_db);\n\t}", "public function countAll(){\n \n $query = \"SELECT id FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n $num = $stmt->rowCount();\n \n return $num;\n }", "function count()\n{\n\tif (!$this->getSql()) return 0;\n\t$rows = $this->getClone()->select('count(*) as n');\n\treturn (int)$rows[0]['n'];\n}", "public function count()\n\t{\n\t\treturn $this->query->rowCount();\n\t}", "public function count()\n\t{\n\t\treturn (int) $this->getStatement()->rowCount();\n\t}", "public function count() {\n return count($this->__rows__);\n }", "public function count(): int\n {\n $query = clone $this;\n $table = current($this->from);\n return $query->select(\"(COUNT($table.id))\")->execute()->fetchColumn();\n }", "public function count() {\n $this->_active_query->fields($this->func()->count());\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return (int)$query->rowCount();\n }", "public function countAll(){\n \n $query = \"SELECT id FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n $num = $stmt->rowCount();\n \n return $num;\n}", "function RowCount() {}", "public function count() {\n $s = $this->buildSelect(true, null, false, false);\n return $s->numRows();\n }", "abstract public function countTable();", "public function countAll(){\n\t // query to select all user records\n\t $query = \"SELECT id FROM \" . $this->table_name . \"\";\n\t // prepare query statement\n\t $stmt = $this->conn->prepare($query);\n\t // execute query\n\t $stmt->execute();\n\t // get number of rows\n\t $num = $stmt->rowCount();\n\t // return row count\n\t return $num;\n\t}", "public function count(): int\n {\n return $this->database->fetchColumn('SELECT COUNT(id) FROM ' . static::TABLE);\n }", "public function count() {\n\t\t$results = $this->execute();\n\t\treturn $results ? count($results) : 0;\n\t}", "public function count()\n {\n return count($this->_rows);\n }", "public function countAll(){\r\n \r\n $query = \"SELECT id FROM \" . $this->table_name . \"\";\r\n \r\n $stmt = $this->conn->prepare( $query );\r\n $stmt->execute();\r\n \r\n $num = $stmt->rowCount();\r\n \r\n return $num;\r\n}", "public function count() {\n return $this->row_count();\n }", "public function numRows() {\n\t\t$q = \"SELECT COUNT(*) FROM {$this->_name}\";\n\t\t$r = @sqlite_query($q, $this->_connection);\n\t\tlist($numRows) = sqlite_fetch_array($r, SQLITE_NUM);\n\t\treturn $numRows;\n\t}", "public function countRows()\n {\n return count($this->rows);\n }", "public function rowCount()\n {\n return sasql_num_rows($this->result);\n }", "public function count(): int\n {\n return $this->statement->rowCount();\n }", "public function getCount()\n\t{\n\t\t$res = $this->pdo->queryOneRow('SELECT COUNT(id) AS num FROM xxxinfo');\n\t\treturn ($res === false ? 0 : $res['num']);\n\t}", "public function countAllRows()\n {\n return $this->getDbTable()->countAllRows();\n }", "public function countAll(){\n \n // query to select all user records\n $query = \"SELECT Mabh FROM \" . $this->table_name . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n // get number of rows\n $num = $stmt->rowCount();\n \n // return row count\n return $num;\n}", "public static function rowCount(){\n $dbCon = self::getPdoCon();\n return $dbCon::rowCount;\n }", "function getNumberOfRows($table_name)\n {\n $sql = \"SELECT COUNT(*) as count FROM \".$table_name;\n return $this->querySingle($sql);\n }", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"partdata\");\n\t}", "public function getNumberOfRows();", "function count_sql($table) {\n\t$dbh = db_connect(); #DATABASE CONNEXION\n\n\t$dossier = $dbh->query('SELECT COUNT(*) FROM ' . $table)->fetch();\n\tforeach ($dossier as $count) return $count;\n\n\techo($count);\n}", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"jobdata\");\n\t}", "function getDataCount($table, $condition, $params){\n\t\ttry {\n\t\t\t$sql = \"SELECT COUNT(*) FROM $table \";\n\t\t\tif($condition && !empty($condition)){\n\t\t\t\t$sql .= \" WHERE $condition\";\n\t\t\t}\n\t\t\t$query = $this->executeQuery($sql, $params);\n\t\t\t$count = intVal($query->fetchColumn());\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($sql, $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $count;\n\t}", "public function count() { \n\t\tif( $this->isDirty() ) { $this->executeQuery(); }\n\t\treturn( count( $this->_recordset ) ); \n\t}", "public function rowCount()\n {\n return oci_num_rows($this->sth);\n }", "public function record_count() {\r\n return $this->db->count_all(\"pessoafisica\");\r\n }", "public function count() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n # close connection\n Connection::disconnect();\n\n return $prepareStatement->rowCount();\n }", "public function GetRowCount() : INT\r\n {\r\n return($this->preparedStatement->rowCount());\r\n }", "public function count()\n {\n $result = new QueryResult($this);\n return $result->count();\n }", "public function numOfRows();", "public function countRows()\n {\n return $this->_result !== null ? $this->_result->rowCount() : 0;\n }", "public function countAll(){\n\t // query to select all forum records\n\t $query = \"SELECT id FROM \" . $this->table_name . \"\";\n\t // prepare query statement\n\t $stmt = $this->conn->prepare($query);\n\t // execute query\n\t $stmt->execute();\n\t // get number of rows\n\t $num = $stmt->rowCount();\n\t // return row count\n\t return $num;\n\t}", "public function count( )\n {\n if ( !$this->db_query_result )\n return 0;\n\n return @ mysql_num_rows( $this->db_query_result );\n }", "public function count_all() {\n return $this->db->count_all($this->_table());\n }", "public function numberOfRows();", "public function getNumRows()\n {\n $db = DB::conn();\n $query = \"SELECT COUNT(*) FROM \" . self::COMMENT_TABLE . \" WHERE thread_id = ?\";\n $where_params = array($this->thread_id);\n $count = $db->value($query, $where_params);\n return $count; \n }", "public static function getCountQuery()\n {\n $key = static::getPrimaryKey();\n return DB::table(static::$schema)\n ->select([\"count({$key}) as count\"]);\n }", "function getCount() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = \"SELECT count(*) FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' ';\n\n\t\t$count =self::$global['dbCon']->fetchRow($query,MYSQLI_NUM);\n\t\treturn $count[0];\n\n\t}", "public function count()\n\t{\n\t\t$query = clone $this->df;\n\n\t\t$query->removeClause('select')\n\t\t\t->removeClause('limit')\n\t\t\t->removeClause('offset')\n\t\t\t->removeClause('order by')\n\t\t\t->select('count(*)');\n\n\t\treturn $this->count = (int)$query->fetchSingle();\n\t}", "public function getNumberOfRows() {\n\n $query = $this->db->prepare(\"SELECT COUNT(*) FROM `products`\");\n\n try {\n\n $query->execute();\n $rows = $query->fetchColumn();\n\n return $rows;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function getCount ( ) {\r\n\t\t // Requete SQL\r\n\t\t $req = \"SELECT COUNT(*) AS count FROM \" .$this->table; \r\n\t\t $query = $this->db->prepare($req);\r\n\t\t $query->execute();\r\n\t\t $count = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\t \r\n\t\t // Vérification\r\n\t\t if (count($count) <= 0) {\r\n\t\t return false;\r\n\t\t }\r\n\r\n\t\t return $count['count'];\r\n\t\t}", "public function count()\n {\n return $this->rows;\n }", "public function getNumberOfRows()\r\n {\r\n return count($this->data);\r\n }", "function countData($table) {\n global $conn;\n $sql = \"SELECT * FROM\". \" \" . $table;\n $result = $conn->query($sql);\n if($result->num_rows > 0) {\n $totalno = $result->num_rows;\n } else {\n $totalno = 0;\n }\n return $totalno;\n }", "public function getCount()\n {\n return $this->doQuery(null, false, false)->count();\n }", "function get_num_rows($table_name = '') {\n $this->db->select('*')\n ->from(self::table_name);\n\n $query = $this->db->get();\n return ($this->db->count_all_results(self::table_name));\n }", "function NumRows() {\n\t\t\t$result = pg_num_rows($this->result);\n\t\t\treturn $result;\n\t\t}", "public function rowCount () {\n return $this->query->rowCount();\n }", "function rows_count($table){\n\t$conn = connect();\n\t$sql = \"select count(*) as C from \".$table;//radiology_record\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$row = oci_fetch_assoc($statement);\n\t\n\t$ret = $row['C'];\n\n\toci_free_statement($statement);\n\toci_close($conn);\n\n\treturn $ret;\n}", "function get_num_rows($table_name) {\n $this->db->select('*')->from($table_name);\n $query = $this->db->get();\n return ($this->db->count_all_results($table_name));\n }", "function getTotalRows()\n {\n $query = \"SELECT * FROM \" . $this->table_name;\n $result = mysqli_query($this->conn, $query);\n return mysqli_num_rows($result);\n }", "public static function count_all(){\n global $database;\n $sql =\"SELECT count(*) FROM \".static::$db_table;\n $result_set=$database->query($sql);\n $row =mysqli_fetch_array($result_set);\n\n return array_shift($row);\n\n }", "public function countRows($sql,$params)\n{\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute($params);\n return $stmt->rowCount();\n}", "public function getRecordCount(){\n $records = $this->statement(\"SELECT count(*) AS total_records FROM `voters`\");\n return $records[0]['total_records'];\n }", "public function count() {\n if ($this->_count <= 0) {\n $where = new Where();\n if (isset($this->_options[\"eventData\"]) && $this->_options[\"eventData\"] != '') {\n $where->expression($this->_sql_search_expression, \"%\" . $this->_options[\"eventData\"] . \"%\");\n }\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from($this->table)->where($where)->columns(array('count' => new Expression('COUNT(*)')));\n $sqlTxt = $sql->getSqlStringForSqlObject($select);\n $resultSet = $this->adapter->query($sqlTxt, Adapter::QUERY_MODE_EXECUTE);\n foreach ($resultSet as $row) {\n $this->_count = intval($row->count);\n break;\n }\n }\n return $this->_count;\n }", "function countAll(){\r\n //Does this need an empty string appended at the end?\r\n \r\n $query = \"SELECT SubjectID FROM \" . \"$this->table_name\" . \"\";\r\n // debug_to_console('query: '. $query);\r\n $stmt = $this->dbConn->prepare( $query );\r\n $stmt->execute();\r\n \r\n $count = $stmt->rowCount();\r\n \r\n return $count;\r\n }", "public function getRowCount() {\n return $this->statement->rowCount();\n }", "public function countRows(): int\n {\n $result = $this->_getResult()->numRows(); // Returns an integer on success and an \\PEAR_Error object on failure\n return is_int($result) ? $result : 0;\n }", "function RecordCount() {\r\n return $this->result->numRows();\r\n }", "public function count(): int\n {\n if ($this->numberOfRows === null) {\n if (is_array($this->rows)) {\n $this->numberOfRows = count($this->rows);\n } else {\n $this->numberOfRows = $this->query->count();\n }\n }\n return $this->numberOfRows;\n }", "public function count()\n\t{\n\t\treturn $this->result->count();\n\t}", "public function count()\n {\n $this->field('count(*) AS count', false);\n $list = $this->__select();\n $result = 0;\n if (count($list) == 1) {\n $result = intval($list[0]['count']);\n }\n elseif (count($list) > 1) {\n $result = array();\n foreach ($list as $row) {\n $result[] = $row['count'];\n }\n }\n return $result;\n }", "public function count_rows()\n {\n $m_num_rows = $this->c_obj_stmt->rowCount();\n return $m_num_rows;\n }", "public function count() {\n\n // query to count all product records\n $query = \"SELECT count(*) FROM $this->table_name\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n // get row value\n $rows = $stmt->fetch(PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n }", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"mtrbundle\");\n\t}", "public function count(): int\n {\n return $this->makeQuery()->count();\n }", "public function count()\n\t{\n\t\treturn count($this->columns);\n\t}", "public function getRowCount()\n {\n return $this->statement->rowCount();\n }", "function get_row_count() {\n $query = \"SELECT COUNT(*) FROM failure;\";\n $count = select_scalar($query);\n return $count;\n}", "public function count_all() {\n $this->db->from($this->table);\n return $this->db->count_all_results();\n }", "public function countQuery();", "public function getTableCount($table)\n {\n $DB = new PDO(DB_DRIVER.':host='.DB_SERVER.';dbname='.DB_DATABASE, DB_SERVER_USERNAME, DB_SERVER_PASSWORD , $dboptions); \n try {\n \n ///\n \n $sql = \"SELECT COUNT(*) AS num FROM \". $table;\n $stmt = $DB->prepare($sql);\n $stmt->execute();\n $row_count = $stmt->fetchAll();\n return $row_count[0][\"num\"] ;\n\n } catch (Exception $ex) {\n\n echo $ex->getMessage();\n }\n }", "public function numRows() : int\n\t{\n\t\treturn $this->handle->numRows($this->result);\n\t}", "public function num_rows()\n\t{\n\t\t$regex = '/^SELECT\\s+(?:ALL\\s+|DISTINCT\\s+)?(?:.*?)\\s+FROM\\s+(.*)$/i';\n\t\t$output = array();\n\n\t\tif (preg_match($regex, $this->last_query, $output) > 0)\n\t\t{\n\t\t\t$stmt = $this->query(\"SELECT COUNT(*) FROM {$output[1]}\");\n\t\t\treturn (int) $stmt->fetchColumn();\n\t\t}\n\n\t\treturn NULL;\n\t}" ]
[ "0.84036404", "0.83994806", "0.8388586", "0.834689", "0.8339552", "0.8281562", "0.8262859", "0.81768626", "0.8140634", "0.8117222", "0.81021065", "0.80970526", "0.80913913", "0.80719787", "0.80555564", "0.80273324", "0.80268776", "0.8016575", "0.80121446", "0.79986846", "0.79863715", "0.7976295", "0.7966776", "0.7965667", "0.7959945", "0.79479885", "0.79220754", "0.7918515", "0.78842175", "0.7866553", "0.78626513", "0.7858443", "0.7857657", "0.7849731", "0.7834354", "0.7809537", "0.7808891", "0.77955765", "0.77879035", "0.7779464", "0.77710205", "0.7769519", "0.77649695", "0.77476025", "0.774545", "0.770725", "0.77068985", "0.7696793", "0.7692378", "0.76886487", "0.767789", "0.7674813", "0.7659941", "0.7656032", "0.7650938", "0.7635759", "0.7628421", "0.7613793", "0.7606247", "0.7599526", "0.75877804", "0.7579101", "0.7577059", "0.7574556", "0.7574071", "0.756158", "0.7555586", "0.75480807", "0.75436217", "0.75381595", "0.7534329", "0.75263405", "0.7525996", "0.75235885", "0.751653", "0.7516105", "0.75117403", "0.7511161", "0.75021285", "0.7499066", "0.7495731", "0.7494477", "0.74934435", "0.7487133", "0.7484395", "0.7483262", "0.7481715", "0.74685675", "0.7459784", "0.7455065", "0.7450476", "0.7446442", "0.744618", "0.7441661", "0.74379534", "0.74347216", "0.7425075", "0.7421109", "0.74187595", "0.7416309", "0.741464" ]
0.0
-1
Method returning list of attributes (data columns) in selected dataset
public function getPpAttributes(PpDataset $ppDataset) { $query=$this->db->prepare('SHOW COLUMNS IN `'.$ppDataset->id.'`;'); $query->execute(); $columns=$query->fetchAll(PDO::FETCH_CLASS); $result=[]; foreach ($columns as $column){ $result[]=new PpAttribute($column->Field, $ppDataset->id, null, $column->Field, self::encodeDbDataType($column->Type), null); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }", "public function getAttributesNames(){\n\t\t$this->_connect();\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n if(property_exists($this, 'handle') && property_exists($this, 'type')){\n $matrixAttributes = anu()->matrix->getMatrixByName($this->handle)->defineAttributes()[$this->type];\n $attributes = array_merge($attributes, $matrixAttributes);\n }\n\n foreach ($attributes as $k => $v){\n if(property_exists($this, $k)){\n $values[$k] = $this->$k;\n }\n }\n return $values;\n }", "public function attributes()\r\n {\r\n return array_keys($this->getDb()->getTableSchema($this->layoutName())->columns);\r\n }", "public static function getAttributeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }", "protected function attributes(): array\n {\n try {\n $attributes = [];\n $i = 0;\n foreach (static::$db_columns as $column) {\n $attributes[$column] = $this->$column;\n $i++;\n }\n return $attributes;\n } catch (Exception $e) {\n die(\"Error \" . $e);\n }\n }", "abstract public function attributeNames();", "private function getListCols(){\n $result = array();\n \n foreach($this->main->dataset['data'] as $item){\n if($item['list']){\n array_push($result, array(\n 'name' => $item['label'],\n 'col_name' => $item['name'],\n 'type' => $item['type'],\n 'options_custom' => $item['options_custom'],\n 'options_table' => $item['options_table'],\n 'options_source' => $item['options_source'],\n 'prefix' => null,\n 'suffix' => null,\n 'mode' => null\n ));\n };\n };\n\n return $result;\n }", "abstract public static function columnData();", "public function getColumnsList(){\n return $this->_get(3);\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "protected function _getAttributes(){\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getParameters()\n {\n return \\common\\models\\Attribute::find()->where(['id' => $this->getEntityAttributes()->select('attribute_id')]);\n }", "public function getAttributes()\n {\n return $this->where('isRelation', false)->pluck('attribute')->toArray();\n }", "public function getDatasetNameList() {\n return $this->_get(6);\n }", "public function getSelectDataFields();", "public function getColumns()\n {\n return $this->select_list;\n }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getDatasetNameList() {\n return $this->_get(17);\n }", "public function attributes() : array;", "function getAttrList() {\n return array_keys($this->attributes);\n }", "public function toArray()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\tif ($column != \"\")\n\t\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn $columns;\n\t}", "public function getAttributes()\n\t{\n\t\t$arrData = array();\n\n\t\tforeach ($this->getProductAndVariantAttributes() as $attribute)\n\t\t{\n\t\t\t$arrData[$attribute] = $this->$attribute;\n\t\t}\n\n\t\treturn $arrData;\n\t}", "public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}", "public function toArray() {\n\t\treturn $this->tblAttributes;\n\t}", "public function getAll() {\n return array_keys($this->attrs);\n }", "public function getColumns(): array;", "public function getAttributesList() {\n return $this->_get(3);\n }", "public function getAttributesList() {\n return $this->_get(9);\n }", "public function getAttributesList() {\n return $this->_get(2);\n }", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "public function getAttributesList() {\n return $this->_get(7);\n }", "public function getAttributes() {}", "public function getAttributes() {}", "public function getAttributes(): iterable;", "public function get_CSV_Attr()\n\t{\n\t\t$handle = fopen(\"./tables/attributes.csv\", \"r\");\n\t\t$first_row = true;\n\t\t$final_ata = array();\n\t\t$headers = array();\n\n\t\twhile (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t{ \n\t\t\tif($first_row) \n\t\t\t{\n\t\t\t\t$headers = $data;\n\t\t\t\t$first_row = false;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$final_ata[] = array_combine($headers, array_values($data));\n\t\t\t}\n\t\t}\n\n\t\t$result_arr = array();\t\n\t\tforeach($final_ata as $key => $value)\n\t\t{\n\t\t\t$name = $final_ata[$key]['ATTR_Varaiable'];\n\t\t\t$result_arr[$name] = $value;\n\t\t}\n\t\treturn($result_arr);\n \n }", "public function getAttributesList()\n {\n }", "public function getAllAtributes() {\r\n $class = get_class($this->getInvoker());\r\n return mdAttributeHandler::getAllAttributes($class);\r\n }", "public function getAttributesList() {\n return $this->_get(24);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAllAttributes()\n\t{\n\t\t$intID\t = $this->Input->get('id');\n\t\t$intPID\t = $this->Input->get('pid');\n\n\t\t$arrReturn = array();\n\n\t\t// Add meta fields.\n\t\t$arrReturn['meta'] = $GLOBALS['METAMODELS_SYSTEM_COLUMNS'];\n\n\t\tif (empty($intPID))\n\t\t{\n\t\t\t$objResult = $this->Database\n\t\t\t\t\t->prepare('SELECT pid FROM tl_metamodel_attribute WHERE id=?')\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->execute($intID);\n\n\t\t\tif ($objResult->numRows == 0)\n\t\t\t{\n\t\t\t\treturn $arrReturn;\n\t\t\t}\n\n\t\t\t$objMetaModel = MetaModelFactory::byId($objResult->pid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objMetaModel = MetaModelFactory::byId($intPID);\n\t\t}\n\n\t\tforeach ($objMetaModel->getAttributes() as $objAttribute)\n\t\t{\n\t\t\t$arrReturn['attributes'][$objAttribute->getColName()] = sprintf('%s (%s)', $objAttribute->getName(), str_replace('MetaModelAttribute', '', get_class($objAttribute)));\n\t\t}\n\n\t\treturn $arrReturn;\n\t}", "public function _getDataAttributes($attrsRequested=null) {\n $result = array();\n foreach($this->attrs as $attr => $val) {\n if (is_null($attrsRequested) || in_array($attr, $attrsRequested)) {\r\n $result[] = \"data-{$attr}=\\\"{$val}\\\"\";\n }\r\n }\n return $result;\n }", "abstract protected function getColumns(): array;", "public function getAttributeList(): array;", "public function getCustomAttributes(): array;", "public static function getDataHtmlFields(): array\n {\n $data = [];\n\n if ($records = PqrHtmlField::findAllByAttributes([\n 'active' => 1\n ])) {\n foreach ($records as $PqrHtmlField) {\n $data[] = $PqrHtmlField->getDataAttributes();\n }\n }\n\n return $data;\n }", "public function all()\n\t{\n\t\treturn $this->attributes;\n\t}", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function attributesDataProvider()\n {\n return [\n [\n [\n 'value1' => 123,\n 'value2' => 'string',\n ],\n ['value1'],\n ['value1'],\n [\n 'value1' => 123,\n ],\n ],\n [\n [\n 'value1' => 456,\n 'value2' => 'text',\n 'value3' => true,\n ],\n ['value1', 'value3'],\n ['value1', 'value3'],\n [\n 'value1' => 456,\n 'value3' => true,\n ],\n ],\n [\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ['value1', 'value2', 'value3'],\n ['value1', 'value2', 'value3'],\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ],\n ];\n }", "public function getDataAllColumns() : array{\n\n $columns = [];\n foreach ($this->configs->fields as $k => $value) {\n $columns[$k] = array_column($this->model->getValuesColumn($value),$value);\n }\n return $columns;\n }", "public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }", "public function get_selectable_columns()\n\t{\n\t\treturn array();\n\t}", "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "private function _retrieveFormattedDataAttributes()\n {\n $dataAttribs = '';\n $filter = new Zend_Filter_Word_CamelCaseToDash();\n foreach ($this->_dataAttribs as $key => $value) {\n $key = strtolower($filter->filter($key));\n if ($value === true) {\n $value = 'true';\n } else if($value === false) {\n $value = 'false';\n }\n $dataAttribs .= \"data-$key=\\\"$value\\\" \";\n }\n return $dataAttribs;\n }", "public static function getAttributeTypeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }", "protected function getSQLInfo() {\r\n\t\treturn array_merge(self::getStaticSQLInfo(), $this->attrs);\r\n\t}", "protected function getBParamDataAttributes() {}", "protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }", "abstract function attributes(): array;", "public function attribute_names() {\n\t\n\t\treturn array_keys( $this->attributes );\n\t\t\n\t}", "public function getAttributesToSelect()\n {\n return $this->attributesToSelect;\n }", "public function attributes();", "public function getAttributesOptions()\n {\n $attribOptsArr = DB::table($this->DBTables['Attributes_Values'])\n ->get();\n\n return $attribOptsArr;\n }", "public function attributeNames() {\n\t\treturn $this->getAttributeNames();\n\t}", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }", "protected function getAttr()\r\n\t{\r\n\t\treturn array( 'maxLength', 'width', 'searchMethod', 'searchRangeValues' );\r\n\t}", "abstract public function listColumns();", "private function getColumnValues()\n {\n return array_slice($this->_args, 2);\n }", "public function getAttributes()\n {\n $return = [];\n foreach ($this->attr as $attr => $info) {\n $return[$attr] = $this->getAttribute($attr);\n }\n\n return $return;\n }", "public function column(): array\n {\n if ($this->shouldEmulateExecution()) {\n return [];\n }\n\n /** TODO add support for orderBy */\n return $this->executeScript('Column', $this->attribute);\n }", "public function attributes()\n {\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "public function getAttributes(){\n\t\t$this->_connect();\n\t\treturn $this->_getAttributes();\n\t}", "public function attributes()\n {\n if (isset(self::$_detailsData[self::className()][$this->_parentIdValue])) {\n return array_keys(self::$_detailsData[self::className()][$this->_parentIdValue]);\n }\n return [];\n }", "public function getAttributes()\n {\n $array = [];\n\n if ($this->getValueSet() === null) {\n return $array;\n }\n\n foreach ($this->getValueSet()->getValues() as $value) {\n $array[$value->getAttribute()->getName()] = $value;\n }\n\n return $array;\n }", "public function getAttributes(){ }", "public function getFields() {\r\n\t\tif($this->_fields === null) {\r\n\t\t\t$this->_fields = $this->activeDataProvider->model->attributeNames();\r\n\t\t}\r\n\t\treturn $this->_fields;\r\n\t}", "public function getAttributes()\n {\n $userId = $this->getDataRow()->getCellValue('id');\n // Prepare your attributes\n $newAttributes = [\n 'data-href' => route('admin.userdetail', [$userId]),\n 'class' => 'my-class table-row',\n ];\n return array_merge(parent::getAttributes(), $newAttributes);\n }", "public static function columns()\n {\n if (Deal::first() ?? false) {\n return array_diff(array_keys(Deal::first()->attributesToArray()), Deal::first()->exclude); \n } else {\n return array();\n }\n }", "public function getDatasList(){\n return $this->_get(5);\n }" ]
[ "0.6912565", "0.67044073", "0.66587377", "0.6645676", "0.6625465", "0.6570991", "0.65597194", "0.6544039", "0.65066284", "0.64955425", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.63712233", "0.63390386", "0.6338144", "0.6322202", "0.6316808", "0.6299333", "0.62814295", "0.62814295", "0.62814295", "0.62814295", "0.6281254", "0.6255441", "0.6253178", "0.6252298", "0.6251864", "0.6247022", "0.6239341", "0.62393016", "0.6238107", "0.62311167", "0.62213814", "0.6211749", "0.61866474", "0.61806303", "0.6177703", "0.61757284", "0.61560464", "0.6147942", "0.6136333", "0.61312574", "0.6128831", "0.61272603", "0.61272603", "0.611487", "0.61143094", "0.61142826", "0.61108685", "0.61029536", "0.60824287", "0.6073006", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.6061252", "0.60531944", "0.6050751", "0.6050018", "0.603156", "0.6024107", "0.6015056", "0.60128427", "0.60124815", "0.6007903", "0.5998942", "0.5977503", "0.59729296", "0.5962866", "0.59564006", "0.59562534", "0.5949191", "0.5949191", "0.5949191", "0.5943577", "0.5943165", "0.594263", "0.59216774", "0.5919723", "0.59172773", "0.5914966", "0.59121895", "0.5898761", "0.5898431", "0.5895549", "0.5895528", "0.5893237", "0.5884133", "0.5884131" ]
0.705272
0
MySQLDatabase constructor, providing connection to remote database
public function __construct(PpConnection $ppConnection, $apiKey) { $this->db=new PDO($ppConnection->getPDOConnectionString(),$ppConnection->dbUsername,$ppConnection->dbPassword,array(PDO::MYSQL_ATTR_LOCAL_INFILE => true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct($db_location, $db_user_name, $db_password, $db_name) { \n \n $this->db = MYSQL_CONNECT ($db_location, $db_user_name, $db_password) or DIE (\"Unable to connect to Database Server\");\n MYSQL_SELECT_DB ($db_name, $this->db) or DIE (\"Could not select database\");\n }", "public static function init()\n {\n $connection = new Connection(\"mysql:host={$_ENV['DB_HOST']};dbname={$_ENV['DB_NAME']}\", $_ENV['DB_USER'], $_ENV['DB_PASS']);\n return new Database($connection);\n }", "public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }", "function __construct($username, $password, $database, $hostname = 'localhost', $port = '3306') {\n $this->conn_start = microtime(true);\n $this->link = mysql_connect($hostname.\":\".$port,$username,$password) or $this->err(mysql_error());\n if(!$this->link) { $this->err(mysql_error); }\n mysql_select_db($database,$this->link) or $this->err(mysql_error($this->link));\n }", "public function __construct($host, $dbName, $username, $password, $driver = 'mysql', $charset = 'utf8');", "private function __construct() {\r\n $this->dbName = self::$_dbname;\r\n $this->username = self::$_username;\r\n $this->password = self::$_password;\r\n $this->hostname = self::$_hostname; \r\n\t return $this->connect();\r\n }", "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "public function __construct() {\n\t\t$this->_dbhost\t\t= \"alexandrgmsperso.mysql.db\";\n\t\t$this->_dbname\t\t= \"alexandrgmsperso\";\n\t\t$this->_dbusername\t= \"alexandrgmsperso\";\n\t\t$this->_dbpassword\t= \"Alexandre2007\";\n\t\t$this->startConnection();\n\t}", "function __construct($database, $username, $password, $hostname = 'localhost', $port = 3306) {\n\t\t$this->database = $database;\n\t\t$this->username = $username;\n\t\t$this->password = $password;\n\t\t$this->hostname = $hostname;\n\t\t$this->port = $port;\n\t\t\n\t\t$this->Connect ();\n\t}", "function setDatabaseConnection($host,$database,$user,$pass);", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "public function __construct()\n\t{\n\t\t$this->db = MySQLdb::getInstance()->getDatabase();\n\t}", "public function testMysqlDbConnectionConstructorWithSsl()\n {\n $configuration = new TaskConfig();\n $configuration->set(self::$logger, self::CONFIG_FILE);\n\n $dbInfo = $configuration->getMySqlConnectionInfo();\n $dbString = implode(\":\", $dbInfo);\n\n # Create the MysqlDbConnection\n $sslVerify = true;\n $mysqlDbConnection = new MysqlDbConnection(\n $dbString,\n $this->ssl,\n $sslVerify,\n self::CA_CERT_FILE,\n $this->tablePrefix,\n $this->labelViewSuffix\n );\n\n # verify object was created\n $this->assertNotNull(\n $mysqlDbConnection,\n 'DatabasesTest, mysqlDbConnection object created, ssl db user check'\n );\n }", "function __construct(Database $database)\n {\n\n try {\n\n $this->connection = $database->createConnection($this->host,$this->database_name,$this->username,$this->password);\n\n } catch (Exception $e) {\n\n }\n\n }", "public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}", "public function __construct() {\n\t\t$this->host = sfConfig::get('mod_main_host');\n\t\t$this->port = sfConfig::get('mod_main_port');\n\t\t$this->user = sfConfig::get('mod_main_user');\n\t\t$this->pass = sfConfig::get('mod_main_pass');\n\t\t$this->database = sfConfig::get('mod_main_database');\t\t\n\t\t$this->link = mysql_connect($this->host . ':' . $this->port, $this->user, $this->pass);\n\t \n\t\tif(!$this->link)\n\t\t\tthrow new CustomUOMySQLException('Connexion impossible a la BDD : ' . mysql_error($this->link));\n\t\t \n\t\t$base = mysql_select_db($this->database, $this->link);\t \n\t\tif (!$base)\n\t\t\tthrow new CustomUOMySQLException(mysql_error($this->link));\n\t}", "function __construct($dbhost=null, $dbuser=null, $dbpass=null, $dbname='', $dbport='', $dbdns=''){\n\t\t$this->connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbdsn);\n\t}", "protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}", "public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }", "protected function CeateDatabaseConnection()\r\n\t{\r\n\t\t// Create an instance of the database for use in the system\r\n\t\tif($this->InProduction($_SERVER['SERVER_NAME']))\r\n\t\t\t//$this->Database\t= new Database('gstour.db.4628821.hostedresource.com','gstour','Golf1215','gstour');\r\n\t\t\t$this->Database\t= new Database('97.74.149.114','gstour','Golf1215','gstour');\r\n\t\telse\r\n\t\t\t$this->Database\t= new Database('localhost','root','','test');\r\n\t}", "public function __construct()\n {\n $connStr = getenv(\"MYSQLCONNSTR_localdb\");\n // Split the string in the array\n $split = explode(\";\",$connStr);\n $connArray = array();\n foreach ($split as $key => $value) {\n $k = substr($value,0,strpos($value,\"=\"));\n $connArray[$k] = substr($value,strpos($value,\"=\")+1);\n }\n\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n try {\n $this->dbConnection = new \\mysqli(\n $connArray[\"Data Source\"],\n $connArray[\"User Id\"],\n $connArray[\"Password\"],\n $connArray[\"Database\"]);\n } catch (Exception $e) {\n error_log($e->getMessage());\n exit('Error connecting to database');\n }\n }", "function newMySQLDatabase($server, $user, $passwd, $dbname, $port = null) {\n //I really feel like default arguments shouldn't work this way, but StackOverflow says it's fine.\n if($port === null) { //If no port was specified: \n //Set up the connection without the port.\n $dbConnection = new mysqli($server, $user, $passwd);\n }\n else { //If a port was specified \n //Then use it.\n $dbConnection = new mysqli($server, $user, $passwd, \"\", $port);\n }\n //Test the connection\n if($dbConnection->connect_error) { //If the connection fails: \n //Print the error and the rest of the function is not run.\n echo \"Connection failed: \" . $dbConnection->connect_error;\n }\n else { //If the connection goes smoothly:\n //Create the database\n if ($dbConnection->query(\"CREATE DATABASE \" . $dbname) === TRUE) {\n echo \"Database created successfully.\";\n } \n else { //Otherwise, print the error.\n //TODO: Log the error instead!\n echo \"Database could not be created: \" . $dbConnection->error;\n }\n //Close the connection.\n $dbConnection->close();\n }\n }", "function __construct()\r\n {\r\n $this->host = \"10.67.254.101\"; \r\n $this->user = \"root\";\r\n $this->passwd = \"root\";\t\t\r\n $this->schema = \"wjdb\";\r\n $this->result = false; \r\n }", "public function __construct() \n {\n \n if(HOST_NAME == TESTING_SERVER_NAME || HOST_NAME == TESTING_SERVER_NAME1 )\n $this->db = new SuperMySQLi('localhost', 'voip91_switch', 'yHqbaw4zRWrUWtp8', 'voip91_switch');\n else\n $this->db = new SuperMySQLi('localhost', 'phone91', 'yHqbaw4zRWrUWtp8', 'voip');\n }", "public function __construct()\n {\n $options = [\n //required\n 'username' => 'root',\n 'database' => 'mvc_porject',\n //optional\n 'password' => '',\n 'type' => 'mysql',\n 'charset' => 'utf8',\n 'host' => 'localhost',\n 'port' => '3306'\n ];\n $this->db = new Database($options);\n }", "public function __construct()\n {\n $gl_config = Tools::getConfig();\n\n\n $this->_server = $gl_config['database_master']['params']['host'];\n $this->_user = $gl_config['database_master']['params']['username'];\n $this->_password = $gl_config['database_master']['params']['password'];\n $this->_type = $gl_config['database_master']['adapter'];\n $this->_database = $gl_config['database_master']['params']['dbname'];\n $this->connect();\n }", "public function connect()\r\n\t{\r\n\t\t$options = array(\r\n\t\t\t'driver' => $this->_driver,\r\n\t\t\t'host' => $this->_host,\r\n\t\t\t'user' => $this->_username,\r\n\t\t\t'password' => $this->_password,\r\n\t\t\t'database' => $this->_database,\r\n\t\t\t'prefix' => $this->_prefix\r\n\t\t);\r\n\t\t\r\n\t\t$this->_instance = JFlappConnectorTypeDatabase::getInstance( $options );\r\n\t\r\n\t\treturn $this->_instance;\r\n\t}", "function connect()\n\t{\n\t\t$this->link = mysql_connect( $this->hostname, $this->username, $this->password );\n\t\t\n\t\tif( $this->link === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to connect to database.');\t\n\t\t\t\n\t\t$db_selected = mysql_select_db( $this->database, $this->link );\n\t\t\n\t\tif( $db_selected === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to select database: '.$this->database );\t\n\t}", "function MySQL($options=array()){\n\t\t// validate incoming parameters\n\t\tif(count($options)<1){\n trigger_error('No connection parameters were provided');\n exit();\n }\n\t\tforeach($options as $parameter=>$value){\n if(!$parameter||!$value){\n trigger_error('Invalid connection parameter');\n exit();\n }\n $this->{$parameter}=$value;\n\t\t}\n\t\t// connect to MySQL\n\t\t$this->connectDB();\n\t}", "function getDatabase() {\n//override these params\n\t$host = \"localhost\";\n\t$user = \"sistemasmysql\";\n\t$password = \"17sistemassql06\";\n\t$database_name = \"reservas_disilab\";\n\t\n\t\n\treturn new MySqlDB($host, $user, $password, $database_name);\n}", "function __construct($dbhost=null, $dbuser=null, $dbpass=null, $dbname='', $dbport='', $dbdsn=''){\n\t\t$this->connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbdsn);\n\t}", "public static function Create( ) {\n\t\t\t$iConfig = Config::LoadConfig( );\n\t\t\t$iMySQLConnection = new DataBase( $iConfig->database_host, $iConfig->database_user, $iConfig->database_pass, $iConfig->database_name, $iConfig->database_port );\n\t\t\treturn $iMySQLConnection;\n\t\t}", "public function connectToDB() {}", "public function connect($db_properties);", "function __construct() {\n $connectstr_dbhost = 'localhost'; \n $connectstr_dbname = 'dkpTable'; \n $connectstr_dbusername = 'root'; \n $connectstr_dbpassword = 'dfghj'; \n $this->database_manager = mysqli_connect($connectstr_dbhost, $connectstr_dbusername, $connectstr_dbpassword,$connectstr_dbname); \n \nif (!$this->database_manager) { \n echo \"Error: Unable to connect to MySQL.\" . PHP_EOL; \n echo \"Debugging errno: \" . mysqli_connect_errno() . PHP_EOL; \n echo \"Debugging error: \" . mysqli_connect_error() . PHP_EOL; \n exit; \n } \n}", "public function __construct(string $database) {}", "public function __construct($host='',$user='',$password='',$database='',$port=3306){\n\t\t\ttry{\n\t\t\t\tif(!$host || !$user || !$database){\n\t\t\t\t\t$this->dbLink = new PDO('mysql:host='.$this->host.';port='.$this->port.';dbname='.$this->database,$this->user, $this->password, array( PDO::ATTR_PERSISTENT => false ,PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\t\t\t\t}else{\n\t\t\t\t\t$this->dbLink = new PDO('mysql:host='.$host.';port='.$port.';dbname='.$database,$user, $password, array( PDO::ATTR_PERSISTENT => false,PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\t\t\t\t}\n\t\t\t}catch (Exception $e){\n\t\t\t\tthrow new Exception('COMM FAIL');\n\t\t\t}\n\t\t\t\n\t\t}", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct($sqlUser, $sqlPass, $sqlHost, $sqlDatabase, $parent)\n {\n // Set parent object\n $this->parent = $parent;\n \n // Load the MySQL connection\n $this->mysql = mysql_connect($sqlHost, $sqlUser, $sqlPass);\n\n // Nullify password\n $sqlPass = null;\n\n // Check the SQL connection\n if(!$this->mysql)\n {\n $this->parent->log('MySQL', mysql_error());\n throw new Exception('Failed to build MySQL connection.');\n return false;\n }\n \n // Slect the database\n mysql_select_db($sqlDatabase, $this->mysql);\n }", "function __construct() {\n // We'll just hardcode this in. In a real application situation use\n // an external file\n $this->host = 'localhost';\n $this->username = 'PHPSCRIPT';\n $this->password = '1234';\n $this->dbName = 'cst8257';\n $this->port = 3306; // Default\n //$this->port = 3307; // Custom Port\n }", "abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );", "public function __construct($host, $username, $password, $databaseName)\n {\n try {\n $this->db = connectionWithDb($host, $databaseName, $username, $password);\n } catch (Exception $e) {\n die('DB error: ' . $e->getMessage() . \"\\n\");\n }\n }", "function __construct(){\n // Make connection to database\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n \n }", "public function __construct() {\n\t\t$host = MYSQL_HOST;\n\t\t$user = MYSQL_USER;\n\t\t$password = MYSQL_PASSWORD;\n\t\t$database = MYSQL_DATABASE;\n\n\t\t/*\n\t\t if (!$con = mysql_connect($host,$user,$password)) {\n\t\t\tthrow new Exception('Error connecting to the server');\n\t\t\t}\n\n\t\t\tif (!mysql_select_db($database,$con)) {\n\t\t\tthrow new Exception('Error selecting database');\n\t\t\t}\n\t\t\t*/\n\n\t\t$this->connection = mysql_connect($host, $user, $password) or die(mysql_error());\n\t\tmysql_select_db($database, $this->connection);\n\t}", "public function __construct() {\n\t\t$this->db = MySQLConnectivity::get_instance();\n\t\t$this->conn = $this->db->get_connection(); \n\t}", "function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}", "private function __construct() {\n\t\tself::$_host = Config::get('host');\n\t\tself::$_username = Config::get('username');\n\t\tself::$_password = Config::get('password');\n\t\tself::$_database = Config::get('database');\n\n\t\t/* Establish connection */\n\t\tself::$_connection = new \\mysqli(self::$_host, self::$_username, \n\t\t\tself::$_password, self::$_database);\n\t\n\t\t/* Error handling */\n\t\tif(mysqli_connect_error()) {\n\t\t\ttrigger_error(\"Failed to connect to MySQL: \" . mysqli_connect_error(), E_USER_ERROR);\n\t\t}\n\t}", "function __construct($database, $user, $password, $host = 'localhost') {\n\t\t//pass the hostname, user, password, database names here if static\n\t\t$this->mysqli = @new \\mysqli($host, $user, $password, $database);\n\t\tif (mysqli_connect_errno()) {\n\t\t\tthrow new \\Exception(\"MySql connection failed: \" . mysqli_connect_error());\n\t\t}\n\t}", "private function __construct() {\r\n mysql_connect($this->dbHost,$this->dbUser,$this->dbPass) or die(\"Mysql Connection Failed: \" . mysql_error());\r\n mysql_select_db($this->dbName) or die(\"Database 'carpool_db' Selection failed: \" . mysql_error());\r\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function getConnection()\n {\n if (isset($GLOBALS['db_type'], $GLOBALS['db_username'], $GLOBALS['db_password'],\n $GLOBALS['db_host'], $GLOBALS['db_name'], $GLOBALS['db_port'],\n $GLOBALS['tmpdb_type'], $GLOBALS['tmpdb_username'], $GLOBALS['tmpdb_password'],\n $GLOBALS['tmpdb_host'], $GLOBALS['tmpdb_name'], $GLOBALS['tmpdb_port'])) {\n $realDbParams = [\n 'driver' => $GLOBALS['db_type'],\n 'user' => $GLOBALS['db_username'],\n 'password' => $GLOBALS['db_password'],\n 'host' => $GLOBALS['db_host'],\n 'dbname' => $GLOBALS['db_name'],\n 'port' => $GLOBALS['db_port']\n ];\n $tmpDbParams = [\n 'driver' => $GLOBALS['tmpdb_type'],\n 'user' => $GLOBALS['tmpdb_username'],\n 'password' => $GLOBALS['tmpdb_password'],\n 'host' => $GLOBALS['tmpdb_host'],\n 'dbname' => $GLOBALS['tmpdb_name'],\n 'port' => $GLOBALS['tmpdb_port']\n ];\n\n $realConn = \\Doctrine\\DBAL\\DriverManager::getConnection($realDbParams);\n\n $platform = $realConn->getDatabasePlatform();\n\n if ($platform->supportsCreateDropDatabase()) {\n\n $dbname = $realConn->getDatabase();\n // Connect to tmpdb in order to drop and create the real test db.\n $tmpConn = \\Doctrine\\DBAL\\DriverManager::getConnection($tmpDbParams);\n $realConn->close();\n\n $tmpConn->getSchemaManager()->dropDatabase($dbname);\n $tmpConn->getSchemaManager()->createDatabase($dbname);\n\n $tmpConn->close();\n } else {\n\n $sm = $realConn->getSchemaManager();\n\n /* @var $schema Schema */\n $schema = $sm->createSchema();\n $stmts = $schema->toDropSql($realConn->getDatabasePlatform());\n\n foreach ($stmts AS $stmt) {\n try {\n $realConn->exec($stmt);\n } catch (\\Exception $e) {\n // TODO: Now is this a real good idea?\n }\n }\n }\n\n $conn = \\Doctrine\\DBAL\\DriverManager::getConnection(array_merge(['wrapperClass' => 'Pagekit\\Database\\Connection'], $realDbParams), null, null);\n } else {\n $params = [\n 'driver' => 'pdo_sqlite',\n 'memory' => true\n ];\n if (isset($GLOBALS['db_path'])) {\n $params['path'] = $GLOBALS['db_path'];\n unlink($GLOBALS['db_path']);\n }\n $conn = \\Doctrine\\DBAL\\DriverManager::getConnection(array_merge(['wrapperClass' => 'Pagekit\\Database\\Connection'], $params));\n }\n\n return $conn;\n }", "function __construct($host, $user, $password, $database, $table_name)\n {\n $this->table_name = $table_name;\n $this->db_connect = new mysqli($host, $user, $password, $database);\n if ($this->db_connect->connect_error) {\n die($this->db_connect->connect_error);\n }\n }", "public function __construct($database){\n $this->conn = $database;\n }", "public function __construct(){\n\n\t//build the failure message wile it's convenient\n\t$die_str = \"MySQL connection failed!<br/>'$this->mysql_host'@'$this->mysql_user', '$this->mysql_password'\";\n\n\t//attempt to establish the connection\n\t$this->connection = mysql_connect($this->mysql_host, $this->mysql_user, $this->mysql_password) or die($die_str);\n\n\t//select the desired database\n\tmysql_select_db($this->mysql_database) or die(\"MySQL database ($this->mysql_database) selection failed!\");\n}", "public function __construct()\n {\n $cred = getDbCredentials();\n $dbhost = $cred['dbhost']; \n $dbuser = $cred['dbuser'];\n $dbname = $cred['dbname'];\n $dbpass = $cred['dbpass']; \n $conn = null;\n try{\n $conn = new PDO(\"mysql:host=$dbhost; dbname=$dbname\", $dbuser, $dbpass);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(PDOException $ex){\n echo \"Connection failed: \".$ex->getMessage();\n }\n \n $this->connection = $conn;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }", "public function __construct(){\n // connect to database using pre-configured globals\n $this->connection = mysql_connect(CONF_DB,\n CONF_DB_USER,\n CONF_DB_PASSWORD)\n or die(W_DB_ERROR);\n // auto-check database environment\n $this->autoCheck();\n }", "public function __construct($dbname, $user = null, $host = null, $port = null, $password = null, $searchPath = null) {\n $this->dbname = $dbname;\n $this->host = $host;\n $this->port = (int) $port;\n $this->user = $user;\n $this->password = $password;\n $this->searchPath = $searchPath;\n $this->connect();\n }", "public function __construct(ConnectionInterface &$db = null);", "function __construct($host, $username, $password, $database)\n {\n // $db->delete('users')->where(['id =' => 1]);\n // $db->update('users')->set($data)->where(['id =' => 1]);\n // $db->insert('users')->set($data);\n if(empty($connection)) {\n $this->connect($host, $username, $password, $database);\n }\n }", "function __construct()\n {\n $this->dataBase = new Database(\n Conf::get('pkg_db_host'),\n Conf::get('pkg_db_port'),\n Conf::get('pkg_db_user'),\n Conf::get('pkg_db_password'),\n Conf::get('pkg_db_name'),\n Conf::get('pkg_db_usefav_table'));\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "abstract public function getConnection();", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "function __construct() {\n global $db;\n $this->db_conn = mysql_connect(DB_HOST, DB_USER, DB_PASS); \n if ($this->db_conn) {\n if (!mysql_select_db(DB_NAME)) {\n throw new Exception('Database (' . DB_NAME . ') does not exists!');\n }\n }\n else {\n throw new Exception('Could not connect to database with the provided credentials!');\n }\n $this->last_query = '';\n }", "function construct()\n {\n $this->link = mysql_connect($this->hostname,$this->username,$this->password);\n if(!$this->link)\n {\n die(\"Can't connect to host...\".mysql_error());\n }\n\n mysql_select_db($this->database,$this->link) or die(\"Can't slect databace...\".mysql_error());\n\n mysql_set_charset(\"utf8\");\n }", "function init() {\n if ( empty( $this->hostname ) ) {\n $this->hostname = $this->gCI->gPZ['db_config'][\"hostname\"];\n }\n if ( empty( $this->username ) ) {\n $this->username = $this->gCI->gPZ['db_config'][\"username\"];\n }\n if ( empty( $this->password ) ) {\n $this->password = $this->gCI->gPZ['db_config'][\"password\"];\n }\n if ( strstr( $this->hostname, \":\" ) ) {\n list( $this->hostname, $this->port ) = explode( \":\", $this->gCI->gPZ['db_config']['hostname'] );\n } else {\n $this->port = 0;\n }\n $this->database = ( empty( $this->database ) ? $this->gCI->gPZ['db_config'][\"database\"] : $this->database );\n $this->db_conn = new mysqli( $this->hostname, $this->username, $this->password, $this->database, $this->port );\n\n if ( mysqli_connect_errno() ) {\n\n $this->gCI->fatal_error( \"Database Connect failed: %s\\n\", mysqli_connect_error()) ;\n }\n }", "public function __Construct($host,$username,$password,$database)\n\t{\n\t\t//Connect to database\n\t\t$this->_mysql;\n\t\t$dbconn = mysql_pconnect($host, $username, $password);\n\t\tif(!$dbconn)\n\t\t\tthrow new Exception(trigger_error(mysql_error(),E_USER_ERROR));\n\t\telse\n\t\t\t$connected = TRUE;\n\n\t}", "function __construct() {\r\n// \t\t$this->connection = mysql_connect($this->host,$this->username,$this->password,$this->dbname);\r\n// echo $this->host + \"zxdgfzxfg\";\r\n// echo \"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\";\r\n// \t\t$this->connection = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\", $this->username, $this->password, $this->options);\r\n\t\t$this->connection = mysqli_connect($this->host,$this->username,$this->password,$this->dbname);\r\n\t}", "public function __construct() {\n// $this->db['server'] = $args['server'];\n// $this->db['username'] = $args['username'];\n// $this->db['password'] = $args['password'];\n// $this->db['database'] = $args['database'];\n $this->open_connection();\n }", "public function __construct($host = NULL, $username = NULL, $password = NULL, $database = NULL)\n {\n if(!is_null($host) && !is_null($username) && !is_null($password) && !is_null($database)) {\n $this->connect_to_db($host, $username, $password, $database);\n }\n }", "function __construct() {\n $db_name = 'n8598177';\n $db_username = 'n8598177';\n $db_password = 'Em003080#77';\n $db_host = \"fastapps04.qut.edu.au\";\n\n\n try {\n $pdo = new PDO (\"mysql:host=$db_host;dbname=$db_name\", $db_username, $db_password);\n } catch (PDOException $e) {\n echo $e;\n exit();\n }\n\n // Attaches the PDO to the object\n $this->db = $pdo;\n return $this->db;\n }", "function connect()\n\t{\n\t\t$this->db=new MySQLi($this->localhos,$this->username,$this->passw,$this->data_name)or die(\"could not connect\");\n\t\t\n\t\treturn $this->db;\n\t}", "protected function __construct()\n\t{\n\t\tglobal $confDBType, $confDBServer, $confDBName, $confDBPrefix, $confDBUser, $confDBPasswd, $confDBPort;\n\n\t\t$this->dbType = (!empty($confDBType)) ? strtolower($confDBType) : '';\n\t\t$this->dbServer = $confDBServer;\n\t\t$this->dbUser = $confDBUser;\n\t\t$this->dbPassword = $confDBPasswd;\n\t\t$this->dbPort = (!empty($confDBPort)) ? intval($confDBPort) : 0;\n\t\t$this->dbName = $confDBName;\n\t\t$this->dbPrefix = $confDBPrefix;\n\n\t\t$this->statementCache = array();\n\n\t\t$this->debugMode = BwDebug::getDebugMode();\n\n\t\t$this->connect();\n\t}", "function __construct($host, $user, $pass, $database) {\n\t\t$this->mysqli = new mysqli($host,$user,$pass,$database);\n\t\t\n\t\tif(mysqli_connect_errno()) {\n\t\t\tdie(\"Could not connect to database!\");\n\t\t}\n\t}", "public function loadMySql(){\n\t\t$this->sql = new MySql;\n\t\treturn $this->sql->connectToMySql();\n\t}", "protected function __construct(){\n if (!is_object(self::$connector)) {\n \n if(isset(self::$config['socket']) && !empty(self::$config['socket'])){\n $connectionString = self::$config['socket'].\";dbname=\".self::$config['base'];\n }else{\n $connectionString = self::$config['type'].\":host=\".self::$config['host'].\";dbname=\".self::$config['base'];\n }\n \n $username = self::$config['log'];\n $password = self::$config['pass'];\n \n try{\n $connector = new PDO($connectionString, $username, $password);\n $connector->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $connector->query(\"SET NAMES utf8\");\n $this->setConnector($connector);\n }catch(Exception $e){\n //if the ORM is used with the Jet framework, use the Log class\n if(class_exists('Log')){\n Log::fatal($e);\n }else{\n trigger_error($e->getMessage(), E_USER_ERROR);\n }\n }\n }\n }", "public function __construct()\n {\n $cleardb_url = parse_url(getenv(\"CLEARDB_DATABASE_URL\"));\n $cleardb_server = $cleardb_url[\"host\"];\n $cleardb_username = $cleardb_url[\"user\"];\n $cleardb_password = $cleardb_url[\"pass\"];\n $cleardb_db = substr($cleardb_url[\"path\"], 1);\n\n try {\n $this->connection = new PDO(\"mysql:host=\" . $cleardb_server . \"; dbname=\" . $cleardb_db, $cleardb_username, $cleardb_password);\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "function __construct( $dbuser, $dbpassword, $dbname, $dbhost, $dbport ) {\n\t\tregister_shutdown_function( array( $this, '__destruct' ) );\n\n\t\t$this->dbuser = $dbuser;\n\t\t$this->dbpassword = $dbpassword;\n\t\t$this->dbname = $dbname;\n\t\t$this->dbhost = $dbhost;\n\t\tif ( defined('DB_CHARSET') && DB_CHARSET ) {\n\t\t\t$this->dbcharset = DB_CHARSET;\n\t\t} else {\n\t\t\t$this->dbcharset = 'UTF8';\n\t\t}\n\t\tif ( defined('DB_COLLATE') && DB_COLLATE ) {\n\t\t\t$this->dbcollate = DB_COLLATE;\n\t\t} else {\n\t\t\t$this->dbcollate = 'utf8_general_ci';\n\t\t}\n\t\t\n\t\t$this->db_connect();\n\t}", "public final function getConnection() {\n\t\t// if the connection hasn't been established, create it\n\t\tif($this->connection === null) {\n\t\t\t// connect to mySQL and provide the interface to PHPUnit\n\n\n\t\t\t$secrets = new \\Secrets(\"/etc/apache2/capstone-mysql/busters.ini\");\n\t\t\t$pdo = $secrets->getPdoObject();\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $secrets->getDatabase());\n\t\t}\n\t\treturn($this->connection);\n\t}", "function __construct(\n\t\t$database_ = NULL,\n\t\t$host_ = localhost,\n\t\t$username_ = NULL,\n\t\t$password_ = NULL)\n\t{\n\t\t$this->_connection = false;\n\t\t$this->_database = $database_;\n\t\t$this->_host = $host_;\n\t\t$this->_username = $username_;\n\t\t$this->_password = $password_;\n\t}", "function __construct () {\n $lines = file('../../dbinfo.txt');\n\t $dbserver = trim($lines[0]);\n\t $uid = trim($lines[1]);\n\t $pw = trim($lines[2]);\n\t $dbname = trim($lines[3]);\n \n //Connect to the mysql server and get back our link_identifier\n $link = mysqli_connect($dbserver, $uid, $pw, $dbname)\n \t\t\tor die('Could not connect: ' . mysqli_error($link));\n $this->link = $link;\n }", "private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}", "private function connectMysql() {\r\n\t\tif (!($tmp = mysql_connect($this -> host, $this -> user, $this -> pass))) {\r\n\t\t\tif ($this -> logger) {\r\n\t\t\t\tLogger::sqlError(mysql_error());\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception('Connection impossible : ' . mysql_error());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this -> link = &$tmp;\r\n\r\n\t\t// Select the db\r\n\t\tif (!mysql_select_db($this -> base, $this -> link)) {\r\n\t\t\tif ($this -> logger) {\r\n\t\t\t\tLogger::sqlError(mysql_error($this -> link));\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception('Impossible to select the database : ' . mysql_error($this -> link));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getConnection($db,$custom);", "protected function initDatabase() {\n\t\t$this->config\t\t= new Config();\n\t\tDatabase::$host\t\t= $this->config->host;\n\t\tDatabase::$username\t= $this->config->username;\n\t\tDatabase::$password\t= $this->config->password;\n\t\tDatabase::$dbname\t= $this->config->dbname;\n\t}", "function __construct()\n\t{\n\t\t/* constructor just creates a connection to the database */\n\t\t$this->con = mysql_connect($this->host,$this->dbUser,$this->dbpass) or die(\"Error: Could not connect to database server!!!\");\n\t\tmysql_select_db($this->dbName,$this->con);\n\t}", "public function __construct()\n {\n $dbhost = 'localhost';\n $dbuser = 'root';\n $dbpass = '';\n $dbname = 'Northwind';\n \n mysql_connect('dbhost', 'dbuser', 'dbpass');\n \n mysql_select_db($dbname);\n }", "private function init()\n {\n // connessione al mysql server\n if (!$this->link = mysql_connect( $this->hostname\n , $this->user_name\n , $this->user_pswd))\n {\n $this->set_error( 'Could not connect to mysql' );\n return;\n }\n\n // seleziona il database\n if (!mysql_select_db($this->user_db, $this->link))\n {\n $this->set_error( 'Could not select database' );\n return;\n }\n }", "public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }", "private function __construct($database) {\n\t\t$this->config = \\IO\\Libs\\Config::load('MySQL')->$database;\n\t\t$this->in_transaction = FALSE;\n\t\t$this->last_sth = NULL;\n\t}", "function __construct() {\r\n\t\t\r\n\t\tglobal $useDB, $dbTable;\r\n\t\t\r\n\t\t$this->ok = false;\r\n\t\tif( !$useDB ) return;\r\n\t\t\r\n\t\t$this->table = $dbTable;\r\n\t\t$this->state = 0;\r\n\t\t$this->connect();\r\n\t}", "public function __construct($host = \"\", $name = \"\", $password = \"\", $databaseName = \"\") {\n if($host) {\n $this->host = $host;\n }\n if($name) {\n $this->name = $name;\n }\n if($password) {\n $this->password = $password;\n }\n if($databaseName) {\n $this->databaseName = $databaseName;\n }\n $this->init_connection();\n }", "public function __construct()\n {\n $port_idx = strpos(DB_HOST, ':');\n\n if ($port_idx === false) {\n $conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n } else {\n $conn = new mysqli(substr(DB_HOST, 0, $port_idx), DB_USER, DB_PASSWORD, DB_NAME, substr(DB_HOST, $port_idx + 1));\n }\n\n if ($conn->connect_error) {\n throw new Exception($conn->connect_error);\n } else {\n $this->conn = $conn;\n }\n }", "public function __construct()\n {\n $this->con = new mysqli($this->servername, $this->username, $this->password, $this->database);\n if(mysqli_connect_error())\n {\n trigger_error(\"Not possible to connect to MySQL: \".mysqli_connect_error());\n }\n else\n {\n \n return $this->con;\n }\n }", "function __construct()\n {\n parent::__construct(\"mysql:host=127.0.0.1;dbname=sondcatalog\",\"root\",\"\");\n $this->strmysql=\"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?\";\n }", "function __construct() {\n $DatabHost = ENVOIRNMENT == 'local' ? LOCAL_DB_SERVER : DB_SERVER;\n $DatabUser = ENVOIRNMENT == 'local' ? LOCAL_DB_SERVER_USERNAME : DB_SERVER_USERNAME;\n $DatabPassword = ENVOIRNMENT == 'local' ? LOCAL_DB_SERVER_PASSWORD : DB_SERVER_PASSWORD;\n $DatabName = ENVOIRNMENT == 'local' ? LOCAL_DB_DATABASE : DB_DATABASE;\n\n $this->link = @mysqli_connect($DatabHost, $DatabUser, $DatabPassword, $DatabName);\n //$this->link = new mysqli('localhost', 'root', '', 'client_personalityquiz');\n if (!$this->link) {\n die('Could not connect: ' . mysqli_connect_error());\n }\n }" ]
[ "0.6838518", "0.67073375", "0.6680107", "0.6544474", "0.65043575", "0.64954954", "0.648076", "0.6429608", "0.6396104", "0.6391263", "0.63842636", "0.63760525", "0.6361692", "0.6358571", "0.63483465", "0.6346546", "0.63420737", "0.63409114", "0.6316471", "0.63002074", "0.62971175", "0.6295439", "0.62835634", "0.6273389", "0.62670904", "0.6259918", "0.62579983", "0.62369126", "0.62027574", "0.6200073", "0.617095", "0.6165637", "0.61537606", "0.61499304", "0.61459005", "0.6145536", "0.61391926", "0.61293626", "0.61255157", "0.61245203", "0.6123933", "0.6120962", "0.61200494", "0.61196506", "0.6112627", "0.610428", "0.61040366", "0.61031586", "0.6103044", "0.61007005", "0.60993016", "0.60993016", "0.60956055", "0.6090796", "0.60879934", "0.6082657", "0.60823053", "0.60781825", "0.6074422", "0.60731", "0.60725975", "0.6071327", "0.6067961", "0.606594", "0.60414827", "0.6039335", "0.6036452", "0.6034896", "0.603202", "0.60307246", "0.60287464", "0.6028353", "0.6017257", "0.6017101", "0.6015596", "0.60129005", "0.6012718", "0.6010971", "0.6007565", "0.6004253", "0.6003907", "0.5999928", "0.59879404", "0.59851074", "0.59810024", "0.597959", "0.5976502", "0.5968371", "0.59675163", "0.5964915", "0.5963657", "0.5962171", "0.5957488", "0.5956017", "0.59483296", "0.59473205", "0.59444064", "0.5939981", "0.5937288", "0.5936776", "0.59262013" ]
0.0
-1
Method returning list of available preprocessing types
public static function getSupportedPreprocessingTypes() { return [Preprocessing::TYPE_EACHONE, Preprocessing::TYPE_EQUIDISTANT_INTERVALS, Preprocessing::TYPE_INTERVAL_ENUMERATION, Preprocessing::TYPE_NOMINAL_ENUMERATION]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_desired_types();", "function wp_get_ext_types()\n {\n }", "public static function getTypes();", "public static function getStandardTypes()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "function getAvailableTypes() {\n return array('public' => 'public microtext',\n 'private' => 'private microtext',\n 'book' => 'microbuilder book microtext' );\n }", "private function get_post_types() {\n\n\t\t$output = 'names'; // names or objects, note names is the default\n\t\t$operator = 'and'; // 'and' or 'or'\n\n\t\t// Collate builtin and custom post-types\n\t\t$builtin_post_types = get_post_types( array( 'public' => true, '_builtin' => true ), $output, $operator );\n\t\t$custom_post_types = get_post_types( array( \n\t\t\t// Perhaps later introduce an option to select whether to include non-public CPTs as well.\n\t\t\t//'public' => true, \n\t\t\t'_builtin' => false \n\t\t\t), \n\t\t$output, $operator );\n\t\t$post_types = array_merge( $builtin_post_types, $custom_post_types );\n\n\t\treturn $post_types;\n\t}", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function getProcessTypes() {\n return array(\n 'media_seller',\n 'ad_network',\n 'product',\n // Publisher is requested per publisher ID.\n 'publisher',\n );\n }", "function vcex_theme_post_types() {\n\tif ( function_exists( 'wpex_theme_post_types' ) ) {\n\t\treturn wpex_theme_post_types();\n\t}\n\treturn array();\n}", "protected function getTypes() {}", "public static function getStandardTypes() : array\n {\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public function getInputTypesWithOptions()\n {\n $types = [];\n foreach ($this->inputTypes as $code => $inputType) {\n if ($inputType->isManageOptions()) {\n $types[] = $code;\n }\n }\n\n return $types;\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "function getSupportedSourceTypes() ;", "public static function returnAllowedInstallTypes() {}", "public function getCleanerTypes()\n\t{\n\t\treturn array(\n\t\t\t'str',\n\t\t\t'string',\n\t\t\t'str_notrim',\n\t\t);\n\t}", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "public static function get_post_types_to_setup() {\n\n\t\treturn static::$post_types_to_set_up;\n\n\t}", "public static function getCodeTypes() {\n return array('B', 'P', 'PU', 'PR', 'CS', 'SA', 'SR', 'PG');\n }", "public function getPreRequisite() : array\n {\n $types = snake_case(request('types'));\n\n $types = (! is_array($types)) ? explode(\",\", $types) : $types;\n\n $data = ListHelper::getConfigLists($types);\n\n if (in_array('countries', $types)) {\n $data['countries'] = ListHelper::getCountries();\n }\n\n if (in_array('currencies', $types)) {\n $data['currencies'] = ListHelper::getCurrencies();\n }\n\n if (in_array('timezones', $types)) {\n $data['timezones'] = ListHelper::getTimezones();\n }\n\n if (in_array('frequencies', $types)) {\n $data['frequencies'] = ArrHelper::getTransList('frequencies', 'general');\n }\n\n if (in_array('locales', $types)) {\n $data['locales'] = $this->locale->getLocales();\n }\n\n return $data;\n }", "public function getSupportedSourceTypes() {}", "public static function getPresetsList(): array\n\t{\n\t\t$presets['filter_last_30_days'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_LAST_30_DAYS_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::LAST_30_DAYS,\n\t\t\t],\n\t\t\t'default' => true,\n\t\t];\n\n\n\t\t$presets['filter_current_month'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_CURRENT_MONTH_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::CURRENT_MONTH,\n\t\t\t],\n\t\t\t'default' => false,\n\t\t];\n\n\t\t$presets['filter_current_quarter'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_CURRENT_QUARTER_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::CURRENT_QUARTER,\n\t\t\t],\n\t\t\t'default' => false,\n\t\t];\n\n\t\treturn $presets;\n\t}", "private function resource_type_list() {\n\n\t\t$this->load_site_settings();\n\n\t\tif($this->res_list != false) {\n\t\t\treturn $this->res_list;\n\t\t}\n\n\t\tif(is_array($this->settings['eeck_resourcetypes'])) {\n\t\t\t$this->res_list = array();\n\n\t\t\tforeach($this->settings['eeck_resourcetypes'] as $res) {\n\t\t\t\t$this->res_list[] = $res['name'];\n\t\t\t}\n\t\t}\n\n\t\treturn $this->res_list;\n\t}", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "protected function types()\n\t{\n\t\treturn array_keys($this->config->get('outmess::styles.' . $this->style)); \n\t}", "private function get_registered_post_types() {\n\t\t$post_types = get_post_types( array(), 'names' );\n\t\t$post_types = array_diff( $post_types, array( 'attachment', 'revision', 'nav_menu_item', 'customize_changeset', 'custom_css', 'oembed_cache', 'user_request', 'wp_block' ) );\n\t\t$data = array();\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$data[] = $post_type;\n\t\t}\n\t\treturn $data;\n\t}", "function wp_get_mime_types()\n {\n }", "public function getPostsTypes()\n\t {\n\t \t$args = array(\n\t\t\t 'public' => true,\n\t\t\t '_builtin' => false\n\t\t\t);\n\n\t\t\t$output = 'names'; // names or objects, note names is the default\n\t\t\t$operator = 'and'; // 'and' or 'or'\n\t\t\t$post_types = get_post_types( $args, $output, $operator ); \n\n\t\t\treturn $post_types;\n\t }", "function get_known_types()\n {\n return array_keys($this->object->_forms);\n }", "private function getPossibleResolvableTypes(): array\n {\n $suffixTypes = $this->getGacelaConfigFile()->getSuffixTypes();\n\n $resolvableTypes = $suffixTypes[$this->getResolvableType()] ?? $this->getResolvableType();\n\n return is_array($resolvableTypes) ? $resolvableTypes : [$resolvableTypes];\n }", "function get_post_mime_types()\n {\n }", "public function get_types()\n {\n }", "function get_parade_paragraphs_types_list() {\n return [\n ['', 'Chart box', 'chart_box', ''],\n ['', 'Header', 'header', ''],\n ['', 'Images', 'images', ''],\n ['', 'Locations', 'locations', ''],\n ['', 'Parallax', 'parallax', ''],\n ['', 'Simple', 'simple', ''],\n ['', 'Social links', 'social_links', ''],\n ['', 'Text & image', 'image_text', ''],\n ['', 'Text box', 'text_box', ''],\n ['', 'Text boxes', 'text_boxes', ''],\n ];\n}", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function getPostTypes()\n {\n return WPRSS_FTP_Settings::get_post_types();\n }", "public static function getCustomMimeTypeList()\n {\n # Returns the system MIME type mapping of extensions to MIME types.\n $out = array();\n $file = fopen( Configuration::mimeTypeList, 'r' );\n while ( ( $line = fgets( $file ) ) !== false ) {\n $line = trim( preg_replace( '/#.*/', '', $line ) );\n if ( ! $line )\n continue;\n $parts = preg_split( '/\\s+/', $line );\n if ( count( $parts ) == 1 )\n continue;\n $type = array_shift( $parts );\n foreach( $parts as $part )\n $out[$part] = $type;\n }\n fclose( $file );\n return $out;\n }", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "function qa_list_module_types()\n{\n\treturn array_keys(qa_list_modules_info());\n}", "public static function getTypeList() {\n return array(\n self::TYPE_CODE_1=>self::TYPE_STRING_1,\n self::TYPE_CODE_2=>self::TYPE_STRING_2,\n self::TYPE_CODE_3=>self::TYPE_STRING_3,\n self::TYPE_CODE_4=>self::TYPE_STRING_4,\n self::TYPE_CODE_5=>self::TYPE_STRING_5,\n self::TYPE_CODE_6=>self::TYPE_STRING_6\n );\n }", "public static function all_post_types()\n\t{\n\t\treturn array_merge(App::config('builtin_post_types'), App::get_public_cpt());\n\t}", "public static function getAllForcedTypes()\n {\n return array(\n self::FT_3GP,\n self::FT_AL,\n self::FT_BMP,\n self::FT_GIF,\n self::FT_JPG,\n self::FT_PNG,\n self::FT_TONE,\n self::FT_UL,\n self::FT_XMP,\n self::FT_STW\n );\n }", "public function getImagesTypes() {\n\t\treturn array( \n 'uncategorized' => 'Uncategorized',\n 'background' => \"Background & Pattern\",\n 'frame' => \"Mask\",\n 'image' => \"Image\",\n 'clipart' => \"Clipart\",\n 'shape' => \"Shape\" \n );\n\t}", "abstract protected function getSupportedClasses();", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "function elb_get_supported_post_types() {\n\tglobal $elb_options;\n\n\t$post_types = !empty( $elb_options['post_types'] ) ? $elb_options['post_types'] : array( 'post' );\n\n\treturn apply_filters( 'elb_post_types', $post_types );\n}", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "public static function getTypes() {\n\t\treturn [\n\t\t\t'text' => self::RESOURCE_TYPE_TEXT,\n\t\t\t'img' => self::RESOURCE_TYPE_IMG\n\t\t];\n\t}", "public function get_item_types()\n\t{\n\t\treturn Plugins::filter( 'get_item_types', $this->item_types );\n\t}", "public function getTypes()\n\t{\n\t\t$keys = array_keys( ColumnHelper::getAvailableTypes() );\n\t\t$labels = Sort::pluck( ColumnHelper::getAvailableTypes(), 'name' );\n\n\t\t$response = [];\n\t\t$types = array_combine( $keys, $labels );\n\t\t$allowed = $this->section->allowedColumns;\n\t\t$allowed = apply_filters( 'chef_sections_default_allowed_columns', $allowed, $this, $this->section );\n\n\t\tforeach( $types as $key => $type ){\n\t\t\tif( in_array( $key, $allowed ) )\n\t\t\t\t$response[ $key ] = $type;\n\t\t}\n\n\t\treturn $response;\n\n\t}", "function cextras_types_formulaires(){\r\n\t$types = array();\r\n\r\n\tforeach(_chemin() as $dir) {\r\n\t\tif (@is_dir($s = $dir.'extra-saisies/')) {\r\n\t\t\tforeach(preg_files($s, '.*.html$') as $saisie) {\r\n\t\t\t\t$type = basename($saisie,'.html');\r\n\t\t\t\t$types[$type] = array(\r\n\t\t\t\t\t'nom' => _T('cextras:type', array('type' => $type))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $types;\r\n}", "static public function getTypeList()\n\t{\n\t\t/*\n\t\t * Searches the Type folder for all different tournament types.\n\t\t * This is used for when a user is creating a tournament and want to select what type to use\n\t\t * The array is set up like so:\n\t\t * key: class name for tourney type (get_class() could be useful)\n\t\t * value: result of object getName()\n\t\t */\n\t\t$retarray = array();\n\t\tif ($dir = scandir(APPLICATION_PATH . '/models/VictoryCondition')) {\n\t\t\tforeach ($dir as $file) {\n\t\t\t\tif ($file != 'Abstract.php' && strtolower(substr($file, strrpos($file, '.') + 1)) == 'php') {\n\t\t\t\t\t$classname = 'Model_VictoryCondition_' . substr($file, 0, strrpos($file, '.'));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (class_exists($classname)) {\n\t\t\t\t\t\t\t$instance = new $classname;\n\t\t\t\t\t\t\tif ($instance instanceof Model_VictoryCondition_Abstract) {\n\t\t\t\t\t\t\t\t$retarray[$classname] = $instance->getTypeName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception $e) {}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retarray;\n\t}", "public function getSupportedFormat()\n {\n $gdInfo = gd_info();\n $support = array();\n\n foreach ($gdInfo as $key => $info) {\n if (is_bool($info) && $info === true) {\n $tmp = explode(' ', $key);\n $format = $tmp[0];\n if (($format != 'FreeType' || $format != 'T1Lib') && !in_array($format, $support)) {\n $support[] = $format;\n }\n }\n }\n\n return $support;\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public function getPlatformTypes(): array\n {\n return $this->platformTypes;\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public static function types()\n {\n return self::$types;\n }", "public function getCcAvailableTypes()\n {\n $types = $this->_getConfig()->getCcTypes();\n if ($method = $this->getMethod()) {\n $availableTypes = $method->getConfigData('cctypes');\n if ($availableTypes) {\n $availableTypes = explode(',', $availableTypes);\n foreach ($types as $code=>$name) {\n if (!in_array($code, $availableTypes)) {\n unset($types[$code]);\n }\n }\n }\n }\n return $types;\n }", "public static function types() : array\n {\n return ['questions', 'pictures', 'video'];\n }", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "protected function getAvailableTypes() {\n return [\n 'miljoenennota' => 'miljoenennota',\n 'miljoenennota (bijlage)' => 'miljoenennota',\n 'voorjaarsnota' => 'voorjaarsnota',\n 'najaarsnota' => 'najaarsnota',\n 'belastingplan (vvw)' => 'belastingplan_voorstel_van_wet',\n 'belastingplan (mvt)' => 'belastingplan_memorie_van_toelichting',\n 'belastingplan (sb)' => 'belastingplan_staatsblad',\n 'financieel jaarverslag' => 'financieel_jaarverslag',\n 'financieel jaarverslag (bijlage)' => 'financieel_jaarverslag',\n 'sw' => 'voorstel_van_wet',\n 'sw (mvt)' => 'memorie_van_toelichting',\n 'owb' => 'memorie_van_toelichting',\n 'owb (wet)' => 'voorstel_van_wet',\n 'jv' => 'jaarverslag',\n '1supp' => 'memorie_van_toelichting',\n '1supp (wet)' => 'voorstel_van_wet',\n '2supp' => 'memorie_van_toelichting',\n '2supp (wet)' => 'voorstel_van_wet',\n 'isb (mvt)' => 'isb_memorie_van_toelichting',\n 'isb (wet)' => 'isb_voorstel_van_wet',\n ];\n }", "function getDatatypes() {\n return ['Protein', 'Phenotype', 'Gene Expression', 'Nucleotide Sequence','Clinical Trials','Imaging Data','Morphology','Proteomics Data','Physiological Signals','Epigenetic Data','Data from Papers',\n 'Omics Data','Survey Data','Cell Signaling','Unspecified',];\n}", "static public function getThemeResourceTypes();", "function dp_selected_sort_types() {\n\t$selected_types = get_option('dp_sort_types');\n\tif(empty($selected_types))\n\t\treturn array();\n\n\t$supported_types = dp_supported_sort_types();\n\tforeach($selected_types as $key => $value)\n\t\t$selected_types[$key] = $supported_types[$key];\n\n\treturn apply_filters('dp_selected_sort_types', $selected_types);\n}", "public function types()\n {\n return $this->types;\n }", "public function get_post_types() {\n\n\t\treturn [\n\t\t\tPost_Type_Movie::SLUG,\n\t\t];\n\n\t}", "public function getSupportedFileTypes(){\n\t\t$_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types';\n\t\t$response = $this->getRequests($_url)['response'];\n\t\treturn $response;\n\t}", "function get_custom_post_types() {\n\t$args = array(\n\t\t'public' => true,\n\t\t'_builtin' => false\n\t);\n\t$post_types = get_post_types( $args, 'names');\n\treturn $post_types;\n}", "public function types()\n {\n return [\n static::TYPE_APP,\n static::TYPE_GALLERY,\n static::TYPE_PHOTO,\n static::TYPE_PLAYER,\n static::TYPE_PRODUCT,\n static::TYPE_SUMMARY,\n static::TYPE_SUMMARY_LARGE_IMAGE,\n ];\n }", "function acadp_get_custom_field_types() {\n\n\t$types = array(\n\t\t'text' => __( 'Text', 'advanced-classifieds-and-directory-pro' ),\n\t\t'textarea' => __( 'Text Area', 'advanced-classifieds-and-directory-pro' ),\n\t\t'select' => __( 'Select', 'advanced-classifieds-and-directory-pro' ),\n\t\t'checkbox' => __( 'Checkbox', 'advanced-classifieds-and-directory-pro' ),\n\t\t'radio' => __( 'Radio Button', 'advanced-classifieds-and-directory-pro' ),\n\t\t'url' => __( 'URL', 'advanced-classifieds-and-directory-pro' )\n\t);\n\n\t// Return\n\treturn apply_filters( 'acadp_custom_field_types', $types );\n\n}", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "#[Pure]\n\tpublic function getTypes()\n {\n }", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "private function get_type_options() {\n\t\tglobal $wpdb, $updraftcentral_host_plugin;\n\t\t$options = array();\n\n\t\tif (!function_exists('get_post_mime_types')) {\n\t\t\tglobal $updraftplus;\n\t\t\t// For a much later version of WP the \"get_post_mime_types\" is located\n\t\t\t// in a different folder. So, we make sure that we have it loaded before\n\t\t\t// actually using it.\n\t\t\tif (version_compare($updraftplus->get_wordpress_version(), '3.5', '>=')) {\n\t\t\t\trequire_once(ABSPATH.WPINC.'/post.php');\n\t\t\t} else {\n\t\t\t\t// For WP 3.4, the \"get_post_mime_types\" is located in the location provided below.\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/post.php');\n\t\t\t}\n\t\t}\n\n\t\t$post_mime_types = get_post_mime_types();\n\t\t$type_options = $wpdb->get_col(\"SELECT `post_mime_type` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' GROUP BY `post_mime_type` ORDER BY `post_mime_type` DESC\");\n\n\t\tforeach ($post_mime_types as $mime_type => $label) {\n\t\t\tif (!wp_match_mime_types($mime_type, $type_options)) continue;\n\t\t\t$options[] = array('label' => $label[0], 'value' => esc_attr($mime_type));\n\t\t}\n\n\t\t$options[] = array('label' => $updraftcentral_host_plugin->retrieve_show_message('unattached'), 'value' => 'detached');\n\t\treturn $options;\n\t}", "public function dmaps_get_post_types() {\n\t\t\t\t\n\t\t$args = array(\n\t\t 'public' => true,\n\t\t '_builtin' => false\n\t\t);\n\n\t\t$post_types = get_post_types( $args ); \n\t\t$post_arr = array( 'post' => 'Post', 'page' => 'Page' );\n\n\t\tforeach ( $post_types as $post_type ) {\n\n\t\t\t$arr = array($post_type => $post_type);\n\t\t\t$post_arr += $arr;\n\n\t\t}\n\t\t\n\t\treturn $post_arr;\t\n\n\t}", "public static function get_post_types() {\n\n\t\t$types = get_post_types();\n\t\t$custom_types = array_diff( $types, self::remove_types() );\n\n\t\tforeach ( $types as $type ) {\n\t\t\t$custom_types[$type] = ucfirst( str_replace( '_', ' ', $type ) );\n\t\t}\n\n\t\treturn $custom_types;\n\n\t}", "public static function getCardTypes() {\n $ctyplist = array();\n foreach (array_keys(CreditCardValidator::$card_patterns) as $k => $v)\n $ctyplist[$v] = $v;\n return $ctyplist;\n }", "public static function getTypes() {\n\t\treturn array(self::TYPE_FILE, self::TYPE_SOURCE, self::TYPE_THUMBNAIL);\n\t}", "static public function get_presets() {\n\t\treturn self::$presets;\n\t}", "private function getMimeTypes()\n {\n return apply_filters('wplms_assignments_upload_mimes_array',array(\n 'JPG' => array(\n 'image/jpeg',\n 'image/jpg',\n 'image/jp_',\n 'application/jpg',\n 'application/x-jpg',\n 'image/pjpeg',\n 'image/pipeg',\n 'image/vnd.swiftview-jpeg',\n 'image/x-xbitmap'),\n 'GIF' => array(\n 'image/gif',\n 'image/x-xbitmap',\n 'image/gi_'),\n 'PNG' => array(\n 'image/png',\n 'application/png',\n 'application/x-png'),\n 'DOCX'=> 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'RAR'=> 'application/x-rar',\n 'ZIP' => array(\n 'application/zip',\n 'application/x-zip',\n 'application/x-zip-compressed',\n 'application/x-compress',\n 'application/x-compressed',\n 'multipart/x-zip'),\n 'DOC' => array(\n 'application/msword',\n 'application/doc',\n 'application/text',\n 'application/vnd.msword',\n 'application/vnd.ms-word',\n 'application/winword',\n 'application/word',\n 'application/x-msw6',\n 'application/x-msword'),\n 'PDF' => array(\n 'application/pdf',\n 'application/x-pdf',\n 'application/acrobat',\n 'applications/vnd.pdf',\n 'text/pdf',\n 'text/x-pdf'),\n 'PPT' => array(\n 'application/vnd.ms-powerpoint',\n 'application/mspowerpoint',\n 'application/ms-powerpoint',\n 'application/mspowerpnt',\n 'application/vnd-mspowerpoint',\n 'application/powerpoint',\n 'application/x-powerpoint',\n 'application/x-m'),\n 'PPTX'=> 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'PPS' => 'application/vnd.ms-powerpoint',\n 'PPSX'=> 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n 'PSD' => array('application/octet-stream',\n 'image/vnd.adobe.photoshop'\n ),\n 'ODT' => array(\n 'application/vnd.oasis.opendocument.text',\n 'application/x-vnd.oasis.opendocument.text'),\n 'XLS' => array(\n 'application/vnd.ms-excel',\n 'application/msexcel',\n 'application/x-msexcel',\n 'application/x-ms-excel',\n 'application/vnd.ms-excel',\n 'application/x-excel',\n 'application/x-dos_ms_excel',\n 'application/xls'),\n 'XLSX'=> array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel'),\n 'MP3' => array(\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'audio/mp3',\n 'audio/x-mp3',\n 'audio/mpeg3',\n 'audio/x-mpeg3',\n 'audio/mpg',\n 'audio/x-mpg',\n 'audio/x-mpegaudio'),\n 'M4A' => array(\n 'audio/mp4a-latm',\n 'audio/m4a',\n 'audio/mp4'),\n 'OGG' => array(\n 'audio/ogg',\n 'application/ogg'),\n 'WAV' => array(\n 'audio/wav',\n 'audio/x-wav',\n 'audio/wave',\n 'audio/x-pn-wav'),\n 'WMA' => 'audio/x-ms-wma',\n 'MP4' => array(\n 'video/mp4v-es',\n 'audio/mp4',\n 'video/mp4'),\n 'M4V' => array(\n 'video/mp4',\n 'video/x-m4v'),\n 'MOV' => array(\n 'video/quicktime',\n 'video/x-quicktime',\n 'image/mov',\n 'audio/aiff',\n 'audio/x-midi',\n 'audio/x-wav',\n 'video/avi'),\n 'WMV' => 'video/x-ms-wmv',\n 'AVI' => array(\n 'video/avi',\n 'video/msvideo',\n 'video/x-msvideo',\n 'image/avi',\n 'video/xmpg2',\n 'application/x-troff-msvideo',\n 'audio/aiff',\n 'audio/avi'),\n 'MPG' => array(\n 'video/avi',\n 'video/mpeg',\n 'video/mpg',\n 'video/x-mpg',\n 'video/mpeg2',\n 'application/x-pn-mpg',\n 'video/x-mpeg',\n 'video/x-mpeg2a',\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'image/mpg'),\n 'OGV' => 'video/ogg',\n '3GP' => array(\n 'audio/3gpp',\n 'video/3gpp'),\n '3G2' => array(\n 'video/3gpp2',\n 'audio/3gpp2'),\n 'FLV' => 'video/x-flv',\n 'WEBM'=> 'video/webm',\n 'APK' => 'application/vnd.android.package-archive',\n ));\n }", "public static function getAllBuiltInTypes()\n {\n }", "public static function getTypeList()\n {\n return [\n self::TYPE_TEXT_FIELD => '',\n self::TYPE_DROP_DOWN => '',\n ];\n }", "public function getTypes()\n {\n $return = $this->dsn->types;\n\n if ($return === null) {\n return;\n }\n return explode(',', $return);\n }", "function getTypeslist ()\r\n\t{\r\n\t\t$query = 'SELECT id, name'\r\n\t\t\t\t. ' FROM #__flexicontent_types'\r\n\t\t\t\t. ' WHERE published = 1'\r\n\t\t\t\t. ' ORDER BY name ASC'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$types = $this->_db->loadObjectList();\r\n\t\treturn $types;\r\n\t}", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "function get_supported_post_types( $output = 'names' ) : array {\n\n\t$output = ( $output === 'names' ) ? 'names' : 'objects';\n\t$content_types = get_post_types(\n\t\t[ 'public' => true ],\n\t\t$output\n\t);\n\n\t$excluded_types = [\n\t\t'attachment',\n\t\t'custom_css',\n\t\t'customize_changeset',\n\t\t'revision',\n\t\t'nav_menu_item',\n\t\t'oembed_cache',\n\t\t'user_request',\n\t\t'wp_block',\n\t];\n\n\t$supported_types = [];\n\n\tforeach ( $content_types as $post_type ) {\n\t\t$type_name = ( $output === 'names' ) ? $post_type : $post_type->name;\n\n\t\tif (\n\t\t\t! in_array( $type_name, $excluded_types, true ) &&\n\t\t\tpost_type_supports( $type_name, 'custom-fields' )\n\t\t) {\n\t\t\t$supported_types[] = $post_type;\n\t\t}\n\t}\n\n\treturn apply_filters( 'coil_supported_post_types', $supported_types, $output );\n}", "protected function getSupportedClasses()\n {\n return array($this->class);\n }", "function pxlz_edgtf_get_header_type_options() {\n do_action('pxlz_edgtf_before_header_function_init');\n\n $header_types_option = apply_filters('pxlz_edgtf_register_header_type_class', $header_types_option = array());\n\n return $header_types_option;\n }", "protected function get_applicable_types()\n\t{\n\t\t$types = array();\n\n\t\tforeach ($this->types->get_all() as $id => $class)\n\t\t{\n\t\t\tif ($class->forum_robot && $class->forum_database)\n\t\t\t{\n\t\t\t\t$types[] = $id;\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public static function GetTypePlatList() {\n\t\t$sql = 'CALL get_all_typeplat_liste()';\n\t\treturn DatabaseHandler::GetAll($sql);\n\t}", "public function get_post_types(){ return $this->post_types; }" ]
[ "0.6598652", "0.64527637", "0.64381003", "0.64247364", "0.6379551", "0.6379551", "0.6379551", "0.63713324", "0.63643444", "0.63504547", "0.6295311", "0.62837964", "0.6280552", "0.62575877", "0.62489337", "0.62489337", "0.62489337", "0.62489337", "0.62391174", "0.6199816", "0.6199816", "0.61953926", "0.6186851", "0.6145421", "0.61443895", "0.6136132", "0.60796434", "0.6073085", "0.6039097", "0.6036815", "0.6031811", "0.60311365", "0.6028218", "0.6026884", "0.6004605", "0.5986827", "0.5961429", "0.59605163", "0.5958692", "0.5955467", "0.592998", "0.59290105", "0.5928143", "0.5924902", "0.59208274", "0.59124583", "0.58946365", "0.58926105", "0.5879222", "0.58772", "0.58682555", "0.5857311", "0.58517134", "0.5842204", "0.5833472", "0.5831552", "0.58226335", "0.5819679", "0.5818505", "0.58106345", "0.58097726", "0.5802363", "0.57933086", "0.5790399", "0.5788409", "0.5783975", "0.5782095", "0.57776415", "0.5768992", "0.5767993", "0.57664317", "0.574946", "0.5748889", "0.5747684", "0.57468116", "0.57454336", "0.5743564", "0.57342017", "0.5732256", "0.5727313", "0.57180655", "0.57178307", "0.57173735", "0.5715666", "0.5706474", "0.5704418", "0.57000643", "0.5687029", "0.5685549", "0.5680481", "0.5660342", "0.56586456", "0.5649846", "0.5646005", "0.56385094", "0.56272364", "0.5620447", "0.56147265", "0.56099284", "0.5598594" ]
0.7659145
0
region methods returning identification constants Method returning user understandable name of database
public static function getPpTypeName() { return self::PP_TYPE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDatabaseId();", "public function getDatabaseNameIdentifier()\n {\n return $this->database_name;\n }", "public function getActualDatabaseName():string;", "public static function getDatabaseName()\n {\n }", "public function getDatabaseName(): string;", "public static function GetDatabaseName() {\n\t\t\treturn QApplication::$Database[Person::GetDatabaseIndex()]->Database;\n\t\t}", "public function getDatabaseName():string;", "private static function getDatabaseName() {\n return get_parent_class(static::getTableName());\n }", "public static function GetDatabaseName() {\n\t\t\treturn QApplication::$Database[PersonWithLock::GetDatabaseIndex()]->Database;\n\t\t}", "Public Function getDatabaseName() { Return $this->dbname; }", "function get_database_name()\n\t{\n\t\treturn ($this -> database_name);\n\t}", "public function getDatabaseId()\n {\n return $this->database_id;\n }", "public function getIdDatabase()\n {\n return $this->idDatabase;\n }", "public function getUserPrimaryKeyName() {\n\n $forcedPkName = Configure::read('acl.aro.user.primary_key');\n if (! empty($forcedPkName)) {\n return $forcedPkName;\n } else {\n /* Return the primary key's name that follows the CakePHP\n * conventions */\n return 'id';\n }\n }", "function getUserIdentifier()\n\t{\n\t\tif ($this->serverType == \"activedirectory\") {\n\t\t\treturn $this->attr_sambalogin;\n\t\t} else {\n\t\t\treturn $this->attr_login;\n\t\t}\n\t}", "public function getId() {\n\t\treturn SYS_USERNAME;\n\t}", "public function database_name()\n\t{\n\t\treturn $this->database_name;\n\t}", "public static function getDatabaseName()\n {\n global $db;\n return $db->database;\n }", "public function getName()\n {\n return 'database';\n }", "public function getID(): string {\n\t\treturn 'user_ldap';\n\t}", "function database() {\n\t\t return PHPLM_DBNAME;\n\t\t}", "final public function getDBname() {\n \t\treturn $this->dbase;\n }", "public function getIdentifier()\n {\n $configID = $this->get_config() ? $this->get_config()->ID : 1;\n return ucfirst($this->get_mode()) . \"Site\" . $configID;\n }", "public function getIdentifier() : string {\r\n return $this->table;\r\n }", "function getIdentifier();", "function getIdentifier();", "public function getDatabase(): string;", "public function getAuthIdentifierName()\n {\n return $this->primaryKey;\n }", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "protected function getPrimaryKeyName() {\n return \"UserID\";\n }", "public function getIdentifier() {}", "public function getIdentifier() {}", "static public function getDbName()\n\t{\t\t\n\t\treturn self::$_dbName;\n\t}", "function identifier()\n\t{\n\t\t$identifier = $this->CI->session->userdata(AUTH_USER_IDENTIFIER);\n\t\tif ($identifier)\n\t\t{\n\t\t\treturn $identifier;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception (\"User identifier referenced, but not initialised. Perhaps the user is not logged in?\");\n\t\t}\n\t}", "function get_database_user()\n\t{\n\t\treturn ($this -> database_user);\n\t}", "public function getIdentifier(): string;", "public function getIdentifier(): string;", "protected abstract function getPrimaryKeyName();", "public function getDBName(){\n\n\t\treturn $this->_database;\n\t}", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getDbUsername(): string\n {\n return (string) Config::get('DB_USERNAME');\n }", "public function getAuthIdentifierName(){\n return 'id';\n }", "function alt_name($db_name)\n{\n switch ($db_name) {\n case\"c_america\":\n $db_name = \"General Central America\";\n break;\n default:\n $db_name = str_replace(\"_\", \" \", $db_name);\n }\n return $db_name;\n}", "public function getDbName():string {\n $database = $this->db->database;\n if($database) {\n return $database;\n }\n return $this->db->db->database;\n }", "public function getAuthIdentifierName() {\n return $this->primaryKey;\n }", "function chat_db_names() {\n //[primary id], [table name], [time created field name], [time modified field name]\n return null;\n}", "public function getUserIdentifier(): string\n\t{\n\t\treturn (string)$this->siret;\n\t}", "public function getDatabaseName() {\n\n if (isset($this->database)) {\n return $this->database;\n }\n\n return NULL;\n }", "function getIdentifier() ;", "function getIdentifier() ;", "function getIdentifier() ;", "private function getDbPrefix()\n\t{\n\t\treturn ($this->userdata['db_prefix'] == '') ? 'exp_' : preg_replace(\"#([^_])/*$#\", \"\\\\1_\", $this->userdata['db_prefix']);\n\t}", "public function getAuthIdentifierName()\n {\n return 'id';\n }", "public function getAuthIdentifierName()\n {\n return 'id';\n }", "public function getAuthIdentifierName()\n {\n return 'id';\n }", "public function getAuthIdentifierName()\n {\n return 'id';\n }", "public function getDatabaseName()\n {\n return $this->databaseName;\n }", "public static abstract function getIdentifier() : string;", "abstract public function getIdentifier();", "public function getNameIdentificationBd() {\n global $advancedCustomUser;\n if (!empty($this->name) && empty($advancedCustomUser->doNotIndentifyByName)) {\n return $this->name;\n }\n if (!empty($this->email) && empty($advancedCustomUser->doNotIndentifyByEmail)) {\n return $this->email;\n }\n if (!empty($this->user) && empty($advancedCustomUser->doNotIndentifyByUserName)) {\n return $this->user;\n }\n if (!empty($this->channelName)) {\n return $this->channelName;\n }\n return __(\"Unknown User\");\n }", "public function getDBName():? string;", "public abstract function getIdentifier();", "private function get_DB_name() {\n global $CFG;\n return $CFG->dbname;\n }", "abstract public function getSelectedDatabase();", "protected function getIdentifier () {\n\t\n\t\tif (!isset($this->tableName)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$parts = explode(\"_\", $this->tableName);\n\t\t$finalPart = $parts[(count($parts) - 1)];\n\t\t\n\t\treturn substr($finalPart, 0, -1).\"ID\";\n\t\n\t}", "public function getAuthIdentifierName()\n {\n return \"id\";\n }", "public function getDatabaseInfo();", "protected function getInstanceIdentifierName(): string\n\t{\n\t\treturn (string) $this->getKeyName();\n\t}", "public function getDatabaseName(): string\n {\n if (isset($this->database)) {\n return $this->database;\n }\n\n $connection = $this->getConnection();\n $db = $connection->getSelectDb() ?: $connection->getDb();\n // release\n $connection->release();\n\n return $db;\n }", "abstract public function identifier(): string;", "function db_get_name_from_puuid($puuid)\n{\n\t$s = \"SELECT name FROM principals WHERE puuid=$1\";\n\t$r = pg_query_params($s, array($puuid));\n\tif($r)\n\t\treturn pg_fetch_result($r, 'name');\n\telse\n\t\treturn -1;\n}", "public function getDbDatabase(): string\n {\n return Environment::is([Environment::ENV_TEST, Environment::ENV_HTTP_TEST])\n ? Testing::DB_NAME\n : (string) Config::get('DB_DATABASE');\n }", "function dbName()\n{\n\treturn $this->drv->dbName();\n}", "public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }", "public function getName()\n {\n return self::USER_ID;\n }", "public function getIdentifier()\n {\n return 1;\n }", "public static function getCurrentID() {\n return Session::get(Privilege::SESSION_NAME_ID);\n }", "public function dbname() {\n return $this->db['dbname'];\n }", "public function getDatabase()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'database%28%29%2c user%28%29%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}", "function db_get_myid($table,$realid)\r\n{\r\n $dbc=new db_control;\r\n $dbc->host=$GLOBALS['host'];\r\n $dbc->dbname=$GLOBALS['dbname'];\r\n $dbc->username=$GLOBALS['username'];\r\n $dbc->pass=$GLOBALS['pass'];\r\n $dbc->table=$table;\r\n $dbc->realid=$realid;\r\n return $dbc->get_myid();\r\n}", "public function name()\n {\n return 'database';\n }", "function vdb_name ($db) \r\n\t\t{\r\n\t\t\treturn !preg_match('/[^a-z_\\-0-9]/i', $db);\r\n\t\t\t\r\n\t\t}", "public static function getDatabasePlatform(): string;", "public function getDatabaseUsername()\n {\n return $this->settings['db_username'];\n }", "public function getDatabaseName()\n {\n return $this->settings['db_database'];\n }", "public static function IDForDBName( $name ){ return Database::APICallUp( array( 'IDForDBName' => $name ), \"Could not lookup database with name \" . $name ); }", "public function getIdentifier()\n {\n return $this->uid;\n }", "public function getDatabaseName()\n {\n return $this->connection->getDatabase();\n }" ]
[ "0.7820882", "0.736728", "0.7245367", "0.71730876", "0.6981991", "0.695359", "0.69443434", "0.6872108", "0.6859525", "0.67500824", "0.67409176", "0.6637565", "0.6604582", "0.65959805", "0.6573506", "0.65402126", "0.65140104", "0.6489426", "0.6465374", "0.6452141", "0.6441247", "0.64399636", "0.64177275", "0.6405", "0.6400119", "0.6400119", "0.6399312", "0.6353709", "0.6350591", "0.6350591", "0.6350591", "0.6350591", "0.6350591", "0.6350411", "0.6350111", "0.6349991", "0.6349991", "0.6348643", "0.6346935", "0.63316506", "0.63307726", "0.63307726", "0.6327561", "0.6325288", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6322775", "0.6319779", "0.6315435", "0.6314251", "0.63070107", "0.6290244", "0.6289421", "0.6281319", "0.6281099", "0.62722725", "0.62722725", "0.62712246", "0.6268584", "0.6262441", "0.6262441", "0.6262441", "0.6262441", "0.6258891", "0.6258265", "0.6255203", "0.62497604", "0.62354183", "0.62325007", "0.6227657", "0.62261534", "0.62237036", "0.62163556", "0.6214204", "0.61930263", "0.6192691", "0.6189612", "0.6187294", "0.6182043", "0.61800164", "0.6173653", "0.61695635", "0.61617994", "0.6160715", "0.61579764", "0.61519516", "0.61516505", "0.61332464", "0.61237955", "0.6119385", "0.6107774", "0.6103394", "0.60824484", "0.60807097", "0.6079853" ]
0.0
-1
Method returning identification of the database type
public static function getPpType() { return self::PP_TYPE_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatabaseType();", "public function getDatabaseType();", "private function get_db_type() {\n global $CFG;\n return $CFG->dbtype;\n }", "public function get_type()\n {\n return self::$_id;\n }", "function getDbTypeID($connect, $type_name)\n {\n $type_id = \"\";\n $sql = \"SELECT ID FROM qpkg_type WHERE Name LIKE '$type_name'\";\n $result = mysqli_query($connect, $sql);\n while ($row = mysqli_fetch_array($result)) {\n $type_id = $row['ID'];\n }\n \n\t\treturn $type_id;\n }", "function getDbTypeName($connect, $type_id)\n\t{\n\t\t$type_name = \"\";\n\t\t$sql = \"SELECT Name FROM qpkg_type WHERE ID = $type_id\";\n\t\t$result = mysqli_query($connect, $sql);\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\t$type_name = $row['Name'];\n\t\t}\n\n\t\treturn $type_name;\n\t}", "public function getConnectionType();", "public function get_type();", "public function getDbFieldType()\n {\n }", "abstract protected function get_typeid();", "public static function getConnectionType() {\n\t\t\n\t\tself::initializeSession ();\n\t\t\n\t\tif (! isset ( $_SESSION ['s_dbConnectionType'] ) || $_SESSION ['s_dbConnectionType'] == '') {\n\t\t\t\n\t\t\t$_SESSION ['s_dbConnectionType'] = 'mysql';\n\t\t\t\n\t\t\tself::$logger->debug ( 'DBConnectionType loaded: ' . $_SESSION ['s_dbConnectionType'] );\n\t\t\n\t\t}\n\t\t\n\t\treturn $_SESSION ['s_dbConnectionType'];\n\t}", "public function getTypeID() {\n\t\treturn $this->_type_id;\n\t}", "public function get_type(): string;", "public function getType()\n {\n return $this->type()->getID();\n }", "private function get_type() {\n\n\t}", "function getType(){\r\n\t\tif($this->inDB==false||$this->type==null){\r\n\t\t\t$temp=$this->dbq->getAnswerType($this->answer_id);\r\n\t\t\t$this->type = $temp;\r\n\t\t}\r\n\t\treturn $this->type;\r\n\t}", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "public function getIdType() {\n\t\treturn $this->id_type;\n\t}", "public function getSchemaType(): string\n {\n /** @var CubridSchema|MssqlSchema|MysqlSchema|OciSchema|PgsqlSchema|SqliteSchema $schema */\n $schema = $this->db->getSchema();\n return Schema::identifySchema($schema);\n }", "public function getType_id()\n {\n return $this->type_id;\n }", "function db_type_name_exists()\r\n {\r\n $toReturn = false;\r\n $dbmgr = new DB_Mgr(\"sites\");\r\n $stmt = \"SELECT count(*) FROM SI_PHONE_TYPE WHERE name = '\" . $this->name . \"'\";\r\n $dbmgr->query($stmt);\r\n $row = $dbmgr->get_a_row();\r\n $num = $row[0];\r\n return($num);\r\n }", "public function getTypeIdentifier();", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "private function _getDbConfigTypeName($type)\n {\n if ($type === 'password') {\n return 'str';\n }\n\n return $type;\n }", "public function type();", "public function type();", "public function type();", "public function type();", "public function getPDOType()\n {\n return PropelTypes::getPDOType($this->getType());\n }", "public static function getDatabasePlatform(): string;", "function getType() ;", "function getType() ;", "function getType() ;", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "public function typeId()\n {\n return config('entities.ids.' . $this->type);\n }", "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "function mscaffolding_get_type($type)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"string\":\n\t\t\t\treturn \" VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"text\":\n\t\t\t\treturn \" TEXT CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"boolean\":\n\t\t\t\treturn \" TINYINT NOT NULL,\";\n\t\t\tcase \"integer\":\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t\tdefault:\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t}\n\t}", "public function dbFieldType()\n {\n return 'string';\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public abstract function getType();", "public function _getType() {\n $modelName = self::_getModelName();\n return $modelName::_getDataTypeName();\n }", "public function getTypeId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typeid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typeid'];\n\t\t}\n\t}", "function getType(): string;", "function getType(): string;", "private function checkDatabaseType($database)\n\t{\n\t\tif (!in_array($database, $this->databaseTypes))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $database;\n\t}", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "public function storageType();", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public function getType() {}", "public abstract function type();", "public abstract function type();", "abstract public function getType(): int;", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getKind()\n {\n\t\t$select = $this->_db->select();\n \t$select->from(\"catalog__data_list_property\",\"name\")->where(\"id_property=?\",$this->type_id);\n \t$rs=$this->_db->fetchCol($select);\n \tif(!empty($rs))return $rs[0];\n\t\telse return \"\";\n }", "public function getReaderType()\n {\n return ezcDbSchema::DATABASE;\n }", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();", "public function getType();" ]
[ "0.8859894", "0.8859894", "0.80813485", "0.7279126", "0.7276363", "0.7114309", "0.7109791", "0.7109438", "0.706158", "0.69906247", "0.6929009", "0.68989605", "0.6890659", "0.68792826", "0.68318653", "0.68197614", "0.6811902", "0.6803151", "0.67689097", "0.67649794", "0.6762725", "0.67613554", "0.67358106", "0.67253333", "0.6723733", "0.6723733", "0.6723733", "0.6723733", "0.67229885", "0.66933036", "0.668014", "0.6679792", "0.66789645", "0.66623545", "0.6630817", "0.66280097", "0.6623589", "0.6620071", "0.6606577", "0.66061413", "0.6605882", "0.6605882", "0.66057897", "0.66016036", "0.65913403", "0.6584172", "0.6570908", "0.6570908", "0.65481806", "0.6545768", "0.6545768", "0.6545768", "0.6545768", "0.6545768", "0.6545768", "0.65367585", "0.6535522", "0.6535522", "0.6535522", "0.65354383", "0.65354383", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.6534077", "0.65266186", "0.65266186", "0.6517551", "0.6514219", "0.6514219", "0.6514219", "0.65137523", "0.65035105", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287", "0.649287" ]
0.0
-1
endregion methods returning identification constants Method for creating (initializating) a dataset
public function createPpDataset(PpDataset $ppDataset=null, PpTask $ppTask=null) { throw new NotImplementedException(); // TODO: Implement createPpDataset() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creating(Dataset $dataset)\n {\n }", "public function createData()\n {\n // TODO: Implement createData() method.\n }", "private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}", "abstract protected function _generateDataCollection();", "final public function dataset_config() {\n\t\t\t$param = getRequest('param');\n\n\t\t\t$childMap = array('methods'=>'method', 'types'=>'type', 'stoplist'=>'exclude', 'default'=>'column', 'fields' => 'field');\n\n\t\t\t$datasetConfig = $this->getDatasetConfiguration($param);\n\n\t\t\t$document = new DOMDocument();\n\t\t\t$document->encoding = \"utf-8\";\n\n\t\t\t$root\t = $document->createElement('dataset');\n\t\t\t$document->appendChild($root);\n\n\t\t\tif(is_array($datasetConfig)) {\n\t\t\t\t$objectTypes = umiObjectTypesCollection::getInstance();\n\n\t\t\t\tforeach($datasetConfig as $sectionName => $sectionRecords) {\n\t\t\t\t\t$section = $document->createElement($sectionName);\n\t\t\t\t\t$root->appendChild($section);\n\t\t\t\t\tif(is_array($sectionRecords)) {\n\t\t\t\t\t\tforeach($sectionRecords as $record) {\n\t\t\t\t\t\t\t$element = $document->createElement($childMap[$sectionName]);\n\t\t\t\t\t\t\tif(is_array($record)) {\n\t\t\t\t\t\t\t\tforeach($record as $propertyName => $propertyValue) {\n\t\t\t\t\t\t\t\t\tif($propertyName === \"#__name\") {\n\t\t\t\t\t\t\t\t\t\t$element->appendChild( $document->createTextNode($propertyValue) );\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif($propertyName == \"id\" && !is_numeric($propertyValue)) {\n\t\t\t\t\t\t\t\t\t\t$propertyValue = $objectTypes->getTypeIdByHierarchyTypeName(get_class($this), $propertyValue);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$element->setAttribute($propertyName, is_bool($propertyValue) ? ($propertyValue ? \"true\" : \"false\") : $propertyValue );\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\t$element->appendChild( $document->createTextNode($record) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$section->appendChild($element);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$section->appendChild( $document->createTextNode($sectionRecords) );\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$buffer = \\UmiCms\\Service::Response()\n\t\t\t\t->getCurrentBuffer();\n\t\t\t$buffer->contentType('text/xml');\n\t\t\t$buffer->charset('utf-8');\n\t\t\t$buffer->push($document->saveXML());\n\t\t\t$buffer->end();\n\t\t}", "abstract protected function initDataTypes();", "protected function _createCidSet() {}", "public static function getDataset()\n {\n $dataset = new Beans\\Dataset();\n \n $dataset->setStatus(0);\n $dataset->setCreatedOn(date(Application::TIMESTAMP));\n $dataset->setDistinctMolecules(0);\n $dataset->setInitialMolecules(0);\n $dataset->setIsCleaned(0);\n $dataset->setTs(date(Application::TIMESTAMP));\n \n return $dataset;\n }", "public function createData() {\n\t\t\tthrow new \\Exception('Not supported yet.'); \n\t\t}", "public function build(array $dataset);", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "function getDataSet() {\n\t\treturn $this->addDataSets(array(\"init.yml\"));\n\t}", "abstract protected function getDataSet();", "public function getDatasetIdArray()\n {\n $dataset = array();\n $classIdentifier = $this->openDataIni->variable( 'GeneralSettings', 'DatasetClassIdentifier' );\n $class = eZContentClass::fetchByIdentifier( $classIdentifier );\n if ( $class instanceof eZContentClass )\n {\n $params = array(\n 'ClassFilterType' => 'include',\n 'ClassFilterArray' => array( $classIdentifier ),\n 'Depth' => 1,\n 'DepthOperator' => 'ge'\n );\n $nodes = eZContentObjectTreeNode::subTreeByNodeID( $params, eZINI::instance( 'content.ini' )->variable( 'NodeSettings', 'RootNode' ) );\n foreach( $nodes as $node )\n {\n $dataset[] = self::generateUniqueId( $node->attribute( 'contentobject_id' ) );\n }\n }\n return $dataset;\n }", "public function creating(array $data);", "public function created(Dataset $dataset)\n {\n\n }", "function save_as_new_dataset_definitions($form, $initialid) {\n global $CFG, $DB;\n // Get the datasets from the intial question\n $datasetdefinitions = $this->get_dataset_definitions($initialid, $form->dataset);\n // $tmpdatasets contains those of the new question\n $tmpdatasets = array_flip($form->dataset);\n $defids = array_keys($datasetdefinitions);// new datasets\n foreach ($defids as $defid) {\n $datasetdef = &$datasetdefinitions[$defid];\n if (isset($datasetdef->id)) {\n // This dataset exist in the initial question\n if (!isset($tmpdatasets[$defid])) {\n // do not exist in the new question so ignore\n unset($datasetdefinitions[$defid]);\n continue;\n }\n // create a copy but not for category one\n if (0 == $datasetdef->category) {\n $olddatasetid = $datasetdef->id ;\n $olditemcount = $datasetdef->itemcount ;\n $datasetdef->itemcount =0;\n if (!$datasetdef->id = $DB->insert_record('question_dataset_definitions', $datasetdef)) {\n print_error('cannotcreatedataset', 'question', '', $defid);\n }\n //copy the dataitems\n $olditems = $DB->get_records_sql( // Use number as key!!\n \" SELECT itemnumber, value\n FROM {question_dataset_items}\n WHERE definition = ? \", array($olddatasetid));\n if (count($olditems) > 0 ) {\n $itemcount = 0;\n foreach($olditems as $item ){\n $item->definition = $datasetdef->id;\n if (!$DB->insert_record('question_dataset_items', $item)) {\n print_error('cannotinsertitem', 'question', '', array($item->itemnumber, $item->value, $datasetdef->name));\n }\n $itemcount++;\n }\n //update item count\n $datasetdef->itemcount =$itemcount;\n $DB->update_record('question_dataset_definitions', $datasetdef);\n } // end of copy the dataitems\n }// end of copy the datasetdef\n // Create relation to the new question with this\n // copy as new datasetdef from the initial question\n $questiondataset = new stdClass;\n $questiondataset->question = $form->id;\n $questiondataset->datasetdefinition = $datasetdef->id;\n if (!$DB->insert_record('question_datasets', $questiondataset)) {\n print_error('cannotcreaterelation', 'question', '', $name);\n }\n unset($datasetdefinitions[$defid]);\n continue;\n }// end of datasetdefs from the initial question\n // really new one code similar to save_dataset_definitions()\n if (!$datasetdef->id = $DB->insert_record('question_dataset_definitions', $datasetdef)) {\n print_error('cannotcreatedataset', 'question', '', $defid);\n }\n\n if (0 != $datasetdef->category) {\n // We need to look for already existing\n // datasets in the category.\n // By first creating the datasetdefinition above we\n // can manage to automatically take care of\n // some possible realtime concurrence\n if ($olderdatasetdefs = $DB->get_records_select(\n 'question_dataset_definitions',\n \"type = ?\n AND name = ?\n AND category = ?\n AND id < ?\n ORDER BY id DESC\", array($datasetdef->type, $datasetdef->name, $datasetdef->category, $datasetdef->id))) {\n\n while ($olderdatasetdef = array_shift($olderdatasetdefs)) {\n $DB->delete_records('question_dataset_definitions', array('id' => $datasetdef->id));\n $datasetdef = $olderdatasetdef;\n }\n }\n }\n\n // Create relation to this dataset:\n $questiondataset = new stdClass;\n $questiondataset->question = $form->id;\n $questiondataset->datasetdefinition = $datasetdef->id;\n if (!$DB->insert_record('question_datasets', $questiondataset)) {\n print_error('cannotcreaterelation', 'question', '', $name);\n }\n unset($datasetdefinitions[$defid]);\n }\n\n // Remove local obsolete datasets as well as relations\n // to datasets in other categories:\n if (!empty($datasetdefinitions)) {\n foreach ($datasetdefinitions as $def) {\n $DB->delete_records('question_datasets', array('question' => $form->id, 'datasetdefinition' => $def->id));\n\n if ($def->category == 0) { // Question local dataset\n $DB->delete_records('question_dataset_definitions', array('id' => $def->id));\n $DB->delete_records('question_dataset_items', array('definition' => $def->id));\n }\n }\n }\n }", "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "public function create( array $data );", "function __construct()\n {\n parent::__construct('../data/Sets.csv', 'id');\n }", "public function create($data) {\n\t\t// Create an ID\n\t\t$id = $this->idCreate();\n\t\t// Write the data file\n\t\tfile_put_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}", "public abstract function getInstanceData($parameters);", "function getDataSets()\n {\n if ($this->getResource('wdrs:describedby')){\n $dataset = $this->getResource('wdrs:describedby')->all('void:inDataset');\n }else {\n $schemaUrls = $this->allResources('schema:url');\n $describedBy = array_filter($schemaUrls, function($schemaUrl)\n {\n return(strpos($schemaUrl->getURI(), 'worldcat.org/title'));\n });\n $describedBy = array_shift($describedBy);\n $dataset = $describedBy->all('void:inDataset');\n }\n \n return $dataset;\n }", "public function definition()\n {\n $serialPrefix = 'ID';\n $serialSuffix = $this->faker->unique()->regexify('[A-Z]{5}[0-4]{3}');\n\n return [\n 'serial' => $serialPrefix . $serialSuffix,\n 'user_id' => User::all()->random()->id,\n 'category_id' => Category::all()->random()->id,\n 'detail' => $this->faker->text(),\n 'address' => $this->faker->address(),\n 'city' => $this->faker->city(),\n 'subdistrict' => $this->faker->streetName(),\n 'latitude' => $this->faker->latitude(),\n 'longitude' => $this->faker->longitude(),\n 'private' => $this->faker->boolean(20),\n ];\n }", "public static function get_dataset()\r\n {\r\n $ds = new Datasets();\r\n return $ds->get_by_type(self::DATASET_TYPE);\r\n }", "public function createDataProvider()\n {\n return [\n [1, 1, 0],\n [null, 0, 1]\n ];\n }", "abstract protected function configureDataConstraints(): array;", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function create(array $data);", "public function getDataDefinition();", "protected function create(array $data)\n {\n \n }", "public function actionCreate() { \n $datasetModel = new \\app\\models\\yiiModels\\YiiDatasetModel();\n $variablesModel = new \\app\\models\\yiiModels\\YiiVariableModel();\n \n $variables = $variablesModel->getInstancesDefinitionsUrisAndLabel(Yii::$app->session['access_token']);\n $this->view->params[\"variables\"] = $this->getVariablesListLabelToShowFromVariableList($variables);\n \n //If the form is complete, register data\n if ($datasetModel->load(Yii::$app->request->post())) {\n //csv\n $document = UploadedFile::getInstance($datasetModel, 'file');\n $serverFilePath = \\config::path()['documentsUrl'] . \"DatasetFiles/\" . $document->name;\n $document->saveAs($serverFilePath);\n \n //read csv file and save data\n $fileContent = str_getcsv(file_get_contents($serverFilePath), \"\\n\");\n \n unlink($serverFilePath); \n \n $givenVariables = $datasetModel->variables;\n $csvErrors = $this->getCSVErrors($fileContent, $givenVariables);\n $correspondancesCSV = $this->getColumnsCorrespondences(str_getcsv($fileContent[0], DatasetController::DELIM_CSV), $givenVariables);\n \n $arrayData = $this->csvToArray($fileContent);\n \n if ($csvErrors !== null) {\n $csvHeaders = str_getcsv($fileContent[0], DatasetController::DELIM_CSV);\n \n $arrayDataWithErrors = $this->addColumnErrorsAndMissingToArray($arrayData, $csvErrors);\n return $this->render('create', [\n 'model' => $datasetModel,\n 'handsontable' => $this->generateHandsontableDataset($arrayDataWithErrors),\n 'handsontableErrorsCellsSettings' => $this->getHandsontableCellsSettings($csvErrors, $csvHeaders, $correspondancesCSV)\n ]);\n } else {\n $firstInsert = true;\n foreach ($correspondancesCSV as $key => $value) {\n if ($value !== DatasetController::AGRONOMICAL_OBJECT_URI\n && $value !== DatasetController::DATE) { //it is a variable column\n $requestRes = $this->saveDataset($fileContent, $correspondancesCSV, $datasetModel, $key);\n \n if (is_string($requestRes)) {//Request error\n return $this->render('/site/error', [\n 'name' => Yii::t('app/messages','Internal error'),\n 'message' => $requestRes]);\n } else if (is_array($requestRes) && isset($requestRes[\"token\"])) { //user must log in\n return $this->redirect(Yii::$app->urlManager->createUrl(\"site/login\"));\n } else { //data has been saved \n //say that the documents are linked (unlinked -> linked)\n if ($firstInsert) {\n $update = $this->updateDocumentsToLinked($datasetModel);\n if ($update === \"token\") {\n return $this->redirect(Yii::$app->urlManager->createUrl(\"site/login\"));\n }\n $firstInsert = false;\n }\n }\n }\n }\n return $this->render('_form_dataset_created', [\n 'model' => $datasetModel,\n 'handsontable' => $this->generateHandsontableDataset($arrayData),\n 'intertedDataNumber' => $this->getNumberInsertedData($arrayData, $givenVariables, $correspondancesCSV)\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $datasetModel,\n ]);\n }\n }", "public function getDataSet()\n {\n return $this->getConnection()->createDataSet();\n }", "public function init() {\n extract($this->data);\n\n // Generate unique ID\n $this->data['id'] = uniqid();\n }", "public function create(array $data) {\n \n }", "public static function factory(array $data);", "public static function factory(array $data);", "protected function _createSubset() {}", "public function definition()\n {\n $attributesIds = Attribute::all()->pluck('id')->toArray();\n return [\n // generation Parameters data with factory and faker library\n 'name' => $this->faker->name(),\n 'attribute_id'=> $this->faker->randomElement($attributesIds)\n ];\n }", "public function __construct(array $data) {\n // no id if we're creating as it comes from the database\n if(isset($data['id'])) {\n $this->id = $data['id'];\n }\n $this->jsonData = $data['jsonData'];\n $this->electionTitle = $data['electionTitle'];\n $this->beginDate = $data['beginDate'];\n $this->endDate = $data['endDate'];\n $this->coefficients = $data['coefficients'];\n $this->appVersion = $data['appVersion'];\n }", "protected function getDataSet()\n {\n return new \\PHPUnit_Extensions_Database_DataSet_YamlDataSet(__DIR__ . '/DataSet/base.yml');\n }", "public function create( $data = array() );", "function wpendata_dataset_init() {\n $labels = array(\n 'name' => _x( 'Datasets', 'Post type general name', WPENDATA_TEXT_DOMAIN ),\n 'singular_name' => _x( 'Dataset', 'Post type singular name', WPENDATA_TEXT_DOMAIN ),\n 'menu_name' => _x( '2. Datasets', 'Admin Menu text', WPENDATA_TEXT_DOMAIN ),\n 'name_admin_bar' => _x( 'Dataset', 'Add New on Toolbar', WPENDATA_TEXT_DOMAIN ),\n 'add_new' => __( 'Add New Dataset', WPENDATA_TEXT_DOMAIN ),\n 'add_new_item' => __( 'Add New Dataset', WPENDATA_TEXT_DOMAIN ),\n 'new_item' => __( 'New Dataset', WPENDATA_TEXT_DOMAIN ),\n 'edit_item' => __( 'Edit Dataset', WPENDATA_TEXT_DOMAIN ),\n 'view_item' => __( 'View Dataset', WPENDATA_TEXT_DOMAIN ),\n 'all_items' => __( 'Datasets', WPENDATA_TEXT_DOMAIN ),\n 'search_items' => __( 'Search Datasets', WPENDATA_TEXT_DOMAIN ),\n 'parent_item_colon' => __( 'Parent Datasets:', WPENDATA_TEXT_DOMAIN ),\n 'not_found' => __( 'No Datasets found.', WPENDATA_TEXT_DOMAIN ),\n 'not_found_in_trash' => __( 'No Datasets found in Trash.', WPENDATA_TEXT_DOMAIN ),\n 'featured_image' => _x( 'Dataset Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'archives' => _x( 'Dataset archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'insert_into_item' => _x( 'Insert into Dataset', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'uploaded_to_this_item' => _x( 'Uploaded to this Dataset', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'filter_items_list' => _x( 'Filter Datasets list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'items_list_navigation' => _x( 'Datasets list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'items_list' => _x( 'Datasets list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n );\n \n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => false,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'Dataset' ),\n 'capability_type' => 'dataset',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-book-alt',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n );\n \n register_post_type( 'Dataset', $args );\n}", "public function create(array $data)\n {\n }", "public function create(array $data)\n {\n }", "public function create(array $data)\n {\n }", "public function testCanGetDatasetByTitleAndOptionallyByAccountAndProject() {\n AuthenticationHelper::login(\"[email protected]\", \"password\");\n\n $topLevel = new DatasetInstanceSummary(\"Top Level Dataset\", \"test-json\");\n $topLevelId = $this->datasetService->saveDataSetInstance($topLevel, null, null);\n\n $account1 = new DatasetInstanceSummary(\"Account Dataset 1\", \"test-json\");\n $account1Id = $this->datasetService->saveDataSetInstance($account1, null, 1);\n\n $account2 = new DatasetInstanceSummary(\"Account Dataset 2\", \"test-json\");\n $account2Id = $this->datasetService->saveDataSetInstance($account2, null, 2);\n\n $project1 = new DatasetInstanceSummary(\"Project Dataset 1\", \"test-json\");\n $project1Id = $this->datasetService->saveDataSetInstance($project1, \"soapSuds\", 2);\n\n $project2 = new DatasetInstanceSummary(\"Project Dataset 2\", \"test-json\");\n $project2Id = $this->datasetService->saveDataSetInstance($project2, \"wiperBlades\", 2);\n\n $this->assertEquals($this->datasetService->getDataSetInstance($topLevelId), $this->datasetService->getDataSetInstanceByTitle(\"Top Level Dataset\", null, null));\n $this->assertEquals($this->datasetService->getDataSetInstance($account1Id), $this->datasetService->getDataSetInstanceByTitle(\"Account Dataset 1\", null, 1));\n $this->assertEquals($this->datasetService->getDataSetInstance($account2Id), $this->datasetService->getDataSetInstanceByTitle(\"Account Dataset 2\", null, 2));\n $this->assertEquals($this->datasetService->getDataSetInstance($project1Id), $this->datasetService->getDataSetInstanceByTitle(\"Project Dataset 1\", \"soapSuds\", 2));\n $this->assertEquals($this->datasetService->getDataSetInstance($project2Id), $this->datasetService->getDataSetInstanceByTitle(\"Project Dataset 2\", \"wiperBlades\", 2));\n\n\n }", "function initAsSpecimen() {\n $this->id = 0;\n\n $this->label = '';\n $this->datec = '';\n $this->fk_author = '';\n $this->tms = '';\n $this->fk_source = '';\n $this->sourcetype = '';\n $this->url = '';\n }", "function __construct($data = null) {\n if ($data !== null) {\n $this->id = (isset($data[0]['id'])) ? $data[0]['id'] : \"\";\n $this->technology_id = (isset($data[0]['technology_id'])) ? $data[0]['technology_id'] : \"\";\n $this->student_id = (isset($data[0]['student_id'])) ? $data[0]['student_id'] : \"\";\n $this->count = (isset($data[0]['count'])) ? $data[0]['count'] : \"\";\n }\n }", "public function definition()\n {\n $ids = collect();\n for ($i = 1; $i <= 5; $i++)\n $ids->add($i);\n\n return [\n 'name' => $this->faker->name(),\n// 'client_id' => null,\n 'client_id' => $this->faker->randomElement($ids),\n 'is_headquarter' => false\n ];\n }", "public function initAsSpecimen()\n {\n\t\tglobal $user;\n\n\t\t$now=dol_now();\n\n\t\t$this->id = 0;\n\t\t$this->doc_date = $now;\n\t\t$this->doc_type = '';\n\t\t$this->doc_ref = '';\n\t\t$this->fk_doc = 0;\n\t\t$this->fk_docdet = 0;\n\t\t$this->thirdparty_code = 'CU001';\n\t\t$this->subledger_account = '41100001';\n\t\t$this->subledger_label = 'My customer company';\n\t\t$this->numero_compte = '411';\n\t\t$this->label_compte = 'Customer';\n\t\t$this->label_operation = 'Sales of pea';\n\t\t$this->debit = 99.9;\n\t\t$this->credit = '';\n\t\t$this->montant = '';\n\t\t$this->sens = 'D';\n\t\t$this->fk_user_author = $user->id;\n\t\t$this->import_key = '';\n\t\t$this->code_journal = 'VT';\n\t\t$this->journal_label = 'Journal de vente';\n\t\t$this->piece_num = '';\n\t\t$this->date_creation = $now;\n\t}", "protected function getDataSet()\n {\n return new CompositeDataSet([]);\n }", "public function dataProviderCreateInstance()\n {\n yield [\n [\n 'seed' => 0,\n 'min' => 0,\n 'max' => 10,\n 'format' => [\n [-1, -1],\n [-1, -1],\n ],\n ],\n ];\n }", "function __construct($_dataTableName = 'Application_Model_DbTable_ProjectCcLicense')\n {\n $this->_dataTableName = $_dataTableName;\n $this->_dataTable = new $this->_dataTableName;\n }", "function newDataObject() {\n\t\tassert(false); // Should be implemented by subclasses\n\t}", "protected function getDataSet(){\n return $this->createXMLDataSet(\n dirname(__FILE__) . '/../_dataSet/commonTest.xml'\n );\n }", "protected function getDataSet(){\n return $this->createXMLDataSet(\n dirname(__FILE__) . '/../_dataSet/commonTest.xml'\n );\n }", "public function __construct($dati)\n {\n $this->dati = $dati;\n }", "public function __construct($dati)\n {\n $this->dati = $dati;\n }", "public static function initialise() {\n \t// We can't modify it in place, else we'll break any logging done inside the SihnonFramework tree\n \t// or other subclass trees.\n \tstatic::$types = parent::$types;\n \t\n \t// Add the new data types for this subclass\n static::$types['job_id'] = 'int'; \n }", "protected function getDataSet() {\n\t\treturn $this->createXMLDataSet ( dirname ( __FILE__ ) . '\\..\\..\\data\\cron\\1_DS_1_article_test_1_dupl_attach_1_unpub_attach_1_new_valid_DS_data.xml' );\n\t}", "public function createData()\n {\n $data['locations'] = ['top', 'left', 'bottom'];\n\n $data['positions'] = [\n 'top' => $this->positionCount('top'), \n 'left' => $this->positionCount('left'),\n 'bottom' => $this->positionCount('bottom'),\n ];\n\n return (object) $data;\n }", "public function actionGenerateAndDownloadDatasetCreationFile() {\n $fileColumns[] = DatasetController::AGRONOMICAL_OBJECT_URI;\n $fileColumns[] = DatasetController::DATE;\n $variables = Yii::$app->request->post('variables');\n foreach ($variables as $variableAlias) {\n $fileColumns[] = $variableAlias;\n }\n\n $file = fopen('./documents/DatasetFiles/datasetTemplate.csv', 'w');\n fputcsv($file, $fileColumns, $delimiter = \";\"); \n fclose($file);\n }", "public static function getDataSetType()\n {\n return static::$datasetType;\n }", "function initDataFilters() {\n try {\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"data_filters (\n id int unsigned NOT NULL auto_increment,\n type varchar(150) NOT NULL DEFAULT 'DataFilter',\n name varchar(50) DEFAULT NULL,\n raw_additional_properties longtext ,\n created_on datetime DEFAULT NULL,\n created_by_id int(10) unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n is_private tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX created_by_id (created_by_id),\n INDEX name (name)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "abstract public function prepareData();", "public function initialize()\n {\n $this->setSchema(\"kp_si_disat\");\n $this->setSource(\"data_diksar\");\n $this->belongsTo('id_sertifikat', '\\Sertifikat', 'id_sertifikat', ['alias' => 'Sertifikat']);\n $this->belongsTo('id_kesehatan', '\\Kesehatan', 'id_kesehatan', ['alias' => 'Kesehatan']);\n }", "public function objectIdentifierExposureTestData() {}", "public function gpDataProvider() {}", "public static function createSelf()\n {\n $dataTypeFactory = new self();\n\n $dataTypeFactory->addFactoryTypeHandler('bit', new BitTypeFactory());\n // Integer type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinyint', new TinyIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('smallint', new SmallIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumint', new MediumIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('int', new IntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('bigint', new BigIntTypeFactory());\n // Numeric-point type mappers.\n $dataTypeFactory->addFactoryTypeHandler('double', new DoubleTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('float', new FloatTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('decimal', new DecimalTypeFactory());\n // Date and time mappers.\n $dataTypeFactory->addFactoryTypeHandler('date', new DateTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('time', new TimeTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('timestamp', new TimestampTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('datetime', new DateTimeTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('year', new YearTypeFactory());\n // Char type mappers.\n $dataTypeFactory->addFactoryTypeHandler('char', new CharTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('varchar', new VarCharTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('binary', new BinaryTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('varbinary', new VarBinaryTypeFactory());\n // Blob type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinyblob', new TinyBlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('blob', new BlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumblob', new MediumBlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('longblob', new LongBlobTypeFactory());\n // Text type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinytext', new TinyTextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('text', new TextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumtext', new MediumTextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('longtext', new LongTextTypeFactory());\n // Option type mappers.\n $dataTypeFactory->addFactoryTypeHandler('enum', new EnumTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('set', new SetTypeFactory());\n // Other type mappers.\n $dataTypeFactory->addFactoryTypeHandler('json', new JsonTypeFactory());\n\n return $dataTypeFactory;\n }", "function __construct(array $data)\n\t{\n if (isset($data)) {\n $this->id = $data['id'];\n $this->name = $data['name'];\n $this->description = $data['description'];\n }\n\t}", "function initData() {\n\t\tif (isset($this->journalId)) {\n\t\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t\t$journal =& $journalDao->getById($this->journalId);\n\n\t\t\tif ($journal != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'title' => $journal->getSetting('title', null), // Localized\n\t\t\t\t\t'description' => $journal->getSetting('description', null), // Localized\n\t\t\t\t\t'journalPath' => $journal->getPath(),\n\t\t\t\t\t'enabled' => $journal->getEnabled()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->journalId = null;\n\t\t\t}\n\t\t}\n\t\tif (!isset($this->journalId)) {\n\t\t\t$this->_data = array(\n\t\t\t\t'enabled' => 1\n\t\t\t);\n\t\t}\n\t}", "private static function createSampleObject($id, $title, $projectId, $text = '', $version = '', $authorId = 0,\n\t\t$created = null, $status = 0, $classification = 0)\n\t{\n\t\tself::$data[$id] = new stdClass;\n\t\tself::$data[$id]->id = $id;\n\t\tself::$data[$id]->title = $title;\n\t\tself::$data[$id]->project_id = $projectId;\n\t\tself::$data[$id]->text = $text;\n\t\tself::$data[$id]->version = $version;\n\t\tself::$data[$id]->author_id = $authorId;\n\t\tself::$data[$id]->created = $created;\n\t\tself::$data[$id]->status = $status;\n\t\tself::$data[$id]->classification = $classification;\n\t}", "abstract public function generateData(array $data);", "function supports_dataset_item_generation() {\n return true;\n }", "public function create()\n\t{\n\t\treturn View::make('datasets.create');\n\t}", "public function hasDatasetId() {\n return $this->_has(2);\n }", "public function hasDatasetId() {\n return $this->_has(2);\n }", "function __Construct(array $columnData ){\r\n\t\tif(array_key_exists(\"TABLE_CATALOG\",$columnData)){\r\n\t\t\t$this->tableCatalog = $columnData[\"TABLE_CATALOG\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"TABLE_SCHEMA\",$columnData)){\r\n\t\t\t$this->tableSchema = $columnData[\"TABLE_SCHEMA\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"TABLE_NAME\",$columnData)){\r\n\t\t\t$this->tableName = $columnData[\"TABLE_NAME\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLUMN_NAME\",$columnData)){\r\n\t\t\t$this->columnName = $columnData[\"COLUMN_NAME\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"ORDINAL_POSITION\",$columnData)){\r\n\t\t\t$this->ordinalPosition = intval($columnData[\"ORDINAL_POSITION\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLUMN_DEFAULT\",$columnData)){\r\n\t\t\t$this->columnDefault = $columnData[\"COLUMN_DEFAULT\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"IS_NULLABLE\",$columnData)){\r\n\t\t\t$this->isNullable = $columnData[\"IS_NULLABLE\"] != \"NO\";\r\n\t\t}\r\n\t\tif(array_key_exists(\"DATA_TYPE\",$columnData)){\r\n\t\t\t$this->dataType = $columnData[\"DATA_TYPE\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"CHARACTER_MAXIMUM_LENGTH\",$columnData)){\r\n\t\t\t$this->charMaxLength = intval($columnData[\"CHARACTER_MAXIMUM_LENGTH\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"CHARACTER_OCTET_LENGTH\",$columnData)){\r\n\t\t\t$this->charOctetLenght = intval($columnData[\"CHARACTER_OCTET_LENGTH\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"NUMERIC_PRECISION\",$columnData)){\r\n\t\t\t$this->numericPrecision = intval($columnData[\"NUMERIC_PRECISION\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"NUMERIC_SCALE\",$columnData)){\r\n\t\t\t$this->numericScale = intval($columnData[\"NUMERIC_SCALE\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"DATETIME_PRECISION\",$columnData)){\r\n\t\t\t$this->datetimePrecision = intval($columnData[\"DATETIME_PRECISION\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"CHARACTER_SET_NAME\",$columnData)){\r\n\t\t\t$this->charSetName = $columnData[\"CHARACTER_SET_NAME\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLLATION_NAME\",$columnData)){\r\n\t\t\t$this->collationName = $columnData[\"COLLATION_NAME\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLUMN_TYPE\",$columnData)){\r\n\t\t\t$this->columnType = $columnData[\"COLUMN_TYPE\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLUMN_KEY\",$columnData)){\r\n\t\t\t$this->columnKey = $columnData[\"COLUMN_KEY\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"EXTRA\",$columnData)){\r\n\t\t\t$this->extra = $columnData[\"EXTRA\"];\r\n\t\t}\r\n\t\tif(array_key_exists(\"PRIVILEGES\",$columnData)){\r\n\t\t\t$this->privileges = explode(',', $columnData[\"PRIVILEGES\"]);\r\n\t\t}\r\n\t\tif(array_key_exists(\"COLUMN_COMMENT\",$columnData)){\r\n\t\t\t$this->columnComment = $columnData[\"COLUMN_COMMENT\"];\r\n\t\t}\r\n\t}", "public function definition()\n {\n $users = DB::table('users')->select('id')->get();\n $catalog = DB::table('catalog')->select('id')->get();\n\n return [\n 'status' => rand(0, 1), // rand(1, $maxCategoryId)\n 'name' => $this->faker->sentence(rand(3, 5)),\n 'image' => 'https://imgholder.ru/600x300/8493a8/adb9ca&text=IMAGE+HOLDER&font=kelson',\n 'catalog_id' => ($catalog[Rand(0,count($catalog)-1)])->id,\n 'author_id' => ($users[Rand(0,count($users)-1)])->id,\n 'description' => $this->faker->text(rand(100, 200))\n ];\n }", "public static function crear(array $data);", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('comentarios');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('comentario', 'comentario', 'varchar', 45, array());\r\n $this->metadata()->addField('dataAvaliacao', 'data_avaliacao', 'datetime', null, array());\r\n $this->metadata()->addField('coordenadorId', 'coordenador_id', 'int', 11, array());\r\n $this->metadata()->addField('itemAvaliado', 'item_avaliado', 'varchar', 45, array());\r\n $this->metadata()->addField('avaliador', 'avaliador', 'varchar', 45, array());\r\n $this->metadata()->addField('tipoAvaliacao', 'tipo_avaliacao', 'varchar', 45, array());\r\n $this->metadata()->addField('subtipoAvaliacao', 'subtipo_avaliacao', 'varchar', 45, array());\r\n\r\n \r\n }", "abstract public function create(array $data): array;", "public function __construct()\n {\n \t$this->schema();\n\t\t$this->data();\n }" ]
[ "0.69908494", "0.6368192", "0.6149166", "0.5988477", "0.5956643", "0.5935347", "0.59341925", "0.5912515", "0.5902734", "0.5884235", "0.58465856", "0.58465856", "0.5720782", "0.57170105", "0.56564385", "0.56128603", "0.55902535", "0.55145943", "0.55025685", "0.5438796", "0.54268706", "0.5405608", "0.53821856", "0.5381675", "0.5376374", "0.53632015", "0.53590566", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.5356355", "0.53553224", "0.5352366", "0.53320956", "0.5330557", "0.53257525", "0.5317344", "0.5311254", "0.5311254", "0.53046584", "0.5303749", "0.52978843", "0.5288145", "0.52716273", "0.52682406", "0.5256646", "0.5256646", "0.5256646", "0.52400017", "0.5221385", "0.5221078", "0.52108926", "0.5180568", "0.5157405", "0.5146637", "0.51329744", "0.51252496", "0.5116219", "0.5116219", "0.5109481", "0.5109481", "0.510844", "0.51044554", "0.5098734", "0.50925225", "0.508624", "0.50841177", "0.507127", "0.50681686", "0.5059431", "0.50579053", "0.5055798", "0.50516975", "0.5051554", "0.504804", "0.50439304", "0.5043017", "0.5035117", "0.503504", "0.503504", "0.5025818", "0.50129056", "0.5012371", "0.5010457", "0.50063777", "0.5000322" ]
0.53706765
25
Method for deleting a dataset
public function deletePpDataset(PpDataset $ppDataset) { throw new NotImplementedException(); // TODO: Implement deletePpDataset() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(Dataset $dataset)\n {\n //\n }", "public function destroy(dataset $dataset){\n $dataset->delete();\n return redirect()->route('datasets.index');\n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete($data)\n {\n }", "public function delete($data)\n {\n }", "public abstract function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function getDeleteFromDataset()\n {\n return $this->readOneof(7);\n }", "public final function delete() {\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function delete($data='')\n\t{\n\t\tif (func_num_args() == 2) {\n\t\t\t$this->_table = func_get_arg(0);\n\t\t\t$data = func_get_arg(1);\n\t\t}\n\n\t\treturn $this->db->delete($this->_table, $data);\n\t}", "public function destroy($id)\n\t{\n\t\tDataset::destroy($id);\n\n\t\treturn Redirect::route('datasets.index');\n\t}", "public static function delete() {\n\n\n\t\t}", "public function delete(DataObject $entity){\n }", "function delete(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "public function delete()\r\n\t{\r\n\t}", "abstract function delete();", "public function delete() {\r\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function delete($metricaevotranspiracion);", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete($data)\n {\n return $this->em->getRepository($this->repository)->delete($data);\n }", "public function delete(): void;", "function delete(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\tif($conn){\n\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t}else{\n\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t}\n\t\t\t\t$sql = \"DELETE FROM eBook_MetaData WHERE id='$i'\";\n\t\t\t\t$data = mysqli_query($conn,$sql);\n\t\t\t\t\t//If data is not transfered to the database\n\t\t\t\t\tif(!$data){\n\t\t\t\t\techo \"error\";\n\t\t\t\t\t//If it is transfered\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Data deleted\";\n\t\t\t\t\t}\n\t\t\t\t$conn = null;\n\t\t\t\t}", "public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}", "function delete()\n {\n }", "protected function delete() {\n\t}", "function delete() ;", "function delete() ;", "public function del()\n {\n }", "public function delete()\n\t{\n\t}", "public function deleteData($id)\n {\n // TODO: Implement deleteData() method.\n }", "public static function delete() {\r\n\t\t\r\n\t}", "public function delete()\n {\n \n }", "public function delete()\n {\n \n }", "public function deleting()\n {\n # code...\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete($data_class){\n\t\n\t\t$class_name = $data_class->class_name;\n\t\t\n\t\tif(!is_object($this->class_init)){\n\t\t\t$this->class_init = new $class_name();\n\t\t}\n\t\t\n\t\t//Eliminazione diretta\n\t\t$this->function_die();\n\t}", "function DELETE($options) \n\t\t{\n\t\t\t$options[\"path\"] = urldecode($options[\"path\"]);\n\t\t \n\t\t //Parameter des Datastorages laden\n\t\t\t$path_explode = explode(\"/\",$options[\"path\"]);\n\t\t\t$ds_path = substr($options[\"path\"],strlen($path_explode[1])+2);\n\t\t\tif(substr($ds_path,-1)==\"/\")\n\t\t\t\t$ds_path=substr($ds_path,0,-1);\n\n\t\t //Parameter des Datastorages laden\n\t\t\t$ds = getDatastorageByName($path_explode[1],$this->config_appinfos);\n\t\t\tif($ds){\n\t\t\t\t//Datei/Ordner löschen\n\t\t\t\t$result = $ds->deleteFile($ds_path);\n\n\t\t\t\treturn \"204 No Content\";\n\t\t\t} else {\n\t\t\t\treturn \"404 Not found\";\n\t\t\t}\n\t\t return \"404 Not found\";\n\t\t}", "public function delete($variable);", "public function delete()\n {\n //\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "function delete()\r\n {\r\n\r\n }", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function delete($path, $data = null);", "public function DELETE() {\n #\n }", "public function delete()\n {\n $table = self::getTable();\n $connection = new DataBaseConnection();\n $parameters = ['id' => $this->id];\n return $connection->delete($table, $parameters);\n }", "function delete()\n {\n }", "function delete() {\n }", "public function delete_data($id)\n {\n $this->builder->where('id', $id);\n $this->builder->delete();\n }", "public function delete()\n {\n\n }", "public function delete(){\n\t\t$db = new Database();\n\t\t$sql = \"DELETE FROM reports WHERE id=?\";\n\t\t$sql = $db->prepareQuery($sql, $this->id);\n\t\t$db->query($sql);\n\t}", "function DELETEDataKelas ($id_kelas){\r\n\r\n //Perintah Delete Data Siswa\r\n $this->MKelas->DELETE($id_kelas);\r\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function testDelete()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n // remove graph\n $this->fixture->delete(false, 'http://example.com/');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n }", "public function delete($data){\n $this->db->delete('artist_details',array('id'=>$data));\n return true;\n \n }", "abstract protected function delete ();", "public function deleteData($sql, $params=[]){\n $this->create($sql,$params);\n\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete() {\n\n }", "function delete() {\n\n }", "public static function delete(){\r\n }", "public function delete( ) {\n\t $query = \"DELETE FROM stat WHERE id=?\";\n\t return $this->db->execute( $query, array($this->id) ); \t\n\t }", "public function delete($arguments = []) {\n $this->dbh->query($this->query_array['delete'], $arguments);\n }", "public function delete() {\n\n\t\t// Database\n\t\t$db = $this->db;\n\n\t\t// SQL code for deletion\n\t\t$sql = $this->sql_for_delete();\n\n\t\t// Deletion execution\n\t\treturn $db::execute($sql);\n\t}", "public function delete(): void\n {\n }" ]
[ "0.86313146", "0.746939", "0.70219946", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6909281", "0.6900952", "0.6900952", "0.6796084", "0.67593074", "0.67593074", "0.67593074", "0.67593074", "0.6680015", "0.6680015", "0.66798866", "0.6678282", "0.6639147", "0.66161567", "0.6615225", "0.66013324", "0.6551063", "0.6542799", "0.65288675", "0.65203047", "0.65174735", "0.6504851", "0.64834607", "0.6481897", "0.647757", "0.64669555", "0.6466815", "0.64642495", "0.6440564", "0.6434757", "0.6432941", "0.6424074", "0.6423676", "0.6411687", "0.6411687", "0.64114374", "0.640093", "0.6392201", "0.6387762", "0.6382091", "0.63747245", "0.6368738", "0.63614786", "0.63554895", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6353503", "0.6334651", "0.6327268", "0.6321013", "0.6319131", "0.6285683", "0.62820244", "0.6280537", "0.62797934", "0.62785774", "0.6274494", "0.62458473", "0.62437004", "0.62375915", "0.623221", "0.62317485", "0.6227898", "0.62276006", "0.6226476", "0.62255406", "0.62250155", "0.6222933", "0.62203646", "0.6213134", "0.6203143", "0.6202082", "0.6200496", "0.619317", "0.61824775", "0.617931" ]
0.7457217
2
Method for initialization of preprocessing of an attribute
public function createAttributes(array $attributes=null, PpTask $ppTask=null){ // TODO: Implement createAttributes() method. throw new NotImplementedException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initAttribute();", "protected static function pre_processing ($tag, &$attributes) { }", "protected function _construct()\n\n\t{\n\n\t\t$this->_init('eav_attribute', 'attribute_id');\n\n\t}", "public function __construct()\n {\n $defaultAttributeSetId = \\Mage::getSingleton('eav/config')\n ->getEntityType(\\Mage_Catalog_Model_Product::ENTITY)\n ->getDefaultAttributeSetId();\n $set = \\Mage::getModel('eav/entity_attribute_set')->load(4);\n $gid = $set->getDefaultGroupId();\n\n $that = $this;\n $this->setDefaultParameters(array(\n 'type'=> 'text',\n 'input'=> 'text',\n 'label'=> 'Test Attribute',\n 'global'=> \\Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,\n 'is_required'=> '0',\n 'is_comparable'=> '0',\n 'is_searchable'=> '0',\n 'is_unique'=> '1',\n 'is_configurable'=> '1',\n 'user_defined'=> '1',\n 'attribute_code' => function() use($that) { return $that->nextValue('attribute_code', function($i){return 'attribute_fixture_code_' . $i; }); },\n 'frontend_label' => function() use($that) { return $that->nextValue('frontend_label', function($i){return 'Attribute Fixture ' . $i; }); },\n 'attribute_set_id' => $defaultAttributeSetId,\n 'attribute_group_id' => $gid\n ));\n }", "protected abstract function initializeAttributes(): array;", "public function createAttribute()\n\t{\n\n\t\t$this->createCustomAttribute($this->attributeName, $this->arguments);\n\n\t}", "public static function pre_process() {}", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = 'procuralog';\n\t}", "protected function _generateAttributeOnToken()\n\t{\n\t\tif (!isset($this->_tempToken[\"args\"][\"attributes\"])) {\n\t\t\t$this->_tempToken[\"args\"][\"attributes\"] = array();\n\t\t}\n\t\tif (isset($this->_tempToken[\"args\"][\"attributes\"][$this->_attribute])) {\n\t\t\t$this->_attribute = null;\n\t\t} else {\n\t\t\t$this->_tempToken[\"args\"][\"attributes\"][$this->_attribute] = array(\n\t\t\t\t\"value\" => \"\"\n\t\t\t);\n\t\t}\n\t}", "protected function _construct()\n\t{\n\t\t$this->_init('aurednik/cms_home_entity_attribute');\n\t}", "protected function preprocessData() {}", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "protected function extraConstruct() {\n\t\t$this->something = 'something';\n\t}", "public function __construct() {\r\n parent::__construct( 'attributes' );\r\n\r\n if ( isset( $this->attribute_id ) )\r\n $this->id = $this->attribute_id;\r\n }", "function initialize () {\n //blank for implementing\n\t\n\t//go through the attributes see if any of them have a name propery\n }", "public function prepAttributesForUse()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\tswitch ($config['type'])\n\t\t\t{\n\t\t\t\tcase AttributeType::DateTime:\n\t\t\t\t{\n\t\t\t\t\tif ($value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (DateTimeHelper::isValidTimeStamp($value))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dateTime = new DateTime('@'.$value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO: MySQL specific.\n\t\t\t\t\t\t\t$dateTime = DateTime::createFromFormat(DateTime::MYSQL_DATETIME, $value);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->setAttribute($name, $dateTime);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AttributeType::Mixed:\n\t\t\t\t{\n\t\t\t\t\tif (!empty($value) && is_string($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAttribute($name, JsonHelper::decode($value));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAttribute($name, array());\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function initializeHasStepAttributes(): void\n {\n $this->casts[static::stepAttributesField()] = SchemalessAttributes::class;\n }", "function initialize () {\n $this->set_openingtag(\"<PRE[attributes]>\");\n\t $this->set_closingtag(\"</PRE>\");\n }", "public function initUserAttributes()\n {\n }", "public function __construct()\n {\n # no args = no further setup\n if (func_num_args() == 0) return;\n\n # use this to work out whether an arg refers to an Orm name\n $name_specified = 0;\n\n if (is_array($input = func_get_arg(0))) { # array = new object with initial values\n if (func_num_args() == 2)\n $name_specified = 1;\n\n foreach($input as $key => $val)\n $this->$key = $val;\n\n }\n\n if ($name_specified > 0) {\n $this->setup_name = func_get_arg($name_specified);\n }\n }", "function data_preprocessing(&$default_values){\n }", "protected function preProcess() {}", "public function setAttributes();", "function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }", "public function __construct()\n {\n $this->templater = new StringTemplate();\n $this->addAdditionalAllowedAttributes();\n $this->addAdditionalAllowedAttributesValues();\n }", "public function preProcess();", "public function preProcess();", "public function construct() {\n\n\t // Declare each ACF fields on the entity\n\t foreach (static::$acf_mapping as $fieldName => $fieldKey) {\n\t $this->set($fieldName, new LazyACFLoader($fieldKey, $fieldName, $this->ID));\n }\n\n\t}", "public function __construct()\n {\n $this->validTagAttributes = array_merge($this->validTagAttributes, [\n 'minlength' => true\n ]);\n }", "function doCustomAttributes(&$element) \n {\n \n foreach ($element->ucAttributes as $key=>$value) {\n \n list($namespace,$attribute) = (strpos($key, \":\") > -1) ? explode(':',$key) : array(\"\", $key);\n $method = strtolower($attribute) . 'Attribute';\n if (strtolower($namespace) != 'flexy') {\n continue;\n }\n if ((strlen($attribute)) && (method_exists($this,$method))) {\n $this->{$method}($element, $element->getAttribute($key));\n }\n } \n }", "public function buildAttributes()\n {\n $classes = new ClassFactory();\n $classes->add($this->default_class);\n\n if ($this->class) {\n foreach (explode(' ', $this->class) as $c) {\n $classes->add($c);\n }\n }\n\n $attr = new AttributeFactory();\n $attr->add('class', $classes->get());\n\n if ($this->role) {\n $attr->add('role', $this->role);\n }\n\n if ($this->id) {\n $attr->add('id', $this->id);\n }\n\n if ($this->aria_label) {\n $attr->add('aria-label', $this->aria_label);\n }\n\n if ($this->attributes) {\n foreach ($this->attributes as $key => $attribute) {\n $attr->add($key, $attribute);\n }\n }\n\n $this->data['attr'] = $attr->get();\n }", "public function __construct($data)\n {\n foreach ($this->attributes as $attribute) {\n $this->data[$attribute] = (array_key_exists($attribute, $data)) ? $data[$attribute] : NULL;\n }\n }", "abstract protected function setValidationCustomAttributes(): array;", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "abstract protected function attributes();", "function initialize()\n\t{\n\t\t$this->strType = strtoupper($this->dom->getAttribute(\"type\"));\n\t\t$this->strValues = $this->dom->getAttribute(\"values\");\n\t\t\n\t\t$this->prepare();\n\t}", "function initialize() {\n $this->set_openingtag(\"<STRIKE[attributes]>\");\n $this->set_closingtag(\"</STRIKE>\");\n }", "function init()\n\t{\n\t\t$this->defineAttribute('value', false, true, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('connect', false, 0, COMPONENT_TYPE_INTEGER);\n\n\t\t// call the superclass for validate the attributes\n\t\tparent::init();\n\t}", "public function __construct ($attrs);", "public function preinit()\n\t{\n\t\t//\tCreate our internal name\n\t\tCPSHelperBase::createInternalName( $this );\n\n\t\t//\tAttach our default Behavior\n\t\t$this->attachBehavior( 'psWidget', 'pogostick.behaviors.CPSWidgetBehavior' );\n\t}", "abstract protected function _preProcess();", "public function __construct()\n {\n if ($this->_name == null) {\n $name = array();\n preg_match('/^(Doctrine_Record_Generator_Pollable_)?(.*)$/', get_class($this), $name);\n $this->_name = $name[2];\n }\n }", "protected function initialize()\n {\n $this->sanitizations = [\n 'html' => new HtmlSanitization\n ];\n }", "public function __init()\n {\n $this->getTwigLoader()\n ->prepareBaseAssignation();\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }", "function __construct()\n\t{\n\t\t// changes the metaColumnsSQL, adds columns: attnum[6]\n\t}", "protected function onInit()\n {\n $this->dataFormat = trim(\n strtolower(\n Utility::get($this->params, \"dataFormat\", \"associate\")\n )\n );\n }", "public function __construct() {\n add_action( 'woocommerce_product_options_general_product_data', [ $this, 'add_barcode_field' ] );\n add_action( 'woocommerce_product_after_variable_attributes', [ $this, 'add_variation_barcode_field' ], 10, 3 );\n add_action( 'woocommerce_process_product_meta', [ $this, 'save_field' ] );\n add_action( 'woocommerce_save_product_variation', [ $this, 'save_variation_data' ], 10, 2 );\n }", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"assignments\";\n\t}", "public static function preInit(&$metadata = array())\r\n\t{\r\n\t}", "protected function prepareForValidation()\n {\n $this->merge([\n self::ATTRIBUTE_REFERER => $this->prepareArray($this->input(self::ATTRIBUTE_REFERER)),\n self::ATTRIBUTE_IP => $this->prepareArray($this->input(self::ATTRIBUTE_IP)),\n ]);\n }", "public function __construct() {\n $this->bootstrap = $this->Plugin();\n $this->crudService = $this->Plugin()->get('shopware_attribute.crud_service');\n }", "function initializeClassAttribute( $classAttribute )\n {\n if ( $classAttribute->attribute( self::DEFAULT_FIELD ) == null )\n $classAttribute->setAttribute( self::DEFAULT_FIELD, 0 );\n $classAttribute->store();\n }", "protected function collect_attributes() {\n\t\tforeach ( $this->properties as $key => $val ) {\n\t\t\tif ( in_array($key, self::$global_attributes) || in_array($key, static::$element_attributes) ) {\n\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// also check for compound attributes, such as data-src, aria-required, etc.\n\t\t\tforeach ( self::$global_attribute_pattern_prefixes as $prefix ) {\n\t\t\t\tif ( preg_match( '/'. $prefix .'[-]\\w+/', $key ) ) {\n\t\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function pre_init() {\n /* Add capability */\n add_filter( 'wpp_capabilities', array( &$this, \"add_capability\" ) );\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "function initialize() {\n\t\t\n\t\t// only once\n\t\tif( $this->initialized++ ) return;\n\t\t\n\t\t// add filters\n\t\tadd_filter( 'acf/pre_load_value', \t\tarray($this, 'pre_load_value'), \t10, 3 );\n\t\tadd_filter( 'acf/pre_load_reference', \tarray($this, 'pre_load_reference'), 10, 3 );\n\t\tadd_filter( 'acf/pre_load_post_id', \tarray($this, 'pre_load_post_id'), \t10, 2 );\n\t\tadd_filter( 'acf/pre_load_meta', \t\tarray($this, 'pre_load_meta'), \t\t10, 2 );\n\t}", "public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }", "public static function attributeMap();", "public function __construct() {\r\n parent::__construct(\"tr_angka_kredit_tahunan\");\r\n $this->primary_key = \"id_akt\";\r\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\r\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\r\n }", "public static function preModel(){\n\t\t\n\t}", "public function init()\n {\n extract($this->data);\n\n // Make data accessible\n $this->compParams = [\n 'label' => $label,\n 'color' => $color,\n 'size' => $size\n ];\n\n $this->data['isSvg'] = $this->iconIsSvg($icon);\n\n if ($this->data['isSvg']) {\n $this->data['classList'][] = $this->getBaseClass() . \"--svg\";\n } else {\n $this->data['classList'] = array_merge($this->data['classList'] ?? [], [\n $this->createIconModifier($icon),\n $this->getBaseClass() . \"--material\",\n $this->getBaseClass() . \"--material-\" . $icon,\n \"material-icons\"\n ]);\n }\n\n if (!empty($customColor)) {\n $this->data['attributeList']['style'] = 'color:' . $customColor . ';';\n } else {\n $this->setColor();\n }\n $this->appendSpace();\n $this->setSize();\n\n //Identify as an image\n $this->data['attributeList']['role'] = \"img\";\n $this->data['attributeList']['aria-label'] = $this->getAltText($icon);\n $this->data['attributeList']['alt'] = $this->getAltText($icon);\n }", "public function input_attrs()\n {\n }", "public function __construct()\n {\n foreach (GeneralUtility::makeInstance(\\ReflectionClass::class, static::class)->getProperties() ?? [] as $reflection) {\n if (!$reflection->isProtected()) {\n $name = $reflection->getName();\n $value = $this->{$name};\n\n // Define parameter name of property\n $this->parameterMapping[$name] = GeneralUtility::camelCaseToLowerCaseUnderscored($name);\n\n // Map the type of properties\n $this->typeMapping[$name] = is_int($value) ? 'int' : (is_array($value) ? 'array' : (is_bool($value) ? 'bool' : (is_string($value) ? 'string' : null)));\n }\n }\n }", "public static function executeAttributePreprocessors(Tag $tag, array $tagConfig)\n\t{\n\t\tif (empty($tagConfig['attributePreprocessors']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($tagConfig['attributePreprocessors'] as list($attrName, $regexp, $map))\n\t\t{\n\t\t\tif ($tag->hasAttribute($attrName))\n\t\t\t{\n\t\t\t\tself::executeAttributePreprocessor($tag, $attrName, $regexp, $map);\n\t\t\t}\n\t\t}\n\t}", "public function process()\n {\n $attributes = implode(', ', $this->attributes);\n $this->consoleOutput->writeln(\"<info>Creating attribute options for: {$attributes}</info>\");\n $this->log->info('Creating attribute options for:'. $attributes);\n\n foreach ($this->attributes as $attribute) {\n $this->createForAttribute($attribute);\n }\n }", "public function __construct(array $attributes)\n {\n foreach ($attributes as $attribute => $value){\n $this->$attributes = $value;\n }\n }", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function setupDynamicAttribs() {\n\t\t$foundAttribs = false;\n //look in request\n //FIXME try to grab the global Zend Request object somehow\n if(isset($_POST['mto_width']) ) {\n //if not, use some defaults\n\t\t\t$foundAttribs = true;\n $this->productWidth = @$_POST['mto_width'];\n } else {\n //if not, use some defaults\n $this->productWidth = @$this->_data['mto_width_min'];\n }\n\n if(isset($_POST['mto_height']) ) {\n\t\t\t$foundAttribs = true;\n $this->productHeight = @$_POST['mto_height'];\n\t\t} else {\n //if not, use some defaults\n $this->productHeight = @$this->_data['mto_height_min'];\n\t\t}\n\n if(isset($_POST['mto_depth']) ) {\n\t\t\t$foundAttribs = true;\n $this->productDepth = @$_POST['mto_depth'];\n\t\t} else {\n //if not, use some defaults\n $this->productDepth = @$this->_data['mto_height_min'];\n\t\t}\n\n //product line is sku minus '-CS'\n $this->productLine = substr($this->getData('sku'),0, -3);\n //calc sqft, round down\n\t\t//TODO add in fractional inches\n $this->productSqft = floor($this->productWidth * $this->productHeight);\n//var_dump($this->productWidth);exit();\n\t\treturn $foundAttribs;\n }", "public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }", "public function prepAttributesForSave()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\t$this->setAttribute($name, ModelHelper::packageAttributeValue($config, $value, true));\n\t\t}\n\n\t\t// Populate dateCreated and uid if this is a new record\n\t\tif ($this->isNewRecord())\n\t\t{\n\t\t\t$this->dateCreated = DateTimeHelper::currentTimeForDb();\n\t\t\t$this->uid = StringHelper::UUID();\n\t\t}\n\n\t\t// Update the dateUpdated\n\t\t$this->dateUpdated = DateTimeHelper::currentTimeForDb();\n\t}", "function initializeObjectAttribute ( \n $contentObjectAttribute, \n $currentVersion, \n $originalContentObjectAttribute )\n {\n if ( $currentVersion != false )\n {\n // $contentObjectAttributeID = $contentObjectAttribute->attribute( \"id\" );\n // $currentObjectAttribute = eZContentObjectAttribute::fetch( $contentObjectAttributeID,\n // $currentVersion );\n $dataText = $originalContentObjectAttribute->attribute( \"data_text\" );\n $contentObjectAttribute->setAttribute( \"data_text\", $dataText );\n }\n }", "public function onConstruct()\n {\n $this->name = NULL;\n $this->description = NULL;\n }", "function __construct() {\n\t\t//$this->model_custom_wp_actions();\n\t\t\n\t\t//Add custom wordpress filter hooks for this model\n\t\t//$this->model_custom_wp_filters();\n\t}", "function __construct($row, AttributeGroup $grp){\n\n\t\t\n\t\t$this->Group = $grp;\n\t\t\n\t\tif($grp->UseRealTable){\n\t\t\t$this->fieldName = $row['name'];\n\t\t\t$this->tableName = $grp->RealTableName;\n\t\t\t$this->AsTableName = $grp->RealTableName;\n\t\t} else {\n\t\t\t$this->fieldName = 'value';\n\t\t\t$this->tableName = $GLOBALS['attribute_type_tables'][$row['type']];\n\t\t\t$this->AsTableName = 'tbl'.$grp->Id.'_'.$row['id'];\n\t\t}\n\t\tif($row['php_data']){\n\t\t\t$row['php_data']=unserialize($row['php_data']);\n\t\t}\n\t\t\n\t\t$this->Id = $row['id'];\n\t\t$this->Name = $row['name'];\n\t\t$this->Type = $row['type'];\n\t\t$this->LabelPrefix = $row['prefix'];\n\t\t$this->LabelSuffix = $row['suffix'];\n\t\t$this->PHPData = $row['php_data'];\n\t\t\n\t\t\n\t\t//$row['value'] = '';\n\t\t//$row['orig_value'] = '';\n\t\t/*\n\t\tIMPORTANT FEAttribute extends ArrayObject\n\t\t\nMnogo neiasen bug. Kogato dobavih v getBeValue na ManagedImages da vrashta i $this[\"value\"][\"sizes\"]=$this->ImageSizes;\nVsichko se pochupi, vsichki FEAttr instancii poluciha i te taia stoinost. Tova e pri situacia che predi tova ne im e izvikano izrichno $this['value'] = neshtosi.\nNe se izvikva, ako ne sme zaredili danni prez loadData.\nIzglezda niakade copy on write mehanizma se pochupva pri naslediavane na ArrayObject\n\t\t\n\t\t*/\n\t\t\n//\t\tparent::__construct($row);\n\t}", "function initialize () {\n $this->set_openingtag(\"<FIELDSET[attributes]>\");\n\t$this->set_closingtag(\"</FIELDSET>\");\n }", "function __construct($comment_text='', $filename='')\n {\n $this->attr_raw = $comment_text;\n $this->attr_filename = $filename;\n }", "protected function __construct(){\n\t\t$this->inputs();\n\t}", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct() {\n\t\t$this->aktionen = new Aktionen();\n $this->attribute = [];\n $this->styles = [];\n $this->hinweis = null;\n\t}", "public function __construct(array $attributes = []);", "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->fmiId = func_get_arg(0);\n $this->fmiText = func_get_arg(1);\n $this->occurrenceCount = func_get_arg(2);\n $this->spnDescription = func_get_arg(3);\n $this->spnId = func_get_arg(4);\n $this->txId = func_get_arg(5);\n }\n }", "public function __construct()\n {\n $this->pluralRules = Pluralize::all();\n $this->singularRules = Singularize::all();\n $this->aplicator = new Rules();\n \n foreach (Irregularize::all() as $rule) {\n $this->irregularSingles[$rule[0]] = $rule[1];\n $this->irregularPlurals[$rule[1]] = $rule[0];\n }\n \n foreach (Uncountable::all() as $rule) {\n $this->addUncountableRule($rule);\n }\n }", "protected function _pre_render() {\n\t\t\n\t\t$str_classes = array();\n\t\tif ( is_string( $this->attributes['class'] ) ) {\n\t\t\t$str_classes = Halp::str_to_classes( $this->attributes['class'] );\n\t\t}\n\t\t\n\t\t$this->classes = array_merge($str_classes, $this->classes);\n\t\t\n\t\tif ( sizeof( $this->classes ) > 0 ) {\n\t\t\t$this->attributes['class'] = implode( ' ', $this->classes );\n\t\t}\n\t\telse {\n\t\t\t$this->attributes['class'] = null;\n\t\t}\n\t\t\n\t}", "function __construct($row, AttributeGroup $grp){\n\t\tFEAttribute::__construct($row, $grp);\n\n\t\t$this->ImageSizes = $this->getSizes($this->PHPData['sizes']);\n\t\treset($this->ImageSizes);\n\t\t$this->imageSize = key($this->ImageSizes);\n\t}", "protected function init()\n {\n $classParser = $this->getContainer()->get('classParser');\n $classParser->setAllowedMethods( array($this->allowedMethod) );\n $this->data = $classParser->getData($this->paths, $this->cacheFile);\n }", "public function __construct($attr1, $attr2, $attr3)\n {\n $this->attr1 = $attr1;\n $this->attr2 = $attr2;\n $this->attr3 = $attr3;\n }", "protected function cliModelInit()\n {\n }", "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }", "public function __construct(\\SimpleXMLElement $xml)\n {\n foreach ($xml->attributes() as $name => $value) {\n switch ($name) {\n case 'variable':\n $this->variable = (string) $value;\n break;\n case 'sort':\n $this->sort = (string) $value;\n break;\n }\n }\n\n }", "function initialize () {\n $this->set_openingtag ( \"<THEAD[attributes]>\" );\n\t$this->set_closingtag ( \"</THEAD>\" );\n }", "public function __construct()\n {\n $this->entity = $this->entity();\n $this->map = $this->map();\n $this->regex = $this->regex();\n }", "public function __construct() {\n parent::__construct(\"tr_125t_detail\");\n $this->primary_key = \"id_f125t_detail\";\n\n $this->attribute_labels = array_merge_recursive($this->_continuously_attribute_label, $this->attribute_labels);\n $this->rules = array_merge_recursive($this->_continuously_rules, $this->rules);\n }", "public function setPreColorized( $pre_colorized ) {\n\t\t$this->_pre_colorized = $pre_colorized;\n\t}", "public function init() {\n extract($this->data);\n\n //Class list\n $this->data['classList'][] = \"c-image\"; \n\n //Add placeholder class\n if(!$src) {\n $this->data['classList'][] = $this->getBaseClass() . \"--is-placeholder\"; \n }\n\n //Make full width\n if($fullWidth) {\n $this->data['classList'][] = $this->getBaseClass() . \"--full-width\"; \n }\n\n //Inherit the alt text\n if(!$alt && $caption) {\n $this->data['alt'] = $this->data['caption'];\n }\n \n }", "public function __construct()\n {\n $this->blocksToProcess = get_object_vars(Mage::getConfig()->getNode('varnish/objects_to_tag')->children());\n $this->tagPrefixes = get_object_vars(Mage::getConfig()->getNode('varnish/tag_prefixes')->children());\n }" ]
[ "0.75025964", "0.6525065", "0.65008765", "0.6446009", "0.6339662", "0.6003855", "0.5949957", "0.58280283", "0.5827965", "0.57839036", "0.5746511", "0.56921417", "0.56879693", "0.5621746", "0.5614431", "0.55853873", "0.5579955", "0.55498654", "0.5540262", "0.5532112", "0.55283403", "0.55115163", "0.5497425", "0.54927546", "0.54691184", "0.5465294", "0.5465294", "0.54634005", "0.5456128", "0.54491514", "0.54480296", "0.54253817", "0.5422899", "0.5400953", "0.5380698", "0.53781897", "0.5352623", "0.5351039", "0.53407246", "0.5335271", "0.53121424", "0.5296937", "0.528369", "0.52793086", "0.5265753", "0.5263127", "0.5240857", "0.5223643", "0.52205694", "0.5218608", "0.5211943", "0.5207974", "0.5189214", "0.51804066", "0.5161614", "0.5143187", "0.51375014", "0.5135792", "0.513391", "0.51245546", "0.51195675", "0.51174045", "0.51137304", "0.510832", "0.5103123", "0.5098519", "0.5084049", "0.50803167", "0.50704455", "0.50661594", "0.5063937", "0.5061761", "0.50391966", "0.50313056", "0.50303054", "0.50289917", "0.5027274", "0.50237244", "0.50229996", "0.50226617", "0.50226617", "0.50226617", "0.50226617", "0.50226617", "0.50196695", "0.50174457", "0.49928513", "0.49867028", "0.49793535", "0.49766347", "0.49765024", "0.49747065", "0.49739683", "0.49710694", "0.4969981", "0.49610737", "0.49556136", "0.4948574", "0.49473956", "0.4946506", "0.49456087" ]
0.0
-1
Method returning values of one selected attribute
public function getPpValues(PpDataset $ppDataset, $ppAttributeId, $offset=0, $limit=1000){ // TODO: Implement getPpValues() method. throw new NotImplementedException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getValueAttribute() {}", "public function getValues()\n {\n\n\t\t$record = ProductAttributeValues::whereIn('avid',[1,6])->get();\n\t\t$rec = $record->pluck('pro_att_value');\n\t\treturn $rec;\n }", "public function getViaTableAttributesValue();", "function _getTagValueFromAttributeList($tag)\n {\n global $application;\n\n /*\n Search the specified tag in the list of attributes\n search by the field a_view_tag\n */\n foreach ($this->_fProductAttributesInfo as $attribute)\n {\n if ( strtolower($attribute['a_view_tag']) == strtolower($tag) )\n {\n /*\n First check if the attribute is visible in the product type,\n if it is not, output an empty string\n */\n if ( $attribute['a_visibility'] != 1 )\n {\n if ( strtoupper($attribute['a_input_type_name']) == 'SELECT' )\n {\n /*\n : Magic Number Present\n Number 3 means in this case, that the value of this attribute\n should be selected from the table input_type_values\n */\n if (($attribute['a_input_type_id'] == 3 ||\n $attribute['a_input_type_id'] == 7))\n {\n if(!$this->localized and !in_array('select',$this->_force_localize_attr_types))\n {\n switch($attribute['a_input_type_id'])\n {\n case \"3\":\n return PRODUCT_FREESHIPPING_YES;\n break;\n case \"7\":\n return PRODUCT_STATUS_ONLINE;\n break;\n }\n }\n else\n {\n switch($attribute['a_input_type_id'])\n {\n case \"3\":\n return getMsg('SYS','PRDTYPE_VALUE_YES');\n break;\n case \"7\":\n return getMsg('SYS','PRDTYPE_VALUE_STATUS_ONLINE');\n break;\n }\n }\n }\n /*\n : Magic Number Present\n Number 6 means here, that the value of this attribute\n should be selected from the module Taxes\n */\n elseif ($attribute['a_input_type_id'] == 6)\n {\n return 0.0;\n }\n /*\n : Magic Number Present\n Number 9 means here, that the value of this attribute\n should be selected from customer reviews\n */\n elseif ($attribute['a_input_type_id'] == 9)\n {\n return '';\n }\n else\n {\n return $this->debugmode ? 'Attribute is SELECT type, but the value is NULL or undefined in the database' : '';\n }\n }\n else\n {\n return $this->debugmode ? 'Attribute is hidden in the product type: '.$tag : '';\n }\n }\n\n /*\n If it is an attribute of SELECT type, then its value\n should be procesed differently\n - finish the processing. The code is commented because,\n the current value for the SELECT type attributes is saved to $attribute['pa_value']\n and it will be got then by algorithm. Besides, id values are saved too, i.e.\n get a real value from this id .\n */\n if ( strtoupper($attribute['a_input_type_name']) == 'SELECT' )\n {\n /*\n : Magic Number Present\n Number 3 means in this case, that the value of this attribute\n should be selected from the table input_type_values\n */\n if (($attribute['a_input_type_id'] == 3 ||\n $attribute['a_input_type_id'] == 7 ||\n $attribute['a_input_type_id'] == 9 ||\n $attribute['a_input_type_id'] == CTLG_INPUT_TYPE_MANUFACTURER)\n && $attribute['pa_value'])\n {\n if(!$this->localized and !in_array('select',$this->_force_localize_attr_types))\n {\n return $attribute['pa_value'];\n }\n else\n {\n $params = array('a_input_type_id'=>$attribute['a_input_type_id'],\n 'pa_value'=>$attribute['pa_value']);\n $r = execQuery('SELECT_INPUT_TYPE_VALUES_BY_ATTRIBUTE',$params);\n if (count($r) == 0)\n return '';\n return modApiFunc('Catalog', 'getInputTypeActualValue', $r[0]['value']);\n }\n\n }\n // , ProductType Available Invisible,\n // ,\n // Available (Visible).\n // . select' 3 7. (FreeShipping Available)\n // AZ ProdList\n elseif (($attribute['a_input_type_id'] == 3 ||\n $attribute['a_input_type_id'] == 7 ||\n $attribute['a_input_type_id'] == CTLG_INPUT_TYPE_MANUFACTURER) &&\n !$attribute['pa_value'])\n {\n if(!$this->localized)\n {\n switch($attribute['a_input_type_id'])\n {\n case \"3\":\n return PRODUCT_FREESHIPPING_YES;\n break;\n case \"7\":\n return PRODUCT_STATUS_ONLINE;\n break;\n case \"\". CTLG_INPUT_TYPE_MANUFACTURER:\n \treturn MANUFACTURER_NOT_DEFINED;\n \tbreak;\n }\n }\n else\n {\n switch($attribute['a_input_type_id'])\n {\n case \"3\":\n return getMsg('SYS','PRDTYPE_VALUE_YES');\n break;\n case \"7\":\n return getMsg('SYS','PRDTYPE_VALUE_STATUS_ONLINE');\n break;\n case \"\". CTLG_INPUT_TYPE_MANUFACTURER:\n return getMsg('MNF', 'MANUFACTURER_NOT_DEFINED');\n break;\n }\n }\n }\n /*\n : Magic Number Present\n Number 6 means here, that the value of this attribute\n should be selected from the module Taxes\n */\n elseif ($attribute['a_input_type_id'] == 6 && $attribute['pa_value'])\n {\n $tax_class_info = modApiFunc('Taxes','getProductTaxClassInfo', $attribute['pa_value']);\n return $tax_class_info['value'];\n }\n /*\n : Magic Number Present\n Number 9 means here, that the value of this attribute\n should be selected from customer reviews\n */\n elseif ($attribute['a_input_type_id'] == 9 && $attribute['pa_value'])\n {\n switch($attribute['pa_value'])\n {\n case PRODUCT_CUSTOMER_REVIEWS_MESSAGE_RATE:\n return getMsg('SYS', 'PRDTYPE_VALUE_REVIEW_RATE');\n break;\n case PRODUCT_CUSTOMER_REVIEWS_MESSAGE:\n return getMsg('SYS', 'PRDTYPE_VALUE_REVIEW');\n break;\n case PRODUCT_CUSTOMER_REVIEWS_RATE:\n return getMsg('SYS', 'PRDTYPE_VALUE_RATE');\n break;\n case PRODUCT_CUSTOMER_REVIEWS_NOREVIEW:\n return getMsg('SYS', 'PRDTYPE_VALUE_NOREVIEW');\n break;\n }\n }\n else\n {\n $params = array('a_input_type_id'=>$attribute['a_input_type_id'], 'pa_value'=>$attribute['pa_value']);\n $r = execQuery('SELECT_INPUT_TYPE_VALUES_BY_ATTRIBUTE',$params);\n if (count($r) == 0)\n {\n return $this->debugmode ? 'Attribute is SELECT type, but the value is NULL or undefined in the database' : '';\n }\n return modApiFunc('Catalog', 'getInputTypeActualValue', $r[0]['value']);\n }\n\n }\n\n /*\n IMAGE,\n :\n HTML <IMG>\n */\n if ( strtoupper($attribute['a_input_type_name']) == 'IMAGE' )\n {\n $imagesUrl = $application->getAppIni('URL_IMAGES_DIR');\n if ($application->getCurrentProtocol() == \"https\" && $application->getAppIni('HTTPS_URL_IMAGES_DIR'))\n {\n $imagesUrl = $application->getAppIni('HTTPS_URL_IMAGES_DIR');\n }\n $_src = $imagesUrl.$attribute['image_name'];\n $_width = $attribute['image_width'];\n $_height = $attribute['image_height'];\n $_alt = prepareHTMLDisplay($this->_getTagValueFromAttributeList('ImageAltText'));\n\n if ($attribute['image_name'] != null && $application->isImageFileValid($attribute['image_name']) )\n {\n $_res = 'img src=\"'.$_src.'\" height=\"'.$_height.'\" width=\"'.$_width.'\" alt=\"'.$_alt.'\"';\n return $this->debugmode ? '['.$_res.']' : '<'.$_res.'/>';\n }\n else\n {\n return $this->debugmode ? 'Image Does Not Exist' : '';\n }\n }\n\n # If the tag value is specified, then process it\n if (!($attribute['pa_value'] === NULL))\n {\n /*\n If the output of pure HTML code is inhibited\n and the localization is turned on\n */\n if ($attribute['a_allow_html'] != 1 && $this->localized)\n {\n $_val = modApiFunc(\"Localization\", \"format\", $attribute['pa_value'], $attribute['a_unit_type']);\n\n /*\n change\n Localization::format() itself should substitute a unit\n */\n global $__localization_disable_formatting__;\n if ($attribute['a_unit_type']!='currency' && $__localization_disable_formatting__ == false)\n {\n $_val .= rtrim(' '.modApiFunc(\"Localization\", \"getUnitTypeValue\", $attribute['a_unit_type']));\n //patch to allow single unicode character as currency symbol\n $_val = prepareHTMLDisplay($_val);\n }\n\n return $_val;\n }\n # Otherwise output the attribute value as is\n else\n {\n return $attribute['pa_value'];\n }\n }\n # If the tag value is undefined, return an empty string\n else\n {\n return $this->debugmode ? 'Tag value is NULL or undefined: '.$tag : '';\n }\n\n # Finish the cycle\n break;\n }\n }\n\n /*\n If the attribute with the specified tag is not found, return an empty\n string, i.e. the tag will output null\n */\n return $this->debugmode ? 'Tag Value Not Found: '.$tag : null;\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}", "public function attr($name) {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0]->attrList[$name])) return $this->selectList[0]->attrList[$name];\n\tif( isset($this->attrList[$name]) ) return $this->attrList[$name];\n\treturn '';\n }", "public function getValue() {\n return $this->attributes['value'];\n }", "function GetAttributesoption($attribute=false)\n\t{\n\t\t$this->db->select('t2.attrOptionID,t2.attrOptName,t1.attributeID,t1.attrClassName');\n\t\t$this->db->from('rp_attribute_options t1');\n\t\t$this->db->join('rp_attribute_option_details t2','t1.attrOptionID=t2.attrOptionID AND t2.languageID=1 AND t1.attributeID=\"'.$attribute.'\"','inner');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "function getValuesAttributes(){\n $complete = [];\n \n foreach($this as $attribute => $valor){\n $complete[$attribute] = $valor;\n }\n \n return $complete;\n }", "public function getParameters()\n {\n return \\common\\models\\Attribute::find()->where(['id' => $this->getEntityAttributes()->select('attribute_id')]);\n }", "public static function get_attribute_returns() {\n return new external_value(PARAM_RAW, 'The course element attribute value');\n }", "public function get_attributes_for_select() {\n\t\tif ( empty( $this->cache[ __FUNCTION__ ] ) ) {\n\t\t\t$default_option = [\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => __( ' - Select Attribute - ', 'edgenet' ),\n\t\t\t];\n\n\t\t\t$options = array_map( function ( $att ) {\n\t\t\t\treturn [\n\t\t\t\t\t'value' => $att->id,\n\t\t\t\t\t'label' => $att->description,\n\t\t\t\t];\n\t\t\t}, edgenet()->settings->requirement_set->get_attributes() );\n\n\t\t\tusort( $options, function ( $a, $b ) {\n\t\t\t\t$a_label = strtoupper( $a['label'] );\n\t\t\t\t$b_label = strtoupper( $b['label'] );\n\t\t\t\tif ( $a_label === $b_label ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn ( $a_label < $b_label ) ? - 1 : 1;\n\t\t\t} );\n\n\t\t\tarray_unshift( $options, $default_option );\n\n\t\t\t$this->cache[ __FUNCTION__ ] = $options;\n\t\t}\n\n\t\treturn $this->cache[ __FUNCTION__ ];\n\t}", "public function getAttr1(){\r\n\t\treturn $this->attr1;\r\n\t}", "private function requestedAttributes()\n {\n\n $default = [\n 'id',\n 'name',\n 'level',\n 'rarity',\n 'image',\n 'category.0',\n 'category.1',\n 'vendor_price',\n 'buy.quantity',\n 'buy.price',\n 'buy.last_change.time',\n 'buy.last_change.quantity',\n 'buy.last_change.price',\n 'sell.quantity',\n 'sell.price',\n 'sell.last_change.time',\n 'sell.last_change.quantity',\n 'sell.last_change.price',\n 'last_update'\n ];\n\n $requested = $this->getInput('attributes') ?: $default;\n\n if (!is_array($requested)) {\n $requested = explode(',', $requested);\n }\n\n return $requested;\n\n }", "public function getAttributes() {}", "public function getAttributes() {}", "public function __GET($attr){\n\n\t\t return $this->$attr;\n\t\t}", "function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n return $this->get_attribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr);\n }", "protected function getAttr()\r\n\t{\r\n\t\treturn array( 'maxLength', 'width', 'searchMethod', 'searchRangeValues' );\r\n\t}", "function getAdditionalAttributes() ;", "public function getValue(string $attr)\n {\n $this->checkAttribute($attr);\n return $this->attributes[$attr];\n }", "public function get($attribute);", "public function getAttributesToSelect()\n {\n return $this->attributesToSelect;\n }", "function getAttributes()\n {\n }", "public function getAttributeValues()\n {\n return $this->attributeValues;\n }", "public function getAttributes(){ }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function __get($name)\n {\n $attribute = parent::__get($name);\n if ($name == 'values' && $attribute) {\n return $attribute[0]['value'];\n }\n return $attribute;\n }", "public function getIdentifyingAttribute();", "public function getAddAttrArray()\n {\n $custom = $this->select(Customization::ADD_ATTR)->get();\n $result = array_values($custom->toArray()[0]);\n array_unshift($result, __('general.select_attr'));\n return $result;\n }", "public function getAttributes()\r\n\t{\r\n\t\treturn $this->attr;\r\n\t}", "function GetAttributes();", "function getValue()\n {\n return $this->getAttribute(\"value\");\n }", "public function getAttributeValue() {\n return $this->attributeValue;\n }", "public function getAttributeValue($index = null);", "public function getAttributes()\n\t{\n\t\t$arrData = array();\n\n\t\tforeach ($this->getProductAndVariantAttributes() as $attribute)\n\t\t{\n\t\t\t$arrData[$attribute] = $this->$attribute;\n\t\t}\n\n\t\treturn $arrData;\n\t}", "function getAttributedetail($filter=false)\n\t{\n\t\t$qry=$this->db->query(\"select * from rp_project_attribute_values where projectID='$filter'\");\n\t\treturn $qry->result();\n\t}", "public function getAttributes($name);", "public function getAttr3(){\r\n\t\treturn $this->attr3;\r\n\t}", "public function getAttrib() {\n return $this->attrib;\n }", "public function get_attribute($name)\n {\n }", "public function transactionFormGetAttributes ();", "public function get_value() {\n return $this->get_selected_options();\n }", "protected function get_attr_value($val)\n\t{\n\t\t$selectors = array('class' => '.', 'id' => '#', 'attr' => '~=');\n\t\tforeach ($selectors as $attribute => $selector) {\n\t\t\tif(!is_null( $this->reverse_strrchr($val, $selector)) && $selector == '~=' ) {\n\t\t\t\treturn array( $this->reverse_strrchr($val, $selector) => $this->forward_strrchr($val, $selector) );\n\t\t\t}\n\t\t\telseif(!is_null( $this->forward_strrchr($val, $selector)) && is_null($this->reverse_strrchr($val, $selector))) {\n\t\t\t\tif ($attribute != 'attr') return array( $attribute => $this->forward_strrchr($val, $selector) );\n\t\t\t}\n\t\t}\n\t}", "public function getAttributes()\n {\n }", "public function getValue()\r\n\t{\r\n\t\treturn $this->getValues(true);\r\n\t}", "function get_selected()\n {\n }", "public function getAttributeString(){\n return $this->_form->getAttributeString($this->_attributes);\n }", "public function getAttributeValue(Request $request){\n $AttributeValue = $this->CustomProperties->getAttributeValue($request->idAttribute);\n ?>\n\n <option value=\"\">----------</option>\n <?php foreach($AttributeValue as $value){ ?>\n <option value=\"<?php echo $value->id; ?>\"><?php echo $value->value; ?></option>\n <?php } ?>\n\n <?php\n }", "abstract public function attributeNames();", "public function getAttributes()\n {\n return $this->where('isRelation', false)->pluck('attribute')->toArray();\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "public function __get($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}", "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n if(property_exists($this, 'handle') && property_exists($this, 'type')){\n $matrixAttributes = anu()->matrix->getMatrixByName($this->handle)->defineAttributes()[$this->type];\n $attributes = array_merge($attributes, $matrixAttributes);\n }\n\n foreach ($attributes as $k => $v){\n if(property_exists($this, $k)){\n $values[$k] = $this->$k;\n }\n }\n return $values;\n }", "function get_attr()\n\t{\n\t\t$a = array();\n\t\twhile (($s = array_shift($this->pieces))) {\n\t\t\tif (($i = strpos($s,\":\")) >= 1) {\n\t\t\t\t$attr = substr($s,0,$i);\n\t\t\t\t$val = substr($s,$i+1);\n\t\t\t\tif (($j = strpos($val,\"(\"))\n\t\t\t\t && ($k = strpos($val,\")\"))\n\t\t\t\t && ($k > $j)) {\n\t\t\t\t\t$a[\"arg:\".$attr] = substr($val,$j+1,$k-($j+1));\n\t\t\t\t\t$val = substr($val,0,$j);\n\t\t\t\t}\n\t\t\t\t$a[$attr] = $val;\n\t\t\t} elseif (intval($s) > 0) {\n\t\t\t if ($a['$scale'] != \"\")\n\t\t\t\t$a['scale'] = intval($s);\n\t\t\t}\n\t\t}\n\t\treturn $a;\n\t}", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "function getAttributeValue( $userId, $attribId )\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t$tablename_userattributes = PhplistHelperAttribute::getTableName_userattributes();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"value\" );\n\t\t$query->from( $tablename_userattributes . \" AS tbl\" );\t\t\n\t\t$query->where( 'tbl.userid = '.$userId );\n\t\t$query->where( 'tbl.attributeid = '.$attribId );\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObject();\n\t\t$success = $data->value;\n\t\treturn $success;\n\t}", "function get_attr_value($pri, $name=null, $value=null) {\n static $defs;\t\t// default option value\n\n if ($name && is_array($pri) && isset($pri[$name])) return $pri[$name];\n if (!isset($defs)) {\n\t$defs = array('numeric'=>'[-+]?[0-9]+', 'tel'=>'\\+?[0-9][0-9-,]*[0-9]');\n\tforeach (explode('|', OPTION_NUM_ATTRS) as $key) {\n\t $defs[$key] = 0;\n\t}\n\t// override module config values\n\t$mydirname = basename(dirname(__FILE__));\n\tif (!empty($GLOBALS['xoopsModule']) &&\n\t $GLOBALS['xoopsModule']->getVar('dirname')==$mydirname) {\n\t $def_attr = $GLOBALS['xoopsModuleConfig']['def_attrs'];\n\t} else {\n\t $module_handler =& xoops_gethandler('module');\n\t $module =& $module_handler->getByDirname($mydirname);\n\t $config_handler =& xoops_gethandler('config');\n\t $configs =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));\n\t $def_attr = $configs['def_attrs'];\n\t}\n\tforeach (unserialize_vars($def_attr) as $k => $v) {\n\t $defs[$k] = $v;\n\t}\n }\n if ($name == null && !is_null($pri)) {\n\t// override values\n\tif (!is_array($pri)) $pri = unserialize_vars($pri);\n\tforeach ($pri as $k => $v) {\n\t $defs[$k] = $v;\n\t}\n }\n if (isset($defs[$name])) return $defs[$name];\n return $value;\n}", "public function getValue() {\n\t\t$db = Loader::db();\n\t\t$value = $db->GetOne('select value from atDefault where avID = ?', array($this->getAttributeValueID()));\n\t\t\n\t\t$jsonHelper = Loader::helper('json');\n\t\treturn $jsonHelper->decode($value);\n\t}", "public function getAttributes(){\n return $this->attributes;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getAttributesOptions()\n {\n $attribOptsArr = DB::table($this->DBTables['Attributes_Values'])\n ->get();\n\n return $attribOptsArr;\n }", "public function val() {\n\treturn $this->attr(\"value\");\n }", "public function get($attributeName);", "public function attributes()\r\n\t{\r\n\t\treturn $this->attribs;\r\n\t}", "public function attributes()\n\t{\n\t\treturn $this->attribs;\n\t}", "public function getConfigurableAttributesAttribute()\n {\n return $this->custom_attributes()->where('attributes.is_configurable', 1)->where('attributes.type', 'select')->get();\n }", "function GetAttributes($attributeGroupID=false)\n\t{\n\t\t$this->db->select('t2.attributeID,t2.attrInputType,t3.attrName');\n\t\t$this->db->from('rp_attribute_to_group t1');\n\t\t$this->db->join('rp_attributes t2','t1.attributeID=t2.attributeID','inner');\n\t\t$this->db->join('rp_attribute_details t3','t3.attributeID=t2.attributeID AND t3.languageID=1 AND t2.attrStatus=\"A\" AND t1.attributeGroupID=\"'.$attributeGroupID.'\"','inner');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}" ]
[ "0.71480864", "0.67497283", "0.67299634", "0.6709054", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6660661", "0.6648277", "0.65965766", "0.65332997", "0.6519329", "0.651205", "0.6495232", "0.6490505", "0.6484266", "0.6448906", "0.64367265", "0.6421927", "0.6420537", "0.63558465", "0.6314983", "0.6301754", "0.6299892", "0.62988144", "0.6298495", "0.62952524", "0.62742054", "0.62613994", "0.6259642", "0.6251583", "0.6251583", "0.6251583", "0.6251583", "0.6244542", "0.62362826", "0.62284046", "0.6227207", "0.62255216", "0.6222994", "0.61820936", "0.6177718", "0.61727864", "0.615316", "0.61269087", "0.61134136", "0.6106552", "0.6094919", "0.6086998", "0.6065344", "0.60550815", "0.604911", "0.6047663", "0.6041294", "0.60409397", "0.60396785", "0.6037949", "0.60278046", "0.6022157", "0.6015244", "0.60110366", "0.60048", "0.5996443", "0.5996443", "0.5988837", "0.5978299", "0.59721446", "0.5954989", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.59525687", "0.5944964", "0.59431535", "0.5937493", "0.591128", "0.5908113", "0.5905135", "0.59023464" ]
0.0
-1
Method returning details of one attribute
public function getPpAttribute(PpDataset $ppDataset, $ppAttributeId){ // TODO: Implement getPpAttribute() method. throw new NotImplementedException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getIdentifyingAttribute();", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "public function getAttributes() {}", "public function getAttributes() {}", "function GetAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes(){ }", "public function getAttr1(){\r\n\t\treturn $this->attr1;\r\n\t}", "function getAttributes()\n {\n }", "abstract protected function attributes();", "public function getAttribute(): string\n {\n return $this->attribute;\n }", "public function attributes();", "abstract public function getDetails();", "function getAdditionalAttributes() ;", "public function getAttributeDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get('Magento\\Eav\\Model\\Config' );\n }", "public function getCustomAttributes() {}", "public function getAttributes()\n {\n }", "function getDescription( $attribute )\r\n\t{\r\n\t\tswitch ( $attribute )\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\t\treturn $this->object->getAttributeDescription($attribute);\r\n\t\t}\r\n\t}", "public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}", "public function getAttrMetadata($attr){\n\t\treturn @$this->_atributosMetadata[$attr->attrName];\n\t}", "public function getAttribute($attribute)\n {\n }", "public function get_attribute($name)\n {\n }", "public function getAttrib() {\n return $this->attrib;\n }", "public function info($attribute)\r\n {\r\n $result = parent::info($attribute);\r\n if (!empty($result['additional_fields'])) {\r\n $keys = array_keys($result['additional_fields']);\r\n foreach ($keys as $key) {\r\n $result['additional_fields'][] = array(\r\n 'key' => $key,\r\n 'value' => $result['additional_fields'][$key]\r\n );\r\n unset($result['additional_fields'][$key]);\r\n }\r\n }\r\n return $result;\r\n }", "public function get($attribute);", "public function __GET($attr){\n\n\t\t return $this->$attr;\n\t\t}", "function getAttributedetail($filter=false)\n\t{\n\t\t$qry=$this->db->query(\"select * from rp_project_attribute_values where projectID='$filter'\");\n\t\treturn $qry->result();\n\t}", "protected function _getAttributes(){\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getAttribute(string $attribute): string;", "public function get_attributes()\n {\n }", "public function get_attributes()\n {\n }", "public function attr($attribute) {\n if (array_key_exists($attribute, $this->attributes)) {\n return $this->attributes[$attribute];\n } else {\n return 'PopShops API Error: Invalid attribute passed to ' . get_class($this) . '->attr: ' . $attribute;\n }\n }", "function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n return $this->get_attribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr);\n }", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAttributeDetails($attribute_id){\n\t\ttry {\n\t\t\tparent::SetDatabaseConnection();\t\t\n\t\t\t$query = \"call SPattributedetails('\".$attribute_id.\"')\";\n\t\t\t//exit;\n\t\t\treturn Application_Model_Db::getRow($query);\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }", "public function getUserAttr()\n {\n return $this->UserAttr;\n }", "function __get($attributeAskedFor) {\n echo \"Asked for \" . $attributeAskedFor . \"<br>\";\n return $this->$attributeAskedFor;\n }", "private function getAttribute($attribute)\n\t{\n\t\treturn isset($this->_data->{$attribute}) ? $this->_data->{$attribute} : '';\n\t}", "public function get($attr) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] : null;\n }", "function getDetails() {\n\t\treturn $this->data_array['details'];\n\t}", "public function readAttribute($attribute) {}", "public function __attribute($name)\n {\n return $this->__attributes[$name];\n }", "public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}", "function getName() {\n\t\t/* To refer to data stored in an object you proceed the name of the attribute with $this->yourAttribute*/ \n\n\treturn $this->name;\n\n\t}", "function info() {\n\t \treturn $this->description;\n\t }", "public function getAttribute($name);", "function getAttribute($Model, $attribute_name) {\n extract($this->settings[$Model->alias]);\n\n return ($Model->{$with}->Attribute->find(\n 'first',\n array(\n 'fields' => array(\n 'Datatype.name',\n 'Datatype.table',\n 'Datatype.validation_proc',\n 'Datatype.format',\n 'Attribute.name',\n 'Attribute.id'\n ),\n 'conditions' => array(\n 'Attribute.name' => $attribute_name,\n ),\n 'recursive' => 0\n )\n )\n );\n }", "public function getDetails(): string\n {\n return $this->details;\n }", "abstract function attributes(): array;", "public function getDetails()\n {\n if (array_key_exists(\"details\", $this->_propDict)) {\n return $this->_propDict[\"details\"];\n } else {\n return null;\n }\n }", "public function __debugInfo()\n {\n return $this->getAttributes();\n }", "public function getDetails()\n\t{\n\t\treturn $this->details;\n\t}", "public function getAttributeSetDetails();", "function get_atribute_by_name($name,$name_attr)\n {\n return $this->get_attribute_by_name($name,$name_attr);\n }", "public function __debugInfo()\n {\n return $this->attributes;\n }", "public static function get_attribute_returns() {\n return new external_value(PARAM_RAW, 'The course element attribute value');\n }", "public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }", "static function getAttributesInfo ()\n {\n return array (\n 'section1' => array (\n 'name' => _('Argonaut mirror settings'),\n 'attrs' => array (\n new StringAttribute (\n _('Local debian mirror directory'),\n '',\n 'argonautMirrorDir',\n FALSE,\n '/srv/www/debian'\n )\n )\n ),\n 'section2' => array (\n 'name' => _('Argonaut Debconf Crawler configuration'),\n 'attrs' => array (\n new StringAttribute (\n _('Local packages folder'),\n _('Folder in which the crawler will store packages during analysis'),\n 'argonautCrawlerPackagesFolder',\n FALSE,\n '/var/cache/argonaut/packages'\n )\n )\n ),\n 'section3' => array (\n 'name' => _('Argonaut Repository configuration'),\n 'attrs' => array (\n new StringAttribute (\n _('Proxy'),\n '',\n 'argonautLdap2repProxy',\n FALSE\n ),\n new StringAttribute (\n _('Log directory'), '',\n 'argonautLdap2repLogDir', FALSE,\n '/var/log/argonaut/'\n ),\n new BooleanAttribute (\n _('Errors'),\n '',\n 'argonautLdap2repErrors',\n FALSE,\n TRUE\n ),\n new BooleanAttribute (\n _('Source'),\n '',\n 'argonautLdap2repSource',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('GPG Check'),\n '',\n 'argonautLdap2repGPGCheck',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('Contents'),\n '',\n 'argonautLdap2repContents',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('Verbose'),\n _('Wether to activate verbose mode'),\n 'argonautLdap2repVerbose',\n FALSE,\n FALSE\n ),\n )\n )\n );\n }", "abstract public function getCorrespondingMetaData();", "function getFeatureAttribute($square_id, $attribute) {\n\twriteLog(\"getFeatureAttribute(): Square ID: \" . $square_id);\t\n\t\n\t$sql = \"SELECT \" . $attribute . \" FROM oddworld.feature WHERE square_id = \" . $square_id . \";\";\n\t$results = doSearch($sql);\n\t$count = count($results);\n\twriteLog(\"getFeatureAttribute(): Results: \" . count($results));\n\tif ($count != 0) {\n\t\twriteLog(\"getFeatureAttribute(): \" . $attribute . \": \" . $results[0][$attribute]);\n\t\treturn $results[0][$attribute];\t\n\t} else {\n\t\treturn \"\";\n\t}\n\t\t\n}", "public function getAttribute($name) {\n\t\tif (isset ( $this->$name ))\treturn $this->$name;\n\t}", "public function attributes() { return $this->attributes; }", "public function get($attr = null);", "public function getAttributesProperty()\n {\n return Attribute::whereAttributeType(Customer::class)->get();\n }", "public function getDetails()\r\n {\r\n return $this->details;\r\n }", "public function getAttributeString(){\n return $this->_form->getAttributeString($this->_attributes);\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getAttributes(){\n return $this->attributes;\n }", "public function getViaTableAttributesValue();", "public function getAttribute($name)\r\n\t{\r\n\t\treturn $this->__get($name);\r\n\t}", "public function details() {\n return \"My name is {$this->name} and I am {$this->age} years old.\";\n }", "public function get($attributeName);", "public function getDetails() {\r\n\t\t\treturn $this->_details;\r\n\t\t}", "protected function getValueAttribute() {}", "public function getDetails() {\n\t\treturn $this->details;\n\t}", "public function getAttribute($name)\n {\n if (in_array($name, static::$fields)) {\n return $this->attributes[$name];\n }\n }", "public function getInformation();", "public function getAttribute(string $name);", "public function getAttributes()\r\n\t{\r\n\t\treturn $this->attr;\r\n\t}", "public function getIdentityAttribute(): string;" ]
[ "0.7444576", "0.73922855", "0.69421256", "0.69421256", "0.6921342", "0.6866154", "0.6865827", "0.68637234", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.6863235", "0.68540484", "0.6826927", "0.6809957", "0.68064153", "0.678898", "0.678487", "0.6778214", "0.6770481", "0.67242044", "0.66603357", "0.66565156", "0.6645669", "0.66370404", "0.66221", "0.6598099", "0.6576123", "0.65678763", "0.6532363", "0.6488431", "0.64883053", "0.6482651", "0.64808804", "0.6473262", "0.6470837", "0.6470837", "0.6466857", "0.6464367", "0.6462377", "0.6462377", "0.64622164", "0.64614856", "0.64614856", "0.64614856", "0.64614856", "0.64614266", "0.6443286", "0.6442639", "0.64164805", "0.6410146", "0.64054614", "0.63946337", "0.638671", "0.6385985", "0.63748395", "0.6350907", "0.63382876", "0.6321542", "0.63061136", "0.6304641", "0.62999827", "0.6289208", "0.6283454", "0.62831396", "0.6281926", "0.627627", "0.62747854", "0.6262197", "0.625642", "0.62523115", "0.6246897", "0.624088", "0.6225631", "0.6223199", "0.62154186", "0.621344", "0.6212114", "0.620546", "0.6202982", "0.62010634", "0.62010634", "0.62010634", "0.6191457", "0.6186369", "0.61861295", "0.61832833", "0.61753654", "0.61713934", "0.61712193", "0.6169229", "0.61489934", "0.6148508", "0.61458606", "0.6124097", "0.6113595" ]
0.0
-1
Send request to api server
public function send(): GetDataFromApiClass;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }", "public function sendRequest()\n {\n }", "abstract function do_api_request();", "public function sendRequest( ) {\n\n }", "public function sendRequestToEndpoint(): Response;", "public function sendRequest()\n {\n $url = \"http://66.45.237.70/api.php\";\n $number = $this->senderObject->getMobile();\n $text = $this->senderObject->getMessage();\n\n try {\n $this->errorException();\n\n } catch (XenonException $exception) {\n $exception->showException($this->senderObject);\n }\n $config = $this->senderObject->getConfig();\n\n $data = array(\n 'username' => $config['username'],\n 'password' => $config['password'],\n 'number' => $number,\n 'message' => $text\n );\n try {\n $ch = curl_init(); // Initialize cURL\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $smsResult = curl_exec($ch);\n $status = $this->generateReport($smsResult, $data);\n\n } catch (XenonException $exception) {\n $exception->showException();\n }\n }", "public function request();", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "protected function send()\n {\n $this->addAuthorization();\n\n $response = $this->client->post(\n $this->apiUrl,\n array(\n 'json' => array(\n 'query' => $this->getQuery(),\n 'variables' => $this->variables,\n ),\n 'headers' => $this->headers,\n )\n );\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody === null) {\n throw new \\RuntimeException('Invalid api call: '.json_encode($this->getQuery()));\n }\n\n $this->body = $responseBody;\n if (isset($responseBody['errors'])) {\n $this->errors = $responseBody['errors'];\n } else {\n $this->response = $responseBody['data'];\n }\n }", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "abstract protected function requestApi($action = '', $params = array(), $method = 'POST');", "abstract public function request();", "public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}", "public function doRequests();", "public function request()\n {\n }", "public function request()\n {\n }", "public function runRequest() {\n }", "public function send()\n {\n $this->jsonManager->domain = $this->uri;\n $this->jsonManager->port = $this->port;\n $this->jsonManager->online = $this->isOnline();\n $this->jsonManager->send();\n }", "public function send($request);", "function send_request() { \n if(!$this->connect()) { \n return false; \n } \n else { \n $this->result = $this->request($this->data);\n return $this->result; \n } \n }", "public function requests()\n\t{\n\t\t$this->checkRequest();\n\t\t$this->getResponse();\n\t}", "function callServer($method, $params) {\n \t//Always include the user id if we're not loggin in\n \tif($method != \"login\") {\n \t\t$params[\"apikey\"] = $this->api_key;\n \t}\n \n $post_vars = $this->httpBuildQuery($params);\n \n $payload = \"POST \" . $this->apiUrl[\"path\"] . \"?\" . $this->apiUrl[\"query\"] . \"&method=\" . $method . \" HTTP/1.0\\r\\n\";\n $payload .= \"Host: \" . $this->apiUrl[\"host\"] . \"\\r\\n\";\n $payload .= \"User-Agent: MCAPI/\" . $this->version .\"\\r\\n\";\n $payload .= \"Content-type: application/x-www-form-urlencoded\\r\\n\";\n $payload .= \"Content-length: \" . strlen($post_vars) . \"\\r\\n\";\n $payload .= \"Connection: close \\r\\n\\r\\n\";\n $payload .= $post_vars;\n \n ob_start();\n $sock = fsockopen($this->apiUrl[\"host\"], 80, $errno, $errstr, $this->timeout);\n if(!$sock) {\n $this->errorMessage = \"Could not connect (ERR $errno: $errstr)\";\n $this->errorCode = \"-99\";\n ob_end_clean();\n return false;\n }\n \n $response = \"\";\n fwrite($sock, $payload);\n while(!feof($sock)) {\n $response .= fread($sock, $this->chunkSize);\n }\n fclose($sock);\n ob_end_clean();\n \n list($throw, $response) = explode(\"\\r\\n\\r\\n\", $response, 2);\n \n if(ini_get(\"magic_quotes_runtime\")) $response = stripslashes($response);\n \n $serial = unserialize($response);\n if($response && $serial === false) {\n \t$response = array(\"error\" => \"Bad Response. Got This: \" . $response, \"code\" => \"-99\");\n } else {\n \t$response = $serial;\n }\n if(is_array($response) && isset($response[\"error\"])) {\n $this->errorMessage = $response[\"error\"];\n $this->errorCode = $response[\"code\"];\n return false;\n }\n \n return $response;\n }", "public function send_request($action, $parameters);", "public function send(): void\n {\n $requiredParams = [\n 'v' => $this->client->getVersion(),\n 'tid' => $this->client->getTrackingId(),\n 'cid' => $this->client->getClientId(),\n 't' => $this->getHitType(),\n ];\n $paramValues = array_merge(\n $requiredParams,\n $this->parameters\n );\n \n $url = $this->getBaseUrl();\n\n $guzzle = new \\GuzzleHttp\\Client();\n $result = $guzzle->request('POST', $url, ['form_params' => $paramValues]);\n\n if ($this->client->isDebug()) {\n var_dump((string) $result->getBody());\n }\n }", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "abstract public function sendRequest(array $options);", "private function sendGetRequest($url)\n {\n // Send the request and process the response\n $guzzleResponse = $this->client->request('GET', $url);\n $this->lastResponse = new SmartwaiverResponse($guzzleResponse);\n }", "private function dispatch(): void {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"{$this->apiUrl}/{$this->endpoint}\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => \"CURL_HTTP_VERSION_1_1\",\n CURLOPT_CUSTOMREQUEST => $this->method\n ));\n\n $this->response = curl_exec($curl); \n curl_close($curl);\n }", "public function sendRequest($method, $params = '');", "public function run_request() {\r\n\t\t// Do nothing if we don't\r\n\t\tif ( empty( $_GET['wpmudev-hub'] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\r\n\t\t$this->register_internal_actions();\r\n\t\t$this->register_plugin_actions();\r\n\r\n\t\t//get the json\r\n\t\t$raw_json = file_get_contents( 'php://input' );\r\n\r\n\t\t$this->validate_hash( $_GET['wpmudev-hub'], $raw_json );\r\n\r\n\t\t$body = json_decode( $raw_json );\r\n\t\tif ( ! isset( $body->action ) ) {\r\n\t\t\twp_send_json_error( array( 'code' => 'invalid_params', 'message' => 'The \"action\" parameter is missing' ) );\r\n\t\t}\r\n\t\tif ( ! isset( $body->params ) ) {\r\n\t\t\twp_send_json_error( array( 'code' => 'invalid_params', 'message' => 'The \"params\" object is missing' ) );\r\n\t\t}\r\n\r\n\t\tif ( isset( $this->actions[ $body->action ] ) ) {\r\n\t\t\t$this->current_action = $body->action;\r\n\r\n\t\t\t//log it if turned on\r\n\t\t\tif ( WPMUDEV_API_DEBUG ) {\r\n\t\t\t\t$this->timer = microtime( true ); //start the timer\r\n\t\t\t\t$log = '[Hub API call] %s %s';\r\n\t\t\t\t$log .= \"\\n Request params: %s\\n\";\r\n\r\n\t\t\t\t$msg = sprintf(\r\n\t\t\t\t\t$log,\r\n\t\t\t\t\t$_GET['wpmudev-hub'],\r\n\t\t\t\t\t$body->action,\r\n\t\t\t\t\tjson_encode( $body->params, JSON_PRETTY_PRINT )\r\n\t\t\t\t);\r\n\t\t\t\terror_log( $msg );\r\n\t\t\t}\r\n\r\n\t\t\tcall_user_func( $this->actions[ $body->action ], $body->params, $body->action, $this );\r\n\r\n\t\t\t$this->send_json_success(); //send success in case the callback didn't respond\r\n\t\t}\r\n\r\n\t\t// When the callback function did not send a response assume error.\r\n\t\twp_send_json_error( array(\r\n\t\t\t'code' => 'unregistered_action', 'message' => 'This action is not registered. The required plugin is not installed, updated, or configured properly.'\r\n\t\t) );\r\n\t}", "function chargeAPI($api_url, $server_key, $request_body){\n $ch = curl_init();\n $curl_options = array(\n CURLOPT_URL => $api_url,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n // Tambahkan heder ke permintaan, termasuk Otorisasi yang dihasilkan dari kunci server\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'Accept: application/json',\n 'Authorization: Basic ' . base64_encode($server_key . ':')\n ),\n CURLOPT_POSTFIELDS => $request_body\n );\n curl_setopt_array($ch, $curl_options);\n $result = array(\n 'body' => curl_exec($ch),\n 'http_code' => curl_getinfo($ch, CURLINFO_HTTP_CODE),\n );\n return $result;\n}", "public function sendRequest($params) {\n \n // encrypt the request \n $request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->_app_key, json_encode($params), MCRYPT_MODE_ECB));\n //$request = base64_encode(json_encode($params));\n \n // redefine the parameters array so that it will be accepted by the api \n $params = array();\n $params['data'] = $request;\n $params['app_id'] = $this->_app_id;\n \n //initialize and setup the curl handler\n $handle = curl_init();\n curl_setopt($handle, CURLOPT_URL, $this->_api_url);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($handle, CURLOPT_POST, count($params));\n curl_setopt($handle, CURLOPT_POSTFIELDS, $params); \n $ans = curl_exec($handle); \n if ($ans === false) {\n printf(\"cUrl error (#%d): %s<br>\\n\", curl_errno($handle), htmlspecialchars(curl_error($handle)));\n } \n \n //echo \"GAC: \".$ans.\"\\n\";\n $rawans = $ans;\n $ans = json_decode($ans, true); \n //echo \"ABC: \".$ans.\"\\n\";\n \n //check if we're able to json_decode the result correctly\n if ($ans == false || isset($ans['success']) == false) { \n throw new Exception('Request was not correct in GeneralApiCaller: '.$rawans);\n }\n \n // if there was an error in the request, throw an exception\n if ($ans['success'] == false) {\n throw new Exception($ans['errormsg']);\n }\n \n // if reached here, the data component should have the result\n return $ans['data'];\n }", "function request()\n {\n }", "public function send()\n {\n $response = $this->apiClient->sendRequest(\n $this->getRequest(),\n $this->withAuthentication\n );\n\n return $this->apiClient->getResponseJson($response);\n }", "public function sendRequest() {\n $response = file_get_contents($this->url);\n\n if ($response) {\n\n $this->response = $response;\n return true;\n } else {\n\n return false;\n }\n }", "public function serviceRequest()\n {\n API::post('ivr/serviceRequest', array(\n 'caller' => $this->caller,\n 'called' => $this->called\n ), $this->app->getAccessToken());\n }", "public function sendResponse();", "public function requestAction() {\n $this->api->login('request')->post()->loadTokenFromResponse();\n $_SESSION['request_token'] = $this->api->getOAuthToken();\n return $this->api->goRedirect('login');\n }", "function tincanlaunch_send_api_request($auth, $method, $url) {\n $options = func_num_args() === 4 ? func_get_arg(3) : array();\n\n if (!isset($options['contentType'])) {\n $options['contentType'] = 'application/json';\n }\n\n $http = array(\n // We don't expect redirects.\n 'max_redirects' => 0,\n // This is here for some proxy handling.\n 'request_fulluri' => 1,\n // Switching this to false causes non-2xx/3xx status codes to throw exceptions.\n // but we need to handle the \"error\" status codes ourselves in some cases.\n 'ignore_errors' => true,\n 'method' => $method,\n 'header' => array()\n );\n\n array_push($http['header'], 'Authorization: ' . $auth);\n\n if (($method === 'PUT' || $method === 'POST') && isset($options['content'])) {\n $http['content'] = $options['content'];\n array_push($http['header'], 'Content-length: ' . strlen($options['content']));\n array_push($http['header'], 'Content-Type: ' . $options['contentType']);\n }\n\n $context = stream_context_create(array('http' => $http));\n $fp = fopen($url, 'rb', false, $context);\n if (!$fp) {\n return array(\n \"metadata\" => null,\n \"content\" => null,\n \"status\" => 0\n );\n }\n $metadata = stream_get_meta_data($fp);\n $content = stream_get_contents($fp);\n $responsecode = (int) explode(' ', $metadata[\"wrapper_data\"][0])[1];\n\n fclose($fp);\n\n if ($options['contentType'] == 'application/json') {\n $content = json_decode($content);\n }\n\n return array(\n \"metadata\" => $metadata,\n \"content\" => $content,\n \"status\" => $responsecode\n );\n}", "public function doRequest()\n {\n $this->post('/api_v1/webhook/log/1',\n json_decode('{\n \"transaction_time\": \"1603711958\",\n \"id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\",\n \"event\": \"in-store-txn\",\n \"value\": 13.98,\n \"status\": \"complete\",\n \"customer_id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\"\n }'),\n [\n \"Accept\" => \"application/json\"\n ]\n );\n\n $this->assertEquals(\n 200, $this->response->getStatusCode()\n );\n }", "public function send()\n\t{\n\t\t$url \t\t= $this->getURL();\t\t\n\t\t$data \t\t= $this->getData();\n\t\t$method \t= $this->getMethod();\n\t\t\t\t\n\t\t$ch = curl_init();\n\t\t$options = $this->_options;\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_USERAGENT \t => $options->useragent,\n\t\t\tCURLOPT_CONNECTTIMEOUT => $options->connection_timeout,\n\t\t\tCURLOPT_TIMEOUT\t\t => $options->timeout,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLINFO_HEADER_OUT\t => true,\n\t\t\tCURLOPT_SSL_VERIFYPEER => $options->ssl,\n\t\t\tCURLOPT_HEADER\t\t => false\n\t\t));\n\t \n $headers = array();\n //if data is string then \n //set the authorization header\n //A Hack to make the linked-in work wihtout affecting\n //other services\n if ( is_string($this->_data) ) {\n $headers[] = $this->_internal_request->to_header();\n $headers[] = \"Content-Type: text/plain\";\n }\n \n if ( !empty($headers) )\n curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);\n \n\t\tswitch ($method) \n\t\t{\n\t\t\tcase KHttpRequest::POST :\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\n\t\t\tcase KHttpRequest::PUT\t: \n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\t\n\t\t\tcase KHttpRequest::DELETE:\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\t\n\t\t$response = curl_exec($ch);\n\t\t\n\t\treturn new ComConnectOauthResponse($response, curl_getinfo($ch));\n\t}", "public function send(Request $request);", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "function send_request($request)\n {\n $response = $request->send();\n return $this->parse_response($response);\n }", "public function makeRequest(): void\n {\n if (!$this->token) {\n $this->login();\n }\n\n try {\n $promise = $this->client->requestAsync('POST', 'https://api.jamef.com.br/rastreamento/ver',\n [\n 'headers' =>\n [\n 'Authorization' => 'Bearer ' . $this->token,\n ],\n 'json' => $this->buildRequest()\n ]\n )->then(function ($response) {\n $this->parseResult($response);\n });\n $promise->wait();\n } catch (RequestException $e) {\n $error = json_decode($e->getResponse()->getBody());\n if($error->message){\n $this->result->errors[] = utf8_decode($error->message->message);\n }\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n }", "function send()\n {\n try{\n $client = new Client();\n $response = $client->request('POST', $this->base_url_SendSMS, [\n 'form_params' => [\n 'Userid' => $this->username,\n 'pwd' => $this->password,\n 'APIKEY' => $this->apikey,\n 'MSG' => $this->msgtext,\n 'FROM' => $this->from,\n 'To' => $this->to,\n ]\n ]);\n\n echo $response->getStatusCode(); // 200\n $response->getReasonPhrase(); // OK\n $response->getProtocolVersion(); // 1.1\n }\n catch(\\GuzzleHttp\\Exception\\ClientException $e){\n echo $e->getMessage();\n }\n catch(ErrorException $e){\n echo $e->getMessage();\n }\n }", "function request($httpMethod, $service, $apiMethod, array $parameters = array(), array $options = array());", "public function sendRequest(Request $request);", "public function sendRequest(Request $request);", "public function performApiRequest(TelegramMethods $method)\r\n {\r\n\t\t\r\n\t\t \r\n\t\t$this->checkSpecialConditions($method); //json encodes reply_markup \r\n $this->sendRequestToTelegram($method);\r\n\r\n }", "public function sendRequest( $uri )\n\t{\n\t\t$this->response = Requests::get($uri, array(), array(\"timeout\" => $this->timeout));\n\t}", "public function HTTPRequest(){\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "public function handleHttpRequest() {\r\n\t\t\r\n\t\t// starttime\r\n\t\t$time_start = microtime(true);\r\n\t\t\r\n\t\t// create new Session if the client doesn't have one\r\n\t\tif( session_id() == null ) session_start();\r\n\r\n\t\t$result = array();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// get version on empty request \r\n\t\t\tif( ( $_GET == null && $_POST == null ) /* || ( $_POST == null && $_POST == null ) */ ) {\r\n\r\n\t\t\t\t// no parameters given, just return the version number\r\n $initial = 'BiotoPi API ' . 'v1 '; // Helper::getVersion();\r\n\t\t\t\t$result['data'] = $initial;\r\n\t\t\t\t$result['state'] = true;\r\n\r\n\t\t\t\t// TODO, $_REQUEST is never empty, use $_POST & $_GET instead!!\r\n\t\t\t} else if( isset( $_GET ) || isset( $_POST ) /* && $_REQUEST != \"\" */ ) {\r\n\r\n\t\t\t\tif( ENV == 'prod' && isset( $_REQUEST['tk'] ) && $_REQUEST['tk'] !== null ) {\r\n\r\n\t\t\t\t\t// only allowed requests in productive enviroments with right token\r\n\t\t\t\t\t$tk = base64_decode( urldecode( $_REQUEST['tk'] ) );\r\n\t\t\t\t\t$sitetk = Config::get( 'token' );\r\n\t\t\t\t\t$unpack = unpack( 'H*', $sitetk );\r\n\t\t\t\t\tif( $tk != strtotime( date( 'd.m.Y H:i:00' ) ) . array_shift( $unpack ) ) throw new Exception( \"Wrong token! \" );\r\n\t\t\t\t\t//\t\t\t\t\t\t$tk = base64_decode( urldecode( $_REQUEST['tk'] ) );\r\n\t\t\t\t\t//\t\t\t\t\t\tif( $tk != Config::get( 'token' ) ) throw new Exception( \"Wrong token!\" ); // , $_SESSION['site'] \r\n\r\n\t\t\t\t} else if( ENV == 'prod' && ( ! isset( $_SESSION['eingeloggt'] ) || $_SESSION['eingeloggt'] != 1 ) ) {\r\n\r\n // we need a Users Backend and Frontend\r\n // Login, Register (contains send E-Mail with tokenized Link)\r\n // Overview for Admins (we need also Groups for this: Admin and User should be enough) \r\n\r\n\t\t\t\t\t// unauthorized requests redirect or notify?\r\n // if( Config::get( 'apiredirect' ) ) {\r\n // // Redirect to loginpage\r\n // header ( \"Location: ./mgmt\" );\r\n // } else {\r\n\t\t\t\t\t\t// Returns a Message\r\n throw new Exception( 'Please login to use this service!' );\r\n // }\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// get our controller and action names \r\n\t\t\t\t$controllerName = isset( $_REQUEST['controller'] ) ? $_REQUEST['controller'] : null;\r\n\t\t\t\t$actionName = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null;\r\n\r\n\t\t\t\tif( $controllerName === null ) throw new Exception( 'No Controller given, aborted!' );\r\n\t\t\t\tif( $actionName === null ) throw new Exception( 'No Action given, aborted!' );\r\n\r\n\t\t\t\t// Controller allways are lowercase only the first Character is Uppercase\r\n\t\t\t\t// $controllerName = ucfirst( strtolower( $controllerName ) );\r\n $controllerName = ucfirst( $controllerName );\r\n\r\n\t\t\t\t// use PHP reflectionAPI to get result\r\n\t\t\t\t$controller = self::createController( $controllerName );\r\n\t\t\t\t$response = self::callMethod( $controller, $actionName );\r\n\r\n\t\t\t\t// return result into data and set succes true\r\n\t\t\t\t$result['state'] = true;\r\n\t\t\t\t$result['data'] = $response;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch( Exception $e ) {\r\n\t\t\t// catch any exceptions, set success false and report the problem\r\n\t\t\t$result['state'] = false;\r\n\t\t\t$result['errormsg'] = $e->getMessage();\r\n\t\t}\r\n\r\n\t\tif( isset($_GET['debug']) && $_GET['debug'] === \"1\" ) {\r\n\t\t\t$result['time'] = round( ( microtime(true) - $time_start ), 3 );\r\n\t\t\techo \"<pre>\";\r\n\t\t\tprint_r( $result );\r\n\t\t\t//var_dump( $result );\r\n\t\t\techo \"</pre>\";\r\n\t\t} else if ( $result ) {\r\n // if( $result['data'] === $initial ) {\r\n // // we are on an initial request\r\n // }\r\n // return our json encoded result to the requester\r\n header( 'Cache-Control: no-cache, must-revalidate' );\r\n\t\t\theader( \"Access-Control-Allow-Origin: *\" );\r\n\t\t\theader( \"Content-Type: application/json charset=UTF-8\" );\r\n\t\t\tprint_r( json_encode( $result ) );\r\n\t\t} else {\r\n\t\t\techo \"<pre>\";\r\n\t\t\tvar_dump( $result );\r\n\t\t\techo \"</pre>\";\r\n\t\t}\r\n\r\n\t\tsession_write_close();\r\n\r\n\t\t// // redirect to last destination as form fallback on no js.\r\n\t\t// if( isset( $_REQUEST['redirect'] ) ) {\r\n\t\t// \theader ( \"Location: \" . $_REQUEST['redirect'] );\r\n\t\t// }\r\n\r\n\t}", "public function execute_http()\n {\n }", "function send_request($postdata = \"\") {\n\t\tif(!is_array($postdata) ) $postdata = array();\n\t\t\n\t\t$url = $this->_build_url();\n\t\t\n\t\tif(!isset($postdata['ip_address'])) $postdata['ip_address'] = $this->_get_client_ip();\n\t\tif(!isset($postdata['user_agent'])) $postdata['user_agent'] = $this->_get_client_user_agent();\n\t\t$postdata['api_key'] = $this->api_key;\n\n\t\t$ch = curl_init($url);\n\n\t\tcurl_setopt($ch, CURLOPT_POST ,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'json='.$this->_json_encode($postdata));\n\t\tcurl_setopt($ch, CURLOPT_HEADER ,0); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT ,10);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\t\t\n\n\t\t$return_data = curl_exec($ch);\n\n\t\treturn $return_data;\n\t}", "public function sendRequest($request_params) {\n\t\t$params = array();\n\n\t\t$params['request'] = $request_params;\n\t\t$params['app_id'] = $this->_app_id;\n\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->_api_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $params[\"request\"]);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t//execute request\n\t\t$result = curl_exec($ch);\n\n\t\t//test other\n\t\t$fm = fopen(\"try.txt\", \"w\");\n\t\tfwrite($fm, var_export($result, true));\n\n\n\t\t//json decode the result\n\t\t$result = json_decode($result);\n\n\t\t//check if is decoded correctly\n\t\tif($result == false || isset($result->success) == false) {\n\t\t\tthrow new Exception('Request was not correct');\n\t\t}\n\n\t\t//if there was an error in request\n\t\tif($result->success == false) {\n\t\t\tthrow new Exception($result->errormsg);\n\t\t}\n\n\t\t//if everything was successful return data\n\t\treturn json_encode($result->data);\n\t}", "public function testSendingRequestWithToken()\n {\n $response = $this->get('/api/drivers', ['api_token' => config('constants.TEST_TOKEN')]);\n\n $response->assertStatus(200);\n }", "public function api_call() {\n\n }", "public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }", "public function call()\n {\n $this->dispatchRequest($this['request'], $this['response']);\n }", "public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n echo json_encode($resBody);\n\n }", "public function serve_request()\n {\n }", "public function send(){\n \n\n\t\t$sent = FALSE;\n\t\t\n\t\t$baseurl = \"http://api.clickatell.com\";\n\n\t\t$this->text = urlencode($this->text);\n\n\t\t//ap\n\t\t$this->to = '266'.$this->to;\n\n\t\t// auth call\n\t\t$url = \"$baseurl/http/auth?user=$this->username&password=$this->password&api_id=$this->api_id\";\n\n\t\t// do auth call\n\t\t$ret = file($url);\n\n\t\t// explode our response. return string is on first line of the data returned\n\t\t$sess = explode(\":\", $ret[0]);\n\t\tif ($sess[0] === 'OK') {\n\n\t\t\t$sess_id = trim($sess[1]); // remove any whitespace\n\t\t\t$url = \"$baseurl/http/sendmsg?session_id=$sess_id&to=$this->to&text=$this->text\";\n\n\t\t\t// do sendmsg call\n\t\t\t$ret = file($url);\n\t\t\t$send = explode(':', $ret[0]);\n\n\t\t\tif ($send[0] === \"ID\")\n\t\t\t{\n\t\t\t\t$sent = TRUE;\n\t\t\t} else {\n\t\t\t\techo 'Authentication failure: ' . $ret[0] . \"\\n\";\n\t\t\t}\n\t\n\t\t\treturn $sent;\n\t\t}\n\t}", "private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }", "public function run()\n {\n\n // Base path of the API requests\n $basePath = trim($this->settings['application.path']);\n if( $basePath != '/' ){\n $basePath = '/'.trim($basePath, '/').'/';\n }\n\n // Setup dynamic routing\n $this->map($basePath.':args+', array($this, 'dispatch'))->via('GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'OPTIONS');\n\n //Invoke middleware and application stack\n $this->middleware[0]->call();\n\n //Fetch status, header, and body\n list($status, $header, $body) = $this->response->finalize();\n\n //Send headers\n if (headers_sent() === false) {\n\n //Send status\n header(sprintf('HTTP/%s %s', $this->config('http.version'), \\Slim\\Http\\Response::getMessageForCode($status)));\n\n //Send headers\n foreach ($header as $name => $value) {\n $hValues = explode(\"\\n\", $value);\n foreach ($hValues as $hVal) {\n header(\"$name: $hVal\", true);\n }\n }\n }\n\n // Send body\n echo $body;\n }", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "function apiRequest($method, $data=[]) {\n // Define our target address for the API call.\n $url = \"https://api.telegram.org/bot\".API_KEY.\"/\".$method;\n\n // Perform cURL session.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n $result = curl_exec($ch);\n\n // Error checking. If successful, return data.\n if ( curl_error($ch) ) {\n return false;\n } else {\n return json_decode($result, TRUE);\n }\n }", "private function request ($query_key_value = []) {\n\t\t\t\n\t\t\t$query_key_value += [\n\t\t\t\t'type' \t\t=> $this->resultType // dealing with result objectly\n\t\t\t];\n\t\t\t\n\t\t\tswitch ($this->authType){\n\t\t\t\tcase 'normal':\n\t\t\t\t\t$auth = $this->authNormal;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'key':\n\t\t\t\t\t$auth = $this->authKey;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t// the $auth default is key\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->serverAction) throw new Exception('SMS server action not set');\n\t\t\t\n\t\t\t$this->httpQuery =\n\t\t\t\t$this->server .\n\t\t\t\t$this->serverAction .\n\t\t\t\thttp_build_query(array_merge($auth, $query_key_value), null, '&', PHP_QUERY_RFC3986);\n\t\t\t\n\t\t\t// $result get the response from the api server after message sent\n\t\t\t$result = json_decode(@file_get_contents($this->httpQuery));\n\t\t\t\n\t\t\t\t$dummy = json_decode(\"\n\t\t\t\t\t{\n\t\t\t\t\t\t'status': '1',\n \t\t\t\t\t\t'id' : '1234567890',\n\t\t\t\t\t\t'balance': '3445',\n\t\t\t\t\t\t'remarks': 'success'\n\t\t\t\t\t}\n\t\t\t\t\t\");\n\n\t\t\treturn $result;\n\t\t\t\n\t\t}", "function restAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, $request_data);\n }", "public function request() : ServerRequestInterface;", "public function send() \n {\n if (!$this->getEndpoint()) {\n // Can't make a request without a URL\n Mage::throwException(\"Unable to send a Klevu Search API request: No URL specified.\");\n }\n\n $raw_request = $this->build();\n Mage::helper('klevu_search')->log(Zend_Log::DEBUG, sprintf(\"API request:\\n%s\", $this->__toString()));\n\n try {\n $raw_response = $raw_request->request();\n } catch (Zend_Http_Client_Exception $e) {\n // Return an empty response\n Mage::helper('klevu_search')->log(Zend_Log::ERR, sprintf(\"HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('klevu_search/api_response_empty');\n }\n\n Mage::helper('klevu_search')->log(\n Zend_Log::DEBUG, sprintf(\n \"API response:\\n%s\\n%s\",\n $raw_response->getHeadersAsString(true, \"\\n\"),\n $raw_response->getBody()\n )\n );\n\n $response = $this->getResponseModel();\n $response->setRawResponse($raw_response);\n\n return $response;\n }", "function send_request( $http_method, $url, $auth_header = null, $postData = null ) {\n\t$curl = curl_init( $url );\n\tcurl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $curl, CURLOPT_FAILONERROR, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );\n\n\tswitch( $http_method ) {\n\t\tcase 'GET':\n\t\t\tif( $auth_header ) {\n\t\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( $auth_header ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'POST':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/atom+xml',\n\t\t\t\t$auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_POST, 1 );\n\t\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $postData );\n\t\t\tbreak;\n\t\tcase 'PUT':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/atom+xml',\n\t\t\t\t$auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $http_method );\n\t\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $postData );\n\t\t\tbreak;\n\t\tcase 'DELETE':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( $auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $http_method );\n\t\t\tbreak;\n\t}\n\t$response = curl_exec( $curl );\n\tif( !$response ) {\n\t\t$response = curl_error( $curl );\n\t}\n\tcurl_close( $curl );\n\treturn $response;\n}", "private function sendRequest(string $url, array $obj = [], bool $array=false, string $method = 'GET'){\n $ret = '';\n $sign = JWT::encode($obj, $this->secret);\n $obj['signature'] = $sign;\n $client = new \\GuzzleHttp\\Client();\n $arg = strtoupper($method) == 'GET' ? 'query' : 'body';\n $r = $client->request(strtoupper($method), $url, [$arg => $obj]);\n if($r->getStatusCode()==200){\n $ret = json_decode($r->getBody()->getContents(), $array);\n }\n return $ret;\n }", "public function sendRequest($sUrl);", "public function request($method, $url, array $body = [], array $headers = [], $version = '1.1');", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}", "public function send(){\n\n\n\n $id = $_GET['id'];\n $msg = $_GET['msg'];\n $response = $this->sendMessage($id,$msg);\n $return[\"allresponses\"] = $response;\n $return = json_encode($return);\n $data = json_decode($response, true);\n\n echo $response;\n\n }", "function post_day($httpClient, $base_url, $day) {\r\n error_log('post_day to server: ' . $day);\r\n $url = $base_url . '/day/';\r\n $response = $httpClient->request('POST', $url,['json' => $day]); //guzzale part\r\n// $request = $httpClient->createRequest('POST', $url);\r\n// $request->setBody(Stream::factory('9'));\r\n// $response = $request->send();\r\n return $response;\r\n //echo $response; die();\r\n error_log('post_day to server: ' . $day);\r\n \r\n// $url = 'http://' . $base_url . '/day/';\r\n// $day1['day'] = $day;\r\n// //$response = $httpClient->request('POST', $url, ['json' => $day1]);\r\n// return $response;\r\n \r\n}", "public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }", "public function sendRequest()\n {\n return new ServerResponseManager(json_decode(file_get_contents( $this->wrapper.'?'.implode( '&', $this->getRequest() ) ), true));\n }", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }", "public function request($index){\n $this->httpRequest->request($index);\n }", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function execute(){\n try {\n $request = $this->getRestClient();\n $raw_response = $request->request();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::helper('unbxd_recommendation')->log(Zend_Log::ERR,\n sprintf($this->getUrl() .\" failed because HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('unbxd_recommendation/api_response')\n ->setErrorMessage(Unbxd_Recommendation_Model_Api_Response::SERVER_ERR);\n }\n return Mage::getModel(\"unbxd_recommendation/api_response\")\n ->setJsonResponse($this->isJsonResponse())\n ->setResponse($raw_response, $this->getUrl());\n }", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function request_api($http_method, $uri, $params = array()){\n\t\t\n\t\t// prepare request url\n\t\t$request_url = $this->api_url.'/'.$uri;\n\t\t// send request\n\t\treturn $this->_request( $http_method, $request_url, $params );\n\t}" ]
[ "0.7310158", "0.7284167", "0.72554886", "0.7125396", "0.6880223", "0.68694586", "0.6865552", "0.6803222", "0.67465174", "0.6673545", "0.6553301", "0.6541784", "0.65238005", "0.6511811", "0.64745677", "0.64745677", "0.64736086", "0.64704627", "0.6463386", "0.6459888", "0.6446428", "0.6443038", "0.6345228", "0.63021713", "0.62964034", "0.62923294", "0.62824804", "0.62655747", "0.61920804", "0.61876386", "0.6133635", "0.61261576", "0.61242026", "0.60798734", "0.60797596", "0.6079473", "0.6053316", "0.6048341", "0.6039169", "0.6019631", "0.60121965", "0.60120827", "0.60048485", "0.59869844", "0.5979632", "0.5976545", "0.5963078", "0.5962467", "0.5962467", "0.5941606", "0.59314394", "0.5913506", "0.59068257", "0.5904503", "0.59024817", "0.58876956", "0.58867836", "0.5884981", "0.58804965", "0.58768886", "0.5872169", "0.5837964", "0.5837299", "0.5835493", "0.5826271", "0.5825669", "0.5823566", "0.5821079", "0.580627", "0.57972264", "0.57963365", "0.57963014", "0.57797235", "0.5778977", "0.5774994", "0.5774442", "0.5772838", "0.57660496", "0.5765616", "0.5753766", "0.5746579", "0.5744328", "0.5738693", "0.57357323", "0.57309103", "0.5729671", "0.57284606", "0.57271105", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.57268316", "0.5723221" ]
0.5872654
60
configuration for curl request
public function curlConfig(): GetDataFromApiClass;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function configureCurl ()\n {\n curl_setopt_array($this->cURL, [\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => true\n ]);\n }", "private function init() {\n $this->_cm = curl_init();\n curl_setopt($this->_cm, CURLOPT_PROXY, $config['curl']['proxy']);\n curl_setopt($this->_cm, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($this->_cm, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->_cm, CURLOPT_TIMEOUT, $config['curl']['timeout']);\n curl_setopt($this->_cm, CURLOPT_POST, true); \n }", "public function setupCurl()\n {\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL,\"https://jsonplaceholder.typicode.com/posts\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n return $ch;\n }", "private function initCurl()\n {\n $this->curlObj = curl_init();\n curl_setopt_array($this->curlObj, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_FORBID_REUSE => true,\n CURLOPT_HEADER => false,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 2,\n CURLOPT_HTTPHEADER => [\"Connection: Keep-Alive\", \"Keep-Alive: 120\"]\n ));\n }", "private function setUpCurl()\n {\n $this->curl = $this->get('app.curl.connector');\n $this->curl->setEndPointBaseUrl($this->getParameter('themoviedb_endpoint_url'));\n $this->curl->setExtraHeaders([\n CURLOPT_HEADER => false,\n CURLOPT_HTTPHEADER => [\"Accept: application/json\"],\n CURLOPT_SSL_VERIFYPEER => false\n ]);\n }", "private function curl_setopts($curl_handle, $config, $service) {\n curl_setopt($curl_handle, CURLOPT_URL, str_replace('%s', $this->url, $config[$service]['url']));\n $timeout = isset($this->options['timeout']) ? $this->options['timeout'] : 6;\n\n // other necessary settings:\n // CURLOPT_HEADER means include header in output, which we do not want\n // CURLOPT_RETURNTRANSER means return output as string or not\n curl_setopt_array($curl_handle, array(\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_TIMEOUT => $timeout,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_SSL_VERIFYHOST => false,\n ));\n\n // set the http method: default is GET\n if($config[$service]['method'] === 'POST') {\n curl_setopt($curl_handle, CURLOPT_POST, 1);\n }\n\n // set the body and headers\n $headers = isset($config[$service]['headers']) ? $config[$service]['headers'] : array();\n $body = isset($config[$service]['body']) ? $config[$service]['body'] : NULL;\n\n if(isset($body)) {\n if(isset($headers['Content-Type']) && $headers['Content-Type'] === 'application/json') {\n $data_string = json_encode($body);\n\n curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n\n curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data_string);\n }\n }\n\n // set the useragent\n $useragent = isset($config[$service]['User-Agent']) ? $config[$service]['User-Agent'] : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0';\n curl_setopt($curl_handle, CURLOPT_USERAGENT, $useragent);\n }", "public function curlInit() {\n parent::curlInit();\n curl_setopt($this->curl, CURLOPT_HEADER, true);\n curl_setopt($this->curl, CURLOPT_ACCEPT_ENCODING, 'identity');\n }", "protected function createCurlHandle()\n {\n $ch = curl_init();\n\n $bdurl = $this->request->getUrl();\n $config = $this->request->getConfig();\n\n \t$curl_opts = array(\n \t\t// request url\n \t\tCURLOPT_URL\t\t\t\t=> $this->requestUrl,\n \t\t// setup write callbacks\n \t\tCURLOPT_HEADERFUNCTION\t=> array($this, 'onWriteHeader'),\n \t\tCURLOPT_WRITEFUNCTION\t=> array($this, 'onWriteBody'),\n \t\t// buffer size\n \t\tCURLOPT_BUFFERSIZE\t\t=> $config['buffer_size'],\n \t\t// save full outgoing headers, in case someone is interested\n CURLINFO_HEADER_OUT\t\t=> true,\n CURLOPT_NOSIGNAL => 1,\n );\n\n // setup connection timeout\n\t\tif (defined('CURLOPT_CONNECTTIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT_MS] = $config['connect_timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT] = ceil($config['connect_timeout'] / 1000);\n\t\t}\n\n // setup request timeout\n\t\tif (defined('CURLOPT_TIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT_MS] = $config['timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT] = ceil($config['timeout'] / 1000);\n\t\t}\n\n // setup redirects\n if ($config['follow_redirects']) {\n \t$curl_opts[CURLOPT_FOLLOWLOCATION] = true;\n $curl_opts[CURLOPT_MAXREDIRS] = $config['max_redirects'];\n // limit redirects to http(s), works in 5.2.10+\n if (defined('CURLOPT_REDIR_PROTOCOLS')) {\n $curl_opts[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;\n }\n // works sometime after 5.3.0, http://bugs.php.net/bug.php?id=49571\n if ($config['strict_redirects'] && defined('CURLOPT_POSTREDIR ')) {\n $curl_opts[CURLOPT_POSTREDIR] = 3;\n }\n } else {\n $curl_opts[CURLOPT_FOLLOWLOCATION] = false;\n }\n\n // set HTTP version\n switch ($config['protocol_version']) {\n case '1.0':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;\n break;\n case '1.1':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;\n }\n\n // set request method\n switch ($this->request->getMethod()) {\n case bdHttpRequest::METHOD_GET:\n $curl_opts[CURLOPT_HTTPGET] = true;\n break;\n case bdHttpRequest::METHOD_POST:\n $curl_opts[CURLOPT_POST] = true;\n break;\n case bdHttpRequest::METHOD_HEAD:\n $curl_opts[CURLOPT_NOBODY] = true;\n break;\n default:\n $curl_opts[CURLOPT_CUSTOMREQUEST] = $this->request->getMethod();\n }\n\n // set proxy, if needed\n if ($config['proxy_host']) {\n if (!$config['proxy_port']) {\n throw new bdHttpException('Proxy port not provided');\n }\n $curl_opts[CURLOPT_PROXY] = $config['proxy_host'] . ':' . $config['proxy_port'];\n if ($config['proxy_user']) {\n $curl_opts[CURLOPT_PROXYUSERPWD] = $config['proxy_user'] . ':' . $config['proxy_password'];\n switch ($config['proxy_auth_scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_DIGEST;\n }\n }\n }\n\n // set authentication data\n $auth = $this->request->getAuth();\n if ($auth) {\n $curl_opts[CURLOPT_USERPWD] = $auth['user'] . ':' . $auth['password'];\n switch ($auth['scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;\n }\n }\n\n // set SSL options\n if (0 == strcasecmp($bdurl->getScheme(), 'https')) {\n \tif (isset($config['ssl_verify_host'])) {\n \t\t$curl_opts[CURLOPT_SSL_VERIFYHOST] = $config['ssl_verify_host'] ? 2 : 0;\n \t}\n \tforeach (self::$sslContextMap as $name => $option) {\n \t\tif (isset($config[$name])) {\n \t\t\t$curl_opts[$option] = $config[$name];\n \t\t}\n \t}\n }\n\n $headers = $this->request->getHeaders();\n // make cURL automagically send proper header\n if (!isset($headers['accept-encoding'])) {\n $headers['accept-encoding'] = '';\n }\n\n // set headers having special cURL keys\n foreach (self::$headerMap as $name => $option) {\n if (isset($headers[$name])) {\n $curl_opts[$option] = $headers[$name];\n unset($headers[$name]);\n }\n }\n\n $this->calculateRequestLength($headers);\n if (isset($headers['content-length'])) {\n $this->workaroundPhpBug47204($curl_opts, $headers);\n }\n\n // set headers not having special keys\n $headersFmt = array();\n foreach ($headers as $name => $value) {\n $canonicalName = implode('-', array_map('ucfirst', explode('-', $name)));\n $headersFmt[] = $canonicalName . ': ' . $value;\n }\n $curl_opts[CURLOPT_HTTPHEADER] = $headersFmt;\n\n curl_setopt_array($ch, $curl_opts);\n\n return $ch;\n }", "private function initGetRequest()\n {\n $this\n ->addCurlOption(CURLOPT_URL, $this->getUrl().'?'.$this->getQuery())\n ->addCurlOption(CURLOPT_CUSTOMREQUEST, HttpMethodResolver::HTTP_GET)\n ;\n }", "protected static function configure($curl) {\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\t\t\t\t//We want the data returned as a variable\n\t\t\tcurl_setopt($curl, CURLOPT_TIMEOUT, 10);\t\t\t\t\t\t//Maximum wait before timeout\n\t\t\tself::authenticate($curl);\t\t\t\t\t\t\t\t\t//Authenticate our socket\n return $curl;\n\t\t}", "private function initCurl() {\n\t\tif( $this->valid() ) {\n\t\t\t$this->ch = curl_init();\n\t\t\tcurl_setopt( $this->ch, CURLOPT_URL, \t\t\t\t$this->config['postUrl'] );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_RETURNTRANSFER, \tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_FOLLOWLOCATION, \tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_TIMEOUT, \t\t\t10);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_HEADER, \t\t\tFALSE ); \n\t\t\tcurl_setopt( $this->ch, CURLOPT_POST, \t\t\t\tcount( $this->getFieldsAsString() ) );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_POSTFIELDS, \t\t$this->getFieldsAsString() ); \n\t\t\tcurl_setopt( $this->ch, CURLOPT_REFERER, \t\t\t$this->config['referrerUrl'] );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_USERAGENT, \t\t\t$this->config['userAgent']);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_AUTOREFERER, \t\tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_VERBOSE, \t\t\tFALSE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_COOKIEJAR, \t\t\t$this->config['cookieFile']);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "protected function init()\n {\n $this->curl = curl_init();\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n // this line makes it work under https\n curl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_REFERER, $this->referer);\n if (isset($this->encoding)) {\n curl_setopt($this->curl, CURLOPT_ENCODING, $this->encoding);\n }\n if ($this->omitSSLVerification) {\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n if (isset($this->userAuthData)) {\n curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->curl, CURLOPT_USERPWD, $this->userAuthData);\n }\n if ($this->proxy != '') {\n curl_setopt($this->curl, CURLOPT_PROXY, $this->proxy);\n if ($this->proxyType == self::PROXY_TYPE_SOCKS4) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);\n } else if ($this->proxyType == self::PROXY_TYPE_SOCKS5) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);\n }\n }\n $this->errorno = false;\n $this->error = false;\n }", "private function setUrl()\n {\n curl_setopt($this->curl, CURLOPT_URL, $this->server);\n }", "protected function _setCurlOpts() {\n $this->_setCurlOptArray($this->_getCurlOpts());\n }", "function init_curl()\n\t{\n\t\t$this->ch = curl_init();\n\t\t$user_agent = $this->user_agent;\n\t\t$header[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header[] = \"Accept-Language: en-US\";\n\t\t$header[] = \"User-Agent: \" . $user_agent;\n\t\t$header[] = \"Connection: Keep-Alive\";\n\t\t$header[] = \"Pragma:\";\n\t\t$header[] = \"Expect:\";\n\t\t$header[] = \"Content-Type:\";\n\n\t\t$this->header = $header;\n\n\t\t$header2[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header2[] = \"Accept-Language: en-US\";\n\t\t$header2[] = \"User-Agent: \" . $user_agent;\n\t\t$header2[] = \"Connection: Keep-Alive\";\n\t\t$header2[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header2[] = \"Pragma:\";\n\t\t$header2[] = \"Expect:\";\n\n\t\t$this->header_post = $header2;\n\n\t\t$header3[] = \"Accept: application/json, text/javascript, */*\";\n\t\t$header3[] = \"Accept-Language: en-US\";\n\t\t$header3[] = \"User-Agent: \" . $user_agent;\n\t\t$header3[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header3[] = \"x-requested-with: XMLHttpRequest\";\n\t\t$header3[] = \"Connection: Keep-Alive\";\n\t\t$header3[] = \"Pragma:\";\n\t\t$header3[] = \"Expect:\";\n\n\t\t$this->header_json = $header3;\n\n\t\t$header4[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header4[] = \"Accept-Language: en-US\";\n\t\t$header4[] = \"User-Agent: \" . $user_agent;\n\t\t$header4[] = \"Connection: Keep-Alive\";\n\t\t$header4[] = \"Content-Type: multipart/form-data\";\n\t\t$header4[] = \"Pragma:\";\n\t\t$header4[] = \"Expect:\";\n\n\t\t$this->header_multipart = $header4;\n\n\t\tcurl_setopt($this->ch, CURLOPT_USERAGENT, $user_agent);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\t//curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip, deflate');\n\t\tcurl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_VERBOSE, $this->opt[\"verbose\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_TIMEOUT, $this->opt[\"timeout\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tif ($this->opt[\"use_proxy\"] && isset($proxy))\n\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $proxy);\n\t\t//print \"Set Curl Proxy $proxy\\n\";\n\t\t//curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, \"ocbeta:echo11ra\");\n\n\t\t//if ($this->opt[\"use_ips\"])\n\t\t//curl_setopt($this->ch, CURLOPT_INTERFACE, $this->get_ip());\n\t}", "private function initCurl()\n\t{\n\t\t$this->_curl = curl_init();\n\t\t//TODO: delete useless lines\n\t\tcurl_setopt ($this->_curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt ($this->_curl, CURLOPT_TIMEOUT, 4000);\n\t\tcurl_setopt ($this->_curl, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEJAR, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEFILE, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_POST, 1);\n\t}", "public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }", "function __construct() {\n\n $this->curl = curl_init();\n\n curl_setopt_array($this->curl, [\n CURLOPT_USERAGENT => 'FeedImport',\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_ENCODING => 'UTF-8'\n ]);\n\n }", "public function initialize()\n {\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->ch, CURLOPT_MAXREDIRS, 5);\n curl_setopt($this->ch, CURLOPT_USERAGENT, self::$USER_AGENT); \n // curl_setopt($this->ch, CURLOPT_COOKIEFILE, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_COOKIEJAR, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_HEADER, TRUE);\n return $this;\n }", "public function __construct() {\n $this->_handle = curl_init();\n $this->_opt(CURLOPT_HEADER, false);\n $this->_opt(CURLOPT_RETURNTRANSFER, true);\n }", "public function __construct()\n {\n $this->curl = curl_init();\n\n curl_setopt_array(\n $this->curl,\n array(\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 60,\n CURLOPT_CONNECTTIMEOUT => 10,\n CURLOPT_VERBOSE => true,\n CURLOPT_HEADERFUNCTION => array($this, 'header'),\n CURLOPT_ENCODING => 'gzip,deflate',\n CURLOPT_USERAGENT => 'doi-index/0.1 (+http://goo.gl/AejefJ)',\n CURLOPT_COOKIEFILE => '/tmp/cookies.txt',\n CURLOPT_COOKIEJAR => '/tmp/cookies.txt',\n )\n );\n }", "protected function _preConfig()\n {\n parent::_preConfig();\n if (extension_loaded('curl')) {\n $this->_Solar_Http_Request['adapter'] = 'Solar_Http_Request_Adapter_Curl';\n }\n }", "public function __construct()\n\t{\n\t\t$this->curl = curl_init();\n\t}", "protected function init()\n {\n // To start with, disable FOLLOWLOCATION since we'll handle it\n curl_setopt($this->curlHandle, \\CURLOPT_FOLLOWLOCATION, false);\n\n // Always return the transfer\n curl_setopt($this->curlHandle, \\CURLOPT_RETURNTRANSFER, true);\n\n // Force IPv4, since this class isn't yet comptible with IPv6\n $curlVersion = curl_version();\n\n if ($curlVersion['features'] & \\CURLOPT_IPRESOLVE) {\n curl_setopt($this->curlHandle, \\CURLOPT_IPRESOLVE, \\CURL_IPRESOLVE_V4);\n }\n }", "private function initPostRequest()\n {\n $this\n ->addCurlOption(CURLOPT_URL, $this->getUrl())\n ->addCurlOption(CURLOPT_CUSTOMREQUEST, HttpMethodResolver::HTTP_POST)\n ->addCurlOption(CURLOPT_POSTFIELDS, $this->getQuery())\n ;\n }", "abstract protected function composeRequestCurlOptions($method, $url, array $params);", "function Curl($url = false , array $data = array()){\n\n\t\tif($url !== false){\n\n\t\t\t$build[CURLOPT_POST] = 1;\n\t\t\t$build[CURLOPT_POSTFIELDS] = http_build_query($data, '', '&');\n\n\t\t\treturn new curlseton($url,$build);\n\t\t\t\n\t\t}\n\t}", "private function setCurlOptions(&$ch, $headers = array())\n {\n curl_setopt($ch, CURLOPT_USERPWD, $this->authentication);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_BUFFERSIZE, 4096);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 25);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n }", "public function __construct(){\n $this->connection = curl_init();\n }", "public function curl_connect($curlUrl = null, $curl_options = null){\n\t\tif (!$this->curl_connection){\n\t\t\t$header = array();\n\t\t\t$header[0] = \"Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\";\n\t\t\t$header[] = \"Cache-Control: max-age=0\";\n\t\t\t$header[] = \"Connection: keep-alive\";\n\t\t\t$header[] = \"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\";\n\t\t\t$header[] = \"Accept-Language: en-us,en;q=0.5\";\n\t\t\t$header[] = \"User-Agent: Patron conversion tool\";\n\n\t\t\t$cookie = $this->getCookieJar();\n\n\t\t\t$this->curl_connection = curl_init($curlUrl);\n\t\t\t$default_curl_options = array(\n\t\t\t\t\tCURLOPT_CONNECTTIMEOUT => 20,\n\t\t\t\t\tCURLOPT_TIMEOUT => 60,\n\t\t\t\t\tCURLOPT_HTTPHEADER => $header,\n\t\t\t\t//CURLOPT_USERAGENT => 'User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0',\n\t\t\t\t//CURLOPT_USERAGENT => \"User-Agent:Pika \" . $gitBranch,\n\t\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t\t\t\tCURLOPT_FOLLOWLOCATION => true,\n\t\t\t\t\tCURLOPT_UNRESTRICTED_AUTH => true,\n\t\t\t\t\tCURLOPT_COOKIEJAR => $cookie,\n\t\t\t\t\tCURLOPT_COOKIESESSION => false,\n\t\t\t\t\tCURLOPT_FORBID_REUSE => false,\n\t\t\t\t\tCURLOPT_HEADER => false,\n\t\t\t\t\tCURLOPT_AUTOREFERER => true,\n\t\t\t\t// CURLOPT_HEADER => true, // debugging only\n\t\t\t\t// CURLOPT_VERBOSE => true, // debugging only\n\t\t\t);\n\n\t\t\tif ($curl_options) {\n\t\t\t\t$default_curl_options = array_merge($default_curl_options, $curl_options);\n\t\t\t}\n\t\t\tcurl_setopt_array($this->curl_connection, $default_curl_options);\n\t\t}else{\n\t\t\t//Reset to HTTP GET and set the active URL\n\t\t\tcurl_setopt($this->curl_connection, CURLOPT_HTTPGET, true);\n\t\t\tcurl_setopt($this->curl_connection, CURLOPT_URL, $curlUrl);\n\t\t}\n\n\t\treturn $this->curl_connection;\n\t}", "protected function curlOptions($action, $request)\n {\n $options = \n\t\t\t$this->options['curlopts'] + \n\t\t\tarray(\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => true,\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\tCURLOPT_HTTPHEADER => $this->buildHeaders($action),\n\t\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\t\tCURLOPT_HTTPAUTH => ((!empty($this->options['token'])) ? CURLAUTH_BEARER : CURLAUTH_BASIC | CURLAUTH_NTLM)\n\t\t\t); \n\n\t\tif(!empty($this->options['user']) && !empty($this->options['password'])) {\n\n\t\t\t$options[CURLOPT_USERPWD] = $this->options['user'] . ':' . $this->options['password']; \n\n\t\t}\n\n // We shouldn't allow these options to be overridden.\n $options[CURLOPT_HEADER] = true;\n $options[CURLOPT_POST] = true;\n $options[CURLOPT_POSTFIELDS] = $request;\n\n return $options;\n }", "protected function setCurlConstants(): void\n {\n $constants = [\n 'CURLOPT_SSLVERSION' => 32,\n 'CURL_SSLVERSION_TLSv1_2' => 6,\n 'CURLOPT_SSL_VERIFYPEER' => 64,\n 'CURLOPT_SSLCERT' => 10025,\n ];\n\n foreach ($constants as $key => $value) {\n if (!defined($key)) {\n define($key, $constants[$key]);\n }\n }\n }", "public function __construct()\n {\n $this->ch = curl_init();\n $this->initialize();\n }", "private function initCurlRequest() {\n $method = strtoupper($this->method);\n\n // Construct request\n $curlRequest = curl_init($this->finalUrl);\n curl_setopt($curlRequest, CURLOPT_RETURNTRANSFER, 1); // Return contents instead of boolean on exec\n curl_setopt($curlRequest, CURLOPT_BINARYTRANSFER, 1);\n curl_setopt($curlRequest, CURLOPT_HEADER, 1); // Return headers in response\n if ($this->followRedirects)\n curl_setopt($curlRequest, CURLOPT_FOLLOWLOCATION, true); // Follow redirects\n\n // Timeouts\n if ($this->connectTimeout !== null)\n curl_setopt($curlRequest, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);\n if ($this->executeTimeout !== null)\n curl_setopt($curlRequest, CURLOPT_TIMEOUT, $this->executeTimeout);\n\n // Method-specific\n $acceptsBody = false;\n if ($method === 'POST') {\n curl_setopt($curlRequest, CURLOPT_POST, 1);\n $acceptsBody = true;\n }\n\n // BUG: curl will attempt to set \"Transfer-Encoding: chunked\" header if doing a PUT\n // the workaround is to POST, using an X-HTTP-Method-Override instead.\n // BEWARE: This also requires the server to know how to handle this header.\n if (in_array($method, array('PUT', 'PATCH'))) {\n $this->headers[] = \"X-HTTP-Method-Override: $method\";\n curl_setopt($curlRequest, CURLOPT_POST, 1);\n $acceptsBody = true;\n }\n\n if ($method === 'DELETE')\n curl_setopt($curlRequest, CURLOPT_DELETE, 1);\n\n // Body\n $sendBlankExpect = false;\n if ($acceptsBody) {\n if ($this->files !== null && count($this->files) > 0) {\n $files = [];\n foreach ($this->files as $fileKey => $localPath)\n $files[$fileKey] = '@' . $localPath;\n \n curl_setopt($curlRequest, CURLOPT_POSTFIELDS, $files);\n\n // Workaround for CURL issue where curl_exec() returns both 100/CONTINUE and 200/OK separated by\n // blank line when using multipart form data.\n $sendBlankExpect = true;\n }\n elseif ($this->body) {\n // Default content-type of POST body\n if ($this->json && count(preg_grep('/content-type:/i', $this->headers)) === 0)\n $this->headers[] = 'Content-Type: application/json';\n\n // Seems to implicitly set CURLOPT_POST=1\n curl_setopt($curlRequest, CURLOPT_POSTFIELDS, $this->body);\n }\n }\n\n // Add headers\n $headers = $this->headers;\n if (!$headers)\n $headers = [];\n\n if ($this->json && count(preg_grep('/accept:/i', $headers)) === 0)\n $headers[] = 'Accept: application/json';\n if ($sendBlankExpect)\n $headers[] = 'Expect:';\n\n if (count($headers) > 0)\n curl_setopt($curlRequest, CURLOPT_HTTPHEADER, $headers);\n\n // Authenticate request\n if ($this->username) {\n curl_setopt($curlRequest, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curlRequest, CURLOPT_USERPWD, $this->username . ':' . $this->password);\n }\n\n return $curlRequest;\n }", "public function set_curl_options(array $curl_options = array())\n {\n }", "protected function transferDeprecatedCurlSettings() {}", "protected function setCurlOptions($parameters)\n {\n //create request\n $handle = curl_init($this->url);\n\n //set the payload\n curl_setopt($handle, CURLOPT_POST, true);\n curl_setopt($handle, CURLOPT_POSTFIELDS, $parameters);\n\n //return body only\n curl_setopt($handle, CURLOPT_HEADER, 0);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n\n //create errors on timeout and on response code >= 300\n curl_setopt($handle, CURLOPT_TIMEOUT, 45);\n curl_setopt($handle, CURLOPT_FAILONERROR, true);\n curl_setopt($handle, CURLOPT_FOLLOWLOCATION, false);\n\n //set up host and cert verification\n curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2);\n\n /**\n * NOTE on php.net\n * http://php.net/manual/en/function.curl-setopt.php\n * Your best bet is to not set this and let it use the default.\n * Setting it to 2 or 3 is very dangerous given the known vulnerabilities in SSLv2 and SSLv3.\n */\n // curl_setopt($handle, CURLOPT_SSLVERSION, 3);\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\n if($this->sslCACertPath) {\n curl_setopt($handle, CURLOPT_CAINFO, $this->sslCACertPath);\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, true);\n }\n\n return $handle;\n }", "private function init()\n {\n $this->curl = curl_init();\n }", "private function curl_get($url)\n {\n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "public function __construct()\n {\n $this->endpoint = config('foodcloud.endpoint');\n if ($this->endpoint[strlen($this->endpoint) - 1] == '/') {\n $this->endpoint = substr($this->endpoint, 0, strlen($this->endpoint) - 1);\n }\n $this->clientId = config('foodcloud.client_id');\n $this->clientSecret = config('foodcloud.client_secret');\n $this->grantType = config('foodcloud.grant_type');\n\n $this->curl = new cURL;\n }", "public function getCurlOptions()\n {\n return $this->curlOptions;\n }", "public function init()\n {\n $this->curl = curl_init();\n }", "private function create_curl($s_url, $post_params = array() )\n\t{\n\n\t\t$full_url = $this->settings['server'];\n if ($this->settings['port'] != '80') $full_url .= ':' . $this->settings['port'];\n $full_url .= $s_url ;\n\n\t\t$this->log( 'curl_init( ' . $full_url . ' )' );\n\t\t\n $post_value = Centrifuge::array_implode( '=', '&', $post_params );\n \n\t\t# Set cURL opts and execute request\n\t\t$ch = curl_init();\n\t\tif ( $ch === false )\n\t\t{\n\t\t\tthrow new CentrifugeException('Could not initialize cURL!');\n\t\t}\n\n\t\tcurl_setopt( $ch, CURLOPT_URL, $full_url );\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array ( \"Content-type: application/x-www-form-urlencoded\" ) );\t\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, $this->settings['timeout'] );\n\t\t\n $this->log( 'trigger POST: ' . $post_value );\n\n\t\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $post_value );\n \n\t\treturn $ch;\n\t}", "public function __construct() {\n $this->curl_handle = curl_init();\n curl_setopt($this->curl_handle, CURLOPT_TIMEOUT, $this->time_out);\n curl_setopt($this->curl_handle, CURLOPT_CONNECTTIMEOUT, $this->connect_time_out);\n curl_setopt($this->curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl_handle, CURLOPT_AUTOREFERER, true);\n curl_setopt($this->curl_handle, CURLOPT_FOLLOWLOCATION, true);\n }", "protected function _getCurlOpts() {\n return array(\n CURLOPT_TIMEOUT => 10,\n CURLOPT_RETURNTRANSFER => true,\n );\n }", "public function useCurl($useCurl)\n {\n $this->request->useCurl($useCurl);\n }", "private function registerCurl()\n {\n // Curl options\n $curlOptions = [\n [CURLOPT_RETURNTRANSFER, true],\n [CURLOPT_FOLLOWLOCATION, true],\n [CURLOPT_MAXREDIRS, 2],\n [CURLOPT_HTTPAUTH, CURLAUTH_BASIC],\n [CURLOPT_SSLVERSION, 6],\n [CURLOPT_SSL_VERIFYPEER, false],\n [CURLOPT_SSL_VERIFYHOST, false],\n ];\n\n // Register service via dependency injection\n $service = $this->services->register('crawler', '%crawler.class%');\n\n // Set options via setopt\n array_walk(\n $curlOptions,\n function (array $params) use ($service) {\n $service->addMethodCall('setopt', $params);\n }\n );\n\n $this->services->setParameter('crawler.class', 'Curl\\Curl');\n }", "public function applyCurlOptions($channel);", "protected function setRequestOptions() \n {\n // Set some default CURL options\n $this->optionManager->set('HEADER', true);\n $this->optionManager->set('RETURNTRANSFER', true);\n $this->optionManager->set('USERAGENT', $this->userAgent);\n\n if ($this->cookieFile) {\n $this->optionManager->set('COOKIEFILE', $this->cookieFile);\n $this->optionManager->set('COOKIEJAR', $this->cookieFile);\n }\n\n if ($this->followRedirects) {\n $this->optionManager->set('FOLLOWLOCATION', true);\n } \n\n $this->setCurlOptions(CURLINFO_HEADER_OUT, true);\n\n return $this;\n }", "private function initCurl() {\r\n\t\tif (isset($this->curl)) { return $this->curl; }\r\n\r\n\t\t$this->curl = curl_init();\r\n\r\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($this->curl, CURLOPT_TIMEOUT, $this->request_timeout);\r\n\r\n\t\tif (isset($this->cookie_jar)) {\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookie_jar);\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookie_jar);\r\n\t\t}\r\n\r\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, $this->is_multiple);\r\n\r\n\t\t# If a User Agent has been set, set the curl option\r\n\t\tif (isset($this->user_agent)) {\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\r\n\t\t}\r\n\r\n\t\t# We are not too concerned about the strictness of SSL when finding redirects\r\n\t\t# Without these, some SSL links just fail to return anything\r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); \r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 0); \r\n\r\n\t\t# We want the headers returned to us to follow redirects\r\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, true); \r\n\t\t$this->code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);\r\n\t\treturn $this->curl;\r\n\t}", "private function init() {\r\n\t\t$this->data = \"\";\r\n\t\t$this->header_vars = $this->cookies = array();\r\n\t\t$this->log = array(\"host\" => null, \"summary\" => null, \"request\" => array(), \"response\" => array(), \"set-cookie\" => array(), \"curlinfo\" => array());\r\n\t\t$this->options = array(\r\n\t\t\t\"CURLOPT_SSL_VERIFYPEER\" => true,\t\t\t\t\t\t\t\t\t\t\t# (ssl) enable ca root certificate checking\r\n\t\t\t\"CURLOPT_SSL_VERIFYHOST\" => 2,\t\t\t\t\t\t\t\t\t\t\t\t# (ssl) enable hostname checking in ssl certification\r\n\t\t\t\"CURLOPT_SSLVERSION\" => 6,\t\t\t\t\t\t\t\t\t\t\t\t\t# (ssl) default using tlsv1_2 instead of sslv2 and sslv3 for better security\r\n\t\t\t\"CURLOPT_CAINFO\" => __DIR__.DIRECTORY_SEPARATOR.\"cacert.pem\",\t\t\t\t# (ssl) updated ca root certificate (revision 2017-01-18 downloaded from https://curl.haxx.se/docs/caextract.html)\r\n\t\t\t\"CURLOPT_SAFE_UPLOAD\" => true,\t\t\t\t\t\t\t\t\t\t\t\t# (method, locked) better approach for file upload operation since php v5.5.0\r\n\t\t\t\"CURLOPT_PROTOCOLS\" => CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP,\t# (request, locked) allow specified protocols only\r\n\t\t\t\"CURLOPT_ENCODING\" => \"\",\t\t\t\t\t\t\t\t\t\t\t\t\t# (response) enable all supported compression\r\n\t\t\t\"CURLOPT_FAILONERROR\" => false,\t\t\t\t\t\t\t\t\t\t\t\t# (response) always returns response even if response is http 4xx-5xx error\r\n\t\t\t\"CURLOPT_RETURNTRANSFER\" => true,\t\t\t\t\t\t\t\t\t\t\t# (response, locked) always returns response as string instead of direct output\r\n\t\t\t\"CURLOPT_FOLLOWLOCATION\" => true,\t\t\t\t\t\t\t\t\t\t\t# (redirect) enable http 3xx redirection\r\n\t\t\t\"CURLOPT_MAXREDIRS\" => 5,\t\t\t\t\t\t\t\t\t\t\t\t\t# (redirect) maximum number of http 3xx redirection\r\n\t\t\t\"CURLOPT_AUTOREFERER\" => true,\t\t\t\t\t\t\t\t\t\t\t\t# (redirect) automatically set referer in case of redirection\r\n\t\t\t\"CURLOPT_CONNECTTIMEOUT\" => 15,\t\t\t\t\t\t\t\t\t\t\t\t# (timeout) connection timeout\r\n\t\t\t\"CURLOPT_TIMEOUT\" => 45,\t\t\t\t\t\t\t\t\t\t\t\t\t# (timeout) request timeout\r\n\t\t\t\"CURLOPT_REFERER\" => \"\",\t\t\t\t\t\t\t\t\t\t\t\t\t# (header) always begins with direct access\r\n\t\t\t\"CURLOPT_USERAGENT\" => \"LazyCurl/1.0\",\t\t\t\t\t\t\t\t\t\t# (header) default user agent\r\n\t\t\t\"CURLOPT_HEADERFUNCTION\" => array($this, \"header_handler\"),\t\t\t\t\t# (header, locked) callback function to extract incoming header\r\n\t\t\t\"CURLINFO_HEADER_OUT\" => true,\t\t\t\t\t\t\t\t\t\t\t\t# (header, locked) dump outgoing header to curlinfo\r\n\t\t);\r\n\t\t# disable ca root certificate checking in curl library before v7.24.0 (bundled openssl version is too old to check or load latest certificate)\r\n\t\t$curl_version = curl_version();\r\n\t\tif (version_compare($curl_version[\"version\"], \"7.24.0\", \"<\")) {\r\n\t\t\t$this->options[\"CURLOPT_SSL_VERIFYPEER\"] = false;\r\n\t\t\tunset($this->options[\"CURLOPT_CAINFO\"]);\r\n\t\t}\r\n\t\telseif (!file_exists($this->options[\"CURLOPT_CAINFO\"])) { unset($this->options[\"CURLOPT_CAINFO\"]); }\t\t\t\t\t# rename or delete the ca root certificate file in order to use system default\r\n\t\t# downgrade to tlsv1 instead of default action in curl library before v7.34.0 (the default behaviour will use sslv2 or sslv3 even if connection is normally rejected by target nowadays)\r\n\t\tif (version_compare($curl_version[\"version\"], \"7.34.0\", \"<\")) { $this->options[\"CURLOPT_SSLVERSION\"] = 1; }\r\n\t\t# ignore safe upload if not supported, this option is added in php 5.5 and removed in php 7.0\r\n\t\tif (version_compare(phpversion(), \"5.5.0\", \"<\") || version_compare(phpversion(), \"7.0.0\", \">=\")) { unset($this->options[\"CURLOPT_SAFE_UPLOAD\"]); }\r\n\t\t# Initialize Curl Session\r\n\t\t$this->ch = curl_init();\r\n\t\t$this->set_opt($this->options);\r\n\t}", "protected function defaultCurlOptions()\n\t{\n\t\treturn [\n\t\t\tCURLOPT_USERAGENT => Yii::$app->name . ' OAuth ' . $this->version . ' Client',\n\t\t\tCURLOPT_CONNECTTIMEOUT => 30,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t];\n\t}", "function funInitCurl(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 20);\n\n return $ch;\n}", "public function setUrl($url) {\n return curl_setopt($this->ch,CURLOPT_URL,$url);\n }", "private function setCurl($is_https = false)\n {\n // Init\n $this->curl = curl_init();\n // Sets basic parameters\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, isset($this->request->settings['timeout']) ? $this->request->settings['timeout'] : 100);\n // Set parameters to maintain cookies across sessions\n curl_setopt($this->curl, CURLOPT_COOKIESESSION, true);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, sys_get_temp_dir() . '/cookies_file');\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, sys_get_temp_dir() . '/cookies_file');\n curl_setopt($this->curl, CURLOPT_USERAGENT, 'OLEGNAX-PURCHASE-VERIFY');\n if ($is_https) {\n $this->setSSL();\n }\n }", "public function __construct($url)\n {\n $this->url = $url;\n $this->curl = curl_init($this->url);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLINFO_HEADER_OUT, true);\n curl_setopt($this->curl, CURLOPT_HEADER, 1);\n }", "function basicCurl($curlURL) {\n $url = $curlURL;\n $cURL = curl_init();\n curl_setopt($cURL, CURLOPT_URL, $url);\n curl_setopt($cURL, CURLOPT_HTTPGET, true);\n curl_setopt($cURL, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Accept: application/json'\n ));\n curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_USERAGENT, \"spider\");\n $result = curl_exec($cURL);\n \nif ($result === FALSE) {\n return \"cURL Error: \" . curl_error($cURL);\n} else {\n\treturn $result;\n}\n curl_close($cURL);\n \n}", "function __construct(){\n\t\t$this->key = TRELLO_DEV_KEY;\n\t\t$this->token = TRELLO_USER_TOKEN;\n\n\t\t$this->curl = new Curl();\n\t}", "public function __construct($url)\n {\n $this->curl = curl_init($url);\n }", "public function getUseCurl()\n\t{\n\t\treturn false;\n\t}", "private function setGetCurlOpts($endpoint) {\n // Convert the variables to header data\n $headersData = $this->setHeaders();\n // Define the endpoint\n $url = \"$this->base_url/$endpoint\";\n // Assign the variables to the request opts\n // TODO: Handle additional GET data \n $opts = array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => $url,\n CURLOPT_HTTPHEADER => $headersData\n );\n return $opts;\n }", "private function curl_post($url, $data)\n {\n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "private function just_curl_get_data($url,$data)\n {\n \n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n\n }", "public function __construct() {\n parent::__construct();\n\n $curlversion = curl_version();\n if (isset($curlversion['version']) && stripos($curlversion['version'], '7.35.') === 0) {\n // There is a flaw with curl 7.35.0 that causes problems with client reuse.\n $this->cacheclient = false;\n }\n }", "public function init(): void{\n $this->handler = curl_init();\n }", "public function Crysis2(){\n\t\t$this->_webRequest = isCurlInstalled();\n\t}", "function __construct()\n\t{\n\t /* product */\n\t \t$this->url = \"https://khachhang.giaohangtietkiem.vn\";\n\t\t\t$this->ghtk_token = \"E0Ffc300eDa222cE8F12c95586c4f7fa8aBBa0B5\";\n\t\t\t$this->return_transfer = true;\n\t $this->version = CURL_HTTP_VERSION_1_1;\n\t $this->currency = 'VND';\n \n\t}", "function updateCurl($url,$method){\r\n \r\n $curl = curl_init();\r\n // Set some options - we are passing in a useragent too here\r\n curl_setopt_array($curl, array(\r\n CURLOPT_RETURNTRANSFER => 1,\r\n CURLOPT_URL => $url,\r\n CURLOPT_USERAGENT => 'Codular Sample cURL Request'\r\n ));\r\n // Send the request & save response to $resp\r\n $resp = curl_exec($curl);\r\n // Close request to clear up some resources\r\n curl_close($curl);\r\n return $resp;\r\n \r\n \r\n}", "function curl_option(&$curl, $option, $value) {\n return curl_options($curl, [$option => $value]);\n}", "public function testBuildCURLGetRequestOptions()\n {\n $expectedOptions = [\n 10023 => [\n 'Authorization: ' . self::AUTH\n ],\n 42 => false,\n 10002 => self::URL,\n 19913 => true,\n 64 => false\n ];\n $actualOptions = $this->mRequest->buildCURLGetRequestOptions(self::URL, self::AUTH);\n $this->assertEquals($expectedOptions, $actualOptions);\n }", "function curl_options(&$curl, $options) {\n if (!curl_setopt_array($curl, $options)) {\n error('Failed to initialize cURL options for ' . spy($curl) . '.');\n }\n\n return $curl;\n}", "protected function setOptions($curl)\n {\n if(!curl_setopt($curl, CURLOPT_POST, $this->options->post))\n {\n throw new Exception('Could not set option [post]');\n }\n \n if(!curl_setopt($curl, CURLOPT_HEADER, $this->options->header))\n {\n throw new Exception('Could not set option [header]');\n }\n \n if(!curl_setopt($curl, CURLOPT_RETURNTRANSFER, $this->options->returnTransfer))\n {\n throw new Exception('Could not set option [return transfer]');\n }\n }", "private function setopt($url, $referer)\n {\n // Set request URL\n curl_setopt($this->handle, CURLOPT_URL, $url);\n\n // Remove any current HTTP headers\n curl_setopt($this->handle, CURLOPT_HEADER, 0);\n\n // Follow redirects, or not\n if ($this->redirs)\n {\n curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->handle, CURLOPT_MAXREDIRS, 10);\n }\n else\n {\n curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($this->handle, CURLOPT_MAXREDIRS, 0);\n }\n\n // Return data from transfer\n curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1);\n\n // Set UserAgent string\n curl_setopt($this->handle, CURLOPT_USERAGENT, $this->useragent);\n\n // If it's a HTTPS (SSL) URL, disable verification\n if (substr($url, 4, 1) == 's')\n {\n curl_setopt($this->handle, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, false);\n }\n\n // Set cookie jar\n if ($this->cookies)\n {\n curl_setopt($this->handle, CURLOPT_COOKIEJAR, $this->cookiejar);\n curl_setopt($this->handle, CURLOPT_COOKIEFILE, $this->cookiejar);\n }\n\n // If a proxy is set, use it\n if ($this->proxy != '')\n {\n curl_setopt($this->handle, CURLOPT_PROXY, $this->proxy);\n\n if ($this->proxypwd != '')\n {\n curl_setopt($this->handle, CURLOPT_PROXYUSERPWD, $this->proxypwd);\n }\n }\n\n // Set referrer if one is specified\n if ($referer != '')\n {\n curl_setopt($this->handle, CURLOPT_REFERER, $referer);\n }\n\n // XHR\n if ($this->xhr == true)\n {\n curl_setopt($this->handle, CURLOPT_HTTPHEADER, array(\"X-Requested-With: XMLHttpRequest\"));\n }\n }", "private function setOptionsFromRequest($curl, RequestInterface $request)\n {\n $options = array(\n CURLOPT_HTTP_VERSION => $request->getProtocolVersion() === '1.0' ? CURL_HTTP_VERSION_1_0 : CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => $request->getMethod(),\n CURLOPT_URL => (string) $request->getUri(),\n CURLOPT_HTTPHEADER => $this->getHeaders($request),\n CURLOPT_POSTFIELDS => (string) $request->getBody(),\n );\n\n curl_setopt_array($curl, $options);\n }", "public function get_curl_object() {\n if (!is_null($this->curl)) {\n return $this->curl;\n }\n\n // Connection to Solr is allowed to use 'localhost' and other potentially blocked hosts/ports.\n $this->curl = new \\curl(['ignoresecurity' => true]);\n\n $options = array();\n // Build the SSL options. Based on pecl-solr and general testing.\n if (!empty($this->config->secure)) {\n if (!empty($this->config->ssl_cert)) {\n $options['CURLOPT_SSLCERT'] = $this->config->ssl_cert;\n $options['CURLOPT_SSLCERTTYPE'] = 'PEM';\n }\n\n if (!empty($this->config->ssl_key)) {\n $options['CURLOPT_SSLKEY'] = $this->config->ssl_key;\n $options['CURLOPT_SSLKEYTYPE'] = 'PEM';\n }\n\n if (!empty($this->config->ssl_keypassword)) {\n $options['CURLOPT_KEYPASSWD'] = $this->config->ssl_keypassword;\n }\n\n if (!empty($this->config->ssl_cainfo)) {\n $options['CURLOPT_CAINFO'] = $this->config->ssl_cainfo;\n }\n\n if (!empty($this->config->ssl_capath)) {\n $options['CURLOPT_CAPATH'] = $this->config->ssl_capath;\n }\n }\n\n // Set timeout as for Solr client.\n $options['CURLOPT_TIMEOUT'] = !empty($this->config->server_timeout) ? $this->config->server_timeout : '30';\n\n $this->curl->setopt($options);\n\n if (!empty($this->config->server_username) && !empty($this->config->server_password)) {\n $authorization = $this->config->server_username . ':' . $this->config->server_password;\n $this->curl->setHeader('Authorization: Basic ' . base64_encode($authorization));\n }\n\n return $this->curl;\n }", "public function __construct(\n $url = null,\n $options = [\n CURLOPT_USERAGENT => \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\",\n CURLOPT_RETURNTRANSFER => true\n ]\n )\n {\n $this->ch = curl_init();\n if(!is_null($url))\n $this->setOption(CURLOPT_URL, $url);\n if(!is_null($options)) {\n foreach ($options as $key => $value) {\n $this->setOption($key, $value);\n }\n }\n }", "function curl_open($url = null, $request = []) {\n if ($request) {\n $url .= '?' . http_build_query($request);\n }\n\n $curl = curl_init($url);\n\n if (!$curl) {\n error('Failed to open cURL resource for ' . spy($url) . '.');\n }\n\n return curl_options($curl, [CURLOPT_RETURNTRANSFER => 1, CURLOPT_TIMEOUT => 60]);\n}", "public function access_curl(){\n\t\t$type = $this->_type;\n\n\t\tif($type == false){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tswitch($type) {\n\t\t\t\tcase 'domain':\n\t\t\t\t\treturn $this->_checkDomainCURL();\n\t\t\t\tbreak;\n\t\t\t\tcase 'data':\n\t\t\t\t\treturn $this->_ProcessDataCurl();\n\t\t\t\tbreak;\n\t\t\t\tcase 'slice':\n\t\t\t\t\treturn $this->_sliceCurlData();\n\t\t\t\tbreak;\n\t\t\t\tcase 'favicon':\n\t\t\t\t\treturn $this->_getFavicon();\n\t\t\t\tbreak;\n\t\t\t\tcase 'loop-favicon':\n\t\t\t\t\treturn $this->_loopFavicon();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->_ProcessDataCurl();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function __construct($host, $user = 'cdrapi', $pass = 'cdrapi123', $port = '8443') {\n $this->host = $host;\n $this->port = $port;\n $this->user = $user;\n $this->pass = $pass;\n $this->curl = curl_init();\n $cookie_jar = tempnam('/tmp','cookie');\n /*curl_setopt($this->curl, CURLOPT_CAINFO, dirname(__FILE__).\"/cacert.pem\");*/\n //curl_setopt($auth_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($this->curl, CURLOPT_HEADER, 1); \n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->curl, CURLOPT_USERPWD, $this->user . \":\" . $this->pass);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, TRUE); \n curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 1000); \n }", "function __construct() { \n if(!extension_loaded('curl'))\n exit('Fatal error:The system does not extend php_curl.dll.');\n $this-> ch = curl_init();\n $this-> reset();\n }", "private function sendQueryByCurl() {\n $this->curl = curl_init();\n\n // JSON data request\n $jsonData = $this->getJsonData();\n\n // some params\n $urlParams = $this->getParamsUrlFormat();\n\n $this->setCurlOpts($this->curl, $jsonData, $urlParams);\n $this->setResult(curl_exec($this->curl));\n $this->setHttpCode(curl_getinfo($this->curl, CURLINFO_HTTP_CODE));\n\n curl_close($this->curl);\n }", "public function initCurlHandler()\r\n {\r\n $this->curlHandler = curl_init();\r\n }", "private function build_curl_handle($url) {\n if (!function_exists('curl_init')) {\n die('the curl library is required for this client to work');\n }\n $ch = curl_init();\n if (!$ch) {\n die('could not initialize curl');\n }\n curl_setopt($ch, CURLOPT_URL, $url);\n // Method and headers can be different, but these are always the same.\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $this->auth_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n return $ch;\n }", "function curl_request(&$curl, $request, $post = true) {\n if ($post) {\n return curl_option($curl, CURLOPT_POSTFIELDS, $request);\n }\n\n $url = url_strip(curl_url($curl));\n $request = http_build_query(array_merge(url_request($url), $request));\n\n return curl_url($curl, \"$url?$request\");\n}", "function http($url, $method, $postfields = NULL, $headers = array()) {\n $this->http_info = array();\n $ci = curl_init();\n /* Curl settings */\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n switch ($method) {\n case 'POST':\n curl_setopt($ci, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n $this->postdata = $postfields;\n }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n if (isset($this->access_token) && $this->access_token)\n $headers[] = \"Authorization: OAuth2 \" . $this->access_token;\n if (!empty($this->remote_ip)) {\n if (defined('SAE_ACCESSKEY')) {\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\n } else {\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\n }\n } else {\n if (!defined('SAE_ACCESSKEY')) {\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\n }\n }\n curl_setopt($ci, CURLOPT_URL, $url);\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);\n $response = curl_exec($ci);\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n $this->url = $url;\n if ($this->debug) {\n echo \"=====post data======\\r\\n\";\n var_dump($postfields);\n echo \"=====headers======\\r\\n\";\n print_r($headers);\n echo '=====request info=====' . \"\\r\\n\";\n print_r(curl_getinfo($ci));\n echo '=====response=====' . \"\\r\\n\";\n print_r($response);\n }\n curl_close($ci);\n return $response;\n }", "public function execute(Carerix_Api_Rest_Request $request)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $request->getUrl());\n // This constant is not available when open_basedir or safe_mode are enabled.\n// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // [AY] CURLOPT_VERBOSE, CURLOPT_HEADER required for capturing response headers\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLINFO_HEADER_OUT, 1); // [AY] required for capturing request headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Expect:']);\n curl_setopt($ch, CURLOPT_USERAGENT, __CLASS__);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n $proxy = $request->getProxy();\n if ($proxy) {\n $proxy = parse_url($proxy);\n curl_setopt($ch, CURLOPT_PROXY, $proxy['host']);\n if (array_key_exists('port', $proxy)) {\n curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']);\n }\n }\n\n $username = $request->getUsername();\n $password = $request->getPassword();\n\n if ($username && $password) {\n curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);\n }\n\n switch ($request->getMethod()) {\n case self::POST:\n case self::PUT:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getMethod());\n switch ($request->getResponseType()) {\n case 'xml':\n $contentType = 'application/xml';\n break;\n\n case 'json':\n $contentType = 'application/json';\n break;\n\n case 'sencha':\n case 'js':\n $contentType = 'application/javascript';\n break;\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: ' . $contentType]);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request->getBody());\n break;\n case self::DELETE:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n case self::GET:\n default:\n break;\n }\n\n $response = curl_exec($ch);\n\n $this->last_request = curl_getinfo($ch, CURLINFO_HEADER_OUT);\n $this->last_request .= $request->getBody();\n // [AY] in case of 204 No content response response is always empty\n if ($response === false) {\n $errorNumber = curl_errno($ch);\n $error = curl_error($ch);\n curl_close($ch);\n\n throw new Exception($errorNumber . ': ' . $error);\n }\n\n $response = $this->parseResponse($response);\n $this->last_response = $response;\n\n [$header, $body] = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (!in_array($code, ['200', '201', '204'])) {\n throw new Carerix_Api_Rest_Exception($body, $code);\n }\n curl_close($ch);\n\n return $body;\n }", "public function setupOption($k, $v){\n if($this->isCurlSet()){\n curl_setopt($this->curl, $k, $v);\n } else {\n throw new SdkException(\"cURL instance is not set when calling setup Option.\");\n }\n }", "public function __construct()\n\t{\n\t\t$this->instance =& get_instance();\n\n\t\t$this->options = array();\n\n\t\t$this->ch = curl_init();\n\n\t\t$this->header_info = array();\n\n $this->result = \"\";\n\t}", "protected function configure()\n {\n $this->addArgument(\n 'environment', InputArgument::REQUIRED | InputArgument::OPTIONAL, 'What environment to run the script in',\n 'production'\n );\n $this->_httpClient = new Client();\n }", "function funSetCurlPath($ch, $path){\n curl_setopt($ch, CURLOPT_URL, $path);\n\n return $ch;\n}", "private static function PrepareRequest($url = \"\")\n\t{\n\t\t$request = curl_init();\n\t\tcurl_setopt($request, CURLOPT_URL,\t\t\t\tempty($url) ? self::URL : $url);\n\t\tcurl_setopt($request, CURLOPT_HEADER,\t\t\ttrue);\n\t\tcurl_setopt($request, CURLOPT_RETURNTRANSFER,\ttrue);\n\t\tcurl_setopt($request, CURLOPT_ENCODING,\t\t\t\"gzip\");\n\t\tcurl_setopt($request, CURLOPT_USERAGENT,\t\tself::UserAgent);\n\t\tif ( !empty(self::$cookie) )\n\t\t\tcurl_setopt($request, CURLOPT_COOKIE,\t\tself::$cookie);\n\t\treturn $request;\n\t}", "private function create_curl($s_url, $request_method = 'GET', $query_params = array() )\n\t{\n\t\t# Create the signed signature...\n\t\t$signed_query = Pusher::build_auth_query_string(\n\t\t\t$this->settings['auth_key'],\n\t\t\t$this->settings['secret'],\n\t\t\t$request_method,\n\t\t\t$s_url,\n\t\t\t$query_params);\n\n\t\t$full_url = $this->settings['server'] . ':' . $this->settings['port'] . $s_url . '?' . $signed_query;\n\t\t\n\t\t# Set cURL opts and execute request\n\t\t$ch = curl_init();\n\t\tif ( $ch === false )\n\t\t{\n\t\t\tthrow new PusherException('Could not initialise cURL!');\n\t\t}\n\t\t\n\t\tcurl_setopt( $ch, CURLOPT_URL, $full_url );\n\t\tcurl_setopt( $ch, CURLOPT_HTTPHEADER, array ( \"Content-Type: application/json\" ) );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, $this->settings['timeout'] );\n\t\t\n\t\treturn $ch;\n\t}", "private function setRequestOptions()\n {\n $this->client = new Client(['base_uri' => $this->baseUrl]);\n }", "protected function connect()\n {\n $url = $this->createUrl(\"\");\n // create curl resource\n $this->connection = curl_init();\n\n // set url\n curl_setopt($this->connection, CURLOPT_URL, $url);\n\n //return the transfer as a string\n curl_setopt($this->connection, CURLOPT_RETURNTRANSFER, 1);\n\n }", "public function configure()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/clusterGetServerStatus');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\ServersList());\n }", "private function setURL($url)\r\n\t{\r\n\t\tcurl_setopt($this->getConnection(), CURLOPT_URL, $url);\r\n\t}", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n $this->http_info = array();\r\n $ci = curl_init();\r\n /* Curl settings */\r\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r\n if (version_compare(phpversion(), '5.4.0', '<')) {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\r\n } else {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);\r\n }\r\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\r\n switch ($method) {\r\n case 'POST':\r\n curl_setopt($ci, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n $this->postdata = $postfields;\r\n }\r\n break;\r\n case 'DELETE':\r\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url = \"{$url}?{$postfields}\";\r\n }\r\n }\r\n\r\n if ( isset($this->access_token) && $this->access_token )\r\n $headers[] = \"Authorization: OAuth2 \".$this->access_token;\r\n\r\n if ( !empty($this->remote_ip) ) {\r\n if ( defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\r\n } else {\r\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\r\n }\r\n } else {\r\n if ( !defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n }\r\n }\r\n curl_setopt($ci, CURLOPT_URL, $url );\r\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n $response = curl_exec($ci);\r\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n $this->url = $url;\r\n\r\n if ($this->debug) {\r\n echo \"=====post data======\\r\\n\";\r\n var_dump($postfields);\r\n\r\n echo \"=====headers======\\r\\n\";\r\n print_r($headers);\r\n\r\n echo '=====request info====='.\"\\r\\n\";\r\n print_r( curl_getinfo($ci) );\r\n\r\n echo '=====response====='.\"\\r\\n\";\r\n print_r( $response );\r\n }\r\n curl_close ($ci);\r\n return $response;\r\n }", "function __construct($csec=null,$tsec=null){\t\t$this->key=rawurlencode($csec?:$this->csec).\"&\".rawurlencode($tsec?:$this->tsec);\r\n\t\t\r\n\t\t$this->curl=[\r\n\t\t\tCURLOPT_HEADER => 0,\r\n CURLOPT_CAINFO => __DIR__ .'/cacert.pem',\r\n CURLOPT_CONNECTTIMEOUT => 5,\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_SSL_VERIFYHOST => 2,\r\n CURLOPT_SSL_VERIFYPEER => true,\r\n CURLOPT_TIMEOUT => 5\r\n\t\t];\r\n\t\t\r\n\t\t\r\n\t\t$this->oauth=[\r\n \"oauth_version\" => '1.0',\r\n\t\t\t'oauth_signature_method'=> 'HMAC-SHA1',\r\n \"oauth_consumer_key\" => $this->ckey,\r\n\t\t\t'oauth_token' => $this->tkey\r\n\t\t];\r\n\t}", "public function init()\n {\n $this->_session = curl_init();\n }", "public function setCurlEngineType()\n {\n $this->getEngine()->setType(\"curl\");\n }" ]
[ "0.80188376", "0.70171314", "0.6930479", "0.68231344", "0.6760573", "0.6736323", "0.6723858", "0.6671174", "0.66328025", "0.6618768", "0.6610453", "0.6592722", "0.65157074", "0.64736676", "0.6439512", "0.6437452", "0.6386511", "0.6371556", "0.6344599", "0.63423115", "0.6339289", "0.62587494", "0.6238401", "0.6187338", "0.61708313", "0.61683947", "0.6168356", "0.6149832", "0.61359924", "0.6123321", "0.61208683", "0.6101397", "0.60878515", "0.6076971", "0.6075189", "0.60667795", "0.6053971", "0.60530484", "0.60335803", "0.60306823", "0.6022222", "0.6012021", "0.5999035", "0.59918576", "0.59722143", "0.5966351", "0.5943316", "0.59329164", "0.5930301", "0.592491", "0.592246", "0.5914674", "0.5909557", "0.5909466", "0.5906124", "0.5897633", "0.5881691", "0.5879171", "0.58697397", "0.5851743", "0.5845352", "0.58369344", "0.5821459", "0.58017015", "0.57966965", "0.5791563", "0.57876164", "0.5779299", "0.57788587", "0.57702136", "0.57659537", "0.5761849", "0.575591", "0.5743048", "0.5742752", "0.573843", "0.5716011", "0.5713194", "0.5712974", "0.57119834", "0.57031393", "0.56760854", "0.5635001", "0.561092", "0.5610887", "0.560135", "0.56009066", "0.55947685", "0.558572", "0.5580812", "0.5577196", "0.55683726", "0.55644625", "0.555833", "0.55581534", "0.55542225", "0.55537015", "0.55518967", "0.5550185", "0.5545542" ]
0.6055862
36
This part is save houses data from backend
public function saveHousesDataInternal($data) { $now = date('Y-m-d H:i:s'); $id = intval(@$data['id']); // 获取旧数据 if ($id > 0) { $oldInfo = $this->find($id); if (!$oldInfo) { return array('code' => -1, 'msg' => '文章不存在'); } $old_thumbnail = $oldInfo['thumnail']; } else { $data['admin_id'] = session('id'); $old_thumbnail = ''; } // 移动标题图 if ($data['thumnail']) { // 确保从tmp中移动出thumnail // 如果之前上传过缩略图,删除 if ($old_thumbnail && $data['thumnail'] != $old_thumbnail) { deleteFile($old_thumbnail); } if (false === ($data['thumnail'] = $this->_move_thumbnail($data['thumnail']))) { return array('code' => -1, 'msg' => '移动缩略图位置失败'); } } $data['cdate'] = $now; $data['mdate'] = $now; // Generate DSN for current situtation //$data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']); $data['dsn'] = $this->gen_house_dsn_new(); // 保存数据 if ($data['id']) { $lines = $this->save($data, array('id' => $data['id'])); if ($lines !== false) { $res = true; } } else { $insertId = $this->insertGetId($data); if ($insertId) { $data['id'] = $insertId; $res = true; } } if (!$res) { return array('code' => -1, 'msg' => $this->getDbError()); } return array('code' => 0, 'msg' => 'ok', 'data' => $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveHousesData($data) {\n\t\t$now = date('Y-m-d H:i:s');\n\t\t$data['mdate'] = $now;\n\t\tfile_put_contents('_save_house_model.txt', json_encode($data));\n\t\tif (isset($data['id']) && intval($data['id'] <= 0)) {\n\t\t\tunset($data['id']);\n\t\t}\n\t\tif (!isset($data['id'])) {\n\t\t\t// if (empty($data['Housesname'])) {\n\t\t\t// \treturn ['code' => -1, 'msg' => '请提供用户名'];\n\t\t\t// }\n\t\t\t// if (empty($data['password'])) {\n\t\t\t// \treturn ['code' => -1, 'msg' => '请提供密码'];\n\t\t\t// }\n\t\t\t// if (self::get(['Housesname' => $data['Housesname']])) {\n\t\t\t// \treturn ['code' => -1, 'msg' => '用户名已存在'];\n\t\t\t// }\n\t\t\t$data['cdate'] = $now;\n //添加房源编号new\n// $data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']);\n $data['dsn'] = $this->gen_house_dsn_new();\n $this->data = $data;\n\n\t\t\t//访问频繁\n\t\t\tif (cache('add_house_'.$data['user_id'])) {\n\t\t\t $left_second = time() - cache('add_house_'.$data['user_id']);\n return ['code' => -1, 'msg' => '访问过于频繁,请'.$left_second.'s后再试'];\n }\n\n\t\t\t//防并发操作 解决ID重复的问题 #A#\n $fp = fopen(RUNTIME_PATH.\"lock.txt\", \"w+\");\n if(flock($fp,LOCK_EX | LOCK_NB))\n {\n //..处理订单\n flock($fp,LOCK_UN);\n\n $result = $this->save();\n\n if ($result) {\n cache('add_house_'.$data['user_id'], time(),10);\n }\n }else{\n fclose($fp);\n return ['code' => -1, 'msg' => '系统繁忙,请稍后再试'];\n }\n fclose($fp);\n //防并发操作 #A#\n\n\t\t\tif (false === $result) {\n\t\t\t\treturn ['code' => -1, 'msg' => '添加数据失败'];\n\t\t\t}\n\t\t\t$data['id'] = $this->id;\n\t\t\t\n\t\t} else {\n\t\t\t$data['id'] = intval($data['id']);\n\t\t\tif ($data['id'] <= 0) {\n\t\t\t\treturn ['code' => -1, 'msg' => 'id 必须大于0'];\n\t\t\t}\n\t\t\t// if (self::get(['Housesname' => $data['Housesname'], 'id' => ['neq', $data['id']]])) {\n\t\t\t// \treturn ['code' => -1, 'msg' => '用户名已存在'];\n\t\t\t// }\n\t\t\t// if (isset($data['password']) && $data['password'] == '') {\n\t\t\t// \tunset($data['password']);\n\t\t\t// }\n\t\t\t$result = $this->save($data, ['id' => $data['id']]);\n\t\t\tif ($result === false) {\n\t\t\t\treturn ['code' => -1, 'msg' => '修改数据失败'];\n\t\t\t}\n\t\t}\n\t\t//添加房源编号\n //$this->set_house_dsn($data['id']);\n\t\treturn ['code' => 0, 'msg' => 'ok', 'data' => $data];\n\t}", "public function saveData()\r\n {\r\n \r\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "private function saveData()\n { \n // Save form data in session\n if (count($this->post) > 0) {\n $_SESSION['gentlesource_voting_configuration'] = $this->post;\n $this->data = $this->post;\n $this->votingOptions = $this->post['votingOptions'];\n } else {\n if (isset($_SESSION['gentlesource_voting_configuration'])) {\n $this->data = $_SESSION['gentlesource_voting_configuration'];\n $this->votingOptions = $this->data['votingOptions'];\n }\n }\n }", "public function store(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'title' => 'required|max:250',\n\t\t\t'nr_of_rooms' => 'required|integer|min:0',\n\t\t\t'nr_of_beds' => 'required|integer|min:0',\n\t\t\t'nr_of_bathrooms' => 'integer|min:0|nullable',\n\t\t\t'square_mt' => 'integer|min:1|nullable',\n\t\t\t'address' => 'required',\n\t\t\t'image_path' => 'image|nullable',\n\t\t\t'description' => 'max:2000|nullable',\n\t\t]);\n\n\t\t//TODO: address manipulation\n\t\t$houseData = $request->all();//in mezzo ci sono sia le cose che vanno in houses che quelle che vanno in services -> SEPARARE I CAMPI!\n\t\t$newHouse = new House();\n\t\t$newHouse->fill($houseData);\n\t\tif(array_key_exists('image_path', $houseData)) {\n\t\t\t$newHouse->image_path = Storage::put('uploads', $houseData['image_path']);\n\t\t}\n\t\t$newHouse->save();\n\t\tif (!empty($houseData['services_ids'])) {\n\t\t\t$newHouse->services()->sync($houseData['services_ids']);\n \t}\n\n\t\treturn redirect()->route('upr.houses.index');\n\n }", "public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save() {}", "public function save() {}", "public function save() {\n\t\t\t\n\t\t}", "public function save() {}", "public function saveDetails() \n {\n // Save the author list.\n $this->authorList->setValue('bookId', $this->bookId);\n $this->authorList->save();\n \n // Save the booklanguage list.\n $this->bookLanguageList->setValue('bookId', $this->bookId);\n $this->bookLanguageList->save();\n }", "public function store(Request $request)\n {\n //Validation\n //File Upload if file exist\n //Store Data\n $house = new House;\n $house->user_id= request('name'); \n $house->township_id = request('township');\n $house->type_id = request('type');\n $house->title = request('title');\n $house->area= request('area'); \n $house->price = request('price');\n $house->room = request('room');\n $house->location= request('location'); \n $house->image = request('image');\n $house->phone = request('phone');\n $house->status = request('status');\n $house->description = request('des');\n $house->save();\n return redirect()->route('create.index');\n //Redirect\n }", "public function store()\n\t{\n\t\t$this->Model_siswa->store();\n\t}", "public function saveToDB()\n {\n }", "protected function _postSave()\r\n\t{\r\n\t}", "public abstract function save();", "function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "public function save() {\n \n $fields = array(\"id\", \"title\", \"largeimage\", \"description\", \"credits\", \"activitypoints\", \"activitypointstype\", \"expirydays\", \"enabled\", \"items\");\n \n foreach ($fields as $value)\n {\n if (!isset($_POST[$value]))\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"Unexpected error occured!\";\n $this->view->publish();\n return;\n }\n else if ($_POST[$value] == \"\")\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"You left a field blank!\";\n $this->view->publish();\n return;\n }\n }\n \n $daysUntilExpiry = (time() + (86400 * intval($_POST['expirydays'])));\n \n //R::exec(\"UPDATE site_articles SET article_name = ?, article_topstory = '/c_images/Top_Story_Images/\" . $_POST[\"topstory\"] . \"', article_description = ?, article_story = ? WHERE id = \". $_POST[\"id\"], array($_POST[\"name\"], $_POST[\"description\"], $_POST[\"story\"]));\n \n R::exec(\"UPDATE targeted_offers SET title = ?, description = ?, credits = ?, activity_points = ?, activity_points_type = ?, large_image = ?, expire_time = ?, enabled = ?, items = ? WHERE id = ?\", array($_POST[\"title\"], $_POST[\"description\"], $_POST[\"credits\"], $_POST[\"activitypoints\"], $_POST[\"activitypointstype\"], \"targetedoffers/\" . $_POST[\"largeimage\"], $daysUntilExpiry, $_POST[\"enabled\"], $_POST[\"items\"], $_POST['id']));\n \n MUS(\"reloadoffers\", \"\");\n \n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Success\";\n $this->view->data->alert_type = \"success\";\n $this->view->data->error = \"Targeted offer is saved!\";\n $this->view->publish();\n }", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function saveAction(){\n //d'you post?\n if ($this->getRequest()->isPost()){\n $knight = $this->getKnight();\n $knight->setName( $this->getRequest()->getPost(\"name\") );\n $knight->setArmor( $this->getRequest()->getPost(\"armor\") );\n //persist the knight\n $this->getDM()->persist($knight);\n $this->getDM()->flush();\n }\n //go back to home (indexAction) to show the grid of knights\n $this->redirect()->toRoute(\"home\");\n }", "public function save()\n {\n $this->data = [\n 'pb_name' => \\Input::get('pb_name'),\n 'title' => \\Input::get('title'),\n 'subtitle' => \\Input::get('subtitle'),\n 'description' => \\Input::get('description'),\n 'css_classes' => \\Input::get('css_classes'),\n 'image_ref' => \\Pageblok::uploadFile(\\Input::file('image_ref')),\n 'hyperlink' => \\Input::get('hyperlink'),\n 'template' => \\Input::get('template'),\n 'content_type' => \\Input::get('content_type'),\n 'content' => \\Input::get('content'),\n 'published' => \\Input::get('published'),\n 'start_datetime' => \\Carbon::parse(\\Input::get('start_datetime'))->format('Y-m-d H:i:s'),\n 'end_datetime' => \\Carbon::parse(\\Input::get('end_datetime'))->format('Y-m-d H:i:s'),\n 'address' => \\Input::get('address'),\n 'city' => \\Input::get('city'),\n 'country' => \\Input::get('country'),\n 'group' => \\Input::get('group'),\n 'created_by' => \\Auth::user()->id,\n ];\n\n if ($this->data['address'] && $this->data['city']) {\n $this->data['latitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['latitude'];\n }\n $this->data['longitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['longitude'];\n\n return parent::save();\n }", "public\n function store(Request $request)\n {\n if (!empty($request)) {\n $datatouSave = Array();\n $datatouSave['cost'] = 0;\n $data = json_decode($request->data);\n foreach ($data as $key => $value) {\n $datatouSave[$value->name] = $value->value;\n }\n //print_r($datatouSave);\n for ($i = 0; $i < $request->count; $i++) {\n $row = Array();\n $row['cost'] = $datatouSave['cost[' . $i . ']'];\n $row['time'] = $datatouSave['time[' . $i . ']'];\n if ($row['time'] == 60) {\n $datatouSave['cost'] = $row['time'];\n }\n unset($datatouSave['cost[' . $i . ']']);\n unset($datatouSave['time[' . $i . ']']);\n $datatouSave['costsofplace'][] = $row;\n }\n if (!isset($datatouSave['time']) || empty($datatouSave['time'])) {\n $datatouSave['time'] = new DateTime();\n }\n $datatouSave['lat'] = $request->lat;\n $datatouSave['long'] = $request->long;\n $datatouSave['loc'] = \\DB::raw(\"GeomFromText('POINT(\" . $request->lat . \" \" . $request->long . \")')\");\n $datatouSave['user_id'] = $request->user_id;\n if (!isset($datatouSave['provider_id']) || empty($datatouSave['provider_id'])) {\n $datatouSave['provider_id'] = $request->user_id;\n }\n if (!(isset($datatouSave['reportedcount']) && !empty($datatouSave['reportedcount']))) {\n $datatouSave['reportedcount'] = 100;\n }\n if (isset($datatouSave['occupied']) && !empty($datatouSave['occupied'])) {\n $datatouSave['emptyspaces'] = $datatouSave['reportedcount'] - $datatouSave['occupied'];\n }\n $datatouSave['empty'] = 0;\n if (!isset($datatouSave['avaliable']) || empty($datatouSave['avaliable'])) {\n $datatouSave['avaliable'] = 0;\n } else {\n $datatouSave['avaliable'] = 1;\n }\n if (!isset($datatouSave['validity']) || empty($datatouSave['validity'])) {\n $datatouSave['validity'] = 5;\n }\n $datatouSave['capacity'] = $datatouSave['reportedcount'];\n $datatouSave['source_id'] = 6;\n $datatouSave['opendata'] = 0;\n // $datatouSave['name']= $data->name;;\n //$datatouSave['cost']=$data->cost;;\n //print_r($datatouSave);\n $pricesandduration = Array();\n foreach ($datatouSave['costsofplace'] as $value) {\n $pricesandduration[$value['time']] = $value;\n }\n $park = new Places();\n foreach ($datatouSave as $key => $value) {\n if ($key != 'costsofplace') {\n $park->$key = $value;\n }\n }\n $exists = DB::select('SELECT checkIfParkingExists(' . $park->lat . ',' . $park->long . ') as checkifexists');\n if (empty($exists[0]->checkifexists)) {\n $park->save();\n foreach ($pricesandduration as $key => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $park->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $park->id;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n } else {\n $existingparking = Places::find($exists[0]->checkifexists);\n $existingparking->name = $park->name;\n $existingparking->disabledcount = $park->disabledcount;\n $existingparking->empty = $park->empty;\n $existingparking->avaliable = $park->avaliable;\n $existingparking->user_id = $park->user_id;\n $existingparking->reportedcount = $park->reportedcount;\n $existingparking->validity = $park->validity;\n $existingparking->capacity = $park->capacity;\n $existingparking->time = $park->time;\n $existingparking->maximumduration = $park->maximumduration;\n $existingparking->source_id = $park->source_id;\n $existingparking->opendata = $park->opendata;\n $existingparking->lat = $park->lat;\n $existingparking->long = $park->long;\n $existingparking->loc = $park->loc;\n $existingparking->provider_id = $park->provider_id;\n $existingparking->save();\n $theplacesCosts = $existingparking->placesCosts;\n // d($theplacesCosts);\n foreach ($theplacesCosts as $keyInternal => $valueInternal) {\n // d($valueInternal->cost);\n if (isset($pricesandduration[$valueInternal->time])) {\n $valueInternal->cost = $pricesandduration[$valueInternal->time]['cost'];\n $valueInternal->save();\n unset($pricesandduration[$valueInternal->time]);\n } else {\n $valueInternal->delete();\n unset($theplacesCosts[$keyInternal]);\n }\n }\n foreach ($pricesandduration as $keyInternal => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $existingparking->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $exists[0]->checkifexists;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n }\n\n return response('{\"content\":' . json_encode($datatouSave) . ',\"status\":\"success\"}', 200);\n } else {\n return response('{\"content\":' . $request->lat . \" \" . $request->long . ',\"status\":\"success\"}', 200);\n }\n }", "abstract public function save( $data );", "public function save()\n\t{\n\t\n\t\tif ($this->id == null) throw new Exception(\"Cannot save. id is null\");\n\t\t\n\t\t//store the data in the content column so that our worker will be searchable.\n\t\t$wp_content = \"\";\n\t\t\n\t\tforeach($this->values as $field=>$value)\n\t\t{\n\t\t\tupdate_post_meta($this->id, $field, $value);\n\t\t\t$wp_content .= \"<div>$value</div>\";\n\t\t}\n\t\t\n\t\t//wp_die($wp_content);\n\n\t\t//save the data entry in wp_posts\n\t\tglobal $wpdb;\n\t\t$wpdb->update(\n\t\t\t$wpdb->posts, \n\t\t\tarray(\n\t\t\t\t\"post_content\" => $wp_content,\n\t\t\t\t\"post_title\" => \"{$this->values['lastname']}, {$this->values['firstname']} {$this->values['middlename']}\" \n\t\t\t),\n\t\t\tarray(\"ID\" => $this->id),\n\t\t\tarray(\"%s\"),\n\t\t\tarray(\"%d\")\n\t\t);\n\t\t\n\t\t\n\t}", "public function postSave() {}", "private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}", "public function save() {\n $db = Db::instance();\n $db_properties = array(\n 'action' => $this->action,\n 'url_mod' => $this->url_mod,\n 'description' => $this->description,\n 'target_id' => $this->target_id,\n 'target_name' => $this->target_name,\n 'creator_id' => $this->creator_id,\n 'creator_username' => $this->creator_username\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save () {\r\n\t\tif (isset($_POST['data'])) {\r\n\t\t\t$data = stripslashes_deep($_POST['data']);\r\n\t\t\tif (!empty($data['preset']) && !empty($data['id'])) $data['preset'] = $data['id']; // Also override whatever preset we're seding\r\n\t\t\t$_POST['data'] = $data;\r\n\t\t}\r\n\t\tparent::save();\r\n\t}", "public function saveroomsinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$roomsinfo = $input['roomsinfo'];\n\t\t$hoursinfo = (isset($input['hoursinfo']) && $input['hoursinfo'] != NULL && !empty($input['hoursinfo'])) ? $input['hoursinfo'] : NULL;\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$roomsdata = PropertyRooms::where('property_id','=',$propertyid)->delete();\n\t\t\tforeach($roomsinfo as $room){\n\t\t\t\t$roomarray = array();\n\t\t\t\t$roomarray['studiooption_name'] = (trim($room['studiooption']) != \"\" && trim($room['studiooption']) != NULL) ? trim($room['studiooption']) : NULL;\n\t\t\t\t$roomarray['studiooption_value'] = (trim($room['studiocount']) != \"\" && trim($room['studiocount']) != NULL) ? trim($room['studiocount']) : 0;\n\t\t\t\t$roomarray['bedroomoption_name'] = (trim($room['bedroomoption']) != \"\" && trim($room['bedroomoption']) != NULL) ? trim($room['bedroomoption']) : NULL;\n\t\t\t\t$roomarray['bedroomoption_value'] = (trim($room['bedroomcount']) != \"\" && trim($room['bedroomcount']) != NULL) ? trim($room['bedroomcount']) : 0;\n\t\t\t\t$roomarray['bathoption_value'] = (trim($room['bathcount']) != \"\" && trim($room['bathcount']) != NULL) ? trim($room['bathcount']) : 0;\n\t\t\t\t$roomarray['price_startvalue'] = (trim($room['start_price']) != \"\" && trim($room['start_price']) != NULL) ? trim($room['start_price']) : 0;\n\t\t\t\t$roomarray['price_endvalue'] = (trim($room['end_price']) != \"\" && trim($room['end_price']) != NULL) ? trim($room['end_price']) : 0;\n\t\t\t\t$roomarray['property_id'] = trim($propertyid);\n\t\t\t\tPropertyRooms::create($roomarray);\n\t\t\t}\n\t\t\t\n\t\t\t$propertydata->property_officehours = serialize($hoursinfo);\n\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function saveToDatabase($data)\n {\n }", "public function saveData(): void\n {\n studentLoader::saveStudent(new student($_POST['lastName'], $_POST['firstName'], $_POST['email'], new group($_POST['className']), $_POST['id']), $this->pdo);\n }", "public function save()\n {\n }", "public final function save() {\n }", "public function saveDetails() \n {\n $bindingId = $this->bindingId;\n $bookList = $this->bookList;\n $scanList = $this->scanList;\n $provenanceList = $this->provenanceList;\n $bindingLanguageList = $this->bindingLanguageList;\n return Database::getInstance()->doTransaction(function() use ($bindingId, $bookList, $scanList, \n $provenanceList, $bindingLanguageList)\n {\n // Save the book list.\n $bookList->setValue('bindingId', $bindingId);\n $bookList->save();\n \n // Load all book details.\n foreach($bookList as $book)\n {\n $book->loadDetails(); \n }\n \n // Save the scan list.\n $scanList->setValue('bindingId', $bindingId);\n $scanList->save();\n \n // Save the provenance list.\n $provenanceList->setValue('bindingId', $bindingId);\n $provenanceList->save();\n \n // Save the language list.\n $bindingLanguageList->setValue('bindingId', $bindingId);\n $bindingLanguageList->save();\n });\n }", "public function save(){\n }", "function saveFieldsDatastoreAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n \n Zend_Loader::loadClass('Table_FieldSummary');\n $fieldSummaryTable = new Table_FieldSummary();\n \n //echo \"data made it!\";\n //return;\n \n $cnt = 0;\n $recordArray = Zend_Json::decode($_REQUEST['datastore'], Zend_Json::TYPE_OBJECT);\n //Zend_Debug::dump($recordArray);\n foreach ($recordArray as $record) \n {\n //Zend_Debug::dump($record);\n $where = $fieldSummaryTable->getAdapter()->quoteInto('pk_field = ?', $record->pk_field);\n $data = array('field_type' => $record->field_type,\n 'field_label' => $record->field_label,\n 'prop_desc' => $record->prop_desc,\n 'prop_type' => $record->prop_type);\n $fieldSummaryTable->update($data, $where);\n ++$cnt;\n } \n echo $cnt;\n }", "function save_district_state() {\n $datas = RefineData::getMasterData();\n foreach ($datas as $data) {\n insert_district($data->state, $data->district);\n }\n}", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function store($id) /* Maria Rennemark - add a house to a specific booking*/\n\t{\n\t\t$house = new Houses(\n\t\t\tarray(\n\t\t\t\t'name' => Input::get('checkbox1') ));\n\t\t$booking = Bookings::find($id);\n\t\t$house = $booking->houses()->save($house);\n\n\t\treturn Redirect::to('verification'.$id);\n\n}", "protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }", "public function saving(Apartment $apartment) {\n if($apartment->isDirty('name')) {\n $apartment->slug = Str::slug($apartment->name . \" \" . mt_rand(0, 10000), '_');\n }\n\n if($apartment->isDirty(['price', 'currency'])) {\n if(isset($apartment->currency) && strtoupper($apartment->currency) != env('DEFAULT_CURRENCY', 'EUR')) {\n $convertedToDefaultCurrency = convert_currency($apartment->price, $apartment->currency, env('DEFAULT_CURRENCY', 'EUR'));\n if($convertedToDefaultCurrency) {\n $apartment->price = $convertedToDefaultCurrency;\n $apartment->currency = env('DEFAULT_CURRENCY', 'EUR');\n }\n }\n }\n }", "public function store($data)\n {\n $this->pagamento = $data['pagamento'];\n $this->sconto = $data['sconto'];\n self::save();\n }", "public function save()\n\t{\n\n\t}", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function store()\n {\n $this->model->load('TacGia');\n $this->model->TacGia->anh = $_POST['anh'];\n $this->model->TacGia->ten = $_POST['ten'];\n $this->model->TacGia->thongtin = $_POST['thongtin'];\n $this->model->TacGia->save();\n\n go_back();\n }", "function save() {\n if ($this->nid && $this->license_uri) {\n $data = serialize($this);\n $data = str_replace(\"'\", \"\\'\", $data);\n $result = db_query(\"INSERT INTO {creativecommons} (nid, data) VALUES (%d, '%s')\", $this->nid, $data);\n return $result;\n }\n return;\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function save_object()\n {\n /* Check permissions, don't touch anything if we do not have write permissions \n */\n if (!preg_match(\"/w/\",$this->parent->getacl(\"\"))){\n dhcpPlugin::save_object();\n }elseif(isset($_POST['cn'])){\n\n $this->cn= get_post('cn');\n dhcpPlugin::save_object();\n\n foreach (array(\"server-identifier\", \"default-lease-time\",\n \"max-lease-time\", \"min-lease-time\") as $attr){\n if (isset($_POST[$attr]) && $_POST[$attr] != \"\"){\n $this->statements->set($attr,get_post($attr));\n } else {\n $this->statements->removeAll($attr);\n }\n }\n\n if (isset($_POST[\"authoritative\"])){\n $this->statements->set(\"authoritative\", \"\");\n } else {\n $this->statements->removeAll(\"authoritative\");\n }\n\n $this->statements->removeAll(\"deny\");\n $this->statements->removeAll(\"allow\");\n foreach(array(\"unknown-clients\", \"bootp\", \"booting\") as $name){\n if (isset($_POST[$name])){\n $this->statements->add(\"allow\",$name);\n } else {\n $this->statements->add(\"deny\",$name);\n }\n }\n }\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'event_type_id' => $this->event_type_id,\n 'user_1_id' => $this->user_1_id,\n 'user_2_id' => $this->user_2_id,\n 'user_1_name' => $this->user_1_name,\n 'user_2_name' => $this->user_2_name,\n 'product_1_name' => $this->product_1_name,\n 'product_2_name' => $this->product_2_name,\n 'data_1' => $this->data_1,\n 'data_2' => $this->data_2\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save()\n {\n $this->save_meta_value('_sim_service_price', $this->service_price);\n $this->save_meta_value('_sim_service_price_registered', $this->service_price_registered);\n $this->save_meta_value('_sim_service_hide_price', $this->service_hide_price);\n }", "public function store()\n\t{ \n $nextId = OrdenEsM::nextId();\n $input = Input::all();\n $ordenD = new OrdenEsD();\n $ordenD->upc = $input['upc'];\n $ordenD->epc = $input['epc'];\n $ordenD->quantity = $input['quantity'];\n $ordenD->created_at = $input['created_at'];\n $ordenD->updated_at = $input['updated_at'];\n $ordenD->orden_es_m_id = $nextId;\n $ordenD->save();\n\t}", "public function save($data);", "public function save($data);", "public function save($data);", "public function save(){\r\n $db = new Database();\r\n $sql = \"\";\r\n $stm = null;\r\n if (empty($this->id)){\r\n $sql = \"insert into interests (name) values (:name)\";\r\n $stm = $db->pdo->prepare($sql);\r\n }\r\n else{\r\n $sql = \"update interests set name=:name where id=:id\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':id', $this->id);\r\n }\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n }", "public function save()\r\n {\r\n //\r\n }", "public final function save()\n {\n }", "function save()\n {\n $GLOBALS['DB']->exec(\"INSERT INTO stores (store_name) VALUES (\n '{$this->getStoreName()}'\n );\");\n\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "function salva()\n\t{\n\t\trestauraConObj($this->mapa,$this->postgis_mapa);\n\t\t$this->mapa->save($this->arquivo);\n\t}", "protected function save_meta() {}", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function store(){\n\t\t//\n\t}", "private function saveData() {\n\n $dbConnection = dbconn::getConnectionBuild()->getConnection();\n date_default_timezone_set (\"America/Chicago\");\n\n if ($this->propertyId == 0) {\n // Insert a new row.\n $sqlStmt = \"INSERT INTO property (customer_id, tenant_first_name, tenant_last_name, address, city, \";\n $sqlStmt .= \"state, zip, phone, email, notes, created_by, last_modified_by, last_modified) \";\n $sqlStmt .= \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n if ($dbConnection->error) {\n echo $dbConnection->error;\n exit();\n }\n\n $currentDate = date('Y-m-d H:i:s');\n $stmtObj->bind_param(\"isssssssssiis\", $this->customerId, $this->firstName, $this->lastName, $this->address, $this->city,\n $this->state, $this->zip, $this->phone, $this->email, $this->notes, $this->employeeId,\n $this->employeeId, $currentDate);\n $stmtObj->execute();\n if ($dbConnection->error) {\n echo $dbConnection->error;\n exit();\n }\n $this->propertyId = $dbConnection->insert_id;\n } else {\n // Update existing row.\n $sqlStmt = \"UPDATE property SET customer_id = ?, tenant_first_name = ?, tenant_last_name = ?, address = ?, city = ?, \";\n $sqlStmt .= \"state = ?, zip = ?, phone = ?, email = ?, notes = ?, last_modified_by = ?, last_modified = ? \";\n $sqlStmt .= \"WHERE id = ? \";\n\n $currentDate = date('Y-m-d H:i:s');\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n $stmtObj->bind_param(\"isssssssssisi\", $this->customerId, $this->firstName, $this->lastName, $this->address, $this->city,\n $this->state, $this->zip, $this->phone, $this->email, $this->notes, $this->employeeId,\n $currentDate, $this->propertyId);\n $stmtObj->execute();\n }\n\n $this->statusMessage = \"Save successful: \" . date(\"h:i:s a\");\n\n }", "public\tfunction\tsave()\n\t\t{\n\t\t}", "abstract protected function save($data);", "public function save()\n {\n try {\n $name = $this->getName();\n $age = $this->getAge();\n if (!$this->getDriverId()) {\n $this->_pdo->query(\"INSERT INTO driver (name, age) VALUES ('$name', '$age')\");\n } else {\n $this->_pdo->query(\n \"UPDATE drive SET name = '$name', age = '$age'\" .\n \" WHERE driver_id = \" . $this->getDriverId()\n );\n }\n } catch (PDOException $e) {\n echo \"Error: \" . $e;\n }\n }", "public function save($data)\n {\n }", "public function save($data)\n {\n }", "public function save() {\n }" ]
[ "0.73458666", "0.6701009", "0.66668546", "0.64166516", "0.63487613", "0.63421315", "0.63403875", "0.63212645", "0.6209394", "0.6168239", "0.6168239", "0.6168239", "0.6168239", "0.6168239", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61465377", "0.61372167", "0.61372167", "0.6134136", "0.6133782", "0.61028445", "0.6083843", "0.6082543", "0.6043183", "0.60418785", "0.6027347", "0.60046023", "0.60037977", "0.60009557", "0.59827435", "0.5978449", "0.59773177", "0.59758914", "0.5975657", "0.5973294", "0.59580594", "0.5954286", "0.5948407", "0.59434044", "0.5941456", "0.59396374", "0.59193003", "0.58977485", "0.58943915", "0.58910465", "0.5888039", "0.5885749", "0.588468", "0.5884232", "0.5882691", "0.58731806", "0.5860866", "0.5857804", "0.58462554", "0.5841734", "0.5822088", "0.5815228", "0.5806123", "0.5802667", "0.58022195", "0.5794152", "0.5793649", "0.5793116", "0.5789443", "0.5783629", "0.57821345", "0.57820964", "0.57820964", "0.57820964", "0.5774681", "0.57706434", "0.57700074", "0.5768427", "0.57682896", "0.57653624", "0.5763787", "0.57634336", "0.57628745", "0.5761877", "0.5761424", "0.5757541", "0.575619", "0.575619", "0.57561696" ]
0.63754016
4
This part is save houses data from API
public function saveHousesData($data) { $now = date('Y-m-d H:i:s'); $data['mdate'] = $now; file_put_contents('_save_house_model.txt', json_encode($data)); if (isset($data['id']) && intval($data['id'] <= 0)) { unset($data['id']); } if (!isset($data['id'])) { // if (empty($data['Housesname'])) { // return ['code' => -1, 'msg' => '请提供用户名']; // } // if (empty($data['password'])) { // return ['code' => -1, 'msg' => '请提供密码']; // } // if (self::get(['Housesname' => $data['Housesname']])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } $data['cdate'] = $now; //添加房源编号new // $data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']); $data['dsn'] = $this->gen_house_dsn_new(); $this->data = $data; //访问频繁 if (cache('add_house_'.$data['user_id'])) { $left_second = time() - cache('add_house_'.$data['user_id']); return ['code' => -1, 'msg' => '访问过于频繁,请'.$left_second.'s后再试']; } //防并发操作 解决ID重复的问题 #A# $fp = fopen(RUNTIME_PATH."lock.txt", "w+"); if(flock($fp,LOCK_EX | LOCK_NB)) { //..处理订单 flock($fp,LOCK_UN); $result = $this->save(); if ($result) { cache('add_house_'.$data['user_id'], time(),10); } }else{ fclose($fp); return ['code' => -1, 'msg' => '系统繁忙,请稍后再试']; } fclose($fp); //防并发操作 #A# if (false === $result) { return ['code' => -1, 'msg' => '添加数据失败']; } $data['id'] = $this->id; } else { $data['id'] = intval($data['id']); if ($data['id'] <= 0) { return ['code' => -1, 'msg' => 'id 必须大于0']; } // if (self::get(['Housesname' => $data['Housesname'], 'id' => ['neq', $data['id']]])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } // if (isset($data['password']) && $data['password'] == '') { // unset($data['password']); // } $result = $this->save($data, ['id' => $data['id']]); if ($result === false) { return ['code' => -1, 'msg' => '修改数据失败']; } } //添加房源编号 //$this->set_house_dsn($data['id']); return ['code' => 0, 'msg' => 'ok', 'data' => $data]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'title' => 'required|max:250',\n\t\t\t'nr_of_rooms' => 'required|integer|min:0',\n\t\t\t'nr_of_beds' => 'required|integer|min:0',\n\t\t\t'nr_of_bathrooms' => 'integer|min:0|nullable',\n\t\t\t'square_mt' => 'integer|min:1|nullable',\n\t\t\t'address' => 'required',\n\t\t\t'image_path' => 'image|nullable',\n\t\t\t'description' => 'max:2000|nullable',\n\t\t]);\n\n\t\t//TODO: address manipulation\n\t\t$houseData = $request->all();//in mezzo ci sono sia le cose che vanno in houses che quelle che vanno in services -> SEPARARE I CAMPI!\n\t\t$newHouse = new House();\n\t\t$newHouse->fill($houseData);\n\t\tif(array_key_exists('image_path', $houseData)) {\n\t\t\t$newHouse->image_path = Storage::put('uploads', $houseData['image_path']);\n\t\t}\n\t\t$newHouse->save();\n\t\tif (!empty($houseData['services_ids'])) {\n\t\t\t$newHouse->services()->sync($houseData['services_ids']);\n \t}\n\n\t\treturn redirect()->route('upr.houses.index');\n\n }", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function saveroomsinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$roomsinfo = $input['roomsinfo'];\n\t\t$hoursinfo = (isset($input['hoursinfo']) && $input['hoursinfo'] != NULL && !empty($input['hoursinfo'])) ? $input['hoursinfo'] : NULL;\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$roomsdata = PropertyRooms::where('property_id','=',$propertyid)->delete();\n\t\t\tforeach($roomsinfo as $room){\n\t\t\t\t$roomarray = array();\n\t\t\t\t$roomarray['studiooption_name'] = (trim($room['studiooption']) != \"\" && trim($room['studiooption']) != NULL) ? trim($room['studiooption']) : NULL;\n\t\t\t\t$roomarray['studiooption_value'] = (trim($room['studiocount']) != \"\" && trim($room['studiocount']) != NULL) ? trim($room['studiocount']) : 0;\n\t\t\t\t$roomarray['bedroomoption_name'] = (trim($room['bedroomoption']) != \"\" && trim($room['bedroomoption']) != NULL) ? trim($room['bedroomoption']) : NULL;\n\t\t\t\t$roomarray['bedroomoption_value'] = (trim($room['bedroomcount']) != \"\" && trim($room['bedroomcount']) != NULL) ? trim($room['bedroomcount']) : 0;\n\t\t\t\t$roomarray['bathoption_value'] = (trim($room['bathcount']) != \"\" && trim($room['bathcount']) != NULL) ? trim($room['bathcount']) : 0;\n\t\t\t\t$roomarray['price_startvalue'] = (trim($room['start_price']) != \"\" && trim($room['start_price']) != NULL) ? trim($room['start_price']) : 0;\n\t\t\t\t$roomarray['price_endvalue'] = (trim($room['end_price']) != \"\" && trim($room['end_price']) != NULL) ? trim($room['end_price']) : 0;\n\t\t\t\t$roomarray['property_id'] = trim($propertyid);\n\t\t\t\tPropertyRooms::create($roomarray);\n\t\t\t}\n\t\t\t\n\t\t\t$propertydata->property_officehours = serialize($hoursinfo);\n\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function saveHousesDataInternal($data) {\n $now = date('Y-m-d H:i:s');\n $id = intval(@$data['id']);\n // 获取旧数据\n if ($id > 0) {\n $oldInfo = $this->find($id);\n if (!$oldInfo) {\n return array('code' => -1, 'msg' => '文章不存在');\n }\n $old_thumbnail = $oldInfo['thumnail'];\n } else {\n $data['admin_id'] = session('id');\n $old_thumbnail = '';\n }\n\n // 移动标题图\n if ($data['thumnail']) { // 确保从tmp中移动出thumnail\n // 如果之前上传过缩略图,删除\n if ($old_thumbnail && $data['thumnail'] != $old_thumbnail) {\n deleteFile($old_thumbnail);\n }\n if (false === ($data['thumnail'] = $this->_move_thumbnail($data['thumnail']))) {\n return array('code' => -1, 'msg' => '移动缩略图位置失败');\n }\n }\n\n $data['cdate'] = $now;\n $data['mdate'] = $now;\n // Generate DSN for current situtation\n //$data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']);\n $data['dsn'] = $this->gen_house_dsn_new();\n // 保存数据\n if ($data['id']) {\n $lines = $this->save($data, array('id' => $data['id']));\n if ($lines !== false) {\n $res = true;\n }\n } else {\n $insertId = $this->insertGetId($data);\n if ($insertId) {\n $data['id'] = $insertId;\n $res = true;\n }\n }\n\n if (!$res) {\n return array('code' => -1, 'msg' => $this->getDbError());\n }\n return array('code' => 0, 'msg' => 'ok', 'data' => $data);\n }", "public function run()\n {\n \n\n \\DB::table('houses')->delete();\n \n \\DB::table('houses')->insert(array (\n 0 => \n array (\n 'id' => 15,\n 'title' => '更好的风格和的风格',\n 'area' => 123.0,\n 'sub_title' => '风格撒的风格撒的发噶人',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '固定好身体也让我层 v 许诺',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"新房\", \"学区房\", \"市中心\", \"随时看房\", \"地铁房\"]',\n 'created_at' => '2018-02-08 16:30:56',\n 'updated_at' => '2018-02-08 16:54:14',\n 'price' => 1343.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.016190\", \"lng\": \"108.580375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 1 => \n array (\n 'id' => 16,\n 'title' => '啊实打实大',\n 'area' => 123.0,\n 'sub_title' => '阿斯顿',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '撒的啊撒睡大时代啊阿斯顿啊撒的阿斯顿撒大时代',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\"]',\n 'created_at' => '2018-02-08 16:33:43',\n 'updated_at' => '2018-02-08 16:53:44',\n 'price' => 213321.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.016190\", \"lng\": \"109.080375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 2 => \n array (\n 'id' => 17,\n 'title' => '雅居乐 3是阿斯顿啊',\n 'area' => 123.0,\n 'sub_title' => '啊实打实的',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '撒的发撒的风格形成 v 了',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"市中心\", \"学区房\", \"新房\", \"随时看房\"]',\n 'created_at' => '2018-02-08 16:35:04',\n 'updated_at' => '2018-02-08 16:46:54',\n 'price' => 12315.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.331929\", \"lng\": \"108.936741\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 3 => \n array (\n 'id' => 18,\n 'title' => '使用 Promise 和 ES6',\n 'area' => 123.0,\n 'sub_title' => '此钩子函数一个类型为切换对象的参数。',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => 'I really want set title when I declare routes. e.g\n\nconst routes = [{ path: \\'/search\\', component: ActivityList, title: \\'Search\\' }]\nthen title will change by the vue-router.\n\nhow ?\n\nps, I see the pull issue closed. why?\n#526',\n 'direction' => '东南',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 2,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"name\": \"2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"name\": \"2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"name\": \"2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"name\": \"2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"name\": \"2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"name\": \"2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"name\": \"2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"size\": \"true\", \"type\": \"gif\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '个人供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => '123',\n 'community_info' => '123123123123',\n 'traffic' => '123123',\n 'house_age_limit' => '213',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"213\", \"direction\": \"西\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"东\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"213\", \"direction\": \"南\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西南\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\", \"新房\"]',\n 'created_at' => '2018-02-09 15:19:48',\n 'updated_at' => '2018-02-19 12:57:27',\n 'price' => 213.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"name\": \"2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '2131',\n 'building_number' => '123',\n 'house_number' => '213',\n 'contact' => '123',\n 'tel' => '213123',\n 'expect_price' => '213213',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市灞桥区狄寨街道白鹿西路南段',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.216190\", \"lng\": \"108.080375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 4 => \n array (\n 'id' => 19,\n 'title' => '啊撒睡',\n 'area' => 213.0,\n 'sub_title' => '德萨发生的发',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '是否该说的风格是方法是撒的发生发生的发生分胜负爽肤水复古风格的复古风格家哥好机会你风格 v 吧形成 v不 v 不晓得该说的风格和时代感撒的风格撒的风格二哥二哥为根深蒂固说的话说更好风格和风格好是否根深蒂固和人突然说通过',\n 'direction' => '西',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 2,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-10-15745a83cc3277471.gif\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-10-15745a83cc3277471.gif\", \"name\": \"2018-02-14-13-42-10-15745a83cc3277471.gif\", \"size\": \"true\", \"type\": \"gif\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"name\": \"2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"name\": \"2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"name\": \"2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"name\": \"2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"name\": \"2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '简装',\n 'floor_age' => '213',\n 'supply_heating' => '个人供暖',\n 'elevator' => '其他',\n 'surroundings' => '西塞带哦',\n 'community_info' => '没考虑过的宝宝健康啦哥哥你快收藏 v 军绿色的发生 v崩坏开始v 不会考虑比较宽松的发',\n 'traffic' => '撒大的啊 许可名不虚传没考虑',\n 'house_age_limit' => '213',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"231\", \"direction\": \"南\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"213\", \"direction\": \"西北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"213\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"213\", \"direction\": \"东南\"}, \"bathroom_2\": {\"arae\": \"231\", \"direction\": \"西\"}}}',\n 'tags' => '[\"新房\", \"学区房\", \"市中心\", \"随时看房\", \"地铁房\"]',\n 'created_at' => '2018-02-14 13:43:45',\n 'updated_at' => '2018-02-15 18:12:04',\n 'price' => 213134.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"name\": \"2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '213',\n 'tel' => '123',\n 'expect_price' => '123',\n 'community' => '户',\n 'status' => 'sell',\n 'location' => '陕西省西安市未央区张家堡街道文景路风景御园',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.339209\", \"lng\": \"108.940037\", \"city\": \"西安市\", \"level\": \"兴趣点\", \"adcode\": \"610112\", \"citycode\": \"029\", \"district\": \"未央区\", \"location\": \"108.940037,34.339209\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市未央区风景御园\"}',\n ),\n 5 => \n array (\n 'id' => 20,\n 'title' => 'action来发送请求,然后本意是想在then方法里面判断权限',\n 'area' => 123.0,\n 'sub_title' => '如果改用 async/await 呢,会是这样',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '2018 Lincoln Navigator : Full-Size Luxury SUVs - Lincoln.com',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 3,\n 'floors' => 231,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"name\": \"2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"size\": \"true\", \"type\": \"png\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"name\": \"2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"name\": \"2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"name\": \"2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"name\": \"2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"name\": \"2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"name\": \"2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"name\": \"2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"name\": \"2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"name\": \"2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"name\": \"2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"name\": \"2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"name\": \"2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"name\": \"2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"name\": \"2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"name\": \"2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"name\": \"2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"name\": \"2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"name\": \"2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"name\": \"2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"name\": \"2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"name\": \"2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"name\": \"2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"name\": \"2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"name\": \"2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"name\": \"2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '231',\n 'supply_heating' => '个人供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => '注意导航守卫并没有应用在跳转路由上,而仅仅应用在其目标上。在下面这个例子中,为 /a 路由添加一个 beforeEach 或 beforeLeave 守卫并不会有任何效果。\n\n其它高级用法,请参考例子。',\n 'community_info' => '『别名』的功能让你可以自由地将 UI 结构映射到任意的 URL,而不是受限于配置的嵌套路由结构。\n\n更多高级用法,请查看例子。',\n 'traffic' => '『重定向』的意思是,当用户访问 /a时,URL 将会被替换成 /b,然后匹配路由为 /b,那么『别名』又是什么呢?\n\n/a 的别名是 /b,意味着,当用户访问 /b 时,URL 会保持为 /b,但是路由匹配则为 /a,就像用户访问 /a 一样。\n\n上面对应的路由配置为:',\n 'house_age_limit' => '231',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"213\", \"direction\": \"东南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"231\", \"direction\": \"北\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"231\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"231\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"231\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"231\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\", \"新房\"]',\n 'created_at' => '2018-02-19 13:02:27',\n 'updated_at' => '2018-02-19 13:03:26',\n 'price' => 15150.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"name\": \"2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '213',\n 'building_number' => '213',\n 'house_number' => '213',\n 'contact' => '231',\n 'tel' => '231',\n 'expect_price' => '321',\n 'community' => '延东小区',\n 'status' => 'sell',\n 'location' => '陕西省西安市未央区张家堡街道名栩茶业盐东小区',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"108.933216\", \"lng\": \"34.341867\", \"city\": \"西安市\", \"level\": \"兴趣点\", \"adcode\": \"610112\", \"citycode\": \"029\", \"district\": \"未央区\", \"location\": \"108.933216,34.341867\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市未央区延东小区\"}',\n ),\n ));\n \n \n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "public function saveData()\r\n {\r\n \r\n }", "public function store(Request $request)\n {\n //Validation\n //File Upload if file exist\n //Store Data\n $house = new House;\n $house->user_id= request('name'); \n $house->township_id = request('township');\n $house->type_id = request('type');\n $house->title = request('title');\n $house->area= request('area'); \n $house->price = request('price');\n $house->room = request('room');\n $house->location= request('location'); \n $house->image = request('image');\n $house->phone = request('phone');\n $house->status = request('status');\n $house->description = request('des');\n $house->save();\n return redirect()->route('create.index');\n //Redirect\n }", "function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }", "public function store(Request $request)\n {\n //\n $data = $request->all();\n\n $validator = Validator::make($data, [\n 'mobile_no' => 'required',\n 'qr_code_id' => 'required',\n 'user_id' => 'required',\n 'building_id' => 'required',\n ]);\n \n\n if($validator->fails()){\n return response([ 'data' => null, 'message' => 'Required fields missing'], 200);\n }\n\n $building = \\App\\Building::where('building_number', $request->building_id)->first();\n\n if($building){\n\n $household = HouseholdDetail::where('mobile_no',$request->mobile_no)->first();\n\n\n $existing_qr = HouseholdDetail::where('qr_code_id',$request->qr_code_id)->first();\n\n if($existing_qr){\n return response([ 'data' => null, 'status_code' => 'ALREADY_USED', 'message' => 'Error adding household, try again'], 200);\n }\n if(!$household){\n\n $household = new HouseholdDetail;\n }\n\n $qr = \\App\\QrCode::find($request->qr_code_id);\n \n if($qr){\n $household->mobile_no = $request->mobile_no;\n $household->building_id = $building->id;\n $household->user_id = $request->user_id;\n $household->qr_code_id = $qr->id;\n $household->name = $request->name;\n $household->total_female = $request->total_female;\n $household->total_male = $request->total_male;\n $household->total_above_60 = $request->total_above_60;\n $household->total_below_10 = $request->total_below_10;\n $household->emergency_contact_no = $request->emergency_contact_no;\n $household->nationality = $request->nationality;\n \n $householdDetail = $household->save();\n\n if($householdDetail){\n\n $qr->status = \"active\";\n $qr->save();\n\n return response([ 'data' => new HouseholdDetailResource($household), 'status_code' => 'SUCCESS','message' => 'Added household successfully'], 200);\n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Error adding household, try again'], 200);\n } \n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Error adding household, try again'], 200);\n }\n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Building not found, please pick building from the map'], 200);\n }\n }", "public\n function store(Request $request)\n {\n if (!empty($request)) {\n $datatouSave = Array();\n $datatouSave['cost'] = 0;\n $data = json_decode($request->data);\n foreach ($data as $key => $value) {\n $datatouSave[$value->name] = $value->value;\n }\n //print_r($datatouSave);\n for ($i = 0; $i < $request->count; $i++) {\n $row = Array();\n $row['cost'] = $datatouSave['cost[' . $i . ']'];\n $row['time'] = $datatouSave['time[' . $i . ']'];\n if ($row['time'] == 60) {\n $datatouSave['cost'] = $row['time'];\n }\n unset($datatouSave['cost[' . $i . ']']);\n unset($datatouSave['time[' . $i . ']']);\n $datatouSave['costsofplace'][] = $row;\n }\n if (!isset($datatouSave['time']) || empty($datatouSave['time'])) {\n $datatouSave['time'] = new DateTime();\n }\n $datatouSave['lat'] = $request->lat;\n $datatouSave['long'] = $request->long;\n $datatouSave['loc'] = \\DB::raw(\"GeomFromText('POINT(\" . $request->lat . \" \" . $request->long . \")')\");\n $datatouSave['user_id'] = $request->user_id;\n if (!isset($datatouSave['provider_id']) || empty($datatouSave['provider_id'])) {\n $datatouSave['provider_id'] = $request->user_id;\n }\n if (!(isset($datatouSave['reportedcount']) && !empty($datatouSave['reportedcount']))) {\n $datatouSave['reportedcount'] = 100;\n }\n if (isset($datatouSave['occupied']) && !empty($datatouSave['occupied'])) {\n $datatouSave['emptyspaces'] = $datatouSave['reportedcount'] - $datatouSave['occupied'];\n }\n $datatouSave['empty'] = 0;\n if (!isset($datatouSave['avaliable']) || empty($datatouSave['avaliable'])) {\n $datatouSave['avaliable'] = 0;\n } else {\n $datatouSave['avaliable'] = 1;\n }\n if (!isset($datatouSave['validity']) || empty($datatouSave['validity'])) {\n $datatouSave['validity'] = 5;\n }\n $datatouSave['capacity'] = $datatouSave['reportedcount'];\n $datatouSave['source_id'] = 6;\n $datatouSave['opendata'] = 0;\n // $datatouSave['name']= $data->name;;\n //$datatouSave['cost']=$data->cost;;\n //print_r($datatouSave);\n $pricesandduration = Array();\n foreach ($datatouSave['costsofplace'] as $value) {\n $pricesandduration[$value['time']] = $value;\n }\n $park = new Places();\n foreach ($datatouSave as $key => $value) {\n if ($key != 'costsofplace') {\n $park->$key = $value;\n }\n }\n $exists = DB::select('SELECT checkIfParkingExists(' . $park->lat . ',' . $park->long . ') as checkifexists');\n if (empty($exists[0]->checkifexists)) {\n $park->save();\n foreach ($pricesandduration as $key => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $park->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $park->id;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n } else {\n $existingparking = Places::find($exists[0]->checkifexists);\n $existingparking->name = $park->name;\n $existingparking->disabledcount = $park->disabledcount;\n $existingparking->empty = $park->empty;\n $existingparking->avaliable = $park->avaliable;\n $existingparking->user_id = $park->user_id;\n $existingparking->reportedcount = $park->reportedcount;\n $existingparking->validity = $park->validity;\n $existingparking->capacity = $park->capacity;\n $existingparking->time = $park->time;\n $existingparking->maximumduration = $park->maximumduration;\n $existingparking->source_id = $park->source_id;\n $existingparking->opendata = $park->opendata;\n $existingparking->lat = $park->lat;\n $existingparking->long = $park->long;\n $existingparking->loc = $park->loc;\n $existingparking->provider_id = $park->provider_id;\n $existingparking->save();\n $theplacesCosts = $existingparking->placesCosts;\n // d($theplacesCosts);\n foreach ($theplacesCosts as $keyInternal => $valueInternal) {\n // d($valueInternal->cost);\n if (isset($pricesandduration[$valueInternal->time])) {\n $valueInternal->cost = $pricesandduration[$valueInternal->time]['cost'];\n $valueInternal->save();\n unset($pricesandduration[$valueInternal->time]);\n } else {\n $valueInternal->delete();\n unset($theplacesCosts[$keyInternal]);\n }\n }\n foreach ($pricesandduration as $keyInternal => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $existingparking->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $exists[0]->checkifexists;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n }\n\n return response('{\"content\":' . json_encode($datatouSave) . ',\"status\":\"success\"}', 200);\n } else {\n return response('{\"content\":' . $request->lat . \" \" . $request->long . ',\"status\":\"success\"}', 200);\n }\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }", "public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "public function save()\n {\n $this->variableApi->set('RKFineArtPhotographerModule', 'albumEntriesPerPage', $this->getAlbumEntriesPerPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'linkOwnAlbumsOnAccountPage', $this->getLinkOwnAlbumsOnAccountPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'albumItemEntriesPerPage', $this->getAlbumItemEntriesPerPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'linkOwnAlbumItemsOnAccountPage', $this->getLinkOwnAlbumItemsOnAccountPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'enableShrinkingForAlbumItemImage', $this->getEnableShrinkingForAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'shrinkWidthAlbumItemImage', $this->getShrinkWidthAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'shrinkHeightAlbumItemImage', $this->getShrinkHeightAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailModeAlbumItemImage', $this->getThumbnailModeAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageView', $this->getThumbnailWidthAlbumItemImageView());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageView', $this->getThumbnailHeightAlbumItemImageView());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageDisplay', $this->getThumbnailWidthAlbumItemImageDisplay());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageDisplay', $this->getThumbnailHeightAlbumItemImageDisplay());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageEdit', $this->getThumbnailWidthAlbumItemImageEdit());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageEdit', $this->getThumbnailHeightAlbumItemImageEdit());\n $this->variableApi->set('RKFineArtPhotographerModule', 'enabledFinderTypes', $this->getEnabledFinderTypes());\n }", "function saveCiudad() {\n if ($_GET['action'] == 'ciudades') {\n //Decodifica un string de JSON\n $obj = json_decode(file_get_contents('php://input'));\n $objArr = (array) $obj;\n if (empty($objArr)) {\n $this->response(422, \"error\", \"Nothing to add. Check json\");\n } else if (isset($obj->name)) {\n $ciudad = new CiudadDB();\n $ciudad->insert($obj->name);\n $this->response(200, \"success\", \"Nuevo registro añadido exitosamente\");\n } else {\n $this->response(422, \"error\", \"The property is not defined\");\n }\n } else {\n $this->response(400);\n }\n }", "public function savePokemons(){\n try {\n $response = Http::get('https://pokeapi.co/api/v2/pokemon?limit=1118');\n $pokemons = $response->json()['results'];\n foreach($pokemons as $pokemon){\n $search = PokemonsModel::where('nombre', $pokemon['name'])->first();\n if(!isset($search)){\n $create = new PokemonsModel([\n 'nombre' => $pokemon['name'],\n 'detalle_url' => $pokemon['url']\n ]);\n $create->save();\n }\n }\n } catch (Exception $err) {\n return response()->json($err, 500);\n }\n \n return response()->json(['message' => 'Save success'], 200);;\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function store(){\n\n apiwat::create(request(['title','author', 'price','publish_date', 'website', 'id']));\n\n return back();\n }", "public function store($id) /* Maria Rennemark - add a house to a specific booking*/\n\t{\n\t\t$house = new Houses(\n\t\t\tarray(\n\t\t\t\t'name' => Input::get('checkbox1') ));\n\t\t$booking = Bookings::find($id);\n\t\t$house = $booking->houses()->save($house);\n\n\t\treturn Redirect::to('verification'.$id);\n\n}", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function store($data)\n {\n try {\n $store = new Listing;\n $store->user_id = $data['user_id'] ?? Auth::user()->id;\n $store->listing_category_id = $data['listing_category_id'];\n $store->listing_type = $data['listing_type'];\n $store->state_id = $data['state_id'];\n $store->city_id = $data['city_id'];\n $store->local_govt_id = $data['local_govt_id'];\n $store->title = $data['title'];\n $store->address = $data['address'];\n $store->description = $data['description'] ?? null;\n $store->room_policy = $data['room_policy'] ?? null;\n $store->service_option = $data['service_option'] ?? 'no';\n $store->service_description = $data['service_description'] ?? null;\n $store->baths = $data['baths'] ?? null;\n $store->rooms = $data['rooms'] ?? null;\n $store->pricing_type = $data['pricing_type'] ?? \"monthly\";\n $store->amount = $data['amount'] ?? 0;\n $store->amount = $data['step'] ?? 1;\n $store->save();\n activity()\n ->causedBy(Auth::user())\n ->performedOn($store)\n ->withProperties(['id' => $store->id])\n ->log('listing category created');\n if(!empty($data['property_amenities'])){\n $amenities = new Request(['listing_id' => $store->id, 'amenities'=> $data['property_amenities']]);\n ListingAmenitiesController::bulk_update($amenities);\n }\n return $store;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "function statuses_saveData() {\n\n\t// Get array with new data\n\t$fields = statuses_getData();\n\t$count = sizeof($fields); // count items\n\n\t// Construct URL\n\t$url = BASEURL . \"v1/statuses?count=\" . $count . \"&token=\" . getToken(1);\n\n\t// Get existing data\n\t$response = array_reverse(doGetRequest($url));\n\n\t// Iterate through all new items and if their ID isn't found in the request with the latest data, add them\n\tfor ($i=0; $i < 50; $i++) { \n\n\t\t$newId = $fields[$i]['org_id']; // original ID of a new item\n\t\t\n\t\tif($response['code'] == 404) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\telseif(!in_array_r($newId, $response)) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\n\t}\n\n}", "public function store(Request $request){\n $validator = Validator::make($request->all(), [\n 'sponsor_id' => 'numeric|exists:sponsors,id',\n 'apartment_id' => 'numeric|exists:apartments,id',\n ]);\n // se dati ricevuti non sono corretti, restituisco JSON di errore\n if ($validator->fails()) {\n return response()->json(['Messaggio'=>'Errore inserimento']);\n }\n // controllo se ultima data di fine per questo apartment_id è maggiore della data attuale\n // allora prendo ultima data fine come inizio della nuova sponsorizzazione\n $ora = Carbon::now();\n $ultimaDataFine = Carbon::parse(SponsorApartment::where('apartment_id',$request->apartment_id)->pluck('data_fine')->sortDesc()->first());\n if($ultimaDataFine->greaterThan($ora)){\n $request['data_inizio'] = $ultimaDataFine;\n } else {\n $request['data_inizio'] = $ora;\n };\n // aggiungo durata alla data inizio e calcolo data fine\n $durata = Sponsor::where('id',$request->sponsor_id)->pluck('durata')->first();\n $request['data_fine'] = Carbon::parse($request['data_inizio'])->addHours($durata);\n // scrivo dati su database e restituisco JSON di risposta\n $sponsorApartment = SponsorApartment::create($request->all());\n return response()->json($sponsorApartment,201);\n\n dd($sponsorApartment);\n\n }", "public function saveamenitiesinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$amenitiesinfo = $input['amenitiesinfo'];\n\t\t$featuresinfo = $input['featuresinfo'];\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$propertydata->property_amenities = json_encode($amenitiesinfo);\n\t\t\t$propertydata->property_features = json_encode($featuresinfo);\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "static function saveToDB() {\n try {\n $diff_id = self::arrayDiff()[\"diff_id\"];\n\n //errors handling\n } catch (\\Exception $e) {\n return [\"uploadedlist\"=>\"\",\"title\"=>$e->getMessage()];\n }\n\n\n\n try {\n $count = 0;\n if (empty($diff_id)) { throw new Exception(\"All items saved!\");}\n //for debugging only 100\n //$diff_id=array_slice($diff_id,0,300);\n foreach ($diff_id as $id) {\n $offer = self::getDataByID($id, $_SESSION[\"api_key\"]);\n //$offer = self::getDataByID(\"14646350\", $_SESSION[\"api_key\"]);\n //to get keys for checking\n $offer_keys = array_keys($offer);\n\n $model = new Offers();\n $isExists = [];\n //saving all items except for having prefix \"c\"\n foreach ($offer_keys as $k => $offer_key) {\n if ($model->hasProperty($offer_key)) {\n $model[$offer_key] = $offer[$offer_key];\n $isExists[] = true;\n }\n }\n //saving items having prefix \"c\"\n if (!empty($offer[\"characteristics_values\"])) {\n $offerChars = $offer[\"characteristics_values\"];\n $offer_keysChars = array_keys($offerChars);\n foreach ($offer_keysChars as $k => $offer_key) {\n if ($model->hasProperty(\"c\" . $offer_key)) {\n $model[\"c\" . $offer_key] = round($offerChars[$offer_key]);\n $isExists[] = true;\n }\n\n }\n //echo var_export($offer[\"characteristics_values\"]);\n\n\n //echo var_export(self::$charValuesArr);\n }\n\n //saving data about Agency\n if (!empty($offer[\"agency\"])) {\n $offerAgency = $offer[\"agency\"];\n $offer_keysAgency = array_keys($offerAgency);\n foreach ($offer_keysAgency as $k => $offer_key) {\n if ($model->hasProperty($offer_key)) {\n $model[$offer_key] = round($offerAgency[$offer_key]);\n $isExists[] = true;\n }\n\n }\n }\n //saving \"user\" and \"priceUSD\"\n //to add agency id like $model[\"agency_id\"] = $offer_keys[\"user\"][\"name\"];\n if (!empty($offer[\"priceArr\"])) {\n $model[\"priceUSD\"] = $offer[\"priceArr\"][1];\n }\n $model->save(false);\n $count++;\n }\n return [\"uploadedlist\" => $count . \" items uploaded\", \"title\" => \"Success\"];\n //echo var_dump($charValuesArr);\n //return [\"uploadedlist\" => $charValuesArr, \"title\" => \"Success\"];\n } catch (\\Exception $e) {\n return [\"uploadedlist\"=>$count .\" items uploaded, id=\".$id,\"title\"=>$e->getMessage()];\n\n //echo var_dump(self::$charValuesArr);\n //return [\"uploadedlist\"=>self::$charValuesArr,\"title\"=>$e->getMessage()];\n }\n /*\n 'admin_id' => 'Admin ID',\n 'street_name' => 'Street Name',\n 'price_item' => 'Price Item',\n 'rooms_count' => 'Rooms Count',\n 'type' => 'Type',\n 'is_commercial' => 'Is Commercial',\n 'state_name' => 'State Name',\n 'beautiful_url' => 'Beautiful Url',\n 'description' => 'Description',\n 'currency_type' => 'Currency Type',\n 'metro_station_name' => 'Metro Station Name',\n 'wall_type' => 'Wall Type',\n 'publishing_date' => 'Publishing Date',\n 'realty_type_name' => 'Realty Type Name',\n 'realty_sale_type' => 'Realty Sale Type',\n 'latitude' => 'Latitude',\n 'longitude' => 'Longitude',\n 'main_photo' => 'Main Photo',\n 'building_number_str' => 'Building Number Str',\n 'city_name' => 'City Name',\n 'living_square_meters' => 'Living Square Meters',\n 'realty_type_id' => 'Realty Type ID',\n 'floors_count' => 'Floors Count',\n 'kitchen_square_meters' => 'Kitchen Square Meters',\n 'flat_number' => 'Flat Number',\n 'total_square_meters' => 'Total Square Meters',\n 'realty_id' => 'Realty ID',\n 'date_end' => 'Date End',\n 'district_name' => 'District Name',\n 'advert_type_name' => 'Advert Type Name',\n 'advert_type_id' => 'Advert Type ID',\n 'price_type' => 'Price Type',\n 'created_at' => 'Created At',\n 'levels_expired' => 'Levels Expired',\n 'is_exchange' => 'Is Exchange',\n 'floor' => 'Floor',\n 'is_bargain' => 'Is Bargain',\n 'user' => 'User',\n 'priceUSD' => 'Price Usd',\n 'c1501' => 'C1501',\n 'c1502' => 'C1502',\n 'c1503' => 'C1503',\n 'c1504' => 'C1504',\n 'c443' => 'C443',\n 'c1607' => 'C1607',\n 'c1608' => 'C1608',\n 'c1011' => 'C1011',\n 'c1464' => 'C1464',\n 'c274' => 'C274',\n 'c265' => 'C265',\n 'c1437' => 'C1437',\n 'admin_time_entered' => 'Admin Time Entered',\n }\n */\n\n\n\n }", "public function save() {}", "public function save() {}", "public function save() {}", "public function run()\n {\n $houses = [\n [\n 'title' => 'Cabane de trappeur',\n 'user_id' => 1,\n 'category_id' => 3,\n 'adresse' => 'Gironde, France',\n 'description' => \"Vous vous demandez comment vous mettre dans la peau d’un chasseur, en pleine forêt du Québec / Canada ou des Etats-Unis ? Pas besoin de réserver votre billet d’avion. C’est possible en Gironde, près de Bordeaux !\n Notre domaine d’hébergement insolite peut en effet vous transporter instantanément vers le continent nord-américain. Il vous suffit pour cela de vous installer confortablement dans notre magnifique cabane de trappeur. Si vous êtes séduit par son look « rustique », vous le serez tout autant par son intérieur, dont le niveau de confort vous permet d’y séjourner en toutes saisons.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 99.00,\n 'photo' => 'cabane_trappeur.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'Maisons flottantes aquapesca',\n 'user_id' => 1,\n 'category_id' => 2,\n 'adresse' => 'Corrèze, France',\n 'description' => \"Maison flottante Aquapesca, 4 personnes (optionnel 6 personnes 15 € par nuit et par personne)\n D'une surface totale 54m² dont 30 m² de terrasse, la maison flottante se compose d'une chambre avec lit double 160x200, d'une chambre cabine avec 2 lits superposés 80X190, d'une salle de bain avec douche à l'italienne, d'un WC conventionnel et d'une cuisine équipée, d'un coin salon avec canapé convertible, table basse et TV.\n La terrasse est équipée d'un salon de jardin et de 2 transats. Vous disposez d'une barque à moteur électrique le temps de votre séjour pour découvrir les 32 hectares de notre étang.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 110.00,\n 'photo' => 'cabane_eau.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'La yourte du vigneau',\n 'user_id' => 1,\n 'category_id' => 5,\n 'adresse' => 'Vendée, France',\n 'description' => \"Yourte Mongole en plein cœur du domaine à l'abri des regards\n Vous pourrez profiter d'un séjour en famille dans cette yourte typique de la culture mongole, avec puits de lumière. Calme et tranquillité seront les maîtres mots de votre séjour.\n Cet habitat traditionnel des populations nomades de Mongolie a plus de mille ans d’histoire. De génération en génération, de transhumance en transhumance elle accompagne le peuple mongol, en harmonie avec la nature. Elle est aujourd'hui toujours utilisée.\n \n Tranquillité garantie, aucun vis à vis autour de la yourte\n De nombreuses ballades sont possibles dès l’emplacement, et entre autres le long de la vallée de l’Yon (vallée de Piquet).\n La yourte traditionnelle en bois, écologique, tout le charme de l’authenticité en Vendée pour satisfaire votre envie d'évasion et de nature.\n La yourte est composée d'une armature de bois recouverte de plusieurs couches textiles : feutre isolant, toile imperméable, toile de parement. Ses murs verticaux et son espace circulaire en font un lieu agréable à vivre et relativement grand.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 84.00,\n 'photo' => 'yourte_vigneau.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'La yourte du domaine du chatelet',\n 'user_id' => 1,\n 'category_id' => 5,\n 'adresse' => 'Vosges, France',\n 'description' => \"C’est une véritable yourte mongole traditionnelle de qualité supérieure (adaptée aux climats des Hautes Vosges) aménagée de ces meubles d’origine, elle peut accueillie jusqu’à 5 personnes\n\n Venez goûter au confort de cet habitat nomade aux portes du parc naturel régional des Ballons des Vosges dans un cadre naturel, calme et romantique. Pour votre confort, la Yourte est alimentée en eau froide ( hors période de gèle) et en électricité et dispose d'un chauffage au bois. Elle est équipée à l’intérieur de 5 couchages, (1 lit 2 places, 2 lits 1 place et un lit d'appoint), une table basse avec tabourets, frigo, vaisselle, bouilloire électrique et four micro-onde.\n \n A l’extérieur de la Yourte, sur la terrasse panoramique, un espace sanitaire avec eau froide (hors période de gèle), toilette sèche, table pique-nique, parasol, transats et un barbecue en pierre au pied de la terrasse.\n \n Un espace sanitaire collectif avec douches, WC, et espace plonge est à votre disposition à 80 m de la Yourte.\n \n Il n'est possible de cuisiner à l’intérieur de la Yourte mais vous avez la possibilité de faire un barbecue ou commander des plats préparés chez l'un de nos traiteur partenaire ou faire de la restauration.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 70.00,\n 'photo' => 'yourte_vosges.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'Les wagons du camping le haut village',\n 'user_id' => 1,\n 'category_id' => 7,\n 'adresse' => 'Loire-Atlantique, France',\n 'description' => \"WAGON DE TRAIN:\n\n Le wagon de train (voiture ferroviaire) OCEM Talbot date de 1930.\n\n Il a été récupéré à l'Association des Chemins de fer de Vendée.\n Il possède 4 chambres, un espace repas, une cuisine, une douche et un WC.\n Logement pour 10 personnes.\n \n \n Ce Wagon est équipé de :\n Deux chambres avec un lit double\n Deux chambres avec trois lits d’une place. Les lits sont superposés. Attention, le lit du haut est interdit aux enfants de moins de 6 ans.\n Une cuisine avec évier, réfrigérateur, plaque de cuisson, micro-ondes, four, cafetière et vaisselle. Les petits-déjeuners ne sont pas fournis.\n Douche et WC\n Oreillers et couvertures fournis. Draps et serviettes de toilette non fournis\n TV gratuite\n Terrasse couverte\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 399.00,\n 'photo' => 'train_camping.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => \"Attrap'reves\",\n 'user_id' => 1,\n 'category_id' => 2,\n 'adresse' => 'Bouches-du-Rhone, France',\n 'description' => \"A Allauch, dans les Bouches-du-Rhône on attrapes vos rêves et on les réalise ! Ils sont 5, comme les doigts d’une main, tous dans la famille, chacun avec sa spécialité, pour vous satisfaire. Depuis presque dix ans, le domaine, une pinède de 15 000 m², offre une palette d’hébergements insolites tous aussi craquants les uns que les autres. Une « Aqua'Room», reposante à souhait avec sa déco planante faite de poissons multicolores qui s’ébattent dans deux aquariums géants, une cabane tahitienne entourée de bambous où ne manque que le yukulele, un Lov'nid, une cabane « écureuil » et des bulles transparentes ou semi-transparentes pour admirer en toute quiétude les nuits étoilées. Chacune a sa « personnalité », à choisir selon votre humeur. Toutes sont équipées confortablement. Vous croiserez peut-être Geoffrey ou Bruno sur le domaine. Ce dernier, professionnel de l’hôtellerie, vous concoctera vos petits déjeuners « maison ». Vous pouvez également commander des plateaux-repas à déguster sur la terrasse à côté de votre bulle ou dans un chalet « ad hoc ». Sur place, piscine (seulement à Allauch) et jacuzzi assorti de massages (sur réservation) sont à la disposition des hôtes.\n Chaque hébergement dispose de son chemin d’accès propre, afin de préserver l’intimité des hôtes. Une parenthèse à vivre à deux (éventuellement accompagnés d’un enfant de plus de 6 ans). Le site est ouvert toute l’année. La presse et notamment la presse étrangère, ne tarit pas d’éloges sur ce lieu à part, loin du tourisme de masse aseptisé. A tester d’urgence ! La bonne idée : les bons « cadeau » disponibles sur le site.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 150.00,\n 'photo' => 'bulle.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n \n ];\n DB::table('houses')->insert($houses);\n }", "public function save()\n {\n $this->variableApi->set('ZikulaRoutesModule', 'routeEntriesPerPage', $this->getRouteEntriesPerPage());\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function saving(Api $api)\n {\n if (blank($api->hashcode)) {\n $api->hashcode = uniqid();\n }\n }", "function create($name,$location){\r\n lako::get('ljson')->save($location.\"/{$name}\",array(\r\n 'table' => $name,\r\n 'name' => $name,\r\n 'pkey' => 'id',\r\n 'fields'=> array(\r\n 'id' => array(\r\n 'datatype' => ''\r\n )\r\n ),\r\n 'relations' => array(\r\n 'data' => array(\r\n 'type' => '1-M',\r\n 'path' => ['id','field_id'],\r\n 'object' => 'wp_bp_xprofile_data'\r\n )\r\n )\r\n )\r\n );\r\n \r\n }", "public function _store()\n {\n try{\n if (count($this->data) == 0)\n {\n $this->data = $this->request->all();\n }\n $this->object = $this->model->create($this->data);\n\n Log::info('Guardado');\n return response()->json(['status'=>true,\n 'msj'=>$this->name. 'Guardado',\n $this->name=>$this->object], 200);\n\n }catch (\\Exception $e){\n Log::critical(\"Error, archivo del peo: {$e->getFile()}, linea del peo: {$e->getLine()}, el peo: {$e->getMessage()}\");\n return response()->json([\"msj\"=>\"Error de servidor\"], 500);\n }\n }", "private function saveData()\n { \n // Save form data in session\n if (count($this->post) > 0) {\n $_SESSION['gentlesource_voting_configuration'] = $this->post;\n $this->data = $this->post;\n $this->votingOptions = $this->post['votingOptions'];\n } else {\n if (isset($_SESSION['gentlesource_voting_configuration'])) {\n $this->data = $_SESSION['gentlesource_voting_configuration'];\n $this->votingOptions = $this->data['votingOptions'];\n }\n }\n }", "function store($province,$city,$subdistrict,$village) {\t\t\t\n\t\t$query = \"s.id as sid,store_id,store_name,pa.name as province, ca.name as city FROM store s\n\t\t\tJOIN village_area va ON va.id = s.village_area_id\n\t\t\tJOIN subdistrict_area sa ON sa.id = va.subdistrict_area_id \n\t\t\tJOIN city_area ca ON ca.id = sa.city_area_id\n\t\t\tJOIN province_area pa ON pa.id = ca.province_area_id WHERE\n\t\t\tpa.id = '$province'\";\n\t\t// update by winni 26092016\n\t\tif($city != 'all'){\n\t\t\t$query .= \" AND ca.id='$city'\";\n\t\t}\n\t\tif ($subdistrict != 'all'){\n\t\t\t$query .= \" AND sa.id='$subdistrict'\";\n\t\t}\n\t\tif ($village != 'all'){\n\t\t\t$query .= \" AND va.id = '$village'\";\n\t\t}\n\t\t$data = $this->db->select($query,false)->get()->result();\n\t\theader(\"Content-Type: application/json\");\n\t\tprint_r(json_encode($data));\n\t}", "function save_district_state() {\n $datas = RefineData::getMasterData();\n foreach ($datas as $data) {\n insert_district($data->state, $data->district);\n }\n}", "public function store(CreateCompanyBuildingRequest $request)\n {\n $data = $request->all();\n\n /*echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n\n exit;*/\n\n foreach($data['building_data'] as $arr) {\n \n $input = [];\n $floor = [];\n\n $input['name'] = $arr['name'];\n $input['address'] = $arr['address'];\n $input['zipcode'] = $arr['zipcode'];\n $input['num_floors'] = $arr['num_floors'];\n $input['company_id'] = $data['company_id'];\n\n $companyBuilding = $this->companyBuildingRepository->create($input);\n\n $floors = [];\n\n $i = 0;\n foreach ($arr['floor'] as $fl) {\n\n $floors[$i]['building_id'] = $companyBuilding->id;\n $floors[$i]['company_id'] = $data['company_id'];\n $floors[$i]['floor'] = $fl['floor_number'];\n $floors[$i]['num_rooms'] = $fl['floor_rooms'];\n\n $i++;\n }\n\n $c = $this->companyFloorRoomRepository->insert($floors);\n\n // print_r($companyFloorRoom);\n // $companyFloorRoom = $companyFloorRoom->insert($floors);\n\n }\n\n /*echo \"<pre>\";\n print_r($input);\n echo \"</pre>\";\n\n exit;*/\n\n return response()->json(['success'=>1, 'msg'=>'Company buildings have been added successfully']);\n }", "public function save() {\n \n $fields = array(\"id\", \"title\", \"largeimage\", \"description\", \"credits\", \"activitypoints\", \"activitypointstype\", \"expirydays\", \"enabled\", \"items\");\n \n foreach ($fields as $value)\n {\n if (!isset($_POST[$value]))\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"Unexpected error occured!\";\n $this->view->publish();\n return;\n }\n else if ($_POST[$value] == \"\")\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"You left a field blank!\";\n $this->view->publish();\n return;\n }\n }\n \n $daysUntilExpiry = (time() + (86400 * intval($_POST['expirydays'])));\n \n //R::exec(\"UPDATE site_articles SET article_name = ?, article_topstory = '/c_images/Top_Story_Images/\" . $_POST[\"topstory\"] . \"', article_description = ?, article_story = ? WHERE id = \". $_POST[\"id\"], array($_POST[\"name\"], $_POST[\"description\"], $_POST[\"story\"]));\n \n R::exec(\"UPDATE targeted_offers SET title = ?, description = ?, credits = ?, activity_points = ?, activity_points_type = ?, large_image = ?, expire_time = ?, enabled = ?, items = ? WHERE id = ?\", array($_POST[\"title\"], $_POST[\"description\"], $_POST[\"credits\"], $_POST[\"activitypoints\"], $_POST[\"activitypointstype\"], \"targetedoffers/\" . $_POST[\"largeimage\"], $daysUntilExpiry, $_POST[\"enabled\"], $_POST[\"items\"], $_POST['id']));\n \n MUS(\"reloadoffers\", \"\");\n \n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Success\";\n $this->view->data->alert_type = \"success\";\n $this->view->data->error = \"Targeted offer is saved!\";\n $this->view->publish();\n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'street' => 'required|max:50',\n 'number' => 'required|max:50',\n 'name' => 'max:50',\n \n ]);\n\n $house = New House;\n\n $house->number = $request->number;\n $house->name = $request->name;\n $house->contact = $request->contact;\n $house->street_id = $request->street;\n\n $house->save();\n\n return redirect()->route('houses.index');\n\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function saveDetails() \n {\n // Save the author list.\n $this->authorList->setValue('bookId', $this->bookId);\n $this->authorList->save();\n \n // Save the booklanguage list.\n $this->bookLanguageList->setValue('bookId', $this->bookId);\n $this->bookLanguageList->save();\n }", "public function store(Request $request)\n {\n $house = House::create($request->all);\n\n return response()->json($house, 201);\n }", "public function run()\n {\n $houses = new HousesModel();\n $houses->name = 'Ha Noi hotel';\n $houses->id_address = 1;\n $houses->room = 'khách sạn';\n $houses->number_room = '4';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 10000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 0;\n $houses->save();\n\n $houses = new HousesModel();\n $houses->name = 'HCM hotel';\n $houses->id_address = 2;\n $houses->room = 'khách sạn';\n $houses->number_room = '5';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 10000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 0;\n $houses->save();\n\n $houses = new HousesModel();\n $houses->name = \"Khách sạn\";\n $houses->id_address = 3;\n $houses->room = 'khách sạn';\n $houses->number_room = '3';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 5000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 1;\n $houses->save();\n\n }", "public function post(Request $request, $id){\n $exist = Location::find( $id );\n\n if( !$exist){// hna ida kain had id ya3ni mojoud\n\n $slug = str_slug( $request->slug2 , '_' );// slug ghankhaliw kol kelma wkelma mertabta b _\n\n $array = [// hna ghan3amro had table (array) b les données li ghanjibo men api \n 'id' => $request->id,\n 'phone' => $request->phone,\n 'website' => $request->website,\n 'address' => $request->address,\n 'designation' => $request->slug2,\n // 'locality_id'=>$request->locality_id,\n ];\n\n if( $slug ){// hadi mafhamtekchi chno bghiti te3ml\n $array['slug'] = $slug ;\n }else{\n $array['slug'] = 'slug' ;\n }\n// hna ida fhamt b7al li kate3tih chemain absolu bach tqolo bli location_id howa id d localities\n $locality_exist = Locality::where('locality', $request->locality_id )->where('postal_code', $request->postal_code )->first();\n\n if( $locality_exist ){// hna bsara7a mafhamtchi chbaghi te3ml \n $array['locality_id'] = $locality_exist->id ;\n }else{\n\n $locality = Locality::create(['locality' => $request->locality_id , 'postal_code' => $request->postal_code ]);\n\n $array['locality_id'] = $locality->id ;\n\n }\n// hna gha t creer locations walakin bghit nefham wach lma3na anak katsejla f base de donnée wla kif\n $location = Location::create($array);\n if( $location ){\n return response()->json([\n 'id' => $location->id,\n 'phone' => $location->phone,\n 'website' => $location->website,\n 'address' => $location->address,\n 'designation' => $location->designation,\n 'slug' => $location->slug,\n 'locality_id' => $location->locality_id\n\n ]);\n }else{\n return response()->json(['response' => 'problemme f location']);\n }\n }\n \n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n \"title_name\" => \"required\",\n \"description\" => \"required\",\n \"price\" => \"required\",\n \"Location\" => \"required\",\n \"address\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $data = array(\n 'title'=>$title_name,\n 'description'=>$description,\n 'price'=>$price,\n 'location'[\"description\"]=>$location,\n // 'photos'=>@/Users/hello/Downloads/property6.jpg',\n // 'photos'=>@/Users/hello/Downloads/property2.jpg',\n 'location[\"address\"]'=>$address,\n 'location[\"coordinates\"]'=>array(\n [0]=>$lat,\n [1]=>$long\n )\n );\n\n $token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNTBjN2E3NTUxYWQ4MGJhMjI2MzYyNSIsImlhdCI6MTU5OTEyOTcxMSwiZXhwIjoxNjA2OTA1NzExfQ.p8iG1eorMOMSCKdIyyBaHFlmJTmvdUa7KHINWPtfNTg\";\n $url = 'http://ec2-52-14-234-54.us-east-2.compute.amazonaws.com/api/v1/property/createProperty';\n $ch = curl_init($url);\n $header=array(\n 'Content-Type:application/json',\n 'Authorization: Bearer '.$token\n );\n\n curl_setopt($ch,CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n curl_close($ch);\n $propertyList = json_decode($result);\n\n session()->flash('message', 'New Property Created Successfully !');\n session()->flash('class', '1');\n return redirect()->route('property');\n }", "public function store(Request $request)\n {\n if(!empty($request->get('id'))){\n\n $long = $request->get('long');\n $lat = $request->get('lat');\n\n $data = Data::where('id', '=', $request->get('id'))->first();\n\n if($data->cep != $request->get('cep')){\n $endpoint = 'https://www.google.com/maps/search/' . $request->street . '+' . $request->number . '+' . $request->neighborhood . '+' . $request->city . '+' . $request->state;\n $endpoint = str_replace(' ', '%20', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $long = $group[2];\n $lat = $group[3];\n }\n\n Data::where('id', '=', $request->get('id'))->update(\n [\n 'status' => $request->get('status'),\n 'street' => $request->get('street'),\n 'number' => $request->get('number'),\n 'neighborhood' => $request->get('neighborhood'),\n 'city' => $request->get('city'),\n 'state' => $request->get('state'),\n 'cep' => $request->get('cep'),\n 'whatsapp' => $request->get('whatsapp'),\n 'lat' => $lat,\n 'long' => $long,\n ]\n );\n\n return redirect()->back()->with('success', 'Atualizado com sucesso ...'); \n }\n\n $data = new Data();\n $data->user_id = Auth::user()->id;\n $data->fill($request->all());\n\n $endpoint = 'https://www.google.com/maps/place/' . $data->street . '+' . $data->number . '+' . $data->neighborhood . '+' . $data->city . '+' . $data->state;\n $endpoint = str_replace(' ', '+', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $data->long = $group[2];\n $data->lat = $group[3];\n\n $data->save();\n \n return redirect()->back()->with('success', 'Atualizado com sucesso'); \n }", "public function save(){\n\n // Authenticate as admin\n $user = User::fetch_by_session();\n if($user === false) return $this->zajlib->json(['status'=>'error', 'message'=>'Your user session has expired!']);\n if($user->data->admin != 'admin') return $this->zajlib->json(['status'=>'error', 'message'=>'Your user account does not have rights to perform this action!']);\n\n // Fetch the photo\n $photo = Photo::fetch($_POST['id']);\n $photo->set_with_data($_POST, ['name', 'alttext', 'caption']);\n $photo->save();\n\n return $this->zajlib->json(['status'=>'ok']);\n }", "public function save()\n {\n $this->data = [\n 'pb_name' => \\Input::get('pb_name'),\n 'title' => \\Input::get('title'),\n 'subtitle' => \\Input::get('subtitle'),\n 'description' => \\Input::get('description'),\n 'css_classes' => \\Input::get('css_classes'),\n 'image_ref' => \\Pageblok::uploadFile(\\Input::file('image_ref')),\n 'hyperlink' => \\Input::get('hyperlink'),\n 'template' => \\Input::get('template'),\n 'content_type' => \\Input::get('content_type'),\n 'content' => \\Input::get('content'),\n 'published' => \\Input::get('published'),\n 'start_datetime' => \\Carbon::parse(\\Input::get('start_datetime'))->format('Y-m-d H:i:s'),\n 'end_datetime' => \\Carbon::parse(\\Input::get('end_datetime'))->format('Y-m-d H:i:s'),\n 'address' => \\Input::get('address'),\n 'city' => \\Input::get('city'),\n 'country' => \\Input::get('country'),\n 'group' => \\Input::get('group'),\n 'created_by' => \\Auth::user()->id,\n ];\n\n if ($this->data['address'] && $this->data['city']) {\n $this->data['latitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['latitude'];\n }\n $this->data['longitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['longitude'];\n\n return parent::save();\n }", "public function run()\n {\n $houses = '[\n {\n \"_key\":\"targaryan\",\n \"name\":\"Targaryan\",\n \"location_key\":\"dragonstone\"\n },\n {\n \"_key\":\"stark\",\n \"name\":\"Stark\",\n \"location_key\":\"winterfell\"\n },\n {\n \"_key\":\"lannister\",\n \"name\":\"Lannister\",\n \"location_key\":\"king-s-landing\"\n }\n ]';\n\n $houses = json_decode($houses, JSON_OBJECT_AS_ARRAY);\n\n foreach ($houses as $house) {\n Location::insert($house);\n }\n }", "public function save() {\n\t\t\t\n\t\t}", "public function persistData($data_obj)\n\t{\n\t\t$new_instance = new location();\n\t\t$em = $this->controller_obj->getDoctrine()->getManager();\n\t\t$new_instance->setLatitude($data_obj->getLatitude());\n\t\t$new_instance->setLongitude($data_obj->getLongitude());\n\t\t$address_repo = $em->getRepository(\"WebManagementBundle:address\");\n\t\t$address = $address_repo->find($data_obj->getSelectAddress());\n\t\t$new_instance->setAddress($address);\t\t\t\n\t\t$new_instance->setDescription($data_obj->getDescription());\t\t\t\n\t\t$em->persist($new_instance);\n\t\t$em->flush();\n\t}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function saveInformationAction() {\r\n $photo_id = $this->_getParam('photo_id');\r\n $title = $this->_getParam('title', null);\r\n $description = $this->_getParam('description', null);\r\n $location = $this->_getParam('location', null);\r\n if (($this->_getParam('lat')) && ($this->_getParam('lng')) && $this->_getParam('lat', '') != '' && $this->_getParam('lng', '') != '') {\r\n $dbGetInsert = Engine_Db_Table::getDefaultAdapter();\r\n $dbGetInsert->query('INSERT INTO engine4_sesbasic_locations (resource_id, lat, lng , resource_type) VALUES (\"' . $photo_id . '\", \"' . $this->_getParam('lat') . '\",\"' . $this->_getParam('lng') . '\",\"sesvideo_chanelphoto\")\tON DUPLICATE KEY UPDATE\tlat = \"' . $this->_getParam('lat') . '\" , lng = \"' . $this->_getParam('lng') . '\"');\r\n }\r\n Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->update(array('title' => $title, 'description' => $description, 'location' => $location), array('chanelphoto_id = ?' => $photo_id));\r\n }", "function Save($data= array())\n\t{\t$fail = array();\n\t\t$success = array();\n\t\t$fields = array();\n\t\t$admin_actions = array();\n\t\t\n\t\tif ($loctitle = $this->SQLSafe($data[\"loctitle\"]))\n\t\t{\t$fields[] = \"loctitle='$loctitle'\";\n\t\t\tif ($this->id && ($data[\"loctitle\"] != $this->details[\"loctitle\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Title\", \"actionfrom\"=>$this->details[\"loctitle\"], \"actionto\"=>$data[\"loctitle\"]);\n\t\t\t}\n\t\t} else\n\t\t{\t$fail[] = \"title missing\";\n\t\t}\n\t\t\n\t\t$address = $this->SQLSafe($data[\"address\"]);\n\t\t$fields[] = \"address='$address'\";\n\t\tif ($this->id && ($data[\"address\"] != $this->details[\"address\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Address\", \"actionfrom\"=>$this->details[\"address\"], \"actionto\"=>$data[\"address\"]);\n\t\t}\n\t\t\n\t\t$directions = $this->SQLSafe($data[\"directions\"]);\n\t\t$fields[] = \"directions='$directions'\";\n\t\tif ($this->id && ($data[\"directions\"] != $this->details[\"directions\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Directions\", \"actionfrom\"=>$this->details[\"directions\"], \"actionto\"=>$data[\"directions\"]);\n\t\t}\n\t\t\n\t\tif (is_numeric($data[\"googlelat\"]))\n\t\t{\t$googlelat = round($data[\"googlelat\"], 6);\n\t\t} else\n\t\t{\t$googlelat = \"\";\n\t\t}\n\t\t$fields[] = \"googlelat='\" . $googlelat . \"'\";\n\t\tif ($this->id && ($googlelat != $this->details[\"googlelat\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Latitude\", \"actionfrom\"=>$this->details[\"googlelat\"], \"actionto\"=>$googlelat);\n\t\t}\n\t\t\n\t\tif (is_numeric($data[\"googlelong\"]))\n\t\t{\t$googlelong = round($data[\"googlelong\"], 6);\n\t\t} else\n\t\t{\t$googlelong = \"\";\n\t\t}\n\t\t$fields[] = \"googlelong='\" . $googlelong . \"'\";\n\t\tif ($this->id && ($googlelong != $this->details[\"googlelong\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Longitude\", \"actionfrom\"=>$this->details[\"googlelong\"], \"actionto\"=>$googlelong);\n\t\t}\n\t\t\n\t\t// city\n\t\tif ($city = (int)$data[\"city\"])\n\t\t{\tif ($cities = $this->CityList())\n\t\t\t{\tif ($cities[$city])\n\t\t\t\t{\t$fields[] = \"city=$city\";\n\t\t\t\t\tif ($this->id && ($city != $this->details[\"city\"]))\n\t\t\t\t\t{\t$admin_actions[] = array(\"action\"=>\"City\", \"actionfrom\"=>$this->details[\"city\"], \"actionto\"=>$city, \"actiontype\"=>\"link\", \"linkmask\"=>\"cityedit.php?id={linkid}\");\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\t$fail[] = \"city invalid\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t{\t$fail[] = \"city missing\";\n\t\t}\n\t\t\n\t\tif ($this->id || !$fail)\n\t\t{\t$set = implode(\", \", $fields);\n\t\t\tif ($this->id)\n\t\t\t{\t$sql = \"UPDATE locations SET $set WHERE locid={$this->id}\";\n\t\t\t} else\n\t\t\t{\t$sql = \"INSERT INTO locations SET $set\";\n\t\t\t}\n\t\t\tif ($this->db->Query($sql))\n\t\t\t{\tif ($this->db->AffectedRows())\n\t\t\t\t{\tif ($this->id)\n\t\t\t\t\t{\t$base_parameters = array(\"tablename\"=>\"locations\", \"tableid\"=>$this->id, \"area\"=>\"locations\");\n\t\t\t\t\t\tif ($admin_actions)\n\t\t\t\t\t\t{\tforeach ($admin_actions as $admin_action)\n\t\t\t\t\t\t\t{\t$this->RecordAdminAction(array_merge($base_parameters, $admin_action));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$success[] = \"Changes saved\";\n\t\t\t\t\t} else\n\t\t\t\t\t{\t$this->id = $this->db->InsertID();\n\t\t\t\t\t\t$success[] = \"New location created\";\n\t\t\t\t\t\t$this->RecordAdminAction(array(\"tablename\"=>\"locations\", \"tableid\"=>$this->id, \"area\"=>\"locations\", \"action\"=>\"created\"));\n\t\t\t\t\t}\n\t\t\t\t\t$this->Get($this->id);\n\t\t\t\t\n\t\t\t\t} else\n\t\t\t\t{\tif (!$this->id)\n\t\t\t\t\t{\t$fail[] = \"Insert failed\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array(\"failmessage\"=>implode(\", \", $fail), \"successmessage\"=>implode(\", \", $success));\n\t\t\n\t}", "public function save_tracking($email,$lat,$long,$adress)\n {\n\n$gpis = new Gpi();\n$gpis->email = $email;\n$gpis->lat = $lat;\n$gpis->long = $long;\n$gpis->adress = $adress;\ntry {\n $gpis->save();\n return \"[{\".'\"status\":'.'\"Uploaded Successfully\"'.\"}]\"; \n \n} catch (Exception $e) {\n\n return \"[{\".'\"status\":'.'\"Error on Save please Try again\"'.\"}]\";\n}\n\n\n \n }", "public function saveDetails() \n {\n $bindingId = $this->bindingId;\n $bookList = $this->bookList;\n $scanList = $this->scanList;\n $provenanceList = $this->provenanceList;\n $bindingLanguageList = $this->bindingLanguageList;\n return Database::getInstance()->doTransaction(function() use ($bindingId, $bookList, $scanList, \n $provenanceList, $bindingLanguageList)\n {\n // Save the book list.\n $bookList->setValue('bindingId', $bindingId);\n $bookList->save();\n \n // Load all book details.\n foreach($bookList as $book)\n {\n $book->loadDetails(); \n }\n \n // Save the scan list.\n $scanList->setValue('bindingId', $bindingId);\n $scanList->save();\n \n // Save the provenance list.\n $provenanceList->setValue('bindingId', $bindingId);\n $provenanceList->save();\n \n // Save the language list.\n $bindingLanguageList->setValue('bindingId', $bindingId);\n $bindingLanguageList->save();\n });\n }", "public static function storeFromApi($result)\n {\n $office = static::findOrNewWithTrashed($result['id']);\n $office->id = $result['id'];\n\n if (isset($result['brokerage']['id'])) {\n $office->brokerage_id = $result['brokerage']['id'];\n }\n\n if (array_key_exists('name', $result)) {\n $office->name = $result['name'];\n }\n\n if (array_key_exists('main', $result)) {\n $office->main = $result['main'];\n }\n\n\n if (isset($result['address'])) {\n $office->street_address = $result['address']['street_address'];\n $office->extended_address = $result['address']['extended_address'];\n $office->locality = $result['address']['locality'];\n $office->region = $result['address']['region'];\n $office->postal_code = $result['address']['postal_code'];\n $office->country_code = $result['address']['country_code'];\n $office->po_box = $result['address']['po_box'];\n $office->latitude = $result['address']['latitude'];\n $office->longitude = $result['address']['longitude'];\n }\n\n\n if (array_key_exists('time_zone', $result)) {\n $office->time_zone = $result['time_zone'];\n }\n\n if (array_key_exists('phone', $result)) {\n $office->phone = $result['phone'];\n }\n\n if (array_key_exists('fax', $result)) {\n $office->fax = $result['fax'];\n }\n\n if (array_key_exists('pos', $result)) {\n $office->pos = $result['pos'];\n }\n\n if (array_key_exists('evopay', $result)) {\n $office->evopay = $result['evopay'];\n }\n\n if (array_key_exists('evopay_discount', $result)) {\n $office->evopay_discount = $result['evopay_discount'];\n }\n\n if (array_key_exists('url', $result)) {\n $office->url = $result['url'];\n }\n\n if (array_key_exists('created_at', $result)) {\n $office->tevo_created_at = new Carbon($result['created_at']);\n }\n if (array_key_exists('updated_at', $result)) {\n $office->tevo_updated_at = new Carbon($result['updated_at']);\n }\n if (array_key_exists('deleted_at', $result)) {\n $office->tevo_deleted_at = new Carbon($result['deleted_at']);\n }\n\n /**\n * If we have a deleted_at value then we are deleting the item\n * but we need to ensure that we save() it first to record some\n * data and to ensure it actually even exists. We do this via\n * the saveThenDelete() method which does not trigger any of the\n * saving events (but it does trigger the deleting events).\n */\n if (!empty($result['deleted_at'])) {\n $office->saveThenDelete();\n\n // Fire an event that it was deleted\n EventFacade::fire(new ItemWasDeleted($office));\n } else {\n if ($office->save()) {\n // Fire an event if an INSERT or UPDATE was actually performed\n // But NOT if we are deleting.\n EventFacade::fire(new ItemWasStored($office));\n }\n\n\n /**\n * Get all of the already associated email addresses and\n * delete() any that are no longer active.\n */\n $activeEmailAddresses = [];\n if (!empty($result['email'])) {\n $activeEmailAddresses = $result['email'];\n }\n\n foreach ($office->emailAddresses() as $emailAddress) {\n if (!in_array($emailAddress->email_address, $activeEmailAddresses)) {\n // If it isn't in the array then it is no longer active, kill it.\n if ($emailAddress->delete()) {\n EventFacade::fire(new ItemWasDeleted($emailAddress));\n }\n } else {\n // Otherwise unset() it so that we're left with any\n // $activeEmailAddresses that need to be created\n unset($activeEmailAddresses['$emailAddress->email_address']);\n }\n }\n unset($emailAddress);\n\n // Any addresses left in $activeEmailAddresses do not yet exist\n // and need to be created.\n foreach ($activeEmailAddresses as $email_address) {\n if ($newEmailAddress = OfficeEmailAddress::firstOrCreate([\n 'office_id' => $result['id'],\n 'email_address' => strtolower($email_address),\n ])\n ) {\n EventFacade::fire(new ItemWasStored($newEmailAddress));\n }\n }\n unset($email_address);\n\n\n /**\n * Get all of the already associated hours and\n * delete() any that are no longer active.\n */\n $activeHours = $result['hours'];\n\n foreach ($office->hours() as $hour) {\n if (!in_array($hour->id, array_column($activeHours, 'id'))) {\n // If it isn't in the array then it is no longer active, kill it.\n if ($hour->delete()) {\n EventFacade::fire(new ItemWasDeleted($hour));\n }\n } else {\n // Otherwise unset() it so that we're left with any\n // $activeEmailAddresses that need to be created\n unset($activeHours[array_search($hour->id, $activeHours)]);\n }\n }\n unset($hour);\n\n // Any addresses left in $activeEmailAddresses do not yet exist\n // and need to be created.\n foreach ($activeHours as $operatingHours) {\n foreach ($operatingHours as $hour) {\n $officeHour = OfficeHour::findOrNewWithTrashed($hour['id']);\n $officeHour->id = $hour['id'];\n $officeHour->office_id = $result['id'];\n $officeHour->day_of_week = $hour['day_of_week'];\n $officeHour->closed = $hour['closed'];\n $officeHour->open = Carbon::parse($hour['open'])->toTimeString();\n $officeHour->close = Carbon::parse($hour['close'])->toTimeString();\n\n if ($officeHour->save()) {\n EventFacade::fire(new ItemWasStored($officeHour));\n }\n }\n }\n unset($hour);\n\n\n }\n\n return $office;\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function save(){\n $data = file_get_contents('php://input');\n //saving data and getting inserted id or the existing one\n $this->id = $this->_so->save($data);\n //returning saved object for frontend sync\n return $this->byId();\n }", "function createRoad() {\r\n $new_RoadID = false;\r\n if (isset($_REQUEST['RoadID'])) {\r\n $new_RoadID = intval(trim($_REQUEST['RoadID']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"RoadID is not given.\");\r\n exit();\r\n }\r\n $new_PlayerID = false;\r\n if (isset($_REQUEST['PlayerID'])) {\r\n $new_PlayerID = intval(trim($_REQUEST['PlayerID']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"PlayerID is not given.\");\r\n exit();\r\n }\r\n $new_Available = false;\r\n if (isset($_REQUEST['Available'])) {\r\n $new_Available = intval(trim($_REQUEST['Available']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"Available is not given.\");\r\n exit();\r\n }\r\n if ($new_RoadID && $new_PlayerID && $new_Available) {\r\n $Road = Road::create($new_RoadID, $new_PlayerID, $new_Available);\r\n if ($Road == null) {\r\n header(\"HTTP/1.0 500 Server Error\");\r\n print(\"Road was not inserted\");\r\n exit();\r\n }\r\n header(\"Content-type: application/json\");\r\n print($Road->getJSON());\r\n exit();\r\n }\r\n }", "public function update(Request $request, HouseholdDetail $householdDetail)\n {\n //\n\n\n $data = $request->all();\n\n $validator = Validator::make($data, [\n 'mobile_no' => 'required',\n 'qr_code_id' => 'required',\n 'user_id' => 'required',\n 'building_id' => 'required',\n ]);\n \n if($validator->fails()){\n return response([ 'data' => null, 'message' => 'Required fields missing'], 200);\n }\n\n $householdDetail->mobile_no = $request->mobile_no;\n $householdDetail->building_id = $request->building_id;\n $householdDetail->user_id = $request->user_id;\n $householdDetail->qr_code_id = $request->qr_code_id;\n //$householdDetail->name = $request->name;\n $householdDetail->total_female = $request->total_female;\n $householdDetail->total_male = $request->total_male;\n $householdDetail->total_above_60 = $request->total_above_60;\n $householdDetail->total_below_10 = $request->total_below_10;\n $householdDetail->emergency_contact_no = $request->emergency_contact_no;\n $householdDetail->nationality = $request->nationality;\n \n $household = $householdDetail->save();\n\n if($household){\n return response([ 'data' => new HouseholdDetailResource($householdDetail), 'message' => 'Updated household successfully'], 200);\n }\n else{\n return response([ 'data' => null, 'message' => 'Error updating household, try again'], 200);\n } \n }", "function Create($userid,$lat,$long,$img)\n {\n $response=array();\n $response[\"success\"]=0; \n $response[\"content\"]= \"\";\n $response[\"message\"]=\"\";\n \n $park= new ParkLocation();\n $park->creator_id=$userid;\n $park->setLocation($long, $lat);\n \n $stta = (isset($this->Search($lat,$long)[\"content\"][0][\"address\"]))?true:false;\n \n $park->streetname=($park->streetname==\"\" && $stta)?$this->Search($lat,$long)[\"content\"][0][\"address\"]:\"undefined\";\n $park->streetImage=$img;\n \n $response[\"content\"]=$park;\n if($park->validated())\n { \n $model = new ParkModel($park,$this->db);\n $model->Attach($this);\n \n if(!$model->IsExists())\n {\n $status= $model->Create();\n if($status){\n $response[\"success\"]=$status;\n $response[\"message\"]=\"Successfully added\";\n }else\n {\n $response[\"message\"]=\"could not add the park details\";\n $response[\"success\"]=-1;\n $response[\"content\"]= $model->getError();\n }\n }else \n {\n $response[\"success\"]=-1; \n $response[\"content\"]= $park;\n $response[\"message\"]=\"Someone as already add this address as a park\";\n }\n \n \n }else\n {\n $response[\"content\"]=$park;\n $response[\"success\"]=-1; \n $response[\"message\"]=$park->getError();\n }\n return $response;\n }", "public function store(Request $request)\n {\n //\n $floor=new floorModel();\n $floor->intFloorNum=$request->txtFNum;\n $floor->intBuilCode=$request->comBuilding;\n $floor->intNumOfUnit=$request->txtUNum;\n $floor->save();\n return Response::json(\"success store\");\n\n }", "public function addressAction()\n {\n// echo $composeCurl;\n// $salida = exec($composeCurl);\n// sleep(40);\n// $this->output(sprintf('STEP 2 Import Locality finished', $salida));\n \n $directory = ConsoleController::documentRootDir.'/data/officialstations';\n $country = 'ES';\n $file = 'address.json';\n \n $request = $this->getRequest();\n $filename = $request->getParam('filename', false);\n $verbose = $request->getParam('verbose', false) || $request->getParam('v', false);\n \n echo $directory.'/'.$file.\"\\n\";\n \n $content = file_get_contents($directory.'/'.$file);\n// print_r($content);\n $content = json_decode($content);\n $ListaEESSPrecio = (array) $content->ListaEESSPrecio;\n// print_r($content);\n foreach($ListaEESSPrecio as $key => $value)\n {\n // $value['created'] = '2014-06-14';\n $result = $this->stationMapper->saveAddress((array)$value);\n// print_r($value);\n }\n }", "public function createmerchant()\n {\n $natureofbusiness = $_POST['natureofbusiness'];\n $telephone = $_POST['telephone'];\n $atelephone = $_POST['atelephone'];\n $tin = $_POST['tin'];\n $businessname = $_POST['businessname'];\n $businessemail = $_POST['businessemail'];\n $website = $_POST['website'];\n $businesstype = $_POST['accounttype'];\n $businesscategory = $_POST['businesscategory'];\n $revenue = $_POST['revenue'];\n $numberofemployees = $_POST['numberofemployees'];\n $numberofbranches = $_POST['numberofbranches'];\n $averagerevenue = $_POST['averagerevenue'];\n\n\n\n //Save Businesss\n $business = new Business();\n $business->recordObject->businessname = $businessname;\n $business->recordObject->email = $businessemail;\n $business->recordObject->natureofbusiness = $natureofbusiness;\n $business->recordObject->tinnumber = $tin;\n $business->recordObject->mobile = $atelephone;\n $business->recordObject->website = $website;\n $business->recordObject->accounttype = $businesstype;\n $business->recordObject->businesscategory = $businesscategory;\n $business->recordObject->revenue = $revenue;\n $business->recordObject->numberofemployees = $numberofemployees;\n $business->recordObject->numberofbranches = $numberofbranches;\n $business->recordObject->telephone = $telephone;\n $business->recordObject->averagerevenue = $averagerevenue;\n $business->recordObject->status = 1;\n $business->store();\n\n //Extract business id\n $business_id = $business->recordObject->busid;\n\n $popularname = $_POST['popularname'];\n $city = $_POST['city'];\n $street = $_POST['street'];\n $region = $_POST['region'];\n $assembly = $_POST['assembly'];\n $unitno = $_POST['unitno'];\n $housenumber = isset($_POST['housenumber']) ? $_POST['housenumber'] : '';\n $longitude = $_POST['longitude'];\n $latitude = $_POST['latitude'];\n $buildingno = $_POST['buildingno'];\n\n //Save Location\n $location = new Location();\n $location->recordObject->popularname = $popularname;\n $location->recordObject->city = $city;\n $location->recordObject->street = $street;\n $location->recordObject->region = $region;\n $location->recordObject->assembly = $assembly;\n $location->recordObject->unitno = $unitno;\n $location->recordObject->housenumber = $housenumber;\n $location->recordObject->longitude = $longitude;\n $location->recordObject->latitude = $latitude;\n $location->recordObject->buildingno = $buildingno;\n $location->store();\n\n //Extract location id\n $location_id = $location->recordObject->location_id;\n $locationBusiness = LocationBusiness::saveBusinessLocation($location_id, $business_id);\n if ($locationBusiness) {\n $data['success'] = \"Saved All Data Succesfully\";\n $_SESSION[\"success\"] = $data['success'];\n $data['location_id'] = $location_id;\n $data['business_id'] = $business_id;\n $this->view('pages/createmerchant', $data);\n } else {\n $error = \"Failed To Save All Data Successfuly\";\n $_SESSION[\"error\"] = $error;\n $this->view('pages/createmerchant', $error);\n }\n }", "public function store(Request $request){\n\n $validator = Validator::make($request->all(),[\n 'title' => 'required|min:10|max:300',\n 'rooms'=>'required|numeric|min:1',\n 'beds' =>'required|numeric|min:1',\n 'bathrooms'=>'required|min:1',\n 'sm'=>'required|min:1',\n 'address'=>'required|min:3',\n 'latitude'=>'required',\n 'longitude'=>'required',\n 'city'=>'required|min:1',\n 'postal_code'=>'required',\n 'country'=>'required',\n 'daily_price'=>'required',\n 'description'=>'required|min:20',\n 'user_id'=>'numeric|exists:users,id',\n ],\n [\n 'required'=>':attribute is a required field',\n 'numeric'=>':attribute must be a number',\n 'exists'=>'the room need to be associated to an existing user',\n ]\n );\n if($validator->fails()){\n $error = $validator->messages();\n return response()->json($error);\n }\n $apartment = Apartment::create($request->all());\n /// iserisce i servizi nella tabella pivot\n $apartment->services()->attach($request['services']);\n\n // if (!empty($request['img'])) {\n // $request['img'] = Storage::disk('public')->put('images', $request['img']);\n // }\n\n return response()->json($apartment,201);\n\n }", "public function store(Request $request)\n {\n \n $footprintParams = [\n 'activity' => $request->input('activity'),\n 'activityType' => $request->input('activityType'),\n 'country' => $request->input('country')\n ];\n\n $insertParams = [\n 'activity' => $request->input('activity'),\n 'activity_type' => $request->input('activityType'),\n 'country' => $request->input('country')\n ];\n\n if(!empty($request->input('fuelType'))){\n $footprintParams['fuelType'] = $request->input('fuelType');\n $insertParams['fuel_type_id'] = DB::table('fuelType')->where('name', $request->input('fuelType'))->first();\n }\n\n if(!empty($request->input('mode'))){\n $footprintParams['mode'] = $request->input('mode');\n $insertParams['mode_id'] = DB::table('modes')->where('name', $request->input('mode'))->first();\n }\n\n $response = $this->footprintRepository->getFootprint($footprintParams);\n // $insertParams['response'] = $response->getData();\n // DB::table('footprints')->insert([$insertParams]);\n return $response;\n\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'mission' => 'required',\n 'vision' => 'required',\n 'story' => 'required',\n 'founder' => 'required',\n 'college' => 'required|integer',\n 'date_of_foundation' => 'required|date',\n 'sponsor'=> 'array',\n 'sponsor.*'=> 'integer'\n ]);\n $hih = \\App\\HIH::count();\n if ($hih != 0){\n return redirect('/aboutus')->with('error', 'The Hand in Hand\\'s information already exists!');\n }\n $hih = new \\App\\HIH;\n $hih->mission = $request->input('mission');\n $hih->vision = $request->input('vision');\n $hih->founder = $request->input('founder');\n $hih->story = $request->input('story');\n $hih->college_id = $request->input('college');\n $hih->date_of_foundation = $request->input('date_of_foundation');\n $hih->president_id = Auth::user()->id;\n $hih->save();\n\n \\App\\Highboard::truncate();\n if($request->input('highboard')){\n foreach ($request->input('highboard') as $highboard) {\n $Highboard = new \\App\\Highboard;\n $Highboard->member_id = $highboard;\n $Highboard->save();\n }\n }\n \n if($request->input('sponsor')){\n foreach ($request->input('sponsor') as $sponsor) {\n $HIHSponsor = new \\App\\HIHSponsors;\n $HIHSponsor->sponsor_id = $sponsor;\n $HIHSponsor->save();\n }\n }\n\n return redirect('/aboutus')->with('success', 'The Hand In Hand\\'s information has been created.');\n \n }", "function saveFieldsDatastoreAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n \n Zend_Loader::loadClass('Table_FieldSummary');\n $fieldSummaryTable = new Table_FieldSummary();\n \n //echo \"data made it!\";\n //return;\n \n $cnt = 0;\n $recordArray = Zend_Json::decode($_REQUEST['datastore'], Zend_Json::TYPE_OBJECT);\n //Zend_Debug::dump($recordArray);\n foreach ($recordArray as $record) \n {\n //Zend_Debug::dump($record);\n $where = $fieldSummaryTable->getAdapter()->quoteInto('pk_field = ?', $record->pk_field);\n $data = array('field_type' => $record->field_type,\n 'field_label' => $record->field_label,\n 'prop_desc' => $record->prop_desc,\n 'prop_type' => $record->prop_type);\n $fieldSummaryTable->update($data, $where);\n ++$cnt;\n } \n echo $cnt;\n }", "public function saving(Apartment $apartment) {\n if($apartment->isDirty('name')) {\n $apartment->slug = Str::slug($apartment->name . \" \" . mt_rand(0, 10000), '_');\n }\n\n if($apartment->isDirty(['price', 'currency'])) {\n if(isset($apartment->currency) && strtoupper($apartment->currency) != env('DEFAULT_CURRENCY', 'EUR')) {\n $convertedToDefaultCurrency = convert_currency($apartment->price, $apartment->currency, env('DEFAULT_CURRENCY', 'EUR'));\n if($convertedToDefaultCurrency) {\n $apartment->price = $convertedToDefaultCurrency;\n $apartment->currency = env('DEFAULT_CURRENCY', 'EUR');\n }\n }\n }\n }", "public function saveToDB()\n {\n }", "public function savegeneralinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$address = $input['generalinfo']['property_address'];\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t$propertydesc = str_replace(\"\\n\",\"<br />\",$input['generalinfo']['property_desc']);\n\t\t//echo $propertydesc; die();\n\t\t\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$propertydata->property_name = $input['generalinfo']['property_name'];\n\t\t\t$propertydata->property_location = $request['generalinfo']['property_location'];\n\t\t\t$propertydata->property_desc = $propertydesc;\n\t\t\t$propertydata->property_state = $request['generalinfo']['property_state'];\n\t\t\t$propertydata->property_city = $request['generalinfo']['property_city'];\n\t\t\t$propertydata->property_seourl = $request['generalinfo']['property_seourl'];\n\t\t\t$propertydata->property_email = $request['generalinfo']['property_email'];\n\t\t\t$propertydata->property_address = $request['generalinfo']['property_address'];\n\t\t\t$propertydata->property_postalcode = $request['generalinfo']['property_postalcode'];\n\t\t\t$propertydata->property_phoneno = $request['generalinfo']['property_phoneno'];\n\t\t\t$propertydata->property_status = trim($request['generalinfo']['property_status']);\n\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function store()\n {\n try {\n $input = Request::onlyLegacy('name');\n $validator = Validator::make($input, ['name' => 'required']);\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n try {\n $pb = $this->service->addNewPB($input['name'], $input);\n\n return ApiResponse::success([\n 'message' => trans('response.success.saved', ['attribute' => 'Progress Board']),\n 'data' => $this->response->item($pb, new ProductionBoardTransformer)\n ]);\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n }", "private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }" ]
[ "0.6158201", "0.61282796", "0.6126096", "0.6077741", "0.6012739", "0.59959525", "0.5984435", "0.59579444", "0.59231687", "0.588005", "0.58591515", "0.5828687", "0.5826385", "0.5815575", "0.57798016", "0.5759381", "0.57567835", "0.5684596", "0.56678474", "0.56493664", "0.56486434", "0.56415164", "0.5628133", "0.56122833", "0.56031436", "0.5581922", "0.55739546", "0.55649316", "0.55649316", "0.55623126", "0.5560166", "0.5556929", "0.55569196", "0.5550954", "0.55273396", "0.55184877", "0.5504708", "0.5494301", "0.5485764", "0.54831207", "0.5474474", "0.54607546", "0.5454307", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.5444978", "0.5444938", "0.54437405", "0.5423779", "0.5421076", "0.54164916", "0.54136246", "0.5401928", "0.53940177", "0.5388707", "0.5380115", "0.5377979", "0.5377979", "0.5377979", "0.5377979", "0.5377979", "0.53721297", "0.5370345", "0.5362336", "0.5359617", "0.5354531", "0.5348799", "0.5348197", "0.5345189", "0.5342186", "0.533682", "0.5330346", "0.5328988", "0.5320498", "0.53192496", "0.5318012", "0.53151184", "0.53150326", "0.5312595", "0.53088385", "0.5308806", "0.5307408", "0.53069127", "0.53065556" ]
0.7213015
0
// CodeGenrator PHP File class methods // // Get codeblock from source.
protected function _getCodeBlock(&$source, $block, $prefix='/*', $suffix='*/'){ $block = new CodeGeneratorCodeBlockPHP($source, $block, $prefix, $suffix); if($block->exist()){ return $block; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSourceFile() ;", "public function getCode()\n {\n if ( $this->isInternal() ) {\n $code = '/* ' . $this->getName() . ' is an internal function.'\n . ' Therefore the source code is not available. */';\n } else {\n $filename = $this->getFileName();\n\n $start = $this->getStartLine();\n $end = $this->getEndLine();\n\n $offset = $start - 1;\n $length = $end - $start + 1;\n \n $lines = array_slice( file( $filename ), $offset, $length );\n\n if ( strpos( trim( $lines[0] ), 'function' ) !== 0 ) {\n $lines[0] = substr( $lines[0], strpos( $lines[0], 'function' ) );\n }\n\n $code = implode( '', $lines );\n }\n return $code;\n }", "final function getCode();", "static function ParseCode($source) {\n\t\tglobal $phpTokens;\n\t\t\n\t\t$alltokens = token_get_all($source);\n\t\t$tokens = array();\n\t\t$interesting = array( \n\t\t\tT_DOC_COMMENT, T_FUNCTION, T_STRING, T_VARIABLE, T_CLASS, T_INCLUDE, T_INCLUDE_ONCE, T_REQUIRE, \n\t\t\tT_REQUIRE_ONCE, T_CONSTANT_ENCAPSED_STRING, T_DNUMBER,T_LNUMBER, T_SPECIAL_BRACKET, T_INTERFACE);\n\t\t$opentagfound = false;\n\t\tforeach($alltokens as $token) {\n\t\t\tif ($token[0] == T_OPEN_TAG) $opentagfound = true;\n\t\t\t\n\t\t\tif (!is_array($token) && $token != \")\") continue;\n\t\t\tif ($token == \")\") $token = array(T_SPECIAL_BRACKET, \")\", 0);\n\t\t\tif (!in_array($token[0], $interesting)) continue;\n\t\t\t$token[3] = @token_name($token[0]);\n\t\t\t$tokens[] = $token;\n\t\t}\n\t\t\n\t\t// NO open tag? there is no PHP code at all?\n\t\tif (!$opentagfound) return null;\n\t\t\n\t\t// Find Php Comment blocks\n\t\t$blocks = array();\n\t\t\n\t\t// Now, we have all interesting & consecutive tokens\n\t\t$pageDocBlock = null;\n\t\t$lines = preg_split(\"/((\\r?\\n)|(\\n?\\r))/\", $source);\n\t\t\n\t\t// Check all tokens\n\t\tfor($i=0; $i<count($tokens); $i++) {\n\t\t\t$token = $tokens[$i];\n\t\t\t$nextToken = $tokens[$i+1];\n\t\t\t$previousToken = $tokens[$i-1];\n\t\t\t\n\t\t\t\n\t\t\t// Trying to detect if there is a Page Docblock\n\t\t\t// First doc bloc should be a T_DOC_COMMENT. \n\t\t\t// It should contain @package\n\t\t\tif ($i == 0 && $token[0] == T_DOC_COMMENT) {\n\t\t\t\tif (stripos($token[1], \"@package\") !== FALSE) {\n\t\t\t\t\t// We found the page docblock!\n\t\t\t\t\t$block = new DocBlock($token[1], \"(Page DocBlock)\", BLOCK_PAGE);\n\t\t\t\t\t$block->line = $token[2];\n\t\t\t\t\t$block->docline = $token[2];\n\t\t\t\t\t$blocks[] = $block;\n\t\t\t\t\t$pageDocBlock = $block;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// So, what's this comment block for?\n\t\t\tif (!in_array($token[0],array(T_FUNCTION,T_CLASS,T_INTERFACE,T_STRING,T_INCLUDE,T_INCLUDE_ONCE,T_REQUIRE,T_REQUIRE_ONCE))) continue; // nothing of interest (bad syntax?) => continue...\n\t\t\tif ($token[0] == T_STRING && strtolower($token[1]) != \"define\") continue; // a string, but not \"define\"... not useful to us\n\t\t\t\n\t\t\t// Filter out elements we don't want to see\n\t\t\tif ($token[0] == T_FUNCTION && !$_POST['Dfunc']) continue;\n\t\t\telseif ($token[0] == T_CLASS && !$_POST['Dclas']) continue;\n\t\t\telseif ($token[0] == T_INTERFACE && !$_POST['Dinte']) continue;\n\t\t\telseif ($token[0] == T_STRING && !$_POST['Dcons']) continue;\n\t\t\telseif (in_array($token[0], array(T_INCLUDE,T_INCLUDE_ONCE,T_REQUIRE,T_REQUIRE_ONCE)) && !$_POST['Dincl']) continue;\n\t\t\t\n\t\t\t// Filter out anonymous functions (non anonymous functions have their name/T_STRING right after the keyword 'function')\n\t\t\tif ($token[0] == T_FUNCTION && $nextToken[0] != T_STRING) continue;\n\t\t\t\n\t\t\t// Do we have a docblock for this token?\n\t\t\t$relevantDocBlock = null;\n\t\t\tif ($previousToken[0] == T_DOC_COMMENT) {\n\t\t\t\t// Is it the page token?\n\t\t\t\tif ($i == 1 && $pageDocBlock) { // yup, it's the page token, no action\n\t\t\t\t\t//$relevantDocBlock = null;\n\t\t\t\t} else {\n\t\t\t\t\t// This is a doc block likely meant for the following object\n\t\t\t\t\t$relevantDocBlock = $previousToken;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Create empty docblock\n\t\t\tif (!$relevantDocBlock) {\n\t\t\t\t$relevantDocBlock = array(T_DOC_COMMENT,\"/**\\r\\n*\\r\\n*/\",0);\n\t\t\t}\n\t\t\t\n\t\t\t// Find out associated tokens, depending on the current token type\n\t\t\t$associatedCode = $lines[ $token[2]-1 ];\n\t\t\t$type = $token[3];\n\t\t\t\n\t\t\t$block = new DocBlock($relevantDocBlock[1],$associatedCode, $type);\n\t\t\t$block->line = $token[2];\n\t\t\t$block->docline = $relevantDocBlock[2];\n\t\t\t//echo \"<pre>\"; print_r(htmlentities($lines));die();\t\t\t\n\t\t\t$blocks[] = $block;\n\t\t}\n\t\t\n\t\treturn $blocks;\n\t}", "public function getContent()\n {\n $source_code = '';\n $_components = array_reverse($this->components);\n $_last = end($_components);\n\n foreach ($_components as $_component) {\n if ($_component != $_last) {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath' child--{$this->tpl_obj->right_delimiter}\\n\";\n } else {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath'--{$this->tpl_obj->right_delimiter}\\n\";\n }\n }\n\n return $source_code;\n }", "public function getSourceFile(): string\n {\n return $this->getStubContents($this->getStubPath(), $this->getStubVariables());\n }", "function getSource() ;", "public static function getCode()\n\t{\n\t\tthrow new NotImplementedException;\n\t}", "function getSnippet()\n{ \n $baseClass = sfBundle::getBaseClassForCurrentFile();\n $packageName = getPackageName($baseClass);\n\n $snippet = sprintf(<<<SNIPPET\n/*\n * This file is part of the \\$1.\n * (c) \\${2:%s} \\${3:\\${TM_ORGANIZATION_NAME}}\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/**\n * \\${4:%s} \\${5:does things}.\n *\n * @package \\${6:\\$1}\n * @subpackage \\${7:%s}\n * @author \\$3\n * @version \\${8:1.0.0}\n */\nclass \\$4%s\n{\n \\$0\n}\nSNIPPET\n ,date('Y', time())\n ,getClassName(TextMate::getEnv('filename'), TextMate::getEnv('filepath'))\n ,$packageName ? $packageName : 'custom'\n ,$baseClass ? sprintf(\" extends \\${9:%s}\", $baseClass) : ''\n );\n\n return $snippet;\n}", "public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }", "public function getCode() {\n return $this->parse()['code'];\n }", "public function getSource(): string;", "function codePage($cp)\n{\n return $this->drv->codePage($cp);\n}", "public function getSource()\n\t{\n\t\treturn file_get_contents($this->file);\n\t}", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCodeSample()\n {\n $code = <<< 'CODE'\n namespace KEINOS\\AutoMailReply;\n require_once('./src/constants.php');\n require_once('./src/functions.php');\n echo (isModeDebug() === true) ? 'true' : 'false';\nCODE;\n $code = \\str_replace(PHP_EOL, '', $code);\n\n return $code;\n }", "public function getCode() {}", "public function getSource()\n\t{\n\t\treturn $this->broker->getFileTokens($this->getFileName())->getSourcePart($this->startPosition, $this->endPosition);\n\t}", "public function source();", "public function source();", "public function source();", "public static function getSource()\n {\n if (false === ($code = @file(__FILE__))) {\n $error = error_get_last();\n\n throw new RuntimeException($error['message']);\n }\n\n $code = array_slice($code, 6);\n\n foreach ($code as $i => $line) {\n if ('' === trim($line)) {\n unset($code[$i]);\n continue;\n }\n\n if (preg_match('{^\\s*(/\\*+|\\*+)}', $line)) {\n unset($code[$i]);\n }\n }\n\n return join('', $code);\n }", "public function evalFile(string $src): CompiledFile;", "public function getContents(){\n return file_get_contents($this->source);\n }", "abstract public function getSource();", "public function getSource() {}", "public function getSource() {}", "protected function _getNextCode() {}", "public function getCode()\n {\n }", "private function getHookSourceCode(string $hook): string\n {\n return $this->template->getCode($hook);\n }", "private function getHookSourceCode(string $hook): string\n {\n return $this->template->getCode($hook);\n }", "abstract public function getLinesOfCode();", "public function getPHP()\n\t{\n\t\t//\n\t}", "public function getExecutableCode(): string;", "public function fileCode() { return $this->_m_fileCode; }", "public function getSource()\n {\n return 'we_opencode';\n }", "public function get_source()\n {\n }", "public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }", "function __construct($comment=\"\", $associatedCode=\"\", $blockType=\"\") {\n\t\t\n\t\tif (!$comment && !$associatedCode && !$blockType) return;\n\t\t\n\t\t// Figure out indent (for later output)\n\t\tif ( preg_match('@^([\\t\\040]*).*$@', $associatedCode, $matches) ) {\n\t\t\t$this->indent = $matches[1];\n\t\t}\n\t\t\n\t\t// Save tokens\n\t\t$this->comment = trim($comment);\n\t\t$this->associatedCode = $associatedCode;\n\t\t$this->associatedHlCode = @str_ireplace(\"&lt;?php&nbsp;\",\"\",@highlight_string(\"<?php \".trim($this->associatedCode),true));\n\t\t$this->type = $blockType;\n\t\t\n\t\t// What's the source?\n\t\t$source = $comment; // element 1 is the token source\n\t\t\n\t\t$source = trim($source);\n\t\t$source = str_replace(\"/**\",\"\",$source);\n\t\t$source = str_replace(\"*/\",\"\",$source);\n\t\t$lines = explode(\"\\n\", $source);\n\t\t$source = array();\n\t\tforeach($lines as $line) {\n\t\t\t$line = trim($line);\n\t\t\t$line = str_replace(\"\\r\", \"\", $line);\n\t\t\t// If the line doesn't start by *, we aren't interested\n\t\t\tif (substr($line,0,1) == \"*\" ) $source[] = trim(substr($line,1));\n\t\t}\n\t\tif (!count($source)) return false;\n\t\t \n\t\t// Short description?\n\t\tif (substr($source[0],0,1) != \"@\") {\n\t\t\t$this->shortDescription = $source[0];\n\t\t}\n\t\t \n\t\t// Long description?\n\t\tfor($i=1; $i<count($source); $i++) {\n\t\t\tif (substr($source[$i],0,1) == \"@\") break;\n\t\t\t$this->longDescription .= $source[$i].\"\\n\";\n\t\t}\n\t\t$this->longDescription = trim($this->longDescription);\n\t\t \n\t\t// Tags?\n\t\t$this->tags = array();\n\t\tfor($i=count($source)-1; $i>=0; $i--) {\n\t\t\tif (trim($source[$i]) == \"\") continue;\n\t\t\tif (substr($source[$i],0,1) != \"@\") break;\n\t\t\t$this->tags[] = $source[$i];\n\t\t}\n\t\t$this->tags = array_reverse($this->tags);\n\t\t$this->tags = implode(PHP_EOL,$this->tags);\n\t\t \n\t\t// There needs to be at least a short description, or a long description, or a tags section for the block to be valid\n\t\tif ($this->shortDescription || $this->longDescription || $this->tags) $this->valid = true;\n\t\t\n\t\t// Convert to UTF8\n\t\t$this->shortDescription = !isUtf8($this->shortDescription) ? utf8_encode($this->shortDescription) : $this->shortDescription;\n\t\t$this->longDescription = !isUtf8($this->longDescription) ? utf8_encode($this->longDescription) : $this->longDescription;\n\t\t$this->tags = !isUtf8($this->tags) ? utf8_encode($this->tags) : $this->tags;\n\t\t\n\t\treturn $this->valid;\n\t}", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getBytecode()\n {\n return $this->bytecode;\n }", "function compile ($src);", "function lapa_compiler_php_code($act, $parser)\n{\n if ($act == 1) {\n $buff = '';\n if (!isset(LapaEngineParser::$_plugins_property['php_code'])) {\n LapaEngineParser::$_plugins_property['php_code'] = array();\n }\n $attr = $parser->parseDirectiveAttributes();\n $name = isset($attr['name']) ? $attr['name']: 'default';\n $parser->newStackCommand(array('php_code', $name));\n $parser->_outputNew();\n }else {\n if ( (!$stack_commands = $parser->getStackCommand() ) || $stack_commands[0] != 'php_code' ) {\n throw new LapaEngineException('Неверный вызов \"/php_code\" cтрока %s.', $parser->templateLine());\n }\n /* вырезали буффер php кода, его надо еще вернуть */\n $buff = $parser->_outputGet();\n /* создаем переменную с значением */ \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n $buff .= \"\\$_var_php_code['{$stack_commands[1]}'] = '\" . preg_replace(\"/(?!\\\\\\\\)\\\\'/\", '\\\\\\'','<?php ' . str_replace('\\\\', '\\\\\\\\',$buff) . ' ?>') . \"';\"; \n $parser->removeStackCommand(); \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n }\n return $buff;\n}", "function get_php ($filename) {\n ob_start(); \n include($filename);\n $buf = ob_get_contents();\n ob_end_clean(); \n return $buf;\n}", "private static function getCode($file, $line, $function = null)\n {\n $filer = new WalrusFileManager($_ENV['W']['ROOT_PATH']);\n $filer->setCurrentElem($file);\n $fail = false;\n\n if (isset($function) && class_exists(substr($file, 0, -4))) {\n\n $class = substr($file, 0, -4);\n\n try {\n $method = new ReflectionMethod($class, $function);\n $return['comment'] = $method->getDocComment();\n $start = $method->getStartLine() - 2;\n $end = $method->getEndLine() + 1;\n\n $return['highlight'] = $line - $start - 1;\n $return['code'] = $filer->getFileContent(null, $start, $end);\n } catch (Exception $exception) {\n $fail = true;\n }\n } elseif (class_exists(substr($file, 0, -4))) {\n $code = $filer->getFileContent('array');\n\n $i = $line;\n for ($i; $i > 0; $i--) {\n if (isset($code[$i])) {\n preg_match('/function\\s+([a-z_]\\w+)\\s?\\(/', $code[$i], $matches);\n if (!empty($matches) && isset($matches[1])) {\n $function = $matches[1];\n break;\n }\n }\n }\n\n $method = new ReflectionMethod(substr($file, 0, -4), $function);\n $return['comment'] = $method->getDocComment();\n $start = $method->getStartLine() - 2;\n $end = $method->getEndLine() + 1;\n\n $return['highlight'] = $line - $i;\n $return['code'] = $filer->getFileContent(null, $start, $end);\n } else {\n $start = $line - 5;\n $end = $line;\n\n $return['highlight'] = $line - $start - 1;\n $return['code'] = $filer->getFileContent(null, $start, $end);\n }\n $return['file'] = $file;\n\n if ($fail) {\n $return = array(\n 'code' => 'No data available',\n 'hightlight' => false,\n 'comment' => false\n );\n }\n\n return $return;\n }", "public function getCode(string $hook): string;", "public function GetCompiled ();", "public function getCode():string;", "public function getSource()\n {\n return 'cift';\n }", "function printMyCode() {\n $lines = file($_SERVER['SCRIPT_FILENAME']);\n echo \"<pre class='mycode'><ol>\";\n foreach ($lines as $line)\n echo '<li>'.rtrim(htmlentities($line)).'</li>';\n echo '</ol></pre>';\n}", "function code() {\n\t\t$code_issue_replace = false;\n\t\tif (in_array('replace', $this->args)) {\n\t\t\t$code_issue_replace = true;\n\t\t}\n\t\t$files = $this->files();\n\t\tforeach ( $files as $file ) {\n\t\t\t$code = file_get_contents($file);\n\t\t\t$issues = $this->code_issue_find($code);\n\t\t\tif (!empty($issues)) {\n\t\t\t\tif ($code_issue_replace) {\n\t\t\t\t\t$this->code_issue_replace($file, $code);\n\t\t\t\t} else {\n\t\t\t\t\t$this->out($file);\n\t\t\t\t\tprint_r($issues);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function vcex_get_block_editor_script_src( $block = '' ) {\n\treturn TTC_PLUGIN_DIR_URL . 'inc/vcex/blocks/' . $block . '/vcex-' . $block . '-block.js';\n}", "public function getCode(): string;", "public function getCode(): string;", "public function getCode(): string;", "public function getJavascriptCode() {}", "function showSource($dir, $file)\r\n{\r\n $path = $dir. $file;\r\n\techo '<div>';\r\n echo '<h1>'. $path. '</h1>';\r\n highlight_file($path);\r\n echo '</div>'. \"\\n\";\r\n}", "public function getFirstCode() {}", "function opcache_compile_file($file)\n{\n}", "public function getSource() : ?string ;", "public function getSource()\n\t{\n\t\treturn $this->token->source;\n\t}", "public function getSource()\n {\n }", "public function getDefaultSourceCode()\n {\n $searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create();\n $searchCriteria = $searchCriteriaBuilder->create();\n $sources = $this->sourceRepository->getList($searchCriteria)->getItems();\n $sourcesCode = 'Default';\n foreach ($sources as $source) {\n $sourcesCode = $source->getSourceCode();\n }\n return $sourcesCode;\n }", "public function compile ();", "function source_view($srcpath, $colwidth = 80)\n{\n\t// check that the file exists, and is being requested within the source dir\n\tif (file_exists($srcpath) && substr($srcpath,0,3) == \"src\")\n\t{\n\t\t// display it\n\t\techo \"<p>Browsing /\".$srcpath.\" ... <br />\\nSize: \".round(filesize($srcpath)/1024,1).\" Kb<br />\\nLast modified: \".date(\"M d, G:i\",filectime($srcpath)).\"<br /></p>\\n<p><a href=\\\"?browsesrc\\\">Back to the source listing</a></p>\\n\";\n\t\techo \"<p class=\\\"small\\\">N.B: this source is forcibly wrapped at $colwidth characters - the ¬ symbol is used to denoted the point at which the code was wrapped.</p>\\n\";\n\t\techo \"<pre class=\\\"source\\\">\";\n\t\t$fd = @fopen($srcpath,\"r\") or die(\"Permission denied opening /$srcpath\\n\");\n\t\t\n\t\t$strfilecontents = \"\";\n\t\t\n\t\twhile (!feof($fd))\n\t\t{\n\t\t\t$buf = fgets($fd);\n\t\t\tif (ereg(\"#define ADMIN_PASSWORD\", $buf))\n\t\t\t{\n\t\t\t\t$defineparts = explode(\"\\\"\",$buf, 2);\n\t\t\t\t$buf = $defineparts[0] . \"\\\"********\\\"\\n\";\n\t\t\t\t// $strfilecontents .= wordwrap($buf,$colwidth,\" ¬\\n \");\n\t\t\t\t$strfilecontents .= source_replace($buf, \"before\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// $strfilecontents .= wordwrap($buf,$colwidth,\" ¬\\n \");\n\t\t\t\t$strfilecontents .= source_replace($buf, \"before\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$lines = explode(\"\\n\",trim($strfilecontents));\n\t\t$linenumberwidth = strlen(count($lines).\"\");\n\t\t\n\t\tfor ($i=0;$i<count($lines);$i++)\n\t\t{\n\t\t\techo \"<span class=\\\"ln\\\" id=\\\"line\".($i+1).\"\\\">\";\n\t\t\tfor ($j=strlen(($i+1).\"\");$j<$linenumberwidth;$j++) echo \"0\";\n\t\t\techo ($i+1).\"</span> \".source_replace(htmlspecialchars($lines[$i])).\"\\n\";\n\t\t}\n\t\t\n\t\t// echo $strfilecontents;\n\t\t\n\t\techo \"</pre>\\n\";\n\t}\n\telse\n\t{\n\t\t// some error message...\n\t\techo \"<p>The file /\".$srcpath.\" doesn't appear to exist.</p>\\n<p><a href=\\\"?browsesrc\\\">Back to the source listing</a></p>\\n\";\n\t}\n}", "function compile($name, $code = false)\n {\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = file_get_contents($this->template_dir.$name);\n\t\n\t\t\tif ($code === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpreg_match_all('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code, $tag_blocks);\n\t\t$content_blocks = preg_split('/\\<!--[ ]*(.*?) (.*?)?[ ]*--\\>/', $code);\n\n\t\t$size = count($content_blocks);\n\n\t\t$parse_content = $compile = true;\n\t\t$tag_holding = array();\n\t\t$line = 1;\n\r\n\t\tfor ($loop = 0; $loop < $size; $loop++)\r\n\t\t{\n\t\t\t$line += substr_count($content_blocks[$loop], \"\\n\");\n\n\t\t\tif (!$compile)\n\t\t\t{\n\t\t\t\tif (strtoupper(trim($tag_blocks[1][$loop])) == 'ENDIGNORE')\n\t\t\t\t{\n\t\t\t\t\t$compile = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($parse_content)\n\t\t\t{\n\t\t\t\t$content_blocks[$loop] = $this->_parse_content($content_blocks[$loop]);\n\t\t\t}\n\n\t\t\tif (empty($tag_blocks[1][$loop]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch (strtoupper(trim($tag_blocks[1][$loop])))\r\n\t\t\t{\n\t\t\t\tcase 'IF':\n\t\t\t\t\t$this->_tag_holding_add('IF', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\r\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } else { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ELSEIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_view();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_if($tag_blocks[2][$loop], true);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'ENDIF':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\r\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } ?>';\r\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'LOOP':\n\t\t\t\t\t$this->_tag_holding_add('LOOP', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_loop($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOOPELSE':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'LOOP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->_tag_holding_add('LOOPELSE', $line);\n\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php } } else { ?>';\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'ENDLOOP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != ('LOOP' || 'LOOPELSE'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_endloop($tag_blocks[2][$loop], $last_tag['name']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PHP':\n\t\t\t\t\t$this->_tag_holding_add('PHP', $line);\n\n\t\t\t\t\t$parse_content = false;\n\t\t\t\t\t$tag_blocks[0][$loop] = '<?php ';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'ENDPHP':\n\t\t\t\t\t$last_tag = $this->_tag_holding_get();\n\t\t\t\t\t\n\t\t\t\t\tif (!$last_tag || $last_tag['name'] != 'PHP')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Error here\n\t\t\t\t\t}\n\n\t\t\t\t\t$parse_content = true;\n\t\t\t\t\t$tag_blocks[0][$loop] = ' ?>';\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'INCLUDE':\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_include($tag_blocks[2][$loop]);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_HEADER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_header(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DISPLAY_FOOTER':\n\t\t\t\t\t$tag_blocks[0][$loop] = \"<?php echo \\$_CLASS['core_display']->display_footer(); ?>\";\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'IGNORE':\n\t\t\t\t\t$compile = false;\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DEFINE':\r\n\t\t\t\t\t$tag_blocks[0][$loop] = $this->_compile_tag_define($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'AREA':\r\n\t\t\t\t\t//$tag_blocks[0][$loop] = $this->_compile_tag_area($tag_blocks[2][$loop]);\r\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$tag_blocks[0][$loop] = '<!-- '.$tag_blocks[1][$loop].' '.$tag_blocks[2][$loop].' -->';\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\n\n\t\t$this->_compiled_code = '';\n\t\t$size = count($content_blocks);\n\n\t\tfor ($loop = 0; $loop < $size; $loop++)\n\t\t{\r\n\t\t\t$this->_compiled_code .= $content_blocks[$loop] . (isset($tag_blocks[0][$loop]) ? $tag_blocks[0][$loop] : '');\r\n\t\t}\n\n\t\treturn true;\n }", "protected static function compile($file) {\n\n\t\t$content = file_get_contents($file);\n\t\t\n\t\tforeach( BP_Parser::$parts as $part ) {\n\t\t\t$content = call_user_func(\"BP_Parser::handle_$part\", $content, dirname($file) );\n\t\t}\n\n\t\treturn $content;\n\n\t}", "public function getSource() : ISource;", "public function getSource()\n\t{\n\t\treturn '';\n\t}", "public function getSource(): string\n {\n return $this->source;\n }", "public function getSource(): string\n {\n return $this->source;\n }", "public function code()\n {\n return $this->code;\n }", "public function code()\n {\n return $this->code;\n }", "public function getSource()\n {\n return 'barang';\n }", "static function chargerCodeClass ($className)\r\n {\r\n // DEBUG\r\n // echo \"(PHP A BESOIN DE $className)\";\r\n \r\n // ASTUCE: POUR AUTOMATISER LE CHARGEMENT DE CODE\r\n // ON PREND COMME CONVENTION QUE LA CLASSE Test \r\n // SERA DANS LE FICHIER php/class/Test.php\r\n\r\n // IL FAUT AJOUTER LE CODE QUI CHARGE LE FICHIER \r\n // QUI CONTIENT LA DEFINITION DE LA CLASSE\r\n require_once \"php/class/$className.php\";\r\n }", "function code ( $arguments = \"\" ) {\n $arguments = func_get_args ();\n $rc = new ReflectionClass('tcode');\n return $rc->newInstanceArgs ( $arguments );\n}", "function actionSource() {\r\n\r\n\t\t\t// Get the basename of the file\r\n\t\t\t$file = $_GET['id'];\r\n\r\n\t\t\t// Filepath should start with the directory of this file\r\n\t\t\t$basePath = strtolower( dirname( __FILE__ ) );\r\n\t\t\t$filePath = strtolower( dirname( realpath( $_GET['id'] ) ) );\r\n\r\n\t\t\t// Check if the file is in the right directory\r\n\t\t\tif ( substr( $filePath, 0, strlen( $basePath ) ) != $basePath ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if the file exists\r\n\t\t\tif ( ! is_file( $file ) ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Show the highlighted source\r\n\t\t\t$this->template->assign( 'file', $file );\r\n\t\t\t$this->template->assign( 'source', highlight_file( $file, 1 ) );\r\n\r\n\t\t\t// Output the template\r\n\t\t\t$this->template->display();\r\n\r\n\t\t}", "public function getSource()\n {\n return 'tokens';\n }", "public function get($name) {\n \n $file = $this->kirby->component('snippet')->file($name);\n\n if(file_exists($file)) {\n return $file;\n } else {\n return a::get(static::$snippets, $name);\n }\n\n }", "public function getSource(): ReadableInterface;", "function smarty_resource_cms_source (string $rsrc_name, string &$source, object &$smarty) \r\n{\r\n $path = $_SERVER['REQUEST_URI'];\r\n $path = rtrim($path, '/');\r\n while ($path != '')\r\n {\r\n if (file_exists($path.'/'.$rsrc_name) && is_readable($path.'/'.$rsrc_name))\r\n {\r\n $source = file_get_contents($path.'/'.$rsrc_name);\r\n return true;\r\n }\r\n $pos = strrpos($path, '/');\r\n if ($pos !== false)\r\n {\r\n $path = substr($path, 0, $pos);\r\n }\r\n }\r\n return false;\r\n}", "private function getVisitorCode(ReflectionClass $class): CodeVisitor\n {\n $traverser = new NodeTraverser();\n $visitor = new CodeVisitor();\n $traverser->addVisitor($visitor);\n $fileName = $class->getFileName();\n if (is_bool($fileName)) {\n throw new InvalidSourceClassException(get_class($class));\n }\n\n $file = file_get_contents($fileName);\n if ($file === false) {\n throw new RuntimeException($fileName); // @codeCoverageIgnore\n }\n\n $stmts = $this->parser->parse($file);\n if (is_array($stmts)) {\n $traverser->traverse($stmts);\n }\n\n return $visitor;\n }", "protected function parseSourceFile($file_path, &$result = array()) {\n if (false === ($source = file_get_contents($file_path))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->I18n(\"Can't get file content: {{ file }}\", array(\n 'file' => $file_path\n ))));\n return false;\n }\n $path = substr($file_path, strlen(WB_PATH));\n $module = dirname(substr($file_path, strlen(WB_PATH . '/modules/')));\n if (strpos($module, DIRECTORY_SEPARATOR) > 0) $module = substr($module, 0, strpos($module, DIRECTORY_SEPARATOR));\n $file = basename($file_path);\n $tokens = token_get_all($source);\n $matches = array();\n // first run: get only matches for \"I18n\"\n for($i = 0; $i < count($tokens); $i++) {\n if (is_array($tokens[$i]) && (token_name($tokens[$i][0]) == 'T_STRING') &&\n \t\t(($tokens[$i][1] == 'I18n') || ($tokens[$i][1] == 'I18n_Register'))) $matches[] = $i;\n }\n foreach ($matches as $match) {\n $parensis_open = 0;\n $concat = false;\n $text = '';\n $has_content = false;\n for($i = $match; $i < count($tokens); $i++) {\n if ($parensis_open < 1) {\n // first detect the opening parensis!\n if (is_string($tokens[$i]) && ($tokens[$i] == '(')) {\n $parensis_open++;\n }\n }\n else {\n if (is_string($tokens[$i])) {\n // handle strings\n if ($tokens[$i] == ')') {\n $parensis_open--;\n $concat = false;\n if ($parensis_open == 0) break;\n }\n if ($tokens[$i] == '(') {\n $concat = false;\n $parensis_open++;\n }\n if ($has_content && ($tokens[$i] == '.')) {\n $concat = true;\n }\n }\n else {\n // handle tokens\n if (token_name($tokens[$i][0]) == 'T_CONSTANT_ENCAPSED_STRING') {\n if (empty($text)) {\n $item = trim($tokens[$i][1]);\n $text = substr($item, 1, strlen($item) - 2);\n $has_content = true;\n }\n elseif ($concat) {\n $item = trim($tokens[$i][1]);\n $text .= substr($item, 1, strlen($item) - 2);\n }\n }\n }\n }\n }\n if (!empty($text)) {\n $result[] = array(\n 'module' => $module,\n 'path' => $path,\n 'file' => $file,\n 'key' => $text,\n 'line' => $tokens[$match][2]\n );\n }\n }\n return true;\n }", "function compiled($file=null)\n { \n if ($file) {\n return $this->_methodWrapper($file,'compiled');\n }\n return $this->_objectPool[$this->_lastUsedObjectKey]->compiled();\n }", "public function getDocCode()\n {\n return $this->doc_code;\n }", "public function sourceFile() {\n return $this->loader\n ? $this->loader->getResourceAsStream(strtr($this->name, '.', '/').'/package-info.xp')\n : NULL\n ;\n }", "public function getCodeRef()\n {\n return $this->codeRef;\n }", "function getSource() {\n\t return $this->node->getText();\n\t}", "public function getContent(){\n\t\t$this->modelname = sprintf($this->format, $this->classname);\n\t\t$this->date = date('Y-m-d H:i:s');\n\t\t\n\t\t$templateFile = LUMINE_INCLUDE_PATH . '/lib/Templates/Model.tpl';\n\t\t$tpl = file_get_contents($templateFile);\n\t\t\n\t\t$start = \"### START AUTOCODE\";\n\t\t$end = \"### END AUTOCODE\";\n\t\t\n\t\t$originalFile = $this->getFullFileName();\n\t\t\n\t\t$class = '';\n\t\t$tpl = preg_replace('@\\{(\\w+)\\}@e','$this->$1',$tpl);\n\t\t\n\t\tif(file_exists($originalFile)){\n\t\t\t\n\t\t\t$content = file_get_contents($originalFile);\n\t\t\t$autoCodeOriginal = substr($content, strpos($content,$start)+strlen($start), strpos($content,$end)+strlen($end) - (strpos($content,$start)+strlen($start)));\n\t\t\t\n\t\t\t$autoCodeGenerated = substr($tpl, strpos($tpl,$start)+strlen($start), strpos($tpl,$end)+strlen($end) - (strpos($tpl,$start)+strlen($start)));\n\t\t\t\n\t\t\t$class = str_replace($autoCodeOriginal, $autoCodeGenerated, $content);\n\t\t\t\n\t\t} else {\n\t\t\t$class = $tpl;\n\t\t}\n\t\t\n\t\t\n\t\treturn $class;\n\t}", "public function getEmbedCode();", "public function fileGetContentsExecPHP($filePath) {\n ob_start();\n include $filePath;\n return ob_get_clean();\n }" ]
[ "0.7319558", "0.7263099", "0.66822195", "0.6558869", "0.6497158", "0.6475975", "0.6449538", "0.63747907", "0.63373107", "0.6305515", "0.62682104", "0.6260121", "0.62532854", "0.6210308", "0.62098116", "0.62098116", "0.62098116", "0.62098116", "0.62098116", "0.62098116", "0.61751115", "0.6167963", "0.61549187", "0.6153555", "0.6153555", "0.6153555", "0.6129528", "0.6079075", "0.6040235", "0.6003732", "0.6002855", "0.6002855", "0.5984178", "0.5979926", "0.5943993", "0.5943993", "0.59433824", "0.5939773", "0.5928813", "0.5916748", "0.5915235", "0.5907436", "0.5906842", "0.5888903", "0.5862544", "0.5862544", "0.5862544", "0.5862544", "0.5862544", "0.58559304", "0.5836672", "0.58194333", "0.5789066", "0.57710874", "0.5715742", "0.57114244", "0.5709361", "0.57081527", "0.57037365", "0.57004684", "0.56962305", "0.56658924", "0.56658924", "0.56658924", "0.5647314", "0.5633819", "0.5628837", "0.5621084", "0.5592735", "0.55652887", "0.5564835", "0.5554765", "0.5546194", "0.5526842", "0.5510739", "0.5496336", "0.5494585", "0.5494476", "0.54804456", "0.54804456", "0.5476179", "0.5476179", "0.5474929", "0.5471267", "0.5464993", "0.54570264", "0.54437", "0.54373556", "0.5435753", "0.5434188", "0.5427105", "0.54224426", "0.5416176", "0.5411025", "0.54100215", "0.54080397", "0.53988427", "0.53980553", "0.5391892", "0.5388709" ]
0.5701315
59
Get PHP valid data type for column.
protected function _getColumnDataType(CodeGeneratorColumn $column, $mixed=false){ $type = false; switch ($column->getType()){ case CodeGeneratorColumn::TYPE_BOOLEAN: $type = 'bool'; break; case CodeGeneratorColumn::TYPE_FLOAT: $type = 'float'; break; case CodeGeneratorColumn::TYPE_INTEGER: $type = 'integer'; break; case CodeGeneratorColumn::TYPE_STRING: $type = 'string'; break; default: if($mixed){ $type = 'mixed'; } } return $type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_datatype() {\n return $this->datatype;\n }", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "public function getDataType()\n {\n return $this->data_type;\n }", "public function getDataType(): ?string {\n $val = $this->getBackingStore()->get('dataType');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'dataType'\");\n }", "public function getDatatype() {}", "public function isValidColumnType($column);", "protected function _getColumnDataType($columnIndex)\n {\n $meta = $this->_statement->getColumnMeta($columnIndex);\n\n switch($meta['native_type'])\n {\n case 'json':\n return PDO::PARAM_JSON;\n\n case 'timestamp':\n return PDO::PARAM_DATETIME;\n\n case 'date':\n return PDO::PARAM_DATE;\n\n case '_text':\n return PDO::PARAM_ARRAY;\n\n case '_int4':\n return PDO::PARAM_ARRAY;\n }\n\n return null;\n }", "public function columnTypes()\n {\n return \\array_merge(\\array_filter(parent::columnTypes(), function($elem) {\n if ($elem[0] === Schema::TYPE_JSON) {\n return false;\n }\n return true;\n }), [\n [\n Schema::TYPE_JSON,\n $this->json(),\n \"json\",\n \"json CHECK ([[{name}]] is null or json_valid([[{name}]]))\"\n ]\n ]);\n }", "public function getDataType() {}", "public function getDataType()\n {\n return $this->_fields['DataType']['FieldValue'];\n }", "public function getTableDatatype()\r\n\t{\r\n\t\treturn $this->Table_Column->Table_Datatype;\r\n\t}", "public function getColumnDataType($column)\n {\n return Schema::getColumnType(\n $this->getTable(),\n $column\n );\n }", "public function GetColumnDataType( $column, $table = '' )\r\n\t{\r\n\t\t$this->ResetError();\r\n\t\tif( empty( $table ) )\r\n\t\t{\r\n\t\t\tif( $this->RowCount() > 0 )\r\n\t\t\t{\r\n\t\t\t\tif( is_numeric( $column ) )\r\n\t\t\t\t{\r\n\t\t\t\t\treturn mysql_field_type( $this->last_result, $column );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn mysql_field_type( $this->last_result, $this->GetColumnID( $column ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( is_numeric( $column ) ) $column = $this->GetColumnName( $column, $table );\r\n\t\t\t$result = mysql_query( 'SELECT ' . $column . ' FROM ' . $table . ' LIMIT 1');\r\n\t\t\tif( mysql_num_fields( $result ) > 0 )\r\n\t\t\t{\r\n\t\t\t\treturn mysql_field_type( $result, 0 );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->SetError( 'The specified column or table does not exist, or no data was returned', -1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function dbFieldType()\n {\n return 'string';\n }", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "protected function columnType()\n {\n $table = $this->ask('Enter the name of desired table');\n $this->checkInput($table);\n $column = $this->ask('Enter the desired column');\n $this->checkInput($column);\n $this->service->columnType($table, $column);\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getDataType()\n {\n return $this->dataType;\n }", "public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }", "protected static function oci_getType($col)\n {\n throw new RuntimeException(\"no yet implemented\");\n /** @var array $exclusion type of columns that don't use size */\n $exclusion = ['int', 'long', 'tinyint', 'year', 'bigint', 'bit', 'smallint', 'float', 'money'];\n if (in_array($col['DATA_TYPE'], $exclusion) !== false) {\n return $col['DATA_TYPE'];\n }\n if ($col['NUMERIC_SCALE']) {\n $result = \"{$col['DATA_TYPE']}({$col['NUMERIC_PRECISION']},{$col['NUMERIC_SCALE']})\";\n } elseif ($col['NUMERIC_PRECISION'] || $col['CHARACTER_MAXIMUM_LENGTH']) {\n $result = \"{$col['DATA_TYPE']}(\" . ($col['CHARACTER_MAXIMUM_LENGTH'] + $col['NUMERIC_PRECISION']) . ')';\n } else {\n $result = $col['DATA_TYPE'];\n }\n\n return $result;\n }", "public function getDataType() {\n return $this->dataType;\n }", "public function getDataTypeAttribute(): string\n {\n return $this->config['data_type'];\n }", "protected function type_float(Magic $column)\n {\n return 'FLOAT';\n }", "protected function type_float(Magic $column)\n {\n return 'FLOAT';\n }", "protected function getColumnPhpType($type)\r\n {\r\n static $typeMap = [\r\n // abstract type => php type\r\n 'text' => 'string',\r\n 'number' => 'integer',\r\n 'container' => 'resource',\r\n 'date' => 'date',\r\n 'time' => 'time',\r\n 'timestamp' => 'timestamp',\r\n ];\r\n if (isset($typeMap[$type])) {\r\n return $typeMap[$type];\r\n } else {\r\n return 'string';\r\n }\r\n }", "public function sql_field_type($res, $pointer)\n {\n // mysql_field_type compatibility map\n // taken from: http://www.php.net/manual/en/mysqli-result.fetch-field-direct.php#89117\n // Constant numbers see http://php.net/manual/en/mysqli.constants.php\n $mysql_data_type_hash = [\n 1 => 'tinyint',\n 2 => 'smallint',\n 3 => 'int',\n 4 => 'float',\n 5 => 'double',\n 7 => 'timestamp',\n 8 => 'bigint',\n 9 => 'mediumint',\n 10 => 'date',\n 11 => 'time',\n 12 => 'datetime',\n 13 => 'year',\n 16 => 'bit',\n // 252 is currently mapped to all text and blob types (MySQL 5.0.51a)\n 253 => 'varchar',\n 254 => 'char',\n 246 => 'decimal'\n ];\n if ($this->debug_check_recordset($res)) {\n $metaInfo = $res->fetch_field_direct($pointer);\n if ($metaInfo === false) {\n return false;\n }\n return $mysql_data_type_hash[$metaInfo->type];\n } else {\n return false;\n }\n }", "protected function typeFloat(Magic $column)\n {\n return 'FLOAT';\n }", "public static function getDBColumnType($userField)\n\t{\n\t\tglobal $DB;\n\t\tswitch($DB->type)\n\t\t{\n\t\t\tcase \"MYSQL\":\n\t\t\t\treturn \"int(11)\";\n\t\t\tcase \"ORACLE\":\n\t\t\t\treturn \"number(18)\";\n\t\t\tcase \"MSSQL\":\n\t\t\t\treturn \"int\";\n\t\t}\n\t}", "public function validDataTypes();", "public function getDataType() {\n\t\treturn $this -> dataType;\n\t}", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t// SQL-92\n\t\t\t'bit' => array('type' => 'string', 'exact' => true),\n\t\t\t'bit varying' => array('type' => 'string'),\n\t\t\t'char' => array('type' => 'string', 'exact' => true),\n\t\t\t'char varying' => array('type' => 'string'),\n\t\t\t'character' => array('type' => 'string', 'exact' => true),\n\t\t\t'character varying' => array('type' => 'string'),\n\t\t\t'date' => array('type' => 'string'),\n\t\t\t'dec' => array('type' => 'float', 'exact' => true),\n\t\t\t'decimal' => array('type' => 'float', 'exact' => true),\n\t\t\t'double precision' => array('type' => 'float'),\n\t\t\t'float' => array('type' => 'float'),\n\t\t\t'int' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'integer' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'interval' => array('type' => 'string'),\n\t\t\t'national char' => array('type' => 'string', 'exact' => true),\n\t\t\t'national char varying' => array('type' => 'string'),\n\t\t\t'national character' => array('type' => 'string', 'exact' => true),\n\t\t\t'national character varying' => array('type' => 'string'),\n\t\t\t'nchar' => array('type' => 'string', 'exact' => true),\n\t\t\t'nchar varying' => array('type' => 'string'),\n\t\t\t'numeric' => array('type' => 'float', 'exact' => true),\n\t\t\t'real' => array('type' => 'float'),\n\t\t\t'smallint' => array('type' => 'int', 'min' => '-32768', 'max' => '32767'),\n\t\t\t'time' => array('type' => 'string'),\n\t\t\t'time with time zone' => array('type' => 'string'),\n\t\t\t'timestamp' => array('type' => 'string'),\n\t\t\t'timestamp with time zone' => array('type' => 'string'),\n\t\t\t'varchar' => array('type' => 'string'),\n\t\t\t// SQL:1999\n\t\t\t'binary large object' => array('type' => 'string', 'binary' => true),\n\t\t\t'blob' => array('type' => 'string', 'binary' => true),\n\t\t\t'boolean' => array('type' => 'bool'),\n\t\t\t'char large object' => array('type' => 'string'),\n\t\t\t'character large object' => array('type' => 'string'),\n\t\t\t'clob' => array('type' => 'string'),\n\t\t\t'national character large object' => array('type' => 'string'),\n\t\t\t'nchar large object' => array('type' => 'string'),\n\t\t\t'nclob' => array('type' => 'string'),\n\t\t\t'time without time zone' => array('type' => 'string'),\n\t\t\t'timestamp without time zone' => array('type' => 'string'),\n\t\t\t// SQL:2003\n\t\t\t'bigint' => array('type' => 'int', 'min' => '-9223372036854775808', 'max' => '9223372036854775807'),\n\t\t\t// SQL:2008\n\t\t\t'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),\n\t\t\t'binary varying' => array('type' => 'string', 'binary' => true),\n\t\t\t'varbinary' => array('type' => 'string', 'binary' => true)\n\t\t);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn array();\n\t}", "private static function get_column_type($table, $column)\n\t{\n\t\t$EE =& get_instance();\n\n\t\t$table = $EE->db->dbprefix($table);\n\n\t\t$column = $EE->db->escape($column);\n\n\t\t$query = $EE->db->query(\"SHOW COLUMNS FROM `$table` WHERE Field = $column\");\n\n\t\t$column_type = $query->row('Type') ? $query->row('Type') : 'TEXT';\n\n\t\tif ($query->row('Null') === 'NO')\n\t\t{\n\t\t\t$column_type .= ' NOT NULL';\n\t\t}\n\n\t\tif ($query->row('Default') !== NULL && $query->row('Default') !== 'NULL')\n\t\t{\n\t\t\t$column_type .= ' DEFAULT '.$EE->db->escape($query->row('Default'));\n\t\t}\n\n\t\tif ($query->row('Extra') === 'auto_increment')\n\t\t{\n\t\t\t$column_type .= ' AUTO_INCREMENT';\n\t\t}\n\n\t\t$query->free_result();\n\n\t\treturn $column_type;\n\t}", "protected function getFieldType()\n {\n if (strstr($this->sColumn, 'textarea')) {\n $sType = 'Textarea';\n } elseif (strstr($this->sColumn, 'editor')) {\n $sType = 'CKEditor';\n } elseif (strstr($this->sColumn, 'email')) {\n $sType = 'Email';\n } elseif (strstr($this->sColumn, 'password')) {\n $sType = 'Password';\n } elseif (strstr($this->sColumn, 'url')) {\n $sType = 'Url';\n } elseif (strstr($this->sColumn, 'phone')) {\n $sType = 'Phone';\n } elseif (strstr($this->sColumn, 'date')) {\n $sType = 'Date';\n } elseif (strstr($this->sColumn, 'color')) {\n $sType = 'Color';\n } elseif (strstr($this->sColumn, 'number')) {\n $sType = 'Number';\n } elseif (strstr($this->sColumn, 'range')) {\n $sType = 'Range';\n } elseif (stripos($this->sColumn, 'height') !== false) {\n $sType = 'Height';\n } elseif (stripos($this->sColumn, 'weight') !== false) {\n $sType = 'Weight';\n } else {\n $sType = 'Textbox';\n }\n\n return $sType;\n }", "public final function getFieldtype($fld)\n {\n return isset($this->columns->{$fld}) ? $this->db->convertType($this->columns->{$fld}->type) : false;\n }", "protected function type_date(Magic $column)\n {\n return 'DATETIME';\n }", "protected function type_date(Magic $column)\n {\n return 'DATETIME';\n }", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function getDataType() {\n return null;\n }", "protected function typeDecimal(Magic $column)\n {\n return 'FLOAT';\n }", "protected function getDataType($value)\n {\n if (is_bool($value))\n {\n return PDO::PARAM_BOOL;\n }\n if (is_null($value))\n {\n return PDO::PARAM_NULL;\n }\n if (is_integer($value))\n {\n return PDO::PARAM_INT;\n }\n return PDO::PARAM_STR;\n }", "public function getType()\n {\n $result = \"\";\n if (preg_match('/int/',$this->type))\n $result = \"int\";\n\n if (preg_match('/year/',$this->type))\n $result = \"int\";\n\n if (preg_match('/integer/',$this->type))\n $result = \"int\";\n\n if (preg_match('/tynyint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/smallint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/mediumint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/bigint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/varchar/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/text/',$this->type))\n $result = \"string\";\n\n if (preg_match('/tyntext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/mediumtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/longtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/enum/',$this->type))\n $result = \"enum\";\n\n if (preg_match('/set/',$this->type))\n $result = \"string\";\n\n if (preg_match('/date/',$this->type))\n $result = \"date\";\n\n if (preg_match('/time/',$this->type))\n $result = \"time\";\n\n if (preg_match('/datetime/',$this->type))\n $result = \"datetime\";\n\n if (preg_match('/decimal/',$this->type))\n $result = \"float\";\n\n if (preg_match('/float/',$this->type))\n $result = \"float\";\n\n if (preg_match('/double/',$this->type))\n $result = \"double\";\n\n if (preg_match('/real/',$this->type))\n $result = \"real\";\n\n if (preg_match('/fixed/',$this->type))\n $result = \"float\";\n\n if (preg_match('/numeric/',$this->type))\n $result = \"float\";\n\n if (empty($result)){\n // $result = $this->type;\n $result = \"string\";\n }\n\n // TODO EVALUATES BIT, TIMESTAMP, VARBINARY, BLOB MySQL data types\n return $result;\n }", "public static function getColumnTypes() {\n\t\tstatic $types = array(\n\t\t\t'char' => 'CHAR',\n\t\t\t'string' => 'VARCHAR',\n\t\t\t'text' => 'TEXT',\n\t\t\t'mediumText' => 'MEDIUMTEXT',\n\t\t\t'longText' => 'LONGTEXT',\n\t\t\t'enum' => 'ENUM',\n\t\t\t'tinyBlob' => 'TINYBLOB',\n\t\t\t'blob' => 'BLOB',\n\t\t\t'mediumBlob' => 'MEDIUMBLOB',\n\t\t\t'longBlob' => 'LONGBLOB',\n\t\t\t'binary' => 'BINARY',\n\t\t\t'varbinary' => 'VARBINARY',\n\t\t\t'json' => 'JSON',\n\t\t\t'integer' => 'INT',\n\t\t\t'tinyInteger' => 'TINYINT',\n\t\t\t'smallInteger' => 'SMALLINT',\n\t\t\t'mediumInteger' => 'MEDIUMINT',\n\t\t\t'bigInteger' => 'BIGINT',\n\t\t\t'float' => 'FLOAT',\n\t\t\t'double' => 'DOUBLE',\n\t\t\t'decimal' => 'DECIMAL',\n\t\t\t'boolean' => 'BOOLEAN',\n\t\t\t'date' => 'DATE',\n\t\t\t'dateTime' => 'DATETIME',\n\t\t\t'time' => 'TIME',\n\t\t\t'timestamp' => 'TIMESTAMP',\n\t\t\t'year' => 'YEAR'\n\t\t);\n\n\t\treturn $types;\n\t}", "protected function type_decimal(Magic $column)\n {\n return 'FLOAT';\n }", "public function getFieldDataType() {\n\t\t$fieldDataType = '';\n\t\t$uitype = $this->get('uitype');\n\t\tif ($uitype == '9') {\n\t\t\t$fieldDataType = 'percent';\n\t\t}\n\n\t\tif (!$fieldDataType) {\n\t\t\t$webserviceField = $this->getWebserviceFieldObject();\n\t\t\t$fieldDataType = $webserviceField->getFieldDataType();\n\t\t\tswitch($fieldDataType) {\n\t\t\t\tcase 'text' : $fieldDataType = 'textArea'; break;\n\t\t\t\tcase 'boolean' : $fieldDataType = 'checkBox'; break;\n\t\t\t case 'multipicklist' : $fieldDataType = 'multiSelectCombo'; break;\n\t\t\t}\n\t\t}\n\t\treturn $fieldDataType;\n\t}", "public function getDataType(): string;", "public function getDataType(): string;", "public function getDbFieldType()\n {\n }", "protected static function getPhpType($sqlDataType)\n {\n if (strpos($sqlDataType, \"char\") !== false)\n return \"string\";\n \n if (strpos($sqlDataType, \"decimal\") !== false)\n return \"float\";\n \n if (strpos($sqlDataType, \"date\") !== false ||\n strpos($sqlDataType, \"time\") !== false)\n return \"DateTime\";\n \n if (strpos($sqlDataType, \"tinyint\") !== false ||\n strpos($sqlDataType, \"bool\") !== false)\n return \"bool\";\n \n if (strpos($sqlDataType, \"int\") !== false)\n return \"int\";\n \n return \"string\";\n }", "function get_column_type ($table_name, $column_name) { \n\n\t$column_row_arr = NULL;\n\t\n\t// Get the array of meta data for the table\n\tlist($errArr, $columns_arr) = show_columns($table_name);\n if ( count($columns_arr) > 0) {\n \t// Loop through metadata\n \tforeach ($columns_arr as $columns_row)\n \t{\n \t\tif ($columns_row[DFT_FIELD] == $column_name) {\n \t\t\t$column_row_arr = $columns_row;\n \t\t\tbreak; // column name is found in meta data \n \t\t}\n \t}\n }\n\treturn $column_row_arr;\n}", "public function getInternalDataType()\n {\n return 'double';\n }", "public function getExtendedColumnTypes();", "function data_type($type) {\r\n\t\t$return_value = '';\r\n\t\t$type = (string) $type;\r\n\r\n\t\tswitch (strtolower($type)) {\r\n\t\t\t// supported scalar types\r\n\t\t\tcase 'ENTITIES':\r\n\t\t\tcase 'ENTITY':\r\n\t\t\tcase 'ID':\r\n\t\t\tcase 'IDREF':\r\n\t\t\tcase 'IDREFS':\r\n\t\t\tcase 'NCName':\r\n\t\t\tcase 'NMTOKEN':\r\n\t\t\tcase 'NMTOKENS':\r\n\t\t\tcase 'Name':\r\n\t\t\tcase 'anySimpleType':\r\n\t\t\tcase 'anyType':\r\n\t\t\tcase 'base64':\r\n\t\t\tcase 'base64Binary':\r\n\t\t\tcase 'boolean':\r\n\t\t\tcase 'byte':\r\n\t\t\tcase 'date':\r\n\t\t\tcase 'dateTime':\r\n\t\t\tcase 'decimal':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'duration':\r\n\t\t\tcase 'float':\r\n\t\t\tcase 'gDay':\r\n\t\t\tcase 'gMonth':\r\n\t\t\tcase 'gMonthDay':\r\n\t\t\tcase 'gYear':\r\n\t\t\tcase 'gYearMonth':\r\n\t\t\tcase 'hexBinary':\r\n\t\t\tcase 'i4':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'language':\r\n\t\t\tcase 'long':\r\n\t\t\tcase 'negativeInteger':\r\n\t\t\tcase 'nonNegativeInteger':\r\n\t\t\tcase 'nonPositiveInteger':\r\n\t\t\tcase 'normalizedString':\r\n\t\t\tcase 'positiveInteger':\r\n\t\t\tcase 'short':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'time':\r\n\t\t\tcase 'timeInstant':\r\n\t\t\tcase 'token':\r\n\t\t\tcase 'unsignedByte':\r\n\t\t\tcase 'unsignedInt':\r\n\t\t\tcase 'unsignedLong':\r\n\t\t\tcase 'unsignedShort':\r\n\t\t\tcase 'ur-type':\r\n\t\t\t\t$return_value = 'xsd:' . $type;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\tforeach ($this->types as $id => $type_definition) {\r\n\r\n\t\t\t\t\tif ($type_definition['name'] == $type) {\r\n\t\t\t\t\t\t$return_value = 'tns:' . $type;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} // end: if\r\n\t\t\t\t} // end: foreach\r\n\t\t} // end: switch\r\n\r\n\t\treturn $return_value;\r\n\t}", "private static function getCustomDataType($val)\n {\n if (!is_array($val))\n {\n $type = \"date\";\n }\n else\n {\n $type = gettype($val);\n }\n\n return $type;\n }", "public function grid_settings_modify_column($data)\n {\n return $this->get_column_type($data, true);\n }", "public function getDataType()\n {\n return DField::DATA_TYPE_FLOAT;\n }", "function oci_field_type($statement, $field)\n{\n}", "function pgtype_isnumber ($field_type) {\n\tswitch (strtolower(trim($field_type))) {\n\t\tcase 'bool': // a boolean from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'int2': // a small integer from a pg database\n\t\tcase 'int4': // an integer from a pg database\n\t\tcase 'int8': // a long integer from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'numeric': // a \"numeric\" real number field from a pg database\n\t\tcase 'float4': // a single precision real number field from a pg database\n\t\tcase 'float8': // a double precision real number field from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'date': // a date field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'time': // a time field from a pg database\n\t\tcase 'timetz': // a time field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'timestamp': // a timestamp field from a pg database\n\t\tcase 'timestamptz': // a timestamp field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'text': // a text field from a pg database\n\t\tcase 'varchar': // a varchar field from a pg database\n\t\tcase 'bpchar': // a bpchar field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated field type, put a text box or single selects, but may not work\n\t\t\t$output = false;\n\t}\n\treturn $output;\n}", "public function fieldType($result = false, $field_offset = 0){\n $this->resCalc($result); \n return mysql_field_type($result, $field_offset); \n }", "function pg_field_type($result, int $field_number): string\n{\n error_clear_last();\n $result = \\pg_field_type($result, $field_number);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "private static function normalizeColumnType($col)\n {\n if (preg_match('/\\((.+)\\)/', $col['type'], $matches)) {\n $col['precision'] = $matches[1];\n $col['type'] = preg_replace('/\\(.*/', '', $col['type']);\n }\n $col['type'] = strtolower($col['type']);\n switch ($col['type']) {\n case 'bool':\n case 'tinyint':\n $col['type'] = 'boolean';\n break;\n case 'int':\n $col['type'] = 'integer';\n break;\n case 'nvarchar':\n $col['type'] = 'varchar';\n break;\n case 'float':\n case 'double':\n case 'decimal':\n $col['type'] = 'numeric';\n break;\n case 'timestamp':\n $col['type'] = 'datetime';\n break;\n case 'enum':\n $col['precision'] = array_map(function($e) { return trim($e, \"'\"); }, explode(',', $col['precision']));\n }\n return $col;\n }", "public static function columnTypes()\n {\n return [\n 'bigInteger' => 'Bigint',\n 'bigPrimaryKey' => 'BigPK',\n 'binary' => 'Binary',\n 'boolean' => 'Boolean',\n 'date' => 'Date',\n 'dateTime' => 'Datetime',\n 'decimal' => 'Decimal',\n 'double' => 'Double',\n 'float' => 'Float',\n 'integer' => 'Integer',\n 'money' => 'Money',\n 'primaryKey' => 'PK',\n 'smallInteger' => 'Smallint',\n 'string' => 'String',\n 'text' => 'Text',\n 'time' => 'Time',\n 'timestamp' => 'Timestamp',\n ];\n }", "public function getMDB2DataType()\n\t{\n\t\tif($this->mdb2DataType != '')\n\t\t{\n\t\t\treturn $this->mdb2DataType;\n\t\t}\n\t}", "public static function type($_value) {\n\t\tif (is_null($_value))\n\t\t\treturn PDO::PARAM_NULL;\n\t\telseif (is_bool($_value))\n\t\t\treturn PDO::PARAM_BOOL;\n\t\telseif (is_int($_value))\n\t\t\treturn PDO::PARAM_INT;\n\t\telseif (is_string($_value))\n\t\t\treturn PDO::PARAM_STR;\n\t\treturn PDO::PARAM_LOB;\n\t}", "public function getDateType() {\n\n if ($this->dateType)\n return $this->dateType;\n\n if (!$this->value) {\n $this->dateTimes = null;\n $this->dateType = null;\n return null;\n }\n\n $dts = array();\n foreach(explode(',',$this->value) as $val) {\n list(\n $type,\n $dt\n ) = DateTime::parseData($val, $this);\n $dts[] = $dt;\n $this->dateType = $type;\n }\n $this->dateTimes = $dts;\n return $this->dateType;\n\n }", "protected function typeDate(Magic $column)\n {\n return 'DATETIME';\n }", "public function getColumnType($name);", "public function getColumnType($name);", "private function _transformType($dataType)\n {\n switch ($dataType) {\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BOOLEAN:\n return self::PHP_TYPE_BOOLEAN;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_INTEGER:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_SMALLINT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BIGINT:\n return self::PHP_TYPE_INTEGER;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DECIMAL:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_FLOAT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DOUBLE_PRECISION:\n return self::PHP_TYPE_FLOAT;\n\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BLOB:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TEXT:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_CHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_BINARY_VARYING:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_VARCHAR:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_ENUM:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATE:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIME:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_TIMESTAMP:\n case ZendExt_Db_Schema_TypeMappingAdapter_Generic::TYPE_DATETIME:\n return self::PHP_TYPE_STRING;\n\n default:\n return \"unknown ({$dataType})\";\n break;\n }\n }", "public function getValueType()\n {\n return 'DATE';\n }", "public static function getSchemaType($column)\n {\n // primary key\n if ($column->isPrimaryKey && $column->autoIncrement) {\n if ('bigint' === $column->type) {\n return 'bigInteger()';\n } elseif('smallint' === $column->type) {\n return 'smallInteger()';\n }\n return 'integer()';\n }\n\n // boolean\n if ('tinyint(1)' === $column->dbType) {\n return 'boolean()';\n }\n\n // smallint\n if ('smallint' === $column->type) {\n if (null === $column->size) {\n return 'smallInteger()';\n }\n return 'smallInteger';\n }\n\n // bigint\n if ('bigint' === $column->type) {\n if (null === $column->size) {\n return 'bigInteger()';\n }\n return 'bigInteger';\n }\n\n // enum\n if (null !== $column->enumValues) {\n // https://github.com/yiisoft/yii2/issues/9797\n $enumValues = array_map('addslashes', $column->enumValues);\n return \"enum(['\".implode('\\', \\'', $enumValues).\"'])\";\n }\n\n // others\n if (null === $column->size && 0 >= $column->scale) {\n return $column->type.'()';\n }\n\n return $column->type;\n }", "public function getTypeColumn(): string\n {\n if (! isset($this->typeColumn)) {\n return 'type';\n }\n\n return $this->typeColumn;\n }", "function getOrigamiColumnType(&$Model, $column) {\n $attribute = $this->getAttribute($Model, $column);\n if (isset($attribute['Datatype']['format']))\n return $attribute['Datatype']['format'];\n return null;\n }", "protected function type_integer(Magic $column)\n {\n return 'INT';\n }", "function column($real) {\n\t\tif (is_array($real)) {\n\t\t\t$col = $real['name'];\n\t\t\tif (isset($real['limit'])) {\n\t\t\t\t$col .= '('.$real['limit'].')';\n\t\t\t}\n\t\t\treturn $col;\n\t\t}\n\n\t\t$col = str_replace(')', '', $real);\n\t\t$limit = $this->length($real);\n\t\tif (strpos($col, '(') !== false) {\n\t\t\tlist($col, $vals) = explode('(', $col);\n\t\t}\n\n\t\tif (in_array($col, array('date', 'time', 'datetime', 'timestamp'))) {\n\t\t\treturn $col;\n\t\t}\n\t\tif (($col == 'tinyint' && $limit == 1) || $col == 'boolean') {\n\t\t\treturn 'boolean';\n\t\t}\n\t\tif (strpos($col, 'int') !== false) {\n\t\t\treturn 'integer';\n\t\t}\n\t\tif (strpos($col, 'char') !== false || $col == 'tinytext') {\n\t\t\treturn 'string';\n\t\t}\n\t\tif (strpos($col, 'text') !== false) {\n\t\t\treturn 'text';\n\t\t}\n\t\tif (strpos($col, 'blob') !== false || $col == 'binary') {\n\t\t\treturn 'binary';\n\t\t}\n\t\tif (strpos($col, 'float') !== false || strpos($col, 'double') !== false || strpos($col, 'decimal') !== false) {\n\t\t\treturn 'float';\n\t\t}\n\t\tif (strpos($col, 'enum') !== false) {\n\t\t\treturn \"enum($vals)\";\n\t\t}\n\t\treturn 'text';\n\t}", "public function FIELD_TYPE($SQL_Resource, $SColumn)\n {\n if (extension_loaded(\"sqlsrv\") == false)\n {\n return false;\n }\n $Prefix_Field_Type = array(\n -155 => \"datetimeoffset\",\n -154 => \"time\",\n -152 => \"xml\",\n -151 => \"udt\",\n -11 => \"uniqueidentifier\",\n -10 => \"ntext\",\n -9 => \"nvarchar\",\n -8 => \"nchar\",\n -7 => \"bit\",\n -6 => \"tinyint\",\n -5 => \"bigint\",\n -4 => \"image\",\n -3 => \"varbinary\",\n -2 => \"binary\",\n -2 => \"timestamp\",\n -1 => \"text\",\n 1 => \"char\",\n 2 => \"numeric\",\n 3 => \"decimal\",\n 3 => \"money\",\n 3 => \"Smallmoney\",\n 4 => \"int\",\n 5 => \"smallint\",\n 6 => \"float\",\n 7 => \"real\",\n 12 => \"varchar\",\n 91 => \"date\",\n 93 => \"datetime\",\n 93 => \"datetime2\",\n 93 => \"smalldatetime\");\n $DB_Field = sqlsrv_field_metadata($SQL_Resource);\n return $Prefix_Field_Type[$DB_Field[$SColumn]['Type']];\n }", "public function getColumnTypes();", "protected function type_timestamp(Magic $column)\n {\n return 'DATETIME';\n }", "protected function typecast($value)\n {\n if ($value === ''\n && !in_array(\n $this->type,\n [\n Schema::TYPE_TEXT,\n Schema::TYPE_STRING,\n Schema::TYPE_BINARY,\n Schema::TYPE_CHAR\n ],\n true)\n ) {\n return null;\n }\n\n if ($value === null\n || gettype($value) === $this->phpType\n || $value instanceof ExpressionInterface\n || $value instanceof Query\n ) {\n return $value;\n }\n\n if (is_array($value)\n && count($value) === 2\n && isset($value[1])\n && in_array($value[1], $this->getPdoParamTypes(), true)\n ) {\n return new PdoValue($value[0], $value[1]);\n }\n\n switch ($this->phpType) {\n case 'resource':\n case 'string':\n if (is_resource($value)) {\n return $value;\n }\n if (is_float($value)) {\n // ensure type cast always has . as decimal separator in all locales\n return str_replace(',', '.', (string) $value);\n }\n return (string) $value;\n case 'integer':\n if (is_bool($value)) {\n return ($value) ? 1 : 0;\n }\n return (int) $value;\n case 'boolean':\n return (boolean) $value;\n case 'double':\n return (double) $value;\n }\n\n return $value;\n }", "protected function get_column_type($data, $grid = false)\n {\n $column = ($grid) ? 'col' : 'field';\n\n $settings = ($grid) ? $data : $data[$column . '_settings'];\n $field_content_type = isset($settings['db_column_type']) ? $settings['db_column_type'] : 'text';\n\n $fields = [\n $column . '_id_' . $data[$column . '_id'] => [\n 'type' => $field_content_type,\n 'null' => true\n ]\n ];\n\n return $fields;\n }", "public function getCast()\n {\n $result = $this->getType();\n if ($result == \"date\")\n $result = \"string\";\n if ($result == \"datetime\")\n $result = \"string\";\n if ($result == \"enum\")\n $result = \"string\";\n if ($result == \"time\")\n $result = \"string\";\n // BIT, TIMESTAMP, VARBINARY, BLOB\n return \"(\" . $result . \")\";\n }", "protected function column_data_types( $table_columns ) {\n\t\t\t$column_data_types = [];\n\n\t\t\tforeach ( $table_columns as $column_value ) {\n\t\t\t\t$column_data_types[ $column_value['column_name'] ] = $column_value['data_type'];\n\t\t\t}\n\n\t\t\treturn $column_data_types;\n\t\t}", "public function getColumnType($column)\n {\n return $this->columns[$column]['type'];\n }", "protected function typeTimestamp(Magic $column)\n {\n return 'DATETIME';\n }", "protected function type_string(Magic $column)\n {\n return 'VARCHAR';\n }", "private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}", "public function getValueType();", "function PMA_isTablefieldChar($field)\n{\n // If check to ensure types such as \"enum('one','two','char',..)\" or\n // \"enum('one','two','varchar',..)\" are not categorized as char.\n if (stripos($field['Type'], 'char') === 0\n || stripos($field['Type'], 'varchar') === 0\n ) {\n return stristr($field['Type'], 'char');\n } else {\n return false;\n }\n}", "function recognize_data_type($string)\n{\n\t$string = mb_strtolower(trim($string), 'UTF-8');\n\n\t// if the data type is empty string or any of bool representations set it as bool\n\tif(empty($string) || is_bool(filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)))\n\t\treturn \"BIT\";\n\tif(is_int(filter_var($string, FILTER_VALIDATE_INT))) // else if int set as int\n\t\treturn \"INT\";\n\tif(is_float(filter_var($string, FILTER_VALIDATE_FLOAT))) // or float\n\t\treturn \"FLOAT\";\n\n\treturn \"NTEXT\"; // if neither of them set it to NTEXT (doesn't mather if it is attribute or not, it will be decided later)\n}", "protected function typeBoolean(Magic $column)\n {\n return 'INTEGER';\n }", "public function guessType($val, $prevType){\n if($val === '' || $val === null){\n return null; // we can't guess anything from nothing.\n }\n // get the simple part of our type, e.g. VARCHAR(512) becomes VARCHAR\n $prevTypeSimple = (is_null($prevType)) ? null : explode('(',$prevType)[0];\n // If we have a numeric type that wasn't previously determined to need a VARCHAR\n if(is_numeric($val) && $prevTypeSimple !== 'VARCHAR'){\n // Check we don't have a leading zero string (e.g. barcodes)\n if((string)$val[0] === '0' && (string)$val[1] !== '.'){\n $type = 'VARCHAR(512) CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL';\n } else if (strpos($val,\".\") !== false) { // Check for decimals\n $prevPrecision = (is_null($prevType)) ? array(12,6) : $this->getDecimalPrecisions($prevType);\n // print_r($prevPrecision);echo \"\\n\";\n $type = 'DECIMAL';\n $parts = explode('.',$val);\n $type .= '('.max($prevPrecision[0],strlen($parts[0])+max($prevPrecision[1],strlen($parts[1])+2)+2).','.max($prevPrecision[1],strlen($parts[1])+2).') DEFAULT NULL';\n } else {\n $prevPrecision = (is_null($prevType)) ? array(12,6) : $this->getDecimalPrecisions($prevType);\n $type = 'DECIMAL('.max($prevPrecision[0],strlen($val)+$prevPrecision[1]+4).','.$prevPrecision[1].') DEFAULT NULL';\n }\n } else if($prevTypeSimple === 'VARCHAR'){\n $precision = max(strlen($val)+256,$this->getVarcharPrecision($prevType));\n $type = 'VARCHAR('.$precision.') CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL'; // Always default to a semi-long varchar - that's a pretty safe bet.\n } else {\n $type = 'VARCHAR('.(strlen($val)+256).') CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL'; // Always default to a semi-long varchar - that's a pretty safe bet.\n }\n return $type;\n }", "protected function createColumn($column)\n {\n $c = new ColumnSchema;\n\n $c->name = strtolower(rtrim($column['fname']));\n// $c->rawName = $this->quoteColumnName($c->name);\n $c->allowNull = $column['fnull'] !== '1';\n $c->isPrimaryKey = $column['fprimary'];\n// $c->isForeignKey = false;\n $c->size = (int) $column['flength'];\n $c->scale = (int) $column['fscale'];\n $c->precision = (int) $column['fprecision'];\n $c->autoIncrement = $column['fautoinc'] === '1';\n $defaultValue = null;\n if (!empty($column['fdefault'])) {\n\n // remove whitespace, 'DEFAULT ' prefix and surrounding single quotes; all optional\n if (preg_match(\"/\\s*(DEFAULT\\s+){0,1}('(.*)'|(.*))\\s*/i\", $column['fdefault'], $parts)) {\n $defaultValue = array_pop($parts);\n }\n\n // handle escaped single quotes like in \"funny''quoted''string\"\n $defaultValue = str_replace('\\'\\'', '\\'', $defaultValue);\n }\n if ($defaultValue === null) {\n $defaultValue = $column['fdefault_value'];\n }\n\n $type = \"\";\n\n $baseTypes = array(\n 7 => 'SMALLINT',\n 8 => 'INTEGER',\n 16 => 'INT64',\n 9 => 'QUAD',\n 10 => 'FLOAT',\n 11 => 'D_FLOAT',\n 17 => 'BOOLEAN',\n 27 => 'DOUBLE',\n 12 => 'DATE',\n 13 => 'TIME',\n 35 => 'TIMESTAMP',\n 261 => 'BLOB',\n 37 => 'VARCHAR',\n 14 => 'CHAR',\n 40 => 'CSTRING',\n 45 => 'BLOB_ID',\n );\n\n if (array_key_exists((int) $column['fcodtype'], $baseTypes)) {\n $type = $baseTypes[(int) $column['fcodtype']];\n }\n\n switch ((int) $column['fcodtype']) {\n case 7:\n case 8:\n switch ((int) $column['fcodsubtype']) {\n case 1:\n $type = 'NUMERIC';\n break;\n case 2:\n $type = 'DECIMAL';\n break;\n }\n break;\n case 12:\n case 13:\n case 35:\n $c->size=19;\n break;\n case 16:\n switch ((int) $column['fcodsubtype']) {\n case 1:\n $type = 'NUMERIC';\n break;\n case 2:\n $type = 'DECIMAL';\n break;\n default :\n $type = 'BIGINT';\n break;\n }\n break;\n case 261:\n switch ((int) $column['fcodsubtype']) {\n case 1:\n $type = 'TEXT';\n break;\n }\n break;\n }\n\n $c->init(rtrim($type), $defaultValue);\n\n return $c;\n }", "public static function getColumnTypes()\n {\n return array(\n 'bookId' => 'int',\n 'languageId' => 'int'\n );\n }", "public function getAllowInsertColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertColumns'\");\n }", "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'int' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}',\n 'timestamp' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}'\n ];\n }", "private static function getDataParameterType($sqlDataType)\n {\n if (strpos($sqlDataType, \"char\") !== false)\n return 'DataParameter::TYPE_VARCHAR';\n \n if (strpos($sqlDataType, \"decimal\") !== false)\n return 'DataParameter::TYPE_DOUBLE';\n \n if (strpos($sqlDataType, \"date\") !== false ||\n strpos($sqlDataType, \"time\") !== false)\n return 'DataParameter::TYPE_VARCHAR';\n \n if (strpos($sqlDataType, \"tinyint\") !== false ||\n strpos($sqlDataType, \"bool\") !== false)\n return 'DataParameter::TYPE_INTEGER';\n \n if (strpos($sqlDataType, \"int\") !== false)\n return 'DataParameter::TYPE_INTEGER';\n \n return 'DataParameter::TYPE_VARCHAR';\n }", "public function types() : array\n {\n $types = [];\n\n for ($i = 0; $i < $this->numColumns(); $i++) {\n $types[] = $this->columnType($i);\n }\n\n return $types;\n }", "public function column($field)\n\t{\n\t\tif (!isset($field['type'])) {\n\t\t\t$field['type'] = 'string';\n\t\t}\n\n\t\tif (!isset($field['name'])) {\n\t\t\tthrow new InvalidArgumentException(\"Column name not defined.\");\n\t\t}\n\n\t\tif (!isset($this->_columns[$field['type']])) {\n\t\t\tthrow new UnexpectedValueException(\"Column type `{$field['type']}` does not exist.\");\n\t\t}\n\n\t\t$field += $this->_columns[$field['type']];\n\n\t\t$field += [\n\t\t\t'name' => null,\n\t\t\t'type' => null,\n\t\t\t'length' => null,\n\t\t\t'precision' => null,\n\t\t\t'default' => null,\n\t\t\t'null' => null\n\t\t];\n\n\t\t$isNumeric = preg_match('/^(integer|float|boolean)$/', $field['type']);\n\t\tif ($isNumeric && $field['default'] === '') {\n\t\t\t$field['default'] = null;\n\t\t}\n\t\t$field['use'] = strtolower($field['use']);\n\t\treturn $this->_buildColumn($field);\n\t}" ]
[ "0.70724964", "0.70270747", "0.6657593", "0.65027493", "0.6470381", "0.6431656", "0.6430504", "0.64113694", "0.63587874", "0.6345374", "0.634257", "0.6335417", "0.62989426", "0.6271382", "0.6257551", "0.62444067", "0.6243017", "0.62238723", "0.62238723", "0.62238723", "0.62238723", "0.6195068", "0.6184795", "0.61709493", "0.61481017", "0.61184496", "0.61184496", "0.61046356", "0.60790753", "0.6078078", "0.60705835", "0.60640645", "0.6055023", "0.6016652", "0.6010798", "0.6002491", "0.5997514", "0.5988322", "0.5988322", "0.5983792", "0.5983044", "0.5967585", "0.59662044", "0.5957078", "0.5933088", "0.5925404", "0.5917026", "0.59014815", "0.59014815", "0.58999974", "0.58961654", "0.58866817", "0.588597", "0.58741915", "0.58737797", "0.58693784", "0.5844252", "0.5834548", "0.58270705", "0.5823941", "0.58169", "0.58129007", "0.58120185", "0.5799311", "0.5793106", "0.57914484", "0.57892144", "0.5787638", "0.5783346", "0.5783346", "0.5756631", "0.57222116", "0.5718335", "0.5715725", "0.5715586", "0.5710465", "0.57047623", "0.5701753", "0.5683061", "0.5625224", "0.5605788", "0.55969286", "0.55795187", "0.5564649", "0.5546768", "0.5535905", "0.5534406", "0.5531326", "0.5512728", "0.5512242", "0.5503632", "0.5500521", "0.54922515", "0.5490377", "0.54721946", "0.5469669", "0.54657227", "0.544496", "0.54337305", "0.54302406" ]
0.65234345
3
Print an HTML escaped URI
public function p() { $args = func_get_args(); print htmlspecialchars(call_user_func_array(array($this, 'get'), $args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esc_url_raw($url, $protocols = \\null)\n {\n }", "public function renderUri();", "private static function printUri ($url, $encodage) {\n\t\t$uri = '';\n\t\t$separator = '/?';\n\t\t\n\t\tif($encodage == 'html') {\n\t\t\t$and = '&amp;';\n\t\t} else {\n\t\t\t$and = '&';\n\t\t}\n\t\t\n\t\tif (isset ($url['c'])\n\t\t && $url['c'] != Request::defaultControllerName ()) {\n\t\t\t$uri .= $separator . 'c=' . $url['c'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['a'])\n\t\t && $url['a'] != Request::defaultActionName ()) {\n\t\t\t$uri .= $separator . 'a=' . $url['a'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['params'])) {\n\t\t\tforeach ($url['params'] as $key => $param) {\n\t\t\t\t$uri .= $separator . $key . '=' . $param;\n\t\t\t\t$separator = $and;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $uri;\n\t}", "function esc_url_raw( $url, $protocols = null ) {\n\treturn esc_url( $url, $protocols, 'db' );\n}", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n }", "function esc_url( $url, $protocols = null, $_context = 'display' ) {\n\t$original_url = $url;\n\n\tif ( '' == $url )\n\t\treturn $url;\n\t$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\t$strip = array('%0d', '%0a', '%0D', '%0A');\n\t$url = _deep_replace($strip, $url);\n\t$url = str_replace(';//', '://', $url);\n\t/* If the URL doesn't appear to contain a scheme, we\n\t * presume it needs http:// appended (unless a relative\n\t * link starting with /, # or ? or a php file).\n\t */\n\tif ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n\t\t! preg_match('/^[a-z0-9-]+?\\.php/i', $url) )\n\t\t$url = 'http://' . $url;\n\n\t// Replace ampersands and single quotes only when displaying.\n\tif ( 'display' == $_context ) {\n\t\t$url = wp_kses_normalize_entities( $url );\n\t\t$url = str_replace( '&amp;', '&#038;', $url );\n\t\t$url = str_replace( \"'\", '&#039;', $url );\n\t}\n\n\tif ( '/' === $url[0] ) {\n\t\t$good_protocol_url = $url;\n\t} else {\n\t\tif ( ! is_array( $protocols ) )\n\t\t\t$protocols = wp_allowed_protocols();\n\t\t$good_protocol_url = wp_kses_bad_protocol( $url, $protocols );\n\t\tif ( strtolower( $good_protocol_url ) != strtolower( $url ) )\n\t\t\treturn '';\n\t}\n\n\t/**\n\t * Filter a string cleaned and escaped for output as a URL.\n\t *\n\t * @since 2.3.0\n\t *\n\t * @param string $good_protocol_url The cleaned URL to be returned.\n\t * @param string $original_url The URL prior to cleaning.\n\t * @param string $_context If 'display', replace ampersands and single quotes only.\n\t */\n\treturn apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );\n}", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "function printHtml($p) {\n\treturn htmlspecialchars($p, ENT_QUOTES, 'UTF-8');\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "public function outputUrl()\n\t{\n\t\techo App::e($this->url);\n\t}", "function URLStd($string=''){\n\n\treturn htmlentities($string);\n}", "public function testUrlOptionQuotes()\n {\n $this->assertProduces('text [url=\"http://example.com/?a=b&c=d\"]this is a \"link\"[/url]', 'text <a href=\"http://example.com/?a=b&amp;c=d\">this is a &quot;link&quot;</a>');\n }", "protected function printOpenHtml()\n {\n echo '<HTML>';\n }", "private function printUrl($options = array())\n {\n $url = $this->getUrl();\n $md5 = $this->getMd5();\n \n if (empty($url) === true || empty($md5) === true) {\n throw new Exception('url and md5 can\\'t be empty');\n }\n \n // printUrl allow only http or https protocol\n if ((bool)preg_match('/^https?:/', $url) === false) {\n throw new Exception('url must be HTTP protocole');\n }\n \n $pdf_filename = ApiPrint::getPdfTmpFilename($md5, $options);\n \n return $this->printCmd($url, $pdf_filename, $options);\n }", "public static function url($string) {\n return rawurlencode($string);\n }", "function wikiurl( $s ) {\n\treturn str_replace( '%2F', '/', rawurlencode( $s ) );\n}", "function urisprintf($pattern /* , ... */) {\n $args = func_get_args();\n return xsprintf('xsprintf_uri', null, $args);\n}", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "public function test_escaping() \n\t{\n\t\tCCRouter::on( 'this/u$l/conta([num])n+special/[any]', function(){\n\t\t\techo \"Escaping works\";\n\t\t});\n\t\t\n\t\t$response = CCRequest::uri( 'this/u$l/conta(1)n+special/chars' )->perform()->response()->body;\n\t\t$this->assertEquals( $response , \"Escaping works\" );\n\t}", "protected function escape($value)\n {\n $escaper = $this->getEscaper();\n if (!method_exists($escaper, 'escapeFullUrl')) {\n $this->setEscaper(new Escaper);\n }\n\n return $this->getEscaper()->escapeFullUrl($value);\n }", "public function getURI();", "function well_known_page() {\n $link = 'http://tools.ietf.org/html/rfc5785';\n print t('See <a href=\"!link\">!link</a> for more information.', array(\n '!link' => url($link)\n ));\n}", "function raw_u($string=\"\"){\r\n //\"?\"前部分语句 空格 = %20\r\n return rawurlencode($string);\r\n}", "function qa_self_html()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_used_url_format;\n\n\treturn qa_path_html(qa_request(), $_GET, null, $qa_used_url_format);\n}", "function safeURL ($text) {\n\t//WARNING: this does not sanitise against HTML, it’s assumed text is passed through `safeHTML` before output\n\treturn str_replace ('%2F', '/', rawurlencode ($text));\n}", "function string_url( $p_string ) \r\n{\r\n\t$p_string = rawurlencode( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function display_binary_uri($row, $id) \n{\n global $cfg, $lang;\n \n if ($cfg['display_log_uri'] == 'yes'){\n\n $row['binname'] = htmlspecialchars($row['binname']);\n $log_uri =<<<EOD\n<fieldset> \n<legend accesskey=\"a\">{$lang['log_uri']}</legend>\n<form>\n<p><input value=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}files/article.php?id={$id}\" size=\"60\" class=\"uri\" /></p>\n<h4>XHTML code:</h4>\n<textarea rows=\"5\" cols=\"60\" class=\"uri-code\" />\n&lt;a href=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}files/article.php?id={$id}\" title=\"{$cfg['blog_title']} : {$row['binname']}\" &gt;\n{$row['binname']}\n&lt;/a&gt;\n</textarea>\n</form>\n</fieldset>\nEOD;\n } else {\n $log_uri = '';\n }\n return $log_uri;\n}", "function print_html_bot()\n{\n echo \"Quellcode:\";\n $adresse = \"https://github.com/GitNorb/freifunk-myk_monitoring_page\";\n echo \"<td> <a href=\\\"\" . $adresse . \"\\\">\" . $adresse . \"</a> </td><br/>\";\n echo \"Dieses Skript sammelt keinerlei Daten. Eventuell sammelt aber der Server, der diese Seite bereitstellt, Daten.<br/>Um der DSGVO zu entsprechen ist <a href=https://www.uni-koblenz-landau.de/de/koblenz/GHRKO/datenschutz/userpages>hier die Datenschutzerklärung vom Rechenzentrum der Uni Koblenz-Landau</a>, wo dieses Seite gehostet ist.\";\n echo \"</body>\\n</html>\";\n}", "function _generateURI($title) {\n \n // replace numeric entities by its characters and vaporise all other lethal characters\n $s = array(\n '/&#x([\\dA-F]+);/e',\n '/\\n\\r\\t/'\n );\n $r = array(\n \"chr(hexdec('\\\\1'))\",\n ''\n );\n \n $uri = preg_replace($s, $r, $title);\n return urlencode($uri);\n }", "public function dumpUrl()\n {\n print $this->getSession()->getCurrentUrl().\"\\r\\n\";\n\n }", "public function stdWrap_rawUrlEncode($content = '')\n {\n return rawurlencode($content);\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "function display_article_uri($row, $id) \n{\n global $cfg, $lang;\n \n if ($cfg['display_log_uri'] == 'yes') {\n \n $row['name'] = htmlspecialchars($row['name']);\n $article_uri =<<<EOD\n<fieldset> \n<legend accesskey=\"a\">{$lang['log_uri']}</legend>\nXHTML Code :<br />\n<pre>\n&lt;a href=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}article.php?id={$id}\" title=\"{$cfg['blog_title']} : {$row['name']}\" &gt;\n{$row['name']}\n&lt;/a&gt;\n</pre>\n</fieldset>\nEOD;\n } else {\n $article_uri = '';\n }\n return $article_uri;\n}", "public static function rawurlencode($value) {\n return strtr(rawurlencode($value), array('%7E' => '~', '+' => ' '));\n }", "public function renderEscaped(): string\n {\n $this->escapeHtml(true);\n\n return $this->render();\n }", "function safePrint($string)\n {\n echo htmlspecialchars($string);\n }", "public function __toString()\n {\n return librdf_uri_to_string($this->uri);\n }", "public function prepurl_for_display($args)\n {\n $url = $args['url'];\n if ($url != '') {\n if ($url == 'http://' || $url == 'http://http://' || $url == 'http:///') {\n $url = '';\n } elseif (strstr(\"http://\", $url)) {\n $url = \"http://\" . $url;\n }\n }\n return $url;\n }", "public function setter_url_as_html ($value)\n {\n $url = $this->_url_for_value ($value);\n return $url->as_text();\n }", "public function getUrlString(){\n\t\treturn rawurlencode($this->getJsonString());\t\n\t}", "public function escapeXssInUrl($data)\n {\n return htmlspecialchars(\n $this->escapeScriptIdentifiers((string)$data),\n ENT_COMPAT | ENT_HTML5 | ENT_HTML401,\n 'UTF-8',\n false\n );\n }", "public function __toString()\n {\n $scheme = $this->getScheme();\n $authority = $this->getAuthority();\n $path = $this->getPath();\n $query = $this->getQuery();\n $fragment = $this->getFragment();\n\n return ($scheme ? $scheme . '://' : '') . $authority . $path . ($query ? '?' . $query : '') . ($fragment ? '#' . $fragment : '');\n }", "public function testUrlParam()\n {\n $this->assertProduces('text [url]http://example.com/?a=b&c=d[/url] more text', 'text <a href=\"http://example.com/?a=b&amp;c=d\">http://example.com/?a=b&amp;c=d</a> more text');\n }", "function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}", "public function url()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_URL);\n\t}", "public function formatAsUrl() {\r\n $url_save_chars = array_merge(range('a','z'),range(0,9),['_','-']);\r\n \r\n $specials = array('ä','ü','ö','ß',' ','ç','é','â','ê','î','ô','û','à','è','ì','ò','ù','ë','ï','ü','&');\r\n $specials_replacements = array('ae','ue','oe','ss','_','c','e','a','e','i','o','u','a','e','i','o','u','e','i','u','');\r\n // make everything lowercase and replace umlaute and spaces\r\n $url_save_text = trim(str_replace($specials, $specials_replacements, mb_strtolower($this->text,'UTF-8')));\r\n // remove every invalid character thats left from text (replace with \"-\") \r\n for($i = 0; $i < strlen($url_save_text); $i++){\r\n if(!in_array($url_save_text[$i], $url_save_chars)){\r\n $url_save_text[$i] = \"-\";\r\n }\r\n } \r\n return $url_save_text;\r\n }", "public function getContent() : string\n {\n return sprintf('<a href=\"%s\">%s</a>', $this->link, parent::getContent());\n }", "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "function format_href($p_action, $p_args = array()){\n\t$t_href = htmlspecialchars($p_action);\n\n\tif(count($p_args) > 0)\n\t\t$t_href .= '?';\n\n\tforeach($p_args as $t_key => $t_value)\n\t\t$t_href .= '&' . $t_key . (($t_value != '') ? '=' : '') . $t_value;\n\n\treturn $t_href;\n}", "public function test(){\n\t $url = urls('content/show','id=96');\n\t echo \"<a href='$url'>$url</a>\";\n\t}", "function print_bracket_link( $p_link, $p_url_text ) {\r\n\t\tif ( empty( $p_link ) ) {\r\n\t\t\techo \"[ $p_url_text ]\";\r\n\t\t} else {\r\n\t\t\techo \"[ <a href=\\\"$p_link\\\">$p_url_text</a> ]\";\r\n\t\t}\r\n\t}", "function print_Link($id, $sub, $value)\n{\n\t$elem = $this->elements[$id];\n\t$url = $this->getUrl($elem);\n\n\tif ($sub == 'url') {\n\t\tprint $url;\n\t\treturn;\n\t}\n\tif ($sub == 'js') {\n\t\tif ($elem['popup'])\n\t\t\t$js = $this->getPopup($id, $elem['popup'], $url);\n\t\telse {\n\t\t\t$js = \"window.location='$url'\";\n\t\t\tif ($elem['hash']) {\n\t\t\t\t$js .= \"+(document.location.hash || '');\";\n\t\t\t}\n\t\t}\n\n\t\tprint $js;\n\t\treturn;\n\t}\n\n\tif ($elem['img']) {\n\t\t$lb = \"<img src=\\\"{$elem['img']}\\\" class=\\\"link\\\" alt=\\\"{$elem['lb']}\\\" title=\\\"{$elem['lb']}\\\"\".($this->useXhtml? ' />' : '>');\n\t}\n\telse {\n\t\t$lb = $elem['lb'];\n\t}\n\n\tif (!$url) {print $lb; return; }\n\n\tif ($elem['popup'])\n\t\t$url = $this->getPopup($id, $elem['popup'], $url);\n\n\tif ($elem['field'] and !$lb) {\n\t\tob_start();\n\t\t$this->print_Element($elem['field'],$sub,$value);\n\t\t$lb = ob_get_contents();\n\t\tob_end_clean();\n\t}\n\telseif (!$lb)\n\t\t$lb = (string)$value;\n\n\t$tag = array('href' => $url, 'class' => $id, '__attr' => $elem['attr']);\n\n\tif ($elem['confirm']) {\n\t\t$tag['onclick'] = \"return confirm('\".$elem['confirm'].\"')\";\n\t}\n\n\tif ($elem['html']) $tag = array_merge($tag, $elem['html']);\n\tprint $this->htmlTag('a', $tag, $lb);\n}", "function oauth_urlencode($uri) {}", "function format_uri( $string, $separator = '-' )\n{\n $accents_regex = '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i';\n $special_cases = array( '&' => 'and', \"'\" => '');\n $string = mb_strtolower( trim( $string ), 'UTF-8' );\n $string = str_replace( array_keys($special_cases), array_values( $special_cases), $string );\n $string = preg_replace( $accents_regex, '$1', htmlentities( $string, ENT_QUOTES, 'UTF-8' ) );\n $string = preg_replace(\"/[^a-z0-9]/u\", \"$separator\", $string);\n $string = preg_replace(\"/[$separator]+/u\", \"$separator\", $string);\n return $string;\n}", "function string_display_links( $p_string ) \r\n{\r\n\t$p_string = string_display( $p_string );\r\n\t$p_string = string_insert_hrefs( $p_string );\r\n\treturn $p_string;\r\n}", "function character_data($parser, $data) {\r\n if ( $this->make_link ) {\r\n print '<a href=\"http://' . $data . '\" target=\"_blank\">' . $data . '</a>';\r\n $this->make_link = false;\r\n } else {\r\n print $data;\r\n }\r\n }", "function LinkToURL($url = null)\n\t{\n\t\t// Print URL link using HTML class\n\t\techo HTML::LinkToURL($url);\n\t}", "function rawurlencode_deep($value)\n {\n }", "public function testToString()\n {\n $uri = new Uri(\n 'http',\n 'domain.tld',\n 1111,\n '/path/123',\n 'q=abc',\n 'test',\n 'user',\n 'password'\n );\n\n $this->assertEquals('http://user:[email protected]:1111/path/123?q=abc#test', (string)$uri);\n }", "function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }", "function e($str) {\n echo htmlspecialchars($str, ENT_QUOTES);\n}", "function rawurlencode_spaces( $url ) {\n\t\treturn str_replace( ' ', rawurlencode( ' ' ), $url );\n\t}", "public function __toString()\n {\n return $this->uri == null ? '' : $this->uri;\n }", "public function testToString()\n {\n $uri = new Uri(\n \"https\",\n \"user\",\n \"pass\",\n \"test.com\",\n 443,\n \"/test/path\",\n \"id=1\",\n \"frag\"\n );\n self::assertSame(\"https://user:[email protected]:443/test/path?id=1#frag\", (string) $uri);\n }", "function htmlout($text)\n{\n\techo html($text);\n}", "public function escape()\n\t{\n\t\treturn ! $this->escaped ? esc_html($this->content) : $this->content;\n\t}", "public function a($url = \"#\", $content) {\n echo \"<a href='\" . $url . \"'>\" . $content . \"</a>\";\n }", "public abstract function asHTML();", "public function str() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "public function testUrlOption()\n {\n $this->assertProduces('text [url=http://example.com/?a=b&c=d]this is a \"link\"[/url]', 'text <a href=\"http://example.com/?a=b&amp;c=d\">this is a &quot;link&quot;</a>');\n }", "protected function escape($value, $type='literal') \n\t{\n\t\tswitch($type) {\n\t\t\tcase 'uri':\n\t\t\t\t$value = str_replace(array('<', '>'), array('%3C', '%3E'), $value);\n\t\t\tdefault:\n\t\t\t\t$value = str_replace('\"', '\"\"', $value);\n\t\t}\n\n\t\treturn $value;\n\t}", "function h($text) {\r\n echo(htmlspecialchars($text, ENT_QUOTES));\r\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "function labs_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "public function toString()\n {\n if (!$this->isValid()) {\n if ($this->isAbsolute() || !$this->isValidRelative()) {\n throw new Exception\\InvalidUriException(\n 'URI is not valid and cannot be converted into a string'\n );\n }\n }\n\n $uri = '';\n\n if ($this->scheme) {\n $uri .= $this->scheme . ':';\n }\n\n if ($this->host !== null) {\n $uri .= '//';\n $uri .= $this->host;\n }\n\n if ($this->path) {\n $uri .= static::encodePath($this->path);\n } elseif ($this->host && ($this->query || $this->fragment)) {\n $uri .= ':/';\n }\n\n if ($this->query) {\n $uri .= \"?\" . static::encodeQueryFragment($this->query);\n }\n\n if ($this->fragment) {\n $uri .= \"#\" . static::encodeQueryFragment($this->fragment);\n }\n\n return $uri;\n }", "function referrer_link( $format = '%link', $title = '%title', $sep = '&raquo;', $sepdirection = 'left' ) {\n\techo Smarter_Navigation::referrer_link( $format, $title, $sep, $sepdirection );\n}", "private function urlContents(string $url): string\n {\n return <<<FILE\n [InternetShortcut]\n URL=$url\n FILE;\n }", "function raw_u($string=\"\") {\n\t\treturn rawurlencode($string);\n\t}", "public function toUrl()\n {\n\n return '<a href=\"'.static::$toUrl.'&amp;objid='.$this->id.'\" >'.$this->text().'</a>';\n\n }", "public static function escape($som) {}", "public static function echoEscaped($input) {\r\n\t\t//htmlentities escapes all characters which have HTML character entity \r\n\t\techo htmlentities($input, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE, 'ISO-8859-1', false);\r\n\t}", "public static function escapeForDisplay($input) {\r\n if (get_magic_quotes_gpc()) {\r\n $input = stripslashes($input);\r\n }\r\n $result = htmlspecialchars($input, ENT_QUOTES);\r\n return $result;\r\n }", "public function __toString() {\n\t\treturn $this->uri;\n\t}", "function string_display_line_links( $p_string ) \r\n{\r\n\t$p_string = string_display_line( $p_string );\r\n\t$p_string = string_insert_hrefs( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function urlDisplay($url, $limit = null, $scheme = true)\n {\n return Helper::urlDisplay($url, $limit, $scheme);\n }", "function utf8_uri_encode($utf8_string, $length = 0, $encode_ascii_characters = \\false)\n {\n }", "public function html() {}", "protected function _urlencode($value) {\n return rawurlencode($value);\n //Amazon suggests doing this, but it seems to break things rather than fix them:\n //return str_replace('%7E', '~', rawurlencode($value));\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "public function __toString()\n\t{\n\t\treturn $this->getUrl(TRUE);\n\t}", "function formatCurrentUrl() ;", "function urlencode_1738_plus($url) {\n\t$uri = '';\n\n\t# nom de domaine accentué ?\n\tif (preg_match(',^https?://[^/]*,u', $url, $r)) {\n\t\t\n\t}\n\n\t$l = strlen($url);\n\tfor ($i=0; $i < $l; $i++) {\n\t\t$u = ord($a = $url[$i]);\n\t\tif ($u <= 0x20 OR $u >= 0x7F OR in_array($a, array(\"'\",'\"')))\n\t\t\t$a = rawurlencode($a);\n\t\t// le % depend : s'il est suivi d'un code hex, ou pas\n\t\tif ($a == '%'\n\t\tAND !preg_match('/^[0-9a-f][0-9a-f]$/i', $url[$i+1].$url[$i+2]))\n\t\t\t$a = rawurlencode($a);\n\t\t$uri .= $a;\n\t}\n\treturn quote_amp($uri);\n}", "public function raw()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse return $this->generateString();\n\t}", "public function toString(): string\n\t{\n\t\t$url = $this->base();\n\t\t$slash = true;\n\n\t\tif (empty($url) === true) {\n\t\t\t$url = '/';\n\t\t\t$slash = false;\n\t\t}\n\n\t\t$path = $this->path->toString($slash) . $this->params->toString(true);\n\n\t\tif ($this->slash && $slash === true) {\n\t\t\t$path .= '/';\n\t\t}\n\n\t\t$url .= $path;\n\t\t$url .= $this->query->toString(true);\n\n\t\tif (empty($this->fragment) === false) {\n\t\t\t$url .= '#' . $this->fragment;\n\t\t}\n\n\t\treturn $url;\n\t}", "protected function toHtml()\n\t{\n\t\t// parameter is hexadecimal number\n\t\treturn \"&#x{$this->parameter};\";\n\t}", "function html_escape($v) {\n\treturn escape($v, TRUE);\n}", "public function print()\n {\n if (!headers_sent()) {\n header(\"Content-Type: text/html\");\n }\n\n $data = \"\";\n $args = func_get_args();\n foreach ($args as $arg) {\n $data .= $this->processLine($arg);\n }\n\n echo \"<style>$this->style</style>\";\n echo \"$data\";\n echo \"<script type='text/javascript'>$this->scripts</script>\";\n }", "public function __toString()\n {\n return $this->uri;\n }", "public function e()\n\t{\n\t\treturn $this->escape();\n\t}" ]
[ "0.64130765", "0.62795436", "0.6229998", "0.603219", "0.5919408", "0.57777673", "0.5764219", "0.5764219", "0.5762591", "0.56746805", "0.56746805", "0.5664323", "0.56168866", "0.55927104", "0.5562192", "0.55058396", "0.5496703", "0.54831773", "0.5481119", "0.54784757", "0.54770267", "0.546445", "0.54525477", "0.54497415", "0.5440425", "0.54352015", "0.5386394", "0.53752786", "0.535467", "0.53487235", "0.5332921", "0.5331304", "0.5304413", "0.5299203", "0.52858835", "0.5278532", "0.52692974", "0.5256938", "0.52530634", "0.52461064", "0.524018", "0.5239279", "0.5235462", "0.52208054", "0.5210858", "0.5208571", "0.5206534", "0.520533", "0.51937366", "0.51873404", "0.5186553", "0.51858586", "0.5184519", "0.5183932", "0.51815885", "0.51796466", "0.51776636", "0.51666003", "0.51549596", "0.5141683", "0.5141231", "0.51401144", "0.5134145", "0.5133884", "0.51333225", "0.51322377", "0.51246345", "0.51145303", "0.5097983", "0.509556", "0.5091042", "0.5088839", "0.50886774", "0.50796175", "0.5076594", "0.50541455", "0.5045728", "0.5037964", "0.50353235", "0.5035023", "0.5031152", "0.5031092", "0.5028734", "0.5026802", "0.5026049", "0.5016077", "0.50159657", "0.50119823", "0.50080115", "0.50053877", "0.5002695", "0.4999658", "0.49982774", "0.49936134", "0.49931908", "0.4991086", "0.498799", "0.49867612", "0.498462", "0.49779597", "0.49724647" ]
0.0
-1
Print an HTML escaped site URI
public function pSite() { $args = func_get_args(); print htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esc_url_raw($url, $protocols = \\null)\n {\n }", "public function outputUrl()\n\t{\n\t\techo App::e($this->url);\n\t}", "function esc_url_raw( $url, $protocols = null ) {\n\treturn esc_url( $url, $protocols, 'db' );\n}", "function well_known_page() {\n $link = 'http://tools.ietf.org/html/rfc5785';\n print t('See <a href=\"!link\">!link</a> for more information.', array(\n '!link' => url($link)\n ));\n}", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n }", "function print_html_bot()\n{\n echo \"Quellcode:\";\n $adresse = \"https://github.com/GitNorb/freifunk-myk_monitoring_page\";\n echo \"<td> <a href=\\\"\" . $adresse . \"\\\">\" . $adresse . \"</a> </td><br/>\";\n echo \"Dieses Skript sammelt keinerlei Daten. Eventuell sammelt aber der Server, der diese Seite bereitstellt, Daten.<br/>Um der DSGVO zu entsprechen ist <a href=https://www.uni-koblenz-landau.de/de/koblenz/GHRKO/datenschutz/userpages>hier die Datenschutzerklärung vom Rechenzentrum der Uni Koblenz-Landau</a>, wo dieses Seite gehostet ist.\";\n echo \"</body>\\n</html>\";\n}", "public function renderUri();", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "private static function printUri ($url, $encodage) {\n\t\t$uri = '';\n\t\t$separator = '/?';\n\t\t\n\t\tif($encodage == 'html') {\n\t\t\t$and = '&amp;';\n\t\t} else {\n\t\t\t$and = '&';\n\t\t}\n\t\t\n\t\tif (isset ($url['c'])\n\t\t && $url['c'] != Request::defaultControllerName ()) {\n\t\t\t$uri .= $separator . 'c=' . $url['c'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['a'])\n\t\t && $url['a'] != Request::defaultActionName ()) {\n\t\t\t$uri .= $separator . 'a=' . $url['a'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['params'])) {\n\t\t\tforeach ($url['params'] as $key => $param) {\n\t\t\t\t$uri .= $separator . $key . '=' . $param;\n\t\t\t\t$separator = $and;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $uri;\n\t}", "public function dumpUrl()\n {\n print $this->getSession()->getCurrentUrl().\"\\r\\n\";\n\n }", "function esc_url( $url, $protocols = null, $_context = 'display' ) {\n\t$original_url = $url;\n\n\tif ( '' == $url )\n\t\treturn $url;\n\t$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\t$strip = array('%0d', '%0a', '%0D', '%0A');\n\t$url = _deep_replace($strip, $url);\n\t$url = str_replace(';//', '://', $url);\n\t/* If the URL doesn't appear to contain a scheme, we\n\t * presume it needs http:// appended (unless a relative\n\t * link starting with /, # or ? or a php file).\n\t */\n\tif ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n\t\t! preg_match('/^[a-z0-9-]+?\\.php/i', $url) )\n\t\t$url = 'http://' . $url;\n\n\t// Replace ampersands and single quotes only when displaying.\n\tif ( 'display' == $_context ) {\n\t\t$url = wp_kses_normalize_entities( $url );\n\t\t$url = str_replace( '&amp;', '&#038;', $url );\n\t\t$url = str_replace( \"'\", '&#039;', $url );\n\t}\n\n\tif ( '/' === $url[0] ) {\n\t\t$good_protocol_url = $url;\n\t} else {\n\t\tif ( ! is_array( $protocols ) )\n\t\t\t$protocols = wp_allowed_protocols();\n\t\t$good_protocol_url = wp_kses_bad_protocol( $url, $protocols );\n\t\tif ( strtolower( $good_protocol_url ) != strtolower( $url ) )\n\t\t\treturn '';\n\t}\n\n\t/**\n\t * Filter a string cleaned and escaped for output as a URL.\n\t *\n\t * @since 2.3.0\n\t *\n\t * @param string $good_protocol_url The cleaned URL to be returned.\n\t * @param string $original_url The URL prior to cleaning.\n\t * @param string $_context If 'display', replace ampersands and single quotes only.\n\t */\n\treturn apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );\n}", "function wikiurl( $s ) {\n\treturn str_replace( '%2F', '/', rawurlencode( $s ) );\n}", "function qa_self_html()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_used_url_format;\n\n\treturn qa_path_html(qa_request(), $_GET, null, $qa_used_url_format);\n}", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "function print_link($link) {\n //check if is a valid Link\n if (filter_var($link, FILTER_VALIDATE_URL) !== FALSE) {\n echo $link;\n } else {\n echo SITE_ADDR . $link;\n }\n}", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "function darksnow_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "protected function pageURI(): string\n {\n $ssl = (@$_SERVER['HTTPS'] == 'on');\n $link = ($ssl? 'https://' : 'http://') .$_SERVER['HTTP_HOST'];\n if ($_SERVER['SERVER_PORT'] != ($ssl? '443' : '80')) {\n $link .= ':' .$_SERVER[\"SERVER_PORT\"];\n }\n return $link .urldecode($_SERVER['REQUEST_URI']);\n }", "function labs_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "public function prepurl_for_display($args)\n {\n $url = $args['url'];\n if ($url != '') {\n if ($url == 'http://' || $url == 'http://http://' || $url == 'http:///') {\n $url = '';\n } elseif (strstr(\"http://\", $url)) {\n $url = \"http://\" . $url;\n }\n }\n return $url;\n }", "function LinkToURL($url = null)\n\t{\n\t\t// Print URL link using HTML class\n\t\techo HTML::LinkToURL($url);\n\t}", "public function test(){\n\t $url = urls('content/show','id=96');\n\t echo \"<a href='$url'>$url</a>\";\n\t}", "function formatCurrentUrl() ;", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "public function url(){\r\n\t\techo $_SERVER['SERVER_NAME'].\" => \".$_SERVER['PHP_SELF'];\r\n\t}", "function URLStd($string=''){\n\n\treturn htmlentities($string);\n}", "public function pSiteRaw() {\n $args = func_get_args();\n print call_user_func_array(array($this, 'getSite'), $args);\n }", "function referrer_link( $format = '%link', $title = '%title', $sep = '&raquo;', $sepdirection = 'left' ) {\n\techo Smarter_Navigation::referrer_link( $format, $title, $sep, $sepdirection );\n}", "function gSiteMap_outputTerm($pageUrl, $priority, $changeFreq, $lastMod)\n{\n\tprint(\"<url>\\n\");\n\t$pageUrl = str_replace(\"&\",\"&amp;\",$pageUrl);\n\t$pageUrl = str_replace(\"'\",\"&apos;\",$pageUrl);\n\t$pageUrl = str_replace(\"\\\"\",\"&quot;\",$pageUrl);\n\t$pageUrl = str_replace(\">\",\"&gt;\",$pageUrl);\n\t$pageUrl = str_replace(\"<\",\"&lt;\",$pageUrl);\n\tprint(\" <loc>\" . utf8_encode($pageUrl) . \"</loc>\\n\");\n\tif($priority != 0)\n\t{\n\t\tprint(\" <priority>\" . $priority . \"</priority>\\n\");\n\t}\n\tif($changeFreq != \"\")\n\t{\n\t\tprint(\" <changefreq>\" . $changeFreq . \"</changefreq>\\n\");\n\t}\n\tif($lastMod != 0)\n\t{\n\t\tprint(\" <lastmod>\" . $lastMod . \"</lastmod>\\n\");\n\t}\n\tprint(\"</url>\\n\");\n}", "function printHtml($p) {\n\treturn htmlspecialchars($p, ENT_QUOTES, 'UTF-8');\n}", "public function url()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_URL);\n\t}", "protected function printOpenHtml()\n {\n echo '<HTML>';\n }", "function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "private function printUrl($options = array())\n {\n $url = $this->getUrl();\n $md5 = $this->getMd5();\n \n if (empty($url) === true || empty($md5) === true) {\n throw new Exception('url and md5 can\\'t be empty');\n }\n \n // printUrl allow only http or https protocol\n if ((bool)preg_match('/^https?:/', $url) === false) {\n throw new Exception('url must be HTTP protocole');\n }\n \n $pdf_filename = ApiPrint::getPdfTmpFilename($md5, $options);\n \n return $this->printCmd($url, $pdf_filename, $options);\n }", "public function getURI();", "function webworth() \r\n{\r\n$url = 'www.webworth.info/'.$host;\r\n$host = $_SERVER['HTTP_HOST'];\r\n\r\necho '<a href=\"http://www.webworth.info/'.$host.'\" target=\"_blank\" rel=\"follow\"><img src=\"http://www.webworth.info/'.$host.'/sitewidget.gif\" alt=\"Website Value\" /></a>';\r\n}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "public function getContent() : string\n {\n return sprintf('<a href=\"%s\">%s</a>', $this->link, parent::getContent());\n }", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "function safeURL ($text) {\n\t//WARNING: this does not sanitise against HTML, it’s assumed text is passed through `safeHTML` before output\n\treturn str_replace ('%2F', '/', rawurlencode ($text));\n}", "function print_bracket_link( $p_link, $p_url_text ) {\r\n\t\tif ( empty( $p_link ) ) {\r\n\t\t\techo \"[ $p_url_text ]\";\r\n\t\t} else {\r\n\t\t\techo \"[ <a href=\\\"$p_link\\\">$p_url_text</a> ]\";\r\n\t\t}\r\n\t}", "function CurrPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "private function getThisPageFullURL()\n {\n return 'http' . ( ! empty($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ( ( empty($_GET) ) ? '' : '?' . http_build_query($_GET) );\n }", "function url ($link) {\r\n\treturn $link;\r\n}", "function readURL()\n\t{\n\t\t\t $pageURL = 'http';\n\t\t\t if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") $pageURL .= \"s\";\n\t\t\t $pageURL .= \"://\";\n\t\t\t if (isset($_SERVER[\"SERVER_PORT\"]) && $_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t } else {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t }\n\t\t\t \n\t\treturn $pageURL;\n\t}", "function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}", "private function urlContents(string $url): string\n {\n return <<<FILE\n [InternetShortcut]\n URL=$url\n FILE;\n }", "function display_article_uri($row, $id) \n{\n global $cfg, $lang;\n \n if ($cfg['display_log_uri'] == 'yes') {\n \n $row['name'] = htmlspecialchars($row['name']);\n $article_uri =<<<EOD\n<fieldset> \n<legend accesskey=\"a\">{$lang['log_uri']}</legend>\nXHTML Code :<br />\n<pre>\n&lt;a href=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}article.php?id={$id}\" title=\"{$cfg['blog_title']} : {$row['name']}\" &gt;\n{$row['name']}\n&lt;/a&gt;\n</pre>\n</fieldset>\nEOD;\n } else {\n $article_uri = '';\n }\n return $article_uri;\n}", "public function setter_url_as_html ($value)\n {\n $url = $this->_url_for_value ($value);\n return $url->as_text();\n }", "function _generateURI($title) {\n \n // replace numeric entities by its characters and vaporise all other lethal characters\n $s = array(\n '/&#x([\\dA-F]+);/e',\n '/\\n\\r\\t/'\n );\n $r = array(\n \"chr(hexdec('\\\\1'))\",\n ''\n );\n \n $uri = preg_replace($s, $r, $title);\n return urlencode($uri);\n }", "function urlDisplay($url, $limit = null, $scheme = true)\n {\n return Helper::urlDisplay($url, $limit, $scheme);\n }", "public function testUrlOptionQuotes()\n {\n $this->assertProduces('text [url=\"http://example.com/?a=b&c=d\"]this is a \"link\"[/url]', 'text <a href=\"http://example.com/?a=b&amp;c=d\">this is a &quot;link&quot;</a>');\n }", "public function gSite() {\n $args = func_get_args();\n return htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args));\n }", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "function view_page($html){\r\n\t\techo $html;\r\n\t}", "function rawurlencode_spaces( $url ) {\n\t\treturn str_replace( ' ', rawurlencode( ' ' ), $url );\n\t}", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "private function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode($protocol.'://'.$site.$slug);\n }", "protected function escape($value)\n {\n $escaper = $this->getEscaper();\n if (!method_exists($escaper, 'escapeFullUrl')) {\n $this->setEscaper(new Escaper);\n }\n\n return $this->getEscaper()->escapeFullUrl($value);\n }", "public function a($url = \"#\", $content) {\n echo \"<a href='\" . $url . \"'>\" . $content . \"</a>\";\n }", "function fergcorp_blockquote( $source ) {\n\t$parsed_url = wp_parse_url( $source[1] );\n\t$host = explode( '\\.', $parsed_url['host'] );\n\t$found_image = false;\n\t$hose_count = count( $host );\n\tfor ( $i = 0; $i < $hose_count -1; $i++ ) {\n\t\tfor ( $k = $i; $k < $hose_count; $k++ ) {\n\t\t\t$this_host .= $host[ $k ] . '.';\n\t\t}\n\t\tif ( file_exists( dirname( __FILE__ ) . '/' . $this_host . 'png' ) ) {\n\t\t\t$img = '<img src=\"' . get_bloginfo( 'url' ) . '/wp-content/plugins/' . plugin_basename( dirname( __FILE__ ) ) . '/' . $this_host . 'png\" border=\"0\" align=\"left\" vspace=\"5\" hspace=\"5\" alt=\"From ' . $parsed_url['host'] . '\"/></a><br />';\n\t\t\t$found_image = true;\n\t\t\tbreak; // Escape if we find the image.\n\t\t}\n\t\t$this_host = '';\n\t}\n\tif ( ! $found_image ) {\n\t\t$img = 'From ' . $parsed_url['host'] . ':';\n\t}\n\treturn \"<a href=\\\"$source[1]\\\">$img</a><blockquote>\";\n}", "function put_sprdh_url() {\n\treturn ('http://www.sprdh.com/');\n}", "public function getURL()\n {\n return $this->page->getURL() . 'links-to-this/';\n }", "function character_data($parser, $data) {\r\n if ( $this->make_link ) {\r\n print '<a href=\"http://' . $data . '\" target=\"_blank\">' . $data . '</a>';\r\n $this->make_link = false;\r\n } else {\r\n print $data;\r\n }\r\n }", "function display_binary_uri($row, $id) \n{\n global $cfg, $lang;\n \n if ($cfg['display_log_uri'] == 'yes'){\n\n $row['binname'] = htmlspecialchars($row['binname']);\n $log_uri =<<<EOD\n<fieldset> \n<legend accesskey=\"a\">{$lang['log_uri']}</legend>\n<form>\n<p><input value=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}files/article.php?id={$id}\" size=\"60\" class=\"uri\" /></p>\n<h4>XHTML code:</h4>\n<textarea rows=\"5\" cols=\"60\" class=\"uri-code\" />\n&lt;a href=\"http://{$_SERVER['HTTP_HOST']}{$cfg['root_path']}files/article.php?id={$id}\" title=\"{$cfg['blog_title']} : {$row['binname']}\" &gt;\n{$row['binname']}\n&lt;/a&gt;\n</textarea>\n</form>\n</fieldset>\nEOD;\n } else {\n $log_uri = '';\n }\n return $log_uri;\n}", "public static function getHostUrl() : String{\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\n return \"$protocol$host$uri\";\n }", "public function formatAsUrl() {\r\n $url_save_chars = array_merge(range('a','z'),range(0,9),['_','-']);\r\n \r\n $specials = array('ä','ü','ö','ß',' ','ç','é','â','ê','î','ô','û','à','è','ì','ò','ù','ë','ï','ü','&');\r\n $specials_replacements = array('ae','ue','oe','ss','_','c','e','a','e','i','o','u','a','e','i','o','u','e','i','u','');\r\n // make everything lowercase and replace umlaute and spaces\r\n $url_save_text = trim(str_replace($specials, $specials_replacements, mb_strtolower($this->text,'UTF-8')));\r\n // remove every invalid character thats left from text (replace with \"-\") \r\n for($i = 0; $i < strlen($url_save_text); $i++){\r\n if(!in_array($url_save_text[$i], $url_save_chars)){\r\n $url_save_text[$i] = \"-\";\r\n }\r\n } \r\n return $url_save_text;\r\n }", "public static function getRawUrl() {\r\n return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '');\r\n }", "function string_display_links( $p_string ) \r\n{\r\n\t$p_string = string_display( $p_string );\r\n\t$p_string = string_insert_hrefs( $p_string );\r\n\treturn $p_string;\r\n}", "function wmfShowRedirect( $url ) {\n\theader( 'Location: ' . $url );\n\theader( 'Content-Type: text/html; charset=utf-8' );\n\t$escUrl = htmlspecialchars( $url );\n\techo <<<HTML\n<!DOCTYPE html>\n<html>\n<body>\n<a href=\"$escUrl\">The document has moved.</a>\n</body>\n</html>\n\nHTML;\n}", "public function href();", "function _url($path){\n echo getFullUrl($path);\n}", "function urisprintf($pattern /* , ... */) {\n $args = func_get_args();\n return xsprintf('xsprintf_uri', null, $args);\n}", "public function getUrlString(){\n\t\treturn rawurlencode($this->getJsonString());\t\n\t}", "public function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode( $protocol . '://' . $site . $slug );\n }", "function getCurrentURL($strip = true) {\n\t//used in themes/bootstrape/footer_inc.php\n\n\tstatic $filter;\n\tif ($filter == null) {\n\t\t$filter = function($input) use($strip) {\n\t\t\t$input = str_ireplace(array(\n\t\t\t\t\t\"\\0\", '%00', \"\\x0a\", '%0a', \"\\x1a\", '%1a'), '', urldecode($input));\n\t\t\tif ($strip) {\n\t\t\t\t\t$input = strip_tags($input);\n\t\t\t}\n\n\t\t\t// or any encoding you use instead of utf-8\n\t\t\t$input = htmlspecialchars($input, ENT_QUOTES, 'utf-8');\n\n\t\t\treturn trim($input);\n\t\t};\n\t}\n\n\treturn 'http'. (($_SERVER['SERVER_PORT'] == '443') ? 's' : '')\n\t\t.'://'. $_SERVER['SERVER_NAME'] . $filter($_SERVER['REQUEST_URI']);\n}", "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "public function get_url()\n\t{\n\t\treturn append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, \"i=pm&amp;mode=view&amp;p={$this->item_id}\");\n\t}", "public function link() { return site_url().'/'.$this->post->post_name; }", "function string_url( $p_string ) \r\n{\r\n\t$p_string = rawurlencode( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "public function __toString()\n\t{\n\t\treturn $this->getUrl(TRUE);\n\t}", "public function print()\n {\n if (!headers_sent()) {\n header(\"Content-Type: text/html\");\n }\n\n $data = \"\";\n $args = func_get_args();\n foreach ($args as $arg) {\n $data .= $this->processLine($arg);\n }\n\n echo \"<style>$this->style</style>\";\n echo \"$data\";\n echo \"<script type='text/javascript'>$this->scripts</script>\";\n }", "public static function curlPageURL() {\n\t\t$pageURL = 'http';\n\t\tif (isset ( $_SERVER [\"HTTPS\"] )) {\n\t\t\tif ($_SERVER [\"HTTPS\"] == \"on\") {\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t}\n\t\t$pageURL .= \"://\";\n\t\tif ($_SERVER [\"SERVER_PORT\"] != \"80\") {\n\t\t\t$pageURL .= $_SERVER [\"SERVER_NAME\"] . \":\" . $_SERVER [\"SERVER_PORT\"] . $_SERVER [\"REQUEST_URI\"];\n\t\t} else {\n\t\t\t$pageURL .= $_SERVER [\"SERVER_NAME\"] . $_SERVER [\"REQUEST_URI\"];\n\t\t}\n\t\treturn $pageURL;\n\t}", "public static function url($string) {\n return rawurlencode($string);\n }", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function esc_url( $value = '' ) {\n\t\t\tif ( ! empty( $value ) ) {\n\t\t\t\t$value = esc_url_raw( trim( $value ) );\n\t\t\t\t$value = str_replace( 'http://', '', $value );\n\t\t\t\treturn untrailingslashit( $value );\n\t\t\t}\n\t\t}", "function writeUrl() {\n\n }", "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}", "public function stdWrap_rawUrlEncode($content = '')\n {\n return rawurlencode($content);\n }" ]
[ "0.64860785", "0.62447315", "0.6175386", "0.6158804", "0.60853946", "0.60637325", "0.6036462", "0.60264903", "0.60264903", "0.59406036", "0.5912904", "0.59044605", "0.58468246", "0.5836722", "0.57920617", "0.57813245", "0.5770052", "0.5743745", "0.5743745", "0.5730215", "0.57220685", "0.5718073", "0.57091695", "0.5631844", "0.5610288", "0.559321", "0.5573635", "0.5565853", "0.55403936", "0.5529074", "0.5528811", "0.5521519", "0.5508908", "0.55057836", "0.54674536", "0.54597455", "0.54538286", "0.5441914", "0.5435116", "0.5412419", "0.5410618", "0.5408236", "0.5408236", "0.5408236", "0.5408236", "0.5408236", "0.5408236", "0.5407721", "0.53982556", "0.5393376", "0.53743654", "0.5369764", "0.5364549", "0.53618", "0.53541905", "0.5352119", "0.5347958", "0.5341786", "0.5336216", "0.5324609", "0.532027", "0.53163433", "0.53140706", "0.5301709", "0.53014445", "0.52929544", "0.52894664", "0.5284318", "0.5282375", "0.527937", "0.5277977", "0.5274919", "0.5271213", "0.52659017", "0.52644753", "0.526241", "0.5258836", "0.52573204", "0.5249576", "0.5246011", "0.5235472", "0.5230738", "0.521267", "0.5212621", "0.5211443", "0.5209318", "0.52074045", "0.5204403", "0.518926", "0.5180803", "0.51782227", "0.5170974", "0.51670146", "0.51669025", "0.5166763", "0.5159682", "0.51555854", "0.51499015", "0.51486176", "0.51455826" ]
0.5660479
23
Print a site URI
public function pSiteRaw() { $args = func_get_args(); print call_user_func_array(array($this, 'getSite'), $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function outputUrl()\n\t{\n\t\techo App::e($this->url);\n\t}", "public function dumpUrl()\n {\n print $this->getSession()->getCurrentUrl().\"\\r\\n\";\n\n }", "public function url(){\r\n\t\techo $_SERVER['SERVER_NAME'].\" => \".$_SERVER['PHP_SELF'];\r\n\t}", "function print_link($link) {\n //check if is a valid Link\n if (filter_var($link, FILTER_VALIDATE_URL) !== FALSE) {\n echo $link;\n } else {\n echo SITE_ADDR . $link;\n }\n}", "public function pSite() {\n $args = func_get_args();\n print htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args));\n }", "public static function siteURL(): string\n {\n return sprintf(\"%s://%s\", Request::scheme(), Request::host());\n }", "public function siteUrl() {}", "function site_url($val='', $val_2=false)\n {\n echo get_site_url($val, $val_2);\n }", "protected function pageURI(): string\n {\n $ssl = (@$_SERVER['HTTPS'] == 'on');\n $link = ($ssl? 'https://' : 'http://') .$_SERVER['HTTP_HOST'];\n if ($_SERVER['SERVER_PORT'] != ($ssl? '443' : '80')) {\n $link .= ':' .$_SERVER[\"SERVER_PORT\"];\n }\n return $link .urldecode($_SERVER['REQUEST_URI']);\n }", "function network_site_url($path = '', $scheme = \\null)\n {\n }", "function url_site(): string\n{\n //return input_server('REQUEST_SCHEME') . '://' . input_server('SERVER_NAME');\n $site = \\get_site_url();\n $pos = strpos($site, '/', 8);\n return $pos ? substr($site, 0, $pos) : $site;\n}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "function well_known_page() {\n $link = 'http://tools.ietf.org/html/rfc5785';\n print t('See <a href=\"!link\">!link</a> for more information.', array(\n '!link' => url($link)\n ));\n}", "public function getURI();", "function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}", "public static function getHostUrl() : String{\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\n return \"$protocol$host$uri\";\n }", "function PrintSiteName()\n\t{\n\t\t$name = GetTitle('parameters/preferences', 2);\n\t\techo $name;\n\t}", "public function renderUri();", "function CurrPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public function show_path()\n\t{\n\t\treturn url::site($this->id . '/' . $this->title);\n\t}", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function test(){\n\t $url = urls('content/show','id=96');\n\t echo \"<a href='$url'>$url</a>\";\n\t}", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "function print_theme_url()\n{\n printf('%s', get_theme_url());\n}", "function readURL()\n\t{\n\t\t\t $pageURL = 'http';\n\t\t\t if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") $pageURL .= \"s\";\n\t\t\t $pageURL .= \"://\";\n\t\t\t if (isset($_SERVER[\"SERVER_PORT\"]) && $_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t } else {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t }\n\t\t\t \n\t\treturn $pageURL;\n\t}", "function cherry_get_page_URL(){\n\t\tif(!isset($_SERVER['REQUEST_URI'])){\n\t\t\t$site_uri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$site_uri = $_SERVER['REQUEST_URI'];\n\t\t\t$https = empty($_SERVER[\"HTTPS\"]) ? '' : (($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\");\n\t\t\t$site_protocol = strtolower($_SERVER[\"SERVER_PROTOCOL\"]);\n\t\t\t$site_protocol = substr($site_protocol,0,strpos($site_protocol,\"/\")).$https;\n\t\t\t$site_port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t}\n\t\treturn $site_protocol.\"://\".$_SERVER['SERVER_NAME'].$site_port.$site_uri;\n\t}", "function webworth() \r\n{\r\n$url = 'www.webworth.info/'.$host;\r\n$host = $_SERVER['HTTP_HOST'];\r\n\r\necho '<a href=\"http://www.webworth.info/'.$host.'\" target=\"_blank\" rel=\"follow\"><img src=\"http://www.webworth.info/'.$host.'/sitewidget.gif\" alt=\"Website Value\" /></a>';\r\n}", "function site_url($path = '', $scheme = \\null)\n {\n }", "private function site_url()\n\t{\n\t\t$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)\n\t\t\t? \"https://\"\n\t\t\t: \"http://\";\n\t\t$domainName = $_SERVER['HTTP_HOST'];\n\n\t\treturn $protocol.$domainName;\n\t}", "private static function printUri ($url, $encodage) {\n\t\t$uri = '';\n\t\t$separator = '/?';\n\t\t\n\t\tif($encodage == 'html') {\n\t\t\t$and = '&amp;';\n\t\t} else {\n\t\t\t$and = '&';\n\t\t}\n\t\t\n\t\tif (isset ($url['c'])\n\t\t && $url['c'] != Request::defaultControllerName ()) {\n\t\t\t$uri .= $separator . 'c=' . $url['c'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['a'])\n\t\t && $url['a'] != Request::defaultActionName ()) {\n\t\t\t$uri .= $separator . 'a=' . $url['a'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['params'])) {\n\t\t\tforeach ($url['params'] as $key => $param) {\n\t\t\t\t$uri .= $separator . $key . '=' . $param;\n\t\t\t\t$separator = $and;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $uri;\n\t}", "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "public function prepurl_for_display($args)\n {\n $url = $args['url'];\n if ($url != '') {\n if ($url == 'http://' || $url == 'http://http://' || $url == 'http:///') {\n $url = '';\n } elseif (strstr(\"http://\", $url)) {\n $url = \"http://\" . $url;\n }\n }\n return $url;\n }", "public function url() {\n\t\tif ( ! isset( $this->url ) ) {\n\t\t\t$url = add_query_arg( 'page', $this->page_slug, 'sites.php' );\n\t\t\t$this->url = network_admin_url( $url );\n\t\t}\n\n\t\treturn $this->url;\n\t}", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "function ngwp_sitepress_site_url()\n\t{\n\t\t// $url, $path, $scheme, $blog_id\n\t\t$args = func_get_args();\n\t\tif ( $path && is_string( $path ) )\n\t\t\treturn rtrim( substr( $args[0], 0, strlen($args[0]) - strlen($args[1]) ), '/' ) . '/' . ICL_LANGUAGE_CODE . '/' . ltrim( $args[1], '/' );\n\t\treturn rtrim( $args[0], '/' ) . '/' . ICL_LANGUAGE_CODE;\n\t}", "function urlDisplay($url, $limit = null, $scheme = true)\n {\n return Helper::urlDisplay($url, $limit, $scheme);\n }", "public function gSite() {\n $args = func_get_args();\n return htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args));\n }", "function formatCurrentUrl() ;", "function url($location) {\n\techo getAbsolutePath() . $location;\n}", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "public function getURL ();", "function getsite( )\n{\n\t\t\t\tif ( empty( $_SERVER['HTTP_HOST'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['HTTP_HOST'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['SERVER_NAME'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $_SERVER['REQUEST_URI'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['REQUEST_URI'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['PHP_SELF'];\n\t\t\t\t}\n\t\t\t\t$Rcc5c6e696c = explode( \"/\", $Rd4e4624cdb );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\t$Rd4e4624cdb = implode( \"/\", $Rcc5c6e696c );\n\t\t\t\treturn $R8607b50296.$Rd4e4624cdb;\n}", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "function LinkToURL($url = null)\n\t{\n\t\t// Print URL link using HTML class\n\t\techo HTML::LinkToURL($url);\n\t}", "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}", "public function getURL();", "public function getURL();", "public function link() { return site_url().'/'.$this->post->post_name; }", "public static function arprocUrl() {\n\t\treturn self::pw('pages')->get('pw_template=arproc')->url;\n\t}", "function _url($path){\n echo getFullUrl($path);\n}", "function referrer_link( $format = '%link', $title = '%title', $sep = '&raquo;', $sepdirection = 'left' ) {\n\techo Smarter_Navigation::referrer_link( $format, $title, $sep, $sepdirection );\n}", "public static function site($uri = '', $protocol = NO) {\n\t\tif($path = trim(parse_url($uri, PHP_URL_PATH), '/')) {\n\t\t\t// Add path suffix\n\t\t\t$path .= Eight::config('core.url_suffix');\n\t\t}\n\n\t\tif($query = parse_url($uri, PHP_URL_QUERY)) {\n\t\t\t// ?query=string\n\t\t\t$query = '?'.$query;\n\t\t}\n\n\t\tif($fragment = parse_url($uri, PHP_URL_FRAGMENT)) {\n\t\t\t// #fragment\n\t\t\t$fragment = '#'.$fragment;\n\t\t}\n\n\t\t// Concat the URL\n\t\treturn url::base(YES, $protocol).$path.$query.$fragment;\n\t}", "public function url();", "public function url();", "public function url();", "public function getURL()\n {\n return $this->page->getURL() . 'links-to-this/';\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "function put_sprdh_url() {\n\treturn ('http://www.sprdh.com/');\n}", "public static function curURL() {\n\t\t\t$pageURL = 'http';\n\t\t\tif ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER['PHP_SELF'];\n\t\t\t} else {\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\"/\";\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}", "public function uri();", "public function uri();", "public function uri();", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}", "static public function selfURL()\r\n {\r\n //global $cfgSite;\r\n $cfgSite = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.site.xml');\r\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\r\n $protocol = self::strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\r\n if ($cfgSite->use_port_in_URL == '1') {\r\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\r\n } else {$port = '';}\r\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\r\n }", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "function siteURL()\n{\n $protocol = 'http://';\n $domainName = $_SERVER['HTTP_HOST'].'/';\n return $protocol.$domainName;\n}", "private function curPageURL() {\r\n $pageURL = 'http';\r\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\r\n $pageURL .= \"://\";\r\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\r\n } else {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n }\r\n return $pageURL;\r\n }", "public function get_link() { return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] \n === 'on' ? \"https\" : \"http\") . \"://\" . \n $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; }", "public function get_uri()\n {\n }", "public function URL()\n\t{\n\t\treturn $this->isHomePage() ? \\URL::to('/') : \\URL::to($this->uri);\n\t}", "private function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode($protocol.'://'.$site.$slug);\n }", "public function href();", "public function getUrl()\n {\n $uri = $this->getHost();\n\n $server = provider::access('server');\n\n if ($server->isExist('PHP_SELF') && $server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)) {\n // for 'good' servers\n $uri .= $server->getValue('REQUEST_URI');\n } else {\n // for IIS\n if ($server->isValid('SCRIPT_NAME', validate::T_PRINTABLE)) {\n $uri .= $server->getValue('SCRIPT_NAME');\n }\n\n if ($server->isValid('QUERY_STRING', validate::T_PRINTABLE)) {\n $uri .= '?' . $server->getValue('QUERY_STRING');\n }\n }\n\n return $uri;\n }", "private static function getSiteUrl()\n {\n return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . ( isset($_SERVER['SCRIPT_URL'] ) ? $_SERVER['SCRIPT_URL'] : '' );\n }", "function curPageURL() {\n $pageURL = 'http';\n if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n \n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "function print_html_bot()\n{\n echo \"Quellcode:\";\n $adresse = \"https://github.com/GitNorb/freifunk-myk_monitoring_page\";\n echo \"<td> <a href=\\\"\" . $adresse . \"\\\">\" . $adresse . \"</a> </td><br/>\";\n echo \"Dieses Skript sammelt keinerlei Daten. Eventuell sammelt aber der Server, der diese Seite bereitstellt, Daten.<br/>Um der DSGVO zu entsprechen ist <a href=https://www.uni-koblenz-landau.de/de/koblenz/GHRKO/datenschutz/userpages>hier die Datenschutzerklärung vom Rechenzentrum der Uni Koblenz-Landau</a>, wo dieses Seite gehostet ist.\";\n echo \"</body>\\n</html>\";\n}", "static function curPageURL() \n\t\t{\n\t\t\t$pageURL = 'http';\n\t\t\tif ($_SERVER[\"HTTPS\"] == \"on\")\n\t\t\t{\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") \n\t\t\t{\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}", "function get_url()\n{\n $url = 'http://'.$_SERVER['SERVER_NAME'].'/space';\n return $url;\n}", "public function getOfficialLink();", "public function get_url()\n\t{\n\t\treturn append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, \"i=pm&amp;mode=view&amp;p={$this->item_id}\");\n\t}", "public function getSiteURL()\n {\n return $this->config->get('site.url').$this->config->get('site.dir');\n }", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public static function printLocation()\n { \n echo '\n <div id=\"navi_location\">\n <p class=\"pfeil\">Sie befinden sich hier:&nbsp; '.self::$siteName.self::$subNav.self::$subSubNav.'</p>\n </div>';\n }", "private function getThisPageFullURL()\n {\n return 'http' . ( ! empty($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ( ( empty($_GET) ) ? '' : '?' . http_build_query($_GET) );\n }", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "function url ($link) {\r\n\treturn $link;\r\n}", "protected function get_uri()\n {\n }", "function curPageURL() {\n\t $pageURL = 'http';\n\t if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t $pageURL .= \"://\";\n\t if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t } else {\n\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t }\n\t return $pageURL;\n}", "public function getSiteURL()\r\n {\r\n return $this->siteURL;\r\n }", "public function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode( $protocol . '://' . $site . $slug );\n }", "public function getURI() : string {\n return $this->URI;\n }", "private function printUrl($options = array())\n {\n $url = $this->getUrl();\n $md5 = $this->getMd5();\n \n if (empty($url) === true || empty($md5) === true) {\n throw new Exception('url and md5 can\\'t be empty');\n }\n \n // printUrl allow only http or https protocol\n if ((bool)preg_match('/^https?:/', $url) === false) {\n throw new Exception('url must be HTTP protocole');\n }\n \n $pdf_filename = ApiPrint::getPdfTmpFilename($md5, $options);\n \n return $this->printCmd($url, $pdf_filename, $options);\n }" ]
[ "0.67893094", "0.6783772", "0.6682064", "0.661576", "0.65640384", "0.6538068", "0.62810695", "0.6251396", "0.62447035", "0.6219712", "0.6184435", "0.61729246", "0.6130308", "0.61071634", "0.60908544", "0.60890305", "0.6077486", "0.60758007", "0.6074794", "0.60741687", "0.60286343", "0.60198814", "0.601017", "0.60099226", "0.6006086", "0.59983563", "0.59893596", "0.5974363", "0.5974134", "0.5973331", "0.5958741", "0.59579057", "0.59465843", "0.5933332", "0.5903678", "0.58910716", "0.5884591", "0.5881491", "0.5878839", "0.58786", "0.5877672", "0.5875079", "0.5870682", "0.5855665", "0.5853173", "0.5851616", "0.58507824", "0.5842816", "0.5835546", "0.5835546", "0.583398", "0.5811824", "0.5806875", "0.57967716", "0.57804716", "0.5772027", "0.5772027", "0.5772027", "0.577147", "0.5770917", "0.5762255", "0.57584685", "0.57576513", "0.57576513", "0.57576513", "0.5756774", "0.5756508", "0.57493407", "0.57493407", "0.57493407", "0.57493407", "0.57493407", "0.57493407", "0.57488483", "0.57421154", "0.5739482", "0.57300025", "0.57267463", "0.5726544", "0.57196873", "0.57193494", "0.5713124", "0.5703887", "0.5703684", "0.5690676", "0.5688557", "0.56865793", "0.56783444", "0.56744355", "0.5672348", "0.5671796", "0.5667006", "0.566548", "0.5661343", "0.5660449", "0.56535727", "0.5647354", "0.56378895", "0.5630083", "0.56257325" ]
0.62460786
8
Get an HTML escaped URI
public function g() { $args = func_get_args(); return htmlspecialchars(call_user_func_array(array($this, 'get'), $args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderUri();", "function esc_url_raw($url, $protocols = \\null)\n {\n }", "function esc_url_raw( $url, $protocols = null ) {\n\treturn esc_url( $url, $protocols, 'db' );\n}", "public function getURI();", "protected function escape($value)\n {\n $escaper = $this->getEscaper();\n if (!method_exists($escaper, 'escapeFullUrl')) {\n $this->setEscaper(new Escaper);\n }\n\n return $this->getEscaper()->escapeFullUrl($value);\n }", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n }", "public function getUriString()\n {\n if ($this->uri instanceof HttpUri) {\n return $this->uri->toString();\n }\n return $this->uri;\n }", "function _generateURI($title) {\n \n // replace numeric entities by its characters and vaporise all other lethal characters\n $s = array(\n '/&#x([\\dA-F]+);/e',\n '/\\n\\r\\t/'\n );\n $r = array(\n \"chr(hexdec('\\\\1'))\",\n ''\n );\n \n $uri = preg_replace($s, $r, $title);\n return urlencode($uri);\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "function getURI($includeRef = true) {\n\n if ($this->hasQuery()){\n $props = $this->query;\n // Sort query :)\n ksort($props);\n @$query = '';\n foreach ($props as $key => $value)\n $query .= $key . '=' . $value . '&'; \n }\n return (\n (($this->hasQuery() && $this->path) ? '?' . subStr($query,0,-1) :'') .\n (($includeRef && $this->ref && strLen($this->path)) ? '#' . ($this->ref) :'')\n );\n }", "public function getUrlString(){\n\t\treturn rawurlencode($this->getJsonString());\t\n\t}", "function uri(): string;", "public function getUri() : string\n {\n $rtn = $this->data['uri'];\n\n return $rtn;\n }", "function format_uri( $string, $separator = '-' )\n{\n $accents_regex = '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i';\n $special_cases = array( '&' => 'and', \"'\" => '');\n $string = mb_strtolower( trim( $string ), 'UTF-8' );\n $string = str_replace( array_keys($special_cases), array_values( $special_cases), $string );\n $string = preg_replace( $accents_regex, '$1', htmlentities( $string, ENT_QUOTES, 'UTF-8' ) );\n $string = preg_replace(\"/[^a-z0-9]/u\", \"$separator\", $string);\n $string = preg_replace(\"/[$separator]+/u\", \"$separator\", $string);\n return $string;\n}", "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "public function url()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_URL);\n\t}", "public function url(): string\n {\n return strtok($this->getUri(), '?');\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "function esc_url( $url, $protocols = null, $_context = 'display' ) {\n\t$original_url = $url;\n\n\tif ( '' == $url )\n\t\treturn $url;\n\t$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\t$strip = array('%0d', '%0a', '%0D', '%0A');\n\t$url = _deep_replace($strip, $url);\n\t$url = str_replace(';//', '://', $url);\n\t/* If the URL doesn't appear to contain a scheme, we\n\t * presume it needs http:// appended (unless a relative\n\t * link starting with /, # or ? or a php file).\n\t */\n\tif ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n\t\t! preg_match('/^[a-z0-9-]+?\\.php/i', $url) )\n\t\t$url = 'http://' . $url;\n\n\t// Replace ampersands and single quotes only when displaying.\n\tif ( 'display' == $_context ) {\n\t\t$url = wp_kses_normalize_entities( $url );\n\t\t$url = str_replace( '&amp;', '&#038;', $url );\n\t\t$url = str_replace( \"'\", '&#039;', $url );\n\t}\n\n\tif ( '/' === $url[0] ) {\n\t\t$good_protocol_url = $url;\n\t} else {\n\t\tif ( ! is_array( $protocols ) )\n\t\t\t$protocols = wp_allowed_protocols();\n\t\t$good_protocol_url = wp_kses_bad_protocol( $url, $protocols );\n\t\tif ( strtolower( $good_protocol_url ) != strtolower( $url ) )\n\t\t\treturn '';\n\t}\n\n\t/**\n\t * Filter a string cleaned and escaped for output as a URL.\n\t *\n\t * @since 2.3.0\n\t *\n\t * @param string $good_protocol_url The cleaned URL to be returned.\n\t * @param string $original_url The URL prior to cleaning.\n\t * @param string $_context If 'display', replace ampersands and single quotes only.\n\t */\n\treturn apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );\n}", "public function toEncodedURI() : string {\n\t\t\tif ($this->uri === null) {\n\t\t\t\t$this->uri = 'data:image/png;base64,' . urlencode(base64_encode($this->render()));\n\t\t\t}\n\t\t\treturn $this->uri;\n\t\t}", "public function to_url()\n {\n $out = $this->get_normalized_http_url() . \"?\";\n $out .= $this->to_postdata();\n return $out;\n }", "public function raw()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse return $this->generateString();\n\t}", "public function toString()\n {\n if (!$this->isValid()) {\n if ($this->isAbsolute() || !$this->isValidRelative()) {\n throw new Exception\\InvalidUriException(\n 'URI is not valid and cannot be converted into a string'\n );\n }\n }\n\n $uri = '';\n\n if ($this->scheme) {\n $uri .= $this->scheme . ':';\n }\n\n if ($this->host !== null) {\n $uri .= '//';\n $uri .= $this->host;\n }\n\n if ($this->path) {\n $uri .= static::encodePath($this->path);\n } elseif ($this->host && ($this->query || $this->fragment)) {\n $uri .= ':/';\n }\n\n if ($this->query) {\n $uri .= \"?\" . static::encodeQueryFragment($this->query);\n }\n\n if ($this->fragment) {\n $uri .= \"#\" . static::encodeQueryFragment($this->fragment);\n }\n\n return $uri;\n }", "function cms_raw_url_encode($url_part, $can_try_url_schemes = null) // TODO: Rename function in v11 and document in codebook\n{\n // Slipstream for 99.99% of data\n $url_part_encoded = rawurlencode($url_part);\n if ($url_part_encoded === $url_part) {\n return $url_part_encoded;\n }\n\n if ($can_try_url_schemes === null) {\n $can_try_url_schemes = can_try_url_schemes();\n }\n if ($can_try_url_schemes) { // These interfere with URL Scheme processing because they get pre-decoded and make things ambiguous\n //$url_part = str_replace(':', '(colon)', $url_part); We'll ignore theoretical problem here- we won't expect there to be a need for encodings within redirect URL paths (params is fine, handles naturally)\n $url_part = str_replace(array('&', '#'), array(':amp:', ':uhash:'), $url_part); // horrible but mod_rewrite does it so we need to\n }\n $url_part = str_replace('%2F', '/', rawurlencode($url_part));\n return $url_part;\n}", "function oauth_urlencode($uri) {}", "abstract public function getUri();", "public static function getRawUrl() {\r\n return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '');\r\n }", "public function getUri(){\n\t\treturn preg_replace('/[^\\w-]*/', '', (strtolower(str_replace(' ', '-', $this->name)))).'-'.$this->id;\n\t}", "public static function url($string) {\n return rawurlencode($string);\n }", "public function to_url() {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }", "abstract public function uri(): string;", "public function uriWithQuery(): string\n {\n return $this->uri() . '?' . $this->server('query_string');\n }", "function safeURL ($text) {\n\t//WARNING: this does not sanitise against HTML, it’s assumed text is passed through `safeHTML` before output\n\treturn str_replace ('%2F', '/', rawurlencode ($text));\n}", "public static function normalizeURI($uri)\n{\nreturn str_replace('\\\\','/',$uri);\n}", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "public function getURI() : string {\n return $this->URI;\n }", "function getHref ($str) {\n\treturn prepareHref($str) . \"/\";\n}", "public function stdWrap_rawUrlEncode($content = '')\n {\n return rawurlencode($content);\n }", "public function testUrlOptionQuotes()\n {\n $this->assertProduces('text [url=\"http://example.com/?a=b&c=d\"]this is a \"link\"[/url]', 'text <a href=\"http://example.com/?a=b&amp;c=d\">this is a &quot;link&quot;</a>');\n }", "function labs_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "protected function escape($value, $type='literal') \n\t{\n\t\tswitch($type) {\n\t\t\tcase 'uri':\n\t\t\t\t$value = str_replace(array('<', '>'), array('%3C', '%3E'), $value);\n\t\t\tdefault:\n\t\t\t\t$value = str_replace('\"', '\"\"', $value);\n\t\t}\n\n\t\treturn $value;\n\t}", "public function __toString()\n {\n return librdf_uri_to_string($this->uri);\n }", "function URLStd($string=''){\n\n\treturn htmlentities($string);\n}", "public function getSanitizedUrl()\n {\n $url = preg_replace(\"/\\\\?.*/\", \"\", $this->url);\n $url = preg_replace(\"/\\\\:\\\\d{4}/\", \"\", $url);\n return $url;\n }", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "public function toString()\n {\n if (! $this->isValid()) {\n if ($this->isAbsolute() || ! $this->isValidRelative()) {\n throw new Exception\\InvalidUriException(\n 'URI is not valid and cannot be converted into a string'\n );\n }\n }\n\n $uri = '';\n\n if ($this->scheme) {\n $uri .= $this->scheme . ':';\n }\n\n if ($this->host !== null) {\n $uri .= '//';\n if ($this->userInfo) {\n $uri .= $this->userInfo . '@';\n }\n $uri .= $this->host;\n if ($this->port) {\n $uri .= ':' . $this->port;\n }\n }\n\n if ($this->path) {\n $uri .= static::encodePath($this->path);\n } elseif ($this->host && ($this->query || $this->fragment)) {\n $uri .= '/';\n }\n\n if ($this->query) {\n $uri .= \"?\" . static::encodeQueryFragment($this->query);\n }\n\n if ($this->fragment) {\n $uri .= \"#\" . static::encodeQueryFragment($this->fragment);\n }\n\n return $uri;\n }", "public function __toString()\n {\n $this->uri = $this->uri ?? $this->getUriString(\n $this->scheme,\n $this->authority,\n $this->path,\n $this->query,\n $this->fragment\n );\n\n return $this->uri;\n }", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "public function formatAsUrl() {\r\n $url_save_chars = array_merge(range('a','z'),range(0,9),['_','-']);\r\n \r\n $specials = array('ä','ü','ö','ß',' ','ç','é','â','ê','î','ô','û','à','è','ì','ò','ù','ë','ï','ü','&');\r\n $specials_replacements = array('ae','ue','oe','ss','_','c','e','a','e','i','o','u','a','e','i','o','u','e','i','u','');\r\n // make everything lowercase and replace umlaute and spaces\r\n $url_save_text = trim(str_replace($specials, $specials_replacements, mb_strtolower($this->text,'UTF-8')));\r\n // remove every invalid character thats left from text (replace with \"-\") \r\n for($i = 0; $i < strlen($url_save_text); $i++){\r\n if(!in_array($url_save_text[$i], $url_save_chars)){\r\n $url_save_text[$i] = \"-\";\r\n }\r\n } \r\n return $url_save_text;\r\n }", "public static function rawurlencode($value) {\n return strtr(rawurlencode($value), array('%7E' => '~', '+' => ' '));\n }", "public static function escapeUrl(string $url): string\n\t{\n\t\t$url = parse_url($url);\n\t\t$url['path'] = $url['path'] ?? '';\n\t\t$url['query'] = $url['query'] ?? '';\n\n\t\tif ($url['path'] !== '') {\n\t\t\t$url['path'] = implode('/', array_map('rawurlencode', explode('/', $url['path'])));\n\t\t}\n\n\t\tif ($url['query'] !== '') {\n\t\t\t$url['query'] = \"?{$url['query']}\";\n\t\t}\n\n\t\treturn str_replace(\n\t\t\t['&', \"'\", '\"', '>', '<'],\n\t\t\t['&amp;', '&apos;', '&quot;', '&gt;', '&lt;'],\n\t\t\t$url['scheme'] . \"://{$url['host']}{$url['path']}{$url['query']}\"\n\t\t);\n\t}", "function utf8_uri_encode($utf8_string, $length = 0, $encode_ascii_characters = \\false)\n {\n }", "function format_url($file_path)\n{\n $path_component = explode('/', $file_path);\n $path_component = array_map('rawurlencode', $path_component);\n\n return implode('/', $path_component);\n}", "private static function printUri ($url, $encodage) {\n\t\t$uri = '';\n\t\t$separator = '/?';\n\t\t\n\t\tif($encodage == 'html') {\n\t\t\t$and = '&amp;';\n\t\t} else {\n\t\t\t$and = '&';\n\t\t}\n\t\t\n\t\tif (isset ($url['c'])\n\t\t && $url['c'] != Request::defaultControllerName ()) {\n\t\t\t$uri .= $separator . 'c=' . $url['c'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['a'])\n\t\t && $url['a'] != Request::defaultActionName ()) {\n\t\t\t$uri .= $separator . 'a=' . $url['a'];\n\t\t\t$separator = $and;\n\t\t}\n\t\t\n\t\tif (isset ($url['params'])) {\n\t\t\tforeach ($url['params'] as $key => $param) {\n\t\t\t\t$uri .= $separator . $key . '=' . $param;\n\t\t\t\t$separator = $and;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $uri;\n\t}", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public function uri()\n\t{\n\t\t$uri = $this->fullUri();\n\t\t$queryPos = strpos($uri, '?');\n\t\treturn substr($uri, 0, strpos($uri, '?') ? $queryPos : null);\n\t}", "abstract protected function getUri(): string;", "private function encodeODataUriValue($value)\n {\n // Replace each single quote (') with double single quotes ('') not doudle\n // quotes (\")\n $value = str_replace('\\'', '\\'\\'', $value);\n\n // Encode the special URL characters\n $value = rawurlencode($value);\n\n return $value;\n }", "function wikiurl( $s ) {\n\treturn str_replace( '%2F', '/', rawurlencode( $s ) );\n}", "public function setter_url_as_html ($value)\n {\n $url = $this->_url_for_value ($value);\n return $url->as_text();\n }", "public function uri() : string;", "public function decodeUriSafe( string $value ): string;", "function urlencode_1738_plus($url) {\n\t$uri = '';\n\n\t# nom de domaine accentué ?\n\tif (preg_match(',^https?://[^/]*,u', $url, $r)) {\n\t\t\n\t}\n\n\t$l = strlen($url);\n\tfor ($i=0; $i < $l; $i++) {\n\t\t$u = ord($a = $url[$i]);\n\t\tif ($u <= 0x20 OR $u >= 0x7F OR in_array($a, array(\"'\",'\"')))\n\t\t\t$a = rawurlencode($a);\n\t\t// le % depend : s'il est suivi d'un code hex, ou pas\n\t\tif ($a == '%'\n\t\tAND !preg_match('/^[0-9a-f][0-9a-f]$/i', $url[$i+1].$url[$i+2]))\n\t\t\t$a = rawurlencode($a);\n\t\t$uri .= $a;\n\t}\n\treturn quote_amp($uri);\n}", "public static function encode($uri = null) {\n if ($uri === null)\n $uri = self::getURL();\n if (!String::isString($uri))\n throw new InvalidArgumentException(\"uri must be a string\");\n\n return urlencode($uri);\n }", "public function getWebURI()\n {\n\t\treturn $this->response[self::FIELD_RESULT][self::FIELD_WEB_URI];\n\t}", "protected function _urlencode($value) {\n return rawurlencode($value);\n //Amazon suggests doing this, but it seems to break things rather than fix them:\n //return str_replace('%7E', '~', rawurlencode($value));\n }", "public function uri();", "public function uri();", "public function uri();", "public function getUri() {}", "public function getUri() {}", "function raw_u($string=\"\"){\r\n //\"?\"前部分语句 空格 = %20\r\n return rawurlencode($string);\r\n}", "public function str() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}", "private function getTalkURI()\n {\n $url = $this->getInput('url');\n return $url;\n }", "public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n\n return $out;\n }", "function decodeRequestUri($uri) {\n return rawurldecode(htmlspecialchars($uri, ENT_QUOTES, 'UTF-8'));\n}", "private function getURI() : string\n {\n if (!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "function darksnow_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "private function rescue_uri()\n\t{\n\t\t$query = $this->request->query_string;\n\n\t\tif (strpos($query, '&amp;') === false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$query = html_entity_decode($query);\n\n\t\t$rc = parse_str($query, $this->request->params);\n\t}", "private function getURI(): string\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "public static function linkEncode($s) {\n if (@eregi(\"^http:\\/\\/[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href($s)->setText($s);\n if (@eregi(\"[^http:\\/]{7}[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href('http://' . $s)->setText($s);\n\n return $s;\n }", "public function __toString()\n {\n return $this->uri == null ? '' : $this->uri;\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "function string_url( $p_string ) \r\n{\r\n\t$p_string = rawurlencode( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function MakeURI($url, $uri = null)\r\n{\r\n\t$ret = str_replace(' ', '%20', $url);\r\n\r\n\tif (is_array($uri))\r\n\t{\r\n\t\t$start = (strpos($ret, \"?\") > 0);\r\n\t\tforeach ($uri as $key => $val)\r\n\t\t{\r\n\t\t\tif (isset($val))\r\n\t\t\t{\r\n\t\t\t\t$ret .= ($start ? '&amp;' : '?').\"{$key}={$val}\";\r\n\t\t\t\t$start = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $ret;\r\n}", "public function renderEscaped(): string\n {\n $this->escapeHtml(true);\n\n return $this->render();\n }", "public function fullUrl(): string\n {\n return $this->getUri();\n }", "private function get_uri ()\n {\n\n // Check these server vars first\n if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['SCRIPT_NAME']))\n {\n $path = $_SERVER['REQUEST_URI'];\n\n // Remove script name if still there\n if (strpos($path, $_SERVER['SCRIPT_NAME']) === 0)\n $path = substr($path, strlen($_SERVER['SCRIPT_NAME']));\n\n // Remove script's dir if still there\n elseif (strpos($path, dirname($_SERVER['SCRIPT_NAME'])) === 0)\n $path = substr($path, strlen(dirname($_SERVER['SCRIPT_NAME'])));\n\n // Remove query string if that's there\n if (strpos($path, '?') !== false)\n $path = substr($path, 0, strpos($path, '?'));\n\n if (trim(str_replace(array('//', '../'), '/', $path), '/') !== '') $uri = $path;\n }\n\n // Check path info\n if (!isset($uri))\n {\n $path = trim(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO'), '/');\n\n if ($path !== '' && $path !== SELF) $uri = $path;\n }\n\n // Last try: check query string\n if (!isset($uri))\n $uri = trim(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING'), '/');\n\n // Unprintable control chars\n $control_chars = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]+/S');\n\n do $uri = preg_replace($control_chars, '', $uri, -1, $count);\n while ($count);\n\n // Only allow THESE characters in URLs. Nothing else will make it through\n\n if (preg_match('|[^a-zA-Z 0-9~%.:_/\\-,]|', $uri, $matches)) die(\"Illegal character in URL: {$matches[0]}\");\n\n return $uri;\n }", "private function getPreparedUrlString()\n {\n $urlstring = $this->url->getRawUrl();\n\n // Remove schem if its set\n\n $urlstring = preg_replace('/^([a-z]+:\\/\\/)/i', '', $urlstring);\n\n // Remove double slashes\n\n $urlstring = preg_replace('/(\\/\\/)/i', '/', $urlstring);\n\n // Remove everything before the fist slash and the the slash too.\n\n $slashpos = strpos($urlstring, '/');\n\n if ($slashpos !== false) {\n $urlstring = substr($urlstring, $slashpos +1);\n }\n\n // Check if the last sign a slash to\n\n if (substr($urlstring, -1) == '/') {\n $urlstring = substr($urlstring, 0, strlen($urlstring) -1);\n }\n\n return $urlstring;\n }", "public function fetchUriString()\n\t{\n\t\tif ($_tempUri = $this->getUriFromRequest())\n\t\t{\n\t\t\t$this->set(trim($_tempUri, '/'));\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "private function encodeUrl($url)\n {\n \treturn $url;\n \t#return rawurlencode($url);\n }", "protected function escaped($url) {\n $url = trim($url);\n $url = preg_replace('~[^\\\\pL0-9_]+~u', '-', $url);\n $url = trim($url, \"-\");\n $url = iconv(\"utf-8\", \"ASCII//TRANSLIT//IGNORE\", $url);\n $url = preg_replace('~[^-a-zA-Z0-9_]+~', '', $url);\n\n return $url;\n }", "public static function getRaw()\r\n\t{\r\n\t\treturn $_SERVER['REQUEST_URI'];\r\n\t}", "function uri_safe_encode($str, $hexify = TRUE)\n{\n\t$str = ($hexify) ? ascii_to_hex(base64_encode($str)) : base64_encode($str);\n\treturn $str;\n}", "public function uri()\n {\n return $this->factory->getUri($this->handle);\n }" ]
[ "0.66119343", "0.649956", "0.6492189", "0.6326966", "0.62508965", "0.6239864", "0.6127398", "0.6045618", "0.6022748", "0.6015473", "0.59565085", "0.59474427", "0.5941867", "0.5938241", "0.59342647", "0.5916713", "0.59066164", "0.58840084", "0.5879682", "0.5871617", "0.584403", "0.5838143", "0.58282006", "0.5818913", "0.5815478", "0.5814199", "0.5811922", "0.57996047", "0.5785055", "0.5772073", "0.57528037", "0.57441485", "0.5743867", "0.5741265", "0.5737991", "0.5737991", "0.5737991", "0.5737991", "0.57178336", "0.56972426", "0.56924206", "0.5690205", "0.56771827", "0.5672596", "0.5665722", "0.5658251", "0.564889", "0.5645109", "0.563766", "0.5637103", "0.5636969", "0.5636845", "0.56334347", "0.5631858", "0.56297547", "0.5620208", "0.56038576", "0.56002635", "0.55969614", "0.55967873", "0.5591994", "0.5589675", "0.5576324", "0.5573901", "0.5572727", "0.5571292", "0.5570932", "0.55675775", "0.5566275", "0.5560742", "0.5557861", "0.5557861", "0.5557861", "0.5556351", "0.5556351", "0.55472654", "0.55432963", "0.55357933", "0.55355805", "0.5532943", "0.55309415", "0.55266666", "0.55175024", "0.5514144", "0.5513717", "0.5503005", "0.548648", "0.5485905", "0.5469459", "0.5466185", "0.5462955", "0.5453195", "0.5452745", "0.5446135", "0.54397804", "0.54397804", "0.54390806", "0.54348105", "0.5429939", "0.5429539", "0.54225004" ]
0.0
-1
Get an HTML escaped site URI
public function gSite() { $args = func_get_args(); return htmlspecialchars(call_user_func_array(array($this, 'getSite'), $args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode($protocol.'://'.$site.$slug);\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "protected function pageURI(): string\n {\n $ssl = (@$_SERVER['HTTPS'] == 'on');\n $link = ($ssl? 'https://' : 'http://') .$_SERVER['HTTP_HOST'];\n if ($_SERVER['SERVER_PORT'] != ($ssl? '443' : '80')) {\n $link .= ':' .$_SERVER[\"SERVER_PORT\"];\n }\n return $link .urldecode($_SERVER['REQUEST_URI']);\n }", "public static function getRawUrl() {\r\n return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '');\r\n }", "public function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode( $protocol . '://' . $site . $slug );\n }", "function esc_url_raw( $url, $protocols = null ) {\n\treturn esc_url( $url, $protocols, 'db' );\n}", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "function esc_url_raw($url, $protocols = \\null)\n {\n }", "function labs_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n }", "function darksnow_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}", "public function getURI();", "public static function siteURL(): string\n {\n return sprintf(\"%s://%s\", Request::scheme(), Request::host());\n }", "public function getWebURI()\n {\n\t\treturn $this->response[self::FIELD_RESULT][self::FIELD_WEB_URI];\n\t}", "public function url(): string\n {\n return strtok($this->getUri(), '?');\n }", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "public function renderUri();", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function url()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_URL);\n\t}", "function url_site(): string\n{\n //return input_server('REQUEST_SCHEME') . '://' . input_server('SERVER_NAME');\n $site = \\get_site_url();\n $pos = strpos($site, '/', 8);\n return $pos ? substr($site, 0, $pos) : $site;\n}", "public function\n\tGetURL():\n\t?String {\n\n\t\treturn sprintf(\n\t\t\t'%s://%s%s%s',\n\t\t\t$this->GetProtocol(),\n\t\t\t$this->GetFullDomain(),\n\t\t\t(($this->GetPath() === '/index')?\n\t\t\t\t('/'):\n\t\t\t\t($this->GetPath())\n\t\t\t),\n\t\t\t((count($this->Query) >= 1)?\n\t\t\t\t($this->QueryCooker($this->Query)):\n\t\t\t\t(''))\n\t\t);\n\t}", "private function getURI() : string\n {\n if (!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "public function getUrl()\n {\n $uri = $this->getHost();\n\n $server = provider::access('server');\n\n if ($server->isExist('PHP_SELF') && $server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)) {\n // for 'good' servers\n $uri .= $server->getValue('REQUEST_URI');\n } else {\n // for IIS\n if ($server->isValid('SCRIPT_NAME', validate::T_PRINTABLE)) {\n $uri .= $server->getValue('SCRIPT_NAME');\n }\n\n if ($server->isValid('QUERY_STRING', validate::T_PRINTABLE)) {\n $uri .= '?' . $server->getValue('QUERY_STRING');\n }\n }\n\n return $uri;\n }", "public static function getHostUrl() : String{\n $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';\n $host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\n return \"$protocol$host$uri\";\n }", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "function CurrPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "public function getUri() : string\n {\n $rtn = $this->data['uri'];\n\n return $rtn;\n }", "public function URL()\n\t{\n\t\treturn $this->isHomePage() ? \\URL::to('/') : \\URL::to($this->uri);\n\t}", "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "private function getURI(): string\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "public function getURL()\n {\n return $this->page->getURL() . 'links-to-this/';\n }", "function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}", "public function url()\n {\n return trim(sprintf(\"%s://%s%s\", $this->scheme, $this->domain, $this->path), '/');\n }", "private function get_uri ()\n {\n\n // Check these server vars first\n if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['SCRIPT_NAME']))\n {\n $path = $_SERVER['REQUEST_URI'];\n\n // Remove script name if still there\n if (strpos($path, $_SERVER['SCRIPT_NAME']) === 0)\n $path = substr($path, strlen($_SERVER['SCRIPT_NAME']));\n\n // Remove script's dir if still there\n elseif (strpos($path, dirname($_SERVER['SCRIPT_NAME'])) === 0)\n $path = substr($path, strlen(dirname($_SERVER['SCRIPT_NAME'])));\n\n // Remove query string if that's there\n if (strpos($path, '?') !== false)\n $path = substr($path, 0, strpos($path, '?'));\n\n if (trim(str_replace(array('//', '../'), '/', $path), '/') !== '') $uri = $path;\n }\n\n // Check path info\n if (!isset($uri))\n {\n $path = trim(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO'), '/');\n\n if ($path !== '' && $path !== SELF) $uri = $path;\n }\n\n // Last try: check query string\n if (!isset($uri))\n $uri = trim(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING'), '/');\n\n // Unprintable control chars\n $control_chars = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]+/S');\n\n do $uri = preg_replace($control_chars, '', $uri, -1, $count);\n while ($count);\n\n // Only allow THESE characters in URLs. Nothing else will make it through\n\n if (preg_match('|[^a-zA-Z 0-9~%.:_/\\-,]|', $uri, $matches)) die(\"Illegal character in URL: {$matches[0]}\");\n\n return $uri;\n }", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "function readURL()\n\t{\n\t\t\t $pageURL = 'http';\n\t\t\t if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") $pageURL .= \"s\";\n\t\t\t $pageURL .= \"://\";\n\t\t\t if (isset($_SERVER[\"SERVER_PORT\"]) && $_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t } else {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t }\n\t\t\t \n\t\treturn $pageURL;\n\t}", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "public abstract function getURL();", "public function url() {\n return Magic::url();\n }", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "private function getThisPageFullURL()\n {\n return 'http' . ( ! empty($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . ( ( empty($_GET) ) ? '' : '?' . http_build_query($_GET) );\n }", "public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }", "function formatCurrentUrl() ;", "function cherry_get_page_URL(){\n\t\tif(!isset($_SERVER['REQUEST_URI'])){\n\t\t\t$site_uri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$site_uri = $_SERVER['REQUEST_URI'];\n\t\t\t$https = empty($_SERVER[\"HTTPS\"]) ? '' : (($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\");\n\t\t\t$site_protocol = strtolower($_SERVER[\"SERVER_PROTOCOL\"]);\n\t\t\t$site_protocol = substr($site_protocol,0,strpos($site_protocol,\"/\")).$https;\n\t\t\t$site_port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t}\n\t\treturn $site_protocol.\"://\".$_SERVER['SERVER_NAME'].$site_port.$site_uri;\n\t}", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function getURL();", "public function getURL();", "private function getTalkURI()\n {\n $url = $this->getInput('url');\n return $url;\n }", "public static function uri()\n\t{\n\t\treturn trim(parse_url(str_replace(App::get('base_url') . '/', \"\", $_SERVER['REQUEST_URI']), PHP_URL_PATH), '/');\n\t}", "function wikiurl( $s ) {\n\treturn str_replace( '%2F', '/', rawurlencode( $s ) );\n}", "public function getURL ();", "function getURI($includeRef = true) {\n\n if ($this->hasQuery()){\n $props = $this->query;\n // Sort query :)\n ksort($props);\n @$query = '';\n foreach ($props as $key => $value)\n $query .= $key . '=' . $value . '&'; \n }\n return (\n (($this->hasQuery() && $this->path) ? '?' . subStr($query,0,-1) :'') .\n (($includeRef && $this->ref && strLen($this->path)) ? '#' . ($this->ref) :'')\n );\n }", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getSanitizedUrl()\n {\n $url = preg_replace(\"/\\\\?.*/\", \"\", $this->url);\n $url = preg_replace(\"/\\\\:\\\\d{4}/\", \"\", $url);\n return $url;\n }", "public function to_url() {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }", "public function get_url():string\n {\n return strtok($_SERVER[\"REQUEST_URI\"],'?');\n }", "function _generateURI($title) {\n \n // replace numeric entities by its characters and vaporise all other lethal characters\n $s = array(\n '/&#x([\\dA-F]+);/e',\n '/\\n\\r\\t/'\n );\n $r = array(\n \"chr(hexdec('\\\\1'))\",\n ''\n );\n \n $uri = preg_replace($s, $r, $title);\n return urlencode($uri);\n }", "public function siteUrl() {}", "public function getUriString()\n {\n if ($this->uri instanceof HttpUri) {\n return $this->uri->toString();\n }\n return $this->uri;\n }", "function full_url() {\n\t$s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\n\t$protocol = substr(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), 0, strpos(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\")) . $s;\n\t$port = ($_SERVER[\"SERVER_PORT\"] == \"80\" || $_SERVER[\"SERVER_PORT\"] == \"443\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\n\t$quotes = array('\\'', '\"');\n\t$encoded = array('%27', '%22');\n\n\treturn $protocol . \"://\" . $_SERVER['SERVER_NAME'] . $port . str_replace($quotes, $encoded, $_SERVER['REQUEST_URI']);\n}", "public static function getRaw()\r\n\t{\r\n\t\treturn $_SERVER['REQUEST_URI'];\r\n\t}", "function get_uri() {\n return urldecode(\n parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)\n );\n }", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "abstract public function getUri();", "public function getOwnURL() \n\t{ \n\t\t$s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\"; \n\t\t$protocol = $this->strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s; \n$port = ($_SERVER[\"SERVER_PORT\"] == \"80\" || $_SERVER[\"SERVER_PORT\"] == \"82\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]); \n\t\treturn $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; \n\t}", "public function fullUrl(): string\n {\n return $this->getUri();\n }", "static public function selfURL()\r\n {\r\n //global $cfgSite;\r\n $cfgSite = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.site.xml');\r\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\r\n $protocol = self::strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\r\n if ($cfgSite->use_port_in_URL == '1') {\r\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\r\n } else {$port = '';}\r\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\r\n }", "abstract public function uri(): string;", "public function fullUrl() {\n\t\treturn $this->getScheme() . '://' . $this->host() . $this->getUri();\n\t}", "function href() {\n\t\t$usemodrewrite = polarbear_setting('usemodrewrite');\n\t\tif ($usemodrewrite) {\n\t\t\treturn $this->fullpath();\n\t\t} else {\n\t\t\treturn $this->templateToUse() . '?polarbear-page=' . $this->getId();\n\t\t}\n\t}", "function esc_url( $url, $protocols = null, $_context = 'display' ) {\n\t$original_url = $url;\n\n\tif ( '' == $url )\n\t\treturn $url;\n\t$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\t$strip = array('%0d', '%0a', '%0D', '%0A');\n\t$url = _deep_replace($strip, $url);\n\t$url = str_replace(';//', '://', $url);\n\t/* If the URL doesn't appear to contain a scheme, we\n\t * presume it needs http:// appended (unless a relative\n\t * link starting with /, # or ? or a php file).\n\t */\n\tif ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n\t\t! preg_match('/^[a-z0-9-]+?\\.php/i', $url) )\n\t\t$url = 'http://' . $url;\n\n\t// Replace ampersands and single quotes only when displaying.\n\tif ( 'display' == $_context ) {\n\t\t$url = wp_kses_normalize_entities( $url );\n\t\t$url = str_replace( '&amp;', '&#038;', $url );\n\t\t$url = str_replace( \"'\", '&#039;', $url );\n\t}\n\n\tif ( '/' === $url[0] ) {\n\t\t$good_protocol_url = $url;\n\t} else {\n\t\tif ( ! is_array( $protocols ) )\n\t\t\t$protocols = wp_allowed_protocols();\n\t\t$good_protocol_url = wp_kses_bad_protocol( $url, $protocols );\n\t\tif ( strtolower( $good_protocol_url ) != strtolower( $url ) )\n\t\t\treturn '';\n\t}\n\n\t/**\n\t * Filter a string cleaned and escaped for output as a URL.\n\t *\n\t * @since 2.3.0\n\t *\n\t * @param string $good_protocol_url The cleaned URL to be returned.\n\t * @param string $original_url The URL prior to cleaning.\n\t * @param string $_context If 'display', replace ampersands and single quotes only.\n\t */\n\treturn apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );\n}", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }", "public function getURI() : string {\n return $this->URI;\n }", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "public function getUri(){\n\t\treturn preg_replace('/[^\\w-]*/', '', (strtolower(str_replace(' ', '-', $this->name)))).'-'.$this->id;\n\t}", "protected function escape($value)\n {\n $escaper = $this->getEscaper();\n if (!method_exists($escaper, 'escapeFullUrl')) {\n $this->setEscaper(new Escaper);\n }\n\n return $this->getEscaper()->escapeFullUrl($value);\n }", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "function uri(): string;", "function getSiteURL()\n\t{\n\t return JURI::root();\n\t}", "private function site_url()\n\t{\n\t\t$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)\n\t\t\t? \"https://\"\n\t\t\t: \"http://\";\n\t\t$domainName = $_SERVER['HTTP_HOST'];\n\n\t\treturn $protocol.$domainName;\n\t}", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "function siteURL()\n{\n $protocol = 'http://';\n $domainName = $_SERVER['HTTP_HOST'].'/';\n return $protocol.$domainName;\n}", "public function to_url()\n {\n $out = $this->get_normalized_http_url() . \"?\";\n $out .= $this->to_postdata();\n return $out;\n }", "private function _getContentURI(){\r\n $uri = substr($_SERVER['REQUEST_URI'], strlen(WEBROOT));\r\n if (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));\r\n $uri = str_replace('index.php', '', $uri);\r\n $uri = trim($uri, '/');\r\n\r\n if($uri == ''){\r\n $uri = 'index';\r\n }\r\n\r\n return $uri;\r\n }", "static function absolutePath($content){\n\t\t$find = array('http://','href=\"http://','href=\"/');\n\t\t$replace = array('style=\"color:#124f7d; text-decoration:none;\" http://','style=\"color:#124f7d; text-decoration:none;\" href=\"http://','style=\"color:#124f7d; text-decoration:none;\" href=\"http://archive.azcentral.com/');\n\t\t$search = str_replace($find,$replace,$content);\n\t\treturn $search;\n\t}", "public static function getThisUrl() {}", "public static function linkEncode($s) {\n if (@eregi(\"^http:\\/\\/[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href($s)->setText($s);\n if (@eregi(\"[^http:\\/]{7}[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href('http://' . $s)->setText($s);\n\n return $s;\n }", "public function raw()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse return $this->generateString();\n\t}", "public function url()\n {\n $url = $this->value;\n\n if (!str_contains('http', $url)) {\n $url = url($url);\n }\n\n return $url;\n }", "public function buildFrontendUri() {}", "public function url(): string;", "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}", "function cms_raw_url_encode($url_part, $can_try_url_schemes = null) // TODO: Rename function in v11 and document in codebook\n{\n // Slipstream for 99.99% of data\n $url_part_encoded = rawurlencode($url_part);\n if ($url_part_encoded === $url_part) {\n return $url_part_encoded;\n }\n\n if ($can_try_url_schemes === null) {\n $can_try_url_schemes = can_try_url_schemes();\n }\n if ($can_try_url_schemes) { // These interfere with URL Scheme processing because they get pre-decoded and make things ambiguous\n //$url_part = str_replace(':', '(colon)', $url_part); We'll ignore theoretical problem here- we won't expect there to be a need for encodings within redirect URL paths (params is fine, handles naturally)\n $url_part = str_replace(array('&', '#'), array(':amp:', ':uhash:'), $url_part); // horrible but mod_rewrite does it so we need to\n }\n $url_part = str_replace('%2F', '/', rawurlencode($url_part));\n return $url_part;\n}" ]
[ "0.66294074", "0.6608077", "0.66007423", "0.6565302", "0.6556402", "0.65006626", "0.6436616", "0.6412553", "0.6387606", "0.63653296", "0.63499886", "0.6317341", "0.6314389", "0.6299983", "0.62967896", "0.6280086", "0.6267425", "0.6253248", "0.6141746", "0.61181474", "0.6095778", "0.6094167", "0.608552", "0.6081973", "0.6079563", "0.60792327", "0.6070619", "0.60687107", "0.60449964", "0.6039049", "0.6037396", "0.60337245", "0.60271186", "0.60271156", "0.60037893", "0.5997499", "0.5995216", "0.59901047", "0.59658986", "0.59647554", "0.5962366", "0.5960672", "0.59587246", "0.59535897", "0.5945024", "0.59431666", "0.5926145", "0.5926145", "0.5913251", "0.5912209", "0.59102875", "0.5903029", "0.589695", "0.5896683", "0.58945936", "0.58877695", "0.58838934", "0.58791983", "0.5878764", "0.58735156", "0.5870968", "0.58683527", "0.58639014", "0.5863287", "0.5854999", "0.5854521", "0.5853864", "0.58503276", "0.5850131", "0.584904", "0.58448976", "0.58405614", "0.5837729", "0.5837729", "0.5837729", "0.5837729", "0.5833111", "0.5826502", "0.5823196", "0.5821338", "0.58160985", "0.58142215", "0.5810241", "0.5804988", "0.58012295", "0.5792455", "0.57920146", "0.57862425", "0.57832783", "0.57802594", "0.57756585", "0.5767319", "0.5764588", "0.57547015", "0.5746206", "0.5741587", "0.57406586", "0.5734286", "0.57340366", "0.5732536", "0.5731306" ]
0.0
-1
Get a site URI
public function gSiteRaw() { $args = func_get_args(); return call_user_func_array(array($this, 'getSite'), $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function siteURL(): string\n {\n return sprintf(\"%s://%s\", Request::scheme(), Request::host());\n }", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "function url_site(): string\n{\n //return input_server('REQUEST_SCHEME') . '://' . input_server('SERVER_NAME');\n $site = \\get_site_url();\n $pos = strpos($site, '/', 8);\n return $pos ? substr($site, 0, $pos) : $site;\n}", "public static function getSiteUrl()\n\t{\n\t\t$uri = JUri::getInstance();\n\t\t$base = $uri->toString(array('scheme', 'host', 'port'));\n\n\t\tif (strpos(php_sapi_name(), 'cgi') !== false && !ini_get('cgi.fix_pathinfo') && !empty($_SERVER['REQUEST_URI']))\n\t\t{\n\t\t\t$script_name = $_SERVER['PHP_SELF'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$script_name = $_SERVER['SCRIPT_NAME'];\n\t\t}\n\n\t\t$path = rtrim(dirname($script_name), '/\\\\');\n\n\t\tif ($path)\n\t\t{\n\t\t\t$siteUrl = $base . $path . '/';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$siteUrl = $base . '/';\n\t\t}\n\n\t\tif (JFactory::getApplication()->isClient('administrator'))\n\t\t{\n\t\t\t$adminPos = strrpos($siteUrl, 'administrator/');\n\t\t\t$siteUrl = substr_replace($siteUrl, '', $adminPos, 14);\n\t\t}\n\n\t\treturn $siteUrl;\n\t}", "public function getSiteURL()\n {\n return $this->config->get('site.url').$this->config->get('site.dir');\n }", "private static function getSiteUrl()\n {\n return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . ( isset($_SERVER['SCRIPT_URL'] ) ? $_SERVER['SCRIPT_URL'] : '' );\n }", "function getSiteURL()\n\t{\n\t return JURI::root();\n\t}", "public function siteUrl() {}", "function get_site_url() {\n\t$protocol = (isSet($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';\n\treturn $protocol . '://' . $_SERVER['HTTP_HOST'];\n}", "public function getSiteURL()\r\n {\r\n return $this->siteURL;\r\n }", "public function getURI();", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "function network_site_url($path = '', $scheme = \\null)\n {\n }", "private function site_url()\n\t{\n\t\t$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)\n\t\t\t? \"https://\"\n\t\t\t: \"http://\";\n\t\t$domainName = $_SERVER['HTTP_HOST'];\n\n\t\treturn $protocol.$domainName;\n\t}", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}", "public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getUri() {}", "public function getUri() {}", "public static function uri()\n\t{\n\t\treturn trim(parse_url(str_replace(App::get('base_url') . '/', \"\", $_SERVER['REQUEST_URI']), PHP_URL_PATH), '/');\n\t}", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getWebsiteURL() {\n return $this->getChaveValor('WEBSITE_URL');\n }", "function get_site_url($blog_id = \\null, $path = '', $scheme = \\null)\n {\n }", "public function getUri()\n {\n return $this->getUrl();\n }", "function siteURL()\n{\n $protocol = 'http://';\n $domainName = $_SERVER['HTTP_HOST'].'/';\n return $protocol.$domainName;\n}", "protected function _getUrl()\n {\n $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\n $protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\n $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'.$_SERVER['SERVER_PORT']);\n\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n }", "public function getWebURI()\n {\n\t\treturn $this->response[self::FIELD_RESULT][self::FIELD_WEB_URI];\n\t}", "function site_url($path = '', $scheme = \\null)\n {\n }", "public function getUrl()\n {\n $uri = $this->getHost();\n\n $server = provider::access('server');\n\n if ($server->isExist('PHP_SELF') && $server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)) {\n // for 'good' servers\n $uri .= $server->getValue('REQUEST_URI');\n } else {\n // for IIS\n if ($server->isValid('SCRIPT_NAME', validate::T_PRINTABLE)) {\n $uri .= $server->getValue('SCRIPT_NAME');\n }\n\n if ($server->isValid('QUERY_STRING', validate::T_PRINTABLE)) {\n $uri .= '?' . $server->getValue('QUERY_STRING');\n }\n }\n\n return $uri;\n }", "abstract public function getUri();", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }", "function cherry_get_page_URL(){\n\t\tif(!isset($_SERVER['REQUEST_URI'])){\n\t\t\t$site_uri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$site_uri = $_SERVER['REQUEST_URI'];\n\t\t\t$https = empty($_SERVER[\"HTTPS\"]) ? '' : (($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\");\n\t\t\t$site_protocol = strtolower($_SERVER[\"SERVER_PROTOCOL\"]);\n\t\t\t$site_protocol = substr($site_protocol,0,strpos($site_protocol,\"/\")).$https;\n\t\t\t$site_port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t}\n\t\treturn $site_protocol.\"://\".$_SERVER['SERVER_NAME'].$site_port.$site_uri;\n\t}", "function getsite( )\n{\n\t\t\t\tif ( empty( $_SERVER['HTTP_HOST'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['HTTP_HOST'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['SERVER_NAME'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $_SERVER['REQUEST_URI'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['REQUEST_URI'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['PHP_SELF'];\n\t\t\t\t}\n\t\t\t\t$Rcc5c6e696c = explode( \"/\", $Rd4e4624cdb );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\t$Rd4e4624cdb = implode( \"/\", $Rcc5c6e696c );\n\t\t\t\treturn $R8607b50296.$Rd4e4624cdb;\n}", "static public function selfURL()\r\n {\r\n //global $cfgSite;\r\n $cfgSite = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.site.xml');\r\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\r\n $protocol = self::strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\r\n if ($cfgSite->use_port_in_URL == '1') {\r\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\r\n } else {$port = '';}\r\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\r\n }", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public static function getUri()\n {\n if (isset($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n } else {\n return \"/\";\n }\n }", "function ngwp_sitepress_site_url()\n\t{\n\t\t// $url, $path, $scheme, $blog_id\n\t\t$args = func_get_args();\n\t\tif ( $path && is_string( $path ) )\n\t\t\treturn rtrim( substr( $args[0], 0, strlen($args[0]) - strlen($args[1]) ), '/' ) . '/' . ICL_LANGUAGE_CODE . '/' . ltrim( $args[1], '/' );\n\t\treturn rtrim( $args[0], '/' ) . '/' . ICL_LANGUAGE_CODE;\n\t}", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "public function getURL();", "public function getURL();", "public static function getURI()\n {\n\t\tif(isset($_SERVER['PATH_INFO']))\n {\n\t\t\t$_path_info = $_SERVER['PATH_INFO'];\n\n\t\t}\n elseif(isset($_SERVER['ORIG_PATH_INFO']))\n {\n\t\t\t$_path_info = $_SERVER['ORIG_PATH_INFO'];\n \t\t}\n else\n {\n\t\t\t$_path_info = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\tif (substr($_path_info, 0, strlen(_app_path)) == _app_path) {\n \t\t\t$_path_info = substr($_path_info, strlen(_app_path));\n\t\t}\n\n if(substr($_path_info,0,9) == \"index.php\")\n {\n $_path_info = ltrim($_path_info, \"index.php\"); // index.php might be there, drop that too\n }\n\n\t\t$uri = (!isset($_path_info) || $_path_info == \"\" || $_path_info == \"public\") ? \"\" : ltrim($_path_info,\"/\");\n\t\treturn $uri;\n\n // depending on server configuration, you might need to do this instead\n // $_path_info = preg_split(\"/\\?|\\&/\",$_path_info); // check for ? or & in url\n // return (!isset($_path_info[0]) || $_path_info[0] == \"\") ? \"\" : ltrim($_path_info[0],\"/\");\n }", "public function getUri() : string\n {\n $rtn = $this->data['uri'];\n\n return $rtn;\n }", "public static function site($uri = '', $protocol = NO) {\n\t\tif($path = trim(parse_url($uri, PHP_URL_PATH), '/')) {\n\t\t\t// Add path suffix\n\t\t\t$path .= Eight::config('core.url_suffix');\n\t\t}\n\n\t\tif($query = parse_url($uri, PHP_URL_QUERY)) {\n\t\t\t// ?query=string\n\t\t\t$query = '?'.$query;\n\t\t}\n\n\t\tif($fragment = parse_url($uri, PHP_URL_FRAGMENT)) {\n\t\t\t// #fragment\n\t\t\t$fragment = '#'.$fragment;\n\t\t}\n\n\t\t// Concat the URL\n\t\treturn url::base(YES, $protocol).$path.$query.$fragment;\n\t}", "public function getURL ();", "public function getSiteHost();", "public function getUri()\n {\n $server = provider::access('server');\n\n return ($server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)\n ? $server->getValue('REQUEST_URI')\n : '/');\n }", "public function get_url();", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function getSite();", "function getUrl() {\n\t\t$url = @( $_SERVER[\"HTTPS\"] != 'on' ) ? 'http://'.$_SERVER[\"SERVER_NAME\"] : 'https://'.$_SERVER[\"SERVER_NAME\"];\n\t\t$url .= ( $_SERVER[\"SERVER_PORT\"] !== 80 ) ? \":\".$_SERVER[\"SERVER_PORT\"] : \"\";\n\t\t$url .= $_SERVER[\"REQUEST_URI\"];\n\t\treturn $url;\n\t}", "public static function getWebsiteURL(){\n if(Cache::isStored('website_url'))return Cache::get('website_url'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_url'\");\n $url = $row['value'];\n #http:// prefix\n if(!is_numeric(strpos($url, \"http://\"))){\n $url = 'http://' . $url;\n }\n #/ suffix\n if(substr($url, -1) != '/'){\n $url .= '/';\n }\n Cache::store('website_url', $url);\n return $url;\n }", "static function getURI() {\n return '/';\n }", "public function uri();", "public function uri();", "public function uri();", "static public function getFull()\n {\n return 'https://' . Config::get('app.Host') . $_SERVER['REQUEST_URI'];\n }", "function site_url(){\n\treturn config( 'site.url' );\n}", "protected function pageURI(): string\n {\n $ssl = (@$_SERVER['HTTPS'] == 'on');\n $link = ($ssl? 'https://' : 'http://') .$_SERVER['HTTP_HOST'];\n if ($_SERVER['SERVER_PORT'] != ($ssl? '443' : '80')) {\n $link .= ':' .$_SERVER[\"SERVER_PORT\"];\n }\n return $link .urldecode($_SERVER['REQUEST_URI']);\n }", "function p4_px_single_post_site_url() {\n\tif ( is_multisite() ) {\n\t\treturn network_home_url();\n\t} else {\n\t\treturn get_bloginfo_rss( 'url' );\n\t}\n}", "function get_site_url($val='', $val_2=false)\n {\n if(_helper_site_url($val)) {\n $val = _helper_site_url($val);\n\n if(is_numeric($val_2)) {\n $val = $val.'?id='.$val_2;\n } else {\n $val = $val.'?'.$val_2;\n }\n }\n\n if(substr($val, 0,1) == '/') {\n return _site_url.''.$val;\n } else {\n return _site_url.'/'.$val;\n }\n }", "function trueSiteUrl() {\n\t\treturn $GLOBALS[\"trueSiteUrl\"];\n\t}", "public function getUri(): string\n {\n return $this->uri;\n }", "public function URL()\n\t{\n\t\treturn $this->isHomePage() ? \\URL::to('/') : \\URL::to($this->uri);\n\t}", "public function getWebsite();", "protected function _getURL()\n {\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\n\n $protocol = substr(\n strtolower($_SERVER[\"SERVER_PROTOCOL\"]), 0, strpos(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\")\n ) . $s;\n\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "public function getUri()\n {\n }", "public function getUri()\n {\n }", "public function getUri()\n {\n return $this->getAttribute('uri');\n }", "function get_site($site = \\null)\n {\n }", "protected function getHostFromUri() {}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "static public function getURI()\n {\n return explode('?', $_SERVER['REQUEST_URI'])[0] . '/';\n }", "public static function getUrl() {\n\t\tif(!isset(self::$url)) {\n\t\t\tself::$url = self::getUrlBase();\n\t\t\tif(isset($_SERVER['REQUEST_URI'])) {\n\t\t\t\tself::$url .= $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t}\n\t\treturn self::$url;\n\t}", "public static function getSchoolUrl() {\n\t\treturn self::getUri()[1];\n\t}", "private function getUri(){\n return $this->uri = parse_url($_SERVER['REQUEST_URI']);\n }", "function getFullUrl() {\n /*** check for https ***/ /*** return the full address ***/\n return 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n }", "public function getOwnURL() \n\t{ \n\t\t$s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\"; \n\t\t$protocol = $this->strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s; \n$port = ($_SERVER[\"SERVER_PORT\"] == \"80\" || $_SERVER[\"SERVER_PORT\"] == \"82\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]); \n\t\treturn $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; \n\t}", "public abstract function getURL();", "private function getURI() : string\n {\n if (!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }", "public function getUri()\n {\n if (isset($_SERVER['QUERY_STRING'])) {\n return filter_var(trim(str_replace('?'.$_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']), '/'), FILTER_SANITIZE_URL);\n }\n return filter_var(trim($_SERVER['REQUEST_URI'], '/'), FILTER_SANITIZE_URL);\n }", "public function uri() {\n\t\treturn $this->getUri();\n\t}", "public static function getURI() {\n\n return self::loadUrl();\n }", "public static function uri() {\n\t\treturn isset($_SERVER['REQUEST_URI'])\n\t\t\t? $_SERVER['REQUEST_URI']\n\t\t\t: null;\n\t}", "protected function _getValidateUri($site)\n {\n $site = base64_decode($site);\n return (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')\n . rtrim($site, '/ ')\n . Mage::getStoreConfig(self::XML_VALIDATE_URL_PATH);\n }", "public function getURI() : string {\n return $this->URI;\n }", "private function resolveOrigin()\n {\n $uri = 'http';\n\n if (getenv('HTTPS') === 'on') {\n $uri .= 's';\n }\n\n $uri .= '://';\n $uri .= getenv('HTTP_HOST').getenv('REQUEST_URI');\n\n return $uri;\n }", "function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}", "public function get_uri()\n {\n }", "private function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode($protocol.'://'.$site.$slug);\n }", "public function uri() {\n\t\treturn isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '/';\n\t}", "public function uri(): string\n {\n return $this->uri;\n }", "public function url() {\n\t\tif ( ! isset( $this->url ) ) {\n\t\t\t$url = add_query_arg( 'page', $this->page_slug, 'sites.php' );\n\t\t\t$this->url = network_admin_url( $url );\n\t\t}\n\n\t\treturn $this->url;\n\t}", "function site_url($val='', $val_2=false)\n {\n echo get_site_url($val, $val_2);\n }", "private function getURL(){\n if(!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'],'/');\n }\n }", "public function getSiteUrl()\n {\n sort($this->siteUrl);\n return $this->siteUrl;\n }", "public function getURI()\n {\n return $this->uri;\n }", "private function getURI()\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return trim($_SERVER['REQUEST_URI'], '/');\n }\n }" ]
[ "0.7778082", "0.7680461", "0.7558942", "0.74966085", "0.74762875", "0.74698746", "0.7392462", "0.73744786", "0.735821", "0.734984", "0.7301719", "0.7296233", "0.7296233", "0.7296233", "0.7296233", "0.72959435", "0.7273374", "0.7263061", "0.71794784", "0.71608114", "0.71608114", "0.71607345", "0.7157994", "0.71158826", "0.71115106", "0.70889294", "0.7071301", "0.7035237", "0.7034215", "0.7021741", "0.7018341", "0.70135397", "0.69871354", "0.69733", "0.6953787", "0.6952997", "0.69492376", "0.6927032", "0.6925313", "0.6924714", "0.6917993", "0.6914288", "0.6914288", "0.69140965", "0.6892287", "0.6886455", "0.6884032", "0.68812436", "0.68686604", "0.6866569", "0.6865137", "0.6856362", "0.68504816", "0.68466944", "0.683885", "0.6821655", "0.6821655", "0.6821655", "0.6808482", "0.6791881", "0.6788224", "0.678561", "0.6782439", "0.678124", "0.6780234", "0.67769074", "0.6773816", "0.6773509", "0.6771197", "0.6740028", "0.6740028", "0.6734185", "0.6713244", "0.67073816", "0.67039293", "0.670031", "0.67002386", "0.66979647", "0.6696041", "0.6689308", "0.66839373", "0.6682444", "0.668198", "0.66807646", "0.667892", "0.6676041", "0.6674506", "0.66705066", "0.6667518", "0.66668165", "0.66644144", "0.6661054", "0.66604775", "0.66568255", "0.6656623", "0.6653159", "0.6649637", "0.66416883", "0.66392624", "0.66331714", "0.66255754" ]
0.0
-1
initialized below class definition
public function testApi($api, $params) { $this->runApiTests($api, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "public function __init(){}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "private function __construct()\t{}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct() {\r\n\t\t\r\n\t}", "final private function __construct()\n {\n }", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "private function __construct() {\n\t\t}", "final private function __construct()\n\t{\n\t}", "protected final function __construct() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private function __construct()\n\t{\n\t\t\n\t}", "private function __construct()\r\n\t{\r\n\t}", "private function __construct () {}", "final function __construct() { \n\t}", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "protected function __construct() {\n\t\t\n\t}", "protected function __construct() {\n\t\t\n\t}", "private final function __construct() {}", "private function __construct()\r\r\n\t{\r\r\n\t}", "public function init ()\r\n {\r\n }", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init()\n {\n \t\n }", "public function init()\n {\n \t\n }", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "public function init() {\n\t\t\n\t}", "public function init()\n\t\t{\n\t\n\t\t}", "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "private function __construct()\n\t{\n\n\t}", "private function __construct () \n\t{\n\t}", "private function __construct( )\n {\n\t}", "public function init() {\n \n }", "public function init() {\n \n }", "public function init() {\n \n }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.85031796", "0.82744414", "0.82071686", "0.8203828", "0.8170888", "0.81261444", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80482423", "0.80476075", "0.8045113", "0.8042164", "0.8042164", "0.80206907", "0.80206907", "0.80206907", "0.80149174", "0.7996405", "0.7992351", "0.7976967", "0.7969353", "0.7969353", "0.7969353", "0.7969353", "0.7969353", "0.7969353", "0.79690814", "0.79690814", "0.7968938", "0.7968938", "0.7968938", "0.7968938", "0.7946435", "0.79375404", "0.79338485", "0.7921072", "0.79133546", "0.7906839", "0.7906839", "0.7904121", "0.7904121", "0.78976375", "0.78948075", "0.78924996", "0.78838754", "0.78838754", "0.78838754", "0.78838754", "0.78838754", "0.78827137", "0.78827137", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7882239", "0.7875305", "0.7875305", "0.7871267", "0.78694195", "0.78609765", "0.78598565", "0.7857424", "0.7850665", "0.78483", "0.78483", "0.78483", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758", "0.7841758" ]
0.0
-1
A project belongs to: user (many)
public function user() { return $this->belongsTo('App\User'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function users_in_projects () {\n return $this->hasMany(users_in_projects::class);\n }", "public function getProjectsUsers()\n {\n return $this->hasMany(ProjectsUsers::class, ['user_id' => 'id']);\n }", "public function users() {\n\t\treturn $this->belongsToMany('User', 'project_user', 'project_id', 'user_id');\n\t}", "public function contributedProjects() {\n// select *\n// FROM projects\n// INNER JOIN contributions on contributions.project_id = projects.id\n// WHERE contributions.user_id = Auth::user()->id\n return $this->belongsToMany(\n 'App\\ProjectModel', 'contribution', 'id_user',\n 'id_project'\n );\n }", "function get_projects( $user )\n {\n //Unimplemented\n }", "public function projects()\n {\n return $this->belongsToMany(Project::class, 'bsoft_project_logs', 'pl_user_id', 'pl_project_id');\n }", "public function joinGroup($user_id,$project_id);", "public function includeUser(Project $project){\n $user = $project->user;\n //TODO Call Transformer Relation (User)\n return $this->item($user, new UserTransformer);\n }", "function rawpheno_function_user_project($user_id) {\n $trait_type = rawpheno_function_trait_types();\n $my_project = array();\n\n $sql = \"SELECT\n t1.name,\n t1.project_id,\n COUNT(CASE WHEN t2.type = :essential_trait THEN 1 END) AS essential_count\n FROM\n {project} AS t1\n INNER JOIN pheno_project_cvterm AS t2 USING (project_id)\n LEFT JOIN pheno_project_user AS t3 USING (project_id)\n WHERE t3.uid = :user_id\n GROUP BY t1.project_id\n ORDER BY t1.project_id DESC\";\n\n $args = array(':essential_trait' => $trait_type['type1'], ':user_id' => $user_id);\n $p = chado_query($sql, $args);\n\n if ($p->rowCount() > 0) {\n foreach($p as $a) {\n if ($a->essential_count > 0) {\n $my_project[$a->project_id] = $a->name;\n }\n }\n }\n\n return $my_project;\n}", "public function projects()\n {\n return $this->hasMany('App\\Project');\n }", "function add_project( $user, $project, $type=\"local\")\n {\n //Unimplemented\n }", "function is_project( $user )\n {\n //Unimplemented\n }", "function cloneToProject(Project $to) {\n try {\n DB::beginWork('Cloning users to project @ ' . __CLASS__);\n \n $project_users_table = TABLE_PREFIX . 'project_users';\n \n $rows = DB::execute(\"SELECT user_id, role_id, permissions FROM $project_users_table WHERE project_id = ?\", $this->object->getId());\n if($rows) {\n $target_project_id = DB::escape($to->getId());\n $to_insert = array();\n \n // Leader is probably already added to project so make sure that we \n // skip users that are already involved with this project\n $already_added_user_ids = DB::executeFirstColumn(\"SELECT user_id FROM $project_users_table WHERE project_id = $target_project_id\");\n \n foreach($rows as $row) {\n if($already_added_user_ids && in_array($row['user_id'], $already_added_user_ids)) {\n continue;\n } // if\n \n $to_insert[] = DB::prepare(\"(?, $target_project_id, ?, ?)\", $row['user_id'], $row['role_id'], $row['permissions']);\n } // foreach\n \n if(count($to_insert)) {\n DB::execute(\"INSERT INTO $project_users_table (user_id, project_id, role_id, permissions) VALUES \" . implode(', ', $to_insert));\n AngieApplication::cache()->removeByModel('users');\n } // if\n } // if\n \n DB::commit('Users cloned to project @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to clone users to project @ ' . __CLASS__);\n throw $e;\n } // try\n }", "public function getProjectOwner() {\n return $this->belongsTo('App\\Models\\User');\n }", "public function project()\n {\n return $this->belongsTo('App\\project');\n }", "public function getProjectWithUsers($projectID)\n {\n }", "public function project(){\n return $this->belongsTo(\"App\\model\\project\");\n }", "function getProjectUserInstance($project) {\n $project_id = $project->getId();\n if(!array_key_exists($project_id, $this->project_users)) {\n $this->project_users[$project->getId()] = ProjectUsers::findById(array(\n \t 'user_id' => $this->getId(),\n \t 'project_id' => $project->getId(),\n \t));\n } // if\n return $this->project_users[$project->getId()];\n }", "public function projects() {\n return $this->hasMany(Project::class);\n }", "public function project(){\n return $this->belongsTo('App\\Models\\Projects\\Project');\n }", "public function projects()\n {\n return $this->hasMany(Project::class);\n }", "public function projects()\n {\n return $this->hasMany(Project::class);\n }", "public function projects()\n {\n return $this->hasMany(Project::class);\n }", "public function projects()\n {\n return $this->hasMany(Project::class);\n }", "public function project()\n {\n \treturn $this->belongsTo(Project::class);\n }", "public function testProjectWithUser()\n {\n $user = factory(User::class)->create();\n \n $response = $this->actingAs($user)->get('/projects');\n $response->assertStatus(200);\n }", "public function projects()\n {\n return $this->hasMany('App\\Models\\Projects\\Project');\n }", "function project () {\n return $this->belongsTo('App\\Project');\n }", "public function project()\n\t{\n\t\treturn $this->belongsTo(Project::class);\n\t}", "public function project_lead()\n {\n return $this->belongsTo(User::class, 'project_lead_id');\n }", "public function projects(): HasMany\n {\n return $this->hasMany('App\\Models\\Project');\n }", "public function project()\n\t{\n\t\treturn $this->belongsTo('App\\Project');\n\t}", "public function projects() {\n return $this->belongsToMany('App\\Project');\n }", "public function project()\n {\n return $this->belongsTo('App\\Models\\Project');\n }", "public function project()\n {\n return $this->belongsTo('App\\Project');\n }", "public function project()\n {\n return $this->belongsTo('App\\project');\n }", "public function project(): BelongsTo\n {\n return $this->belongsTo(Project::class, $this->project);\n }", "public function getProjects()\n {\n return $this->hasMany(Project::className(), ['customer_id' => 'id']);\n }", "public function projects()\n {\n return $this->hasMany('DragonLancers\\Project');\n }", "public function project()\n {\n return $this->hasOne('App\\Project');\n }", "public function projects()\n {\n return $this->belongsTo(Projects::class);\n }", "function delete_project( $user, $project )\n {\n //Unimplemented\n }", "public function __construct($user , $projects)\n {\n //\n $this->projects = $projects;\n $this->user = $user;\n }", "public function getProject() {\n return $this->hasOne(Projects::className(), ['id' => 'project_id']);\n }", "public function project()\n {\n return $this->belongsTo('App\\Project');\n }", "public function project()\n {\n return $this->belongsTo(Project::class);\n }", "public function project()\n {\n return $this->belongsTo(Project::class);\n }", "public function project()\n {\n return $this->belongsTo(Project::class);\n }", "public function project()\n {\n return $this->belongsTo(Project::class);\n }", "public function creator(User $user, Project $project): bool\n {\n return $project->creator->id === $user->id;\n }", "public function getProject()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }", "public function getProject()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }", "public function clientProjects()\n {\n return $this->hasMany(Project::class, 'project_client_id', 'id');\n }", "public function getProject()\n { \n return $this->hasOne('App\\Project', 'id', 'resourse');\n }", "public function add($project_id = '', $user_id = '') {\n\n $list = [];\n\n //validation\n if (!is_numeric($project_id)) {\n return $list;\n }\n\n //add only to the specified user\n if (is_numeric($user_id)) {\n $assigned = new $this->assigned;\n $assigned->projectsassigned_projectid = $project_id;\n $assigned->projectsassigned_userid = $user_id;\n $assigned->save();\n $list[] = $user_id;\n //return array of users\n return $list;\n }\n\n //add each user in the post request\n if (request()->filled('assigned')) {\n foreach (request('assigned') as $user) {\n $assigned = new $this->assigned;\n $assigned->projectsassigned_projectid = $project_id;\n $assigned->projectsassigned_userid = $user;\n $assigned->save();\n $list[] = $user;\n }\n //return array of users\n return $list;\n }\n //return array of users\n return $list;\n }", "public function getProjects()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }", "public function project() {\n return $this->belongsTo('App\\Models\\Project', 'payment_projectid', 'project_id');\n }", "public function projects()\n {\n //return $this->belongsToMany('App\\Project','assignment', 'projectID','taskID');\n return $this->belongsToMany('App\\Project')->using('App\\Assignment');\n }", "function canRemoveFromProject($user, $project) {\n if($user->isProjectLeader($project)) {\n return false;\n } // if\n\n return $this->isProjectLeader($project) || $this->isPeopleManager() || $this->isAdministrator();\n }", "public function projects()\n {\n return $this->belongsToMany('App\\Project')\n ->withTimestamps();\n }", "public function actionMyProjects() {\n if (Yii::app()->user->checkAccess('volunteer') && isset(Yii::app()->user->id)) {\n\n $dataProvider = new DataProvider('Project', array(\n 'criteria' => array(\n 'condition' => 'user_fk=' . Yii::app()->user->id,\n 'order' => 'status',\n ),\n ));\n\n // Check to see if they're connected and approved to any partners; if not,\n // tell them they need to wait to create a project\n if (!Involved::model()->count('user_fk=' . Yii::app()->user->id . ' AND pending=0')) {\n Yii::app()->user->setFlash('needPartner', 'You cannot create a project until you have applied to and been\n approved by at least one community partner. '.CHtml::link('See Partners &raquo;',array('involved/myPartners')));\n }\n\n $this->render('myProjects', array('dataProvider' => $dataProvider));\n }\n }", "public function actionAssignUserToClient()\n {\n if (isset($_GET['clientID']) && isset($_GET['userID']) && isset($_GET['projectID'])) {\n $clientID = intval($_GET['clientID']);\n $projectID = intval($_GET['projectID']);\n $userID = intval($_GET['userID']);\n\n //check input data\n if ($clientID <= 0 || $userID <= 0 || $projectID <= 0) {\n $this->redirect('/admin?tab=us_cl_assign');\n die;\n }\n\n $userToAdd = Users::model()->with('person')->findByPk($userID);\n\n // check user to project row\n $userToProject = UsersProjectList::model()->findByAttributes(array(\n 'User_ID' => $userID,\n 'Client_ID' => $clientID,\n 'Project_ID' => $projectID,\n ));\n\n if ($userToProject) {\n Yii::app()->user->setFlash('success', \"User is already assigned to selected project!\");\n $this->redirect('/admin?tab=us_cl_assign');\n die;\n }\n\n // check user to client row\n $userToClient = UsersClientList::model()->findByAttributes(array(\n 'User_ID' => $userID,\n 'Client_ID' => $clientID,\n ));\n\n if (!$userToClient) {\n // add user-client relationship\n $usersClientList = new UsersClientList;\n $usersClientList->User_ID = $userID;\n $usersClientList->Client_ID = $clientID;\n if (in_array($userToAdd->User_Type, UsersClientList::$clientAdmins)) {\n $usersClientList->User_Type = UsersClientList::CLIENT_ADMIN;\n $usersClientList->User_Approval_Value = Aps::APPROVED;\n } else {\n $usersClientList->User_Type = UsersClientList::USER;\n $usersClientList->User_Approval_Value = Aps::NOT_READY_FOR_APPROVAL;\n }\n $usersClientList->save();\n }\n\n // add user-project relationship\n $usersProjectList = new UsersProjectList;\n $usersProjectList->User_ID = $userID;\n $usersProjectList->Client_ID = $clientID;\n $usersProjectList->Project_ID = $projectID;\n $usersProjectList->save();\n\n $userToAdd->Active = Users::ACTIVE;\n if ($userToAdd->Default_Project == 0) {\n $userToAdd->Default_Project = $projectID;\n }\n\n $client = Clients::model()->with('company')->findByPk($clientID);\n if ($userToAdd->User_Pwd == md5('temp100')) {\n $password = Helper::generatePassword();\n $userToAdd->User_Pwd = md5($password);\n Mail::sendUserRegistrationMail($userToAdd->person->Email, $userToAdd->User_Login, $password, $userToAdd->person->First_Name, $userToAdd->person->Last_Name, $client->company->Company_Name);\n } else {\n Mail::sendAddUserToClientMail($userToAdd->person->Email, $userToAdd->person->First_Name, $userToAdd->person->Last_Name, $client->company->Company_Name);\n }\n\n $userToAdd->save();\n\n $usersToApprove = UsersToApprove::model()->findByAttributes(array(\n 'User_ID'=>$userID,\n 'Client_ID'=>$clientID,\n ));\n\n if ($usersToApprove) {\n $usersToApprove->delete();\n }\n\n $usersToApprove = UsersToApprove::model()->findAllByAttributes(array(\n 'User_ID'=>$userID,\n ));\n\n if (count($usersToApprove) > 0) {\n foreach($usersToApprove as $userToApprove) {\n if ($userToApprove->Approved_By_Admin == UsersToApprove::NOT_APPR_BY_ADMIN) {\n $userToApprove->Approved_By_Admin = UsersToApprove::APPR_BY_ADMIN;\n $userToApprove->save();\n }\n }\n }\n\n Yii::app()->user->setFlash('success', \"User has been successfully added to project's list!\");\n } else {\n Yii::app()->user->setFlash('success', \"User was not added to project's list! Try again.\");\n }\n $this->redirect('/admin?tab=us_cl_assign');\n }", "public function adduser(Request $request){\n\n //take a project, add a user to it\n $project = Project::find($request->input('project_id'));\n if(Auth::user()->id == $project->user_id || Auth::user()->role_id == 1 ){\n\n $user = User::where('email', $request->input('email'))->first(); //single record\n\n //check if user is already added to the project\n $projectUser = ProjectUser::where('user_id',$user->id)\n ->where('project_id',$project->id)\n ->first();\n\n if($projectUser){\n //if user already exists, exit\n\n return response()->json(['success' , $request->input('email').' is already a member of this project']);\n\n }\n\n\n if($user && $project){\n\n $project->users()->attach($user->id);\n\n return response()->json(['success' , $request->input('email').' was added to the project successfully']);\n\n }\n\n }\n\n return redirect()->route('clients.projects.show', ['project'=> $project->id])\n ->with('errors' , 'Error adding user to project');\n\n\n\n }", "public function members()\n\t\t{\n\t\t\t\treturn $this->belongsToMany( User::class ,'project_members' );\n\t\t}", "public function projects()\n {\n return $this->belongsToMany('App\\Project')->withPivot('role', 'title');\n }", "public function ownsProject(Project $project)\n {\n return $this->id === $project->user_id;\n }", "public function show(Project $project)\n {\n foreach($project->users as $user){\n echo $user->name.\"<br>\";\n }\n }", "public function create($id_user,$id_project)\n {\n $project = Project::findorFail($id_project);\n if(Auth::id()==$id_user&& Auth::id()== $project->id_user){\n $data['id_project'] = $id_project; \n \n return view('project.experience.create',compact('data'));\n \n }else{\n Auth::logout();\n return view('home');\n }\n \n }", "protected function createProjects()\n {\n $project = new Project($this->p4);\n $project->set(\n array(\n 'id' => 'project1',\n 'name' => 'pro-jo',\n 'description' => 'what what!',\n 'members' => array('jdoe'),\n 'branches' => array(\n array(\n 'id' => 'main',\n 'name' => 'Main',\n 'paths' => '//depot/main/...',\n 'moderators' => array('bob')\n )\n )\n )\n );\n $project->save();\n\n $project = new Project($this->p4);\n $project->set(\n array(\n 'id' => 'project2',\n 'name' => 'pro-tastic',\n 'description' => 'ho! ... hey!',\n 'members' => array('lumineer'),\n 'branches' => array(\n array(\n 'id' => 'dev',\n 'name' => 'Dev',\n 'paths' => '//depot/dev/...'\n )\n )\n )\n );\n $project->save();\n }", "public function addProject($projectId)\n {\n //$projectModel = new ProjectModel($projectId);\n $this->projects->_addRef($projectId);\n //$projectModel->users->_addRef($this->id);\n }", "public function userProjects()\n {\n // Finding project for the user\n $projectsInvolved = ProjectMember::where('user_id', auth()->user()->id)->select('project_id')->get(); \n // Array to hold the project IDs\n $projectIDs = [];\n // Looping and storing priject Id's \n foreach ($projectsInvolved as $project) { \n array_push($projectIDs, $project->project_id);\n }\n return $projectIDs;\n }", "public function delete(User $user, Project $project)\n {\n //\n }", "public function getUserProjects($id)\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('ur.id');\n $qb->from('Vlreleases\\UserBundle\\Entity\\User', 'u');\n $qb->innerJoin('u.projects', 'ur');\n $qb->where(\"u.id='$id'\");\n $result = $qb->getQuery()->getResult(); \n if($result)\n {\n for ($i = '0'; $i < sizeof($result); $i++)\n {\n $id = $result[$i]['id'];\n $qb1 = $em->createQueryBuilder();\n $qb1->select('u.name');\n $qb1->from('Vlreleases\\UserBundle\\Entity\\Project', 'u');\n $qb1->where(\"u.id='$id'\");\n $finalResult[$i] = $qb1->getQuery()->getResult();\n }\n return $finalResult;\n } \n else{\n return $result;\n }\n \n }", "public function delete(User $user, Project $project)\n {\n return $user->id == $project->created_by;\n }", "public function projects()\n {\n return $this\n ->belongsToMany(Project::class, 'project_skills', 'project_id', 'skill_id');\n }", "function _add_user()\n {\n if (!$this->has_arg('PROJECTID'))\n $this->_error('No project id specified');\n if (!$this->has_arg('PERSONID'))\n $this->_error('No user specified');\n\n $proj = $this->db->pq(\"SELECT p.projectid FROM project p WHERE p.personid LIKE :1 AND p.projectid=:2\", array($this->user->personId, $this->arg('PROJECTID')));\n\n if (!sizeof($proj))\n $this->_error('No such project');\n $proj = $proj[0];\n\n $person = $this->db->pq(\"SELECT CONCAT(CONCAT(givenname, ' '), familyname) as fullname FROM person WHERE personid=:1\", array($this->arg('PERSONID')));\n if (!sizeof($person))\n $this->_error('No such person');\n $person = $person[0];\n\n $this->db->pq(\"INSERT INTO project_has_person (projectid, personid) VALUES (:1, :2)\", array($this->arg('PROJECTID'), $this->arg('PERSONID')));\n\n $this->_output(array('FULLNAME' => $person['FULLNAME']));\n }", "public function create() {\n\n //save new user\n $project = new $this->projects;\n\n //data\n $project->project_title = request('project_title');\n $project->project_clientid = request('project_clientid');\n $project->project_creatorid = auth()->id();\n $project->project_description = request('project_description');\n $project->project_categoryid = request('project_categoryid');\n $project->project_date_start = request('project_date_start');\n $project->project_date_due = request('project_date_due');\n\n if (auth()->user()->role->role_projects_billing == 2) {\n $project->project_billing_type = (in_array(request('project_billing_type'), ['hourly', 'fixed'])) ? request('project_billing_type') : 'hourly';\n $project->project_billing_rate = (is_numeric(request('project_billing_rate'))) ? request('project_billing_rate') : 0;\n $project->project_billing_estimated_hours = (is_numeric(request('project_billing_estimated_hours'))) ? request('project_billing_estimated_hours') : 0;\n $project->project_billing_costs_estimate = (is_numeric(request('project_billing_costs_estimate'))) ? request('project_billing_costs_estimate') : 0;\n }\n\n //progress manually\n $project->project_progress_manually = (request('project_progress_manually') == 'on') ? 'yes' : 'no';\n if (request('project_progress_manually') == 'on') {\n $project->project_progress = request('project_progress');\n }\n\n //default project status\n $project->project_date_start = request('project_date_start');\n\n //project permissions (make sure same in 'update method')\n $project->clientperm_tasks_view = (request('clientperm_tasks_view') == 'on') ? 'yes' : 'no';\n $project->clientperm_tasks_collaborate = (request('clientperm_tasks_collaborate') == 'on') ? 'yes' : 'no';\n $project->clientperm_tasks_create = (request('clientperm_tasks_create') == 'on') ? 'yes' : 'no';\n $project->clientperm_timesheets_view = (request('clientperm_timesheets_view') == 'on') ? 'yes' : 'no';\n $project->assignedperm_tasks_collaborate = (request('assignedperm_tasks_collaborate') == 'on') ? 'yes' : 'no';\n\n //apply custom fields data\n $this->applyCustomFields($project);\n\n //save and return id\n if ($project->save()) {\n return $project->project_id;\n } else {\n Log::error(\"record could not be created - database error\", ['process' => '[ProjectRepository]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n return false;\n }\n }", "public function updateProjectUser($project_id)\n {\n $project = $this->project->findWithIntergreatedId($project_id);\n $client = new Client();\n $response = $client->get($this->url['project_user_mtool'] . $project_id .'?access_token='.$this->_access_token);\n $result = json_decode((string) $response->getBody(), true);\n\n if(count($result) > 0)\n {\n for($i = 0; $i < count($result); $i++)\n {\n $data = [\n 'username' => $result[$i]['first_name'],\n 'fullname' => $result[$i]['first_name'] .' '. $result[$i]['last_name'],\n 'password' => bcrypt('12345678'), // default\n 'email' => null,\n 'id_resource' => $this->resource['mtool'], // 0:LDap, 1:ARMS System, 2: Mtool\n 'intergreated_user_id' => $result[$i]['id']\n ];\n // check email => get username\n if($result[$i]['email'] != null)\n {\n $arr = explode(\"@\",$result[$i]['email']);\n $data['email'] = $result[$i]['email'];\n $data['username'] = $arr[0];\n }\n // check unique username \n $checkUniqueUsename = $this->user->checkUniqueCreate('username', $data['username']); // 1: exists ->update intergreated_user_id; 0: not exists-> create new\n if($checkUniqueUsename == 0){\n // process insert users table then insert projects_user table\n $id_inserted = $this->user->insertGetId($data);\n $dataProjectMember = [\n 'project_id' => $project->id,\n 'user_id' => $id_inserted,\n 'work_time' => $result[$i]['actual_hour'],\n 'working_date' => $result[$i]['spent_at'],\n 'mtool_entry_id' => $result[$i]['entry_id']\n ];\n $checkAssigned = $this->assignProject->checkExist($project->id, $id_inserted);\n if($checkAssigned == 0){// assign new\n $this->assignProject->insert($project->id, $id_inserted);\n }\n $this->projectmember->create($dataProjectMember);\n }\n if($checkUniqueUsename == 1)\n {\n // process get id_user then check record in project_user\n $user = $this->user->findByField('username', $data['username']);\n if($user)\n {\n $user_id = $user->id;\n $this->user->update($user_id, ['intergreated_user_id' => $data['intergreated_user_id']]);\n $check = $this->projectmember->checkExitWithMtoolEntryId($result[$i]['entry_id']);\n $dataProjectMember = [\n 'project_id' => $project->id,\n 'user_id' => $user_id,\n 'work_time' => $result[$i]['actual_hour'],\n 'working_date' => $result[$i]['spent_at'],\n 'mtool_entry_id' => $result[$i]['entry_id']\n ];\n // assign member for project\n $checkAssigned = $this->assignProject->checkExist($project->id, $user_id);\n if($checkAssigned == 0){// assign new\n $this->assignProject->insert($project->id, $user_id);\n } \n // input worktime for user\n if($check > 0) // update\n {\n $this->projectmember->updateSynch($result[$i]['entry_id'], [\n 'work_time' => $result[$i]['actual_hour'], \n 'working_date' => $result[$i]['spent_at']\n ]);\n }\n else // create\n {\n $this->projectmember->create($dataProjectMember);\n }\n }\n }\n }\n }\n }", "public function getProjectByUserType($loggedUser) { \n $q = Doctrine_Query::create()->from('Project')\n ->where('userId = ?', $loggedUser);\n \n return $q->execute(); \n }", "public function getProjectUsers()\n {\n $project_users = array();\n $users = $this->users()->whereNull('deleted_at')->get();\n $user_ids = array();\n if(!empty($users))\n {\n foreach ($users as $user)\n {\n // using this is faster than in_array\n if(!isset($user_ids[$user->user_id]))\n {\n $current_user = User::find($user->user_id);\n if(!empty($current_user))\n {\n $current_user->project_id = $this->id;\n $current_user->permission_id =$user->permission_id;\n $project_users[] = $current_user;\n }\n $user_ids[$user->user_id] = 0;\n }\n }\n }\n\n return $project_users;\n }", "public function getProjectsByUserId($userId) {\n\t\t$db = $this->connection();\n\t\t$sql = 'SELECT projects.projectId, projects.name, projects.description ';\n\t\t$sql .= 'FROM users INNER JOIN userProjects ';\n\t\t$sql .= 'ON users.userId = userProjects.userId INNER JOIN projects ';\n\t\t$sql .= 'ON userProjects.projectId = projects.projectId ';\n\t\t$sql .= 'WHERE users.userId = :userId';\n\t\t$params = array(':userId' => $userId);\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute($params);\n\t\t$projects = $query->fetchAll();\n\n\t\tif ($projects === null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ($projects as $project) {\n\t\t\t$this->projects[$project['projectId']] = new Project($project);\n\t\t}\n\n\t\treturn $this->projects;\n\t}", "public function getProject()\n {\n return $this->hasOne(Project::class, ['id' => 'project_id']);\n }", "public function FindAllByUserID($user_id=0)\n {\n global $wpdb;\n \n $projects_arr = array();\n \n $query = \"SELECT * FROM \".$this->_table_name.\" WHERE user_id = '%s' ORDER BY name\";\n $query = $wpdb->prepare($query, $user_id);\n \n $user_projects = $wpdb->get_results($query);\n \n if(count($user_projects) > 0)\n {\n foreach($user_projects as $proj)\n {\n $project = new self;\n // Assign the retrieved attributes into the new project object\n foreach($this::$attributes as $attribute)\n {\n $project->$attribute = $proj->$attribute;\n }\n // Put the new project object into the array\n $projects_arr[$project->id] = $project;\n }\n }\n return $projects_arr;\n }", "public function a_user_can_create_a_project()\n {\n\n $this->withoutExceptionHandling();\n \n //Given\n $this->actingAs(factory('App\\User')->create());\n \n //When\n $this->post('/projects', [\n 'title' => 'ProjectTitle',\n 'description' => 'Description here',\n ]);\n \n \n //Then\n $this->assertDatabaseHas('projects', [\n 'title' => 'ProjectTitle',\n 'description' => 'Description here',\n ]);\n }", "public function create(User $user)\n {\n return (new Authorization($user))->userHasPermissionTo('create', 'project');\n }", "public function adduser(Request $request)\n {\n $project = Project::find($request->input('project_id'));\n\n if(Auth::user()->id == $project->user_id){\n $user = User::where('email',$request->input('email'))->first();\n\n //check if user and project already exit\n $projectUser = ProjectUser::where('user_id', $user->id)\n ->where('project_id', $project->id)\n ->first();\n if($projectUser){\n return redirect()->route('projects.show',['project'=>$project->id])\n ->with('success', $request->input('email').' is already a member of this project');\n } \n \n if($user && $project){\n $project->users()->attach($user->id);\n return redirect()->route('projects.show',['project'=>$project->id])\n ->with('success', $request->input('email').' was added to the project successfully');\n }\n }\n return redirect()->route('projects.show',['project'=>$project->id])\n ->with('errors', $request->input('email').' Error adding to the project');\n }", "function canChangeProjectPermissions($user, $project) {\n if($user->isProjectLeader($project) || $user->isProjectManager() || $user->isAdministrator()) {\n return false;\n } // if\n\n return $this->isProjectLeader($project) || $this->isPeopleManager() || $this->isAdministrator();\n }", "public function adduser(Request $request){\n \n $this->validate($request,[\n \"email\"=>\"required\",\n ]);\n //find a project and attach a user to it\n $project=Project::find($request->input(\"project_id\"));\n if (Auth::user()->id == $project->user_id) {\n $user =User::where(\"email\",$request->input(\"email\"))->first();\n // //if the email does not exist\n // if ($user == null) {\n // return redirect()->route(\"projects.show\",[\"project\"=>$project->id])\n // ->with(\"errors\",\"The user with email\".$request->input(\"email\").\" does not exist\");\n // }\n\n $projectUser = ProjectUser::where(\"user_id\",$user->id)\n ->where(\"project_id\",$project->id)\n ->first();\n if ($projectUser) {\n return redirect()->route(\"projects.show\",[\"project\"=>$project->id])\n ->with(\"success\",$request->input(\"email\").\" already a member of this project\");\n }\n\n if ($user && $project) {\n $project->users()->attach($user->id);\n return redirect()->route(\"projects.show\",[\"project\"=>$project->id])\n ->with(\"success\",$request->input(\"email\").\" Added Successfully\");\n }\n }\n return redirect()->route(\"projects.show\",[\"project\"=>$project->id])\n ->with(\"errors\",\"Fail to add user to the project\");\n\n\n\n \n }", "public function getProject($id)\n {\n $project = Project::findOrFail($id);\n if($project->user_id == 0){\n $project->created_by = 'System';\n }else{\n $project->created_by = User::findOrFail($project->user_id)->value('name');\n }\n return view('project')->with('project', $project);\n }", "function check_project_access($projectId){\n\n global $connection;\n global $errors;\n global $data;\n\n //Get user id\n $userId = $_SESSION['$userId'];\n\n //Query that check if user has access to selected project\n $query = \"SELECT p.id AS id, p.name AS name FROM project_table p\n INNER JOIN user_project_table up ON up.project_id = p.id\n WHERE p.id = '$projectId' AND up.user_id = '$userId'\";\n \n //Execute query\n $result = mysqli_query($connection, $query);\n\n //Check result\n if($result){\n $row = mysqli_fetch_assoc($result);\n\n //Check if row is empty or not\n if(empty($row)){\n $errors['project'] = 'Please select project that is associated with you!';\n }\n else{\n $data['project'] = $row['name'] . ' - ' . $row['id'];\n }\n }\n else{\n $errors['sql'] = mysqli_error($connection);\n }\n}", "public function addproject() {\n\t\t\t\n\t\t\t\n\t\t}", "public static function userCanAccessProject(User $user, Project $project): bool\n {\n if ($user->is_admin) {\n return true;\n }\n\n if (self::userIsProjectMember($user, $project)) {\n return true;\n }\n\n return self::userIsProjectAdmin($user, $project);\n }", "private function add_project()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$projects = $serviceManager->get('PM/Model/Projects');\n \t$result = $projects->getProjectById($this->pk);\t\n \t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('company_id' => FALSE, 'project_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['name'], TRUE);\n \t}\n }", "function setProjeto($project)\n\t{\n\n\t\ttry {\n\t\t\t//monto a query\n\t\t\t$sql = \"INSERT INTO projetos (\t\t\n id,\n nome,\n depto_id,\n user_resp) \n VALUES (\n :id,\n :nome,\n :depto,\n :user_resp)\";\n\n\t\t\t//pego uma ref da conexão\n\t\t\t$instance = DatabaseConnection::getInstance();\n\t\t\t$conn = $instance->getConnection();\n\t\t\t//Utilizando Prepared Statements\n\t\t\t$statement = $conn->prepare($sql);\n\n\t\t\t$statement->bindValue(\":id\", $project->getId());\n\t\t\t$statement->bindValue(\":nome\", $project->getNome());\n\t\t\t$statement->bindValue(\":depto\", $project->getDepto());\n\t\t\t$statement->bindValue(\":user_resp\", $project->getResponsavel());\n\t\t\treturn $statement->execute();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Erro ao inserir na base de dados.\" . $e->getMessage();\n\t\t}\n\t}", "public function store(ProjectRequest $request)\n {\n //find the current logged in user\n //add record (user_id & project_id) in project_user pivot table\n\n $this->authorize('create', Project::class);\n\n $user = User::findOrFail(auth()->id());\n return $user\n ->projects()\n ->sync(Project::create($request->all())->id, false);\n }", "public function view(User $user, Project $project)\n {\n //Consultamos si ese contacto pertenece a un proyecto en especifico\n $members = $this->memberRepo->get_user_has_project($user->id, $project->id);\n if(empty($members)){\n return False;\n }\n return True;\n }", "public function delete(User $user, Project $project): bool\n {\n return $this->creator($user, $project);\n }", "public function show(Project $project)\n {\n //\n $user_role = \"Colaborador\";\n $user_auth = \\Auth::user();\n\n foreach($project->users as $user){\n if($user->id == $user_auth->id){\n $user_role = $user->pivot->user_role;\n }\n }\n\n return view('project.show', compact('project','user_role'));\n }", "public function view(User $user, Project $project): bool\n {\n return $project->members->contains($user);\n }", "public function getProjects()\n {\n return $this->hasMany(Project::class, ['type_id' => 'id']);\n }", "function getProjectUsers($db, $user_id, $project_id) {\n $query = \"SELECT DISTINCT u.user_id, u.username, u.first_name, u.last_name \".\n \"FROM Users u INNER JOIN Users_Projects up ON u.user_id = up.user_id \".\n \"WHERE up.proj_id = ? AND (\".\n \"EXISTS (SELECT * FROM Users WHERE user_id = $user_id AND admin = 1) \".\n \"OR up.proj_id IN (SELECT proj_id FROM Users_Projects WHERE user_id = $user_id)\".\n \") ORDER BY u.username\";\n $stmt = prepareQuery($db, $query);\n bindParam($stmt, \"i\", $project_id);\n executeStatement($stmt);\n $results = $stmt->get_result();\n $users = array();\n while ($row = $results->fetch_assoc()) {\n $users[] = $row;\n }\n return $users;\n}" ]
[ "0.70675355", "0.68541604", "0.67971194", "0.6730031", "0.6712118", "0.66935295", "0.66313136", "0.6551135", "0.65028954", "0.6488359", "0.6477355", "0.64708185", "0.6410876", "0.6405436", "0.6388012", "0.6382657", "0.6371067", "0.6364542", "0.63595426", "0.6338766", "0.6338031", "0.6338031", "0.6338031", "0.6338031", "0.63348436", "0.63337785", "0.6329887", "0.6325201", "0.63230556", "0.63183093", "0.63128906", "0.63101876", "0.6305126", "0.6272974", "0.6265002", "0.6255127", "0.6244351", "0.62436604", "0.62389976", "0.6237417", "0.6232319", "0.62319833", "0.62297744", "0.6228286", "0.6205532", "0.6204874", "0.6204874", "0.6204874", "0.6204874", "0.6199105", "0.61865103", "0.61865103", "0.617216", "0.61716694", "0.614647", "0.6143627", "0.61344033", "0.6116152", "0.60765797", "0.60584337", "0.60550445", "0.60520613", "0.6049365", "0.60400957", "0.60384", "0.60297483", "0.60177064", "0.59790415", "0.59592086", "0.59319144", "0.59174097", "0.59139466", "0.5900092", "0.5898738", "0.5888412", "0.5885767", "0.58815557", "0.5877981", "0.5877081", "0.58738065", "0.5825316", "0.5824464", "0.58244324", "0.57892233", "0.5782312", "0.57797337", "0.57749414", "0.57611567", "0.576012", "0.5758788", "0.5735236", "0.57285", "0.57255757", "0.5717517", "0.5705179", "0.5687805", "0.5687493", "0.5685087", "0.56850535", "0.5684989", "0.5679776" ]
0.0
-1
Return the list of Users related to Object
public function users() { return $this->belongsToMany("App\User"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public function users()\n {\n return $this->morphToMany('App\\User', 'userOwnable', 'HoldMyBeer_UserOwnable', 'userOwnableId', 'userId');\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function getUsers()\r\n {\r\n return $this->hasMany(User::className(), ['id' => 'user_id'])\r\n ->via('glu');\r\n }", "public static function getUsers(){\n return self::find()->all();\n }", "function listUsers() {\n return $this->users;\n }", "public function getUsersList()\n {\n }", "public function getUsers()\n {\n return $this->getRelation('users');\n }", "public function findUsers();", "public function findUsers();", "public function getUsers() {\n return $this->getRelation(\"users\");\n }", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "public function getUserList() {\n return $this->users;\n }", "public function users() {\n\t\treturn $this -> belongsToMany('User');\n\t}", "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function users(){\n\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = company_id, localKey = id)\n\t\treturn $this->hasMany(User::class);\n\t}", "public function users() {\n\t\treturn $this->hasMany('App\\Library\\Models\\User');\n\t}", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public function getAllUser(){\n return $this->users;\n }", "public function getUsers()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->viaTable('join_user_collector', ['collector_id' => 'id']);\n }", "public function users()\n {\n return $this->morphedByMany(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.user', \\App\\Models\\User::class), 'skillable');\n }", "public function get_users()\r\n\t\t{\r\n\t\t\t$retArr = array();\r\n\r\n\t\t\tif(is_array($this->obj))\r\n\t\t\t{\r\n\t\t\t\treturn $this->obj;\r\n\t\t\t}\r\n\t\t}", "public function users()\n\t\t{\n\t\t\treturn $this->belongsToMany(User::class, 'id_user');\n\t\t}", "public function getList() {\n //Retourne la liste de tous les users\n $users = [];\n $requsers = $this->db->query('SELECT * FROM user');\n\n while ($data = $requsers->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new user($data);\n }\n\n return $users;\n }", "public function users()\n {\n return $this->hasMany('App\\User')->get();\n }", "public function getUsersListAttribute()\n {\n return User::orderBy('name')->get();\n }", "public function getRelatedUsers()\n {\n $relatedUsers = \\DB::table(config('permissionsHandler.tables.role_user'))\n ->select('role_id', 'model_id', 'model_type')\n ->where('role_id', $this->id)\n ->get();\n\n $users = collect();\n foreach ($relatedUsers as $user) {\n $users->push(($user->model_type)::find($user->model_id));\n }\n\n return $users;\n }", "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "function getUsers(){\n $this->users = array();\n foreach($this->userIds as $userId){\n array_push($this->users, new user($userId));\n }\n }", "public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }", "protected function users() {\n return $this->hasMany('Reportr\\Entities\\User');\n }", "public function getUser()\n {\n return $this->hasMany(User::className(), ['user_id' => 'id']);\n }", "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function users()\n {\n return $this->morphMany(User::class, 'userable');\n }", "public function getItems() {\n\t\treturn User::all();\n\t}", "public function users() {\n return $this -> belongsToMany(Author::class);\n }", "public function users()\n\t{\n\t\treturn $this->belongsToMany(Config::get('auth.model'))->withTimestamps();\n\t}", "public function users(){\n\t\treturn $this->belongsTo('\\\\bundles\\\\lincko\\\\api\\\\models\\\\data\\\\Users', 'parent_id');\n\t}", "public function users()\n {\n return $this->belongsToMany($this->getAppNamespace() . 'User');\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'social_users', 'social_login_id', 'user_id')->using(SocialUser::class);\n }", "public function users()\n {\n return $this->belongsToMany(Config::get('guardian.user'), Config::get('guardian.role_user_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.user_foreign_key'));\n }", "public function getUsers()\n {\n $em = $this->container->get('doctrine')->getEntityManager();\n $builder = $em->getRepository('AppWebBundle:User')->createQueryBuilder('u');\n \n return $builder->getQuery()->getResult();\n }", "public function users()\n\t{\n\t return $this->belongsToMany('User');\n\t}", "public function users() {\n\t\treturn $this->belongsTo('App\\Models\\User', 'user_id', 'id');\n\t}", "public function usersList()\n {\n return app(UsersList::class)($this);\n }", "public function users()\n {\n return $this->hasMany(User::class, 'user_id');\n }", "public static function getPersonsUsers(){\n return self::getPersonsByRole();\n }", "function getUsers(){\n }", "function getUsers(){\n }", "public function users()\n {\n return $this->morphedByMany(User::class, 'device_tokenable')->withTimestamps();\n }", "public function users()\n {\n return $this->hasMany(User::class, 'id', 'user_id');\n }", "public function users()\n {\n return $this->belongsToMany(Config::get('auth.providers.users.model'), Config::get('entrust-branch.role_user_table'),Config::get('entrust-branch.role_foreign_key'),Config::get('entrust-branch.user_foreign_key'));\n // return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust-branch.role_user_table'));\n }", "public function users()\n {\n return $this->hasMany(Users::class, 'id', 'user_id');\n }", "public function users()\n {\n \treturn $this->belongsToMany(User::class);\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getUsers(){\n\t\treturn $this->users;\n\t}", "public function users()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = static::$ci->classMapper;\n\n return $this->hasMany($classMapper->getClassMapping('user'), 'group_id');\n }", "public function users()\n {\n return $this->hasManyThrough(User::class, UserConfig::class);\n }", "public function getList(): Collection\n {\n return User::with(['match1', 'match2'])->get();\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function users()\n {\n return $this->hasMany(User::class);\n }", "public function user() \n\t{\n\t\treturn $this->belongsTo('User', 'object_id')->where('soft_deleted', 0);\n\t}", "public function getUsers()\n {\n return Security::getUserList();\n }", "function users(): array { return $this->users; }", "public function getUsers()\n {\n return $this->users;\n }", "public function users() {\n return $this->belongsToMany(\n config('auth.model') ? : config('auth.providers.users.model'), \n null,\n config('cani.collections.user_permissions_propertie') . '_id'\n );\n }", "public function users()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = static::$ci->classMapper;\n\n return $this->belongsToManyThrough(\n $classMapper->getClassMapping('user'),\n $classMapper->getClassMapping('role'),\n 'permission_roles',\n 'permission_id',\n 'role_id',\n 'role_users',\n 'role_id',\n 'user_id'\n );\n }", "public function users() {\n return $this->hasMany(User::class);\n }", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "public function users()\n {\n # Define a many-to-many relationship.\n return $this->belongsToMany('\\PeerReview\\User')->withTimestamps();\n }", "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "public function index()\n {\n return $this->user->all();\n }", "public function getUserList()\n {\n // Tell LazyJsonMapper to give us all of our internal data as an array.\n // NOTE: This creates a COPY of the array. It's not attached to the main\n // storage, which means that any changes we make to the new array aren't\n // going to affect the actual LazyJsonMapper object's own data. That\n // won't matter for pure getter-based objects like this one (which is\n // all you'll need in 99.9999999% of cases where you'll want to read\n // unpredictable data). So if the user serializes this LazyJsonMapper\n // object, or gets it \"asJson()\", etc, then they'd still be serializing\n // the original, untouched internal data, which is exactly what we are\n // retrieving here. So everything works out perfectly as long as we\n // don't have any setters! (But setters will be demonstrated later.)\n if ($this->_userList === null) {\n // Get a copy of the internal data as an array, and cache it.\n // NOTE: This only throws if there is unmappable data internally.\n $this->_userList = $this->asArray(); // Throws.\n }\n\n // Loop through the list of JSON properties and convert every \"array\"\n // value to a User object instead. That's because all of JSON's nested,\n // not-yet-converted \"JSON object values\" are associative sub-arrays.\n foreach ($this->_userList as &$value) {\n if (is_array($value)) {\n // NOTE: The User constructor can only throw if a custom _init()\n // fails or if its class property map can't be compiled.\n $value = new User($value); // Throws.\n }\n }\n\n // Now just return our key-value array. The inner array values have\n // been converted to User objects, which makes them easy to work with.\n return $this->_userList;\n }", "public function findUsers(): iterable;", "public function users()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.user'), config('bootstrap-menu.relations.permission_user'))->withTimestamps();\r\n }", "public function users()\n {\n return $this->belongsToMany(\n Config::get('auth.providers.users.model'),\n Config::get('auth.group_user_table'),\n Config::get('auth.group_foreign_key'),\n Config::get('auth.user_foreign_key')\n );\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users()\n {\n return $this->belongsToMany(User::class);\n }", "public function users(){\n\t\t//no usa el namespace\n return $this->hasMany('App\\User');\n }", "public function users() {\n return $this->belongsToMany('User');\n }", "public function users() {\n\t\treturn $this->belongsTo(User::class, 'user_id');\n\t}", "public function users()\n {\n return $this->hasMany('App\\Models\\User');\n }", "Public Function getAllUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "public function users()\n {\n return $this->belongsToMany(Authorization::userModel())->using(UserPivot::class);\n }", "public function findAll() {\n\t\t$sql = \"select u.* from t_user u order by txtUserRole, txtUserName\";\n\t\t$result = $this->getDb()->fetchAll($sql);\n\n\t\t// Convert query result to an array of domain objects\n\t\t$entities = array();\n\t\tforeach ($result as $row) {\n\t\t\t$id = $row['idUser'];\n\t\t\t$entities[$id] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $entities;\n\t}", "public function getUsers() {\n return $this->users;\n }", "public function users()\n {\n return $this->hasMany('App\\Models\\User', 'user_group_id');\n }", "public function users(){\n\t\treturn $this->belongsToMany('Alsaudi\\\\Eloquent\\\\UserRelation',\n\t\t\t'trip_user','trip_id','user_id');\n\t}", "public function users()\n {\n return $this->belongsToMany(config('auth.model'))->withTimestamps();\n }" ]
[ "0.70190173", "0.6994424", "0.6979404", "0.6979404", "0.6979404", "0.6775906", "0.6720836", "0.6704345", "0.6703602", "0.66644543", "0.66623133", "0.66623133", "0.6634026", "0.6587259", "0.65802366", "0.6564789", "0.65572155", "0.65420026", "0.6530026", "0.65281427", "0.65171206", "0.6514732", "0.6493568", "0.64934194", "0.64919996", "0.64913946", "0.6476604", "0.6474672", "0.6467107", "0.64634097", "0.6441987", "0.6435698", "0.6420505", "0.6418968", "0.6404678", "0.64021236", "0.63836706", "0.6379121", "0.6376384", "0.6373291", "0.63553494", "0.6347595", "0.6329224", "0.6310997", "0.63047034", "0.6299357", "0.6298361", "0.62945235", "0.62933856", "0.62845826", "0.6281113", "0.62796086", "0.6278692", "0.62774074", "0.6273202", "0.6273202", "0.6266788", "0.6266361", "0.62558484", "0.6252504", "0.625231", "0.624193", "0.6232443", "0.62171274", "0.6215576", "0.6213851", "0.61981356", "0.61981356", "0.61981356", "0.61981356", "0.61981356", "0.6197084", "0.61965805", "0.61915207", "0.61780673", "0.61775506", "0.6174285", "0.61715007", "0.6169104", "0.61651933", "0.6162459", "0.6160277", "0.6152756", "0.6143616", "0.61390454", "0.6136465", "0.613599", "0.613599", "0.613599", "0.613599", "0.6119394", "0.6115159", "0.6114928", "0.6112911", "0.611109", "0.6106244", "0.61059695", "0.6102831", "0.6102535", "0.61002004", "0.60995096" ]
0.0
-1
Return the list of Users related to Object referring to owner_id
public function workers() { return $this->belongsToMany("App\User") ->where("owner_id", Auth::id()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findByOwner($owner);", "public function owners()\n {\n return $this->belongsTo('Owner', 'owner_id');\n }", "public function owner(){\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }", "public function owners() {\n return $this->belongsToMany(User::class, 'business_owners', 'business_id');\n }", "public function owner(): BelongsTo\n\t{\n\t\treturn $this->belongsTo('App\\Models\\User', 'owner_id', 'id');\n\t}", "public function owner(): BelongsTo\n\t{\n\t\treturn $this->belongsTo('App\\Models\\User', 'owner_id', 'id');\n\t}", "public function users()\n {\n return $this->morphToMany('App\\User', 'userOwnable', 'HoldMyBeer_UserOwnable', 'userOwnableId', 'userId');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'id_owner');\n }", "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "public function owner(){\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo(User::class, 'owner_id');\n }", "public function owner(){\n\n\t\treturn $this->belongsTo('App\\User', 'user_id');\n\n\t}", "public function getOwner()\n {\n return $this->hasOne(User::className(), ['id' => 'owner_id']);\n }", "public function getOwner(){\n return $this->belongsTo('App\\User', 'id', 'owner');\n }", "public function findGivenUserRatings(Owner $owner): ?array\n {\n\n return $this->createQueryBuilder('r')\n ->join('r.booking', 'b')\n ->join('b.vehicle', 'v')\n ->join('v.advert', 'a')\n ->where('a.owner = :owner')\n ->andWhere('r.user = :user')\n ->orderBy('r.createdAt', 'DESC')\n ->setParameter('owner', $owner)\n ->setParameter('user', $owner->getUser())\n ->getQuery()\n ->getResult()\n ;\n\n }", "public function user()\n {\n return $this->belongsTo('App\\User', 'owner_id');\n }", "public function owners(){\n $users = User::with('potagers')\n ->owners()\n ->orderBy('updated_at', 'desc')\n ->paginate(100);\n\n return view('admin.users.owners', compact('users'));\n }", "public function owner() {\n return $this->belongsTo('App\\User', 'user_id');\n }", "public function owner() {\n return $this->belongsTo('App\\Models\\User');\n }", "public function owner()\n {\n return $this->belongsTo('App\\Models\\User', 'user_id');\n }", "protected function transformOwner(User $owner): array\n {\n return [\n 'id' => $owner['id'],\n 'name' => $owner['name'],\n 'username' => $owner['username'],\n ];\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo('PetWatcher\\Models\\User', 'owner');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "public function owner()\n\t{\n\t\treturn $this->belongsTo('User', 'user_id');\n\t}", "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "public static function getByOwnerTable($ownerTable) {\n return self::find()\n ->select(['id','name'])\n ->where(['owner_table' => $ownerTable])\n ->asArray()\n ->all();;\n }", "public function getOwnerFollows()\n {\n return $this->http->get('/users/%s/follows', 'self');\n }", "public function owner()\n {\n \treturn $this->belongsTo('App\\User', 'user');\n }", "public function owner() \n {\n return $this->belongsTo('User', 'user_id');\n }", "public function getOwnerFollowedBy()\n {\n return $this->http->get('/users/%s/followed-by', 'self');\n }", "public function owner()\n {\n return $this->belongsTo('App\\User');\n }", "public function owner()\n {\n return $this->belongsTo('App\\User');\n }", "public function owner () {\n\n return $this->belongsTo(\"App\\User\");\n }", "public function owner()\n {\n return $this->belongsTo(\\App\\User::class, 'user_id')->select('id', 'name', 'email');\n }", "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "public function owner()\n {\n return $this->belongsTo(Jetstream::userModel(), 'user_id');\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo(Hotstream::userModel(), 'user_id');\n }", "public function user(): BelongsTo\n {\n return $this->belongsTo(User::class, 'id_owner', 'id');\n }", "public function allUsers(): Collection\n {\n return $this->users->merge([$this->owner]);\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id'); //foreign-key is user_id\n }", "public function owner()\n\t{\n\t\treturn array('url' => Route::url('user.profile', array('id' => $this->owner['id'])), 'username' => $this->owner['username']);\n\t}", "public function owner()\n {\n return $this->belongsTo(Spark::userModel(), 'owner_id');\n }", "public function users(){\n\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = company_id, localKey = id)\n\t\treturn $this->hasMany(User::class);\n\t}", "public function owner()\n\t{\n\t\treturn $this->oneToOne('Hubzero\\User\\User', 'id', 'owned_by_user');\n\t}", "function list_properties_by_owner($ownerId)\n\t{\n\t\t$data['heading'] = 'List owner properties';\n\t\t$data['results'] = $this->property_model->list_properties_by_owner($ownerId);\n\t\t$data['query'] = $this->owner_model->get_owner_by_id($ownerId);\n\t\t//$data['companyData'] = $this->global_model->get_company_data();\n\t\t$headerView = $this->global_model->get_standard_header_view();\n\t\t$this->load->view('owners/owners_list_controlbar_view',$data);\n\t\t$this->load->view('owners/owner_property_list_controlbar_view',$data);\n\t\t$this->load->view('owners/owners_property_list_view',$data);\n\t\t$this->load->view('footer_view');\t\n\t}", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public function owner()\n {\n return $this->hasOne(User::class);\n }", "public function filterOwnedBy($user)\n {\n return $this->getData()->filter($this->owner_field, $user);\n }", "public function getFindAllWithOwnerQuery() {\n \n return $this->createQueryBuilder('n')\n ->select('n, o, ru, ng, og, ngi, ogi, v, p, l')\n ->join('n.user', 'o')\n ->join('o.user_regular', 'ru')\n ->join('ru.gallery', 'og')\n ->leftJoin('og.images', 'ogi')\n ->join('n.gallery', 'ng')\n ->leftJoin('ng.images', 'ngi')\n ->leftJoin('n.values', 'v')\n ->leftJoin('v.property', 'p')\n ->join('n.location', 'l')\n ->where('n.draft = false');\n }", "public function owner()\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "public function getOwners()\n {\n if (array_key_exists(\"owners\", $this->_propDict)) {\n return $this->_propDict[\"owners\"];\n } else {\n return null;\n }\n }", "public function getUser($owner = null)\n {\n if($owner === null)\n $owner = $this->owner;\n\n $res = $this->db->select(\"SELECT * FROM `{$this->domainUser}` WHERE itemName()='{$owner}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizeUser($res->body->SelectResult->Item);\n elseif(isset($res->body->SelectResult))\n return null;\n else\n return false;\n }", "public function users() {\n return $this -> belongsToMany(Author::class);\n }", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "function v1_get_owners($object, &$error) {\n\n\t// XML functions\n\trequire_once \"php/funcs/xml_funcs.php\";\n\t// DB functions\n\trequire_once \"php/funcs/db_funcs.php\";\n\t// Static list of owners.. to reset owners-array when first called\n\tstatic $owners_list=array();\n\t\n\t// Global list of general owners\n\tglobal $gen_owners, $developer, $user_upload;\n\t\n\t// Prepare result\n\t$owners=array();\n\t$error=array();\n\t\n\t// Array of attributes name\n\t$owner_att_names=array(\"OWNER1\", \"OWNER2\", \"OWNER3\");\n\t\n\t// Get owners\n\tforeach ($owner_att_names as $owner_att_name) {\n\t\t$code=xml_get_att($object, $owner_att_name);\n\t\tif (!empty($code)) {\n\t\t\t$owner=array();\n\t\t\t$owner['code']=$code;\n\t\t\t$found=FALSE;\n\t\t\t// Check if code was already searched before\n\t\t\tforeach ($owners_list as $owner_listed) {\n\t\t\t\tif ($code!=$owner_listed['code']) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Get ID\n\t\t\t\t$id=$owner_listed['id'];\n\t\t\t\t$owner['id']=$id;\n\t\t\t\t$found=TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// If not found in list, query DB\n\t\t\tif (!$found) {\n\t\t\t\t$id=db_get_cc_id($code);\n\t\t\t\tif (empty($id)) {\n\t\t\t\t\t$error['code']=9;\n\t\t\t\t\t$error['message']=\"There is no owner with such code: \\\"\".$code.\"\\\"\";\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t\t$owner['id']=$id;\n\t\t\t\t// Add to list of owners\n\t\t\t\tarray_push($owners_list, $owner);\n\t\t\t}\n\t\t\t// Add to owners array\n\t\t\tarray_push($owners, $owner);\n\t\t}\n\t}\n\n\t// If loader is not a developer, check permission to upload data for these owners\n\tif (!$developer && !empty($owners)) {\n\t\t// Local variables\n\t\t$found=array();\n\t\tforeach ($owners as $owner) {\n\t\t\tarray_push($found, FALSE);\n\t\t}\n\t\t// Loop on array of users who permitted user to upload data for them\n\t\tfor ($i=0; $i<count($user_upload['id']); $i++) {\n\t\t\t// For each owner\n\t\t\tforeach ($owners as $key => $owner) {\n\t\t\t\tif ($user_upload['id'][$i]==$owner) {\n\t\t\t\t\t$found[$key]=TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Check owners were found\n\t\tforeach ($found as $key => $found_owner) {\n\t\t\t// Check boolean\n\t\t\tif (!$found_owner) {\n\t\t\t\t$error['code']=3;\n\t\t\t\t$error['message']=\"You do not have the rights to upload for '\".$owners[$key].\"'. If you wish to be granted this permission, please contact them directly.\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Store owners in list\n\tarray_unshift($gen_owners, $owners);\n\t\n\treturn TRUE;\n}", "public function ownedObituaries() {\n return $this->hasMany('Models\\Obituary', 'owner_id');\n }", "public function getRelatedUsers()\n {\n $relatedUsers = \\DB::table(config('permissionsHandler.tables.role_user'))\n ->select('role_id', 'model_id', 'model_type')\n ->where('role_id', $this->id)\n ->get();\n\n $users = collect();\n foreach ($relatedUsers as $user) {\n $users->push(($user->model_type)::find($user->model_id));\n }\n\n return $users;\n }", "public function owner(): BelongsTo\n {\n return $this->belongsTo(SocialPassport::getAuthProviderModel(), 'owner_id');\n }", "public function getInspectionChildUsers()\n {\n return $this->belongsToMany(User::class, 'inspection_mo_mapping', 'parent_id', 'child_id');\n }", "function v1_set_owners(&$object) {\n\t\n\t// Global list of general owners\n\tglobal $gen_owners;\n\t\n\t// Loop on owners\n\tforeach ($gen_owners as $owners) {\n\t\tif (!empty($owners)) {\n\t\t\t$object['results']['owners']=$owners;\n\t\t\treturn TRUE;\n\t\t}\n\t}\n\t\n\treturn FALSE;\n}", "public function getUsers()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->viaTable('join_user_collector', ['collector_id' => 'id']);\n }", "public function findEntitiesOwnedByUser($userId);", "public function getUserFollowers($userId);", "static function get_sharing_perimssions_of_list_with_user($list_owner, $word_list_id, $email) {\n $share_with_id = self::email2id($email);\n\n global $con;\n $sql = \"\n SELECT `share`.`id`, `share`.`list`, `share`.`permissions` \n FROM `share`, `list` \n WHERE `list`.`id` = \".$word_list_id.\" AND `share`.`list` = `list`.`id` AND `list`.`creator` = \".$list_owner.\" AND `list`.`active` = 1 AND `list`.`user` = \".$share_with_id.\";\";\n $query = mysqli_query($con, $sql);\n while ($row = mysqli_fetch_assoc($query)) {\n return new SharingInformation($row['id'], new SimpleUser($share_with_id, null, null, $email), $row['list'], $row['permissions']);\n }\n }", "function monitor_list_owners() {\n $query = \"select distinct(`wf_owner`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_owner'];\n }\n return $ret;\n }", "public function user() \n\t{\n\t\treturn $this->belongsTo('User', 'object_id')->where('soft_deleted', 0);\n\t}", "public function getSingleOwner($owners){\n if($owners && $owners->count() > 0){\n return $owners->map(function($owner){\n return $owner->only(['id','name']);\n });\n }\n return [];\n }", "function get_author_user_ids()\n {\n }", "public static function getAllOwners():array\n {\n // We call getInstance here because this is a static function\n $db = Database::getInstance(self::$dbName);\n return $db->fetchAll(\n 'SELECT id,first_name,last_name FROM user where user_type=0;'\n );\n \n }", "function get_user_relationships() {\n\t$policy = new Config;\n\treturn $policy->getUserRelationships();\n}", "public function owner(){\n // return $query->where('members', 'role', 'Owner');\n return $this->belongsToMany('\\App\\Model\\User', 'joined', 'idproject', 'iduser')->withPivot('role')->where('role', 'Owner');\n }", "public function getUsers()\n {\n return $this->getRelation('users');\n }", "public function scopeWhereUser(Builder $builder, $userId, $owner = null) {\n return $builder->whereIn('id', function ($query) use($userId, $owner) {\n $query->select('file_entry_id')\n ->from('file_entry_models')\n ->where('model_id', $userId)\n ->where('model_type', User::class);\n\n // if $owner is not null, need to load either only\n // entries user owns or entries user does not own\n //if $owner is null, load all entries\n if ( ! is_null($owner)) {\n $query->where('owner', $owner);\n }\n });\n }", "public function listings()\n {\n return $this->hasMany(Listing::class, 'owner_id');\n }", "public function findByOwners(User $user) {\r\n $qb = $this->createQueryBuilder('i');\r\n $qb = $this->qbByOwners($qb, $user);\r\n \r\n return $qb->getQuery()->getResult();\r\n }", "function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }", "public function getMemberObjs()\n {\n if (!empty($this->members_objs) && ($this->members_objs[0] instanceof User)) {\n return $this->members_objs;\n }\n }", "public function getownerBooks($ownerid)\n {\n $sql2 = \"SELECT * from book JOIN item on book.itemid= item.itemid where bUserid= '\".$ownerid.\"'\";\n $bookdetails = mysql_fetch_array(mysql_query($sql2));\n return $bookdetails;\n \n }", "public function getCreatedBy($data)\n {\n return $this->user->find($data['userId'])->promoOwnerships;\n }", "public function getAwardedBountyUsers();", "public function getOwner(): User\n {\n return $this->owner;\n }", "public function scopeOwnedBy($query, $ownerId)\n {\n return $query->whereHas('coordinators', function ($q) use ($ownerId) {\n $q->where('user_id', $ownerId);\n });\n }", "public function getUsers()\r\n {\r\n return $this->hasMany(User::className(), ['id' => 'user_id'])\r\n ->via('glu');\r\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function users(){\n\t\treturn $this->belongsTo('\\\\bundles\\\\lincko\\\\api\\\\models\\\\data\\\\Users', 'parent_id');\n\t}", "public function getUsers() {\n return $this->getRelation(\"users\");\n }", "public function getowner_id()\n {\n return $this->owner_id;\n }", "public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}", "public function findUsers();", "public function findUsers();", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public static function getPersonsUsers(){\n return self::getPersonsByRole();\n }" ]
[ "0.66499436", "0.6450406", "0.64240646", "0.6397755", "0.6383452", "0.6383452", "0.63537866", "0.6348474", "0.6348474", "0.6314939", "0.62940735", "0.6287748", "0.6285946", "0.6284558", "0.6258476", "0.6246058", "0.6199926", "0.6192709", "0.61836094", "0.61785734", "0.61597013", "0.6145773", "0.61416304", "0.60980076", "0.6037561", "0.6025598", "0.6025598", "0.6025598", "0.6025598", "0.60178185", "0.6011612", "0.5980214", "0.59632915", "0.5963262", "0.59563285", "0.5943261", "0.5942981", "0.59347796", "0.59347796", "0.59346104", "0.5927216", "0.59182733", "0.5905131", "0.5895935", "0.5892968", "0.58747864", "0.5872744", "0.5851925", "0.5838993", "0.58271766", "0.5814898", "0.5812869", "0.5808839", "0.57923454", "0.5785973", "0.57667893", "0.57252175", "0.57140905", "0.5693231", "0.5689247", "0.56842023", "0.5654976", "0.5651987", "0.5650584", "0.5631158", "0.56137073", "0.5602692", "0.5601506", "0.55960983", "0.55796707", "0.55788386", "0.55773383", "0.55721605", "0.5571706", "0.5558008", "0.55545205", "0.55393726", "0.55384207", "0.5520472", "0.55155766", "0.5499787", "0.54981464", "0.54966825", "0.54953426", "0.5493526", "0.5479226", "0.547722", "0.5474454", "0.54619247", "0.5461357", "0.5454519", "0.54531026", "0.5433439", "0.54303735", "0.54197186", "0.541475", "0.541475", "0.54143405", "0.54143405", "0.54143405", "0.5401017" ]
0.0
-1
Run the database seeds.
public function run() { $options = [ [ 'name' => 'luanlun', 'title' => '家庭乱伦', ], [ 'name' => 'renqi', 'title' => '人妻交换', ], [ 'name' => 'dushi', 'title' => '都市激情', ], [ 'name' => 'xiaoyuan', 'title' => '校园春色', ], [ 'name' => 'wuxia', 'title' => '武侠古典', ], [ 'name' => 'linglei', 'title' => '另类小说', ], [ 'name' => 'zipai', 'title' => '自拍偷拍', ], [ 'name' => 'yazhou', 'title' => '亚洲色图', ], [ 'name' => 'oumei', 'title' => '欧美色图', ], [ 'name' => 'meitui', 'title' => '美腿丝袜', ], [ 'name' => 'qingchun', 'title' => '清纯唯美', ], [ 'name' => 'katong', 'title' => '卡通动漫' ], ]; foreach($options as $option){ $option['type'] = 'category'; $option['value'] = ''; \App\Model\Option::create($option); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('personas')->insert([ 'nombre'=>'Fulanito', 'apellidos'=>'Torrico', 'genero'=>'Masculino', 'fechanacimiento'=>'2020-1-2', 'direccion'=>'Av. Los cachis', 'telefono'=>764543424, 'user_id'=>1, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Lists all User models.
public function actionIndex(){ echo 'REST API'; //echo \admin\components\GoogleURLShortner::widget(["url" => "http://www.google.com"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }", "public function index()\n {\n $users = User::all();\n }", "public function index()\n {\n\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "public function actionIndex() {\n //redirect a user if not super admin\n if (!Yii::$app->CustomComponents->check_permission('all_users')) {\n return $this->redirect(['site/index']);\n }\n\n $query = DvUsers::find();\n $count = $query->count();\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 50]);\n $models = $query->offset($pagination->offset)->limit($pagination->limit)->all();\n return $this->render('index', [ 'users' => $models, 'total_records' => $count, 'pages' => $pagination]);\n }", "public function index()\n {\n //\n return User::all();\n }", "public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}", "public function index()\n {\n return $this->user->all();\n }", "public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }", "public function index()\n {\n $users = $this->model->all();\n return view('admin/users/user', compact('users'));\n }", "public function index()\n {\n $this->seo = [\n 'title'=>'系统用户',\n 'group'=>'用户权限',\n ];\n $this->setSeo();\n\n $models = User::orderBy('id', 'desc')->paginate(3);\n return view('admin.user.index',['models'=>$models]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->sort = [\n 'defaultOrder' => ['id' => SORT_DESC]\n ];\n $dataProvider->pagination->pageSize = 50;\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $users = User::all();\n return view('backend.user.list', compact(['users']));\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $user = $this->permission(User::all(), 'id');\n\n return $this->showAll($user,User::class);\n }", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllUsers() {\n self::isAdmin404();\n\n $users = User::get();\n\n return view('users', ['users' => $users]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n \n ]);\n }", "public function actionIndex() {\n \n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "public function actionIndex()\n {\n $searchModel = new Usersearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function showAllUsers(Request $request)\n {\n return User::all();\n }", "public function actionIndex() {\n $searchModel = new UsersSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function index()\n {\n $data['users'] = $this->user->all();\n return view('backend.user.list')->with($data);\n }", "function index(){\n\n \n $users = $this->User_model->all();\n\n $data = array();\n $data['users'] = $users;\n\n $this->load->view('list', $data);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 15;\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function actionIndex() {\n $searchModel = new UserSearch();\n if (!$this->user->isAdmin) {\n $searchModel->id = $this->user->id;\n }\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $user = User::all();\n return view('admin.user.list',compact('user'));\n }", "public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }", "public static function getUsers(){\n return self::find()->all();\n }", "public function index()\n {\n return User::all()->toArray();\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $searchModel->rol = User::ROL_USUARIO;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}", "public function index()\n {\n return $this->userRepo->getUsers();\n }", "public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }", "public function index()\n {\n return new UserCollection(User::all());\n }", "public function index()\n {\n $users = User::all();\n return $users;\n }", "public function listofUser()\n {\n return view('Admin.ShowallUser');\n }", "public function index()\n {\n $users = User::paginate();\n return view('manage.users.index')->withUsers($users);\n }", "public function listUsers() {\n \t$data['users'] = User::all();\n \treturn view('backend.users.index', $data);\n }", "public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }", "public function index()\n {\n $this->authorize('index', User::class);\n\n $this->validate(request(), [\n 'page' => 'integer|min:1',\n 'search' => 'string',\n 'role' => 'string',\n 'promotion' => 'string',\n ]);\n\n $users = User::filtered(\n request()->search,\n request()->role,\n request()->promotion,\n null,\n null,\n false\n )->load(['roles'])\n ->sortByDesc('created_at');\n\n if (! request('raw')) {\n $users = $users\n ->paginate(10, request()->page)\n ->withPath(route('users.index'));\n }\n\n return UserResource::collection($users);\n }", "public function index()\n {\n return User::all(['id','name','email','created_at','updated_at']);\n }", "public function listUsers()\n {\n $users = User::all();\n\n return view('listUsers', ['users' => User::all()]);\n\n }", "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "public function index()\n {\n return view('backend.user.list_user');\n }", "public function index()\n {\n //\n $users = User::all();\n\n return $users;\n }", "public function allUsers()\n {\n $users = User::all();\n $role=0;\n return view('admin/users/index', [\n 'users' => $users,\n 'role' => $role\n ]);\n }", "public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }", "public function index()\n {\n\n $users = User::all();\n return $users;\n\n }", "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "public function index()\n {\n $count = \\App\\User::count();\n $users = \\App\\User::orderBy('id', 'desc')->paginate(10);\n\n return view('webcontrol.user.list', compact('count', 'users'));\n }", "public function index()\n {\n return view('admin/user-table/all-user');\n }", "public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }", "public function listAction()\n {\n return new ViewModel([\n 'users' => $this->table->fetchAll(),\n ]);\n }", "public function index()\n {\n return User::get();\n }", "public function index()\n {\n $users = User::all();\n return view('users.userslist')->withUsers($users);\n }", "public function index()\n {\n return UserTransformer::collection(User::all());\n }", "public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}", "public function index()\n {\n $listUser=User::all();\n return view('admin.user.list',compact('listUser'));\n }", "public function index()\n {\n //\n $users = User::all();\n return $users;\n }", "public function index()\n {\n $users = QueryBuilder::for(User::class)\n ->allowedFilters([\n 'name',\n 'email',\n AllowedFilter::exact('is_admin'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'email'])\n ->paginate(15);\n\n return new UserCollection($users);\n }", "public function index()\n {\n return view('administration::user.index')\n ->withUsers($this->user->all());\n }", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function actionIndex()\n {\n\t\t \t\t\t\tif(!PermissionUtils::checkModuleActionPermission(\"Users\",PermissionUtils::VIEW_ALL)){\n\t\t\t\tthrow new ForbiddenHttpException('You are not allowed to perform this action.');\n }\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $searchModel->active = User::ACTIVE_YES;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n\t{\n\t\treturn view('users')->with('users', User::All());\n\t}", "public function index() {\n\n $users = User::all();\n return view('admin/user.index')\n ->with('users', $users);\n }", "public function index()\n {\n $users = User::paginate(10);\n\n return view('backend.users.index')->withUsers($users);\n }", "public function index()\n {\n $users = UserModel::all();\n\n return view('users.index', compact('users'));\n }", "function managementUsersAll(){\n $Users = new \\Project\\Models\\ManagementUserManager();\n $allUser = $Users->allManagementUser();\n\n require 'app/views/back/managementUsers.php';\n }", "public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }" ]
[ "0.75496715", "0.74824166", "0.7447048", "0.7422733", "0.7371054", "0.7371054", "0.7371054", "0.7371054", "0.7371054", "0.7371054", "0.7371054", "0.7371054", "0.7243898", "0.72151834", "0.72028935", "0.71336454", "0.71035457", "0.7048071", "0.70458233", "0.703646", "0.7030818", "0.7015867", "0.701288", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.701194", "0.70016193", "0.69947857", "0.69886965", "0.69883764", "0.6981854", "0.6973584", "0.69729304", "0.6972297", "0.6960787", "0.6960787", "0.69556475", "0.69548506", "0.69521344", "0.69416404", "0.6935529", "0.6934283", "0.6925114", "0.69228315", "0.6921341", "0.6921008", "0.6910781", "0.6910781", "0.6910781", "0.6905436", "0.6904202", "0.6899995", "0.6897392", "0.6896342", "0.6884075", "0.6879194", "0.6874501", "0.68706393", "0.6870115", "0.6859927", "0.68520594", "0.68516964", "0.68299377", "0.6821298", "0.6809827", "0.68094826", "0.6802793", "0.6798167", "0.67929566", "0.6786409", "0.6773351", "0.67675304", "0.6764731", "0.67468405", "0.6742626", "0.6740248", "0.6734503", "0.67319065", "0.67303115", "0.67237604", "0.67177296", "0.6711482", "0.67104816", "0.6709678", "0.66971946", "0.66934675", "0.66923636", "0.66910326", "0.66897905", "0.6689755", "0.66890705", "0.6683604", "0.66827136" ]
0.0
-1
Shows the records in limbo
function show_lost_record($dbc) { #Create a query to get the id, item name, and status $query = 'SELECT owner, item_name, create_date FROM stuff WHERE status="lost"' ; #Execute the query $results = mysqli_query( $dbc, $query ) ; check_results($results); #Show results if( $results ) { #Initializes the table before executing the query. echo '<TABLE border = "1" float="left" cellpadding="5px" cellspacing=5px border = "1">' ; echo '<TR>' ; echo '<TH>Owner</TH>' ; echo '<TH>Item Name</TH>' ; echo '<TH>Created</TH>' ; echo '</TR>' ; #For each row result, generate a table row while ( $row = mysqli_fetch_array( $results, MYSQLI_ASSOC ) ) { echo '<TR>' ; echo '<TD>' . $row['owner'] . '</TD>' ; echo '<TD>' . $row['item_name'] . '</TD>' ; echo '<TD>' . $row['create_date'] . '</TD>' ; echo '</TR>' ; } #End the table echo '</TABLE>' ; #Free up the results in memory mysqli_free_result ( $results ) ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAllRecordsPage() { \n \n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-show-all') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n $this->data['message'] = $this->session->flashdata('message');\n $result = $this->UserModel->getAllRecords();\n foreach ($result as $key => $value) {\n $permission_group = $this->UserModel\n ->getUserType($result[$key]['id']);\n $result[$key]['user_role'] = $permission_group->group_name;\n }\n\n $this->data['result'] = $result;\n $this->set_view('user/view_all_records_page', $this->data);\n } else {\n echo \"access denied\";\n }\n }", "public function showList($offset, $limit, $fieldSort = null, $order = null);", "public function showAll()\n {\n }", "public function showall()\n {\n }", "function index_limit($limit, $start = 0) {\n $this->db->join('tbl_perusahaan','tbl_out.id_perusahaan=tbl_perusahaan.id_perusahaan');\n $this->db->group_by('nomor_permohonan');\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "public function recordacoes(){\n $this->validaAutenticacao();\n $comentario = Container::getModel('Comentarios');\n $this->view->comentarios = $comentario->getComentariosNaoAprovado();\n\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n\n $this->menu();\n $this->render('recordacoes', 'layout-dashboard');\n }", "function showRecordsOnMap () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_RECORDSONMAP###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['recordsOnMap.']['LL'], 'recordsonmap');\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}", "public function actionIndex(){\n\n if (Yii::app()->user->getState('roles') == '5') \n { \n $this->layout='//layouts/column1';\n }\n \n $criteria=new CDbCriteria();\n $criteria->order='id_reporte DESC';\n $count=Reportes::model()->count($criteria);\n \n\n\n \n //Le pasamos el total de registros de la tabla\n $pages=new CPagination($count);\n \n // Resultados por página\n $pages->pageSize=13;\n \n $pages->applyLimit($criteria);\n $getUsuarios=Reportes::model()->findAll($criteria);\n \n $this->render('index',array(\n \"usuarios\"=>$getUsuarios,\n \"pages\"=>$pages\n ));\n}", "public function actionSeekeralloffers(){\n /*\n $seeker_id = Yii::$app->user->identity->seeker->seeker_id;\n $model = new ActiveDataProvider([\n 'query'=>\n SelectedSeeker::find()\n ->where(['seeker_id'=>$seeker_id])\n ->andWhere(['<>','status','Selected']),\n 'pagination'=>[\n 'pageSize'=>3,\n ]\n ]);\n */\n\n $seeker_id = Yii::$app->user->identity->seeker->seeker_id;\n $model = new ActiveDataProvider([\n 'query'=>\n SelectedSeeker::find()\n ->where(['seeker_id'=>$seeker_id])\n ->andWhere(['<>','status','Selected'])\n ->orderBy([\n 'confirmation_time'=>SORT_DESC\n ]),\n 'pagination'=>[\n 'pageSize'=>3,\n ]\n ]);\n return $this->render('seekeralloffers',\n ['model'=>$model]\n );\n }", "function show()\r\n {\r\n $script = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&sort='.$this->sort.'&fltr='.$this->fltr.'&fln='.$this->fln;\r\n $script = $_SERVER['PHP_SELF'].\"?$script\";\r\n\r\n if( !$this->sort ) $this->sort='id';\r\n\t\tif($this->sort=='result') $this->sort='`result` desc';\r\n //if( strstr( $this->sort, 'seria' ) )$this->sort = $this->sort.' desc';\r\n $q = \"SELECT * FROM \".TblModSearchResult.\" where 1 order by \".$this->sort.\"\";\r\n //if( $this->srch ) $q = $q.\" and (name LIKE '%$this->srch%' OR email LIKE '%$this->srch%')\";\r\n if( $this->fltr ) $q = $q.\" and $this->fltr\";\r\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\r\n //echo '<br>$q='.$q.' $res='.$res.'$this->Right->result='.$this->Right->result.' $this->user_id='.$this->user_id;\r\n if( !$res )return false;\r\n $rows = $this->Right->db_GetNumRows();\r\n\r\n /* Write Form Header */\r\n $this->Form->WriteHeader( $script );\r\n\r\n /* Write Table Part */\r\n AdminHTML::TablePartH();\r\n\r\n /* Write Links on Pages */\r\n echo '<TR><TD COLSPAN=17>';\r\n $script1 = 'module='.$this->module.'&fltr='.$this->fltr;\r\n $script1 = $_SERVER['PHP_SELF'].\"?$script1\";\r\n\t\tif( !$this->display ) $this->display = 20;\r\n //$this->Form->WriteLinkPages( $script1, $rows, $this->display, $this->start, $this->sort );\r\n\t\t$this->Form->WriteLinkPages( $script1.'&fltr='.$this->fltr, $rows, $this->display, $this->start, $this->sort );\r\n\r\n echo '<TR><TD COLSPAN=5>';\r\n $this->Form->WriteTopPanel( $script );\r\n\r\n echo '<td colspan=5>';\r\n echo $this->Form->TextBox('srch', $this->srch, 25);\r\n echo '<input type=submit value='.$this->Msg->show_text('_BUTTON_SEARCH',TblSysTxt).'>';\r\n\r\n /*\r\n echo '<td><td><td><td><td colspan=2>';\r\n $this->Form->WriteSelectLangChange( $script, $this->fln);\r\n */\r\n\r\n $script2 = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&task=show&fltr='.$this->fltr;\r\n $script2 = $_SERVER['PHP_SELF'].\"?$script2\";\r\n ?>\r\n <TR>\r\n <td class=\"THead\">*</Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=id><?=$this->Msg->show_text('FLD_ID')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=query><?=$this->Msg->show_text('FLD_QUERY')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=ip><?=$this->Msg->show_text('FLD_IP')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=date><?=$this->Msg->show_text('FLD_DATE')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=time><?=$this->Msg->show_text('FLD_TIME')?></A></Th>\r\n \r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=result><?=$this->Msg->show_text('FLD_RESULT')?></A></Th>\r\n \r\n <?\r\n\r\n $up = 0;\r\n $down = 0;\r\n $a = $rows;\r\n $j = 0;\r\n $row_arr = NULL;\r\n for( $i = 0; $i < $rows; $i++ )\r\n {\r\n $row = $this->Right->db_FetchAssoc();\r\n if( $i >= $this->start && $i < ( $this->start+$this->display ) )\r\n {\r\n $row_arr[$j] = $row;\r\n $j = $j + 1;\r\n }\r\n }\r\n\r\n $style1 = 'TR1';\r\n $style2 = 'TR2';\r\n for( $i = 0; $i < count( $row_arr ); $i++ )\r\n {\r\n $row = $row_arr[$i];\r\n\r\n if ( (float)$i/2 == round( $i/2 ) )\r\n {\r\n echo '<TR CLASS=\"'.$style1.'\">';\r\n }\r\n else echo '<TR CLASS=\"'.$style2.'\">';\r\n\r\n echo '<TD>';\r\n $this->Form->CheckBox( \"id_del[]\", $row['id'] );\r\n\r\n echo '<TD>';\r\n $this->Form->Link( $script.\"&task=edit&id=\".$row['id'], stripslashes( $row['id'] ) );\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['query'] )!='' ) echo $row['query'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['ip'] )!='' ) echo $row['ip'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['date'] )!='' ) echo $row['date'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['time'] )!='' ) echo $row['time'];\r\n\r\n echo '<TD align=center>';\r\n if( trim($row['result'])!='' ) echo $row['result'];\r\n\r\n } //-- end for\r\n\r\n AdminHTML::TablePartF();\r\n $this->Form->WriteFooter();\r\n return true;\r\n\r\n \r\n}", "public function showList() {\n\t \treturn 0;\n\t }", "function printRecords ($show_edits = 1) {\n print \"<table border='1' width='90%'>\";\n foreach ($this->ids as $i) {\n print \"<tr><td>\";\n $this->link[$i]->printHTML($show_edits);\n print \"</td>\";\n print \"<td><p><a href='delete.php?id=$i'>Delete</a></p>\";\n print \"<p><a href='modify.php?id=$i'>Modify</a></p></td></tr>\";\n }\n print \"</table>\";\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "public function recharge_list(){\n $recharge_log_where['user_id'] = ['eq',$this->user_id];\n $p = I('p/d',1);\n $page_last = 7;\n $count = M('recharge')->where($recharge_log_where)->count();\n $withdrawals_log = M('recharge')->where($recharge_log_where)\n ->order('order_id desc')\n ->page(\"{$p},{$page_last}\")\n ->select();\n $Page = new Page($count,$page_last);\n $Page->rollPage = 2;\n $page = $Page->show(); \n $this->assign('lists',$withdrawals_log);\n $this->assign('page', $page);\n \treturn $this->fetch();\n }", "public function showList()\n {\n $query = \"SELECT * FROM todos LIMIT :numRecs OFFSET :offsetVal\";\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':numRecs', $this->numRecords, PDO::PARAM_INT);\n $stmt->bindValue(':offsetVal', $this->offsetValue, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function more_data(){\t \t \n\t\t$page = $this->input->post('page');\n\t\tif(empty($page)){ $page=0; }\n\t\t$offset = 10*$page;\n\t\t$limit = 10;\n\t\t$user__list = $this->InteractModal->all__active_users_limit('client',$limit, $offset);\n\t\t$count_record = $this->InteractModal->count_users('client');\n\t\t$page_data['user__list']= $user__list;\n\t\t$page_data['page']= $page;\n\t\t$this->load->view('common/client_load_more', $page_data);\t\n\t\t\t\t\n\t\t\t\n\t}", "public function index()\n {\n return view('result', ['adverts'=>Advert::with('modification.model.mark')\n ->orderBy('created_at', 'DESC')\n ->simplePaginate(5)]);\n }", "function getRecords($limit = false)\n\t{\n\t\tif ($limit !== false)\n\t\t\t$this->setParam(\"limit\", $limit);\n\n\t\t$this->table->getRecords();\n\t}", "public function actionListado(){\n $model = new Cuenta();\n if(Yii::$app->request->post('consulta')!=NULL){ \n $this->layout = 'printlayout';\n $pdf = new mPDF('utf-8','A4-L',0,'',10,10,10,10);\n $movimientos = $model->getListado(Yii::$app->request->post('consulta'));\n $movPerPage=25;\n $misMovimientos = array_chunk($movimientos,$movPerPage,true);\n $numPages = count($misMovimientos);\n $anyoActual = Cuenta::getDb()->createCommand( 'SELECT contActual()' )->queryScalar();\n foreach($misMovimientos as $key=>$valor){\n $ultimo=false;\n if(($key+1)==$numPages){\n $ultimo=true;\n }\n \n $content = $this->render('imprimir', [\n 'model' => $model,'movimientos'=>$valor,'mpdf'=>$pdf,'ultimo'=>$ultimo,'anyoactual'=>$anyoActual,\n ]);\n //$pdf->SetHeader('Movimientos del año 2015');\n $pdf->SetHTMLHeader($this::$CABECERA,'',true);\n $pdf->SetFooter('Página '.($key+1).' de '.$numPages.'->'.'{PAGENO}');\n $pdf->WriteHTML($content);\n \n if(!$ultimo){\n $pdf->AddPage();\n }\n }\n \n $pdf->Output();\n exit;\n \n \n \n /****************************************************************************************/\n \n }\n /**Pagina de filtrado************************/\n return $this->render('listado', [\n 'model' => $model, 'tipos'=>$model->getTipos(),\n ]);\n }", "public function view_all($limit, $offset){\n\t\treturn ORM::factory('role')->limit($limit)->offset($offset)->find_all();\n\t}", "public function set_display()\n {\n if (isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1') {\n $this->sLimit = \"LIMIT \".mysql_real_escape_string($_GET['iDisplayStart']).\", \".\n mysql_real_escape_string($_GET['iDisplayLength']);\n }\n }", "public function view_staff_accounts(){\n require_once \"karyawanController.php\";\n $karyawan_controller = new KaryawanController();\n $last_page = ($karyawan_controller->count_all()) / MAX;\n $page = 0; //set default nya dulu mo ada request dari GET ato engga\n if(isset($_GET[\"page\"])) $page = $_GET[\"page\"];\n\n $result = $karyawan_controller->getAllStaff($page, MAX);\n return View::createAdminView('pemilik_staff_account.php',[\n\t\t\t\"result\"=> $result,\n \"page\"=>$page,\n \"last_page\"=>$last_page\n\t\t]);\n }", "abstract public function showFieldSets();", "public function index()\n {\n\t\t// $offers = listing::where('id', '=', '4')->take(1)->get();\n\t\t//les 4 derniers\n\t\t// $recents= listing::take(4)->orderBy('id','asc')->get();\n\t\t// return view('offre', compact('recents', 'offers'));\n \n }", "public function read(){\n\t\t\t$recordPerPage = 25;\n\t\t\t//tinh so trang\n\t\t\t$numPage = ceil($this->modelTotal()/$recordPerPage);\n\t\t\t//goi ham de lay du lieu\n\t\t\t$listRecord = $this->modelRead($recordPerPage);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsView.php\";\n\t\t}", "public function modelRead($recordPerPage){\n // lay bien page truyen tu url\n $page = isset($_GET[\"page\"])&&$_GET[\"page\"]>0 ? $_GET[\"page\"]-1 : 0;\n // lay tu ban ghi nao \n $from = $page * $recordPerPage;\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select * from inventory order by id desc limit $from, $recordPerPage\");\n // tra ve nhieu ban ghi\n return $query->fetchAll();\n }", "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->optional_warranty);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->optional_warranty,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/optional_warranty/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "function showResults(){\n global $ilUser, $tpl, $ilTabs, $ilLocator, $ilToolbar;\n\n $ilTabs->activateTab(\"showResults\");\n\n $ilToolbar->setFormAction($this->ctrl->getFormAction($this));\n $ilToolbar->addFormButton($this->txt(\"results_export\"), 'exportResultData');\n\n $tpl->setContent($this->initResultsTable());\n }", "public function index($limit='0')\n\t{\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t\t\n\t\t}\n\t\t$logged_in=$this->session->userdata('logged_in');\n\t\tif($logged_in['base_url'] != base_url()){\n\t\t$this->session->unset_userdata('logged_in');\t\t\n\t\tredirect('login');\n\t\t}\n\t\t\n\t \t\t\t\t\t$logged_in=$this->session->userdata('logged_in');\n $acp=explode(',',$logged_in['setting']);\n\t\t\tif(!in_array('All',$acp)){\n\t\t\texit($this->lang->line('permission_denied'));\n\t\t\t}\n\t\t\t\n\t\t\n\t\t \t \n\t\t\t\n\t\t\t\n\t $data['limit']=$limit;\n\t\t$data['title']=$this->lang->line('advertisment');\n\t\t \n\t\t$data['result']=$this->Advertisment_model->advertisment_list($limit);\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('advertisment_list',$data);\n\t\t$this->load->view('footer',$data);\n\t}", "function allWithLimit() {\n\n }", "public function actionRead(){\n $this->layout = false;\n\t\t\texit;\n $start = (int) $_GET['start'];\n $limit = (int) $_GET['limit'];\n\t\t\t$q=(isset($_GET['q']))?$_GET['q']:'';\n\t\t\t$t_bantuan_program_id=(isset($_GET['t_bantuan_program_id']) && $_GET['t_bantuan_program_id']<>'')?' and t.t_bantuan_program_id='.$_GET['t_bantuan_program_id']:'';\n //Use this code for complex query\n /*\n $model = Yii::app()->db->createCommand()\n ->select('*')\n ->from('table_name')\n ->offset($start)\n ->limit($limit)\n ->queryAll();\n */\n $total = TBantuanData::model()->count(array(\n\t\t\t\t'join'=>'inner join'.$this->getFormatJoinMSSQL('t_bantuan_program','bp').' on t.t_bantuan_program_id=bp.id inner join'.$this->getFormatJoinMSSQL('t_data_rekap','dr').' on t.t_data_rekap_id=dr.id',\n\t\t\t\t'condition'=>'t.deleted=0 and bp.deleted=0 and dr.deleted=0 and dr.m_sekolah_text like :q1'.$t_bantuan_program_id,\n\t\t\t\t'params'=>array(':q1'=>'%'.$q.'%')\n\t\t\t));\n\t\t\t$limit=($limit+$start>$total)?($total-$start):$limit;\n $model = TBantuanData::model()->findAll(array(\n\t\t\t\t'select'=>'t.id,t.t_data_rekap_id,t.t_bantuan_program_id,t.jumlah_paket,t.tgl_cetak_sk,t.deleted,dr.m_sekolah_text as m_sekolah_text,bp.nama as nama_bantuan',\n\t\t\t\t'join'=>'inner join'.$this->getFormatJoinMSSQL('t_bantuan_program','bp').' on t.t_bantuan_program_id=bp.id inner join'.$this->getFormatJoinMSSQL('t_data_rekap','dr').' on t.t_data_rekap_id=dr.id',\n\t\t\t\t'condition'=>'t.deleted=0 and bp.deleted=0 and dr.deleted=0 and dr.m_sekolah_text like :q1'.$t_bantuan_program_id,\n\t\t\t\t'params'=>array(':q1'=>'%'.$q.'%'),\n\t\t\t\t'limit'=>$limit, \n\t\t\t\t'offset'=>$start\n\t\t\t));\n\t\t\t$model_array=array();\n\t\t\tforeach($model as $d){\n\t\t\t\t$row=array(\n\t\t\t\t\t'id'=>$d->id,\n\t\t\t\t\t't_data_rekap_id'=>$d->t_data_rekap_id,\n\t\t\t\t\t't_bantuan_program_id'=>$d->t_bantuan_program_id,\n\t\t\t\t\t'jumlah_paket'=>$d->jumlah_paket,\n\t\t\t\t\t'tgl_cetak_sk'=>$d->tgl_cetak_sk,\n\t\t\t\t\t'deleted'=>$d->deleted,\n\t\t\t\t\t'm_sekolah_text'=>$d->m_sekolah_text,\n\t\t\t\t\t'nama_bantuan'=>$d->nama_bantuan\n\t\t\t\t);\n\t\t\t\t$model_array[]=$row;\n\t\t\t}\n \n echo CJSON::encode(array(\n \"success\" => true,\n \"total\" => $total,\n \"data\" => $model_array\n ));\n\n Yii::app()->end();\n }", "function searchHistoryScreen($request) {\n\n DEFINE(\"RESULTS_ON_PAGE\", \"5\");\n \n $pageNumber = $request->form->get(\"pageNumber\", \"int\", 1);\n \n if( $pageNumber < 1 ) $pageNumber = 1;\n\n $searchHistory = new SearchLogList($request->config->mysqlConnection);\n $searchHistory->setOrder(\"search_date\");\n $searchHistory->setDirection(\"desc\");\n \n $pageCount = ceil($searchHistory->getCount()/RESULTS_ON_PAGE);\n \n $offset = (($pageNumber-1)*RESULTS_ON_PAGE);\n \n $searchHistory->setLimit($offset.\", \".RESULTS_ON_PAGE);\n \n $searchHistory->load();\n \n Leolos\\Status\\Status::OK();\n require_once \"templ/search_history.html\";\n return ;\n}", "function viewrec($recid)\r\n{\r\n\t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tmysqli_data_seek($res, $recid);\r\n \t$row = mysqli_fetch_assoc($res);\r\n\t$prodcode = $row[\"prod_code\"];\r\n\t$field=\"prod_code\";\r\n\t//echo \"ViewRec : Rec ID :\".$recid.\" Count=\".$count.\"<br>\";\r\n \tshowrecnav(\"view\", $recid, $count);\r\n?>\r\n\t<br>\r\n<?php\r\n\tshowrow($row, $recid); \r\n\t\r\n\t\r\n?>\r\n\t<br>\r\n\r\n\t<?php\r\n \t\tmysqli_free_result($res);\r\n\t}", "public function actionIndex()\n {\n $criteria = new CDbCriteria();\n\n $count = Film::model()->count($criteria);\n\n $pages = new CPagination($count);\n $pages->pageSize = self::PER_PAGE;\n $pages->applyLimit($criteria);\n\n $films = Film::model()->findAll($criteria);\n $this->render('index', ['films' => $films, 'pages' => $pages]);\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function index()\n { \n //\n $res = DB::table('tab_collection') \n ->join('tab_problem', 'tab_collection.id','=','tab_problem.id')\n ->join('tab_user_info','tab_collection.id','=','tab_user_info.id')\n ->join('tab_answer','tab_collection.aid','=','tab_answer.id')\n ->select('tab_collection.id','tab_problem.name','tab_user_info.nickname','tab_answer.content')\n\n ->Paginate(6);\n // dd($res);\n \n return view('admin.question.collect',compact('res'));\n }", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "private function view_list($status = 'ready', $maxAge = 0)\n {\n global $Administrator, $Database;\n\n $maxAge = (int)($maxAge * 86400); //convert to seconds\n $portals = implode(',', $Administrator->portals('formitive', 'view'));\n $returnView = new View;\n \n $viewUnreadOnly = ($status == 'unread')? true: false;\n $validStatuses = array('archived', 'ready');\n if (!-in_array($status, $validStatuses)) $status = 'ready';\n \n $sql = \"SELECT * FROM `apps_formitive_index` WHERE `portal` IN ($portals) AND `status` = '$status' ORDER BY `activity` DESC LIMIT 101;\";\n try\n { \n $result = $Database->fetchAssoc($sql);\n unset($sql);\n }\n catch (Exception $e)\n {\n $msg = '<h3>Could not query database!</h3>';\n if (DEBUG_MODE) $msg = $msg . \"<br>Exception thrown: $e<br><br>\";\n if (DEBUG_MODE) $msg = $msg . $sql;\n $returnView->set_content($msg);\n return $returnView;\n }\n \n $statUnread = 0;\n $stat24Hours = 0;\n $stat48Hours = 0;\n $stat7Days = 0;\n $stat30Days = 0;\n \n foreach($result as $id => $row)\n {\n if ((time() - $row['activity']) < 86400) $stat24Hours++;\n if ((time() - $row['activity']) < 172800) $stat48Hours++;\n if ((time() - $row['activity']) < 604800) $stat7Days++;\n if ((time() - $row['activity']) < 2592000) $stat30Days++;\n if ($row['accessed'] == 0) $statUnread++;\n }\n \n //determine table's title\n $mark = ($viewUnreadOnly)? 'unread': $status;\n $from = ($maxAge > 0)? 'From last '. (int)($maxAge / 86400) .' Days': '';\n $tableTitle = \"View Patient Forms Marked \\\"$mark\\\" $from\";\n \n \n $t = '\n <div class=\"portlet x3\">\n\t\t\t\n <div class=\"portlet-header\">\n <h4>Quick Links</h4>\n </div> <!-- .portlet-header -->\n\t\t\t\n <div class=\"portlet-content\">\n <table cellspacing=\"0\" class=\"info_table\">\n <tbody>\n <tr>\n <td class=\"value\">--</td>\n <td><a href=\"/apps/Formitive/view-ready\">View Forms</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $statUnread .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-unread\">Unread</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat24Hours .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-1day\">Last 24 hours</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat48Hours .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-2days\">Last 48 hours</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat7Days .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-7days\">Last 7 days</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat30Days .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-30days\">Last 30 days</a></td>\n </tr>\n <tr>\n <td class=\"value\">--</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-archived\">View Archived Forms</a></td>\n </tr> \n\n </tbody>\n </table>\n </div> <!-- .portlet-content -->\t\t\t\n </div> <!-- .portlet -->\n \n <div id=\"dash_chart\" class=\"portlet x9\">\n \n <div class=\"portlet-header\">\n <h4>'. $tableTitle .'</h4>\n </div> <!-- .portlet-header -->\n\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display\">\n <thead>\n <tr>\n <th>PDF</th>\n <th>Name</th>\n <th>E-mail</th>\n <th colspan=\"2\">Primary Phone</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>';\n \n \n foreach ($result as $row)\n {\n if ($maxAge == 0 OR ((time() - $row['activity'] + 3601) <= $maxAge))\n {\n $linkPDF = 'http://'. URL_FRONTEND .'apps/Formitive/get-pdf/'. $row['id'];\n $name = ucwords(trim($row['last']). ', '. trim($row['first']));\n $iconPDF = '/formitive/icons/pdf.png';\n\n $phone = trim(strtolower($row['phone1']));\n\n if (strstr($phone, 'work'))\n {\n $iconPhone = '/formitive/icons/workphone.png'; \n $phone = str_replace('(work)', null, $phone);\n }\n elseif (strstr($phone, 'cell'))\n {\n $iconPhone = '/formitive/icons/cellphone.png'; \n $phone = str_replace('(cell)', null, $phone);\n }\n elseif (strstr($phone, 'fax'))\n {\n $iconPhone = '/formitive/icons/fax.png'; \n $phone = str_replace('(fax)', null, $phone);\n }\n else\n {\n $iconPhone = '/formitive/icons/phone.png';\n $phone = str_replace('(home)', null, $phone);\n }\n $phone = $this->format_phonenumber($phone);\n\n if (!$viewUnreadOnly OR $row['accessed'] == 0)\n {\n $t .= (!$viewUnreadOnly AND $row['accessed'] == 0)? '<tr class=\"even gradeC\">': '<tr>';\n $t .= ' <td><a href=\"'. $linkPDF .'\" target=\"_blank\"><img src=\"'. $iconPDF .'\" height=\"28px\"></a></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\"><a href=\"'. $linkPDF .'\" target=\"_blank\">'. $name .'</a></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\"><a href=\"mailto:'. $row['email'] .'\">'. $row['email'] .'</a></td>\n <td><img src=\"'. $iconPhone .'\" height=\"28px\"></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\">'. $phone .'</td>\n <td style=\"vertical-align:middle; padding-left: 0px;\">\n <form method=\"post\" action=\"/apps/Formitive/action\">\n <select name=\"action-archive\" size=\"1\">';\n if ($status != 'archived') $t .= '<option value=\"'. $row['id'] .'\">Archive</option>';\n $t .='</select>\n <input type=\"submit\" value=\">\" />\n </form>\n </td>\n </tr>';\n }\n }\n }\n \n $t .= '</tbody>\n </table>\n </div>';\n \n \n $returnView->set_content($t);\n return $returnView;\n }", "public function dsp_all_record()\n {\n $record_type_id = get_post_var('hdn_record_type_id','');\n $member_id = get_post_var('sel_member','');\n \n $VIEW_DATA['arr_all_record'] = $this->model->qry_all_record($record_type_id,$member_id);\n $VIEW_DATA['arr_all_notice'] = $this->model->qry_all_notice($member_id);\n $VIEW_DATA['arr_all_member'] = $this->model->qry_all_member();\n \n $this->view->render('dsp_all_record',$VIEW_DATA);\n }", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "function info_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_info->info_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function actionTop() {\n $limit = 5;\n $model = new $this->modelClass;\n $results = $model::find()->limit($limit)->orderBy(['Data' => SORT_DESC, 'Nome' => SORT_ASC])->all();\n return['limite' => $limit, 'results' => $results];\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "public function show(Request $request){\n return $wilayah = Wilayah::orderBy('id','desc')->paginate(150);\n }", "function index()\n {\n $params['limit'] = RECORDS_PER_PAGE; \n $params['offset'] = ($this->input->get('per_page')) ? $this->input->get('per_page') : 0;\n \n $config = $this->config->item('pagination');\n $config['base_url'] = site_url('condicion_iva/index?');\n $config['total_rows'] = $this->Condicion_iva_model->get_all_condicion_iva_count();\n $this->pagination->initialize($config);\n\n $data['condicion_iva'] = $this->Condicion_iva_model->get_all_condicion_iva($params);\n \n $data['_view'] = 'condicion_iva/index';\n $this->load->view('layouts/main',$data);\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n\n \t$focus = DB::table('focus')->orderBy('id')->paginate(5);\n return view('Admin.Focus.index',[\n 'focus'=>$focus\n ]);\n }", "public function index()\n {\n $this->data['model'] = MailTracking::orderBy('Mtr_CreatedOn', 'desc')->paginate(10);\n\n return parent::index();\n }", "public function showAllPaginateActionGet() : object\n {\n $title = \"Show, paginate movies\";\n\n $this->app->db->connect();\n\n //Number of hits, check input\n $hits = $this->checkForNumberOfHits();\n\n // Get max number of pages\n $sql = \"SELECT COUNT(id) AS max FROM movie;\";\n $max = $this->app->db->executeFetchAll($sql);\n $max = ceil($max[0]->max / $hits);\n\n // Get current page, check input\n $page = $this->checkForPage($hits, $max);\n $offset = $hits * ($page - 1);\n\n // Incoming matches valid value sets\n $orderBy = $this->checkOrderByValue();\n $order = $this->checkOrderValue();\n\n $sql = \"SELECT * FROM movie ORDER BY $orderBy $order LIMIT $hits OFFSET $offset;\";\n $res = $this->app->db->executeFetchAll($sql);\n\n $this->app->page->add(\"movie/show-all-paginate\", [\n \"res\" => $res,\n \"max\" => $max,\n ]);\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function index4()\n {\n $pengaduan = Pengaduan::latest()->paginate(10);\n return view('owner.tabelpengaduan2', compact('pengaduan'))\n ->with('i', (request()->input('page', 1) - 1) * 10);\n }", "function view() {\r\n global $tmpl;\r\n $tmpl->setAttribute('list','visibility','visible');\r\n\r\n $sql=\"SELECT *\r\n FROM student_researchers\r\n ORDER BY last\";\r\n global $db;\r\n $researchers = $db->getAll($sql);\r\n\r\n // determine how many projects are associated with this resarcher\r\n foreach($researchers as $key=>$researcher) {\r\n $sql = \"SELECT COUNT(*) AS numprojects FROM student_research WHERE studentResearcherID = \" . $researcher['id'];\r\n $numProjects = $db->getRow($sql);\r\n $researchers[$key]['numprojects'] = $numProjects['numprojects'];\r\n }\r\n\r\n if(count($researchers)>0){\r\n $tmpl->addRows('mainlist',$researchers);\r\n }\r\n}", "function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten wor&uuml;ber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }", "public function index()\n {\n $data = $this->Invoice_model->where(array('piutang >'=>0))->order_by('no_invoice','DESC')->find_all();\n $cabang = $this->Cabang_model->order_by('kdcab','ASC')->find_all();\n $this->template->title('Report Piutang');\n $this->template->set('cabang', $cabang);\n $this->template->set('results', $data);\n $this->template->render('list');\n }", "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->policy_duration);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->policy_duration,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\";\n\t\t$explodedURL = parse_url($url);\n\t\t$data[\"current_link\"] = $explodedURL['scheme'].'://'.$explodedURL['host'].$explodedURL['path'];\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/policy_duration/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "function airtable_list_records($view, $filterByFormula, $fields){\n\t$endpoint = $data['endpoint'];\n\t$params = [\n\t \"filterByFormula\" => $filterByFormula,\n\t \"fields\" => $fields,\n\t \"sort\" => [['field' => 'name', 'direction' => \"asc\"]],\n\t \"maxRecords\" => 200,\n\t \"pageSize\" => 100,\n\t \"view\" => $view\n\t];\n\t\n\t$call = artaible_call_api($params, $endpoint);\n\treturn $call;\n}", "public function findgrouprecordsAction()\n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t//Don't use the default layout since this isn't a view call\n\t\t$this->_helper->layout->disableLayout();\n\t\t\n\t\t$group = GroupNamespace::getCurrentGroup();\n\t\tif (isset($group) && !is_null($group))\n\t\t{\n\t\t\t$records = $group->getRecords(TRUE);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$records = array();\n\t\t}\n\t\t\n\t\t$grouprecords = array();\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\t$callnumbers = $record->getCallNumbers();\n\t\t\t$stringcallnumbers = implode(\"; \", $callnumbers);\n\t\t\t$counts = $record->getInitialCounts();\n\t\t\t$vol = $counts->getVolumeCount();\n\t\t\t$sheet = $counts->getSheetCount();\n\t\t\t$photo = $counts->getPhotoCount();\n\t\t\t$other = $counts->getOtherCount();\n\t\t\t$boxes = $counts->getBoxCount();\n\t\t\t\t\n\t\t\t$finalcounts = $record->getFunctions()->getReport()->getCounts();\n\t\t\t$finalvol = $finalcounts->getVolumeCount();\n\t\t\t$finalsheet = $finalcounts->getSheetCount();\n\t\t\t$finalphoto = $finalcounts->getPhotoCount();\n\t\t\t$finalother = $finalcounts->getOtherCount();\n\t\t\t$finalhousing = $finalcounts->getHousingCount();\n\t\t\t$finalbox = $finalcounts->getBoxCount();\n\t\t\t\t\n\t\t\tarray_push($grouprecords, array(\n\t\t\t\tItemDAO::ITEM_ID => $record->getItemID(),\n\t\t\t\t\"CallNumbers\" => $stringcallnumbers,\n\t\t\t\tItemDAO::TITLE => $record->getTitle(),\n\t\t\t\tItemDAO::AUTHOR_ARTIST => $record->getAuthorArtist(),\n\t\t\t\tItemDAO::DATE_OF_OBJECT => $record->getDateOfObject(),\n\t\t\t\t\"VolumeCount\" => $vol,\n\t\t\t\t\"SheetCount\" => $sheet,\n\t\t\t\t\"PhotoCount\" => $photo,\n\t\t\t\t\"OtherCount\" => $other,\n\t\t\t\t\"BoxCount\" => $boxes,\n\t\t\t\tItemDAO::COMMENTS => $record->getComments(),\n\t\t\t\tProposalDAO::EXAM_DATE => $record->getFunctions()->getProposal()->getExamDate(),\n\t\t\t\tProposalDAO::DIMENSION_UNIT => $record->getFunctions()->getProposal()->getDimensions()->getUnit(),\n\t\t\t\tProposalDAO::HEIGHT => $record->getFunctions()->getProposal()->getDimensions()->getHeight(),\n\t\t\t\tProposalDAO::WIDTH => $record->getFunctions()->getProposal()->getDimensions()->getWidth(),\n\t\t\t\tProposalDAO::THICKNESS => $record->getFunctions()->getProposal()->getDimensions()->getThickness(),\n\t\t\t\tReportDAO::REPORT_DATE => $record->getFunctions()->getReport()->getReportDate(),\n\t\t\t\t\"TotalHours\" => $record->getFunctions()->getReport()->getTotalHours(),\n\t\t\t\t\"ReportUnit\" => $record->getFunctions()->getReport()->getDimensions()->getUnit(),\n\t\t\t\t\"ReportHeight\" => $record->getFunctions()->getReport()->getDimensions()->getHeight(),\n\t\t\t\t\"ReportWidth\" => $record->getFunctions()->getReport()->getDimensions()->getWidth(),\n\t\t\t\t\"ReportThickness\" => $record->getFunctions()->getReport()->getDimensions()->getThickness(),\n\t\t\t\t\"FinalVolumeCount\" => $finalvol,\n\t\t\t\t\"FinalSheetCount\" => $finalsheet,\n\t\t\t\t\"FinalPhotoCount\" => $finalphoto,\n\t\t\t\t\"FinalOtherCount\" => $finalother,\n\t\t\t\t\"FinalHousingCount\" => $finalhousing,\n\t\t\t\t\"FinalBoxCount\" => $finalbox\n\t\t\t\t));\n\t\t}\n\t\t\n\t\t//Only use the results\n \t$resultset = array('Result' => $grouprecords);\n \t$retval = Zend_Json::encode($resultset);\n\t\t//Make sure JS knows it is in JSON format.\n\t\t$this->getResponse()->setHeader('Content-Type', 'application/json')\n\t\t\t\t\t\t\t\t->setBody($retval);\n }", "public function show($number = 10,$start = 0)\n\t{\n\t\t// $data['category'] = $this->db->select('*')->from('category')->get()->result_array();\n\t\t// $this->load->view('home/view');\n\t\n\t\techo \"<a href='http://localhost/all-project-demo/Codeigniter/demo/index.php/home/add'>add</a> \";\n\n\t\t$data['category'] = $this->db->select('*')->from('category')->limit($number, $start)->get()->result_array();\n\t\t$this->load->view('home/show',$data);\n\t}", "public function list_rfp() {\n $final['recordsTotal'] = $this->Rfp_model->get_rfp_count();\n $final['redraw'] = 1;\n $final['recordsFiltered'] = $final['recordsTotal'];\n $final['data'] = $this->Rfp_model->get_all_rfp();\n echo json_encode($final);\n }", "public function indexAction() {\n\t\t$this->_model->where_clause(NULL);\n\n\t\tif(!isset($this->params['page'])) {\n\t\t\tself::$params['page'] = 1;\n\t\t} \n\n\t\t$this->_view->data['info'] = $this->_model->getPage($this->params['page'], $this->config->pagination_limit);\n\t\t$this->_view->data['total_items'] = $this->_model->getCount();\n\t\t$this->addModuleTemplate($this->module, 'index');\n\n\t}", "function getFilterRecordUnalloc($limit,$start,$column_name,$order,$pofno,$dor,$jobtitle,$company,$location,$grade,$salary,$posstatus,$consul){\n\t \n\t $sql = \"SELECT *,SUM(stage='288') As sum1, SUM(stage='289') As sum2, SUM(stage='291') As sum3, SUM(stage='293') As sum4, COUNT(DISTINCT cand_id) As count2, synonym.parentname As compa, a1.parentname As loca FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id WHERE pof.jobtitle LIKE '%\".$jobtitle.\"%' AND synonym.parentname LIKE '%\".$company.\"%' AND pof.grade LIKE '%\".$grade.\"%' AND pof.sal_t LIKE '%\".$salary.\"%' AND pof.pos_status LIKE '%\".$posstatus.\"%' AND pof_cons.consuls LIKE '%\".$consul.\"%' GROUP BY pof.pof_id ;\";\n\t \t\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t}", "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t//$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/custom-buttons.php' );\n\t\t\t//$this->datatable_settings['custom_edit_button'] = $this->_get_html_view();\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Discounts\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t//$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "function batchListDisplay($filter='',$mode='all'){\n\tglobal $batchtypes, $sql;\n\t\n\t$colors = array('#ffffff','#ffffcc');\n\t$c = 0;\n\t$ret = \"<b>Display</b>: \";\n\tif ($mode != 'pending')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('pending'); return false;\\\">Pending</a> | \";\n\telse\n\t\t$ret .= \"Pending | \";\n\tif ($mode != 'current')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('current'); return false;\\\">Current</a> | \";\n\telse\n\t\t$ret .= \"Current | \";\n\tif ($mode != 'historical')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('historical'); return false;\\\">Historical</a> | \";\n\telse\n\t\t$ret .= \"Historical | \";\n\tif ($mode != 'all')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('all'); return false;\\\">All</a>\";\n\telse\n\t\t$ret .= \"All<br />\";\n\t$ret .= \"<table border=1 cellspacing=0 cellpadding=3>\";\n\t$ret .= \"<tr><th bgcolor=$colors[$c]>Batch Name</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Type</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Start date</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>End date</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Owner</th></tr>\";\n\t\n\t// the 'all' query\n\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID order by b.batchID desc\";\n\tswitch($mode){\n\tcase 'pending':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.startDate',$sql->now()).\" > 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\n\tcase 'current':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.startDate',$sql->now()).\" < 1\n\t\t\t and \".$sql->datediff('b.endDate',$sql->now()).\" > 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\n\tcase 'historical':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.endDate',$sql->now()).\" <= 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\t\n\t}\n\t// use a filter - only works in 'all' mode\n\tif ($filter != ''){\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID where o.owner='$filter' order by b.batchID desc\";\n\t}\n\t$fetchR = $sql->query($fetchQ);\n\t\n\t$count = 0;\n\twhile($fetchW = $sql->fetch_array($fetchR)){\n\t\t$c = ($c + 1) % 2;\n\t\t$count += 1;\n\t\t//if ($count > 100) break;\n\t\t$ret .= \"<tr>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=name$fetchW[4]><a id=namelink$fetchW[4] href=\\\"\\\" onclick=\\\"showBatch($fetchW[4]\";\n\t\tif ($fetchW[1] == 4) // batchtype 4\n\t\t\t$ret .= \",'true'\";\n\t\telse\n\t\t\t$ret .= \",'false'\";\n\t\t$ret .= \"); return false;\\\">$fetchW[0]</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=type$fetchW[4]>\".$batchtypes[$fetchW[1]].\"</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=startdate$fetchW[4]>$fetchW[2]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=enddate$fetchW[4]>$fetchW[3]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=owner$fetchW[4]>$fetchW[5]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=edit$fetchW[4]><a href=\\\"\\\" onclick=\\\"editBatch($fetchW[4]); return false;\\\">Edit</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c]><a href=\\\"\\\" onclick=\\\"deleteBatch($fetchW[4],'$fetchW[0]'); return false;\\\">Delete</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c]><a href=\\\"/queries/batches/forLisa.php?batchID=$fetchW[4]\\\">Report</a></td>\";\n\t\t$ret .= \"</tr>\";\n\t}\n\t\n\t$ret .= \"</table>\";\n\treturn $ret;\n}", "public function index() {\n if(auth()->user()->role == 'admin') {\n return view('krs.index');\n }\n\n $krs = Krs::withCount('krsDetail')->where('mahasiswa_nim', '=', auth()->user()->mahasiswa->nim)->latest()->paginate(9);\n\n return view('krs.index_mahasiswa', compact('krs'));\n }", "private function showPage($records)\n {\n $this->data['histories'] = '';\n $this->data['histories'] = $records;\n\n $this->data['pagebody'] = 'History';\n $this->render();\n }", "public function index()\n {\n return VehicleRate::latest()->paginate(7);\n /*return DB::table('tblmotorvehiclelist')\n ->select('PlateNumber','DriverName','OperatorName','EngineNumber','SerialNumber')\n ->orderBy('id', 'desc')\n ->paginate(7);*/\n }", "public function display_all()\n {\n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Membres'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_member();\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "public function showCarsPagination($limit, $offset){\n\n echo $offset;\n\n $this->db->query('SELECT * FROM '. CARS_TABLE . ' WHERE `deleted` = 0 LIMIT '. $limit . ' OFFSET ' .$offset );\n $result = $this->db->getAll();\n\n if ( !empty($result) ){\n return array(\n 'success' => true,\n 'data' => $result\n );\n\n }else{\n return false;\n }\n\n }", "function getLimit() ;", "public function limit($limit,$offset);", "public function page_list($limit='0')\n\t{\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t\t\n\t\t}\n\t\t$logged_in=$this->session->userdata('logged_in');\n\t\tif($logged_in['base_url'] != base_url()){\n\t\t$this->session->unset_userdata('logged_in');\t\t\n\t\tredirect('login');\n\t\t}\n\t\t\n\t \t\t$logged_in=$this->session->userdata('logged_in');\n $acp=explode(',',$logged_in['setting']);\n\t\t\tif(!in_array('All',$acp)){\n\t\t\texit($this->lang->line('permission_denied'));\n\t\t\t}\n\t\t\t\n\t\t\n\t\t \t \n\t\t\t\n\t\t\t\n\t $data['title']=$this->lang->line('page_list');\n\t\t\t\t$data['result']=$this->Cms_model->page_list_all($limit);\n\t\t\t\t \n\t\t$this->load->view('header',$data);\n\t\t $this->load->view('page_list',$data);\n\t\t$this->load->view('footer',$data);\n\t}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora aterizare</th>\";\n\t\techo \"<th>De la</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_aterizare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"de_la\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $records = $em->getRepository('dswEvalBundle:Record')->findAll();\n\n return $this->render('record/index.html.twig', array(\n 'records' => $records,\n ));\n }", "public function index()\n {\n //$lim = 5;\n /*\n $vars = [\n \"customers\" => CustomerResource::collection(Customer::all()),\n \"transactions\" => TransactionResource::collection(Transaction::paginate(5)),\n \"search\" => \"\"\n ];\n return $vars;\n */\n $transactions = Transaction::orderBy('updated_at', 'desc')->paginate(5);\n $t = TransactionResource::collection($transactions);\n return $t; \n }", "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('bodymassindex_id',$this->bodymassindex_id);\n\t\t$criteria->compare('LOWER(bmi_range)',strtolower($this->bmi_range),true);\n\t\t$criteria->compare('bmi_minimum',$this->bmi_minimum);\n\t\t$criteria->compare('bmi_maksimum',$this->bmi_maksimum);\n\t\t$criteria->compare('LOWER(bmi_sign)',strtolower($this->bmi_sign),true);\n\t\t$criteria->compare('LOWER(bmi_defenisi)',strtolower($this->bmi_defenisi),true);\n\t\t$criteria->compare('LOWER(bmi_pesan)',strtolower($this->bmi_pesan),true);\n\t\t$criteria->compare('bodymassindex_aktif',$this->bodymassindex_aktif);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "function printAllocationList() {\n\t\t$this->redir->set_last_index();\n\t $this->load->model(array('company/mdl_company','engineers/mdl_engineers','partallocation/mdl_partallocation_details','partallocation/mdl_partallocation','servicecenters/mdl_servicecenters'));\n\t\t$list = $this->mdl_partallocation->getallocatedlist_print();\n \t\t$data = array('lists' =>$list);\n\t\t$this->load->view('printallocationlist',$data);\n\t\t\t\t\t\n\t\t}", "public function filterVisible(): self;", "public function index()\n {\n// table('warehouses')\n// ->join('articles', 'warehouses.id', '=', 'articles.warehouse_id')\n// ->select('articles.stock','warehouses.*')\n// ->distinct()\n// ->get();\n $warehouse = Warehouses::latest()->paginate(5);\n\n return view('warehouse.listWh',compact('warehouse'))\n ->with('i',(request()->input('page',1)-1)*1);\n\n }", "public function actionFaqListing()\n {\n ob_start();\n Yii::app()->theme='back';\n $model=new Faq;\n $rec=Faq::model()->findAll();\n $this->render('faqlisting',array('model'=>$model,'list'=>$rec));\n\n }", "public function testShowRecordPaginate()\n {\n $this->makeData(21);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->resize(1920, 2000)\n ->assertSee('List comment & rating');\n //Count row number in one page \n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(10, $elements);\n $this->assertNotNull($browser->element('.pagination'));\n\n //Count page number of pagination\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element)- 2;\n $this->assertTrue($number_page == 3);\n });\n }", "public function indexShowSet()\n {\n $navid = I('get.nav') ? I('get.nav') : 0;\n $pid = M('admin_nav')->where('id=' . $navid)->find()['pid'];\n $navpname = M('admin_nav')->where('id=' . $pid)->find()['name'];\n $navname = M('admin_nav')->where('id=' . $navid)->find()['name'];\n $re = M('category')->where('navid=' . $navid)->select();\n $arr = array();\n foreach ($re as $k => $v) {\n $arr[] = $v['id'];\n }\n $where['cateid'] = array('in', $arr);\n $where['status'] = 1;\n $data = M('ziliao')->where($where)->order('order_number')->select();\n $assign = array(\n 'data' => $data,\n 'navname' => $navname,\n 'navpname' => $navpname,\n );\n // var_dump($data);die;\n $this->assign($assign);\n $this->display();\n\n }", "public function show($i)\n {\n \n }", "public function index()\n {\n $plans=App\\Plan::paginate(15);//pasamos todoos ls planes a la vista de admin\n return view ('admin.plan.index', compact('plans'));\n }", "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\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\tif($offset!==''){ \n\t\t\t\tif ($idRemision!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function list_limit($var,$page){\n if($page>1){\n $page=$page*6-6;\n }else{\n $page=0;\n }\n $sql=\"SELECT a.identificador, a.nombre_inmueble ,e.nombre_t_inmueble ,d.nombre_distrito ,a.direccion ,a.numero ,a.superficie ,\n a.habitaciones ,a.baño ,a.cochera ,a.descripcion ,a.precio ,a.from_url ,a.fecha ,a.tipo ,b.id_operacion ,b.id_people ,\n c.nombre_t_operacion,f.id_contrato,f.identificador as id_contrato,g.tiempo ,f.contrato \n from inmueble as a inner join operacion as b on a.id_inmuebe=b.id_inmueble \n inner join tipo_operacion as c on b.tipo_operacion=c.id_t_operacion inner join distrito as d on a.id_distrito =d.id_distrito\n inner join tipo_inmueble as e on a.tipo_inmueble=e.id_tipo_inmueble inner join contrato as f on b.id_operacion=f.id_operacion\n inner join tipo_contrato as g on f.id_t_contrato=g.id_t_contrato where a.tipo =? limit $page,6\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($var));\n return $rs->fetchAll(PDO::FETCH_OBJ);\n\t\t}", "public function index()\n {\n return Material::oldest()->paginate(5);\n }", "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_decolare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"destinatia\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "public function index()\n {\n return view('admin.job',['rows' => Job::paginate(1000)]);\n }", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function getListPerson($limit){\n\t\t$query = $this->halo_model->getListPerson($limit);\n\t\t\n\t\t$table = \"\";\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result() as $row)\n\t\t\t{\n\t\t\t\t//echo $row->Code;\n\t\t\t\t//echo $row->Name;\n\t\t\t\t$table .= \"<tr><td>\".$row->Code.\"</td><td>\".$row->Name.\"</td></tr>\";\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t$this->data[\"table\"] = $table;\n\t\t\n\t\t$this->load->view('v_halo', $this->data);\n\t\t//echo json_encode($query->result());\n\t\t\n\t}" ]
[ "0.62079084", "0.6181111", "0.61596495", "0.6080475", "0.60361236", "0.5978715", "0.5949737", "0.5881786", "0.5851703", "0.58410895", "0.58346355", "0.5826792", "0.58251965", "0.5821228", "0.5820679", "0.58068216", "0.5796361", "0.57798886", "0.5761892", "0.57570404", "0.57466733", "0.573777", "0.5722897", "0.57108647", "0.56888425", "0.568806", "0.5682698", "0.5680847", "0.567006", "0.5661601", "0.5651016", "0.56486565", "0.5639111", "0.5628361", "0.561792", "0.5612505", "0.56118864", "0.5608405", "0.56082535", "0.56082535", "0.56082535", "0.56082535", "0.56082535", "0.5600409", "0.5595679", "0.5595448", "0.5593784", "0.558975", "0.55852526", "0.5583027", "0.55813473", "0.5578392", "0.5577631", "0.5569807", "0.556618", "0.55613667", "0.55495983", "0.5544749", "0.5542355", "0.55422395", "0.55399436", "0.55396384", "0.5536866", "0.553318", "0.5531873", "0.5531651", "0.5525869", "0.55251306", "0.55241305", "0.5517974", "0.55176777", "0.5514126", "0.5513477", "0.551285", "0.55113524", "0.55057216", "0.5499718", "0.549555", "0.54866296", "0.54824775", "0.5475167", "0.5474192", "0.54695326", "0.54683197", "0.54676294", "0.5459255", "0.54550654", "0.54515827", "0.54504275", "0.54489213", "0.54470444", "0.54465437", "0.54464984", "0.5445441", "0.54412913", "0.5440697", "0.5437292", "0.54368585", "0.5436181", "0.54350555", "0.5434832" ]
0.0
-1
Shows the records in limbo
function show_found_records($dbc) { #Create a query to get the id, item name, and status $query = 'SELECT finder, item_name, create_date FROM stuff WHERE status="found"' ; #Execute the query $results = mysqli_query( $dbc, $query ) ; check_results($results); #Show results if( $results ) { #Initializes the table before executing the query. echo '<TABLE border = "1" float="left" cellpadding=5px cellspacing=5px border = "1">' ; echo '<TR>' ; echo '<TH>Finder</TH>' ; echo '<TH>Item Name</TH>' ; echo '<TH>Created</TH>' ; echo '</TR>' ; #For each row result, generate a table row while ( $row = mysqli_fetch_array( $results, MYSQLI_ASSOC ) ) { echo '<TR>' ; echo '<TD>' . $row['finder'] . '</TD>' ; echo '<TD>' . $row['item_name'] . '</TD>' ; echo '<TD>' . $row['create_date'] . '</TD>' ; echo '</TR>' ; } #End the table echo '</TABLE>' ; #Free up the results in memory mysqli_free_result ( $results ) ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAllRecordsPage() { \n \n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-show-all') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n $this->data['message'] = $this->session->flashdata('message');\n $result = $this->UserModel->getAllRecords();\n foreach ($result as $key => $value) {\n $permission_group = $this->UserModel\n ->getUserType($result[$key]['id']);\n $result[$key]['user_role'] = $permission_group->group_name;\n }\n\n $this->data['result'] = $result;\n $this->set_view('user/view_all_records_page', $this->data);\n } else {\n echo \"access denied\";\n }\n }", "public function showList($offset, $limit, $fieldSort = null, $order = null);", "public function showAll()\n {\n }", "public function showall()\n {\n }", "function index_limit($limit, $start = 0) {\n $this->db->join('tbl_perusahaan','tbl_out.id_perusahaan=tbl_perusahaan.id_perusahaan');\n $this->db->group_by('nomor_permohonan');\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "public function recordacoes(){\n $this->validaAutenticacao();\n $comentario = Container::getModel('Comentarios');\n $this->view->comentarios = $comentario->getComentariosNaoAprovado();\n\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n\n $this->menu();\n $this->render('recordacoes', 'layout-dashboard');\n }", "function showRecordsOnMap () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_RECORDSONMAP###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['recordsOnMap.']['LL'], 'recordsonmap');\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}", "public function actionIndex(){\n\n if (Yii::app()->user->getState('roles') == '5') \n { \n $this->layout='//layouts/column1';\n }\n \n $criteria=new CDbCriteria();\n $criteria->order='id_reporte DESC';\n $count=Reportes::model()->count($criteria);\n \n\n\n \n //Le pasamos el total de registros de la tabla\n $pages=new CPagination($count);\n \n // Resultados por página\n $pages->pageSize=13;\n \n $pages->applyLimit($criteria);\n $getUsuarios=Reportes::model()->findAll($criteria);\n \n $this->render('index',array(\n \"usuarios\"=>$getUsuarios,\n \"pages\"=>$pages\n ));\n}", "public function actionSeekeralloffers(){\n /*\n $seeker_id = Yii::$app->user->identity->seeker->seeker_id;\n $model = new ActiveDataProvider([\n 'query'=>\n SelectedSeeker::find()\n ->where(['seeker_id'=>$seeker_id])\n ->andWhere(['<>','status','Selected']),\n 'pagination'=>[\n 'pageSize'=>3,\n ]\n ]);\n */\n\n $seeker_id = Yii::$app->user->identity->seeker->seeker_id;\n $model = new ActiveDataProvider([\n 'query'=>\n SelectedSeeker::find()\n ->where(['seeker_id'=>$seeker_id])\n ->andWhere(['<>','status','Selected'])\n ->orderBy([\n 'confirmation_time'=>SORT_DESC\n ]),\n 'pagination'=>[\n 'pageSize'=>3,\n ]\n ]);\n return $this->render('seekeralloffers',\n ['model'=>$model]\n );\n }", "function show()\r\n {\r\n $script = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&sort='.$this->sort.'&fltr='.$this->fltr.'&fln='.$this->fln;\r\n $script = $_SERVER['PHP_SELF'].\"?$script\";\r\n\r\n if( !$this->sort ) $this->sort='id';\r\n\t\tif($this->sort=='result') $this->sort='`result` desc';\r\n //if( strstr( $this->sort, 'seria' ) )$this->sort = $this->sort.' desc';\r\n $q = \"SELECT * FROM \".TblModSearchResult.\" where 1 order by \".$this->sort.\"\";\r\n //if( $this->srch ) $q = $q.\" and (name LIKE '%$this->srch%' OR email LIKE '%$this->srch%')\";\r\n if( $this->fltr ) $q = $q.\" and $this->fltr\";\r\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\r\n //echo '<br>$q='.$q.' $res='.$res.'$this->Right->result='.$this->Right->result.' $this->user_id='.$this->user_id;\r\n if( !$res )return false;\r\n $rows = $this->Right->db_GetNumRows();\r\n\r\n /* Write Form Header */\r\n $this->Form->WriteHeader( $script );\r\n\r\n /* Write Table Part */\r\n AdminHTML::TablePartH();\r\n\r\n /* Write Links on Pages */\r\n echo '<TR><TD COLSPAN=17>';\r\n $script1 = 'module='.$this->module.'&fltr='.$this->fltr;\r\n $script1 = $_SERVER['PHP_SELF'].\"?$script1\";\r\n\t\tif( !$this->display ) $this->display = 20;\r\n //$this->Form->WriteLinkPages( $script1, $rows, $this->display, $this->start, $this->sort );\r\n\t\t$this->Form->WriteLinkPages( $script1.'&fltr='.$this->fltr, $rows, $this->display, $this->start, $this->sort );\r\n\r\n echo '<TR><TD COLSPAN=5>';\r\n $this->Form->WriteTopPanel( $script );\r\n\r\n echo '<td colspan=5>';\r\n echo $this->Form->TextBox('srch', $this->srch, 25);\r\n echo '<input type=submit value='.$this->Msg->show_text('_BUTTON_SEARCH',TblSysTxt).'>';\r\n\r\n /*\r\n echo '<td><td><td><td><td colspan=2>';\r\n $this->Form->WriteSelectLangChange( $script, $this->fln);\r\n */\r\n\r\n $script2 = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&task=show&fltr='.$this->fltr;\r\n $script2 = $_SERVER['PHP_SELF'].\"?$script2\";\r\n ?>\r\n <TR>\r\n <td class=\"THead\">*</Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=id><?=$this->Msg->show_text('FLD_ID')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=query><?=$this->Msg->show_text('FLD_QUERY')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=ip><?=$this->Msg->show_text('FLD_IP')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=date><?=$this->Msg->show_text('FLD_DATE')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=time><?=$this->Msg->show_text('FLD_TIME')?></A></Th>\r\n \r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=result><?=$this->Msg->show_text('FLD_RESULT')?></A></Th>\r\n \r\n <?\r\n\r\n $up = 0;\r\n $down = 0;\r\n $a = $rows;\r\n $j = 0;\r\n $row_arr = NULL;\r\n for( $i = 0; $i < $rows; $i++ )\r\n {\r\n $row = $this->Right->db_FetchAssoc();\r\n if( $i >= $this->start && $i < ( $this->start+$this->display ) )\r\n {\r\n $row_arr[$j] = $row;\r\n $j = $j + 1;\r\n }\r\n }\r\n\r\n $style1 = 'TR1';\r\n $style2 = 'TR2';\r\n for( $i = 0; $i < count( $row_arr ); $i++ )\r\n {\r\n $row = $row_arr[$i];\r\n\r\n if ( (float)$i/2 == round( $i/2 ) )\r\n {\r\n echo '<TR CLASS=\"'.$style1.'\">';\r\n }\r\n else echo '<TR CLASS=\"'.$style2.'\">';\r\n\r\n echo '<TD>';\r\n $this->Form->CheckBox( \"id_del[]\", $row['id'] );\r\n\r\n echo '<TD>';\r\n $this->Form->Link( $script.\"&task=edit&id=\".$row['id'], stripslashes( $row['id'] ) );\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['query'] )!='' ) echo $row['query'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['ip'] )!='' ) echo $row['ip'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['date'] )!='' ) echo $row['date'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['time'] )!='' ) echo $row['time'];\r\n\r\n echo '<TD align=center>';\r\n if( trim($row['result'])!='' ) echo $row['result'];\r\n\r\n } //-- end for\r\n\r\n AdminHTML::TablePartF();\r\n $this->Form->WriteFooter();\r\n return true;\r\n\r\n \r\n}", "public function showList() {\n\t \treturn 0;\n\t }", "function printRecords ($show_edits = 1) {\n print \"<table border='1' width='90%'>\";\n foreach ($this->ids as $i) {\n print \"<tr><td>\";\n $this->link[$i]->printHTML($show_edits);\n print \"</td>\";\n print \"<td><p><a href='delete.php?id=$i'>Delete</a></p>\";\n print \"<p><a href='modify.php?id=$i'>Modify</a></p></td></tr>\";\n }\n print \"</table>\";\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "public function recharge_list(){\n $recharge_log_where['user_id'] = ['eq',$this->user_id];\n $p = I('p/d',1);\n $page_last = 7;\n $count = M('recharge')->where($recharge_log_where)->count();\n $withdrawals_log = M('recharge')->where($recharge_log_where)\n ->order('order_id desc')\n ->page(\"{$p},{$page_last}\")\n ->select();\n $Page = new Page($count,$page_last);\n $Page->rollPage = 2;\n $page = $Page->show(); \n $this->assign('lists',$withdrawals_log);\n $this->assign('page', $page);\n \treturn $this->fetch();\n }", "public function showList()\n {\n $query = \"SELECT * FROM todos LIMIT :numRecs OFFSET :offsetVal\";\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':numRecs', $this->numRecords, PDO::PARAM_INT);\n $stmt->bindValue(':offsetVal', $this->offsetValue, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function more_data(){\t \t \n\t\t$page = $this->input->post('page');\n\t\tif(empty($page)){ $page=0; }\n\t\t$offset = 10*$page;\n\t\t$limit = 10;\n\t\t$user__list = $this->InteractModal->all__active_users_limit('client',$limit, $offset);\n\t\t$count_record = $this->InteractModal->count_users('client');\n\t\t$page_data['user__list']= $user__list;\n\t\t$page_data['page']= $page;\n\t\t$this->load->view('common/client_load_more', $page_data);\t\n\t\t\t\t\n\t\t\t\n\t}", "public function index()\n {\n return view('result', ['adverts'=>Advert::with('modification.model.mark')\n ->orderBy('created_at', 'DESC')\n ->simplePaginate(5)]);\n }", "function getRecords($limit = false)\n\t{\n\t\tif ($limit !== false)\n\t\t\t$this->setParam(\"limit\", $limit);\n\n\t\t$this->table->getRecords();\n\t}", "public function actionListado(){\n $model = new Cuenta();\n if(Yii::$app->request->post('consulta')!=NULL){ \n $this->layout = 'printlayout';\n $pdf = new mPDF('utf-8','A4-L',0,'',10,10,10,10);\n $movimientos = $model->getListado(Yii::$app->request->post('consulta'));\n $movPerPage=25;\n $misMovimientos = array_chunk($movimientos,$movPerPage,true);\n $numPages = count($misMovimientos);\n $anyoActual = Cuenta::getDb()->createCommand( 'SELECT contActual()' )->queryScalar();\n foreach($misMovimientos as $key=>$valor){\n $ultimo=false;\n if(($key+1)==$numPages){\n $ultimo=true;\n }\n \n $content = $this->render('imprimir', [\n 'model' => $model,'movimientos'=>$valor,'mpdf'=>$pdf,'ultimo'=>$ultimo,'anyoactual'=>$anyoActual,\n ]);\n //$pdf->SetHeader('Movimientos del año 2015');\n $pdf->SetHTMLHeader($this::$CABECERA,'',true);\n $pdf->SetFooter('Página '.($key+1).' de '.$numPages.'->'.'{PAGENO}');\n $pdf->WriteHTML($content);\n \n if(!$ultimo){\n $pdf->AddPage();\n }\n }\n \n $pdf->Output();\n exit;\n \n \n \n /****************************************************************************************/\n \n }\n /**Pagina de filtrado************************/\n return $this->render('listado', [\n 'model' => $model, 'tipos'=>$model->getTipos(),\n ]);\n }", "public function view_all($limit, $offset){\n\t\treturn ORM::factory('role')->limit($limit)->offset($offset)->find_all();\n\t}", "public function set_display()\n {\n if (isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1') {\n $this->sLimit = \"LIMIT \".mysql_real_escape_string($_GET['iDisplayStart']).\", \".\n mysql_real_escape_string($_GET['iDisplayLength']);\n }\n }", "public function view_staff_accounts(){\n require_once \"karyawanController.php\";\n $karyawan_controller = new KaryawanController();\n $last_page = ($karyawan_controller->count_all()) / MAX;\n $page = 0; //set default nya dulu mo ada request dari GET ato engga\n if(isset($_GET[\"page\"])) $page = $_GET[\"page\"];\n\n $result = $karyawan_controller->getAllStaff($page, MAX);\n return View::createAdminView('pemilik_staff_account.php',[\n\t\t\t\"result\"=> $result,\n \"page\"=>$page,\n \"last_page\"=>$last_page\n\t\t]);\n }", "abstract public function showFieldSets();", "public function index()\n {\n\t\t// $offers = listing::where('id', '=', '4')->take(1)->get();\n\t\t//les 4 derniers\n\t\t// $recents= listing::take(4)->orderBy('id','asc')->get();\n\t\t// return view('offre', compact('recents', 'offers'));\n \n }", "public function read(){\n\t\t\t$recordPerPage = 25;\n\t\t\t//tinh so trang\n\t\t\t$numPage = ceil($this->modelTotal()/$recordPerPage);\n\t\t\t//goi ham de lay du lieu\n\t\t\t$listRecord = $this->modelRead($recordPerPage);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsView.php\";\n\t\t}", "public function modelRead($recordPerPage){\n // lay bien page truyen tu url\n $page = isset($_GET[\"page\"])&&$_GET[\"page\"]>0 ? $_GET[\"page\"]-1 : 0;\n // lay tu ban ghi nao \n $from = $page * $recordPerPage;\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select * from inventory order by id desc limit $from, $recordPerPage\");\n // tra ve nhieu ban ghi\n return $query->fetchAll();\n }", "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->optional_warranty);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->optional_warranty,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/optional_warranty/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "function showResults(){\n global $ilUser, $tpl, $ilTabs, $ilLocator, $ilToolbar;\n\n $ilTabs->activateTab(\"showResults\");\n\n $ilToolbar->setFormAction($this->ctrl->getFormAction($this));\n $ilToolbar->addFormButton($this->txt(\"results_export\"), 'exportResultData');\n\n $tpl->setContent($this->initResultsTable());\n }", "public function index($limit='0')\n\t{\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t\t\n\t\t}\n\t\t$logged_in=$this->session->userdata('logged_in');\n\t\tif($logged_in['base_url'] != base_url()){\n\t\t$this->session->unset_userdata('logged_in');\t\t\n\t\tredirect('login');\n\t\t}\n\t\t\n\t \t\t\t\t\t$logged_in=$this->session->userdata('logged_in');\n $acp=explode(',',$logged_in['setting']);\n\t\t\tif(!in_array('All',$acp)){\n\t\t\texit($this->lang->line('permission_denied'));\n\t\t\t}\n\t\t\t\n\t\t\n\t\t \t \n\t\t\t\n\t\t\t\n\t $data['limit']=$limit;\n\t\t$data['title']=$this->lang->line('advertisment');\n\t\t \n\t\t$data['result']=$this->Advertisment_model->advertisment_list($limit);\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('advertisment_list',$data);\n\t\t$this->load->view('footer',$data);\n\t}", "function allWithLimit() {\n\n }", "public function actionRead(){\n $this->layout = false;\n\t\t\texit;\n $start = (int) $_GET['start'];\n $limit = (int) $_GET['limit'];\n\t\t\t$q=(isset($_GET['q']))?$_GET['q']:'';\n\t\t\t$t_bantuan_program_id=(isset($_GET['t_bantuan_program_id']) && $_GET['t_bantuan_program_id']<>'')?' and t.t_bantuan_program_id='.$_GET['t_bantuan_program_id']:'';\n //Use this code for complex query\n /*\n $model = Yii::app()->db->createCommand()\n ->select('*')\n ->from('table_name')\n ->offset($start)\n ->limit($limit)\n ->queryAll();\n */\n $total = TBantuanData::model()->count(array(\n\t\t\t\t'join'=>'inner join'.$this->getFormatJoinMSSQL('t_bantuan_program','bp').' on t.t_bantuan_program_id=bp.id inner join'.$this->getFormatJoinMSSQL('t_data_rekap','dr').' on t.t_data_rekap_id=dr.id',\n\t\t\t\t'condition'=>'t.deleted=0 and bp.deleted=0 and dr.deleted=0 and dr.m_sekolah_text like :q1'.$t_bantuan_program_id,\n\t\t\t\t'params'=>array(':q1'=>'%'.$q.'%')\n\t\t\t));\n\t\t\t$limit=($limit+$start>$total)?($total-$start):$limit;\n $model = TBantuanData::model()->findAll(array(\n\t\t\t\t'select'=>'t.id,t.t_data_rekap_id,t.t_bantuan_program_id,t.jumlah_paket,t.tgl_cetak_sk,t.deleted,dr.m_sekolah_text as m_sekolah_text,bp.nama as nama_bantuan',\n\t\t\t\t'join'=>'inner join'.$this->getFormatJoinMSSQL('t_bantuan_program','bp').' on t.t_bantuan_program_id=bp.id inner join'.$this->getFormatJoinMSSQL('t_data_rekap','dr').' on t.t_data_rekap_id=dr.id',\n\t\t\t\t'condition'=>'t.deleted=0 and bp.deleted=0 and dr.deleted=0 and dr.m_sekolah_text like :q1'.$t_bantuan_program_id,\n\t\t\t\t'params'=>array(':q1'=>'%'.$q.'%'),\n\t\t\t\t'limit'=>$limit, \n\t\t\t\t'offset'=>$start\n\t\t\t));\n\t\t\t$model_array=array();\n\t\t\tforeach($model as $d){\n\t\t\t\t$row=array(\n\t\t\t\t\t'id'=>$d->id,\n\t\t\t\t\t't_data_rekap_id'=>$d->t_data_rekap_id,\n\t\t\t\t\t't_bantuan_program_id'=>$d->t_bantuan_program_id,\n\t\t\t\t\t'jumlah_paket'=>$d->jumlah_paket,\n\t\t\t\t\t'tgl_cetak_sk'=>$d->tgl_cetak_sk,\n\t\t\t\t\t'deleted'=>$d->deleted,\n\t\t\t\t\t'm_sekolah_text'=>$d->m_sekolah_text,\n\t\t\t\t\t'nama_bantuan'=>$d->nama_bantuan\n\t\t\t\t);\n\t\t\t\t$model_array[]=$row;\n\t\t\t}\n \n echo CJSON::encode(array(\n \"success\" => true,\n \"total\" => $total,\n \"data\" => $model_array\n ));\n\n Yii::app()->end();\n }", "function searchHistoryScreen($request) {\n\n DEFINE(\"RESULTS_ON_PAGE\", \"5\");\n \n $pageNumber = $request->form->get(\"pageNumber\", \"int\", 1);\n \n if( $pageNumber < 1 ) $pageNumber = 1;\n\n $searchHistory = new SearchLogList($request->config->mysqlConnection);\n $searchHistory->setOrder(\"search_date\");\n $searchHistory->setDirection(\"desc\");\n \n $pageCount = ceil($searchHistory->getCount()/RESULTS_ON_PAGE);\n \n $offset = (($pageNumber-1)*RESULTS_ON_PAGE);\n \n $searchHistory->setLimit($offset.\", \".RESULTS_ON_PAGE);\n \n $searchHistory->load();\n \n Leolos\\Status\\Status::OK();\n require_once \"templ/search_history.html\";\n return ;\n}", "function viewrec($recid)\r\n{\r\n\t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tmysqli_data_seek($res, $recid);\r\n \t$row = mysqli_fetch_assoc($res);\r\n\t$prodcode = $row[\"prod_code\"];\r\n\t$field=\"prod_code\";\r\n\t//echo \"ViewRec : Rec ID :\".$recid.\" Count=\".$count.\"<br>\";\r\n \tshowrecnav(\"view\", $recid, $count);\r\n?>\r\n\t<br>\r\n<?php\r\n\tshowrow($row, $recid); \r\n\t\r\n\t\r\n?>\r\n\t<br>\r\n\r\n\t<?php\r\n \t\tmysqli_free_result($res);\r\n\t}", "public function actionIndex()\n {\n $criteria = new CDbCriteria();\n\n $count = Film::model()->count($criteria);\n\n $pages = new CPagination($count);\n $pages->pageSize = self::PER_PAGE;\n $pages->applyLimit($criteria);\n\n $films = Film::model()->findAll($criteria);\n $this->render('index', ['films' => $films, 'pages' => $pages]);\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function index()\n { \n //\n $res = DB::table('tab_collection') \n ->join('tab_problem', 'tab_collection.id','=','tab_problem.id')\n ->join('tab_user_info','tab_collection.id','=','tab_user_info.id')\n ->join('tab_answer','tab_collection.aid','=','tab_answer.id')\n ->select('tab_collection.id','tab_problem.name','tab_user_info.nickname','tab_answer.content')\n\n ->Paginate(6);\n // dd($res);\n \n return view('admin.question.collect',compact('res'));\n }", "private function view_list($status = 'ready', $maxAge = 0)\n {\n global $Administrator, $Database;\n\n $maxAge = (int)($maxAge * 86400); //convert to seconds\n $portals = implode(',', $Administrator->portals('formitive', 'view'));\n $returnView = new View;\n \n $viewUnreadOnly = ($status == 'unread')? true: false;\n $validStatuses = array('archived', 'ready');\n if (!-in_array($status, $validStatuses)) $status = 'ready';\n \n $sql = \"SELECT * FROM `apps_formitive_index` WHERE `portal` IN ($portals) AND `status` = '$status' ORDER BY `activity` DESC LIMIT 101;\";\n try\n { \n $result = $Database->fetchAssoc($sql);\n unset($sql);\n }\n catch (Exception $e)\n {\n $msg = '<h3>Could not query database!</h3>';\n if (DEBUG_MODE) $msg = $msg . \"<br>Exception thrown: $e<br><br>\";\n if (DEBUG_MODE) $msg = $msg . $sql;\n $returnView->set_content($msg);\n return $returnView;\n }\n \n $statUnread = 0;\n $stat24Hours = 0;\n $stat48Hours = 0;\n $stat7Days = 0;\n $stat30Days = 0;\n \n foreach($result as $id => $row)\n {\n if ((time() - $row['activity']) < 86400) $stat24Hours++;\n if ((time() - $row['activity']) < 172800) $stat48Hours++;\n if ((time() - $row['activity']) < 604800) $stat7Days++;\n if ((time() - $row['activity']) < 2592000) $stat30Days++;\n if ($row['accessed'] == 0) $statUnread++;\n }\n \n //determine table's title\n $mark = ($viewUnreadOnly)? 'unread': $status;\n $from = ($maxAge > 0)? 'From last '. (int)($maxAge / 86400) .' Days': '';\n $tableTitle = \"View Patient Forms Marked \\\"$mark\\\" $from\";\n \n \n $t = '\n <div class=\"portlet x3\">\n\t\t\t\n <div class=\"portlet-header\">\n <h4>Quick Links</h4>\n </div> <!-- .portlet-header -->\n\t\t\t\n <div class=\"portlet-content\">\n <table cellspacing=\"0\" class=\"info_table\">\n <tbody>\n <tr>\n <td class=\"value\">--</td>\n <td><a href=\"/apps/Formitive/view-ready\">View Forms</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $statUnread .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-unread\">Unread</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat24Hours .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-1day\">Last 24 hours</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat48Hours .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-2days\">Last 48 hours</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat7Days .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-7days\">Last 7 days</a></td>\n </tr>\n <tr>\n <td class=\"value\">'. $stat30Days .'</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-30days\">Last 30 days</a></td>\n </tr>\n <tr>\n <td class=\"value\">--</td>\n <td class=\"full\"><a href=\"/apps/Formitive/view-archived\">View Archived Forms</a></td>\n </tr> \n\n </tbody>\n </table>\n </div> <!-- .portlet-content -->\t\t\t\n </div> <!-- .portlet -->\n \n <div id=\"dash_chart\" class=\"portlet x9\">\n \n <div class=\"portlet-header\">\n <h4>'. $tableTitle .'</h4>\n </div> <!-- .portlet-header -->\n\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display\">\n <thead>\n <tr>\n <th>PDF</th>\n <th>Name</th>\n <th>E-mail</th>\n <th colspan=\"2\">Primary Phone</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>';\n \n \n foreach ($result as $row)\n {\n if ($maxAge == 0 OR ((time() - $row['activity'] + 3601) <= $maxAge))\n {\n $linkPDF = 'http://'. URL_FRONTEND .'apps/Formitive/get-pdf/'. $row['id'];\n $name = ucwords(trim($row['last']). ', '. trim($row['first']));\n $iconPDF = '/formitive/icons/pdf.png';\n\n $phone = trim(strtolower($row['phone1']));\n\n if (strstr($phone, 'work'))\n {\n $iconPhone = '/formitive/icons/workphone.png'; \n $phone = str_replace('(work)', null, $phone);\n }\n elseif (strstr($phone, 'cell'))\n {\n $iconPhone = '/formitive/icons/cellphone.png'; \n $phone = str_replace('(cell)', null, $phone);\n }\n elseif (strstr($phone, 'fax'))\n {\n $iconPhone = '/formitive/icons/fax.png'; \n $phone = str_replace('(fax)', null, $phone);\n }\n else\n {\n $iconPhone = '/formitive/icons/phone.png';\n $phone = str_replace('(home)', null, $phone);\n }\n $phone = $this->format_phonenumber($phone);\n\n if (!$viewUnreadOnly OR $row['accessed'] == 0)\n {\n $t .= (!$viewUnreadOnly AND $row['accessed'] == 0)? '<tr class=\"even gradeC\">': '<tr>';\n $t .= ' <td><a href=\"'. $linkPDF .'\" target=\"_blank\"><img src=\"'. $iconPDF .'\" height=\"28px\"></a></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\"><a href=\"'. $linkPDF .'\" target=\"_blank\">'. $name .'</a></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\"><a href=\"mailto:'. $row['email'] .'\">'. $row['email'] .'</a></td>\n <td><img src=\"'. $iconPhone .'\" height=\"28px\"></td>\n <td style=\"vertical-align:middle; padding-left: 0px;\">'. $phone .'</td>\n <td style=\"vertical-align:middle; padding-left: 0px;\">\n <form method=\"post\" action=\"/apps/Formitive/action\">\n <select name=\"action-archive\" size=\"1\">';\n if ($status != 'archived') $t .= '<option value=\"'. $row['id'] .'\">Archive</option>';\n $t .='</select>\n <input type=\"submit\" value=\">\" />\n </form>\n </td>\n </tr>';\n }\n }\n }\n \n $t .= '</tbody>\n </table>\n </div>';\n \n \n $returnView->set_content($t);\n return $returnView;\n }", "public function dsp_all_record()\n {\n $record_type_id = get_post_var('hdn_record_type_id','');\n $member_id = get_post_var('sel_member','');\n \n $VIEW_DATA['arr_all_record'] = $this->model->qry_all_record($record_type_id,$member_id);\n $VIEW_DATA['arr_all_notice'] = $this->model->qry_all_notice($member_id);\n $VIEW_DATA['arr_all_member'] = $this->model->qry_all_member();\n \n $this->view->render('dsp_all_record',$VIEW_DATA);\n }", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "function info_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_info->info_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function actionTop() {\n $limit = 5;\n $model = new $this->modelClass;\n $results = $model::find()->limit($limit)->orderBy(['Data' => SORT_DESC, 'Nome' => SORT_ASC])->all();\n return['limite' => $limit, 'results' => $results];\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "public function show(Request $request){\n return $wilayah = Wilayah::orderBy('id','desc')->paginate(150);\n }", "function index()\n {\n $params['limit'] = RECORDS_PER_PAGE; \n $params['offset'] = ($this->input->get('per_page')) ? $this->input->get('per_page') : 0;\n \n $config = $this->config->item('pagination');\n $config['base_url'] = site_url('condicion_iva/index?');\n $config['total_rows'] = $this->Condicion_iva_model->get_all_condicion_iva_count();\n $this->pagination->initialize($config);\n\n $data['condicion_iva'] = $this->Condicion_iva_model->get_all_condicion_iva($params);\n \n $data['_view'] = 'condicion_iva/index';\n $this->load->view('layouts/main',$data);\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n\n \t$focus = DB::table('focus')->orderBy('id')->paginate(5);\n return view('Admin.Focus.index',[\n 'focus'=>$focus\n ]);\n }", "public function index()\n {\n $this->data['model'] = MailTracking::orderBy('Mtr_CreatedOn', 'desc')->paginate(10);\n\n return parent::index();\n }", "public function showAllPaginateActionGet() : object\n {\n $title = \"Show, paginate movies\";\n\n $this->app->db->connect();\n\n //Number of hits, check input\n $hits = $this->checkForNumberOfHits();\n\n // Get max number of pages\n $sql = \"SELECT COUNT(id) AS max FROM movie;\";\n $max = $this->app->db->executeFetchAll($sql);\n $max = ceil($max[0]->max / $hits);\n\n // Get current page, check input\n $page = $this->checkForPage($hits, $max);\n $offset = $hits * ($page - 1);\n\n // Incoming matches valid value sets\n $orderBy = $this->checkOrderByValue();\n $order = $this->checkOrderValue();\n\n $sql = \"SELECT * FROM movie ORDER BY $orderBy $order LIMIT $hits OFFSET $offset;\";\n $res = $this->app->db->executeFetchAll($sql);\n\n $this->app->page->add(\"movie/show-all-paginate\", [\n \"res\" => $res,\n \"max\" => $max,\n ]);\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function index4()\n {\n $pengaduan = Pengaduan::latest()->paginate(10);\n return view('owner.tabelpengaduan2', compact('pengaduan'))\n ->with('i', (request()->input('page', 1) - 1) * 10);\n }", "function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten wor&uuml;ber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }", "function view() {\r\n global $tmpl;\r\n $tmpl->setAttribute('list','visibility','visible');\r\n\r\n $sql=\"SELECT *\r\n FROM student_researchers\r\n ORDER BY last\";\r\n global $db;\r\n $researchers = $db->getAll($sql);\r\n\r\n // determine how many projects are associated with this resarcher\r\n foreach($researchers as $key=>$researcher) {\r\n $sql = \"SELECT COUNT(*) AS numprojects FROM student_research WHERE studentResearcherID = \" . $researcher['id'];\r\n $numProjects = $db->getRow($sql);\r\n $researchers[$key]['numprojects'] = $numProjects['numprojects'];\r\n }\r\n\r\n if(count($researchers)>0){\r\n $tmpl->addRows('mainlist',$researchers);\r\n }\r\n}", "public function index()\n {\n $data = $this->Invoice_model->where(array('piutang >'=>0))->order_by('no_invoice','DESC')->find_all();\n $cabang = $this->Cabang_model->order_by('kdcab','ASC')->find_all();\n $this->template->title('Report Piutang');\n $this->template->set('cabang', $cabang);\n $this->template->set('results', $data);\n $this->template->render('list');\n }", "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->policy_duration);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->policy_duration,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\";\n\t\t$explodedURL = parse_url($url);\n\t\t$data[\"current_link\"] = $explodedURL['scheme'].'://'.$explodedURL['host'].$explodedURL['path'];\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/policy_duration/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "function airtable_list_records($view, $filterByFormula, $fields){\n\t$endpoint = $data['endpoint'];\n\t$params = [\n\t \"filterByFormula\" => $filterByFormula,\n\t \"fields\" => $fields,\n\t \"sort\" => [['field' => 'name', 'direction' => \"asc\"]],\n\t \"maxRecords\" => 200,\n\t \"pageSize\" => 100,\n\t \"view\" => $view\n\t];\n\t\n\t$call = artaible_call_api($params, $endpoint);\n\treturn $call;\n}", "public function findgrouprecordsAction()\n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t//Don't use the default layout since this isn't a view call\n\t\t$this->_helper->layout->disableLayout();\n\t\t\n\t\t$group = GroupNamespace::getCurrentGroup();\n\t\tif (isset($group) && !is_null($group))\n\t\t{\n\t\t\t$records = $group->getRecords(TRUE);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$records = array();\n\t\t}\n\t\t\n\t\t$grouprecords = array();\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\t$callnumbers = $record->getCallNumbers();\n\t\t\t$stringcallnumbers = implode(\"; \", $callnumbers);\n\t\t\t$counts = $record->getInitialCounts();\n\t\t\t$vol = $counts->getVolumeCount();\n\t\t\t$sheet = $counts->getSheetCount();\n\t\t\t$photo = $counts->getPhotoCount();\n\t\t\t$other = $counts->getOtherCount();\n\t\t\t$boxes = $counts->getBoxCount();\n\t\t\t\t\n\t\t\t$finalcounts = $record->getFunctions()->getReport()->getCounts();\n\t\t\t$finalvol = $finalcounts->getVolumeCount();\n\t\t\t$finalsheet = $finalcounts->getSheetCount();\n\t\t\t$finalphoto = $finalcounts->getPhotoCount();\n\t\t\t$finalother = $finalcounts->getOtherCount();\n\t\t\t$finalhousing = $finalcounts->getHousingCount();\n\t\t\t$finalbox = $finalcounts->getBoxCount();\n\t\t\t\t\n\t\t\tarray_push($grouprecords, array(\n\t\t\t\tItemDAO::ITEM_ID => $record->getItemID(),\n\t\t\t\t\"CallNumbers\" => $stringcallnumbers,\n\t\t\t\tItemDAO::TITLE => $record->getTitle(),\n\t\t\t\tItemDAO::AUTHOR_ARTIST => $record->getAuthorArtist(),\n\t\t\t\tItemDAO::DATE_OF_OBJECT => $record->getDateOfObject(),\n\t\t\t\t\"VolumeCount\" => $vol,\n\t\t\t\t\"SheetCount\" => $sheet,\n\t\t\t\t\"PhotoCount\" => $photo,\n\t\t\t\t\"OtherCount\" => $other,\n\t\t\t\t\"BoxCount\" => $boxes,\n\t\t\t\tItemDAO::COMMENTS => $record->getComments(),\n\t\t\t\tProposalDAO::EXAM_DATE => $record->getFunctions()->getProposal()->getExamDate(),\n\t\t\t\tProposalDAO::DIMENSION_UNIT => $record->getFunctions()->getProposal()->getDimensions()->getUnit(),\n\t\t\t\tProposalDAO::HEIGHT => $record->getFunctions()->getProposal()->getDimensions()->getHeight(),\n\t\t\t\tProposalDAO::WIDTH => $record->getFunctions()->getProposal()->getDimensions()->getWidth(),\n\t\t\t\tProposalDAO::THICKNESS => $record->getFunctions()->getProposal()->getDimensions()->getThickness(),\n\t\t\t\tReportDAO::REPORT_DATE => $record->getFunctions()->getReport()->getReportDate(),\n\t\t\t\t\"TotalHours\" => $record->getFunctions()->getReport()->getTotalHours(),\n\t\t\t\t\"ReportUnit\" => $record->getFunctions()->getReport()->getDimensions()->getUnit(),\n\t\t\t\t\"ReportHeight\" => $record->getFunctions()->getReport()->getDimensions()->getHeight(),\n\t\t\t\t\"ReportWidth\" => $record->getFunctions()->getReport()->getDimensions()->getWidth(),\n\t\t\t\t\"ReportThickness\" => $record->getFunctions()->getReport()->getDimensions()->getThickness(),\n\t\t\t\t\"FinalVolumeCount\" => $finalvol,\n\t\t\t\t\"FinalSheetCount\" => $finalsheet,\n\t\t\t\t\"FinalPhotoCount\" => $finalphoto,\n\t\t\t\t\"FinalOtherCount\" => $finalother,\n\t\t\t\t\"FinalHousingCount\" => $finalhousing,\n\t\t\t\t\"FinalBoxCount\" => $finalbox\n\t\t\t\t));\n\t\t}\n\t\t\n\t\t//Only use the results\n \t$resultset = array('Result' => $grouprecords);\n \t$retval = Zend_Json::encode($resultset);\n\t\t//Make sure JS knows it is in JSON format.\n\t\t$this->getResponse()->setHeader('Content-Type', 'application/json')\n\t\t\t\t\t\t\t\t->setBody($retval);\n }", "public function show($number = 10,$start = 0)\n\t{\n\t\t// $data['category'] = $this->db->select('*')->from('category')->get()->result_array();\n\t\t// $this->load->view('home/view');\n\t\n\t\techo \"<a href='http://localhost/all-project-demo/Codeigniter/demo/index.php/home/add'>add</a> \";\n\n\t\t$data['category'] = $this->db->select('*')->from('category')->limit($number, $start)->get()->result_array();\n\t\t$this->load->view('home/show',$data);\n\t}", "public function list_rfp() {\n $final['recordsTotal'] = $this->Rfp_model->get_rfp_count();\n $final['redraw'] = 1;\n $final['recordsFiltered'] = $final['recordsTotal'];\n $final['data'] = $this->Rfp_model->get_all_rfp();\n echo json_encode($final);\n }", "function getFilterRecordUnalloc($limit,$start,$column_name,$order,$pofno,$dor,$jobtitle,$company,$location,$grade,$salary,$posstatus,$consul){\n\t \n\t $sql = \"SELECT *,SUM(stage='288') As sum1, SUM(stage='289') As sum2, SUM(stage='291') As sum3, SUM(stage='293') As sum4, COUNT(DISTINCT cand_id) As count2, synonym.parentname As compa, a1.parentname As loca FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id WHERE pof.jobtitle LIKE '%\".$jobtitle.\"%' AND synonym.parentname LIKE '%\".$company.\"%' AND pof.grade LIKE '%\".$grade.\"%' AND pof.sal_t LIKE '%\".$salary.\"%' AND pof.pos_status LIKE '%\".$posstatus.\"%' AND pof_cons.consuls LIKE '%\".$consul.\"%' GROUP BY pof.pof_id ;\";\n\t \t\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t}", "public function indexAction() {\n\t\t$this->_model->where_clause(NULL);\n\n\t\tif(!isset($this->params['page'])) {\n\t\t\tself::$params['page'] = 1;\n\t\t} \n\n\t\t$this->_view->data['info'] = $this->_model->getPage($this->params['page'], $this->config->pagination_limit);\n\t\t$this->_view->data['total_items'] = $this->_model->getCount();\n\t\t$this->addModuleTemplate($this->module, 'index');\n\n\t}", "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t//$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/custom-buttons.php' );\n\t\t\t//$this->datatable_settings['custom_edit_button'] = $this->_get_html_view();\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Discounts\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t//$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "function batchListDisplay($filter='',$mode='all'){\n\tglobal $batchtypes, $sql;\n\t\n\t$colors = array('#ffffff','#ffffcc');\n\t$c = 0;\n\t$ret = \"<b>Display</b>: \";\n\tif ($mode != 'pending')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('pending'); return false;\\\">Pending</a> | \";\n\telse\n\t\t$ret .= \"Pending | \";\n\tif ($mode != 'current')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('current'); return false;\\\">Current</a> | \";\n\telse\n\t\t$ret .= \"Current | \";\n\tif ($mode != 'historical')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('historical'); return false;\\\">Historical</a> | \";\n\telse\n\t\t$ret .= \"Historical | \";\n\tif ($mode != 'all')\n\t\t$ret .= \"<a href=\\\"\\\" onclick=\\\"redisplay('all'); return false;\\\">All</a>\";\n\telse\n\t\t$ret .= \"All<br />\";\n\t$ret .= \"<table border=1 cellspacing=0 cellpadding=3>\";\n\t$ret .= \"<tr><th bgcolor=$colors[$c]>Batch Name</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Type</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Start date</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>End date</th>\";\n\t$ret .= \"<th bgcolor=$colors[$c]>Owner</th></tr>\";\n\t\n\t// the 'all' query\n\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID order by b.batchID desc\";\n\tswitch($mode){\n\tcase 'pending':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.startDate',$sql->now()).\" > 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\n\tcase 'current':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.startDate',$sql->now()).\" < 1\n\t\t\t and \".$sql->datediff('b.endDate',$sql->now()).\" > 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\n\tcase 'historical':\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID\n\t\t\t where \".$sql->datediff('b.endDate',$sql->now()).\" <= 0\n\t\t\t order by b.batchID desc\";\n\t\tbreak;\t\n\t}\n\t// use a filter - only works in 'all' mode\n\tif ($filter != ''){\n\t\t$fetchQ = \"select b.batchName,b.batchType,b.startDate,b.endDate,b.batchID,\n\t\t\t o.owner from batches as b left outer join batchowner as o\n\t\t\t on b.batchID = o.batchID where o.owner='$filter' order by b.batchID desc\";\n\t}\n\t$fetchR = $sql->query($fetchQ);\n\t\n\t$count = 0;\n\twhile($fetchW = $sql->fetch_array($fetchR)){\n\t\t$c = ($c + 1) % 2;\n\t\t$count += 1;\n\t\t//if ($count > 100) break;\n\t\t$ret .= \"<tr>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=name$fetchW[4]><a id=namelink$fetchW[4] href=\\\"\\\" onclick=\\\"showBatch($fetchW[4]\";\n\t\tif ($fetchW[1] == 4) // batchtype 4\n\t\t\t$ret .= \",'true'\";\n\t\telse\n\t\t\t$ret .= \",'false'\";\n\t\t$ret .= \"); return false;\\\">$fetchW[0]</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=type$fetchW[4]>\".$batchtypes[$fetchW[1]].\"</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=startdate$fetchW[4]>$fetchW[2]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=enddate$fetchW[4]>$fetchW[3]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=owner$fetchW[4]>$fetchW[5]</td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c] id=edit$fetchW[4]><a href=\\\"\\\" onclick=\\\"editBatch($fetchW[4]); return false;\\\">Edit</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c]><a href=\\\"\\\" onclick=\\\"deleteBatch($fetchW[4],'$fetchW[0]'); return false;\\\">Delete</a></td>\";\n\t\t$ret .= \"<td bgcolor=$colors[$c]><a href=\\\"/queries/batches/forLisa.php?batchID=$fetchW[4]\\\">Report</a></td>\";\n\t\t$ret .= \"</tr>\";\n\t}\n\t\n\t$ret .= \"</table>\";\n\treturn $ret;\n}", "public function index() {\n if(auth()->user()->role == 'admin') {\n return view('krs.index');\n }\n\n $krs = Krs::withCount('krsDetail')->where('mahasiswa_nim', '=', auth()->user()->mahasiswa->nim)->latest()->paginate(9);\n\n return view('krs.index_mahasiswa', compact('krs'));\n }", "private function showPage($records)\n {\n $this->data['histories'] = '';\n $this->data['histories'] = $records;\n\n $this->data['pagebody'] = 'History';\n $this->render();\n }", "public function display_all()\n {\n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Membres'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_member();\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function index()\n {\n return VehicleRate::latest()->paginate(7);\n /*return DB::table('tblmotorvehiclelist')\n ->select('PlateNumber','DriverName','OperatorName','EngineNumber','SerialNumber')\n ->orderBy('id', 'desc')\n ->paginate(7);*/\n }", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "public function showCarsPagination($limit, $offset){\n\n echo $offset;\n\n $this->db->query('SELECT * FROM '. CARS_TABLE . ' WHERE `deleted` = 0 LIMIT '. $limit . ' OFFSET ' .$offset );\n $result = $this->db->getAll();\n\n if ( !empty($result) ){\n return array(\n 'success' => true,\n 'data' => $result\n );\n\n }else{\n return false;\n }\n\n }", "function getLimit() ;", "public function limit($limit,$offset);", "public function page_list($limit='0')\n\t{\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t\t\n\t\t}\n\t\t$logged_in=$this->session->userdata('logged_in');\n\t\tif($logged_in['base_url'] != base_url()){\n\t\t$this->session->unset_userdata('logged_in');\t\t\n\t\tredirect('login');\n\t\t}\n\t\t\n\t \t\t$logged_in=$this->session->userdata('logged_in');\n $acp=explode(',',$logged_in['setting']);\n\t\t\tif(!in_array('All',$acp)){\n\t\t\texit($this->lang->line('permission_denied'));\n\t\t\t}\n\t\t\t\n\t\t\n\t\t \t \n\t\t\t\n\t\t\t\n\t $data['title']=$this->lang->line('page_list');\n\t\t\t\t$data['result']=$this->Cms_model->page_list_all($limit);\n\t\t\t\t \n\t\t$this->load->view('header',$data);\n\t\t $this->load->view('page_list',$data);\n\t\t$this->load->view('footer',$data);\n\t}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora aterizare</th>\";\n\t\techo \"<th>De la</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_aterizare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"de_la\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $records = $em->getRepository('dswEvalBundle:Record')->findAll();\n\n return $this->render('record/index.html.twig', array(\n 'records' => $records,\n ));\n }", "public function index()\n {\n //$lim = 5;\n /*\n $vars = [\n \"customers\" => CustomerResource::collection(Customer::all()),\n \"transactions\" => TransactionResource::collection(Transaction::paginate(5)),\n \"search\" => \"\"\n ];\n return $vars;\n */\n $transactions = Transaction::orderBy('updated_at', 'desc')->paginate(5);\n $t = TransactionResource::collection($transactions);\n return $t; \n }", "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('bodymassindex_id',$this->bodymassindex_id);\n\t\t$criteria->compare('LOWER(bmi_range)',strtolower($this->bmi_range),true);\n\t\t$criteria->compare('bmi_minimum',$this->bmi_minimum);\n\t\t$criteria->compare('bmi_maksimum',$this->bmi_maksimum);\n\t\t$criteria->compare('LOWER(bmi_sign)',strtolower($this->bmi_sign),true);\n\t\t$criteria->compare('LOWER(bmi_defenisi)',strtolower($this->bmi_defenisi),true);\n\t\t$criteria->compare('LOWER(bmi_pesan)',strtolower($this->bmi_pesan),true);\n\t\t$criteria->compare('bodymassindex_aktif',$this->bodymassindex_aktif);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "function printAllocationList() {\n\t\t$this->redir->set_last_index();\n\t $this->load->model(array('company/mdl_company','engineers/mdl_engineers','partallocation/mdl_partallocation_details','partallocation/mdl_partallocation','servicecenters/mdl_servicecenters'));\n\t\t$list = $this->mdl_partallocation->getallocatedlist_print();\n \t\t$data = array('lists' =>$list);\n\t\t$this->load->view('printallocationlist',$data);\n\t\t\t\t\t\n\t\t}", "public function filterVisible(): self;", "public function index()\n {\n// table('warehouses')\n// ->join('articles', 'warehouses.id', '=', 'articles.warehouse_id')\n// ->select('articles.stock','warehouses.*')\n// ->distinct()\n// ->get();\n $warehouse = Warehouses::latest()->paginate(5);\n\n return view('warehouse.listWh',compact('warehouse'))\n ->with('i',(request()->input('page',1)-1)*1);\n\n }", "public function actionFaqListing()\n {\n ob_start();\n Yii::app()->theme='back';\n $model=new Faq;\n $rec=Faq::model()->findAll();\n $this->render('faqlisting',array('model'=>$model,'list'=>$rec));\n\n }", "public function testShowRecordPaginate()\n {\n $this->makeData(21);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->resize(1920, 2000)\n ->assertSee('List comment & rating');\n //Count row number in one page \n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(10, $elements);\n $this->assertNotNull($browser->element('.pagination'));\n\n //Count page number of pagination\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element)- 2;\n $this->assertTrue($number_page == 3);\n });\n }", "public function indexShowSet()\n {\n $navid = I('get.nav') ? I('get.nav') : 0;\n $pid = M('admin_nav')->where('id=' . $navid)->find()['pid'];\n $navpname = M('admin_nav')->where('id=' . $pid)->find()['name'];\n $navname = M('admin_nav')->where('id=' . $navid)->find()['name'];\n $re = M('category')->where('navid=' . $navid)->select();\n $arr = array();\n foreach ($re as $k => $v) {\n $arr[] = $v['id'];\n }\n $where['cateid'] = array('in', $arr);\n $where['status'] = 1;\n $data = M('ziliao')->where($where)->order('order_number')->select();\n $assign = array(\n 'data' => $data,\n 'navname' => $navname,\n 'navpname' => $navpname,\n );\n // var_dump($data);die;\n $this->assign($assign);\n $this->display();\n\n }", "public function show($i)\n {\n \n }", "public function list_limit($var,$page){\n if($page>1){\n $page=$page*6-6;\n }else{\n $page=0;\n }\n $sql=\"SELECT a.identificador, a.nombre_inmueble ,e.nombre_t_inmueble ,d.nombre_distrito ,a.direccion ,a.numero ,a.superficie ,\n a.habitaciones ,a.baño ,a.cochera ,a.descripcion ,a.precio ,a.from_url ,a.fecha ,a.tipo ,b.id_operacion ,b.id_people ,\n c.nombre_t_operacion,f.id_contrato,f.identificador as id_contrato,g.tiempo ,f.contrato \n from inmueble as a inner join operacion as b on a.id_inmuebe=b.id_inmueble \n inner join tipo_operacion as c on b.tipo_operacion=c.id_t_operacion inner join distrito as d on a.id_distrito =d.id_distrito\n inner join tipo_inmueble as e on a.tipo_inmueble=e.id_tipo_inmueble inner join contrato as f on b.id_operacion=f.id_operacion\n inner join tipo_contrato as g on f.id_t_contrato=g.id_t_contrato where a.tipo =? limit $page,6\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($var));\n return $rs->fetchAll(PDO::FETCH_OBJ);\n\t\t}", "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\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\tif($offset!==''){ \n\t\t\t\tif ($idRemision!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function index()\n {\n $plans=App\\Plan::paginate(15);//pasamos todoos ls planes a la vista de admin\n return view ('admin.plan.index', compact('plans'));\n }", "public function index()\n {\n return Material::oldest()->paginate(5);\n }", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_decolare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"destinatia\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function index()\n {\n return view('admin.job',['rows' => Job::paginate(1000)]);\n }", "public function getListPerson($limit){\n\t\t$query = $this->halo_model->getListPerson($limit);\n\t\t\n\t\t$table = \"\";\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result() as $row)\n\t\t\t{\n\t\t\t\t//echo $row->Code;\n\t\t\t\t//echo $row->Name;\n\t\t\t\t$table .= \"<tr><td>\".$row->Code.\"</td><td>\".$row->Name.\"</td></tr>\";\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t$this->data[\"table\"] = $table;\n\t\t\n\t\t$this->load->view('v_halo', $this->data);\n\t\t//echo json_encode($query->result());\n\t\t\n\t}", "function get_display_list($dataBaseHandle,$username,$index_id,$per_page,$get_deleted){\n\t\t//echo '<br>list index = '.$index_id;\n\t\t//$table = ($get_deleted)?$username.'_deleted':$username;\n\n\t\t$SqlQuery = '';\n\t\tif ($get_deleted == true){\t\t\n\t\t\t$SqlQuery .= 'SELECT '.$username.'.*,'.$username.'_sorted.id \n\t\t\t\t\t\tFROM '.$username.'_sorted \n\t\t\t\t\t\tINNER JOIN '.$username.' ON ('.$username.'_sorted.task_id = '.$username.'.task_id) AND ('.$username.'_sorted.id > '.$index_id.') \n\t\t\t\t\t\tLIMIT '.$per_page;\t\t\t\n\t\t} else {\n\t\t\t$SqlQuery .= 'SELECT * FROM '.$username.'_deleted LIMIT '.$per_page;\n\t\t}\t\t\t\n\t\treturn $dataBaseHandle->query($SqlQuery);\n\t}" ]
[ "0.6207694", "0.6179446", "0.61589366", "0.607983", "0.6037082", "0.5977527", "0.59486306", "0.5880716", "0.5852229", "0.5840769", "0.5834428", "0.58274543", "0.5825388", "0.5821923", "0.5821362", "0.580684", "0.57953393", "0.5779624", "0.57602304", "0.5757486", "0.57456714", "0.5737746", "0.57223755", "0.5710593", "0.56869334", "0.56868404", "0.56811756", "0.56802917", "0.5668828", "0.5659225", "0.5651012", "0.5649786", "0.5639717", "0.562714", "0.56176925", "0.5612227", "0.5610943", "0.5609122", "0.5609122", "0.5609122", "0.5609122", "0.5609122", "0.56073624", "0.5600093", "0.5595105", "0.55948985", "0.5594099", "0.55898106", "0.55861324", "0.55810827", "0.5579222", "0.5577878", "0.55768764", "0.55692315", "0.5564752", "0.5560278", "0.5549661", "0.55438733", "0.55418175", "0.55411845", "0.55391794", "0.55385923", "0.55353063", "0.5532611", "0.5531481", "0.55303067", "0.5526305", "0.552585", "0.55233973", "0.55171245", "0.5516901", "0.55129856", "0.5512506", "0.55124676", "0.55119085", "0.55055296", "0.5500742", "0.5495359", "0.54870445", "0.5481862", "0.54751366", "0.5473925", "0.5470396", "0.54692394", "0.54662544", "0.545811", "0.5454502", "0.5449851", "0.54497534", "0.5448017", "0.5446487", "0.5446032", "0.54456466", "0.54451257", "0.5440211", "0.54398686", "0.54372704", "0.5436585", "0.5435889", "0.5434585", "0.5434485" ]
0.0
-1
Create a query to get the name and price sorted by price
function show_all_records($dbc) { $query = 'SELECT id, item_name, create_date, status FROM stuff' ; # Execute the query $results = mysqli_query( $dbc , $query ) ; check_results($results); # Show results if ( $results ) { # Initializes the table before executing the query echo '<H1 align="center"></H1>'; echo '<TABLE align="center" cellpadding=5px cellspacing=5px border = "1">'; echo '<TR>'; echo '<TH>ID</TH>' ; echo '<TH>Item Name</TH>'; echo '<TH>Created</TH>'; echo '<TH>Updated</TH>'; echo '<TH>Status</TH>'; echo '<TH>Update Status</TH>'; echo '<TH>Submit Changes</TH>'; echo '</TR>'; # For each row result, generate a table row while ( $row = mysqli_fetch_array( $results, MYSQLI_ASSOC ) ) { echo '<form method = "POST" action = "admin.php">'; echo '<TR>' ; echo '<TD>' . $row['id'] . '</TD>' ; $alink = '<A HREF=adminLogInCheck.php?id='. $row['id'] . '>' . $row['item_name'] . '</A>' ; echo '<TD align="right">' . $alink . '</TD>' ; echo '<TD>' . $row['create_date'] . '</TD>' ; echo '<TD>' . $row['status'] . '</TD>' ; echo '<TD class = "select"> <select name = "Status"> <option value = "lost">Lost</option> <option value = "found">Found</option> </select> </TD>' ; echo '<TD> <input type = "submit" value = "Submit"> </TD>'; echo '</TR>' ; echo '</form>'; echo '</TR>' ; } # End the table echo '</TABLE>'; # Free up the results in memory mysqli_free_result( $results ) ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_vehicles_by_price() {\n global $db;\n $query = 'SELECT * FROM vehicles\n ORDER BY price DESC';\n $statement = $db->prepare($query);\n $statement->execute();\n $vehicles = $statement->fetchAll();\n $statement->closeCursor();\n return $vehicles;\n }", "function getSearchProducts($bdd, $search, $order = 0){\n\t$query = 'SELECT * FROM products WHERE name LIKE :search ORDER BY price';\n\tif($order){\n\t\t$query .= ' DESC';\n\t}\n\t$reponse = $bdd->prepare($query);\n\t$reponse->bindValue(':search', '%' . $search . '%', PDO::PARAM_INT);\n\t$reponse->execute();\n\treturn $reponse->fetchAll();\n\n}", "function orderPrice($count) {\n global $conn;\n if($count == 1) {\n $sql = \"SELECT * FROM `candy` ORDER BY `candy`.`priceId` ASC\";\n }\n else {\n $sql = \"SELECT * FROM `candy` ORDER BY `candy`.`priceId` DESC\"; \n }\n $statement = $conn->prepare($sql);\n $statement->execute();\n $candies = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $candies;\n}", "function getProducts($name, $categoryID, $salePriceMin, $salePriceMax, $basePriceMin, $basePriceMax)\n{\n global $conn;\n \n $sql = \"SELECT * FROM product WHERE 1=1 \";\n \n if (!empty($name))\n {\n $sql .= \" AND Name LIKE :productName\";\n $namedParameters[\":productName\"] = \"%\" . $name . \"%\";\n }\n \n if (!empty($categoryID))\n {\n $sql .= \" AND CategoryId = :categoryId\";\n $namedParameters[\":categoryId\"] = $categoryID;\n }\n \n if (!empty($salePriceMin) AND !empty($salePriceMax))\n {\n $sql .= \" AND SalePrice >= :salePriceMin AND SalePrice <= :salePriceMax \";\n $namedParameters[\":salePriceMin\"] = $salePriceMin;\n $namedParameters[\":salePriceMax\"] = $salePriceMax;\n }\n \n if (!empty($basePriceMin) AND !empty($basePriceMax))\n {\n $sql .= \" AND BasePrice >= :basePriceMin AND BasePrice <= :basePriceMax\";\n $namedParameters[\":basePriceMin\"] = $basePriceMin;\n $namedParameters[\":basePriceMax\"] = $basePriceMax;\n }\n \n $sql .= \" ORDER BY Name\";\n \n $stmt = $conn->prepare($sql);\n $stmt->execute($namedParameters);\n $records = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return $records;\n}", "function get_price($name)\r\n{\r\n //Read data from DB table\r\n\r\n $servername = \"localhost\";\r\n $dbname = \"webservices\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $dbname);\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n } \r\n\t\r\n\r\n \r\n $sql = \"SELECT price, make, model, year FROM vehicles_pinefalls where make ='$name' order by price asc limit 1\";\r\n $result = $conn->query($sql);\r\n\r\n $info=mysqli_fetch_array($result,MYSQLI_ASSOC);\r\n\r\n return $info;\r\n}", "public function testSortByPrice()\n {\n $item1 = new \\Saitow\\Model\\Tire('sql', 1);\n $item1->setPrice(1.1);\n\n $item2 = new Saitow\\Model\\Tire('xml', 50);\n $item2->setPrice(2.2);\n\n $item3 = new \\Saitow\\Model\\Tire('other', 22);\n $item3->setPrice(0.1);\n\n $items = [$item1, $item2, $item3];\n\n $sorted = TiresCollectionSorter::sort($items, \\Saitow\\Library\\TiresDataSource::ORDERBY_PRICE);\n\n $this->assertEquals($item3, $sorted[0]);\n $this->assertEquals($item1, $sorted[1]);\n $this->assertEquals($item2, $sorted[2]);\n }", "public function getAllList_Price()\n {\n try\n {\n // Создаем новый запрс\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n $query->select('a.*');\n $query->from('`#__gm_ceiling_components_option` AS a');\n $query->select('CONCAT( component.title , \\' \\', a.title ) AS full_name');\n $query->select('component.id AS component_id');\n $query->select('component.title AS component_title');\n $query->select('component.unit AS component_unit');\n $query->join('RIGHT', '`#__gm_ceiling_components` AS component ON a.component_id = component.id');\n\n $db->setQuery($query);\n $return = $db->loadObjectList();\n return $return;\n }\n catch(Exception $e)\n {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n }", "public static function getAllorderByName(){\n \t$data = DB::table('fxes')->orderBy('name')->get();\n \treturn $data;\n }", "function allProducts($sort, $order) {\r\n global $conn;\r\n $select = \"SELECT productid, name, category, quantityavailable, quantitysold FROM product ORDER BY \" . $sort . \" \" . $order . \";\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}", "function find_all_sale(){\n global $db;\n $sql = \"SELECT s.id,s.qty,s.price,s.date,p.name\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" ORDER BY s.date DESC\";\n return find_by_sql($sql);\n }", "function searchPrice($price){\n\t\t//Connect to database. Include db_password.php with your MySQL or MariaDB credentials\n\t\n\t\ttry{\n\t\t\tif(!isset($pdo)){\n\t\t\t\t$pdo = new PDO('mysql:host=127.0.0.1;dbname=auction_site_db', $GLOBALS[\"user\"], $GLOBALS[\"pass\"]);\t//'root', 'pizza64');\n\t\t\t}\n\t\t\t$queryString = 'SELECT * FROM AuctionItems WHERE listPrice <= :listPrice'; //= :itemName'; \n\t\t\t//$queryString = \"SELECT * FROM AuctionItems\"; //for debugging\n\t\t\t\n\t\t\t$query = $pdo->prepare($queryString);\n\t\t\t\n\t\t\t//take name variable, add SQL wildcards to find more results\n\t\t\t//$wildcard = \"%\";\n\t\t\t//$iName = {$wildcard}{$GLOBALS[\"name\"]}{$wildcard};\n\t\t\t//print_r($iName);\n\t\t\t//$name = \"fdfd\";\n\t\t\t\n\t\t\t$query->execute(array(':listPrice' => $price));//$GLOBALS[\"name\"]));\t//$name));\n\t\t\t$query_result = $query->fetchAll(PDO::FETCH_BOTH);\n\t\t\t\n\t\t\tif($query_result){\n\t\t\t\t//echo json_encode(array_values($query_result));\n\t\t\t\treturn json_encode(array_values($query_result));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//echo \"No match was found\";\n\t\t\t\t//echo json_encode(array_values([\"itemName\"=>\"failed\", \"itemDescription\"=>\"db query\", \"itemPrice\"=>\"match\"]));\n\t\t\t}\n\t\t\t\n\t\t\t//make everything null so it closes the db connection\n\t\t\t$query = null; \n\t\t\t$pdo = null;\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\t//echo json_encode(array_values([\"itemName\"=>\"failed\", \"itemDescription\"=>\"db query\", \"itemPrice\"=>\"match\"]));\n\t\t\tdie();\n\t\t}\n\t\n\t}", "function sortByPrice($a, $b) { \n return $a['menor_valor'] - $b['menor_valor'];\n}", "function getItemsByPrice($dbh, $min, $max)\r\n{\r\n $stmt = $dbh->prepare ( \"SELECT * FROM items WHERE items.price >= ? and items.price <= ?\"); \r\n\r\n $stmt->bindParam(1,$min);\r\n $stmt->bindParam(2,$max);\r\n\r\n if ($stmt->execute()) \r\n {\r\n showItemsTable($stmt);\r\n }\r\n}", "public function getProductNameAndPriceInPartnerOrdersByProductId() {\n\n $query = $this->db->prepare(\"SELECT o.order_id, p.product_name, p.product_price FROM orders o JOIN products p ON o.order_product_id = p.ext_product_id AND o.order_partner_id = p.vendor_id ORDER BY o.order_id\");\n\n try {\n\n $query->execute();\n\n $result = $query->fetchAll();\n return $result;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "function getItemsBasedOnName($search) {\n $query = \"SELECT \n item.id AS item_id,\n item.name AS item_name,\n item.fee AS item_fee,\n item.description AS item_description,\n item.pickup_lat AS item_pickup_lat,\n item.pickup_long AS item_pickup_long,\n item.return_lat AS item_return_lat,\n item.return_long AS item_return_long,\n item.date_available AS item_date_available,\n item.borrowed AS item_borrowed,\n item.promoted AS item_promoted,\n item.created AS item_created,\n item.last_updated AS item_last_updated,\n c.name AS categories_name,\n c.image_url AS categories_image_url,\n u.username AS user_username,\n u.profile_image_url AS user_profile_image_url,\n image.image_link,\n image.cover AS cover_image\n FROM items item, item_images image, categories c, users u\n WHERE item.id = image.item_id \n AND item.category_id = c.id\n AND item.user_id = u.id\n AND LOWER(item.name) LIKE LOWER(\"\n .string('%'.$search .'%')\n .\") ORDER BY item.last_updated DESC\";\n\n $go_q = pg_query($query);\n $items = array();\n\n while ($fe_q = pg_fetch_assoc($go_q)) {\n $items[$fe_q['item_id']]['id'] = $fe_q['item_id'];\n $items[$fe_q['item_id']]['name'] = $fe_q['item_name'];\n $items[$fe_q['item_id']]['fee'] = $fe_q['item_fee'];\n $items[$fe_q['item_id']]['description'] = $fe_q['item_description'];\n $items[$fe_q['item_id']]['pickup_lat'] = $fe_q['item_pickup_lat'];\n $items[$fe_q['item_id']]['pickup_long'] = $fe_q['item_pickup_lat'];\n $items[$fe_q['item_id']]['return_lat'] = $fe_q['item_return_lat'];\n $items[$fe_q['item_id']]['return_long'] = $fe_q['item_return_long'];\n $items[$fe_q['item_id']]['date_available'] = $fe_q['item_date_available'];\n $items[$fe_q['item_id']]['borrowed'] = $fe_q['item_borrowed'];\n $items[$fe_q['item_id']]['promoted'] = $fe_q['item_promoted'];\n $items[$fe_q['item_id']]['created'] = $fe_q['item_created'];\n $items[$fe_q['item_id']]['last_updated'] = $fe_q['item_last_updated'];\n $items[$fe_q['item_id']]['categories_name'] = $fe_q['categories_name'];\n $items[$fe_q['item_id']]['categories_image_url'] = $fe_q['categories_image_url'];\n $items[$fe_q['item_id']]['username'] = $fe_q['user_username'];\n $items[$fe_q['item_id']]['profile_image_url'] = $fe_q['user_profile_image_url'];\n if ($fe_q['cover_image'] == t) {\n $items[$fe_q['item_id']]['cover_image'] = $fe_q['image_link'];\n } else {\n $items[$fe_q['item_id']]['images'][] = array('image_link' => $fe_q['image_link']);\n }\n }\n\n return $items;\n\n}", "function getInventoryOrderedLow(){\n global $db;\n \n $stmt=$db->prepare(\"SELECT idItem, `name`, amount, unitPrice, salesPrice, parAmount, (amount / parAmount) AS orderAmount FROM inventory ORDER BY orderAmount ASC;\");\n \n if($stmt->execute() && $stmt->rowCount()>0){\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return ($results);\n }\n else{\n return false;\n }\n }", "function es_add_catalog_order_by_member_prices($catalog_orderby_options) {\n\tunset($catalog_orderby_options[\"rating\"]);\n\n\t$catalog_orderby_options['member_price'] = __( 'Sort by member price', 'woocommerce' );\n\t\n\treturn $catalog_orderby_options;\n}", "function high_price(){\n\n\tglobal $con;\t\n\t$get_hprice = \"SELECT * FROM items ORDER BY item_pice DESC\";\n\t$run_hprice = mysql_query($get_hprice);\t\n\tshow_item($run_hprice);\n\n}", "function sortWithMoneyAndAlph($a, $b)\n{\n $aPrice = $a[\"price\"];\n $bPrice = $b[\"price\"];\n if (is_numeric($aPrice) and is_numeric($bPrice)) {\n $diff = $aPrice- $bPrice;\n } elseif (is_numeric($aPrice)) {\n $diff= 1; //only a is a nmber\n } else {\n $diff = -1; //only b is a number\n }\n\n\n $moneyRank = priceSort($a, $b);\n if ($diff == 0) {\n return critterNameSort($a, $b);\n }\n return $moneyRank;\n}", "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "function low_price(){\n\tglobal $con;\t\n\t$get_lprice = \"SELECT * FROM items ORDER BY item_pice ASC\";\n\t$run_lprice = mysql_query($get_lprice);\t\n\tshow_item($run_lprice);\n\n}", "public function priceList(Request $request){\n /*==Sorting filter on price ghazanfar on 27-1-2020==*/\n\n // $objProduct=Product::select('products.id','products.name','products.image_url','products.msrp','products.price','products.brand_id','products.category_id','product_rugs.collection','product_rugs.size','product_rugs.color','product_decors.collection','product_decors.size','product_decors.color')->Join('product_rugs','product_rugs.product_id','=','products.id')->Join('product_decors','product_decors.product_id','=','products.id')->where($request->filter)->orderBy('price',$request->order)->paginate(12);\n\n \n $objProduct=Product::has('productRug')->select('products.id','products.name','products.image_url','products.msrp','products.price','products.brand_id','products.category_id','product_rugs.collection','product_rugs.size','product_rugs.color')->Join('product_rugs','product_rugs.product_id','=','products.id')->where($request->filter)->orderBy('price',$request->order)->where('active',1)->paginate(12);\n \n if(count($objProduct)==0){\n\n $objProduct=Product::has('productDecor')->select('products.id','products.name','products.image_url','products.msrp','products.price','products.brand_id','products.category_id','product_decors.collection','product_decors.size','product_decors.color')->Join('product_decors','product_decors.product_id','=','products.id')->orderBy('price',$request->order)->where($request->filter)->where('active',1)->paginate(12);\n \n }\n \n return view('layouts.product_listing',compact('objProduct'));\n }", "public function getSortedItemsByPrice($order = 'asc')\n\t{\n $sorted = array();\n foreach ( $this->items as $item ) {\n $sorted[($item->getPrice() * 100)] = $item;\n }\n ksort($sorted, SORT_NUMERIC);\n\t\treturn ($order == 'asc') ? $sorted : array_reverse($sorted);\n }", "public function testSortByPrice()\n {\n $result=$this->sort->sortByPrice();\n $result = $this->hotelMapperService->serialize($result);\n $this->assertInternalType('array',$result);\n foreach ($result as $i => $hotel) {\n var_dump($hotel['price']);die;\n $this->assertGreaterThan($result[$i+1]['price'],$hotel['price']);\n $this->assertArrayHasKey('name', $hotel);\n $this->assertArrayHasKey('price', $hotel);\n $this->assertArrayHasKey('city', $hotel);\n $this->assertArrayHasKey('availability', $hotel);\n } \n }", "public function orderBy($sql);", "public function getProductNameInOrdersByProductId() {\n\n $query = $this->db->prepare(\"SELECT o.order_id, p.product_name FROM orders o JOIN products p ON o.order_product_id = p.product_id\");\n\n try {\n\n $query->execute();\n\n $result = $query->fetchAll();\n return $result;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public static function listAll(){//le todos os dados da tabela\n\n\t\t$sql = new Sql();\n\n\t\treturn $sql->select(\n\t\t\t\"SELECT * FROM tb_products ORDER BY desproduct\" \n\t\t\t);\n\t}", "public function getAllOrderedByName()\n {\n return $this->model->orderBy('name', 'asc')->get();\n }", "public function &getOrderBy();", "Function SalesPriceUsedInOrder($int_record_id) {\r\n return GetField(\"SELECT orders.OrderID\r\n\t\t\t\t\t FROM order_details\r\n\t\t\t\t\t INNER JOIN orders ON orders.OrderID = order_details.OrderID\r\n\t\t\t\t\t INNER JOIN pricing ON pricing.ProductID = order_details.ProductID\r\n\t\t\t\t\t\t\t\t\t AND (order_details.Quantity >= pricing.start_number OR pricing.start_number = 0)\r\n\t\t\t\t\t\t\t\t\t\t AND (order_details.Quantity <= pricing.end_number OR pricing.end_number = 0)\r\n\t\t\t\t\t\t\t\t\t\t AND (pricing.ContactID = orders.ContactID OR pricing.ContactID = 0)\r\n\t\t\t\t\t\t\t\t\t AND (orders.OrderDate >= pricing.start_date OR pricing.start_date = 0)\r\n\t\t\t\t\t\t\t\t\t AND (orders.OrderDate <= pricing.end_date OR pricing.end_date = 0)\r\n\t\t\t\t\t\t\t\t\t\t AND (order_details.Quantity <= pricing.end_number OR pricing.end_number = 0)\r\n\t\t\t\t\t WHERE recordID = $int_record_id\");\r\n}", "function fetch_prices()\n {\n $data = $this->db->query('SELECT * FROM `users_prices` WHERE users_price_order != 999 ORDER BY users_price_order ASC');\n if (!isset($data[0])) {\n return false;\n }\n return $data;\n }", "public function modelReadSearchProductPrice($fromPrice,$toPrice,$recordPerPage){\n\t\t\t//lay bien p truyen tu url\n\t\t\t$p = isset($_GET[\"p\"]) && is_numeric($_GET[\"p\"]) && $_GET[\"p\"] > 0 ? ($_GET[\"p\"]-1) : 0;\t\t\t\n\t\t\t//lay tu ban ghi nao\n\t\t\t$from = $p * $recordPerPage;\n\t\t\t//---\n\t\t\t//lay bien ket noi csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van\n\t\t\t$query = $conn->query(\"select * from products where price >= $fromPrice and price <= $toPrice order by id desc limit $from,$recordPerPage\");\n\t\t\t//lay toan bo ket qua tra ve\n\t\t\t$result = $query->fetchAll();\t\t\t\n\t\t\t//---\n\t\t\treturn $result;\n\t\t}", "public function getProductsWithName($name){\r\n\t\t$newQuery = \"SELECT * from products \".\r\n\t\t\t\t\" WHERE name LIKE '%\".$name.\"%'\";\r\n\t\t\r\n\t\treturn $GLOBALS['dbObj']->dbQuery($newQuery);\r\n\t}", "protected function priceSearch($price,$query)\n {\n\n if ($price != null )\n $query->whereBetween('price',[$price-200000,$price]);\n\n }", "public static function getItem($name = '') {\n\n // Recommended: Secure Way to Write SQL in Yii \n $sql = 'SELECT id ,concat_ws(\" : \",name,unit_price) AS text \n FROM item \n WHERE (name LIKE :name or item_number=:item_number)';\n $name = '%' . $name . '%';\n $item_number = $name;\n return Yii::app()->db->createCommand($sql)->queryAll(true, array(':name' => $name, ':item_number'=>$item_number));\n \n }", "public function getPrices()\n {\n }", "function sortLowToHigh($a, $b)\n{\n return $a->price < $b->price ? -1 : 1; //Compare the prices, evalutes to true\n // return $a->price > $b->price ? 1 : -1; // Gives the same result\n}", "function getProductBasics() {\n $db = acmeConnect();\n $sql = 'SELECT invName, invId FROM inventory ORDER BY invName ASC';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $products = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $products;\n }", "public function modelSearchPrice($recordPerPage){\n\t\t\t$fromPrice = isset($_GET[\"fromPrice\"])?$_GET[\"fromPrice\"]:0;\n \t\t$toPrice = isset($_GET[\"toPrice\"])?$_GET[\"toPrice\"]:0;\n\t\t\t//tong so ban ghi\n\t\t\t$totalRecord = $this->modelTotalRecordSearchPrice();\n\t\t\t//tinh so trang\n\t\t\t//ham ceil la ham lay tran cua gia tri. VD: ceil(2.1) = 3\n\t\t\t//ham floor la ham lay san cua gia tri. VD: floor(2.6) = 2\n\t\t\t$numPage = ceil($recordPerPage/$totalRecord);\n\t\t\t//lay bien p truyen tu url\n\t\t\t$p = isset($_GET[\"p\"])&&is_numeric($_GET[\"p\"])&&$_GET[\"p\"]>0 ? ($_GET[\"p\"]-1):0;\n\t\t\t//lay tu ban ghi nao\n\t\t\t$from = $p * $recordPerPage;\n\t\t\t//thuc hien truy van\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select * from products where price >= $fromPrice and price <= $toPrice order by id desc limit $from,$recordPerPage\");\n\t\t\t//lay tat ca ban ghi tra ve\n\t\t\t$result = $query->fetchAll();\n\t\t\treturn $result;\n\t\t}", "function getToppingsSalesFromDB()\n{\n\t$con = mysql_connect(\"localhost\", \"DBandGUI\", \"narwhal\");\n\n\tif(!$con) { die('Could not connect: ' . mysql_error()); }\n\n\tmysql_select_db(\"CustomCupcakes\", $con) or die('Could not select db: ' . mysql_error());\n\n\t$query = \"SELECT topping_Name,purchase_Amount FROM CupcakeTopping;\";\n\n\t$result = mysql_query($query);\n\n\t$finalArr = array();\n\n\twhile($row = mysql_fetch_array($result))\n\t{\n\t\t$finalArr[$row['topping_Name']] = $row['purchase_Amount'];\n\t}\n\n\tmysql_close($con);\n\n\treturn $finalArr;\n}", "public function getPriceLists(): ActiveQuery\n {\n return $this->hasMany(PriceList::className(), ['adv_prod_type_id' => 'id']);\n }", "public function __construct($name, $price) {\n $this->name = $name;\n $this->price = $price;\n }", "public function LoadProductsForPrice()\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tSELECT\n\t\t\t\t\tp.*,\n\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating,\n\t\t\t\t\timageisthumb,\n\t\t\t\t\timagefile,\n\t\t\t\t\t\" . GetProdCustomerGroupPriceSQL() . \"\n\t\t\t\tFROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tDISTINCT ca.productid,\n\t\t\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t[|PREFIX|]categoryassociations ca\n\t\t\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tp.prodvisible = 1 AND\n\t\t\t\t\t\t\tca.categoryid IN (\" . $this->GetProductCategoryIds() . \") AND\n\t\t\t\t\t\t\tp.prodcalculatedprice >= '\".(int)$this->GetMinPrice().\"' AND\n\t\t\t\t\t\t\tp.prodcalculatedprice <= '\".(int)$this->GetMaxPrice().\"'\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\" . $this->GetSortField() . \", p.prodname ASC\n\t\t\t\t\t\t\" . $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage')) . \"\n\t\t\t\t\t) AS ca\n\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb = 1 AND p.productid = pi.imageprodid)\n\t\t\t\";\n\n\t\t\t//$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage'));\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$row['prodavgrating'] = (int)$row['prodavgrating'];\n\t\t\t\t$this->_priceproducts[] = $row;\n\t\t\t}\n\t\t}", "function getTodosProdutos($order='titulo ASC', $startwith=null, $simple=true)\n{\n global $conn;\n\n $order = !empty($order) ? $order : 'titulo ASC';\n $whr = null;\n $sql = \"SELECT\n pro_id,\n pro_titulo,\n pro_tipo,\n pro_valor\n FROM \".TP.\"_produto\n WHERE pro_status=1\n ORDER BY pro_{$order};\";\n $lst = array();\n if(!$qry = $conn->prepare($sql))\n echo divAlert($conn->error, 'error');\n\n else {\n\n $qry->execute();\n $qry->bind_result($id, $titulo, $tipo, $valor);\n\n if (!empty($startwith))\n $lst[0] = array('id'=>0, 'titulo'=>$startwith);\n\n $i=1;\n while ($qry->fetch()) {\n if (!$simple)\n $i = linkfySmart($titulo);\n\n $lst[$i]['id'] = $id;\n $lst[$i]['titulo'] = mb_strtoupper($titulo, 'utf8');\n $lst[$i]['tipo'] = $tipo;\n $lst[$i]['valor'] = 'R$ '.Moeda($valor);\n $lst[$i]['valor_decimal'] = $valor;\n\n if ($simple)\n $i++;\n }\n\n $qry->close();\n\n return $lst;\n }\n\n}", "public static function loadProductsTopSale()\n {\n $ret = array();\n $sql = \"select p.ProID,p.ProName,p.Price, SUM(od.quantity) from products p,orderdetails od \n\t\t\t\twhere p.ProID = od.ProId\n\t\t\t\tGROUP BY p.ProID\n\t\t\t\tORDER BY od.quantity DESC limit 0,10\";\n $list = DataProviderMain::execQuery($sql);\n\n while ($row = mysqli_fetch_array($list)) {\n $proId = $row[\"ProID\"];\n $proName = $row[\"ProName\"];\n //$tinyDes = $row[\"TinyDes\"];\n //$fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n //$quantity = $row[\"Quantity\"];\n //$catId = $row[\"CatID\"];\n //$view = $row[\"NView\"];\n //$dayAdd = $row[\"DayAdd\"];\n //$classify =$row[\"Classify\"];\n\n $p = new Products($proId, $proName, '', '', $price, '', '', '', '', '');\n array_push($ret, $p);\n }\n\n return $ret;\n }", "public static function sortByName(){\n \n $db = Db::getConnection();\n \n $result = $db->query('SELECT * FROM task ORDER BY user_name ASC');\n\n return $result->fetchAll();\n }", "function getOrderings() ;", "public function modelTotalRecordSearchPrice(){\n\t\t\t$fromPrice = isset($_GET[\"fromPrice\"])?$_GET[\"fromPrice\"]:0;\n \t\t$toPrice = isset($_GET[\"toPrice\"])?$_GET[\"toPrice\"]:0;\n\t\t\t//lay bien ket noi\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van\n\t\t\t$query = $conn->prepare(\"select id from products where price >= $fromPrice and price <= $toPrice\");\n\t\t\t//thuc thi truy van. Neu khong co tham so o cau truy van thi ghi array rong\n\t\t\t$query->execute(array());\n\t\t\t//tra ve so luong ban ghi\n\t\t\treturn $query->rowCount() > 0 ? $query->rowCount() : 1;\n\t\t}", "function get_vehicles_by_year() {\n global $db;\n $query = 'SELECT * FROM vehicles\n ORDER BY year DESC';\n $statement = $db->prepare($query);\n $statement->execute();\n $vehicles = $statement->fetchAll();\n $statement->closeCursor();\n return $vehicles;\n }", "function getAllOrders()\n {\n $database = new Database();\n\n $conn = $database->getConnection();\n\n $stmt = $conn->prepare(\"SELECT * FROM mfqgkhncw3r34ada.orders INNER JOIN mfqgkhncw3r34ada.order_details ON mfqgkhncw3r34ada.orders.ID=mfqgkhncw3r34ada.order_details.orders_ID ORDER BY mfqgkhncw3r34ada.orders.TOTAL_PRICE DESC\");\n\n $stmt->execute();\n\n $result = $stmt->get_result();\n\n if (!$result) {\n echo \"assume there is an error in SQL statement\";\n exit;\n }\n\n if ($result->num_rows == 0) {\n return null;\n } else {\n\n $order_array = array();\n\n while ($user = $result->fetch_assoc()) {\n array_push($order_array, $user);\n }\n return $order_array;\n }\n }", "public function search($params)\n {\n $query = Deal::find()->alias('d1')\n ->select([\n '*',\n 'TRUNCATE(price*(1.01),2) as \"1%_price\"',\n 'TRUNCATE(price*(1.02),2) as \"2%_price\"',\n 'TRUNCATE(price*(1.03),2) as \"3%_price\"',\n 'TRUNCATE(price*(1.04),2) as \"4%_price\"',\n 'TRUNCATE(price*(1.05),2) as \"5%_price\"',\n 'if(is_sell=1,TRUNCATE((sell_price-price)*num,2),0) win_money'\n ])\n ;\n\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $query;\n }\n\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'd1.id' => $this->id,\n 'd1.price' => $this->price,\n 'd1.num' => $this->num,\n 'd1.date' => $this->date,\n ]);\n $query->orderBy(['is_sell'=>SORT_ASC,'d1.stock_id'=>SORT_DESC,'d1.price'=>SORT_ASC]);\n\n return $query;\n }", "function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }", "public function prices()\n {\n return $this->hasMany(Price::class);\n }", "function getHotelsByNameOrderBy( $ime_grada, $kriterij )\n\t{\n\t\t//slucaj kad korisnik zeli sortirati po atributima iz tablice projekt_hoteli\n\t\t\tif($kriterij === 'udaljenost_od_centra' || $kriterij === 'ocjena' || $kriterij === 'broj_zvjezdica')\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$db = DB::getConnection();\n\t\t\t\t\tif($kriterij === 'udaljenost_od_centra')\n\t\t\t\t\t\t$st = $db->prepare( 'SELECT * FROM projekt_hoteli WHERE ime_grada=:ime_grada ORDER BY udaljenost_od_centra' );\n\t\t\t\t\tif($kriterij === 'ocjena')\n\t\t\t\t\t\t$st = $db->prepare( 'SELECT * FROM projekt_hoteli WHERE ime_grada=:ime_grada ORDER BY ocjena' );\n\t\t\t\t\tif($kriterij === 'broj_zvjezdica')\n\t\t\t\t\t\t$st = $db->prepare( 'SELECT * FROM projekt_hoteli WHERE ime_grada=:ime_grada ORDER BY broj_zvjezdica' );\n\t\t\t\t\t$st->execute(array('ime_grada' => $ime_grada));\n\t\t\t}\n\t\t\tcatch( PDOException $e ) { exit( 'PDO error ' . $e->getMessage() ); }\n\n\t\t\t//popuni polje soba koje je dodatna varijbla u klasi hotel.class osim atributa iz\n\t\t\t//tablice projekt_hoteli\n\t\t\t$arr = array();\n\t\t\twhile( $row = $st->fetch() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$db = DB::getConnection();\n\t\t\t\t\t$st2 = $db->prepare( 'SELECT * FROM projekt_sobe WHERE id_hotela=:id_hotela' );\n\t\t\t\t\t$st2->execute(array('id_hotela' => $row['id']));\n\t\t\t\t}\n\t\t\t\tcatch( PDOException $e ) { exit( 'PDO error ' . $e->getMessage() ); }\n\n\t\t\t\t$arr2 = array();\n\t\t\t\twhile ($row2 = $st2->fetch())\n\t\t\t\t\t$arr2[] = new Soba($row['ime_hotela'], $row2['id'], $row2['id_hotela'], $row2['broj_osoba'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row2['tip_kreveta'], $row2['vlastita_kupaonica'], $row2['cijena_po_osobi']);\n\t\t\t\t$arr[] = new Hotel( $row['id'], $row['ime_grada'], $row['ime_hotela'], $row['adresa_hotela'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row['udaljenost_od_centra'], $row['ocjena'], $row['broj_zvjezdica'], $arr2 );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$arr = array();\n\t\t\t//prvo dohvati sobe soritrane po kriteriju\n\t\t\t$sobe = $this->getRoomsByNameOrderBy($ime_grada, $kriterij);\n\t\t\tforeach($sobe as $var)\n\t\t\t{\n\t\t\t\t//za svaku sobu nadji hotel kojem pripada\n\t\t\t\t$db = DB::getConnection();\n\t\t\t $st = $db->prepare( 'SELECT * FROM projekt_hoteli WHERE id=:id_hotela' );\n\t\t\t\t$st->execute(array('id_hotela' => $var->id_hotela));\n\t\t\t\twhile( $row = $st->fetch() )\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$db = DB::getConnection();\n\t\t\t\t\t\t//mozda nepotreban dio, bitno je samo dohvatit sobe hotela kao i u gornjem\n\t\t\t\t\t\t//prvom slucaju da bi se to polje moglo spremit u klasu hotel.class\n\t\t\t\t\t\tif($kriterij === 'broj_osoba')\n\t\t\t\t\t\t\t$st2 = $db->prepare( 'SELECT * FROM projekt_sobe WHERE id_hotela=:id_hotela ORDER BY broj_osoba' );\n\t\t\t\t\t if($kriterij === 'cijena_po_osobi')\n\t\t\t\t\t\t\t$st2 = $db->prepare( 'SELECT * FROM projekt_sobe WHERE id_hotela=:id_hotela ORDER BY cijena_po_osobi' );\n\t\t\t\t\t\t$st2->execute(array('id_hotela' => $row['id']));\n\t\t\t\t\t}\n\t\t\t\t\tcatch( PDOException $e ) { exit( 'PDO error ' . $e->getMessage() ); }\n\n\t\t\t\t\t$arr2 = array();\n\t\t\t\t\twhile ($row2 = $st2->fetch())\n\t\t\t\t\t\t$arr2[] = new Soba($row['ime_hotela'], $row2['id'], $row2['id_hotela'], $row2['broj_osoba'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row2['tip_kreveta'], $row2['vlastita_kupaonica'], $row2['cijena_po_osobi']);\n\t\t\t\t\t$arr[] = new Hotel( $row['id'], $row['ime_grada'], $row['ime_hotela'], $row['adresa_hotela'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row['udaljenost_od_centra'], $row['ocjena'], $row['broj_zvjezdica'], $arr2 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\n\t}", "function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleague_playground ORDER BY ordering';\n\t}", "public function index(Request $request, $page = 1) {\n\n $orderByOptions = [\n 'price' => ['field'=>'price', 'order' => 'asc'],\n '!price' => ['field' => 'price', 'order' => 'desc'],\n 'title' => ['field'=>'name', 'order'=>'asc'],\n '!title' => ['field'=>'name', 'order'=>'desc']\n ];\n\n $orderByKey = $request->get('order');\n\n if ( !$orderByKey || !array_key_exists($orderByKey, $orderByOptions) ) {\n $orderByKey = 'price';\n }\n\n $orderBy = $orderByOptions[$orderByKey];\n// $paginator = $productRepository->findAllPaginated($page, $orderBy['field'], $orderBy['order']);\n $paginator = [];\n return view('main.index', ['paginator'=>$paginator]);\n }", "public function fetchCoffeeShops(){\n // $endPrice = $this->_request['endPrice'] != \"undefined\" ? intval ($this->_request['endPrice']) : -1;\n \n\n $sql = \"select distinct * from coffee_shops cf join city c on cf.CityId = c.CityID \";\n // if($startPrice!=\"undefined\")\n // {\n // $sql.=\" where cf.start_price>=$startPrice \";\n // if($endPrice != -1 )\n // $sql.=\" and cf.end_price<=$endPrice\";\n // }\n $rows = $this->executeGenericDQLQuery($sql);\n $coffeeShops = array();\n for($i=0;$i<sizeof($rows);$i++)\n {\n\n\n $coffeeShops[$i]['Name'] =($rows[$i]['Name'] == null || $rows[$i]['Name'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Name'] ;\n $coffeeShops[$i]['Address'] =($rows[$i]['Address'] == null || $rows[$i]['Address'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Address'] ;\n $coffeeShops[$i]['content'] =($rows[$i]['content'] == null || $rows[$i]['content'] ==\"null\") ? \"No Data Available\" : $rows[$i]['content'] ;\n $coffeeShops[$i]['Phone1'] =($rows[$i]['Phone1'] == null || $rows[$i]['Phone1'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone1'] ;\n $coffeeShops[$i]['Phone2'] =($rows[$i]['Phone2'] == null || $rows[$i]['Phone2'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone2'] ;\n $coffeeShops[$i]['Phone3'] =($rows[$i]['Phone3'] == null || $rows[$i]['Phone3'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone3'] ;\n $coffeeShops[$i]['Mobile'] =($rows[$i]['Mobile'] == null || $rows[$i]['Mobile'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Mobile'] ;\n $coffeeShops[$i]['Website'] =($rows[$i]['Website'] == null || $rows[$i]['Website'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Website'] ;\n $coffeeShops[$i]['Category'] =($rows[$i]['Category'] == null) ? 0 : $rows[$i]['Category'] ;\n $coffeeShops[$i]['Facilities'] =$this->getFacilitiesByIds($rows[$i]['Facilities']);\n $coffeeShops[$i]['CityId'] =$rows[$i]['CityId'] ;\n $coffeeShops[$i]['icon_image'] =($rows[$i]['icon_image'] == null || $rows[$i]['icon_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['icon_image'] ;\n $coffeeShops[$i]['home_image'] =($rows[$i]['home_image'] == null || $rows[$i]['home_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['home_image'] ;\n \n \n \n \n }\n $this->response($this->json($coffeeShops), 200);\n\n }", "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "public function getEggWidgetProducts(array $params)\n {\n $sql = 'SELECT *';\n if ($params['sortby'] == 'discount')\n $sql .= ', old_price-price as discount';\n\n $sql .= ' from ' . $this->tableName();\n\n //where\n $ids = array();\n $where = array();\n if ($params['affegg_ids'])\n {\n $ids = explode(',', $params['affegg_ids']);\n if ($ids)\n {\n $inQuery = implode(',', array_fill(0, count($ids), '%d'));\n $where[] = 'egg_id IN(' . $inQuery . ')';\n }\n }\n if ($params['in_stock'])\n $where[] = 'in_stock = 1';\n if ($params['sortby'] == 'discount')\n $where[] = 'old_price != 0';\n if ($where)\n $sql .= \" WHERE \" . implode(\" AND \", $where);\n\n //order\n if ($params['sortby'] == 'last')\n $params['sortby'] = \"egg_id\";\n $sql .= ' ORDER BY ';\n if ($params['sortby'] == 'random')\n $sql .= 'RAND()';\n elseif ($params['sortby'] == 'create_date')\n $sql .= 'create_date DESC';\n elseif ($params['sortby'] == 'last_update')\n $sql .= 'last_update DESC';\n elseif ($params['sortby'] == 'egg_id')\n $sql .= 'egg_id DESC';\n elseif ($params['sortby'] == 'discount')\n $sql .= 'discount DESC';\n\n //limit\n if ($params['limit'])\n $sql .= ' LIMIT ' . (int) $params['limit'];\n if ($ids)\n $sql = $this->getDb()->prepare($sql, $ids);\n $rows = $this->getDb()->get_results($sql, \\ARRAY_A);\n if (!$rows)\n return array();\n foreach ($rows as $i => $r)\n {\n $rows[$i]['extra'] = unserialize($r['extra']);\n }\n return $rows;\n }", "function getProductsbySearch($Search){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn->prepare(\"\tSELECT * \n\t\t\t\t\t\t\t\t\tFROM `product` \n\t\t\t\t\t\t\t\t\tWHERE `name` LIKE ? OR \n\t\t\t\t\t\t\t\t\t`description` LIKE ? OR\n\t\t\t\t\t\t\t\t\t`large_description` LIKE ? AND `stock`>0\");\n\t\t$Search = '%'.$Search.'%';\n\t\t$Search = str_replace(\" \", \"%\", $Search);\n\t\t$sth \t-> execute(array($Search, $Search, $Search));\n\n\t\treturn \t$sth;\n\t}", "public function testOrder()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->order('price'));\n\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [['price' => ['order' => 'desc']]];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['created' => 'asc']);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['modified' => 'desc', 'score' => 'asc']);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ['modified' => ['order' => 'desc']],\n ['score' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['clicks' => ['mode' => 'avg', 'order' => 'asc']]);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ['modified' => ['order' => 'desc']],\n ['score' => ['order' => 'asc']],\n ['clicks' => ['mode' => 'avg', 'order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['created' => 'asc'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['created' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n }", "public function getSortBy();", "public function sortProductByCreatedAt()\n {\n $query=new \\yii\\db\\Query();\n return $sort=$query->from('product')->where(['status' => self::ACTIVE_STATUS])->orderBy('created_at DESC')->all();\n }", "function getAllProducts(){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn->prepare(\"\tSELECT id, name, description, price, stock, img_src \n\t\t\t\t\t\t\t\t\tFROM `product` \n\t\t\t\t\t\t\t\t\tWHERE `stock`>0\");\n\t\t$sth \t->execute();\n\t\t\n\t\treturn \t$sth;\n\t}", "function shipPriceList($argWhere = '', $argLimit = '') {\n global $objGeneral;\n $this->orderOptions = 'pkpriceid DESC';\n\n $varQuery = \"SELECT pkpriceid,zonetitleid,shippingmethod,maxlength,maxwidth,maxheight,minkg,maxkg,costperkg,\"\n . \" handlingcost,fragilecost,deliveryday,cubicweight,title,MethodName,created,modified,pricestatus,logisticTitle \"\n . \" FROM \" . TABLE_ZONEPRICE . \" \"\n . \" LEFT JOIN \" . TABLE_ZONE . \" ON zoneid = zonetitleid \"\n . \" LEFT JOIN \" . TABLE_LOGISTICPORTAL . \" ON fklogisticidvalue = logisticportalid \"\n . \" LEFT JOIN \" . TABLE_SHIPPING_METHOD . \" ON pkShippingMethod = shippingmethod \"\n . \" WHERE \" . $argWhere . \" ORDER BY pkpriceid DESC LIMIT \" . $argLimit . \"\";\n //pre($varQuery);\n $arrRes = $this->getArrayResult($varQuery);\n //$varTable = TABLE_ZONEPRICE;\n //$arrRes = $this->select($varTable, $arrClms, $argWhere, $this->orderOptions, $argLimit);\n return $arrRes;\n }", "function getAll($tName, $order){\r\n\tglobal $con;\r\n\t$getAll = $con->prepare(\"SELECT * FROM $tName ORDER BY $order DESC\");\r\n\t$getAll->execute();\t\r\n\t$all = $getAll->fetchAll();\r\n\treturn $all;\r\n}", "function orderBy($param, $array){\n $x=0;\n if ($param === \"1\"){\n foreach ( $array as $price ){\n $arrayPrice[$x] = $price[3].$price[0];\n $x++;\n }\n $x=0;\n sort($arrayPrice,SORT_NUMERIC);\n foreach ( $array as $hotel ){\n foreach ( $array as $hotel ) {\n if (is_string($arrayPrice[$x])){\n if (str_contains($arrayPrice[$x], $hotel[0])) {\n $arrayPrice[$x] = $hotel;\n }\n }\n }\n $x++;\n }\n return $arrayPrice;\n }\n else{\n foreach ( $array as $km ){\n $arrayKm[$x] = $km['KM'];\n $x++;\n }\n $x=0;\n sort($arrayKm);\n foreach ( $array as $km ){\n foreach ( $array as $hotel ){\n if($arrayKm[$x] == $hotel['KM'] ) {\n $arrayKm[$x] = $hotel;\n }\n }\n $x++;\n }\n return $arrayKm;\n }\n }", "public function getPriceCodeAndName()\n {\n return DB::table($this->table_wrist)\n ->select(DB::raw('wristband_style.code AS `style_code`, wristband_style.name AS `style_name`, wristband_size.code AS `size_code`, wristband_size.name AS `size_name`, price.qty, price.price'))\n ->join('wristband_style', 'price.style_id', '=', 'wristband_style.id')\n ->join('wristband_size', 'price.size_id', '=', 'wristband_size.id')\n ->get();\n }", "public function listProductprices(){\n try{\n $sql = \"Select * from productforsale pr inner join product p on pr.id_product = p.id_product inner join categoryp c on p.id_categoryp = c.id_categoryp inner join medida m on p.product_unid_type = m.medida_id\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll();\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), 'Inventory|listProductprices');\n $result = 2;\n }\n\n return $result;\n }", "public function get_price() {\n $query = $this->db->query(\"SELECT * FROM price \");\n\n if ($query) {\n return $query->result_array();\n }\n }", "public function order();", "public function getProducts()\n {\n $products = [\n [\"name\" => \"Sledgehammer\", \"price\" => 125.75],\n [\"name\" => \"Axe\", \"price\" => 190.50],\n [\"name\" => \"Bandsaw\", \"price\" => 562.131],\n [\"name\" => \"Chisel\", \"price\" => 12.9],\n [\"name\" => \"Hacksaw\", \"price\" => 18.45],\n ];\n return $products;\n }", "public function getPriceFromDatabase()\n {\n }", "public function getShopperList($query)\n {\n $prevPeriod = $this->getPrevDatePeriod($query['startDate'], $query['endDate']);\n \n $granularity = $this->getGranularity($query['startDate'], $query['endDate']);\n if($granularity == 'month') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n } else if($granularity == 'day') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM-DD\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n }\n\n if($query['sort'] == 'highest')\n $ratingOrder = 'rating desc, orders desc';\n else if ($query['sort'] == 'lowest')\n $ratingOrder = 'rating asc';\n // $ratingOrder .= ', name asc';\n\n DB::enableQueryLog();\n // execute\n $currentTransactionCount = DB::connection('virtual_market')\n ->table('orders')\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->count();\n\n $prevTransactionCount = DB::connection('virtual_market')\n ->table('orders')\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->count();\n\n $currentAvgRating = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->get();\n\n $prevAvgRating = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->get();\n\n $ratingTrend = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating,'.$dateQuery))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy($dateGroupBy)\n ->orderByRaw($dateOrder)\n ->get();\n\n $currentShopperData = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->leftJoin('user_feedbacks', 'orders.id', '=', 'user_feedbacks.order_id')\n ->select(DB::raw('garendongs.id, garendongs.user_id, count(orders.rating) as orders, round(avg(orders.rating), 2) as rating, count(user_feedbacks) as feedbacks'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id')\n ->orderByRaw($ratingOrder);\n $currentShopperCount = $currentShopperData->get()->count();\n $shoppers = $currentShopperData->get();\n \n $shopperName = DB::connection('user')\n ->table('users')\n ->join('roles', 'users.role_id', '=', 'roles.id')\n ->select(DB::raw('users.id, users.name'))\n ->where('roles.name', '=', 'garendong')\n ->orderByRaw('users.id asc')\n ->get();\n // convert shopperName to associative array\n $names = array();\n for($i=0; $i<count($shopperName); $i++){\n $names[$shopperName[$i]->id] = $shopperName[$i];\n }\n $shopperChanges = array();\n foreach ($shoppers as $shopper) {\n $result = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->select(DB::raw('count(orders.rating) as orders, round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->where('garendongs.id', '=', $shopper->id)\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id')\n ->get();\n array_push($shopperChanges, $result);\n }\n for($i=0; $i<count($shoppers); $i++){\n $prevOrder = count($shopperChanges[$i]) > 0 ? $shopperChanges[$i][0]->orders : $shoppers[$i]->orders;\n $prevRating = count($shopperChanges[$i]) > 0 ? $shopperChanges[$i][0]->rating : $shoppers[$i]->rating;\n $shoppers[$i]->orders_change = $shoppers[$i]->orders - $prevOrder;\n $shoppers[$i]->rating_change = round((float)($shoppers[$i]->rating - $prevRating), 2);\n $shoppers[$i]->name = $names[$shoppers[$i]->user_id]->name;\n }\n\n $prevShopperData = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->select(DB::raw('garendongs.id, garendongs.user_id as name, count(orders.rating) as orders, round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id');\n $prevShopperCount = $prevShopperData->get()->count();\n \n\n\n $data = array();\n $data['transaction_count'] = array();\n $data['transaction_count']['current'] = $currentTransactionCount;\n $data['transaction_count']['prev'] = $prevTransactionCount;\n $data['shopper_count'] = array();\n $data['shopper_count']['current'] = $currentShopperCount;\n $data['shopper_count']['prev'] = $prevShopperCount;\n $data['avg_rating'] = array();\n $data['avg_rating']['current'] = $currentAvgRating[0]->rating;\n $data['avg_rating']['prev'] = $prevAvgRating[0]->rating;\n $data['avg_rating']['trend'] = array();\n $data['avg_rating']['trend']['granularity'] = $granularity;\n $data['avg_rating']['trend']['trend'] = $ratingTrend;\n $data['shopper'] = $shoppers;\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]); \n }", "public function providerSortBy() {\n return array(\n array('name','ASC','item-01'),\n array('name','DESC','item-39'),\n array('color,name','ASC','item-03'),\n );\n }", "public function getIngredientListWithUnitAndPrice($company_id) {\n $result = $this->db->query(\"SELECT tbl_ingredients.id, tbl_ingredients.name, tbl_ingredients.code, tbl_ingredients.purchase_price, tbl_units.unit_name\n FROM tbl_ingredients \n JOIN tbl_units ON tbl_ingredients.unit_id = tbl_units.id\n WHERE tbl_ingredients.company_id=$company_id AND tbl_ingredients.del_status = 'Live' \n ORDER BY tbl_ingredients.name ASC\")->result();\n return $result;\n }", "function getProducts()\n {\n $this->db->select('id, name');\n $this->db->from('tbl_products');\n\t\t$this->db->order_by(\"name asc\");\n $query = $this->db->get(); \n return $query->result();\n }", "public function getProductList($query)\n {\n $prevPeriod = $this->getPrevDatePeriod($query['startDate'], $query['endDate']);\n\n $granularity = $this->getGranularity($query['startDate'], $query['endDate']);\n if($granularity == 'month') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n } else if($granularity == 'day') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM-DD\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n }\n\n DB::enableQueryLog();\n // execute\n $dbQuery = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('products', 'order_lines.product_id', '=', 'products.id')\n ->join('categories', 'products.category_id', '=', 'categories.id')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->join('units', 'products.default_unit_id', 'units.id')\n ->select(DB::raw('products.id, products.name, categories.name as category, count(*), sum(quantity) as sums, units.unit, round(avg(order_lines.price/order_lines.quantity), 0) as avg_price, round((cast(count(case when order_lines.is_available then 1 end) as float)/count(*) *100)::numeric, 2) as availability'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->groupBy('products.id')\n ->groupBy('categories.name')\n ->groupBy('units.unit')\n ->orderByRaw('count desc, products.name asc');\n\n $totalRows = $dbQuery->get()->count();\n\n $product = $dbQuery\n ->get();\n\n for($i=0; $i<count($product); $i++) {\n $countData = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('products', 'order_lines.product_id', '=', 'products.id')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->join('units', 'products.default_unit_id', 'units.id')\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->where('products.id', '=', $product[$i]->id)\n ->count();\n if($countData) {\n $prevData = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('products', 'order_lines.product_id', '=', 'products.id')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->join('units', 'products.default_unit_id', 'units.id')\n ->select(DB::raw('count(*), sum(quantity) as sums, round(avg(order_lines.price/order_lines.quantity), 0) as avg_price, round((cast(count(case when order_lines.is_available then 1 end) as float)/count(*) *100)::numeric, 2) as availability'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->where('products.id', '=', $product[$i]->id)\n ->get();\n } else {\n $prevData = array();\n }\n if(count($prevData) != 0) {\n $product[$i]->sum_change = (string) ($product[$i]->sums - $prevData[0]->sums);\n $product[$i]->price_change = (string) ($product[$i]->avg_price - $prevData[0]->avg_price);\n $product[$i]->availability_change = (string) ($product[$i]->availability - $prevData[0]->availability);\n } else {\n $product[$i]->sum_change = (string) 0;\n $product[$i]->price_change = (string) 0;\n $product[$i]->availability_change = (string) 0;\n }\n }\n\n\n $currentAvailability = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->select('*')\n ->select(DB::raw('count(case when order_lines.is_available then 1 end) as available, count(order_lines.is_available) as total'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->get();\n if($currentAvailability[0]->total > 0)\n $currentAvailability = round(((float)$currentAvailability[0]->available / $currentAvailability[0]->total)*100, 2);\n else \n $currentAvailability = null;\n\n $prevAvailability = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->select(DB::raw('count(case when order_lines.is_available then 1 end) as available, count(order_lines.is_available) as total'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->get();\n if($prevAvailability[0]->total > 0)\n $prevAvailability = round(((float)$prevAvailability[0]->available / $prevAvailability[0]->total)*100, 2);\n else \n $prevAvailability = null;\n\n $availabilityTrend = DB::connection('virtual_market')\n ->table('order_lines')\n ->join('orders', 'order_lines.order_id', '=', 'orders.id')\n ->select(DB::raw('round((cast(count(case when order_lines.is_available then 1 end) as float)/count(*) *100)::numeric, 2) as availability,'.$dateQuery))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->groupBy($dateGroupBy)\n ->orderByRaw($dateOrder)\n ->get();\n\n $data = array();\n $data['total_rows'] = $totalRows;\n $data['product'] = $product;\n $data['availability'] = array();\n $data['availability']['current'] = $currentAvailability;\n $data['availability']['prev'] = $prevAvailability;\n $data['availability']['trend'] = array();\n $data['availability']['trend']['granularity'] = $granularity;\n $data['availability']['trend']['trend'] = $availabilityTrend;\n\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]);\n }", "public function getSortedByCity()\n {\n return $this->createQueryBuilder('d')\n ->orderBy('d.name', 'ASC')\n ->getQuery()\n ->getResult();\n }", "public function mainform_get_quotes()\n\t{\n\t\t$quotes = $this->get_quotes();\n\t// process the quotes\n\t\tforeach($quotes as $key => &$value)\n\t\t{\n\t\t $tmp = (array) $value;\n\t\t $quotes[$key] = $tmp['price'];\n\t\t} \n\t\tksort($quotes);\n\t\t$data['quotes'] = $quotes;\n\t\treturn $quotes;\n\t}", "public function get_list()\n\t{\n\n\t\t$sel=$this->db->prepare(\"SELECT * from shop ORDER BY distance ASC\");\n\n $sel->execute();\n\n return ($sel->fetchAll(PDO::FETCH_ASSOC));\n\t\t\n\n\n\n }", "public function resolvePrice();", "function nameSearch($conn, $search_term)\n {\n $query = \"SELECT DISTINCT whwp_Advert.advert_id FROM whwp_Advert \"\n . \"WHERE advert_bookname = :search_term \"\n . \"ORDER BY whwp_Advert.advert_price DESC\";\n $conn->prepQuery($query);\n $conn->bind('search_term', $search_term);\n $advert = $conn->resultset();\n return $advert;\n }", "function sortOrderProducts(order_products $orderProducts);", "public function getPriceAll()\n { \n $collection = $this->PostCollectionFactory->create();\n /*$a = $collection->getPrice();*/\n foreach ($collection as $key => $value) {\n $value->getPrice();\n }\n return $value->getPrice();\n }", "function get_products(){\r\n global $db;\r\n $query = 'SELECT * FROM products ORDER BY productID';\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $products = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $products;\r\n}", "public function refinedGetJobs(){\r\n\t\t//extract info from the form\r\n\t\textract($_POST);\r\n\t\tif($sortBy == 'highestPrice'){\r\n\t\t\t$orderBy = 'price';\r\n\t\t\t$ascOrDesc = 'DESC';\r\n\t\t} elseif($sortBy == 'lowestPrice') {\r\n\t\t\t$orderBy = 'price';\r\n\t\t\t$ascOrDesc = 'ASC';\r\n\t\t} elseif($sortBy == 'newestJobs') {\r\n\t\t\t$orderBy = 'timeStamp';\r\n\t\t\t$ascOrDesc = 'ASC';\r\n\t\t} elseif($sortBy == 'oldestJobs') {\r\n\t\t\t$orderBy = 'timeStamp';\r\n\t\t\t$ascOrDesc = 'DESC';\r\n\t\t}\r\n\r\n\t\t$query = \"SELECT jobID, userID, category, title, price, description, timeStamp FROM jobs WHERE category='$category' ORDER BY $orderBy $ascOrDesc\";\r\n\t\t$data = $this -> multiSelectQuery($query);\r\n\t\treturn $data;\r\n\t}", "function findsPrPosPriceList($pricelist)\n{\n\t$data['from'] = 'prpos';\n\t$data['select'] = 'ID, ARTNR, LST_NR, POS_0_WERT';\n\t$addWhere = \"\n\t\tLST_NR = '\" . $pricelist . \"'\";\n\treturn SQLSelect($data['from'], $data['select'], $addWhere, 0, 0, 0, 'shop', __FILE__, __LINE__);\n}", "public function searchRepeatedProduct($name) {\n $stmt = $this->db->prepare(\"select * from product where title = :title;\");\n $stmt->bindValue(\"title\", $name, PDO::PARAM_STR);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function sortWithAll($a, $b)\n{\n\n $priorityRank = expSort($a, $b);\n\n if ($priorityRank == 0) {\n $aPrice = $a[\"price\"];\n $bPrice = $b[\"price\"];\n if (is_numeric($aPrice) and is_numeric($bPrice)) {\n $diff = $bPrice - $aPrice;\n } elseif (is_numeric($aPrice)) {\n $diff= -1; //only a is a nmber\n } else {\n $diff = 1; //only b is a number\n }\n if ($diff == 0){\n return critterNameSort($a, $b);\n }\n return $diff;\n }\n return $priorityRank;\n}", "public function listOrder($arr_params){\n //lay bien ket noi csdl\n $limit = $arr_params['limit'];\n $page = $arr_params['page'];\n $start = ($page - 1) * $limit;\n $start = ($page - 1) * $limit;\n $obj_select=$this->connection->prepare\n (\"select * from orders where TRUE $this->str_search \n order by orders.created_at desc LIMIT $start, $limit\");\n //lay tat ca ket qua tra ve\n $arr_select = [];\n $obj_select->execute($arr_select);\n $orders = $obj_select->fetchAll(PDO::FETCH_ASSOC);\n return $orders;\n }", "function GetPrice($symbol)\n{\n\t//google finance can only handle up to 100 quotes at a time so split up query then merge results\n\tif(count($symbol) > 100)\n\t{\n\t\t$retArr = array();\n\t\tfor($j=0; $j< count($symbol); $j +=100)\n\t\t{\n\t\t\t$arr = LookUpWithFormattedString(FormatString(array_slice($symbol, $j, 100)));\n\t\t\t$retArr = array_merge($retArr, $arr);\n\t\t}\n\t\treturn $retArr;\n\t}\n\telse\n\t\treturn LookUpWithFormattedString(FormatString($symbol));\n}", "public function getSorting();", "public function get_top_seller($num=5){\n $data =$this\n ->join('product_description','product.id','=','product_description.product_id')\n ->select(\"product.id\",'product.price','product.image','product_description.name')\n ->where('stock_status_id','5')\n ->where('status','1')\n ->where('product_description.language_id','1')\n ->orderBy('id', 'ASC')\n ->take($num)\n ->get();\n return $data;\n }", "function getAllKontakt($id) {\n $rechte=berechtigung(\"cp_\");\n $sql=\"select * from contacts where cp_cv_id=$id and $rechte order by cp_name,cp_givenname\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n return $rs;\n}", "public function prices() {\n return $this->hasMany('Auction_price'); // this matches the Eloquent model\n }", "public function getTopProduct($params) {\n\t\t$query = OrderItem::find();\n\t\t$this->load($params);\n\t\t$query->select('product.name,SUM(order_item.quantity) as total');\n\t\t$query->innerJoin('product', 'order_item.product_id=product.id');\n\t\t$query->innerJoin('order', 'order_item.order_id=order.id');\n\t\t$query->andFilterWhere(['order.parent_id' => $this->username == null ? $this->user->id : $this->username]);\n\t\tif($this->start_date != null) {\n\t\t\tif($this->end_date == null) {\n\t\t\t\t$this->end_date = date('Y-m-d');\n\t\t\t}\n\t\t\t$query->andFilterWhere([\n\t\t\t\t'>=',\n\t\t\t\t'order.created_date',\n\t\t\t\t$this->start_date,\n\t\t\t]);\n\t\t\t$query->andFilterWhere([\n\t\t\t\t'<=',\n\t\t\t\t'order.created_date',\n\t\t\t\t$this->end_date,\n\t\t\t]);\n\t\t\t//\t\t\t$query->andFilterWhere([\n\t\t\t//\t\t\t\t'between',\n\t\t\t//\t\t\t\t'order.created_date',\n\t\t\t//\t\t\t\t$this->start_date,\n\t\t\t//\t\t\t\t$this->end_date,\n\t\t\t//\t\t\t]);\n\t\t\t//\t\t\t$query->andFilterWhere([\n\t\t\t//\t\t\t\t'between',\n\t\t\t//\t\t\t\t'order_item.created_date',\n\t\t\t//\t\t\t\t$this->start_date,\n\t\t\t//\t\t\t\t$this->end_date,\n\t\t\t//\t\t\t]);\n\t\t}\n\t\t$query->asArray()->groupBy('product.name');\n\t\t$query->orderBy('total DESC');\n\t\t$top_products = $query->limit(10)->all();\n\t\t$top = [];\n\t\tif($top_products != null) {\n\t\t\tforeach($top_products as $top_product) {\n\t\t\t\t$top[] = [\n\t\t\t\t\t$top_product['name'],\n\t\t\t\t\t(int) $top_product['total'],\n\t\t\t\t];\n\t\t\t}\n\t\t} else {\n\t\t\t$top[] = [\n\t\t\t\t'Không có',\n\t\t\t\t0,\n\t\t\t];\n\t\t}\n\t\t$top = ArrayHelper::merge([\n\t\t\t[\n\t\t\t\t'Top sản phẩm bán chạy',\n\t\t\t\t'Số lượng',\n\t\t\t],\n\t\t], $top);\n\t\treturn $top;\n\t}", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public function getPrice();" ]
[ "0.7209732", "0.6168381", "0.6044679", "0.60036105", "0.59780574", "0.59621537", "0.59010166", "0.5794474", "0.57897145", "0.5743816", "0.573246", "0.5726216", "0.5680039", "0.56217074", "0.55058527", "0.5499792", "0.54768866", "0.546463", "0.54193276", "0.54191655", "0.5410475", "0.53759474", "0.5368642", "0.5353309", "0.53421044", "0.5308763", "0.53073573", "0.5304042", "0.5267415", "0.525642", "0.5252507", "0.5242177", "0.52225703", "0.52177656", "0.52130955", "0.5191971", "0.5190102", "0.5181297", "0.51726186", "0.51677346", "0.5165283", "0.51434535", "0.5140567", "0.5134291", "0.51286453", "0.51221687", "0.5116349", "0.51151854", "0.51078075", "0.510231", "0.5101755", "0.5096618", "0.50925434", "0.5087766", "0.50688255", "0.5067235", "0.5064748", "0.50611275", "0.5060578", "0.50571525", "0.5050851", "0.50472546", "0.50468993", "0.50393087", "0.503866", "0.50374395", "0.5014652", "0.50129974", "0.5007661", "0.50060314", "0.50007325", "0.49973476", "0.49919087", "0.49915043", "0.49854523", "0.49771506", "0.49671704", "0.49604765", "0.49559772", "0.4952068", "0.49487436", "0.49478456", "0.4944611", "0.49421558", "0.49413508", "0.4940276", "0.49306703", "0.4926223", "0.49261758", "0.4924035", "0.49216828", "0.49165666", "0.49159935", "0.49129823", "0.49118856", "0.49100924", "0.4897653", "0.48971543", "0.48971543", "0.48971543", "0.48971543" ]
0.0
-1